mpslsi0 : Trying sleep, but thread marked as sleeping prohibited

Desai, Kashyap Kashyap.Desai at lsi.com
Wed Feb 22 14:06:50 UTC 2012


Hi,

I am doing some code changes in mps dirver. While working on those changes, I come to know about something which is new to me.
Some expert help is required to clarify my doubt.

1. When any irq is register with FreeBSD OS, it sets " TDP_NOSLEEPING" pflag. It means though irq in freebsd is treated as thread,
We cannot sleep in IRQ because of " "TDP_NOSLEEPING " set.
2. In mps driver we have below code snippet in ISR routine.


    mps_dprint(sc, MPS_TRACE, "%s\n", __func__);
    mps_lock(sc);
    mps_intr_locked(data);
    mps_unlock(sc);

I wonder why there is no issue with above code ? Theoretical we cannot sleep in ISR. (as explained in #1)
Any thoughts ?


3. I recently added few place msleep() instead of DELAY in ISR context and I see 
" Trying sleep, but thread marked as sleeping prohibited".


` Kashyap


More information about the freebsd-scsi mailing list