]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - src/patches/suse-2.6.27.39/patches.arch/s390-15-03-zfcp-recover-stall.patch
Imported linux-2.6.27.39 suse/xen patches.
[ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.arch / s390-15-03-zfcp-recover-stall.patch
diff --git a/src/patches/suse-2.6.27.39/patches.arch/s390-15-03-zfcp-recover-stall.patch b/src/patches/suse-2.6.27.39/patches.arch/s390-15-03-zfcp-recover-stall.patch
new file mode 100644 (file)
index 0000000..112af1d
--- /dev/null
@@ -0,0 +1,46 @@
+From: Gerald Schaefer <geraldsc@de.ibm.com>
+Subject: zfcp: Recover from stalled outbound queue
+References: bnc#518291,LTC#54460
+
+Symptom:     In some error scenarious, the channel can stall. To
+             Linux this looks like a stall in the outbound queue.
+             Linux has to recover this.
+Problem:     There is no trigger to recover the queues if the outbound
+             queue stalls.
+Solution:    When trying to issue a non-SCSI command, zfcp waits for
+             5 seconds to get a free SBAL in the queue. Use this timeout
+             as a trigger: If after 5 seconds there is no free SBAL,
+             assume a stalled outbound queue and trigger recovery.
+
+Acked-by: John Jolly <jjolly@suse.de>
+---
+ drivers/s390/scsi/zfcp_dbf.c |    2 +-
+ drivers/s390/scsi/zfcp_fsf.c |    5 ++++-
+ 2 files changed, 5 insertions(+), 2 deletions(-)
+
+--- a/drivers/s390/scsi/zfcp_fsf.c     2009-06-23 14:24:48.000000000 +0200
++++ b/drivers/s390/scsi/zfcp_fsf.c     2009-06-23 14:26:00.000000000 +0200
+@@ -668,8 +668,11 @@ static int zfcp_fsf_req_sbal_get(struct 
+                                       zfcp_fsf_sbal_check(adapter), 5 * HZ);
+       if (ret > 0)
+               return 0;
+-      if (!ret)
++      if (!ret) {
+               atomic_inc(&adapter->qdio_outb_full);
++              /* assume hanging outbound queue, try queue recovery */
++              zfcp_erp_adapter_reopen(adapter, 0, 77, NULL);
++      }
+       spin_lock_bh(&adapter->req_q_lock);
+       return -EIO;
+--- a/drivers/s390/scsi/zfcp_dbf.c     2009-06-23 14:20:41.000000000 +0200
++++ b/drivers/s390/scsi/zfcp_dbf.c     2009-06-23 14:25:50.000000000 +0200
+@@ -567,7 +567,7 @@ static const char *zfcp_rec_dbf_ids[] = 
+       [74]    = "unit recovery follow-up after successful port recovery",
+       [75]    = "port recovery retry after failure",
+       [76]    = "unit recovery retry after failure",
+-      [77]    = "",
++      [77]    = "adapter reopen from queue stall",
+       [78]    = "duplicate request id",
+       [79]    = "link down",
+       [80]    = "exclusive read-only unit access unsupported",