Date: Thu, 23 May 2013 09:23:06 +0300 From: Konstantin Belousov <kostikbel@gmail.com> To: Andreas Turriff <maillist@turriff.net> Cc: freebsd-current@freebsd.org Subject: Re: tws(4) kernel panic on boot Message-ID: <20130523062306.GR3047@kib.kiev.ua> In-Reply-To: <519D09B2.2030003@turriff.net> References: <519AD765.3060601@turriff.net> <20130521123306.GD3047@kib.kiev.ua> <519B9FED.8000806@turriff.net> <519D09B2.2030003@turriff.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--rZOkLKku1JyljZ3B Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 22, 2013 at 11:08:50AM -0700, Andreas Turriff wrote: > On 5/21/2013 9:25 AM, Andreas Turriff wrote: > > On 5/21/2013 5:33 AM, Konstantin Belousov wrote: > >> On Mon, May 20, 2013 at 07:09:41PM -0700, Andreas Turriff wrote: > >>> On migrating one of my servers to -current, I discovered that the tws > >>> driver panics on boot; I will follow up with a full backtrace once I > >>> have a chance to extract it. In the meantime, there is a PR about a= =20 > >>> very > >>> similar error in twa - 177020. Is it possible those are related, and= =20 > >>> the > >>> same sort of change needs to be made to tws? > >> It is possible that the regression was in r246713, but the code is > >> structured differently, and there were more tws(4) changes since then. > >> You need to provide data for somebody to start looking into the proble= m. > > I know. That's why I said, I'd follow up with more info once I can=20 > > extract it. > > > > The system in question is a Dell PowerEdge 840 server, 8 GiByte RAM,=20 > > with an Intel NIC driven by em(4) and a 3Ware 9750-4i RAID controller.= =20 > > There is no src.conf > > > > /etc/make.conf: > > CPUTYPE?=3Dcore2 > > > > Error message: > > > > LSI 3ware device driver for SAS/SATA storage controllers, version:=20 > > 10.80.00.005 > > tws0: <LSI 3ware SAS/SATA Storage Controller> port 0xec00-0xecff mem=20 > > 0xfe9fc000-0xfe9fffff,0xfe980000-0xfe9bffff irq 16 at device 0.0 o1 > > tws0: Using MSIng APIC ID to 4 > > panic: _bus_dmamap_load_ccb: Unsupported func code 0 > > cpuid =3D 0Version 2.0> irqs 0-23 on motherboard > > KDB: enter: panic2.0> irqs 32-55 on motherboard > > [ thread pid 0 tid 100000 ] > > Stopped at kdb_enter+0x3e: movq $0,kdb_why > > > > Backtrace > > > > Tracing pid 0 tid 100000 td 0xffffffff81376610 > > kdb_enter() at kdb_enter+0x3e/frame 0xffffffff8191a340 > > panic() at panic+0x175/frame 0xffffffff8191a3c0 > > _bus_dmamap_load_ccb() at _bus_dmamap_load_ccb+0x1c3/frame=20 > > 0xffffffff8191a420 > > bus_dmamap_load_ccb() at bus_dmamap_load_ccb+0x91/frame=20 > > 0xffffffff8191a480 > > tws_map_request() at tws_map_request+0x71/frame 0xffffffff8191a4c0 > > tws_get_param() at tws_get_param+0xdd/frame 0xffffffff8191a520 > > tws_display_ctlr_info() at tws_display_ctlr_info+0x38/frame=20 > > 0xffffffff8191a590 > > tws_init_ctlr() at tws_init_ctlr+0x6b/frame 0xffffffff8191a5b0 > > tws_attach() at tws_attach+0xd79/frame 0xffffffff8191a670 > > device_attach() at device_attach+0x396/frame 0xffffffff8191a6c0 > > bus_generic_attach() at bus_generic_attach+0x2d/frame 0xffffffff8191a6e0 > > acpi_pci_attach() at acpi_pci_attach+0x15f/frame 0xffffffff8191a730 > > device_attach() at device_attach+0x396/frame 0xffffffff8191a780 > > bus_generic_attach() at bus_generic_attach+0x2d/frame 0xffffffff8191a7a0 > > acpi_pcib_attach() at acpi_pcib_attach+0x24d/frame 0xffffffff8191a7f0 > > acpi_pcib_pci_attach() at acpi_pcib_pci_attach+0x9f/frame=20 > > 0xffffffff8191a830 > > device_attach() at device_attach+0x396/frame 0xffffffff8191a880 > > bus_generic_attach() at bus_generic_attach+0x2d/frame 0xffffffff8191a8a0 > > acpi_pci_attach() at acpi_pci_attach+0x15f/frame 0xffffffff8191a8f0 > > device_attach() at device_attach+0x396/frame 0xffffffff8191a940 > > bus_generic_attach() at bus_generic_attach+0x2d/frame 0xffffffff8191a960 > > acpi_pcib_attach() at acpi_pcib_attach+0x24d/frame 0xffffffff8191a9b0 > > acpi_pcib_acpi_attach() at acpi_pcib_acpi_attach+0x299/frame=20 > > 0xffffffff8191aa00 > > device_attach() at device_attach+0x396/frame 0xffffffff8191aa50 > > bus_generic_attach() at bus_generic_attach+0x2d/frame 0xffffffff8191aa70 > > acpi_attach() at acpi_attach+0xdd6/frame 0xffffffff8191ab30 > > device_attach() at device_attach+0x396/frame 0xffffffff8191ab80 > > bus_generic_attach() at bus_generic_attach+0x2d/frame 0xffffffff8191aba0 > > nexus_acpi_attach() at nexus_acpi_attach+0x76/frame 0xffffffff8191abd0 > > device_attach() at device_attach+0x396/frame 0xffffffff8191ac20 > > bus_generic_new_pass() at bus_generic_new_pass+0xe9/frame=20 > > 0xffffffff8191ac50 > > bus_set_pass() at bus_set_pass+0x8f/frame 0xffffffff8191ac80 > > configure() at configure+0xa/frame 0xffffffff8191ac90 > > mi_startup() at mi_startup+0x118/frame 0xffffffff8191acb0 > > btext() at btext+0x2c > > > > > > > > _______________________________________________ > > freebsd-current@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-current > > To unsubscribe, send any mail to=20 > > "freebsd-current-unsubscribe@freebsd.org" > And after taking a very close look at the source code for tws, I spotted= =20 > the problem. Patch included. >=20 > ~Andreas >=20 > Index: sys/dev/tws/tws.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- sys/dev/tws/tws.h (revision 250856) > +++ sys/dev/tws/tws.h (working copy) > @@ -137,7 +137,7 @@ > TWS_DIR_IN =3D 0x2, > TWS_DIR_OUT =3D 0x4, > TWS_DIR_NONE =3D 0x8, > - TWS_DATA_CCB =3D 0x16, > + TWS_DATA_CCB =3D 0x10, > }; >=20 > enum tws_intrs { >=20 Do you mean that this change alone fixes your panic and the controller works after the boot ? I started looking at the code, and thought that there some issues with DATA_CCB flag set too eagerly. --rZOkLKku1JyljZ3B Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (FreeBSD) iQIcBAEBAgAGBQJRnbXJAAoJEJDCuSvBvK1Bc2YP/3SupMwPC9JiVp36V9yVaqoO akBHfMFdTxiJNMZ3P6W87QzblMS0V/evMxJgd/iMjAEtzPsdxHaEfWD1pt3SDfbl DHl5m4Tn1ghaHYYNgaJYlKweGLv51gi01Xy7FzWLgzM4n683u2kMBawOeUWfgXQV dzIxjZNZ0+FthJLa3mMw1SUKGQd4LKTIVMgpnEW0LkA177z9XV5KB4j7z+I8CYbB oen9wxlUbp5xlXhHj6SBEvB/GXRxOQqdjVQMp/Mt7s6Ajjer85OdsDWMJgtRV5Jc F8cTHeAgi17HajcoKn4W95UiCVOgFITZUUXEeA3aTtnR4liYaHxDLCfF3qJUrDNl bIabYmpwZ0SvI/gUBGgmYXLhZY6rbq3ynkzbeoLDEMCq9z4PFFXV1kXocEcbAqsW 3CWxHrH8NEZChxrUE5kzmqcpTpUO0ME32ctnrzDJKdmIfZK+Fr+3FiRieDv4pzMB /pnggVkAqjnz7QjfPJS9h715AvqfojpLdBeqeWY3gwSUci9AcXj2//nvfAH2kEF1 1q5rQn7mB2/09k0fRbxKZjMKJrfi9EjpOyll/kDX4NkSZGVuJ4mQJ0LRAsQdXp8j k8SmAVvoBV2WzOhnWf5gWLp9K/OY5RQZyPVn1X4cxESm1syZm0UCC5lElrMwcd34 EZ+lDcplhA5A+9Kc7diX =Dbsq -----END PGP SIGNATURE----- --rZOkLKku1JyljZ3B--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130523062306.GR3047>