David Meggy wrote:

On Fri, 2004-06-04 at 13:57, Brad Parker wrote:
...
I'm seeing a bug in 2.4.22 and 2.4.23 where

- plug in usb disk "stick" #1; mount, works fine, unmount
- remove usb disk "stick" #1
- insert usb disk "stick" #2
- device is recognized, kernel printk's look good
- mount fails, fdisk fails, i/o errors reading device
- remove  usb disk "stick" #2
- insert  usb disk "stick" #1, mount, works fine, unmount

Note that this recipe is not disk dependent.  Basically the first disk
works forever and no other disk will ever work (until I reboot).

Is this a known bug?

I found the problem is host controller independant.

I diff'd 2.4.22 and 2.4.26 and there does not seem to be a fix for this.
Just thought I'd ask before I dove into it...

I noticed some reports of this on other lists with "just rmmod/insmod
usb storage" as the solution :-(

-brad


I don't know your level of knowledge of Linux, but its best to go over
simple things first.  Sometimes it is best to just cut and paste what
you typed on the command line.  The reason I came up with my original
question is that I had a customer that didn't realize that the different
mass storage devices kept getting higher scsi device numbers.  They were
trying to use the same entry in the fstab file which of course didn't
work.  Just verifying that you aren't trying to use /dev/sda when it
doesn't exist anymore and /dev/sdb is where you should be looking.

I know this. After remove and insert a other device the usb-storage need a rescan of partions.

A simple good fix are one or two dummy reads from sector 0 (MBR) in
after remove _and_ before mount the next device.
This will clear all error status and get a "drive not exist" in
scsi-driver. The next "mount" reads a good pation table.

This Dummy-Read receive an error (or somtimes not), but the mount works
correctly. I use this in all my hotplug functions.

After remove #1:
 umount /dev/sda...
 sleep 1
 dd if=/dev/sda of=/dev/null bs=512 count=1

After insert device #2:
 sleep 1
 dd if=/dev/sdb of=/dev/null bs=512 count=1
 mount /dev/sdb ...

The best way is rmmod/insmod usb-storrage. So you have always sda for
both devices.

Henry N.








------------------------------------------------------- This SF.Net email is sponsored by: GNOME Foundation Hackers Unite! GUADEC: The world's #1 Open Source Desktop Event. GNOME Users and Developers European Conference, 28-30th June in Norway http://2004/guadec.org _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to