USB drive not getting recognized as scsi device in custom linux kernel

0

I am facing a slow write speed problem with a USB drive in my custom linux kernel. I suspected to be a hardware problem but with the same hardware and Opensuse 12.1 OS, write speed of my USB drive is much faster.

I also observed that there is a significant difference in dmesg output when my USB pen drive is plugged in OpenSuse 12.1 and in my custom kernel.

dmesg in OpenSuse12.1

[  665.417077] usb 2-2: USB disconnect, device number 4
[  668.676014] usb 2-2: new high speed USB device number 5 using ehci_hcd
[  668.812675] usb 2-2: New USB device found, idVendor=0815, idProduct=2002
[  668.812679] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  668.812682] usb 2-2: Product: USBInstallMedia
[  668.812685] usb 2-2: Manufacturer:         
[  668.812687] usb 2-2: SerialNumber: 070B49D39981F580
[  668.813052] scsi7 : usb-storage 2-2:1.0
[  669.813701] scsi 7:0:0:0: Direct-Access              USBDrive  PMAP PQ: 0 ANSI: 6
[  669.813893] sd 7:0:0:0: Attached scsi generic sg2 type 0
[  670.912190] sd 7:0:0:0: [sdc] 62554112 512-byte logical blocks: (32.0 GB/29.8 GiB)
[  670.913182] sd 7:0:0:0: [sdc] Write Protect is off
[  670.913186] sd 7:0:0:0: [sdc] Mode Sense: 23 00 00 00
[  670.914181] sd 7:0:0:0: [sdc] No Caching mode page present
[  670.914185] sd 7:0:0:0: [sdc] Assuming drive cache: write through
[  670.918180] sd 7:0:0:0: [sdc] No Caching mode page present
[  670.918184] sd 7:0:0:0: [sdc] Assuming drive cache: write through
[  670.919112]  sdc: sdc1
[  670.923056] sd 7:0:0:0: [sdc] No Caching mode page present
[  670.923060] sd 7:0:0:0: [sdc] Assuming drive cache: write through
[  670.923063] sd 7:0:0:0: [sdc] Attached SCSI removable disk

dmesg in my Custom kernel:

usb 2-1: new high speed USB device number 3 using ehci_hcd
usb 2-1: New USB device found, idVendor=0815, idProduct=2002
usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 2-1: Product: USBDrive
usb 2-1: Manufacturer:         
usb 2-1: SerialNumber: 070B49D39981F580
 ubb: ubb1

From the dmesg output it looks like my USB device is recognized as scsi device in OpenSuse 12.1 and in my custom kernel it is not recognized as scsi device.

I suspect this could be a possible reason for slow write speed in my custom kernel.. correct me if I am wrong..

And if I want my USB device to be recognized as scsi device do I need to enable any Kernel configuration ? If yes, it would be helpful if anyone can point me what are the kernel configurations should I modify. Thanks.

RBH

Posted 2015-06-07T12:28:13.023

Reputation: 121

Did you enable SCSI in your custom kernel? Check the kernel configuration. There are loads of options which can influence the presence of the driver. – jcoppens – 2015-06-08T04:13:40.640

Thanks.. the problem was, USB drive was using a low performance driver called UB driver.. Disabling the configuration item CONFIG_BLK_DEV_UB in kernel makes my USB drives to be identified as scsi devices... – RBH – 2015-06-11T09:33:53.287

No answers