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
This commit is contained in:
parent
e24c5c60d7
commit
c0665d5c82
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user