From owner-svn-src-stable@FreeBSD.ORG Tue Nov 4 22:51:57 2008 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 33289106564A; Tue, 4 Nov 2008 22:51:57 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 217498FC0C; Tue, 4 Nov 2008 22:51:57 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mA4Mpu9K009858; Tue, 4 Nov 2008 22:51:56 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mA4MpuDS009857; Tue, 4 Nov 2008 22:51:56 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <200811042251.mA4MpuDS009857@svn.freebsd.org> From: Marius Strobl Date: Tue, 4 Nov 2008 22:51:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184662 - stable/7/lib/libcam X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Nov 2008 22:51:57 -0000 Author: marius Date: Tue Nov 4 22:51:56 2008 New Revision: 184662 URL: http://svn.freebsd.org/changeset/base/184662 Log: MFC: r184379 Supply a valid Connect ID when issuing XPT_DEV_MATCH, which according to my reading of the CAM draft is mandatory for all CCB function calls and enforced by xptioctl() since at least r168752. Previously we happened to use 0 as the Path ID, causing the XPT_DEV_MATCH call to fail if there's no SCSI bus 0. Basically the same bug was also fixed the same way for camcontrol(8) as part of r126514. PR: 127605 Approved by: re (kib) Modified: stable/7/lib/libcam/ (props changed) stable/7/lib/libcam/camlib.c Modified: stable/7/lib/libcam/camlib.c ============================================================================== --- stable/7/lib/libcam/camlib.c Tue Nov 4 22:31:04 2008 (r184661) +++ stable/7/lib/libcam/camlib.c Tue Nov 4 22:51:56 2008 (r184662) @@ -346,6 +346,9 @@ cam_open_btl(path_id_t path_id, target_i bzero(&ccb, sizeof(union ccb)); ccb.ccb_h.func_code = XPT_DEV_MATCH; + ccb.ccb_h.path_id = CAM_XPT_PATH_ID; + ccb.ccb_h.target_id = CAM_TARGET_WILDCARD; + ccb.ccb_h.target_lun = CAM_LUN_WILDCARD; /* Setup the result buffer */ bufsize = sizeof(struct dev_match_result);