diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ata/libata-sff.c | 9 |
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: | |||
1013 | qc->cursg_ofs = 0; | 1013 | qc->cursg_ofs = 0; |
1014 | } | 1014 | } |
1015 | 1015 | ||
1016 | /* consumed can be larger than count only for the last transfer */ | 1016 | /* |
1017 | WARN_ON_ONCE(qc->cursg && count != consumed); | 1017 | * There used to be a WARN_ON_ONCE(qc->cursg && count != consumed); |
1018 | 1018 | * Unfortunately __atapi_pio_bytes doesn't know enough to do the WARN | |
1019 | * check correctly as it doesn't know if it is the last request being | ||
1020 | * made. Somebody should implement a proper sanity check. | ||
1021 | */ | ||
1019 | if (bytes) | 1022 | if (bytes) |
1020 | goto next_sg; | 1023 | goto next_sg; |
1021 | return 0; | 1024 | return 0; |