Skip to content

Commit 187941e

Browse files
Alexander Kappnergregkh
authored andcommitted
usb-storage: Add support for FL_ALWAYS_SYNC flag in the UAS driver
commit 8c4e97d upstream. The ALWAYS_SYNC flag is currently honored by the usb-storage driver but not UAS and is required to work around devices that become unstable upon being queried for cache. This code is taken straight from: drivers/usb/storage/scsiglue.c:284 Signed-off-by: Alexander Kappner <agk@godking.net> Acked-by: Alan Stern <stern@rowland.harvard.edu> Cc: stable <stable@vger.kernel.org> Acked-by: Oliver Neukum <oneukum@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 14450ab commit 187941e

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

drivers/usb/storage/uas.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -836,6 +836,12 @@ static int uas_slave_configure(struct scsi_device *sdev)
836836
if (devinfo->flags & US_FL_BROKEN_FUA)
837837
sdev->broken_fua = 1;
838838

839+
/* UAS also needs to support FL_ALWAYS_SYNC */
840+
if (devinfo->flags & US_FL_ALWAYS_SYNC) {
841+
sdev->skip_ms_page_3f = 1;
842+
sdev->skip_ms_page_8 = 1;
843+
sdev->wce_default_on = 1;
844+
}
839845
scsi_change_queue_depth(sdev, devinfo->qdepth - 2);
840846
return 0;
841847
}

0 commit comments

Comments
 (0)