Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F163053180
D30919.id91420.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D30919.id91420.diff
View Options
Index: sys/dev/usb/usb_msctest.c
===================================================================
--- sys/dev/usb/usb_msctest.c
+++ sys/dev/usb/usb_msctest.c
@@ -118,6 +118,13 @@
static uint8_t scsi_prevent_removal[] = { 0x1e, 0, 0, 0, 1, 0 };
static uint8_t scsi_allow_removal[] = { 0x1e, 0, 0, 0, 0, 0 };
+/**
+ * The first byte refers to the position in usb_quirk_str[],
+ * found in usb_quirk.c
+ */
+static uint8_t scsi_quirk_no_test_unit_ready[] = { 0x1b, 0, 0, 0, 0, 0 };
+static uint8_t scsi_quirk_no_sync_cache[] = { 0x22, 0, 0, 0, 0, 0 };
+
#ifndef USB_MSCTEST_BULK_SIZE
#define USB_MSCTEST_BULK_SIZE 64 /* dummy */
#endif
@@ -836,6 +843,22 @@
timeout = 1;
+ err = bbb_command_start(sc, DIR_IN, 0, NULL, 0,
+ &scsi_quirk_no_test_unit_ready, sizeof(scsi_quirk_no_test_unit_ready),
+ USB_MS_HZ);
+ if (err == 0) {
+ usbd_add_dynamic_quirk(udev, UQ_MSC_NO_TEST_UNIT_READY);
+ /* fall through */
+ }
+
+ err = bbb_command_start(sc, DIR_IN, 0, NULL, 0,
+ &scsi_quirk_no_sync_cache, sizeof(scsi_quirk_no_sync_cache),
+ USB_MS_HZ);
+ if (err == ERR_CSW_FAILED) {
+ usbd_add_dynamic_quirk(udev, UQ_MSC_NO_SYNC_CACHE);
+ goto error;
+ }
+
retry_sync_cache:
err = bbb_command_start(sc, DIR_IN, 0, NULL, 0,
&scsi_sync_cache, sizeof(scsi_sync_cache),
@@ -917,9 +940,7 @@
DPRINTF("Device did not respond, enabling all quirks\n");
- usbd_add_dynamic_quirk(udev, UQ_MSC_NO_SYNC_CACHE);
usbd_add_dynamic_quirk(udev, UQ_MSC_NO_PREVENT_ALLOW);
- usbd_add_dynamic_quirk(udev, UQ_MSC_NO_TEST_UNIT_READY);
/* Need to re-enumerate the device */
usbd_req_re_enumerate(udev, NULL);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jul 20, 3:52 PM (2 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35277546
Default Alt Text
D30919.id91420.diff (1 KB)
Attached To
Mode
D30919: Automagically apply quirks on USB storage devices
Attached
Detach File
Event Timeline
Log In to Comment