Be a bit more restrictive in using multisector transfers.
This commit is contained in:
parent
a76d7b0016
commit
1cf2e0d376
@ -117,11 +117,13 @@ ad_attach(struct ata_softc *scp, int32_t device)
|
||||
|
||||
/* use multiple sectors/interrupt if device supports it */
|
||||
adp->transfersize = DEV_BSIZE;
|
||||
secsperint = max(1, min(AD_PARAM->nsecperint, 16));
|
||||
if (!ata_command(adp->controller, adp->unit, ATA_C_SET_MULTI,
|
||||
0, 0, 0, secsperint, 0, ATA_WAIT_INTR) &&
|
||||
ata_wait(adp->controller, adp->unit, ATA_S_READY) >= 0)
|
||||
if (ad_version(AD_PARAM->versmajor)) {
|
||||
secsperint = max(1, min(AD_PARAM->nsecperint, 16));
|
||||
if (!ata_command(adp->controller, adp->unit, ATA_C_SET_MULTI,
|
||||
0, 0, 0, secsperint, 0, ATA_WAIT_INTR) &&
|
||||
ata_wait(adp->controller, adp->unit, ATA_S_READY) >= 0)
|
||||
adp->transfersize *= secsperint;
|
||||
}
|
||||
|
||||
/* enable read/write cacheing if not default on device */
|
||||
if (ata_command(adp->controller, adp->unit, ATA_C_SETFEATURES,
|
||||
|
Loading…
Reference in New Issue
Block a user