diff options
author | Brian King <brking@linux.vnet.ibm.com> | 2008-08-15 11:59:22 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-08-16 11:48:25 -0400 |
commit | 915be024414c52e311f795566ac938223ba3c847 (patch) | |
tree | 85f488b8bbf6d7379500764b3595f541c207a9bf /drivers/scsi/ibmvscsi | |
parent | 3eddc569770a76f2ca65621cdde3c0a2552b5b0c (diff) |
[SCSI] ibmvfc: Fixup host state during reinit
If an ELS is received while the virtual fibre channel adapter is going
through its discovery, a flag is set which causes discovery to get
re-driven. However, the hosts's state does not get set back to
IBMVFC_INITIALIZING and scsi_block_requests does not get called again,
which can result in queuecommand ops getting sent during
discovery. This should not occur and may cause problems. One example
is that we may no longer be logged into the target we send the command
to, resulting in a failure which should not have occurred.
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')
-rw-r--r-- | drivers/scsi/ibmvscsi/ibmvfc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index ee11568d581f..406ab27f80e9 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.c +++ b/drivers/scsi/ibmvscsi/ibmvfc.c | |||
@@ -3602,8 +3602,9 @@ static void ibmvfc_do_work(struct ibmvfc_host *vhost) | |||
3602 | } | 3602 | } |
3603 | } | 3603 | } |
3604 | 3604 | ||
3605 | if (vhost->reinit) { | 3605 | if (vhost->reinit && !ibmvfc_set_host_state(vhost, IBMVFC_INITIALIZING)) { |
3606 | vhost->reinit = 0; | 3606 | vhost->reinit = 0; |
3607 | scsi_block_requests(vhost->host); | ||
3607 | ibmvfc_set_host_action(vhost, IBMVFC_HOST_ACTION_QUERY); | 3608 | ibmvfc_set_host_action(vhost, IBMVFC_HOST_ACTION_QUERY); |
3608 | } else { | 3609 | } else { |
3609 | ibmvfc_set_host_action(vhost, IBMVFC_HOST_ACTION_NONE); | 3610 | ibmvfc_set_host_action(vhost, IBMVFC_HOST_ACTION_NONE); |