# [solved] USB storage devices and CardBus USB 2.0 card

## tassilo80

Hi all,

My laptop doesn't have USB 2.0 slots which is quite annoying if you use USB mass storage devices. So I bought such a nice CardBus USB 2.0 card and enabled ehci-hcd in my kernel.

When I now attach the card in my PCMCIA-slot I get the following dmesg-output:

```
root@inspiron> dmesg                                                          ~

PCI: Enabling device 0000:07:00.0 (0000 -> 0003)

ACPI: PCI Interrupt 0000:07:00.0[A] -> Link [LNKD] -> GSI 11 (level, low) -> IRQ 11

uhci_hcd 0000:07:00.0: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (#3)

uhci_hcd 0000:07:00.0: new USB bus registered, assigned bus number 3

uhci_hcd 0000:07:00.0: irq 11, io base 0x0000e800

hub 3-0:1.0: USB hub found

hub 3-0:1.0: 2 ports detected

PCI: Enabling device 0000:07:00.1 (0000 -> 0003)

ACPI: PCI Interrupt 0000:07:00.1[A] -> Link [LNKD] -> GSI 11 (level, low) -> IRQ 11

uhci_hcd 0000:07:00.1: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (#4)

uhci_hcd 0000:07:00.1: new USB bus registered, assigned bus number 4

uhci_hcd 0000:07:00.1: irq 11, io base 0x0000e820

hub 4-0:1.0: USB hub found

hub 4-0:1.0: 2 ports detected

PCI: Enabling device 0000:07:00.2 (0000 -> 0002)

ACPI: PCI Interrupt 0000:07:00.2[A] -> Link [LNKD] -> GSI 11 (level, low) -> IRQ 11

ehci_hcd 0000:07:00.2: VIA Technologies, Inc. USB 2.0 (#2)

ehci_hcd 0000:07:00.2: new USB bus registered, assigned bus number 5

ehci_hcd 0000:07:00.2: irq 11, io mem 0xf4800200

ehci_hcd 0000:07:00.2: USB 2.0 initialized, EHCI 1.00, driver 10 Dec 2004

hub 5-0:1.0: USB hub found

hub 5-0:1.0: 4 ports detected
```

Looks ok, right?

But If I now attach my iRiver into one of the CardBus USB 2.0 card's slots nothing happens. Loading the usb-storage module manually doesn't help - there's still no /dev/sda. 

When I attach it to my laptop's normal USB 1.1 ports the usb-storage module gets automatically loaded and /dev/sda is created.

My system has a 2.6.12 kernel and uses udev.

```
root@inspiron> grep "^[^#].*USB" .config                         /usr/src/linux

CONFIG_USB_ARCH_HAS_HCD=y

CONFIG_USB_ARCH_HAS_OHCI=y

CONFIG_USB=m

CONFIG_USB_DEVICEFS=y

CONFIG_USB_BANDWIDTH=y

CONFIG_USB_EHCI_HCD=m

CONFIG_USB_UHCI_HCD=m

CONFIG_USB_STORAGE=m

CONFIG_USB_HID=m

CONFIG_USB_HID_MOUSE_POLLING_INTERVAL=0

CONFIG_USB_HIDINPUT=y

CONFIG_USB_MON=m
```

Why? What can I do? I've never worked with USB 2.0 so far, so I don't have any experiences...

Regards and much thanks in advance,

TassiloLast edited by tassilo80 on Wed Nov 02, 2005 8:18 am; edited 1 time in total

----------

## Sadako

I've been using a cardbus usb 2.0 card for the same reason, but I've never had any problems with it.

Here's my output from grep "^[^#].*USB" .config, if it's of any help. (gentoo-sources 2.6.11-r11)

```
CONFIG_USB=y

CONFIG_USB_DEVICEFS=y

CONFIG_USB_ARCH_HAS_HCD=y

CONFIG_USB_ARCH_HAS_OHCI=y

CONFIG_USB_EHCI_HCD=m

CONFIG_USB_OHCI_HCD=m

CONFIG_USB_UHCI_HCD=m

CONFIG_USB_ACM=m

CONFIG_USB_PRINTER=m

CONFIG_USB_STORAGE=m

CONFIG_USB_HID=m

CONFIG_USB_HIDINPUT=y
```

----------

## tassilo80

Oh! There was a cable sent with the CardBus USB 2.0 card which can be connected from the card to an USB slot (The side connected to the CardBus card is a round plug with a hole in it. Sorry, don't know the name). 

I attached it (CardBus USB 2.0 card <---> USB 1.1 port on my notebook) and now I get this when attaching my iRiver to the CardBus card:

```
usb 5-4: new high speed USB device using ehci_hcd and address 2

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 2

usb-storage: waiting for device to settle before scanning
```

File transfers work, but with approimately 115 KB/s. That's the same speed I get with USB 1.1. The iRiver (IFP 899) should use USB 2.0 if one believes its user manual...

Why isn't my USB 2.0 as fast as it could be?

Regards,

Tassilo

----------

## Sadako

The cable you're describing sounds like a dc connecter to supply more power to the cardbus card.

Some usb powered devices require more power than cardbus was designed to provide. I have the same thing, but only need it for a usb hard drive.

The iriver should be able to still use battery power when connected to usb, so this shouldn't effect it, and it doesn't explain the low tansfer rates you're getting.

Can you try connecting the usb-power cable to the usb port of another system, to see if this helps?

----------

## tassilo80

 *Hopeless wrote:*   

> The cable you're describing sounds like a dc connecter to supply more power to the cardbus card. 
> 
> Some usb powered devices require more power than cardbus was designed to provide. I have the same thing, but only need it for a usb hard drive. 

 

That was my first thought, too. But I got curious because the iRiver has a full battery. Nevertheless, without the cable it won't be recognized at all.

 *Hopeless wrote:*   

> Can you try connecting the usb-power cable to the usb port of another system, to see if this helps?

 

Yes, I can. But at least not today. *totally busy*

Well, suppose it would work then with full speed. What would you say causes this problem and how to solve it? Attaching the cable to another PC everytime is not very comfortable...

And now suppose it would be as slow as it is when connecting to an USB 1.1 port of my notebook. Any ideas what could cause the slowdown then?

Thanks,

Tassilo

----------

## tassilo80

Short addition:

As I mentioned I can upload files to my iRiver with about 120 KB/s. But downloads work with about 1,4 MB/s. That's quite a difference.

Any comments?

----------

## tassilo80

Hey, I got it!

It wasn't USB's or mass-storages fault!

The real problem:

USB 2.0 will slow down extremely when writing to an (USB) device with vfat if you mount it with the "sync"-option. Unfortunately HAL exactly did this if the device was smaller than 2 GB. So I had to edit the file /usr/share/hal/fdi/90defaultpolicy/storage-policy.fdi and made this changes:

```

          <!-- Use noatime and sync options for all hotpluggable or removable

               volumes smaller than 2GB -->

          <match key="volume.size" compare_lt="2147483648">

            <match key="@block.storage_device:storage.hotpluggable" bool="true">

                                                            <!-- Was true before -->

              <merge key="volume.policy.mount_option.sync" type="bool">false</merge> 

              <merge key="volume.policy.mount_option.noatime" type="bool">true</merge>

            </match>

            <match key="@block.storage_device:storage.removable" bool="true">

                                                            <!-- Was true before -->

              <merge key="volume.policy.mount_option.sync" type="bool">false</merge>

              <merge key="volume.policy.mount_option.noatime" type="bool">true</merge>

            </match>

          </match>

```

Now I can transfer with much higher speeds (~ 4 MB/s). The only thing is that it takes a while to umount the device.

Regards,

Tassilo

----------

## martindv

taking this option out of the mounting profile, should i have any care after writting and unplugging the usbdisk?, i mean, should i do any operation appart from click "safty remove hardware" in KDE? does this affect another device such as cdr.cdrw.dvd or dvdrw?

this only affect usb storage devices?

what will happen if i unpplug the without do "safe remove hardware"?

Thanks in advance!

----------

## tassilo80

 *martindv wrote:*   

> taking this option out of the mounting profile, should i have any care after writting and unplugging the usbdisk?, i mean, should i do any operation appart from click "safty remove hardware" in KDE? does this affect another device such as cdr.cdrw.dvd or dvdrw?

 

I don't know if it affects other devices. But I think you won't have any problems if you always say "safty romove hardware".

 *martindv wrote:*   

> what will happen if i unpplug the without do "safe remove hardware"?

 

Removing device without umounting them may corrupt you data, so don't do it.

Regards,

Tassilo

----------

## martindv

Well many thanks for the data.. i alreday tried it and it goes really fast. The only problem is that it takes a while when you "safty remove hardware".

I will keep testing it.

Many Thanks

----------

