# [SOLVED] IDE-USB Adapter

## buzzoneandonly

Hello,

I am trying to install an USB/IDE adapter. This one:

http://www.dansdata.com/images/rdriv2/rdrivkit800.jpg

USB sticks and other usb storage devices are working flawlessly.

If I put an IDE HDD to the adapter, dmesg yields:

```

Jan 25 16:50:06 propcom5 usb 1-4: new high speed USB device using ehci_hcd and address 4

Jan 25 16:50:06 propcom5 usb 1-4: configuration #1 chosen from 1 choice

Jan 25 16:50:06 propcom5 scsi10 : SCSI emulation for USB Mass Storage devices

Jan 25 16:50:06 propcom5 usb-storage: device found at 4

Jan 25 16:50:06 propcom5 usb-storage: waiting for device to settle before scanning

Jan 25 16:50:11 propcom5 Vendor: WDC AC24  Model: 20F               Rev:  0 0

Jan 25 16:50:11 propcom5 Type:   Direct-Access                      ANSI SCSI revision: 00

Jan 25 16:50:11 propcom5 sda : very big device. try to use READ CAPACITY(16).

Jan 25 16:50:11 propcom5 sda : READ CAPACITY(16) failed.

Jan 25 16:50:11 propcom5 sda : status=0, message=00, host=5, driver=00 

Jan 25 16:50:11 propcom5 sda : use 0xffffffff as device size

Jan 25 16:50:11 propcom5 SCSI device sda: 4294967296 512-byte hdwr sectors (2199023 MB)

Jan 25 16:50:11 propcom5 sda: Write Protect is off

Jan 25 16:50:11 propcom5 sda: Mode Sense: 03 00 00 00

Jan 25 16:50:11 propcom5 sda: assuming drive cache: write through

Jan 25 16:50:11 propcom5 sda : very big device. try to use READ CAPACITY(16).

Jan 25 16:50:11 propcom5 sda : READ CAPACITY(16) failed.

Jan 25 16:50:11 propcom5 sda : status=0, message=00, host=5, driver=00 

Jan 25 16:50:11 propcom5 sda : use 0xffffffff as device size

Jan 25 16:50:11 propcom5 SCSI device sda: 4294967296 512-byte hdwr sectors (2199023 MB)

Jan 25 16:50:11 propcom5 sda: Write Protect is off

Jan 25 16:50:11 propcom5 sda: Mode Sense: 03 00 00 00

Jan 25 16:50:11 propcom5 sda: assuming drive cache: write through

Jan 25 16:50:15 propcom5 udevd-event[20174]: wait_for_sysfs: waiting for '/sys/devices/pci0000:00/0000:00:10.3/usb1/1-4/1-4:1.0/host10/target10:0:0/10:0:0:0/bus' failed

Jan 25 16:50:18 propcom5 sda:<6>sda: Current: sense key=0x0

Jan 25 16:50:18 propcom5 ASC=0x0 ASCQ=0x0

Jan 25 16:50:18 propcom5 unknown partition table

Jan 25 16:50:18 propcom5 sd 10:0:0:0: Attached scsi disk sda

Jan 25 16:50:18 propcom5 sd 10:0:0:0: Attached scsi generic sg0 type 0

Jan 25 16:50:18 propcom5 usb-storage: device scan complete

Jan 25 16:50:18 propcom5 scsi.agent[20189]: disk at /devices/pci0000:00/0000:00:10.3/usb1/1-4/1-4:1.0/host10/target10:0:0/10:0:0:0

Jan 25 16:50:20 propcom5 sudo:     buzz : TTY=unknown ; PWD=unknown ; USER=root ; COMMAND=/usr/sbin/hddtemp /dev/hda

Jan 25 16:50:24 propcom5 sda: Current: sense key=0x0

Jan 25 16:50:24 propcom5 sda: Current: sense key=0x0

Jan 25 16:50:24 propcom5 ASC=0x0 ASCQ=0x0

Jan 25 16:50:31 propcom5 sda: Current: sense key=0x0

Jan 25 16:50:31 propcom5 ASC=0x0 ASCQ=0x0

Jan 25 16:50:31 propcom5 su[20267]: Successful su for root by buzz

Jan 25 16:50:31 propcom5 su[20267]: + pts/1 buzz:root

Jan 25 16:50:31 propcom5 su(pam_unix)[20267]: session opened for user root by (uid=1000)

Jan 25 16:50:37 propcom5 sda: Current: sense key=0x0

Jan 25 16:50:37 propcom5 ASC=0x0 ASCQ=0x0

Jan 25 16:50:44 propcom5 sda: Current: sense key=0x0

Jan 25 16:50:44 propcom5 ASC=0x0 ASCQ=0x0

Jan 25 16:50:50 propcom5 sda: Current: sense key=0x0

Jan 25 16:50:50 propcom5 ASC=0x0 ASCQ=0x0

Jan 25 16:50:50 propcom5 sudo:     buzz : TTY=unknown ; PWD=unknown ; USER=root ; COMMAND=/usr/sbin/hddtemp /dev/hda

Jan 25 16:50:57 propcom5 sda: Current: sense key=0x0

Jan 25 16:50:57 propcom5 ASC=0x0 ASCQ=0x0

Jan 25 16:51:03 propcom5 sda: Current: sense key=0x0

Jan 25 16:51:03 propcom5 ASC=0x0 ASCQ=0x0

Jan 25 16:51:04 propcom5 sd 10:0:0:0: SCSI error: return code = 0x8000002

Jan 25 16:51:04 propcom5 sda: Current: sense key=0x3

Jan 25 16:51:04 propcom5 ASC=0x0 ASCQ=0x0

Jan 25 16:51:04 propcom5 end_request: I/O error, dev sda, sector 8

Jan 25 16:51:04 propcom5 printk: 6 messages suppressed.

Jan 25 16:51:04 propcom5 Buffer I/O error on device sda, logical block 1

Jan 25 16:51:05 propcom5 sd 10:0:0:0: SCSI error: return code = 0x8000002

Jan 25 16:51:05 propcom5 sda: Current: sense key=0x3

Jan 25 16:51:05 propcom5 ASC=0x0 ASCQ=0x0

Jan 25 16:51:05 propcom5 end_request: I/O error, dev sda, sector 16

Jan 25 16:51:05 propcom5 Buffer I/O error on device sda, logical block 2

Jan 25 16:51:05 propcom5 sd 10:0:0:0: SCSI error: return code = 0x8000002

Jan 25 16:51:05 propcom5 sda: Current: sense key=0x3

Jan 25 16:51:05 propcom5 ASC=0x0 ASCQ=0x0

Jan 25 16:51:05 propcom5 end_request: I/O error, dev sda, sector 24

Jan 25 16:51:05 propcom5 Buffer I/O error on device sda, logical block 3

Jan 25 16:51:06 propcom5 sd 10:0:0:0: SCSI error: return code = 0x8000002

Jan 25 16:51:06 propcom5 sda: Current: sense key=0x3

Jan 25 16:51:06 propcom5 ASC=0x0 ASCQ=0x0

Jan 25 16:51:06 propcom5 end_request: I/O error, dev sda, sector 32

Jan 25 16:51:06 propcom5 Buffer I/O error on device sda, logical block 4

Jan 25 16:51:07 propcom5 sd 10:0:0:0: SCSI error: return code = 0x8000002

Jan 25 16:51:07 propcom5 sda: Current: sense key=0x3

Jan 25 16:51:07 propcom5 ASC=0x0 ASCQ=0x0

Jan 25 16:51:07 propcom5 end_request: I/O error, dev sda, sector 40

Jan 25 16:51:07 propcom5 Buffer I/O error on device sda, logical block 5

Jan 25 16:51:07 propcom5 sd 10:0:0:0: SCSI error: return code = 0x8000002

Jan 25 16:51:07 propcom5 sda: Current: sense key=0x3

...

```

The /dev/sda is created properly. But there are Buffer I/O errors while accessing the HDD.

```

propcom5 buzz # fdisk /dev/sda

Unable to read /dev/sda

```

If I connect a CD/DVD drive via the adapter there is a Generic SCSI device (/dev/sg0) created and no /dev/sda. This device is not mountable since it's not a block device. Windows detects all drives connected via this device properly. Any ideas?

so far...

MirkoLast edited by buzzoneandonly on Fri Jan 26, 2007 11:32 pm; edited 1 time in total

----------

## NeddySeagoon

buzzoneandonly,

```
SCSI device sda: 4294967296 512-byte hdwr sectors (2199023 MB)
```

Is that device size real ?

2.1Tb ?

If so you will need large block device support in your kernel.

----------

## buzzoneandonly

 *NeddySeagoon wrote:*   

> buzzoneandonly,
> 
> ```
> SCSI device sda: 4294967296 512-byte hdwr sectors (2199023 MB)
> ```
> ...

 

no its a 160GB drive actually.  :Rolling Eyes: 

----------

## NeddySeagoon

buzzoneandonly,

Looks like you got a bargin then :)

Please post the Vendor and Device IS for the USB device.

You can get them from lsusb which is part of usbutils

----------

## buzzoneandonly

 *NeddySeagoon wrote:*   

> 
> 
> Please post the Vendor and Device IS for the USB device.
> 
> You can get them from lsusb which is part of usbutils

 

```

Bus 003 Device 003: ID 14cd:6600  

Device Descriptor:

  bLength                18

  bDescriptorType         1

  bcdUSB               2.00

  bDeviceClass            0 (Defined at Interface level)

  bDeviceSubClass         0 

  bDeviceProtocol         0 

  bMaxPacketSize0        64

  idVendor           0x14cd 

  idProduct          0x6600 

  bcdDevice            2.01

  iManufacturer           1 Super Top 

  iProduct                3 USB 2.0  IDE DEVICE    

  iSerial                 2 ??????????

  bNumConfigurations      1

  Configuration Descriptor:

    bLength                 9

    bDescriptorType         2

    wTotalLength           32

    bNumInterfaces          1

    bConfigurationValue     1

    iConfiguration          0 

    bmAttributes         0x80

    MaxPower              100mA

    Interface Descriptor:

      bLength                 9

      bDescriptorType         4

      bInterfaceNumber        0

      bAlternateSetting       0

      bNumEndpoints           2

      bInterfaceClass         8 Mass Storage

      bInterfaceSubClass      6 SCSI

      bInterfaceProtocol     80 Bulk (Zip)

      iInterface              0 

      Endpoint Descriptor:

        bLength                 7

        bDescriptorType         5

        bEndpointAddress     0x81  EP 1 IN

        bmAttributes            2

          Transfer Type            Bulk

          Synch Type               None

          Usage Type               Data

        wMaxPacketSize     0x0200  1x 512 bytes

        bInterval               0

      Endpoint Descriptor:

        bLength                 7

        bDescriptorType         5

        bEndpointAddress     0x02  EP 2 OUT

        bmAttributes            2

          Transfer Type            Bulk

          Synch Type               None

          Usage Type               Data

        wMaxPacketSize     0x0200  1x 512 bytes

        bInterval               0

```

----------

## eccerr0r

I think I have the same adaptor  :Smile:   But mine's "ByteCC" branded and works fine...

However I've found that the chipset on my adaptor does not support every single disk out there.  I don't know if it's your case, but all my 2.1G and smaller disks (2.1G WD, two 400MB Conners, 1 40MB Seagate) do not work on this adaptor and show the exact same behavior - my 40MB disk gets reported as a "very large disk" and chokes.  Swapping that for a "tiny" 20GB disk and it works fine.  Tested also with my 60G disk, also works fine.

WD 2420F ... sure it's not a 400MB disk?

----------

## buzzoneandonly

 *eccerr0r wrote:*   

> WD 2420F ... sure it's not a 400MB disk?

 

Yes it is a 400 MB drive. I tested this old drive and a 160GB drive so far. Both have the same behavior but work with windows.

----------

## NeddySeagoon

buzzoneandonly,  eccerr0r

It looks like you need this patch for your kernel.

Its not in gentoo-sources-2.6.19-r4 anyway.

Post back if you are not sure how to apply it

----------

## buzzoneandonly

thank youuuuuuuuuuuuuu!!!!!!!!!!!

----------

## eccerr0r

I must have a different issue, the one I have looks like:

Bus 004 Device 011: ID 05e3:0702 Genesys Logic, Inc. USB 2.0 IDE Adapter

  idVendor           0x05e3 Genesys Logic, Inc.

  idProduct          0x0702 USB 2.0 IDE Adapter

  iManufacturer           0 

  iProduct                1 USB TO IDE

I just verified my 2.1G WD disk actually does work and not as I said before, but I haven't tried a smaller disks in a while...

Oh well, no big deal, I can live without the small disks  :Smile: 

----------

## NeddySeagoon

eccerr0r,

gentoo-sources-2.6.19-r4 has an UNUSUAL_DEV for your adaptor.

Look in your kernel sources at /usr/src/linux/drivers/usb/storage/unusual_devs.h for an entry 

```
UNUSUAL_DEV(  0x05e3, 0x0702, 0x0000, 0xffff,

                "Genesys Logic",

                "USB to IDE Disk",

                US_SC_DEVICE, US_PR_DEVICE, NULL,

                US_FL_GO_SLOW | US_FL_MAX_SECTORS_64 ),

```

if its missing, add it and rebuild your kernel.

----------

## kalle2

I have the same device.

When I plug it in the disk begins to spin, but dmesg does not react - with every disk i tried.

I use 2.6.20-gentoo-r8 and USB-Storage with Stick and Camera works without problem.

Edit: Google and Forum search did only reveal information for an older Kernel Patch for unusual devices. 

My /usr/src/linux/drivers/usb/storage/unusual_devs.h looks as described by NeddySeagoon above, so I suppose the missing patch is not my problem.

----------

