SCSI: sd: don't fail if the device doesn't recognize SYNCHRONIZE CACHE
authorAlan Stern <stern@rowland.harvard.edu>
Wed, 15 Jan 2014 20:37:04 +0000 (15:37 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 27 Apr 2014 00:19:04 +0000 (17:19 -0700)
commit0561b77b0f366aa168fa23aa07b606f5f49638c8
treef56de174f2c580561df9df793fa7ec7722b95acc
parent4f1f4df2c1aee858da70f91970f6c9cb651a63de
SCSI: sd: don't fail if the device doesn't recognize SYNCHRONIZE CACHE

commit 7aae51347b21eb738dc1981df1365b57a6c5ee4e upstream.

Evidently some wacky USB-ATA bridges don't recognize the SYNCHRONIZE
CACHE command, as shown in this email thread:

http://marc.info/?t=138978356200002&r=1&w=2

The fact that we can't tell them to drain their caches shouldn't
prevent the system from going into suspend.  Therefore sd_sync_cache()
shouldn't return an error if the device replies with an Invalid
Command ASC.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Reported-by: Sven Neumann <s.neumann@raumfeld.com>
Tested-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/sd.c