aboutsummaryrefslogtreecommitdiff
path: root/sys/cam
diff options
context:
space:
mode:
authorKenneth D. Merry <ken@FreeBSD.org>2012-01-25 17:58:47 +0000
committerKenneth D. Merry <ken@FreeBSD.org>2012-01-25 17:58:47 +0000
commit6e4e0e26f199f5a424fa33e913c6746401e58154 (patch)
tree584e1d9075da5efc6ea9a8a029b01b47faefc7f4 /sys/cam
parent704523b073fa24c31f56847eaf40dfadc42548b4 (diff)
downloadsrc-6e4e0e26f199f5a424fa33e913c6746401e58154.tar.gz
src-6e4e0e26f199f5a424fa33e913c6746401e58154.zip
Fix a bug introduced in r230000. We were eliminating all LUNs on a target
in response to CAM_DEV_NOT_THERE, instead of just the LUN in question. This will now just eliminate the specified LUN in response to CAM_DEV_NOT_THERE. Reported by: Richard Todd <rmtodd@servalan.servalan.com> MFC after: 3 days
Notes
Notes: svn path=/head/; revision=230544
Diffstat (limited to 'sys/cam')
-rw-r--r--sys/cam/cam_periph.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/sys/cam/cam_periph.c b/sys/cam/cam_periph.c
index bd8bf272388e..bf8d4ccb01ab 100644
--- a/sys/cam/cam_periph.c
+++ b/sys/cam/cam_periph.c
@@ -1864,13 +1864,26 @@ cam_periph_error(union ccb *ccb, cam_flags camflags,
case CAM_DEV_NOT_THERE:
{
struct cam_path *newpath;
+ lun_id_t lun_id;
error = ENXIO;
+
+ /*
+ * For a selection timeout, we consider all of the LUNs on
+ * the target to be gone. If the status is CAM_DEV_NOT_THERE,
+ * then we only get rid of the device(s) specified by the
+ * path in the original CCB.
+ */
+ if (status == CAM_DEV_NOT_THERE)
+ lun_id = xpt_path_lun_id(ccb->ccb_h.path);
+ else
+ lun_id = CAM_LUN_WILDCARD;
+
/* Should we do more if we can't create the path?? */
if (xpt_create_path(&newpath, periph,
xpt_path_path_id(ccb->ccb_h.path),
xpt_path_target_id(ccb->ccb_h.path),
- CAM_LUN_WILDCARD) != CAM_REQ_CMP)
+ lun_id) != CAM_REQ_CMP)
break;
/*