summaryrefslogtreecommitdiff
path: root/drivers/ata/libata-sff.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-01-13 08:17:41 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-13 08:17:41 -0800
commit51eb9ab91abc9c384118b1d947e4b99cc2bc5fc5 (patch)
treec34c42989947ef97adb669fb36153951ea2e2f86 /drivers/ata/libata-sff.c
parent288e4877f94a3b144aadc206e7796921d02432c1 (diff)
parent4a99d95fa836e254d17910e52663ba2be7b880e7 (diff)
downloadlinux-next-51eb9ab91abc9c384118b1d947e4b99cc2bc5fc5.tar.gz
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev: pata_it821x: Update RDC UDMA handling ata: fix wrong WARN_ON_ONCE
Diffstat (limited to 'drivers/ata/libata-sff.c')
-rw-r--r--drivers/ata/libata-sff.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
index 0eae9b453556..5a4aad123c42 100644
--- a/drivers/ata/libata-sff.c
+++ b/drivers/ata/libata-sff.c
@@ -1013,9 +1013,12 @@ next_sg:
qc->cursg_ofs = 0;
}
- /* consumed can be larger than count only for the last transfer */
- WARN_ON_ONCE(qc->cursg && count != consumed);
-
+ /*
+ * There used to be a WARN_ON_ONCE(qc->cursg && count != consumed);
+ * Unfortunately __atapi_pio_bytes doesn't know enough to do the WARN
+ * check correctly as it doesn't know if it is the last request being
+ * made. Somebody should implement a proper sanity check.
+ */
if (bytes)
goto next_sg;
return 0;