summaryrefslogtreecommitdiffstats
path: root/sys/dev/ida
diff options
context:
space:
mode:
authormdodd <mdodd@FreeBSD.org>2004-12-14 17:41:51 +0000
committermdodd <mdodd@FreeBSD.org>2004-12-14 17:41:51 +0000
commitfb985e2a0c07e7e8e74515b81f7f31237c8eb559 (patch)
tree5a81b7c781082eae2a653ddbd64b794ec1e86c8a /sys/dev/ida
parente49536d312bd636e6d398ee3cea8cae1eb2b5fb5 (diff)
downloadFreeBSD-src-fb985e2a0c07e7e8e74515b81f7f31237c8eb559.zip
FreeBSD-src-fb985e2a0c07e7e8e74515b81f7f31237c8eb559.tar.gz
Modify ida_v3_done() to treat FIFO status of -1 as FIFO empty (0).
This is what ida_v4_done() does and seems to be necessary with some firmware versions on v3 devices.
Diffstat (limited to 'sys/dev/ida')
-rw-r--r--sys/dev/ida/ida_pci.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/ida/ida_pci.c b/sys/dev/ida/ida_pci.c
index 82ecf4a..1053317 100644
--- a/sys/dev/ida/ida_pci.c
+++ b/sys/dev/ida/ida_pci.c
@@ -74,7 +74,13 @@ ida_v3_submit(struct ida_softc *ida, struct ida_qcb *qcb)
static bus_addr_t
ida_v3_done(struct ida_softc *ida)
{
- return (ida_inl(ida, R_DONE_FIFO));
+ bus_addr_t completed;
+
+ completed = ida_inl(ida, R_DONE_FIFO);
+ if (completed == -1) {
+ return (0); /* fifo is empty */
+ }
+ return (completed);
}
static int
OpenPOWER on IntegriCloud