summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2007-08-23 15:57:13 +0000
committerjkim <jkim@FreeBSD.org>2007-08-23 15:57:13 +0000
commit003205bcb26c5c15a3804bbfe630ef4a7e958a1c (patch)
tree9f69faa4d21701436a252a092edb5595833aa439 /sys
parent940abdcd79a7cf157d2f66bd342862fb957c6ab2 (diff)
downloadFreeBSD-src-003205bcb26c5c15a3804bbfe630ef4a7e958a1c.zip
FreeBSD-src-003205bcb26c5c15a3804bbfe630ef4a7e958a1c.tar.gz
Export 4Gbps Fibre Channel link speed correctly with inquiry commands.
Approved by: re (kensmith) MFC after: 3 days
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/isp/isp_freebsd.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/sys/dev/isp/isp_freebsd.c b/sys/dev/isp/isp_freebsd.c
index 898e16d..4ff2f5f 100644
--- a/sys/dev/isp/isp_freebsd.c
+++ b/sys/dev/isp/isp_freebsd.c
@@ -2729,11 +2729,9 @@ isp_action(struct cam_sim *sim, union ccb *ccb)
scsi->valid = CTS_SCSI_VALID_TQ;
scsi->flags = CTS_SCSI_FLAGS_TAG_ENB;
fc->valid = CTS_FC_VALID_SPEED;
- if (fcp->isp_gbspeed == 2) {
- fc->bitrate = 200000;
- } else {
- fc->bitrate = 100000;
- }
+ fc->bitrate = 100000;
+ if (fcp->isp_gbspeed == 4 || fcp->isp_gbspeed == 2)
+ fc->bitrate *= fcp->isp_gbspeed;
if (tgt > 0 && tgt < MAX_FC_TARG) {
fcportdb_t *lp = &fcp->portdb[tgt];
fc->wwnn = lp->node_wwn;
@@ -2924,10 +2922,11 @@ isp_action(struct cam_sim *sim, union ccb *ccb)
* what media we're running on top of- but we'll
* look good if we always say 100MB/s.
*/
- if (FCPARAM(isp)->isp_gbspeed == 2)
- cpi->base_transfer_speed = 200000;
- else
- cpi->base_transfer_speed = 100000;
+ cpi->base_transfer_speed = 100000;
+ if (FCPARAM(isp)->isp_gbspeed == 4 ||
+ FCPARAM(isp)->isp_gbspeed == 2)
+ cpi->base_transfer_speed *=
+ FCPARAM(isp)->isp_gbspeed;
cpi->hba_inquiry = PI_TAG_ABLE;
#ifdef CAM_NEW_TRAN_CODE
cpi->transport = XPORT_FC;
OpenPOWER on IntegriCloud