Skip to content
  • Tejun Heo's avatar
    libata: update ATAPI overflow draining · 56c819df
    Tejun Heo authored
    
    
    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>
    56c819df