From cc223024a47f9ebb306a51928fafc6d2fef98c3b Mon Sep 17 00:00:00 2001 From: ken Date: Tue, 24 Mar 2015 17:20:20 +0000 Subject: [PATCH] MFC, r279336: ------------------------------------------------------------------------ r279336 | ken | 2015-02-26 15:22:06 -0700 (Thu, 26 Feb 2015) | 12 lines 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 ------------------------------------------------------------------------ git-svn-id: svn://svn.freebsd.org/base/stable/10@280448 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- 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 9da1dd5c1..e87ad2114 100644 --- a/sys/dev/mpr/mpr_sas.c +++ b/sys/dev/mpr/mpr_sas.c @@ -3084,7 +3084,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 cafd5a1d3..cd651cae4 100644 --- a/sys/dev/mps/mps_sas.c +++ b/sys/dev/mps/mps_sas.c @@ -3237,7 +3237,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; -- 2.45.0