diff options
author | Justin Hibbits <jhibbits@FreeBSD.org> | 2022-08-05 01:28:21 +0000 |
---|---|---|
committer | Justin Hibbits <jhibbits@FreeBSD.org> | 2022-08-05 01:32:03 +0000 |
commit | c0665d5c82407a41591532ac75bc37a13d3314e6 (patch) | |
tree | 10ca2ec24226d024d3c2a91ec1ccd98ec871f1fe | |
parent | e24c5c60d724120d137f9e5db4e59cf67fd06ba2 (diff) | |
download | src-c0665d5c82407a41591532ac75bc37a13d3314e6.tar.gz src-c0665d5c82407a41591532ac75bc37a13d3314e6.zip |
powerpc/fsl_sata: Properly clamp maxio to pessimized size
The CAM 'maxio' is a 'pessimized' size, assuming 4k pages and one page
per segment. Since there are at most 63 segments in a transaction with
this driver, and one would necessarily be the indirect segment marker,
clamp the maxio to the minimum of maxphys (tunable) or (63 - 1) pages
(248k).
MFC after: 3 days
-rw-r--r-- | sys/powerpc/mpc85xx/fsl_sata.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/powerpc/mpc85xx/fsl_sata.c b/sys/powerpc/mpc85xx/fsl_sata.c index ffd340a557d8..22b9a7baf0fb 100644 --- a/sys/powerpc/mpc85xx/fsl_sata.c +++ b/sys/powerpc/mpc85xx/fsl_sata.c @@ -1871,7 +1871,7 @@ fsl_sataaction(struct cam_sim *sim, union ccb *ccb) cpi->transport_version = XPORT_VERSION_UNSPECIFIED; cpi->protocol = PROTO_ATA; cpi->protocol_version = PROTO_VERSION_UNSPECIFIED; - cpi->maxio = maxphys; + cpi->maxio = (FSL_SATA_SG_ENTRIES - 1) * PAGE_SIZE; cpi->ccb_h.status = CAM_REQ_CMP; break; } |