]> asedeno.scripts.mit.edu Git - linux.git/commit
scsi: sd: Ignore sync cache failures when not supported
authorDerek Basehore <dbasehore@chromium.org>
Thu, 11 May 2017 12:34:24 +0000 (14:34 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 17 May 2017 01:07:24 +0000 (21:07 -0400)
commit4fa8324461b824eaea9b6695464395710fe20c44
treeaf68390ae89fb67133e34cf5d831a0e2dcaaeeb4
parent48ae8484e9fc324b4968d33c585e54bc98e44d61
scsi: sd: Ignore sync cache failures when not supported

Some external hard drives don't support the sync command even though the
hard drive has write cache enabled. In this case, upon suspend request,
sync cache failures are ignored if the error code in the sense header is
ILLEGAL_REQUEST. There's not much we can do for these drives, so we
shouldn't fail to suspend for this error case. The drive may stay
powered if that's the setup for the port it's plugged into.

Signed-off-by: Derek Basehore <dbasehore@chromium.org>
Signed-off-by: Thierry Escande <thierry.escande@collabora.com>
Reviewed-by: Ewan D. Milne <emilne@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/sd.c