2012-06-11 13:29:25

by Namjae Jeon

[permalink] [raw]
Subject: [PATCH v4 3/3] usb: storage: update usb devices for write cache quirk in quirk list.

Update information of Seagate Portable HDD and WD My Passport HDD in
quirk list.

Signed-off-by: Namjae Jeon <[email protected]>
Signed-off-by: Pankaj Kumar <[email protected]>
Signed-off-by: Amit Sahrawat <[email protected]>
---
drivers/usb/storage/unusual_devs.h | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)

diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h
index 1719886..64f0369 100644
--- a/drivers/usb/storage/unusual_devs.h
+++ b/drivers/usb/storage/unusual_devs.h
@@ -1267,6 +1267,18 @@ UNUSUAL_DEV( 0x0af0, 0xd357, 0x0000, 0x0000,
USB_SC_DEVICE, USB_PR_DEVICE, NULL,
0 ),

+/* Reported by Namjae Jeon <[email protected]>
+ * Even though write cache is enabled by default,
+ * SCSI driver assume that cache is not enabled
+ * which in turn might lead to the loss of data
+ * since data still will be in cache.
+ * So this entry is needed for assuming that cache is enabled.
+ */
+UNUSUAL_DEV(0x0bc2, 0x2300, 0x0000, 0x9999,
+ "Seagate",
+ "Portable HDD",
+ USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_WRITE_CACHE),
+
/* Reported by Ben Efros <[email protected]> */
UNUSUAL_DEV( 0x0bc2, 0x3010, 0x0000, 0x0000,
"Seagate",
@@ -1468,6 +1480,18 @@ UNUSUAL_DEV( 0x1058, 0x0704, 0x0000, 0x9999,
USB_SC_DEVICE, USB_PR_DEVICE, NULL,
US_FL_SANE_SENSE),

+/* Reported by Namjae Jeon <[email protected]>
+ * Even though write cache is enabled by default,
+ * SCSI driver assume that cache is not enabled
+ * which in turn might lead to the loss of data
+ * since data still will be in cache.
+ * So this entry is needed for assuming that cache is enabled.
+ */
+UNUSUAL_DEV(0x1058, 0x070a, 0x0000, 0x9999,
+ "Western Digital",
+ "My Passport HDD",
+ USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_WRITE_CACHE),
+
/* Reported by Fabio Venturi <[email protected]>
* The device reports a vendor-specific bDeviceClass.
*/
--
1.7.9.5


2012-06-11 14:19:35

by Alan Stern

[permalink] [raw]
Subject: Re: [PATCH v4 3/3] usb: storage: update usb devices for write cache quirk in quirk list.

On Mon, 11 Jun 2012, Namjae Jeon wrote:

> Update information of Seagate Portable HDD and WD My Passport HDD in
> quirk list.
>
> Signed-off-by: Namjae Jeon <[email protected]>
> Signed-off-by: Pankaj Kumar <[email protected]>
> Signed-off-by: Amit Sahrawat <[email protected]>
> ---
> drivers/usb/storage/unusual_devs.h | 24 ++++++++++++++++++++++++
> 1 file changed, 24 insertions(+)
>
> diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h
> index 1719886..64f0369 100644
> --- a/drivers/usb/storage/unusual_devs.h
> +++ b/drivers/usb/storage/unusual_devs.h
> @@ -1267,6 +1267,18 @@ UNUSUAL_DEV( 0x0af0, 0xd357, 0x0000, 0x0000,
> USB_SC_DEVICE, USB_PR_DEVICE, NULL,
> 0 ),
>
> +/* Reported by Namjae Jeon <[email protected]>
> + * Even though write cache is enabled by default,
> + * SCSI driver assume that cache is not enabled
> + * which in turn might lead to the loss of data
> + * since data still will be in cache.
> + * So this entry is needed for assuming that cache is enabled.
> + */

Please remove everything except the "Reported by" line. The rest is
obvious when we see the US_FL_WRITE_CACHE flag.

> +UNUSUAL_DEV(0x0bc2, 0x2300, 0x0000, 0x9999,
> + "Seagate",
> + "Portable HDD",
> + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_WRITE_CACHE),
> +
> /* Reported by Ben Efros <[email protected]> */
> UNUSUAL_DEV( 0x0bc2, 0x3010, 0x0000, 0x0000,
> "Seagate",
> @@ -1468,6 +1480,18 @@ UNUSUAL_DEV( 0x1058, 0x0704, 0x0000, 0x9999,
> USB_SC_DEVICE, USB_PR_DEVICE, NULL,
> US_FL_SANE_SENSE),
>
> +/* Reported by Namjae Jeon <[email protected]>
> + * Even though write cache is enabled by default,
> + * SCSI driver assume that cache is not enabled
> + * which in turn might lead to the loss of data
> + * since data still will be in cache.
> + * So this entry is needed for assuming that cache is enabled.
> + */

Same here.

> +UNUSUAL_DEV(0x1058, 0x070a, 0x0000, 0x9999,
> + "Western Digital",
> + "My Passport HDD",
> + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_WRITE_CACHE),

Alan Stern

2012-06-11 22:45:21

by Namjae Jeon

[permalink] [raw]
Subject: Re: [PATCH v4 3/3] usb: storage: update usb devices for write cache quirk in quirk list.

2012/6/11, Alan Stern <[email protected]>:
> On Mon, 11 Jun 2012, Namjae Jeon wrote:
>
>> Update information of Seagate Portable HDD and WD My Passport HDD in
>> quirk list.
>>
>> Signed-off-by: Namjae Jeon <[email protected]>
>> Signed-off-by: Pankaj Kumar <[email protected]>
>> Signed-off-by: Amit Sahrawat <[email protected]>
>> ---
>> drivers/usb/storage/unusual_devs.h | 24 ++++++++++++++++++++++++
>> 1 file changed, 24 insertions(+)
>>
>> diff --git a/drivers/usb/storage/unusual_devs.h
>> b/drivers/usb/storage/unusual_devs.h
>> index 1719886..64f0369 100644
>> --- a/drivers/usb/storage/unusual_devs.h
>> +++ b/drivers/usb/storage/unusual_devs.h
>> @@ -1267,6 +1267,18 @@ UNUSUAL_DEV( 0x0af0, 0xd357, 0x0000, 0x0000,
>> USB_SC_DEVICE, USB_PR_DEVICE, NULL,
>> 0 ),
>>
>> +/* Reported by Namjae Jeon <[email protected]>
>> + * Even though write cache is enabled by default,
>> + * SCSI driver assume that cache is not enabled
>> + * which in turn might lead to the loss of data
>> + * since data still will be in cache.
>> + * So this entry is needed for assuming that cache is enabled.
>> + */
>
> Please remove everything except the "Reported by" line. The rest is
> obvious when we see the US_FL_WRITE_CACHE flag.
Okay, I will remove.
Thanks~
>
>> +UNUSUAL_DEV(0x0bc2, 0x2300, 0x0000, 0x9999,
>> + "Seagate",
>> + "Portable HDD",
>> + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_WRITE_CACHE),
>> +
>> /* Reported by Ben Efros <[email protected]> */
>> UNUSUAL_DEV( 0x0bc2, 0x3010, 0x0000, 0x0000,
>> "Seagate",
>> @@ -1468,6 +1480,18 @@ UNUSUAL_DEV( 0x1058, 0x0704, 0x0000, 0x9999,
>> USB_SC_DEVICE, USB_PR_DEVICE, NULL,
>> US_FL_SANE_SENSE),
>>
>> +/* Reported by Namjae Jeon <[email protected]>
>> + * Even though write cache is enabled by default,
>> + * SCSI driver assume that cache is not enabled
>> + * which in turn might lead to the loss of data
>> + * since data still will be in cache.
>> + * So this entry is needed for assuming that cache is enabled.
>> + */
>
> Same here.
>
>> +UNUSUAL_DEV(0x1058, 0x070a, 0x0000, 0x9999,
>> + "Western Digital",
>> + "My Passport HDD",
>> + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_WRITE_CACHE),
>
> Alan Stern
>
>