diff options
author | sos <sos@FreeBSD.org> | 2007-03-12 15:34:08 +0000 |
---|---|---|
committer | sos <sos@FreeBSD.org> | 2007-03-12 15:34:08 +0000 |
commit | 8bfc297b1477ee40c3d278707eaec1bc1ad4b000 (patch) | |
tree | 3d03aaef0687cf2e3e96b492ed265f15c9927b43 /sys/dev/ata | |
parent | 5ce4db64324c3291d953e096a4d159678465b306 (diff) | |
download | FreeBSD-src-8bfc297b1477ee40c3d278707eaec1bc1ad4b000.zip FreeBSD-src-8bfc297b1477ee40c3d278707eaec1bc1ad4b000.tar.gz |
Fix writes on siiprb type chips.
Diffstat (limited to 'sys/dev/ata')
-rw-r--r-- | sys/dev/ata/ata-chipset.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/dev/ata/ata-chipset.c b/sys/dev/ata/ata-chipset.c index 068ca77..be7451b 100644 --- a/sys/dev/ata/ata-chipset.c +++ b/sys/dev/ata/ata-chipset.c @@ -4657,8 +4657,12 @@ ata_siiprb_end_transaction(struct ata_request *request) request->error = prb->fis[3]; /* update progress */ - if (!(request->status & ATA_S_ERROR) && !(request->flags & ATA_R_TIMEOUT)) - request->donecount = prb->transfer_count; + if (!(request->status & ATA_S_ERROR) && !(request->flags & ATA_R_TIMEOUT)) { + if (request->flags & ATA_R_READ) + request->donecount = prb->transfer_count; + else + request->donecount = request->bytecount; + } /* any controller errors flagged ? */ if ((error = ATA_INL(ctlr->r_res2, 0x1024 + offset))) { |