]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Add scsi ips fix to 2.6.24 queue
authorChris Wright <chrisw@sous-sol.org>
Wed, 12 Mar 2008 03:53:36 +0000 (20:53 -0700)
committerChris Wright <chrisw@sous-sol.org>
Wed, 12 Mar 2008 03:53:36 +0000 (20:53 -0700)
queue-2.6.24/scsi-ips-handle-scsi_add_host-failure-and-other-err-cleanups.patch [new file with mode: 0644]
queue-2.6.24/series

diff --git a/queue-2.6.24/scsi-ips-handle-scsi_add_host-failure-and-other-err-cleanups.patch b/queue-2.6.24/scsi-ips-handle-scsi_add_host-failure-and-other-err-cleanups.patch
new file mode 100644 (file)
index 0000000..322a366
--- /dev/null
@@ -0,0 +1,67 @@
+From fujita.tomonori@lab.ntt.co.jp  Tue Mar 11 20:46:52 2008
+To: stable@kernel.org
+Cc: chrisw@sous-sol.org, James.Bottomley@HansenPartnership.com, Mark_Salyzyn@adaptec.com, jeff@garzik.org, tomof@acm.org
+Subject: SCSI ips: handle scsi_add_host() failure, and other err cleanups
+From: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
+Message-Id: <20080312102542V.fujita.tomonori@lab.ntt.co.jp>
+Date: Wed, 12 Mar 2008 10:25:42 +0900
+
+From: Jeff Garzik <jeff@garzik.org>
+commit 2551a13e61d3c3df6c2da6de5a3ece78e6d67111
+
+FUJITA Tomonori notes:
+  It didn't intend to fix a critical bug, however, it turned out that it
+  does. Without this patch, the ips driver in 2.6.23 and 2.6.24 doesn't
+  work at all. You can find the more details at the following thread:
+
+  http://marc.info/?t=120293911900023&r=1&w=2
+
+Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
+Acked-by: "Salyzyn, Mark" <mark_salyzyn@adaptec.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
+Signed-off-by: Chris Wright <chrisw@sous-sol.org>
+---
+ drivers/scsi/ips.c |   18 +++++++++++++-----
+ 1 file changed, 13 insertions(+), 5 deletions(-)
+
+--- a/drivers/scsi/ips.c
++++ b/drivers/scsi/ips.c
+@@ -6842,13 +6842,10 @@ ips_register_scsi(int index)
+       if (request_irq(ha->irq, do_ipsintr, IRQF_SHARED, ips_name, ha)) {
+               IPS_PRINTK(KERN_WARNING, ha->pcidev,
+                          "Unable to install interrupt handler\n");
+-              scsi_host_put(sh);
+-              return -1;
++              goto err_out_sh;
+       }
+       kfree(oldha);
+-      ips_sh[index] = sh;
+-      ips_ha[index] = ha;
+       /* Store away needed values for later use */
+       sh->io_port = ha->io_addr;
+@@ -6867,10 +6864,21 @@ ips_register_scsi(int index)
+       sh->max_channel = ha->nbus - 1;
+       sh->can_queue = ha->max_cmds - 1;
+-      scsi_add_host(sh, NULL);
++      if (scsi_add_host(sh, &ha->pcidev->dev))
++              goto err_out;
++
++      ips_sh[index] = sh;
++      ips_ha[index] = ha;
++
+       scsi_scan_host(sh);
+       return 0;
++
++err_out:
++      free_irq(ha->pcidev->irq, ha);
++err_out_sh:
++      scsi_host_put(sh);
++      return -1;
+ }
+ /*---------------------------------------------------------------------------*/
index fec5f00b1228357d8c0ca1542c8ec094319bbc74..bb5bdcd4dd7b3791884176b2794d589c6671a46c 100644 (file)
@@ -19,3 +19,4 @@ x86-clear-df-before-calling-signal-handler.patch
 iov_iter_advance-fix.patch
 drivers-fix-dma_get_required_mask.patch
 x86-adjust-enable_nmi_through_lvt0.patch
+scsi-ips-handle-scsi_add_host-failure-and-other-err-cleanups.patch