From owner-freebsd-stable@FreeBSD.ORG Wed Feb 22 14:06:50 2012 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 63E77106566C; Wed, 22 Feb 2012 14:06:50 +0000 (UTC) (envelope-from Kashyap.Desai@lsi.com) Received: from na3sys009aog103.obsmtp.com (na3sys009aog103.obsmtp.com [74.125.149.71]) by mx1.freebsd.org (Postfix) with ESMTP id 3725C8FC08; Wed, 22 Feb 2012 14:06:49 +0000 (UTC) Received: from paledge01.lsi.com ([192.19.193.42]) (using TLSv1) by na3sys009aob103.postini.com ([74.125.148.12]) with SMTP ID DSNKT0T2d4Rru1pBG8ieQf/ueudZpkfUU6/H@postini.com; Wed, 22 Feb 2012 06:06:49 PST Received: from PALHUB01.lsi.com (128.94.213.114) by PALEDGE01.lsi.com (192.19.193.42) with Microsoft SMTP Server (TLS) id 8.3.213.0; Wed, 22 Feb 2012 09:11:34 -0500 Received: from inbexch02.lsi.com (135.36.98.40) by PALHUB01.lsi.com (128.94.213.114) with Microsoft SMTP Server (TLS) id 8.3.213.0; Wed, 22 Feb 2012 09:06:46 -0500 Received: from inbmail01.lsi.com ([135.36.98.64]) by inbexch02.lsi.com ([135.36.98.40]) with mapi; Wed, 22 Feb 2012 19:36:43 +0530 From: "Desai, Kashyap" To: "freebsd-scsi@freebsd.org" , freebsd-stable Date: Wed, 22 Feb 2012 19:36:42 +0530 Thread-Topic: mpslsi0 : Trying sleep, but thread marked as sleeping prohibited Thread-Index: AczxazPnpqiOme5iTReYEw8tAgtfPg== Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "Justin T. Gibbs" , "Kenneth D. Merry" , "McConnell, Stephen" Subject: mpslsi0 : Trying sleep, but thread marked as sleeping prohibited X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Feb 2012 14:06:50 -0000 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" pfla= g. 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 slee= p in ISR. (as explained in #1) Any thoughts ? 3. I recently added few place msleep() instead of DELAY in ISR context and = I see=20 " Trying sleep, but thread marked as sleeping prohibited". ` Kashyap