<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>22253</bug_id>
          
          <creation_ts>2009-11-12 02:26:50 +0300</creation_ts>
          <short_desc>[PATCH] Unusual usb_storage device Samsung YP-CP3 not working</short_desc>
          <delta_ts>2010-07-02 18:47:29 +0400</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>kernel-image-std-def</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Vitaly Kuznetsov">vitty</reporter>
          <assigned_to name="Vitaly Chikunov">vt</assigned_to>
          <cc>kernelbot</cc>
    
    <cc>placeholder</cc>
    
    <cc>vt</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>102966</commentid>
    <comment_count>0</comment_count>
    <who name="Vitaly Kuznetsov">vitty</who>
    <bug_when>2009-11-12 02:26:50 +0300</bug_when>
    <thetext>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:&lt;2&gt;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 &lt;vitty@altlinux.ru&gt; */
+UNUSUAL_DEV(  0x04e8, 0x5122, 0x0000, 0x9999,
+		&quot;Samsung&quot;,
+		&quot;YP-CP3&quot;,
+		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 &lt;kilgota@auburn.edu&gt;.
  * Device uses standards-violating 32-byte Bulk Command Block Wrappers and
  * reports itself as &quot;Proprietary SCSI Bulk.&quot; 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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>110301</commentid>
    <comment_count>1</comment_count>
    <who name="Michail Yakushin">silicium</who>
    <bug_when>2010-07-02 18:47:29 +0400</bug_when>
    <thetext>приложен.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>