Skip to content
Commit 56c819df authored by Tejun Heo's avatar Tejun Heo Committed by Jens Axboe
Browse files

libata: update ATAPI overflow draining



For misc ATAPI commands which transfer variable length data to the
host, overflow can occur due to application or hardware bug.  Such
overflows can be ignored safely as long as overflow data is properly
drained.  libata HSM implementation has this implemented in
__atapi_pio_bytes() and recently updated for 2.6.24-rc but it requires
further improvements.  Improve drain logic such that...

* Report overflow errors using ehi desc mechanism instead of printing
  directly.

* Properly calculate the number of bytes to be drained considering
  actual number of consumed bytes for partial draining.

Signed-off-by: default avatarTejun Heo <htejun@gmail.com>
Acked-by: default avatarAlbert Lee <albertcc@tw.ibm.com>
Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
parent e1640949
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment