From owner-freebsd-scsi@FreeBSD.ORG Thu Apr 24 07:50:24 2008 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B71B1065670 for ; Thu, 24 Apr 2008 07:50:24 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from hosted.kievnet.com (hosted.kievnet.com [193.138.144.10]) by mx1.freebsd.org (Postfix) with ESMTP id 665588FC16 for ; Thu, 24 Apr 2008 07:50:24 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from localhost ([127.0.0.1] helo=edge.pp.kiev.ua) by hosted.kievnet.com with esmtpa (Exim 4.62) (envelope-from ) id 1JowDn-000OxZ-5S for freebsd-scsi@freebsd.org; Thu, 24 Apr 2008 10:50:23 +0300 Message-ID: <48103BBE.7090406@icyb.net.ua> Date: Thu, 24 Apr 2008 10:50:22 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.12 (X11/20080320) MIME-Version: 1.0 To: freebsd-scsi@freebsd.org References: <480E4780.6010106@icyb.net.ua> <480E5598.5030502@icyb.net.ua> In-Reply-To: <480E5598.5030502@icyb.net.ua> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: issue with umass plugged-in during boot up X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Apr 2008 07:50:24 -0000 on 23/04/2008 00:16 Andriy Gapon said the following: > After that camcontrol commands referring to "all" (rescan and reset) > fail with EINVAL. > ktrace shows that EINVAL comes from ioctl CAMIOCOMMAND on xpt0 device. > My clumsy ddb debugging shows that the error is produced somewhere in > xptioctl->xpt_find_bus. > > It seems that xpt might be unhappy about scbus0/pass0 going away. > Maybe this is because in /-1 case camcontrol sends ccb with path_id > (implicitly) set to zero and xptioctl performs xpt_find_bus for all > ioctl commands (including XPT_DEV_MATCH)? > I.e. see case of bus=-1 in rescan_or_reset_bus() in camcontrol.c I guess that the issue here is that XPT_DEV_MATCH block in xptioctl() doesn't really need/use "bus" parameter, but xpt_find_bus is performed nevertheless. -- Andriy Gapon