Date: Fri, 31 Jul 2015 11:23:56 -0600 From: Warner Losh <imp@bsdimp.com> To: Larry Rosenman <ler@lerctr.org> Cc: Glen Barber <gjb@FreeBSD.org>, Benno Rice <benno@freebsd.org>, freebsd-current@freebsd.org Subject: Re: pmspcv panic on boot on this box Message-ID: <9B59F252-D41D-4714-A983-356E525359FD@bsdimp.com> In-Reply-To: <14ee48f81d8.2846.a6b027662ce9a8103f88b1e74d3c5524@lerctr.org> References: <20150730201351.GH90754@FreeBSD.org> <20150730201517.GI90754@FreeBSD.org> <ef34a26f9f5ba7ca413f79fd914c6b86@thebighonker.lerctr.org> <20150730221728.GK90754@FreeBSD.org> <452d406c68674df3834c75bd3736e6dc@thebighonker.lerctr.org> <20150731041815.GO90754@FreeBSD.org> <20150731042114.GP90754@FreeBSD.org> <af81a9c15931a72e2296cd9f28f462f9@thebighonker.lerctr.org> <20150731065016.GT90754@FreeBSD.org> <20150731102721.GA824@oldtbh.lerctr.org> <20150731133214.GV90754@FreeBSD.org> <14ee48f81d8.2846.a6b027662ce9a8103f88b1e74d3c5524@lerctr.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--Apple-Mail=_D3351EE8-5A6F-4DE6-A172-46C84F011C83 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Try the following patch. There=E2=80=99s a fundamental misunderstanding = of newbus that=E2=80=99s screwing things up=E2=80=A6 Also available at http://people.freebsd.org/~imp/patch-queue/pms The problem is that the first time through for ahd0 we=E2=80=99re = setting cardMap[0] to 5. The second time through it is already 5, so we = say =E2=80=98oh, this has been probed before=E2=80=99 and return 2. This = causes antiapi_probe() to return 0, because the card has already been = probed before. This is wrong on so many levels, but I=E2=80=99ll = suppress channelling my inner bde and stop here. Warner diff -r 1805eb187340 sys/dev/pms/freebsd/driver/common/lxutil.c --- a/sys/dev/pms/freebsd/driver/common/lxutil.c +++ b/sys/dev/pms/freebsd/driver/common/lxutil.c @@ -757,18 +757,25 @@ STATIC int agtiapi_ProbeCard( device_t d { int idx; static U32 cardMap[4] =3D { 0, 0, 0, 0 }; + u_int16_t agtiapi_vendor; // PCI vendor ID u_int16_t agtiapi_dev; // PCI device ID AGTIAPI_PRINTK("agtiapi_ProbeCard: start\n"); +#if 0 if ( ! atomic_cmpset_32( &cardMap[thisCard], 0, 5 ) ) { // card = already ran AGTIAPI_PRINTK( "We'll only ID this card once -- %d\n", thisCard ); return 2; // error return value; card already ran this function } else { +#else + { +#endif + agtiapi_vendor =3D pci_get_vendor( dev ); // get PCI vendor ID agtiapi_dev =3D pci_get_device( dev ); // get PCI device ID for( idx =3D 0; idx < COUNT(ag_card_type); idx++ ) { - if( ag_card_type[idx].deviceId =3D=3D agtiapi_dev ) + if( ag_card_type[idx].deviceId =3D=3D agtiapi_dev && + ag_card_type[idx].vendorId =3D=3D agtiapi_vendor) { // device ID match memset( (void *)&agCardInfoList[ thisCard ], 0, sizeof(ag_card_info_t) ); > On Jul 31, 2015, at 8:41 AM, Larry Rosenman <ler@lerctr.org> wrote: >=20 > Please do pull it from GENERIC until this is fixed in HEAD and = RELENG/10. >=20 >=20 > On July 31, 2015 8:32:17 AM Glen Barber <gjb@FreeBSD.org> wrote: >=20 >> On Fri, Jul 31, 2015 at 05:27:22AM -0500, Larry Rosenman wrote: >> > Ok, I made a GENERIC-NOPMS, without the device pmspcv, and adjusted = my custom >> > to include GENERIC-NOPMS. And we boot (I'm typing this from a ssh = session >> > to the box). >> > >>=20 >> Larry, thank you very much for testing this. >>=20 >> Benno, for 10.2-RELEASE, I think we're going to pull pmspcv from = GENERIC >> and issue an EN for the driver update when this is fixed. >>=20 >> I think this should be pulled from GENERIC in head and stable/10 in = the >> meantime, as well. >>=20 >> Glen >>=20 >=20 >=20 > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to = "freebsd-current-unsubscribe@freebsd.org" --Apple-Mail=_D3351EE8-5A6F-4DE6-A172-46C84F011C83 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJVu68sAAoJEGwc0Sh9sBEAH58P/jlHl9rrPhsk1tNVQ4UtGbjj 0nWQRyCjCLwupuWo6F2UQzsfDs9pjYk9C4VlL2qMK9WTnX1BNVI4EJdv9wHuS5Rg RGknYGuiS9nw0oWJhh4UHVOl6jFr+SHqkcDvL4dEzW7t0rrbN1bHpfPwOMv7RDbq ZM6pxoQM2UuUfJlNMY3Fz0Ge3RAujhhB1RC9uDEQ7Fwk3VBXhOjZ0DiGvb5s/TPh AcPA0o3ZjoQIisdhl4BDJnMflGOVK+fnXByMvwMPtKPrYKe0FhnFj+ZPGQtLYMyh Xcbweb/LVBULexxRf+aIqx4y6+LEEUaHMDE3jMHc/aCytSOt/68IYSYJrxEqAJyx RrF+Kzy0yXHTSUWNdGeQmBOQo/K8+4k/9E5QMpRb15ELSvzpoPX+uhxQ4Bp7O2B+ iTZgwshXO50pB+OXu8sens6JtxUdKRZhcnRFnktPanyx3j/I/2B9kwbl0akJT4X+ iwm5T4wajUZpDAUd4aRc6XymfTdoVv3wLUav4d65RUymIWS9XpV6Z+ZbgoKZCOPb IWmzgT67uOqY3E6VbpcHndmL/r4QjrzsGV/xMC0sVdUf0IRvTaTu0QAmb+UlIQzn ghesmdHSnhW/KS1AeRZb4IuaJOTmjqr8pyMlUzQpZOKkJ9Q1aurY7faV7w/nwl8v grzg504av6YkNVHQuuRa =eNZt -----END PGP SIGNATURE----- --Apple-Mail=_D3351EE8-5A6F-4DE6-A172-46C84F011C83--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9B59F252-D41D-4714-A983-356E525359FD>