Gentoo Archives: gentoo-user

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

Replies

Subject Author
Re: [gentoo-user] USB mass storage device slow in Gentoo, fast in Windows...? Paul Hartman <paul.hartman+gentoo@×××××.com>