From b5595753581fafdb18fca08afdb6e9117a15be73 Mon Sep 17 00:00:00 2001 From: Nathan Whitehorn Date: Fri, 27 Sep 2013 16:02:40 +0000 Subject: [PATCH] Make sure the CCB xflags field is initialized to zero so that CAM_EXTLUN_VALID is not erroneously set. Also add an XPORT_SRP identifier to the known SCSI transports for the SCSI RDMA protocol, as used, for example with Infiniband storage. Reviewed by: scottl Approved by: re (marius) --- sys/cam/cam_ccb.h | 3 +++ sys/cam/cam_xpt.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/sys/cam/cam_ccb.h b/sys/cam/cam_ccb.h index c1dd5f4a3cc..127246b9abc 100644 --- a/sys/cam/cam_ccb.h +++ b/sys/cam/cam_ccb.h @@ -262,6 +262,7 @@ typedef enum { XPORT_SAS, /* Serial Attached SCSI */ XPORT_SATA, /* Serial AT Attachment */ XPORT_ISCSI, /* iSCSI */ + XPORT_SRP, /* SCSI RDMA Protocol */ } cam_xport; #define XPORT_IS_ATA(t) ((t) == XPORT_ATA || (t) == XPORT_SATA) @@ -1233,6 +1234,7 @@ cam_fill_csio(struct ccb_scsiio *csio, u_int32_t retries, { csio->ccb_h.func_code = XPT_SCSI_IO; csio->ccb_h.flags = flags; + csio->ccb_h.xflags = 0; csio->ccb_h.retry_count = retries; csio->ccb_h.cbfcnp = cbfcnp; csio->ccb_h.timeout = timeout; @@ -1252,6 +1254,7 @@ cam_fill_ctio(struct ccb_scsiio *csio, u_int32_t retries, { csio->ccb_h.func_code = XPT_CONT_TARGET_IO; csio->ccb_h.flags = flags; + csio->ccb_h.xflags = 0; csio->ccb_h.retry_count = retries; csio->ccb_h.cbfcnp = cbfcnp; csio->ccb_h.timeout = timeout; diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c index 2c187d3bf35..142195be574 100644 --- a/sys/cam/cam_xpt.c +++ b/sys/cam/cam_xpt.c @@ -3337,6 +3337,7 @@ xpt_setup_ccb(struct ccb_hdr *ccb_h, struct cam_path *path, u_int32_t priority) } ccb_h->pinfo.index = CAM_UNQUEUED_INDEX; ccb_h->flags = 0; + ccb_h->xflags = 0; } /* Path manipulation functions */ @@ -3891,6 +3892,7 @@ xpt_bus_register(struct cam_sim *sim, device_t parent, u_int32_t bus) case XPORT_FC: case XPORT_USB: case XPORT_ISCSI: + case XPORT_SRP: case XPORT_PPB: new_bus->xport = scsi_get_xport(); break; -- 2.45.0