]> 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)
commit66ecb87fc323c45e46210ad7c854e5572cea20d3
treeaf68390ae89fb67133e34cf5d831a0e2dcaaeeb4
parent36d3ef2e14a7ac934197b8469696693436bd8499
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