diff options
author | Matthew N. Dodd <mdodd@FreeBSD.org> | 2004-12-14 17:41:51 +0000 |
---|---|---|
committer | Matthew N. Dodd <mdodd@FreeBSD.org> | 2004-12-14 17:41:51 +0000 |
commit | fc601c53dcb1d99c5f63d111baadbce118ffa9c1 (patch) | |
tree | 5a81b7c781082eae2a653ddbd64b794ec1e86c8a /sys/dev/ida/ida_pci.c | |
parent | b75ab906bc4c835d9f2062868c0dec81ef665258 (diff) | |
download | src-fc601c53dcb1d99c5f63d111baadbce118ffa9c1.tar.gz src-fc601c53dcb1d99c5f63d111baadbce118ffa9c1.zip |
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.
Notes
Notes:
svn path=/head/; revision=138852
Diffstat (limited to 'sys/dev/ida/ida_pci.c')
-rw-r--r-- | sys/dev/ida/ida_pci.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/ida/ida_pci.c b/sys/dev/ida/ida_pci.c index 82ecf4ad066b..105331792331 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 |