diff options
author | hselasky <hselasky@FreeBSD.org> | 2015-01-12 06:34:23 +0000 |
---|---|---|
committer | hselasky <hselasky@FreeBSD.org> | 2015-01-12 06:34:23 +0000 |
commit | 587eb873dc639b69b2bd23df69a8a768eecf960e (patch) | |
tree | ace7d7ca2eb74f414000a8f22e07b7c1e962e791 /sys/dev/usb/usb_msctest.c | |
parent | 9acf8ffafa1ae3d1639a637c4a9238ff136b1e04 (diff) | |
download | FreeBSD-src-587eb873dc639b69b2bd23df69a8a768eecf960e.zip FreeBSD-src-587eb873dc639b69b2bd23df69a8a768eecf960e.tar.gz |
Increase the maximum number of dynamic USB quirks. USB memory stick
devices which don't support the synchronize cache SCSI command are
likely to also not support the prevent-allow medium removal SCSI
command.
PR: 185747
MFC after: 1 week
Diffstat (limited to 'sys/dev/usb/usb_msctest.c')
-rw-r--r-- | sys/dev/usb/usb_msctest.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/dev/usb/usb_msctest.c b/sys/dev/usb/usb_msctest.c index 1a8c675..91b2292 100644 --- a/sys/dev/usb/usb_msctest.c +++ b/sys/dev/usb/usb_msctest.c @@ -718,10 +718,11 @@ retry_sync_cache: if (err != ERR_CSW_FAILED) goto error; - DPRINTF("Device doesn't handle synchronize cache\n"); + DPRINTF("Device doesn't handle synchronize cache " + "and prevent allow medium removal\n"); usbd_add_dynamic_quirk(udev, UQ_MSC_NO_SYNC_CACHE); - + usbd_add_dynamic_quirk(udev, UQ_MSC_NO_PREVENT_ALLOW); } else { /* @@ -748,10 +749,13 @@ retry_sync_cache: goto retry_sync_cache; DPRINTF("Device most likely doesn't " - "handle synchronize cache\n"); + "handle synchronize cache nor" + "prevent allow medium removal\n"); usbd_add_dynamic_quirk(udev, UQ_MSC_NO_SYNC_CACHE); + usbd_add_dynamic_quirk(udev, + UQ_MSC_NO_PREVENT_ALLOW); } else { if (err != ERR_CSW_FAILED) goto error; @@ -795,6 +799,7 @@ error: 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 */ |