* [v2,1/2,usb-storage] Add support for FL_ALWAYS_SYNC flag in the UAS driver
@ 2018-05-19 4:50 Alexander Kappner
0 siblings, 0 replies; 2+ messages in thread
From: Alexander Kappner @ 2018-05-19 4:50 UTC (permalink / raw)
To: stern, oneukum
Cc: linux-kernel, linux-usb, usb-storage, gregkh, Alexander Kappner
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>
---
drivers/usb/storage/uas.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
index 6034c39..9e9de54 100644
--- a/drivers/usb/storage/uas.c
+++ b/drivers/usb/storage/uas.c
@@ -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;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [v2,1/2,usb-storage] Add support for FL_ALWAYS_SYNC flag in the UAS driver
@ 2018-05-22 8:58 Oliver Neukum
0 siblings, 0 replies; 2+ messages in thread
From: Oliver Neukum @ 2018-05-22 8:58 UTC (permalink / raw)
To: Alexander Kappner, stern; +Cc: linux-kernel, linux-usb, usb-storage, gregkh
Am Freitag, den 18.05.2018, 21:50 -0700 schrieb Alexander Kappner:
> 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: Oliver Neukum <oneukum@suse.com>
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-05-22 8:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-22 8:58 [v2,1/2,usb-storage] Add support for FL_ALWAYS_SYNC flag in the UAS driver Oliver Neukum
-- strict thread matches above, loose matches on Subject: below --
2018-05-19 4:50 Alexander Kappner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).