Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Oct 2008 21:46:58 +0000 (UTC)
From:      Marius Strobl <marius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r184379 - head/lib/libcam
Message-ID:  <200810272146.m9RLkwo4054140@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marius
Date: Mon Oct 27 21:46:58 2008
New Revision: 184379
URL: http://svn.freebsd.org/changeset/base/184379

Log:
  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
  Submitted by:	Eygene Ryabinkin
  Approved by:	silence from ken and scottl
  MFC after:	1 week

Modified:
  head/lib/libcam/camlib.c

Modified: head/lib/libcam/camlib.c
==============================================================================
--- head/lib/libcam/camlib.c	Mon Oct 27 21:45:18 2008	(r184378)
+++ head/lib/libcam/camlib.c	Mon Oct 27 21:46:58 2008	(r184379)
@@ -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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200810272146.m9RLkwo4054140>