summaryrefslogtreecommitdiffstats
path: root/sys/dev/ciss/ciss.c
diff options
context:
space:
mode:
authorsbruno <sbruno@FreeBSD.org>2013-04-26 17:28:45 +0000
committersbruno <sbruno@FreeBSD.org>2013-04-26 17:28:45 +0000
commit594af1b98e64c7663ed2257c2f832383914eac96 (patch)
tree88416388a48a6292a5fca723c7b3f31971f6fa3d /sys/dev/ciss/ciss.c
parent17c176d04d26eb251511994b5d74373a7b69f8e7 (diff)
downloadFreeBSD-src-594af1b98e64c7663ed2257c2f832383914eac96.zip
FreeBSD-src-594af1b98e64c7663ed2257c2f832383914eac96.tar.gz
Adjust the min comparison to look at the adjust value after subtraction, don't
subtract 1 from the chosen value if we are going to use the configued value. Obtained from: Yahoo! Inc. MFC after: 2 weeks
Diffstat (limited to 'sys/dev/ciss/ciss.c')
-rw-r--r--sys/dev/ciss/ciss.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/ciss/ciss.c b/sys/dev/ciss/ciss.c
index b190df6..d4c3583 100644
--- a/sys/dev/ciss/ciss.c
+++ b/sys/dev/ciss/ciss.c
@@ -3005,7 +3005,7 @@ ciss_cam_action(struct cam_sim *sim, union ccb *ccb)
cpi->transport_version = 2;
cpi->protocol = PROTO_SCSI;
cpi->protocol_version = SCSI_REV_2;
- cpi->maxio = (min(CISS_MAX_SG_ELEMENTS, sc->ciss_cfg->max_sg_length) - 1) * PAGE_SIZE;
+ cpi->maxio = (min(CISS_MAX_SG_ELEMENTS - 1, sc->ciss_cfg->max_sg_length)) * PAGE_SIZE;
ccb->ccb_h.status = CAM_REQ_CMP;
break;
}
OpenPOWER on IntegriCloud