From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 18:36:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2EA831065675; Fri, 19 Nov 2010 18:36:51 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id B143F8FC1A; Fri, 19 Nov 2010 18:36:50 +0000 (UTC) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.4/8.14.4/ALCHEMY.FRANKEN.DE) with ESMTP id oAJIan4T031632; Fri, 19 Nov 2010 19:36:49 +0100 (CET) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.4/8.14.4/Submit) id oAJIam7T031631; Fri, 19 Nov 2010 19:36:48 +0100 (CET) (envelope-from marius) Date: Fri, 19 Nov 2010 19:36:48 +0100 From: Marius Strobl To: Ryan Stone Message-ID: <20101119183648.GC9966@alchemy.franken.de> References: <201011190347.oAJ3lBSx056245@svn.freebsd.org> <20101119165620.GB9966@alchemy.franken.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20101119165620.GB9966@alchemy.franken.de> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, ken@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, emaste@freebsd.org Subject: Re: svn commit: r215507 - head/sbin/camcontrol X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 18:36:51 -0000 On Fri, Nov 19, 2010 at 05:56:20PM +0100, Marius Strobl wrote: > On Fri, Nov 19, 2010 at 03:47:11AM +0000, Ryan Stone wrote: > > Author: rstone > > Date: Fri Nov 19 03:47:10 2010 > > New Revision: 215507 > > URL: http://svn.freebsd.org/changeset/base/215507 > > > > Log: > > When doing a camcontrol rescan all or a camcontrol reset all, use the wildcard > > path id for enumerating the available busses. Previously camcontrol was > > implicitly passing 0 as the first path id, which meant that if bus 0 was not > > present camcontrol would fail with EINVAL instead of rescanning/resetting any > > busses that were present. > > > > Approved by: emaste (mentor) > > MFC after: 1 week > > > > Modified: > > head/sbin/camcontrol/camcontrol.c > > > > Modified: head/sbin/camcontrol/camcontrol.c > > ============================================================================== > > --- head/sbin/camcontrol/camcontrol.c Fri Nov 19 01:58:11 2010 (r215506) > > +++ head/sbin/camcontrol/camcontrol.c Fri Nov 19 03:47:10 2010 (r215507) > > @@ -1526,6 +1526,7 @@ rescan_or_reset_bus(int bus, int rescan) > > bzero(&(&matchccb.ccb_h)[1], > > sizeof(struct ccb_dev_match) - sizeof(struct ccb_hdr)); > > matchccb.ccb_h.func_code = XPT_DEV_MATCH; > > + matchccb.ccb_h.path_id = CAM_BUS_WILDCARD; > > bufsize = sizeof(struct dev_match_result) * 20; > > matchccb.cdm.match_buf_len = bufsize; > > matchccb.cdm.matches=(struct dev_match_result *)malloc(bufsize); > > Hrm, shouldn't that use CAM_XPT_PATH_ID instead of CAM_BUS_WILDCARD > as XPT_DEV_MATCH is marked XPT_FC_XPT_ONLY and supply a complete > Connect ID (i.e. the triple of Path ID, Target ID and LUN)? At least > that's what ken@ changed a similar patch of mine to in r126514: > http://svn.freebsd.org/viewvc/base/head/sbin/camcontrol/camcontrol.c?r1=126514&r2=126513&pathrev=126514&diff_format=u > > In any case it's unfortunate that both CAM_BUS_WILDCARD and > CAM_XPT_PATH_ID are defined as ~0. According to the last CAM draft [1] With a 32-bit ~0 that is ... > the XPT Path ID should be 0xff. > > Marius > > 1: http://www.t10.org/ftp/t10/drafts/cam/cam-r12b.pdf > Marius