From owner-freebsd-scsi Wed Feb 26 20:32:14 2003 Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DE83737B401 for ; Wed, 26 Feb 2003 20:32:12 -0800 (PST) Received: from is1.mh.itc.u-tokyo.ac.jp (is1.mh.itc.u-tokyo.ac.jp [133.11.205.11]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9B0C443F85 for ; Wed, 26 Feb 2003 20:32:10 -0800 (PST) (envelope-from simokawa@sat.t.u-tokyo.ac.jp) Received: from is1.mh.itc.u-tokyo.ac.jp (is1.mh.itc.u-tokyo.ac.jp [127.0.0.1]) by is1.mh.itc.u-tokyo.ac.jp (Postfix) with ESMTP id 073B62180DF for ; Thu, 27 Feb 2003 13:32:08 +0900 (JST) Received: from mailhosting.itc.u-tokyo.ac.jp (IDENT:mirapoint@mailhosting.itc.u-tokyo.ac.jp [133.11.205.3]) by is1.mh.itc.u-tokyo.ac.jp (8.11.3/8.11.3) with ESMTP id h1R4W7c02550; Thu, 27 Feb 2003 13:32:07 +0900 Received: from ett.sat.t.u-tokyo.ac.jp (ett.sat.t.u-tokyo.ac.jp [133.11.135.3]) by mailhosting.itc.u-tokyo.ac.jp (Mirapoint Messaging Server MOS 2.9.3.2) with ESMTP id AHY77997; Thu, 27 Feb 2003 13:32:02 +0900 (JST) Date: Thu, 27 Feb 2003 13:31:57 +0900 Message-ID: From: Hidetoshi Shimokawa To: non@ever.sanda.gr.jp Cc: freebsd-scsi@freebsd.org Subject: Re: call scan_bus in interrupt context. In-Reply-To: <20030226130721S.non@ever.sanda.gr.jp> References: <20030226130721S.non@ever.sanda.gr.jp> User-Agent: Wanderlust/2.11.0 (Wonderwall) REMI/1.14.3 (Matsudai) FLIM/1.14.3 (=?ISO-8859-1?Q?Unebigory=F2mae?=) APEL/10.3 MULE XEmacs/21.4 (patch 8) (Honest Recruiter) (i386--freebsd) X-Face: OE([KxWyJI0r[R~S/>7ia}SJ)i%a,$-9%7{*yihQk|]gl}2p#"oXmX/fT}Bn7: #j7i14gu$jgR\S*&C3R/pJX List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org At Wed, 26 Feb 2003 13:07:21 +0900, non@ever.sanda.gr.jp wrote: > > From: Hidetoshi Shimokawa > Date: Wed, 26 Feb 2003 12:43:26 +0900 > > I have a question about XPT_SCAN_BUS in CAM. > > I need to initiate a bus scan from a interrupt context but xpt_alloc_ccb() > > failed because it calls malloc with M_WAITOK. > > (kernel panics if you compile it with INVARIANTS in 4-stable) > > Does scsi_low_rescan_bus_cam() in sys/cam/scsi/scsi_low.c help ? This is almost same as I did except I used M_NOWAIT flags for malloc(). XPT_SCAN_BUS cannot be used in an interrupt context. Anyway, I implemented scan_target function using XPT_SCAN_LUN which can be used in an interrupt context. It's ok for now. /\ Hidetoshi Shimokawa \/ simokawa@sat.t.u-tokyo.ac.jp PGP public key: http://www.sat.t.u-tokyo.ac.jp/~simokawa/pgp.html To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message