Home > Linux, Linux 2.6, Programming > Unusual USB Devices in Linux Kernel

Unusual USB Devices in Linux Kernel

December 13th, 2010 Leave a comment Go to comments

Some USB devices (especially cheap ones) are not fully compatible with the USB Stack and when you connect such devices to your target board, the kernel may output errors similar to the one below even though most other devices work perfectly.

sd 3:0:0:0: SCSI error: return code = 0×10070000
end_request: I/O error, dev sda, sector 0
Buffer I/O error on device sda, logical block 0
sd 3:0:0:0: SCSI error: return code = 0×10070000
end_request: I/O error, dev sda, sector 8
Buffer I/O error on device sda, logical block 1
sd 3:0:0:0: SCSI error: return code = 0×10070000
end_request: I/O error, dev sda, sector 16
sd 3:0:0:0: SCSI error: return code = 0×10070000
end_request: I/O error, dev sda, sector 24
sd 3:0:0:0: SCSI error: return code = 0×10070000

It previously happened to us with a IDE to USB adapter based on Super Top Bridge ( VID: 0x14CD / PID: 0×6600).

The Linux kernel has a special file to handle such devices (mass storage class only) called unusual_devs.h in drivers/usb/storage/, where you just need to add your device (with VID/PID) and add relevant flags.

The code for the device above is:

UNUSUAL_DEV(  0x14cd, 0x6600, 0x0201, 0x0201,
              "Super Top",
              "IDE DEVICE",
               US_SC_DEVICE, US_PR_DEVICE, NULL,
               US_FL_IGNORE_RESIDUE ),

This is now part of the kernel tree and a patch is available at https://lists.one-eyed-alien.net/pipermail/usb-storage/2007-February/002890.html.

Please check The unusual_devs.h Guide for full details.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

  1. No comments yet.
  1. No trackbacks yet.