Date: Thu, 14 Mar 2002 10:29:56 -0800 From: Brooks Davis <brooks@one-eyed-alien.net> To: mobile@freebsd.org Subject: patch for Lucent command timeouts Message-ID: <20020314102956.B2173@Odin.AC.HMC.Edu>
next in thread | raw e-mail | index | archive | help
--dc+cDN39EJAMEtIO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable It looks like my initial guess that there was a driver bug may have been correct. It looks like there were some missing spls. This would also partialy explain why no one complained in current. Please try this patch in place of the WI_TIMEOUT changes. Thanks, Brooks ----- Forwarded message from Tod McQuillin <devin@spamcop.net> ----- From: Tod McQuillin <devin@spamcop.net> Date: Fri, 15 Mar 2002 00:44:47 +0900 (JST) To: Brooks Davis <brooks@one-eyed-alien.net> Cc: Dan Langille <dan@langille.org>, <stable@FreeBSD.ORG> Subject: Re: wi0 problems under latest STABLE On Mon, 11 Mar 2002, Brooks Davis wrote: > At this point there isn't. I I'm going to have to rethink handling this > problem. It appears that WI_TIMEOUT is actually too long (it hangs the > machine for WI_TIMEOUT*WI_DELAY if the command doesn't return). > Additionaly, it appears that some cards are just broken and we need to > find a way to deal with them. I made some changes to if_wi.c which completely cleared up the "timeout in wi_cmd" messages and 500ms freezes which came up every minute on my laptop and desktop machines. The laptop is now completely back to the same behaviour as in cvs rev 1.18.2.14 and earlier of if_wi.c, though the desktop still logs these messages at boot: wi0: <WaveLAN/IEEE 802.11> at port 0x240-0x27f irq 15 slot 0 on pccard0 wi0: 802.11 address: 00:02:2d:2b:ab:06 wi0: using Lucent chip or unknown chip wi0: timeout in wi_cmd 2; event status 8080 wi0: timeout in wi_cmd 0; event status 8080 wi0: wi_cmd: busy bit won't clear. wi0: wi_cmd: busy bit won't clear. wi0: wi_cmd: busy bit won't clear. wi0: wi_cmd: busy bit won't clear. wi0: init failed Probably some changes are still needed at attach time. Here is the patch: Index: if_wi.c =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 RCS file: /usr/src/cvs-repo/src/sys/i386/isa/Attic/if_wi.c,v retrieving revision 1.18.2.16 diff -c -r1.18.2.16 if_wi.c *** if_wi.c 4 Mar 2002 20:03:57 -0000 1.18.2.16 --- if_wi.c 14 Mar 2002 12:55:54 -0000 *************** *** 453,459 **** --- 453,461 ---- struct wi_ltv_gen gen; struct ifnet *ifp; int error; + int s; + s =3D splimp(); sc =3D device_get_softc(dev); ifp =3D &sc->arpcom.ac_if; *************** *** 463,468 **** --- 465,471 ---- if (error) { device_printf(dev, "bus_setup_intr() failed! (%d)\n", error); wi_free(dev); + splx(s); return (error); } *************** *** 481,486 **** --- 484,490 ---- if ((error =3D wi_read_record(sc, (struct wi_ltv_gen *)&mac)) !=3D 0) { device_printf(dev, "mac read failed %d\n", error); wi_free(dev); + splx(s); return (error); } bcopy((char *)&mac.wi_mac_addr, *************** *** 584,589 **** --- 588,594 ---- ether_ifattach(ifp, ETHER_BPF_SUPPORTED); callout_handle_init(&sc->wi_stat_ch); + splx(s); return(0); } *************** *** 799,804 **** --- 804,810 ---- { struct wi_softc *sc; struct ifnet *ifp; + int s; sc =3D xsc; ifp =3D &sc->arpcom.ac_if; *************** *** 809,815 **** --- 815,823 ---- if (ifp->if_flags & IFF_OACTIVE) return; + s =3D splimp(); wi_cmd(sc, WI_CMD_INQUIRE, WI_INFO_COUNTERS); + splx(s); return; } --=20 Tod McQuillin To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message ----- End forwarded message ----- --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --dc+cDN39EJAMEtIO Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8kOwjXY6L6fI4GtQRArwpAJ9uJCFVLNiHXLnHWQkRRV5avA61kgCgsHgw k3AQILbc4RY29Kjx4ES9qIE= =jW4G -----END PGP SIGNATURE----- --dc+cDN39EJAMEtIO-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020314102956.B2173>