Date: Wed, 22 Feb 2012 19:36:42 +0530 From: "Desai, Kashyap" <Kashyap.Desai@lsi.com> To: "freebsd-scsi@freebsd.org" <freebsd-scsi@freebsd.org>, freebsd-stable <freebsd-stable@freebsd.org> Cc: "Justin T. Gibbs" <gibbs@freebsd.org>, "Kenneth D. Merry" <ken@freebsd.org>, "McConnell, Stephen" <Stephen.McConnell@lsi.com> Subject: mpslsi0 : Trying sleep, but thread marked as sleeping prohibited Message-ID: <B2FD678A64EAAD45B089B123FDFC3ED72B96D34836@inbmail01.lsi.com>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B2FD678A64EAAD45B089B123FDFC3ED72B96D34836>
