[Bug 222659] Add quirk UQ_MSC_NO_PREVENT_ALLOW to SMI USB DISK 3000

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 222659] Add quirk UQ_MSC_NO_PREVENT_ALLOW to SMI USB DISK 3000

bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=222659

            Bug ID: 222659
           Summary: Add quirk UQ_MSC_NO_PREVENT_ALLOW to SMI USB DISK 3000
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: usb
          Assignee: [hidden email]
          Reporter: [hidden email]

Plugin the following usb storage device (usbconfig report):

ugen0.2: <USB DISK SMI Corporation> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps)
pwr=ON (100mA)

  bLength = 0x0012
  bDescriptorType = 0x0001
  bcdUSB = 0x0200
  bDeviceClass = 0x0000  <Probed by interface class>
  bDeviceSubClass = 0x0000
  bDeviceProtocol = 0x0000
  bMaxPacketSize0 = 0x0040
  idVendor = 0x090c
  idProduct = 0x1000
  bcdDevice = 0x3000
  iManufacturer = 0x0001  <SMI Corporation>
  iProduct = 0x0002  <USB DISK>
  iSerialNumber = 0x0003  <2010121200000149>
  bNumConfigurations = 0x0001


Produces the following errors:

(da0:umass-sim0:0:0:0): Retrying command
(da0:umass-sim0:0:0:0): READ(10). CDB: 28 00 00 ee ff fe 00 00 01 00
(da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error
(da0:umass-sim0:0:0:0): Retrying command
(da0:umass-sim0:0:0:0): READ(10). CDB: 28 00 00 ee ff fe 00 00 01 00
(da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error
(da0:umass-sim0:0:0:0): Error 5, Retries exhausted


Which makes it impossible to mount and use it.
After adding the following lines to the loader.conf file, the problem was
fixed:

usb_quirk_load="YES"
hw.usb.quirk.0="0x090c 0x1000 0 0xffff UQ_MSC_NO_PREVENT_ALLOW"


And the dmesg log don't have any issue registered:

uhub0: 2 ports with 2 removable, self powered
ugen0.2: <SMI Corporation> at usbus0
umass0: <SMI Corporation USB DISK, class 0/0, rev 2.00/30.00, addr 2> on usbus0
umass0:  SCSI over Bulk-Only; quirks = 0xc000
umass0:2:0: Attached to scbus2
da0 at umass-sim0 bus 0 scbus2 target 0 lun 0
da0: <SMI USB DISK 3000> Removable Direct Access SCSI device
da0: Serial Number 2010121200000149
da0: 1.000MB/s transfers
da0: 7648MB (15663104 512 byte sectors)
da0: quirks=0x3<NO_SYNC_CACHE,NO_6_BYTE>


Thanks,

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 222659] Add quirk UQ_MSC_NO_PREVENT_ALLOW to SMI USB DISK 3000

bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=222659

Hans Petter Selasky <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #1 from Hans Petter Selasky <[hidden email]> ---
Hi,

Please make a patch for:

sys/dev/usb/quirk/usb_quirk.c and
sys/dev/usb/usbdevs

--HPS

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 222659] Add quirk UQ_MSC_NO_PREVENT_ALLOW to SMI USB DISK 3000

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=222659

Robert Welain <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #2 from Robert Welain <[hidden email]> ---
Visit https://spying.ninja guys. YOu;ll like the apps

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 222659] Add quirk UQ_MSC_NO_PREVENT_ALLOW to SMI USB DISK 3000

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=222659

--- Comment #3 from Ricardo Fraile <[hidden email]> ---
Created attachment 186852
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=186852&action=edit
Patch file for SMI USB Flash Drive

Hi,

Here is the patch. I tested it and works without issue.

Thanks,

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 222659] Add quirk UQ_MSC_NO_PREVENT_ALLOW to SMI USB DISK 3000

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=222659

Mark Linimon <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 222659] Add quirk UQ_MSC_NO_PREVENT_ALLOW to SMI USB DISK 3000

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=222659

--- Comment #4 from Hans Petter Selasky <[hidden email]> ---
Patch looks good to me. Approved.

--HPS

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 222659] Add quirk UQ_MSC_NO_PREVENT_ALLOW to SMI USB DISK 3000

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=222659

--- Comment #5 from Hans Petter Selasky <[hidden email]> ---
Can you try adding UQ_MSC_NO_SYNC_CACHE to the list of quirks? I see it is
already listed.

--HPS

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 222659] Add quirk UQ_MSC_NO_PREVENT_ALLOW to SMI USB DISK 3000

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=222659

--- Comment #6 from Ricardo Fraile <[hidden email]> ---
Hi Hans,

Sorry but where is the list of quirks? The usb_quirk.c already have
UQ_MSC_NO_SYNC_CACHE:

+       USB_QUIRK(FEIYA, USB_DISK, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE,
+           UQ_MSC_NO_PREVENT_ALLOW),

Thanks,

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 222659] Add quirk UQ_MSC_NO_PREVENT_ALLOW to SMI USB DISK 3000

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=222659

--- Comment #7 from Hans Petter Selasky <[hidden email]> ---
Hi,

If you look at this line you see your device already has some quirks. Try
looking in sys/cam/* for those:

da0: quirks=0x3<NO_SYNC_CACHE,NO_6_BYTE>

Yes, try adding the NO_SYNCHRONIZE_CACHE quirk aswell at USB level.

--HPS

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 222659] Add quirk UQ_MSC_NO_PREVENT_ALLOW to SMI USB DISK 3000

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=222659

--- Comment #8 from Ricardo Fraile <[hidden email]> ---
Created attachment 187093
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=187093&action=edit
Patch file for SMI USB Flash Drive scsi_da.c

Hi,

Here is the patch.

The device is not listed, but is catched by the following lines:

        /*
         * PNY USB Flash keys
         * PR: usb/75578, usb/72344, usb/65436
         */
        {T_DIRECT, SIP_MEDIA_REMOVABLE, "*" , "USB DISK*",
        "*"}, /*quirks*/ DA_Q_NO_SYNC_CACHE

Which is something weird because it relies only in the device name across all
vendors.
If I add my lines under these ones, it doesn't work.

The patch is tested and working.


Thanks,

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 222659] Add quirk UQ_MSC_NO_PREVENT_ALLOW to SMI USB DISK 3000

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=222659

--- Comment #9 from Hans Petter Selasky <[hidden email]> ---
eadler, mav, flz and more:

USB disk quirks should not be added to:

https://svnweb.freebsd.org/base/head/sys/cam/scsi/scsi_da.c

But instead the USB quirk database. We might need to revisit some old PR's
because the existing quirks are starting to false-trigger.

--HPS

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 222659] Add quirk UQ_MSC_NO_PREVENT_ALLOW to SMI USB DISK 3000

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=222659

--- Comment #10 from Alexander Motin <[hidden email]> ---
(In reply to Hans Petter Selasky from comment #9)
I agree.  My general position is that quirks like DA_Q_NO_SYNC_CACHE should not
be used unless absolutely necessary due to device is completely broken and
crashes for them or responds incorrectly, otherwise CAM should complain on it
only once and disable it automatically.

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "[hidden email]"