Replicate r242422 from ata(4) to mvs(4):
Only four specific ATA PIO commands transfer several sectors per DRQ block (interrupt). All other ATA PIO commands transfer one sector or 512 bytes at one time. Hardcode these exceptions in mvs(4) with ATA_CAM option. This fixes timeout of READ LOG EXT command used by `smartctl -x /dev/adaX`. Also it fixes timeout of DOWNLOAD_MICROCODE on `camcontrol fwdownload`.
This commit is contained in:
parent
c45506efd1
commit
9cf417295d
@ -894,7 +894,7 @@ mvs_legacy_intr(device_t dev, int poll)
|
||||
if (ccb->ataio.dxfer_len > ch->donecount) {
|
||||
/* Set this transfer size according to HW capabilities */
|
||||
ch->transfersize = min(ccb->ataio.dxfer_len - ch->donecount,
|
||||
ch->curr[ccb->ccb_h.target_id].bytecount);
|
||||
ch->transfersize);
|
||||
/* If data write command - put them */
|
||||
if ((ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_OUT) {
|
||||
if (mvs_wait(dev, ATA_S_DRQ, ATA_S_BUSY, 1000) < 0) {
|
||||
@ -1334,8 +1334,14 @@ mvs_legacy_execute_transaction(struct mvs_slot *slot)
|
||||
return;
|
||||
}
|
||||
ch->donecount = 0;
|
||||
if (ccb->ataio.cmd.command == ATA_READ_MUL ||
|
||||
ccb->ataio.cmd.command == ATA_READ_MUL48 ||
|
||||
ccb->ataio.cmd.command == ATA_WRITE_MUL ||
|
||||
ccb->ataio.cmd.command == ATA_WRITE_MUL48) {
|
||||
ch->transfersize = min(ccb->ataio.dxfer_len,
|
||||
ch->curr[port].bytecount);
|
||||
} else
|
||||
ch->transfersize = min(ccb->ataio.dxfer_len, 512);
|
||||
if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE)
|
||||
ch->fake_busy = 1;
|
||||
/* If data write command - output the data */
|
||||
|
Loading…
x
Reference in New Issue
Block a user