cvs commit: src/sys/dev/iwi if_iwi.c if_iwivar.h
luigi at FreeBSD.org
Tue Feb 20 17:32:31 UTC 2007
luigi 2007-02-20 17:32:30 UTC
FreeBSD src repository
sys/dev/iwi if_iwi.c if_iwivar.h
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
More information about the cvs-all