Hi,
I have a strange problem with any usb device that is recognized as usb storage device (KINGMAX usb flash 256M, SONY mp3 player and a couple of others).
When I transfer files FROM the device the speed is ok (around 6-8 M/s), but when I transfer files TO the device the speed is very low - 30-40k/s.
Here is some more information (when the KINGMAX usb flash is plugged in, but the problem is the same with all devices of this kind):
dmesg
Code:
usb 4-1: new high speed USB device using ehci_hcd and address 7
Initializing USB Mass Storage driver...
scsi0 : SCSI emulation for USB Mass Storage devices
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
usb-storage: device found at 7
usb-storage: waiting for device to settle before scanning
Vendor: KINGMAX Model: USB Flash Disk Rev: 2.00
Type: Direct-Access ANSI SCSI revision: 02
Attached scsi generic sg0 at scsi0, channel 0, id 0, lun 0, type 0
usb-storage: device scan complete
sda: Unit Not Ready, sense:
: Current: sense key: Unit Attention
Additional sense: Not ready to ready change, medium may have changed
sda : READ CAPACITY failed.
sda : status=1, message=00, host=0, driver=08
sd: Current: sense key: Unit Attention
Additional sense: Not ready to ready change, medium may have changed
sda: test WP failed, assume Write Enabled
sda: assuming drive cache: write through
sda: Unit Not Ready, sense:
: Current: sense key: Unit Attention
Additional sense: Not ready to ready change, medium may have changed
sda : READ CAPACITY failed.
sda : status=1, message=00, host=0, driver=08
sd: Current: sense key: Unit Attention
Additional sense: Not ready to ready change, medium may have changed
sda: test WP failed, assume Write Enabled
sda: assuming drive cache: write through
sda: Unit Not Ready, sense:
: Current: sense key: Unit Attention
Additional sense: Not ready to ready change, medium may have changed
SCSI device sda: 512000 512-byte hdwr sectors (262 MB)
sda: Write Protect is off
sda: Mode Sense: 03 00 00 00
sda: assuming drive cache: write through
sda: sda1
Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0
lsusb
Code:
Bus 004 Device 007: ID 0ea0:2168 Ours Technology, Inc. Transcend JetFlash 2.0
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 005: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
Bus 003 Device 004: ID 046d:c216 Logitech, Inc.
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 005: ID 066f:4200 SigmaTel, Inc. STIr4200 IrDA Bridge
Bus 002 Device 004: ID 046d:0840 Logitech, Inc. QuickCam Express
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 003: ID 04a9:220d Canon, Inc. CanoScan N670U/N676U/LiDE 20
Bus 001 Device 001: ID 0000:0000
cat /proc/scsi/usb-storage/0
Code:
Host scsi0: usb-storage
Vendor: USB
Product: Flash Disk
Serial Number: None
Protocol: Transparent SCSI
Transport: Bulk
Quirks:
sfdisk -l
Code:
Disk /dev/sda: 1000 cylinders, 16 heads, 32 sectors/track
Units = cylinders of 262144 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/sda1 * 0+ 999 1000- 255984 b W95 FAT32
/dev/sda2 0 - 0 0 0 Empty
/dev/sda3 0 - 0 0 0 Empty
/dev/sda4 0 - 0 0 0 Empty
lsusb -v
Code:
Bus 004 Device 007: ID 0ea0:2168 Ours Technology, Inc. Transcend JetFlash 2.0
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x0ea0 Ours Technology, Inc.
idProduct 0x2168 Transcend JetFlash 2.0
bcdDevice 2.00
iManufacturer 1 USB
iProduct 2 Flash Disk
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 39
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
MaxPower 200mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 3
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
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0002 1x 2 bytes
bInterval 1
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
bNumConfigurations 1
lsmod |grep usb -i
Code:
usb_storage 72832 2
scsi_mod 123432 3 sd_mod,usb_storage,sg
usblp 11008 0
hci_usb 13000 6
bluetooth 42564 17 bnep,rfcomm,l2cap,sco,hci_usb
usbhid 45216 0
usbcore 112252 10 usb_storage,xpad,stir4200,usblp,hci_usb,usbhid,ehci_hcd,quickcam,uhci_hcd
cat /sys/block/sda/device/max_sectors
I've tried to change the "max_sectors":
echo 128 >/sys/block/sda/device/max_sectors
echo 1024 >/sys/block/sda/device/max_sectors
and there was no result.
uname -r
I use Mandriva Linux 2005LE.
Under WinXP and Win98 running on the same machine there's no such problem.
Could someone help me with this problem please.