]> git.baikalelectronics.ru Git - kernel.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)
commit74ae43888091eae4611c5ca40feaa9a7fd96b856
treeaf68390ae89fb67133e34cf5d831a0e2dcaaeeb4
parent68e31cc60c942b25f84287ceda479f0d7e2ca91a
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