Click to See Complete Forum and Search --> : Linux and USB


Norman Graham
08-25-2004, 11:48 AM
Hi all

This is the second time I've posted a non-PHP Linux question and I realize I'm really pushing my luck. I beg your indulgence and, on receipt of a clear yes/no answer, will desist from this annoying habit for - oh - at least several months.

Can anyone tell me whether kernel 2.4 (2.4.21-99-athlon in my case, dated 23rd Sept. 2003) fully supports USB 2.0? I suspect it doesn't and cannot seem to access my USB 2.0 memory stick, despite a correct mount statement (mount -t usbdevfs /dev/sda /media/flashdrive). The stick is recognized as /dev/sda and I can mount it, but I can't access the files - I just see some empty numbered directories and two "items" called "devices" and "drivers". I don't have a 1.1 stick to test whether that works.

I'm not worried about the stick, but I'm about to get into WLAN and I really need to know whether kernel 2.4 supports USB 2.0 before making my hardware decisions - PCI or USB adapter.

I'd be happy to update to 2.6, but I'm unsure how to go about this and what preparations and steps I need to go through.

Thanks for your patience and understanding

Norm :D

(running SuSe 9.0 Pro)

MarkR
08-25-2004, 07:14 PM
usbdevfs is not the right type of filesystem for a USB memory stick device. usbdevfs is a "fake" filesystem normally used internally by the system, you should not need to mount it.

In principle such a device can have any filesystem, but in practice they're usually FAT.

Try -t vfat instead, or leave the -t off altogether to see if it can auto-detect. vfat will auto-detect if it's fat16 or fat32.

Mark

Norman Graham
08-26-2004, 04:12 AM
Hi Mark

Thanks for the tip. I had a look at /etc/fstab and saw that usbdevfs is in fact reserved for proc/bus/usb - what I was doing was mounting /proc/bus/usb and then seeing the useless gobbledegook that that produced. Thanks for pointing that out.

I've since entered the following line into fstab:


/dev/sda /media/flashdrive auto sync,noauto,user,exec 0 0


This produces a nice little desktop icon ... but it still produces an error message (this is not a block-oriented device) when I try to open it. What the f**k? My thinking is that, while kernel 2.4 can recognize USB 2.0, it can't access it. Others have suggested as much but no one seems to know for sure. A friend is lending me a 1.1 stick today and I'll give that a try. As I say, I'd be happy to update to 2.6, but I'm a little out of my depth. The stick is not my main worry - I need to know whether 2.4 is happy with USB 2.0 because I'm about to get into WLAN and was hoping to use a USB adapter with Linuxant rather than a PCI card, simply for portability.

If you have any more info, I'd be grateful for it.

Thanks

Norm

MarkR
08-26-2004, 06:29 AM
Even if it doesn't support USB2, my understanding is that it will use old versions of USB, as USB is backwards compatible. Therefore the device will still work at a somewhat lower transfer rate.

It's possible that you don't have the relevant driver installed - I'm not sure how SuSE sets up loading drivers - anyway, the USB mass storage driver has to be installed in order for it to work. This driver is probably already present in your system, but somehow not installed.

Try pasting the output of cat /proc/scsi/scsi with the device plugged in.

Also past the last few lines of output of the kernel log here (can be seen with dmesg)

Mark

Norman Graham
08-26-2004, 07:54 AM
Thanks for that Mark - that's very useful. I'm at work at the moment, but I'll paste those two outputs from home as soon as I can.

Norm

Norman Graham
08-27-2004, 04:45 AM
Me again

I didn't have time to get that output this morning, but I did have time to quickly stick a USB 1.1 device into the socket just to see what happened. Result: instant hotplug success and an appropriate entry under fstab. Interestingly, the entry was for /dev/sda1 and not just /dev/sda.

So ... it looks like SuSe needs help with USB 2.0. Perhaps there's a module on the distro CDs that could fix this. I will check and paste those outputs this evening.


Curiouser and curiouser ...

Norm

Norman Graham
08-27-2004, 09:48 AM
Hi Mark

You might be interested in this little article (http://portal.suse.com/sdb/en/2004/01/USB_2_0.html). Judging by the ease with which USB 1.1 loads, I strongly suspect that this article provides the solution - namely. that you have to tell the kernel to prioritize USB 2.0. I'll be checking it out this evening.

Cheers

Norm

Norman Graham
08-30-2004, 03:50 AM
Hi Mark

Adding echi-hcd to the modules loaded on boot made no difference :(

Here, however, is the output of cat /proc/scsi/scsi

Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: ATAPI Model: CD-RW 52X24 Rev: F.JZ
Type: CD-ROM ANSI SCSI revision: 02
Host: scsi1 Channel: 00 Id: 00 Lun: 00
Vendor: USB Model: Flash Disk Rev: 2.00
Type: Direct-Access ANSI SCSI revision: 02

And here is the output of dmesg:

#The following line x several dozen
sr0: CDROM not ready. Make sure there is a disc in the drive.

#The following line x 10
ALSA via82xx.c:704: invalid via82xx_cur_ptr, using last valid pointer

I'm assuming the ALSA line refers to the flashdrive. Does this tell you anything?

Thanks

Norm