From 6c0541fa8e5b99fc0932e93eb18ebe3d4a2d36d3 Mon Sep 17 00:00:00 2001 From: "Kenneth D. Merry" Date: Thu, 26 Feb 2015 22:22:06 +0000 Subject: [PATCH] Add FreeBSD stable/10 version checks for the availability of the CDAI_FLAG_NONE advanced information CCB flag. Support for the flag was merged to stable/10 in r279329, and the __FreeBSD_version in stable/10 was bumped to 1001510. Check for that version in the mps(4) and mpr(4) drivers when determining whether to use the flag. Sponsored by: Spectra Logic MFC after: 3 days --- sys/dev/mpr/mpr_sas.c | 3 ++- sys/dev/mps/mps_sas.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/dev/mpr/mpr_sas.c b/sys/dev/mpr/mpr_sas.c index f09e202389e7..32c3a4633a1f 100644 --- a/sys/dev/mpr/mpr_sas.c +++ b/sys/dev/mpr/mpr_sas.c @@ -3082,7 +3082,8 @@ 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 +#if (__FreeBSD_version >= 1100061) || \ + ((__FreeBSD_version >= 1001510) && (__FreeBSD_version < 1100000)) cdai.flags = CDAI_FLAG_NONE; #else cdai.flags = 0; diff --git a/sys/dev/mps/mps_sas.c b/sys/dev/mps/mps_sas.c index e919085b9bf8..26f59c263da4 100644 --- a/sys/dev/mps/mps_sas.c +++ b/sys/dev/mps/mps_sas.c @@ -3277,7 +3277,8 @@ 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 +#if (__FreeBSD_version >= 1100061) || \ + ((__FreeBSD_version >= 1001510) && (__FreeBSD_version < 1100000)) cdai.flags = CDAI_FLAG_NONE; #else cdai.flags = 0;