freebsd-dev/sys/dev/iwi
Luigi Rizzo 560a65051c 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
2007-02-20 17:32:30 +00:00
..
if_iwi.c Rename IWI_LOCK_ASSERT to IWI_LOCK_CHECK per Sam's suggestion, 2007-02-20 17:32:30 +00:00
if_iwireg.h Document the endiannes of firmware headers 2007-02-20 14:29:09 +00:00
if_iwivar.h Rename IWI_LOCK_ASSERT to IWI_LOCK_CHECK per Sam's suggestion, 2007-02-20 17:32:30 +00:00