From owner-freebsd-scsi@FreeBSD.ORG Wed Nov 11 20:50:03 2009 Return-Path: Delivered-To: freebsd-scsi@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 530101065692 for ; Wed, 11 Nov 2009 20:50:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 413C38FC1D for ; Wed, 11 Nov 2009 20:50:03 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id nABKo2Ff040607 for ; Wed, 11 Nov 2009 20:50:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id nABKo26o040606; Wed, 11 Nov 2009 20:50:02 GMT (envelope-from gnats) Date: Wed, 11 Nov 2009 20:50:02 GMT Message-Id: <200911112050.nABKo26o040606@freefall.freebsd.org> To: freebsd-scsi@FreeBSD.org From: Alexander Sack Cc: Subject: Re: kern/140438: [isp] isp(4) causes threads to hang due to callwheel bucket list corruption X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Alexander Sack List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Nov 2009 20:50:03 -0000 The following reply was made to PR kern/140438; it has been noted by GNATS. From: Alexander Sack To: bug-followup@FreeBSD.org, asack@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--