From owner-freebsd-scsi@FreeBSD.ORG Tue Oct 26 17:14:38 2010 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 BE4C31065672; Tue, 26 Oct 2010 17:14:38 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: from mail-ew0-f54.google.com (mail-ew0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 25EA28FC0C; Tue, 26 Oct 2010 17:14:37 +0000 (UTC) Received: by ewy28 with SMTP id 28so2428395ewy.13 for ; Tue, 26 Oct 2010 10:14:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=sWGrW4oYJZonXEghSh78GhewJakzAfOpri7LFj4gO4M=; b=v8GMDAEaetB159XFSoft/1EOwS0SbRWz1aDuDkPhVi71RCoENG3b4mCn1+EXflYpos quJmFzGYHNoLhSY7V0+OYDO+68aJe9r8lzf2TG6p6hPezo1fwsXXXWg/Y2Qy2gIS/PWt y2gpoLENz8SO+VaznwDkIhxg4GRS9YHEhqp0g= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=RZAlRxQC8EnFC7DFmkSmoE2CD2KfTmqvMtQtckXHY0n8r3lOJviY/CTG9fTZ9UJ/eW voFb/DdGnIwnsEAttTtvVAE9mnB9Gck47u9XBTb0VFYcepO4XfM1KnDvDR+r2SbosU+m n1XkGxr0lL3H2oHwh2uSjOOZJL7n4VRIxAMQ0= MIME-Version: 1.0 Received: by 10.213.14.79 with SMTP id f15mr7297645eba.58.1288113276807; Tue, 26 Oct 2010 10:14:36 -0700 (PDT) Received: by 10.213.14.71 with HTTP; Tue, 26 Oct 2010 10:14:36 -0700 (PDT) In-Reply-To: <9EC3B874-B089-4ED4-9A12-FA7A0E170A7B@samsco.org> References: <20101026160457.GA61133@sandvine.com> <9EC3B874-B089-4ED4-9A12-FA7A0E170A7B@samsco.org> Date: Tue, 26 Oct 2010 13:14:36 -0400 Message-ID: From: Ryan Stone To: Scott Long Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-scsi@freebsd.org Subject: Re: camcontrol rescan all fails if there is no bus 0 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: Tue, 26 Oct 2010 17:14:38 -0000 On Tue, Oct 26, 2010 at 12:41 PM, Scott Long wrote: > Ok, I guess I need to see if CAM_XPT_PATH_ID can get returned from the devmatch. There is some really awful code to deal with that later on: /* * We don't want to rescan or reset the xpt bus. * See above. */ if ((int)bus_result->path_id == -1) continue; That should be changed to use the real constants. > What happens with this patch if you run it with no real buses registered (i.e. cam module present, but no SIMs present)? If there are no CAM devices(i.e. "camcontrol devlist" prints nothing) as near as I can tell with my patch a "camcontrol rescan all" does nothing(camcontrol prints "Rescanning bus X" for each bus that it rescans, and camcontrol rescan all prints nothing if there are no buses at all).