diff --git a/sbin/camcontrol/camcontrol.c b/sbin/camcontrol/camcontrol.c index b84ee5357a89..45b82852f626 100644 --- a/sbin/camcontrol/camcontrol.c +++ b/sbin/camcontrol/camcontrol.c @@ -7404,7 +7404,7 @@ getdevid(struct cam_devitem *item) retry: ccb->ccb_h.func_code = XPT_DEV_ADVINFO; ccb->ccb_h.flags = CAM_DIR_IN; - ccb->cdai.flags = 0; + ccb->cdai.flags = CDAI_FLAG_NONE; ccb->cdai.buftype = CDAI_TYPE_SCSI_DEVID; ccb->cdai.bufsiz = item->device_id_len; if (item->device_id_len != 0) diff --git a/sys/cam/cam_ccb.h b/sys/cam/cam_ccb.h index 9b882ca4da06..98bb9eabe663 100644 --- a/sys/cam/cam_ccb.h +++ b/sys/cam/cam_ccb.h @@ -1145,6 +1145,7 @@ struct ccb_eng_exec { /* This structure must match SCSIIO size */ struct ccb_dev_advinfo { struct ccb_hdr ccb_h; uint32_t flags; +#define CDAI_FLAG_NONE 0x0 /* No flags set */ #define CDAI_FLAG_STORE 0x1 /* If set, action becomes store */ uint32_t buftype; /* IN: Type of data being requested */ /* NB: buftype is interpreted on a per-transport basis */ diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c index 98099f14fb0b..144df3775f0b 100644 --- a/sys/cam/scsi/scsi_da.c +++ b/sys/cam/scsi/scsi_da.c @@ -3784,7 +3784,7 @@ dasetgeom(struct cam_periph *periph, uint32_t block_len, uint64_t maxsector, xpt_setup_ccb(&cdai.ccb_h, periph->path, CAM_PRIORITY_NORMAL); cdai.ccb_h.func_code = XPT_DEV_ADVINFO; cdai.buftype = CDAI_TYPE_RCAPLONG; - cdai.flags |= CDAI_FLAG_STORE; + cdai.flags = CDAI_FLAG_STORE; cdai.bufsiz = rcap_len; cdai.buf = (uint8_t *)rcaplong; xpt_action((union ccb *)&cdai); diff --git a/sys/cam/scsi/scsi_enc_ses.c b/sys/cam/scsi/scsi_enc_ses.c index 5393244d2936..95d91055eddc 100644 --- a/sys/cam/scsi/scsi_enc_ses.c +++ b/sys/cam/scsi/scsi_enc_ses.c @@ -1007,7 +1007,7 @@ ses_setphyspath_callback(enc_softc_t *enc, enc_element_t *elm, xpt_setup_ccb(&cdai.ccb_h, path, CAM_PRIORITY_NORMAL); cdai.ccb_h.func_code = XPT_DEV_ADVINFO; cdai.buftype = CDAI_TYPE_PHYS_PATH; - cdai.flags = 0; + cdai.flags = CDAI_FLAG_NONE; cdai.bufsiz = MAXPATHLEN; cdai.buf = old_physpath; xpt_action((union ccb *)&cdai); @@ -1019,7 +1019,7 @@ ses_setphyspath_callback(enc_softc_t *enc, enc_element_t *elm, xpt_setup_ccb(&cdai.ccb_h, path, CAM_PRIORITY_NORMAL); cdai.ccb_h.func_code = XPT_DEV_ADVINFO; cdai.buftype = CDAI_TYPE_PHYS_PATH; - cdai.flags |= CDAI_FLAG_STORE; + cdai.flags = CDAI_FLAG_STORE; cdai.bufsiz = sbuf_len(args->physpath); cdai.buf = sbuf_data(args->physpath); xpt_action((union ccb *)&cdai); diff --git a/sys/dev/mpr/mpr_sas.c b/sys/dev/mpr/mpr_sas.c index 216d314a4891..9da1dd5c1944 100644 --- a/sys/dev/mpr/mpr_sas.c +++ b/sys/dev/mpr/mpr_sas.c @@ -3084,7 +3084,11 @@ mprsas_async(void *callback_arg, uint32_t code, struct cam_path *path, cdai.ccb_h.func_code = XPT_DEV_ADVINFO; cdai.ccb_h.flags = CAM_DIR_IN; cdai.buftype = CDAI_TYPE_RCAPLONG; +#if __FreeBSD_version >= 1100061 + cdai.flags = CDAI_FLAG_NONE; +#else cdai.flags = 0; +#endif cdai.bufsiz = sizeof(rcap_buf); cdai.buf = (uint8_t *)&rcap_buf; xpt_action((union ccb *)&cdai); diff --git a/sys/dev/mps/mps_sas.c b/sys/dev/mps/mps_sas.c index ef72457276dc..cafd5a1d3e59 100644 --- a/sys/dev/mps/mps_sas.c +++ b/sys/dev/mps/mps_sas.c @@ -3237,7 +3237,11 @@ mpssas_async(void *callback_arg, uint32_t code, struct cam_path *path, cdai.ccb_h.func_code = XPT_DEV_ADVINFO; cdai.ccb_h.flags = CAM_DIR_IN; cdai.buftype = CDAI_TYPE_RCAPLONG; +#if __FreeBSD_version >= 1100061 + cdai.flags = CDAI_FLAG_NONE; +#else cdai.flags = 0; +#endif cdai.bufsiz = sizeof(rcap_buf); cdai.buf = (uint8_t *)&rcap_buf; xpt_action((union ccb *)&cdai); diff --git a/sys/sys/param.h b/sys/sys/param.h index 2658a76bb357..b6db40905393 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1001509 /* Master, propagated to newvers */ +#define __FreeBSD_version 1001510 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,