diff options
-rw-r--r-- | sys/dev/mvs/mvs.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/dev/mvs/mvs.c b/sys/dev/mvs/mvs.c index 91ca4f0..7f00dee 100644 --- a/sys/dev/mvs/mvs.c +++ b/sys/dev/mvs/mvs.c @@ -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; - ch->transfersize = min(ccb->ataio.dxfer_len, - ch->curr[port].bytecount); + 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 */ |