diff options
author | marius <marius@FreeBSD.org> | 2008-10-27 21:46:58 +0000 |
---|---|---|
committer | marius <marius@FreeBSD.org> | 2008-10-27 21:46:58 +0000 |
commit | 24d351e408ca3541980f5a9ba5b66aff04a5ba70 (patch) | |
tree | 7e16c3af04ed27ad1dba434159fb49d4931cbdb7 /lib/libcam | |
parent | c68ec05f2d98772f60b7f48f191e7fc7e4bf8c80 (diff) | |
download | FreeBSD-src-24d351e408ca3541980f5a9ba5b66aff04a5ba70.zip FreeBSD-src-24d351e408ca3541980f5a9ba5b66aff04a5ba70.tar.gz |
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
Diffstat (limited to 'lib/libcam')
-rw-r--r-- | lib/libcam/camlib.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/libcam/camlib.c b/lib/libcam/camlib.c index e521ed3..73cc3d0 100644 --- a/lib/libcam/camlib.c +++ b/lib/libcam/camlib.c @@ -346,6 +346,9 @@ cam_open_btl(path_id_t path_id, target_id_t target_id, lun_id_t target_lun, 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); |