Bug 22253 - [PATCH] Unusual usb_storage device Samsung YP-CP3 not working
Summary: [PATCH] Unusual usb_storage device Samsung YP-CP3 not working
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: kernel-image-std-def (show other bugs)
Version: unstable
Hardware: all Linux
: P3 normal
Assignee: Vitaly Chikunov
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-12 02:26 MSK by Vitaly Kuznetsov
Modified: 2010-07-02 18:47 MSD (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vitaly Kuznetsov 2009-11-12 02:26:50 MSK
Unusual usb_storage device Samsung YP-CP3 not working (disconnects immediately after connection), dmesg:
 1457.648857] usb-storage: device found at 2
[ 1457.648859] usb-storage: waiting for device to settle before scanning
[ 1457.648866] usbcore: registered new interface driver usb-storage
[ 1457.648870] USB Mass Storage support registered.
[ 1462.644223] usb-storage: device scan complete
[ 1462.644699] scsi 3:0:0:0: Direct-Access     SAMSUNG  YP-CP3           1.00 PQ: 0 ANSI: 0
[ 1462.645313] scsi 3:0:0:1: Direct-Access     SAMSUNG  microSD Card     1.00 PQ: 0 ANSI: 0 CCS
[ 1462.649922] sd 3:0:0:0: [sdb] 7649280 512-byte hardware sectors: (3.91 GB/3.64 GiB)
[ 1462.761061] usb 2-6: reset high speed USB device using ehci_hcd and address 2
[ 1463.009063] usb 2-6: reset high speed USB device using ehci_hcd and address 2
[ 1463.256053] usb 2-6: reset high speed USB device using ehci_hcd and address 2
[ 1463.505060] usb 2-6: reset high speed USB device using ehci_hcd and address 2
[ 1463.756066] usb 2-6: reset high speed USB device using ehci_hcd and address 2
[ 1464.008104] usb 2-6: reset high speed USB device using ehci_hcd and address 2
[ 1464.140585] sd 3:0:0:0: [sdb] Write Protect is off
[ 1464.140590] sd 3:0:0:0: [sdb] Mode Sense: 00 00 00 00
[ 1464.140592] sd 3:0:0:0: [sdb] Assuming drive cache: write through
[ 1464.141322] sd 3:0:0:1: [sdc] Attached SCSI removable disk
[ 1464.257057] usb 2-6: reset high speed USB device using ehci_hcd and address 2
[ 1464.512064] usb 2-6: reset high speed USB device using ehci_hcd and address 2
[ 1464.760074] usb 2-6: reset high speed USB device using ehci_hcd and address 2
[ 1464.816364] usb 2-6: USB disconnect, address 2
[ 1464.817340] sd 3:0:0:0: [sdb] Assuming drive cache: write through
[ 1464.817352]  sdb:<2>ldm_validate_partition_table(): Disk read failed.
[ 1464.818575] Dev sdb: unable to read RDB block 0
[ 1464.818618]  unable to read partition table

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.

Now this device works perfectly, dmesg:
[ 6126.086942] usb-storage: device found at 19
[ 6126.086947] usb-storage: waiting for device to settle before scanning
[ 6131.084350] usb-storage: device scan complete
[ 6131.084553] scsi 20:0:0:0: Direct-Access     Samsung  YP-CP3           0000 PQ: 0 ANSI: 2
[ 6131.084680] scsi 20:0:0:1: Direct-Access     Samsung  YP-CP3           0000 PQ: 0 ANSI: 2
[ 6131.088943] sd 20:0:0:1: [sdc] Attached SCSI removable disk
[ 6131.097925] sd 20:0:0:0: [sdb] Adjusting the sector count from its reported value: 7649280
[ 6131.097940] sd 20:0:0:0: [sdb] 7649279 512-byte hardware sectors: (3.91 GB/3.64 GiB)
[ 6131.099241] sd 20:0:0:0: [sdb] Write Protect is off
[ 6131.099250] sd 20:0:0:0: [sdb] Mode Sense: 03 00 00 00
[ 6131.099256] sd 20:0:0:0: [sdb] Assuming drive cache: write through
[ 6131.100855] sd 20:0:0:0: [sdb] Adjusting the sector count from its reported value: 7649280
[ 6131.101355] sd 20:0:0:0: [sdb] Assuming drive cache: write through
[ 6131.101367]  sdb:
[ 6131.102452] sd 20:0:0:0: [sdb] Attached SCSI removable disk
Comment 1 Michail Yakushin 2010-07-02 18:47:29 MSD
приложен.