From d24099df9e379b150c164da354b8c6fdafc73257 Mon Sep 17 00:00:00 2001 From: Brian King Date: Tue, 21 Sep 2010 10:17:11 -0500 Subject: [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 Signed-off-by: James Bottomley --- drivers/scsi/ibmvscsi/ibmvfc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'drivers/scsi/ibmvscsi') diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index f033bf39690..00d08b25425 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) spin_unlock_irqrestore(vhost->host->host_lock, flags); rc = ibmvfc_reset_crq(vhost); spin_lock_irqsave(vhost->host->host_lock, flags); - if (rc || (rc = ibmvfc_send_crq_init(vhost)) || - (rc = vio_enable_interrupts(to_vio_dev(vhost->dev)))) { + if (rc == H_CLOSED) + vio_enable_interrupts(to_vio_dev(vhost->dev)); + else if (rc || (rc = ibmvfc_send_crq_init(vhost)) || + (rc = vio_enable_interrupts(to_vio_dev(vhost->dev)))) { ibmvfc_link_down(vhost, IBMVFC_LINK_DEAD); dev_err(vhost->dev, "Error after reset (rc=%d)\n", rc); } -- cgit v1.2.3-70-g09d2