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
This commit is contained in:
Sean Bruno 2013-04-26 17:28:45 +00:00
parent 145f6092b9
commit a618ef521c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=249947

View File

@ -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;
}