Re: [PATCH] usb-storage: include USB drive in unusual_devs list

From: Alan Stern
Date: Mon May 25 2009 - 17:04:11 EST


On Mon, 25 May 2009, [utf-8] Rogério Brito wrote:

> 67b:2316:L
> Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
> Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
> Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
> Bus 004 Device 004: ID 067b:2316 Prolific Technology, Inc. Flash Disk Security Device
> Bus 004 Device 003: ID 067b:2317 Prolific Technology, Inc. Mass Storage Device
> Bus 004 Device 002: ID 067b:2315 Prolific Technology, Inc. Flash Disk Embedded Hub
> Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> chagas:~#
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>
> > If that eliminates the errors, we can add a permanent quirk entry for
> > this device.
>
> I can test whatever you want me to, so that this can be fixed. The above
> lsusb log shows that, perhaps, the quirks option should be set for the
> device 067b:2317, instead of 067b:2316, as you told me to?

Yes, my fault, I mixed up the two device IDs.

> (I'm going to verify it right now).
>
> Yes, that works. Using 67b:2317:L as a quirk eliminates the messages.
> And I do get the
>
> [ 3454.054150] usb-storage 4-2.1:1.0: Quirks match for vid 067b pid 2317: 80
>
> message. Therefore, a proposal:
>
> This patch adds a quirk entry for the Leading Driver UD-11
> usb flash drive.
>
> As Alan Stern told me, the device doesn't deal correctly with
> the locking media feature of the device, and this patch
> incorporates it.
>
> Compiled, tested, working.
>
>
> Signed-off-by: Rogério Brito <rbrito@xxxxxxxxxx>
>
> ---
>
> The US_PR_DEVICE macro could be changed to US_PR_CBI, from what
> I saw in the udevadm info tree.
>
> --- a/drivers/usb/storage/unusual_devs.h
> +++ b/drivers/usb/storage/unusual_devs.h
> @@ -838,6 +838,19 @@ UNUSUAL_DEV( 0x066f, 0x8000, 0x0001, 0x0
> US_SC_DEVICE, US_PR_DEVICE, NULL,
> US_FL_FIX_CAPACITY ),
>
> +/* Reported by Rogério Brito <rbrito@xxxxxxxxxx> */

I think you're not supposed to use non-ASCII characters in comments,
although they're okay in the Changelog.

> +/* 'lsusb' tells:
> + * "Prolific Technology, Inc. Mass Storage Device"
> + * but 'udevadm info' says:
> + * ATTR{manufacturer}=="Leading Driver Co.,LTD."
> + * ATTR{product}=="USB Mass Storage Device"

Don't worry about these attributes. Leave just the Prolific name.

> + */
> +UNUSUAL_DEV( 0x067b, 0x2317, 0x0001, 0x001,
> + "Prolific Technology, Inc.",
> + "Mass Storage Device",
> + US_SC_DEVICE, US_PR_DEVICE, NULL,
> + US_FL_NOT_LOCKABLE ),
> +
> /* Reported by Richard -=[]=- <micro_flyer@xxxxxxxxxxx> */
> /* Change to bcdDeviceMin (0x0100 to 0x0001) reported by
> * Thomas Bartosik <tbartdev@xxxxxxxxxxxxxx> */
>
>
> Actually, I just ventured myself and created a patch, attached (sorry, I
> know that people don't like attached patches, but I don't want to mix

This looks good. Make those suggested changes and submit it to Phil
Dibowitz <phil@xxxxxxxx>; it might even get merged in time to appear
in 2.6.30.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/