LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 10-15-2005, 12:42 PM   #1
PhobosK
LQ Newbie
 
Registered: Dec 2004
Distribution: OpenSUSE Tumbleweed
Posts: 7

Rep: Reputation: 0
Question Transfer speed problem with USB storage devices


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
Code:
128
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
Code:
2.6.13
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.

Last edited by PhobosK; 10-15-2005 at 01:45 PM.
 
Old 10-16-2005, 07:35 AM   #2
PhobosK
LQ Newbie
 
Registered: Dec 2004
Distribution: OpenSUSE Tumbleweed
Posts: 7

Original Poster
Rep: Reputation: 0
Problem solved

Hi,
I found the solution of the problem.
For those that are interested, the solution is to change the mount option for these devices from "sync" to "async". I inserted some policy rules for hal ("volume.policy.mount_option.sync" - false) and everything is OK now.
Of course there are other ways to do it but I leave it to your imagination
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
USB storage devices difficult to mount and use jaakkop Slackware 4 11-16-2005 04:03 PM
Mounting USB storage devices COKE CAN Debian 18 08-02-2005 02:14 AM
usb-storage problem with differing devices ta0kira Slackware 1 11-14-2004 12:09 PM
USB storage devices? Valael Fedora 1 08-17-2004 04:24 PM
usb mass storage devices rukinhas Mandriva 1 11-18-2003 07:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 02:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration