Date: Tue, 20 Feb 2007 17:32:30 +0000 (UTC) From: Luigi Rizzo <luigi@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/dev/iwi if_iwi.c if_iwivar.h Message-ID: <200702201732.l1KHWUuX080367@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
luigi 2007-02-20 17:32:30 UTC FreeBSD src repository Modified files: sys/dev/iwi if_iwi.c if_iwivar.h Log: Rename IWI_LOCK_ASSERT to IWI_LOCK_CHECK per Sam's suggestion, and make it print under debug.iwi control same as other debugging stuff. Remove the device_printf() in iwi_ioctl() and replace with this: /* * wait until pending iwi_cmd() are completed, to avoid races * that could cause problems. */ while (sc->flags & IWI_FLAG_BUSY) msleep(sc, &sc->sc_mtx, 0, "iwiioctl", hz); This at least prevents what has become an almost systematic failure for my system, presumably due to a previous iwi_cmd() not complete yet by the time iwi_ioctl() is called. It has been pointed to my attention that the real problem could be calling ieee80211_ioctl() with the lock held. If that is true, there might still be a possibility for a race condition e.g. an interrupt coming while the ioctl is sleeping. Need to investigate further on what changes are required to release the lock before calling ieee80211_ioctl Revision Changes Path 1.48 +19 -22 src/sys/dev/iwi/if_iwi.c 1.14 +2 -3 src/sys/dev/iwi/if_iwivar.h
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200702201732.l1KHWUuX080367>