kern/140438: [isp] isp(4) causes threads to hang due to
callwheel bucket list corruption
Alexander Sack
asack at niksun.com
Wed Nov 11 20:50:03 UTC 2009
The following reply was made to PR kern/140438; it has been noted by GNATS.
From: Alexander Sack <asack at niksun.com>
To: bug-followup at FreeBSD.org, asack at niksun.com
Cc:
Subject: Re: kern/140438: [isp] isp(4) causes threads to hang due to callwheel bucket list corruption
Date: Wed, 11 Nov 2009 15:03:00 -0500
--Apple-Mail-7-489706079
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=us-ascii
RELENG_8 has same issue with my 2342 card. Note that it looks like =
during the 8Gbps refresh the check for ldt_running was made in both =
spots (as well as the call to freeze the simq again, cool beans) so this =
patch is a little smaller but in the same vain.
I appreciate some comments on this. It has been heavily tested in the =
labs.
-aps
--Apple-Mail-7-489706079
Content-Disposition: attachment;
filename=isp.RELENG_8.diff
Content-Type: application/octet-stream;
name="isp.RELENG_8.diff"
Content-Transfer-Encoding: 7bit
Index: isp_freebsd.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/isp/isp_freebsd.c,v
retrieving revision 1.150.2.2
diff -u -r1.150.2.2 isp_freebsd.c
--- isp_freebsd.c 13 Aug 2009 01:45:26 -0000 1.150.2.2
+++ isp_freebsd.c 11 Nov 2009 19:52:49 -0000
@@ -139,9 +139,6 @@
fc->path = path;
fc->isp = isp;
- callout_init_mtx(&fc->ldt, &isp->isp_osinfo.lock, 0);
- callout_init_mtx(&fc->gdt, &isp->isp_osinfo.lock, 0);
-
if (THREAD_CREATE(isp_kthread, fc, &fc->kproc, 0, 0, "%s: fc_thrd%d", device_get_nameunit(isp->isp_osinfo.dev), chan)) {
xpt_free_path(fc->path);
ISP_LOCK(isp);
Index: isp_pci.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/isp/isp_pci.c,v
retrieving revision 1.149.2.1
diff -u -r1.149.2.1 isp_pci.c
--- isp_pci.c 3 Aug 2009 08:13:06 -0000 1.149.2.1
+++ isp_pci.c 11 Nov 2009 19:52:50 -0000
@@ -922,6 +922,17 @@
mtx_init(&isp->isp_osinfo.lock, "isp", NULL, MTX_DEF);
locksetup++;
+ /*
+ * Initialize callouts before we kick start the ISP.
+ */
+ if (IS_FC(isp)) {
+ for (cmap = 0; cmap < isp->isp_nchan; cmap++) {
+ struct isp_fc *fc = ISP_FC_PC(isp, cmap);
+ callout_init_mtx(&fc->ldt, &isp->isp_osinfo.lock, 0);
+ callout_init_mtx(&fc->gdt, &isp->isp_osinfo.lock, 0);
+ }
+ }
+
if (isp_setup_intr(dev, irq, ISP_IFLAGS, NULL, isp_platform_intr, isp, &pcs->ih)) {
device_printf(dev, "could not setup interrupt\n");
goto bad;
--Apple-Mail-7-489706079
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=us-ascii
--Apple-Mail-7-489706079--
More information about the freebsd-scsi
mailing list