aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ibmvscsi
diff options
context:
space:
mode:
authorBrian King <brking@linux.vnet.ibm.com>2010-09-21 11:17:11 -0400
committerJames Bottomley <James.Bottomley@suse.de>2010-10-07 18:17:06 -0400
commitd24099df9e379b150c164da354b8c6fdafc73257 (patch)
tree8477826140d799ae23b0fe14b993512923c7934b /drivers/scsi/ibmvscsi
parent1a03ae0f556a931aa3747b70e44b78308f5b0590 (diff)
[SCSI] ibmvfc: Handle Virtual I/O Server reboot
If a Virtual I/O server is rebooted, the client fibre channel sees a transport event on its CRQ, which causes it to attempt to reconnect to the CRQ. For a period of time during the VIOS reboot, the client's attempts to register the CRQ will return H_CLOSED, indicating the server side is not currently registered. The ibmvfc driver was not handling this well and was taking the virtual adapter offline. Fix this by re-enabling our interrupt and waiting for the event on our CRQ indicating the server is back, at which point we can reconnect. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/ibmvscsi')
-rw-r--r--drivers/scsi/ibmvscsi/ibmvfc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c
index f033bf39690f..00d08b25425f 100644
--- a/drivers/scsi/ibmvscsi/ibmvfc.c
+++ b/drivers/scsi/ibmvscsi/ibmvfc.c
@@ -4302,8 +4302,10 @@ static void ibmvfc_do_work(struct ibmvfc_host *vhost)
4302 spin_unlock_irqrestore(vhost->host->host_lock, flags); 4302 spin_unlock_irqrestore(vhost->host->host_lock, flags);
4303 rc = ibmvfc_reset_crq(vhost); 4303 rc = ibmvfc_reset_crq(vhost);
4304 spin_lock_irqsave(vhost->host->host_lock, flags); 4304 spin_lock_irqsave(vhost->host->host_lock, flags);
4305 if (rc || (rc = ibmvfc_send_crq_init(vhost)) || 4305 if (rc == H_CLOSED)
4306 (rc = vio_enable_interrupts(to_vio_dev(vhost->dev)))) { 4306 vio_enable_interrupts(to_vio_dev(vhost->dev));
4307 else if (rc || (rc = ibmvfc_send_crq_init(vhost)) ||
4308 (rc = vio_enable_interrupts(to_vio_dev(vhost->dev)))) {
4307 ibmvfc_link_down(vhost, IBMVFC_LINK_DEAD); 4309 ibmvfc_link_down(vhost, IBMVFC_LINK_DEAD);
4308 dev_err(vhost->dev, "Error after reset (rc=%d)\n", rc); 4310 dev_err(vhost->dev, "Error after reset (rc=%d)\n", rc);
4309 } 4311 }