Skip to contentSkip to conversation

patch "usb-storage: Add support for FL_ALWAYS_SYNC flag in the UAS driver" added to usb-next

PATCH [email protected] 1 participant 1 message May 24, 2018

Subsystems (4)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

usb-storage: Add support for FL_ALWAYS_SYNC flag in the UAS driver

to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-next branch.

The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)

The patch will also be merged in the next major kernel release during the merge window.

If you have any questions about this process, please let me know.

Quoted 1 line

From 8c4e97ddfe73a0958bb0abf7e6a3bc4cc3e04936 Mon Sep 17 00:00:00 2001

From: Alexander Kappner <[email protected]>
Date: Fri, 18 May 2018 21:50:15 -0700
Subject: usb-storage: Add support for FL_ALWAYS_SYNC flag in the UAS driver

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

---
 drivers/usb/storage/uas.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/usb/storage/uas.c +6 -0
index 6034c39b67d1..9e9de5452860 100644
@@ -836,6 +836,12 @@ static int uas_slave_configure(struct scsi_device *sdev)
 	if (devinfo->flags & US_FL_BROKEN_FUA)
 		sdev->broken_fua = 1;
 
+	/* UAS also needs to support FL_ALWAYS_SYNC */
+	if (devinfo->flags & US_FL_ALWAYS_SYNC) {
+		sdev->skip_ms_page_3f = 1;
+		sdev->skip_ms_page_8 = 1;
+		sdev->wce_default_on = 1;
+	}
 	scsi_change_queue_depth(sdev, devinfo->qdepth - 2);
 	return 0;
 }
Signature · 1 line
2.17.0