diff options
author | mjacob <mjacob@FreeBSD.org> | 2007-01-05 17:51:33 +0000 |
---|---|---|
committer | mjacob <mjacob@FreeBSD.org> | 2007-01-05 17:51:33 +0000 |
commit | 38b3d2db725b086c9db5c0c2f981b19a911c7aa6 (patch) | |
tree | 72bb872a7a808ab317f76e02faf599cd767a6ee3 /sys/dev/mpt | |
parent | c3c6135446dcad6228ba0f001cb0884e0b74a693 (diff) | |
download | FreeBSD-src-38b3d2db725b086c9db5c0c2f981b19a911c7aa6.zip FreeBSD-src-38b3d2db725b086c9db5c0c2f981b19a911c7aa6.tar.gz |
Another (minor) CAM_NEW_TRAN backport thingie, plus a slightly
closer to __FreeBSD_version comparison for this.
Diffstat (limited to 'sys/dev/mpt')
-rw-r--r-- | sys/dev/mpt/mpt_cam.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/sys/dev/mpt/mpt_cam.c b/sys/dev/mpt/mpt_cam.c index 7f2ae9e..36ae9c2 100644 --- a/sys/dev/mpt/mpt_cam.c +++ b/sys/dev/mpt/mpt_cam.c @@ -110,7 +110,7 @@ __FBSDID("$FreeBSD$"); #include <sys/callout.h> #include <sys/kthread.h> -#if __FreeBSD_version >= 700000 +#if __FreeBSD_version >= 700025 #ifndef CAM_NEW_TRAN_CODE #define CAM_NEW_TRAN_CODE 1 #endif @@ -3224,6 +3224,7 @@ mpt_action(struct cam_sim *sim, union ccb *ccb) /* * The base speed is the speed of the underlying connection. */ +#ifdef CAM_NEW_TRAN cpi->protocol = PROTO_SCSI; if (mpt->is_fc) { cpi->hba_misc = PIM_NOBUSRESET; @@ -3247,6 +3248,21 @@ mpt_action(struct cam_sim *sim, union ccb *ccb) cpi->transport_version = 2; cpi->protocol_version = SCSI_REV_2; } +#else + if (mpt->is_fc) { + cpi->hba_misc = PIM_NOBUSRESET; + cpi->base_transfer_speed = 100000; + cpi->hba_inquiry = PI_TAG_ABLE; + } else if (mpt->is_sas) { + cpi->hba_misc = PIM_NOBUSRESET; + cpi->base_transfer_speed = 300000; + cpi->hba_inquiry = PI_TAG_ABLE; + } else { + cpi->hba_misc = PIM_SEQSCAN; + cpi->base_transfer_speed = 3300; + cpi->hba_inquiry = PI_SDTR_ABLE|PI_TAG_ABLE|PI_WIDE_16; + } +#endif /* * We give our fake RAID passhtru bus a width that is MaxVolumes |