diff options
author | sbruno <sbruno@FreeBSD.org> | 2013-04-25 23:10:34 +0000 |
---|---|---|
committer | sbruno <sbruno@FreeBSD.org> | 2013-04-25 23:10:34 +0000 |
commit | 508d67d2f78da676b3dce0a390a2b5e6c2f7e68d (patch) | |
tree | 20adcbe3bc756d1ae8e874c02255a891d65687b2 | |
parent | 53230ee95f397e09bc5413f0fac91e6becaa524a (diff) | |
download | FreeBSD-src-508d67d2f78da676b3dce0a390a2b5e6c2f7e68d.zip FreeBSD-src-508d67d2f78da676b3dce0a390a2b5e6c2f7e68d.tar.gz |
In the case where the controller supports an sg_list LESS than our predefined
and tuned value, we would advertise the unsupported value to CAM and it would
merrily destroy the controller with way too many IO operations.
This manifests itself in a Zero Memory RAID configuration for a P410 and
possibly other controllers.
Obtained from: Yahoo! Inc.
MFC after: 2 weeks
-rw-r--r-- | sys/dev/ciss/ciss.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/ciss/ciss.c b/sys/dev/ciss/ciss.c index 10ab10a..b190df6 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 = (CISS_MAX_SG_ELEMENTS - 1) * PAGE_SIZE; + cpi->maxio = (min(CISS_MAX_SG_ELEMENTS, sc->ciss_cfg->max_sg_length) - 1) * PAGE_SIZE; ccb->ccb_h.status = CAM_REQ_CMP; break; } |