diff options
author | Brian King <brking@linux.vnet.ibm.com> | 2009-05-28 17:17:32 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-06-08 14:07:47 -0400 |
commit | 5e47167b6be0ca24cbb04fb71ea611ab7c089aff (patch) | |
tree | 01e5f39d7944cbc4a220f53ebeb08abb897f101f /drivers/scsi/ibmvscsi/ibmvfc.c | |
parent | 497f9c504f76e7a751cd370604e1c8521743746d (diff) |
[SCSI] ibmvfc: Improve device rediscovery
For certain scenarios during device rediscovery, we detect we need
to log back into a target. Currently we do just that - PLOGI/PRLI
back into the target. Change the code to delete and add the target
from the FC transport layer as well, to ensure we handle any cases
where the target may have changed.
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/ibmvscsi/ibmvfc.c')
-rw-r--r-- | drivers/scsi/ibmvscsi/ibmvfc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index 04d97d9e3cea..da233256e9aa 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.c +++ b/drivers/scsi/ibmvscsi/ibmvfc.c | |||
@@ -583,7 +583,7 @@ static void ibmvfc_init_host(struct ibmvfc_host *vhost, int relogin) | |||
583 | } | 583 | } |
584 | 584 | ||
585 | list_for_each_entry(tgt, &vhost->targets, queue) | 585 | list_for_each_entry(tgt, &vhost->targets, queue) |
586 | tgt->need_login = 1; | 586 | ibmvfc_set_tgt_action(tgt, IBMVFC_TGT_ACTION_DEL_RPORT); |
587 | scsi_block_requests(vhost->host); | 587 | scsi_block_requests(vhost->host); |
588 | ibmvfc_set_host_action(vhost, IBMVFC_HOST_ACTION_INIT); | 588 | ibmvfc_set_host_action(vhost, IBMVFC_HOST_ACTION_INIT); |
589 | vhost->job_step = ibmvfc_npiv_login; | 589 | vhost->job_step = ibmvfc_npiv_login; |
@@ -3155,13 +3155,13 @@ static void ibmvfc_tgt_adisc_done(struct ibmvfc_event *evt) | |||
3155 | case IBMVFC_MAD_SUCCESS: | 3155 | case IBMVFC_MAD_SUCCESS: |
3156 | tgt_dbg(tgt, "ADISC succeeded\n"); | 3156 | tgt_dbg(tgt, "ADISC succeeded\n"); |
3157 | if (ibmvfc_adisc_needs_plogi(mad, tgt)) | 3157 | if (ibmvfc_adisc_needs_plogi(mad, tgt)) |
3158 | tgt->need_login = 1; | 3158 | ibmvfc_set_tgt_action(tgt, IBMVFC_TGT_ACTION_DEL_RPORT); |
3159 | break; | 3159 | break; |
3160 | case IBMVFC_MAD_DRIVER_FAILED: | 3160 | case IBMVFC_MAD_DRIVER_FAILED: |
3161 | break; | 3161 | break; |
3162 | case IBMVFC_MAD_FAILED: | 3162 | case IBMVFC_MAD_FAILED: |
3163 | default: | 3163 | default: |
3164 | tgt->need_login = 1; | 3164 | ibmvfc_set_tgt_action(tgt, IBMVFC_TGT_ACTION_DEL_RPORT); |
3165 | fc_reason = (mad->fc_iu.response[1] & 0x00ff0000) >> 16; | 3165 | fc_reason = (mad->fc_iu.response[1] & 0x00ff0000) >> 16; |
3166 | fc_explain = (mad->fc_iu.response[1] & 0x0000ff00) >> 8; | 3166 | fc_explain = (mad->fc_iu.response[1] & 0x0000ff00) >> 8; |
3167 | tgt_info(tgt, "ADISC failed: %s (%x:%x) %s (%x) %s (%x) rc=0x%02X\n", | 3167 | tgt_info(tgt, "ADISC failed: %s (%x:%x) %s (%x) %s (%x) rc=0x%02X\n", |