Bug#555835: [usb-storage] linux-image-2.6.30-2-686: Unusual usb storage Samsung YP-CP3 not working
Matthew Dharm <mdharm-usb@one-eyed-alien.net> writes:
> On Wed, Nov 18, 2009 at 10:00:24PM +0100, Moritz Muehlenhoff wrote:
>> [CCing upstream for review/merge of the patch proposed by Vitaly.]
>>
>> This was reported to Debian as
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=555835
>>
>> Vitaly, please add a Signed-off-by: header as described in
>> Documentation/SubmittingPatches
>>
>> Cheers,
>> Moritz
>>
>> On Thu, Nov 12, 2009 at 02:17:09AM +0300, Vitaly Kuznetsov wrote:
>> > I wrote a small patch to fix this problem:
>> > --- drivers/usb/storage/unusual_devs.h.old 2009-09-26
> 01:58:45.000000000 +0400
>> > +++ drivers/usb/storage/unusual_devs.h 2009-11-12
> 02:01:20.000000000 +0300
>> > @@ -495,6 +495,13 @@
>> > US_SC_DEVICE, US_PR_DEVICE, NULL,
>> > US_FL_MAX_SECTORS_64),
>> >
>> > +/* Reported by Vitaly Kuznetsov <vitty@altlinux.ru> */
>> > +UNUSUAL_DEV( 0x04e8, 0x5122, 0x0000, 0x9999,
>> > + "Samsung",
>> > + "YP-CP3",
>> > + US_SC_DEVICE, US_PR_DEVICE, NULL,
>> > + US_FL_MAX_SECTORS_64 | US_FL_FIX_INQUIRY | US_FL_FIX_CAPACITY |
> US_FL_BULK_IGNORE_TAG),
>> > +
>> > /* Entry and supporting patch by Theodore Kilgore
> <kilgota@auburn.edu>.
>> > * Device uses standards-violating 32-byte Bulk Command Block
> Wrappers and
>> > * reports itself as "Proprietary SCSI Bulk." Cf. device entry
> 0x084d:0x0011.
>
> This is almost certainly WAY too many flags. Please remove the flags
> to
> establish which ones are actually required.
>
> Matt
Sorry Matt, I was too lazy ;)
Without US_FL_BULK_IGNORE_TAG:
Nov 20 01:17:56 vitbook kernel: [60336.044697] scsi 4:0:0:1: Direct-Access Samsung YP-CP3 0000 PQ: 0 ANSI: 2
Nov 20 01:17:56 vitbook kernel: [60336.048770] sd 4:0:0:1: [sdc] Attached SCSI removable disk
Nov 20 01:17:56 vitbook kernel: [60336.049266] sd 4:0:0:0: [sdb] Adjusting the sector count from its reported value: 7649280
Nov 20 01:17:56 vitbook kernel: [60336.049280] sd 4:0:0:0: [sdb] 7649279 512-byte hardware sectors: (3.91 GB/3.64 GiB)
Nov 20 01:17:56 vitbook kernel: [60336.160052] usb 2-2: reset high speed USB device using ehci_hcd and address 3
Nov 20 01:17:56 vitbook kernel: [60336.408080] usb 2-2: reset high speed USB device using ehci_hcd and address 3
Nov 20 01:17:56 vitbook kernel: [60336.670754] usb 2-2: reset high speed USB device using ehci_hcd and address 3
Nov 20 01:17:57 vitbook kernel: [60336.860493] usb 2-2: USB disconnect, address 3
(devide does not work)
Without US_FL_FIX_CAPACITY works well,
Without US_FL_FIX_INQUIRY works well,
Without US_FL_MAX_SECTORS_64
Nov 20 01:31:43 vitbook kernel: [61162.880923] scsi 8:0:0:0: Direct-Access SAMSUNG YP-CP3 1.00 PQ: 0 ANSI: 0
Nov 20 01:31:43 vitbook kernel: [61162.881796] scsi 8:0:0:1: Direct-Access SAMSUNG microSD Card 1.00 PQ: 0 ANSI: 0 CCS
Nov 20 01:31:43 vitbook kernel: [61162.886339] sd 8:0:0:1: [sdc] Attached SCSI removable disk
Nov 20 01:31:43 vitbook kernel: [61162.886757] sd 8:0:0:0: [sdb] 7649280 512-byte hardware sectors: (3.91 GB/3.64 GiB)
Nov 20 01:31:43 vitbook kernel: [61162.887247] sd 8:0:0:0: [sdb] Write Protect is off
Nov 20 01:31:43 vitbook kernel: [61162.889637] sdb:
Nov 20 01:31:43 vitbook kernel: [61162.893457] sd 8:0:0:0: [sdb] Attached SCSI removable disk
Nov 20 01:31:43 vitbook kernel: [61163.054984] sd 8:0:0:0: [sdb] Unhandled error code
Nov 20 01:31:43 vitbook kernel: [61163.054993] sd 8:0:0:0: [sdb] Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
Nov 20 01:31:43 vitbook kernel: [61163.175881] sd 8:0:0:0: [sdb] Unhandled error code
(device does not work)
So, the minimum is US_FL_MAX_SECTORS_64 | US_FL_BULK_IGNORE_TAG
New patch attached.
--
Vitaly Kuznetsov, ALT Linux.
>From ea56523a4edd65bdef9ba08dec03563f3638a35e Mon Sep 17 00:00:00 2001
From: Vitaly Kuznetsov <vitty@altlinux.ru>
Date: Thu, 19 Nov 2009 15:49:05 +0000
Subject: [PATCH] USB: Unusual Device support for Samsung YP-CP3 MP4 Player
User was getting the following errors in dmesg:
usb 2-6: reset high speed USB device using ehci_hcd and address 2
usb 2-6: reset high speed USB device using ehci_hcd and address 2
usb 2-6: reset high speed USB device using ehci_hcd and address 2
usb 2-6: USB disconnect, address 2
sd 3:0:0:0: [sdb] Assuming drive cache: write through
sdb:<2>ldm_validate_partition_table(): Disk read failed.
Dev sdb: unable to read RDB block 0
unable to read partition table
Signed-off-by: Vitaly Kuznetsov <vitty@altlinux.ru>
---
drivers/usb/storage/unusual_devs.h | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h
index d4f034e..05b0d2c 100644
--- a/drivers/usb/storage/unusual_devs.h
+++ b/drivers/usb/storage/unusual_devs.h
@@ -481,6 +481,13 @@ UNUSUAL_DEV( 0x04e8, 0x507c, 0x0220, 0x0220,
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_MAX_SECTORS_64),
+/* Reported by Vitaly Kuznetsov <vitty@altlinux.ru> */
+UNUSUAL_DEV( 0x04e8, 0x5122, 0x0000, 0x9999,
+ "Samsung",
+ "YP-CP3",
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_MAX_SECTORS_64 | US_FL_BULK_IGNORE_TAG),
+
/* Entry and supporting patch by Theodore Kilgore <kilgota@auburn.edu>.
* Device uses standards-violating 32-byte Bulk Command Block Wrappers and
* reports itself as "Proprietary SCSI Bulk." Cf. device entry 0x084d:0x0011.
--
1.6.3.3
Reply to: