Gentoo Archives: gentoo-user

From: Paul Hartman <paul.hartman+gentoo@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] USB mass storage device slow in Gentoo, fast in Windows...?
Date: Sun, 27 Dec 2009 00:06:19
Message-Id: 58965d8a0912261454j7624694bm4267fdfc770c38f3@mail.gmail.com
1 Hi,
2
3 I got a Nokia N900 linux internet tablet/phone a few days ago, and
4 when I connect it in USB Mass Storage mode to a Windows Vista computer
5 I can write at 17MB/sec, but when I connect it to my Gentoo box my
6 writes are really slow, between 500-900kb/sec depending on if I mount
7 in "sync" mode or not. As far as I know it should be just a totally
8 standard/generic mass storage device. (there were no drivers or
9 software install needed in windows, it just worked)
10
11 Other USB devices plugged into the same port go full speed, and AFAIK
12 everything appears as if it should be high speed USB 2.0. Has anyone
13 seen something like this before? I'm not sure what the deal is. It
14 takes 20 minutes to copy 1 gigabyte from Linux and takes just under 1
15 minute to do the same in Windows.
16
17 I'm not sure about debugging USB or what the options are. Everything
18 I've used previously has worked without any hassle.
19
20 lsusb -vv output for this device:
21
22 Bus 001 Device 031: ID 0421:01c7 Nokia Mobile Phones
23 Device Descriptor:
24 bLength 18
25 bDescriptorType 1
26 bcdUSB 2.00
27 bDeviceClass 0 (Defined at Interface level)
28 bDeviceSubClass 0
29 bDeviceProtocol 0
30 bMaxPacketSize0 64
31 idVendor 0x0421 Nokia Mobile Phones
32 idProduct 0x01c7
33 bcdDevice 3.16
34 iManufacturer 1 Nokia
35 iProduct 2 N900 (Storage Mode)
36 iSerial 3 (censored)
37 bNumConfigurations 2
38 Configuration Descriptor:
39 bLength 9
40 bDescriptorType 2
41 wTotalLength 32
42 bNumInterfaces 1
43 bConfigurationValue 1
44 iConfiguration 4 Max power
45 bmAttributes 0x80
46 (Bus Powered)
47 MaxPower 500mA
48 Interface Descriptor:
49 bLength 9
50 bDescriptorType 4
51 bInterfaceNumber 0
52 bAlternateSetting 0
53 bNumEndpoints 2
54 bInterfaceClass 8 Mass Storage
55 bInterfaceSubClass 6 SCSI
56 bInterfaceProtocol 80 Bulk (Zip)
57 iInterface 6 Mass Storage
58 Endpoint Descriptor:
59 bLength 7
60 bDescriptorType 5
61 bEndpointAddress 0x81 EP 1 IN
62 bmAttributes 2
63 Transfer Type Bulk
64 Synch Type None
65 Usage Type Data
66 wMaxPacketSize 0x0200 1x 512 bytes
67 bInterval 0
68 Endpoint Descriptor:
69 bLength 7
70 bDescriptorType 5
71 bEndpointAddress 0x01 EP 1 OUT
72 bmAttributes 2
73 Transfer Type Bulk
74 Synch Type None
75 Usage Type Data
76 wMaxPacketSize 0x0200 1x 512 bytes
77 bInterval 1
78 Configuration Descriptor:
79 bLength 9
80 bDescriptorType 2
81 wTotalLength 32
82 bNumInterfaces 1
83 bConfigurationValue 2
84 iConfiguration 5 Self-powered
85 bmAttributes 0xc0
86 Self Powered
87 MaxPower 100mA
88 Interface Descriptor:
89 bLength 9
90 bDescriptorType 4
91 bInterfaceNumber 0
92 bAlternateSetting 0
93 bNumEndpoints 2
94 bInterfaceClass 8 Mass Storage
95 bInterfaceSubClass 6 SCSI
96 bInterfaceProtocol 80 Bulk (Zip)
97 iInterface 6 Mass Storage
98 Endpoint Descriptor:
99 bLength 7
100 bDescriptorType 5
101 bEndpointAddress 0x81 EP 1 IN
102 bmAttributes 2
103 Transfer Type Bulk
104 Synch Type None
105 Usage Type Data
106 wMaxPacketSize 0x0200 1x 512 bytes
107 bInterval 0
108 Endpoint Descriptor:
109 bLength 7
110 bDescriptorType 5
111 bEndpointAddress 0x01 EP 1 OUT
112 bmAttributes 2
113 Transfer Type Bulk
114 Synch Type None
115 Usage Type Data
116 wMaxPacketSize 0x0200 1x 512 bytes
117 bInterval 1
118 Device Qualifier (for other device speed):
119 bLength 10
120 bDescriptorType 6
121 bcdUSB 2.00
122 bDeviceClass 0 (Defined at Interface level)
123 bDeviceSubClass 0
124 bDeviceProtocol 0
125 bMaxPacketSize0 64
126 bNumConfigurations 2
127 Device Status: 0x0000
128 (Bus Powered)
129
130
131
132 dmesg output when it is plugged in:
133
134 [2920730.031010] usb 1-4: new high speed USB device using ehci_hcd and
135 address 31
136 [2920730.146451] usb 1-4: New USB device found, idVendor=0421, idProduct=01c7
137 [2920730.146455] usb 1-4: New USB device strings: Mfr=1, Product=2,
138 SerialNumber=3
139 [2920730.146458] usb 1-4: Product: N900 (Storage Mode)
140 [2920730.146460] usb 1-4: Manufacturer: Nokia
141 [2920730.146462] usb 1-4: SerialNumber: (censored)
142 [2920730.146540] usb 1-4: configuration #1 chosen from 2 choices
143 [2920730.148268] scsi27 : SCSI emulation for USB Mass Storage devices
144 [2920730.148342] usb-storage: device found at 31
145 [2920730.148345] usb-storage: waiting for device to settle before scanning
146 [2920735.150436] scsi 27:0:0:0: Direct-Access Nokia N900
147 031 PQ: 0 ANSI: 2
148 [2920735.150567] sd 27:0:0:0: Attached scsi generic sg7 type 0
149 [2920735.155882] sd 27:0:0:0: [sdg] Attached SCSI removable disk
150 [2920735.156449] usb-storage: device scan complete
151 [2920741.306353] sd 27:0:0:0: [sdg] 56631296 512-byte logical blocks:
152 (28.9 GB/27.0 GiB)
153 [2920741.306721] sd 27:0:0:0: [sdg] Assuming drive cache: write through
154 [2920741.307970] sd 27:0:0:0: [sdg] Assuming drive cache: write through
155 [2920741.307972] sdg:
156
157
158 And I mounted with these options:
159 /dev/sdg /mnt/usb vfat
160 user,sync,umask=1000,rw,noauto,check=relaxed 0 0
161
162
163 thanks
164 paul

Replies

Subject Author
Re: [gentoo-user] USB mass storage device slow in Gentoo, fast in Windows...? Hung Dang <hungptit@×××××.com>