Bug 105878

Summary: multiple dirs in /media for USB floppy
Product: [openSUSE] SUSE LINUX 10.0 Reporter: Glenn Holmer <gholmer>
Component: KernelAssignee: Olaf Hering <ohering>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Major    
Priority: P5 - None CC: ihno
Version: Beta 2   
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: syslog extract
lshal output
content of /proc/bus/usb/devices
contents of /proc/bus/usb/devices

Description Glenn Holmer 2005-08-19 15:25:08 UTC
I connected a USB floppy drive to my Thinkpad T40, and ten different floppy_n
directories were created in /media, subfs-mounted to /dev/sdb, /dev/sdc, etc.
Comment 1 Danny Al-Gaaf 2005-08-20 13:15:06 UTC
I can't reproduce this. Please do this:

* rchal stop
* umount /media/floppy_* (until all are unmounted)
* rm /media/floppy_* -r
* unplug the USB device and reboot the machine
* after reboot: plug the device in and insert a floppy
* whait some seconds and attach to this bug (if there are now more then one 
  floppy drives):
  * /var/log/messages (since the reboot)
  * output of lshal (e.g. 'lshal > /tmp/log_lshal'
Comment 2 Glenn Holmer 2005-08-20 15:34:50 UTC
Created attachment 46764 [details]
syslog extract
Comment 3 Glenn Holmer 2005-08-20 15:35:31 UTC
Created attachment 46765 [details]
lshal output
Comment 4 Glenn Holmer 2005-08-20 15:41:57 UTC
Attachments 16764 and 16765 were created by plugging in the USB floppy with no
diskette, then inserting a diskette after things had settled.  If I plug it in
with a diskette, I see similar messages in the log (multiple /dev/sdn devices
created), but there are no floppy_n directories in /media.  I can provide that
log as well if you need it.

This is what I see in /media:

root@orac:/media # ls -l
total 4
drwxr-xr-x  11 root root  141 Aug 20 10:23 .
drwxr-xr-x  19 root root 4096 Aug 20 05:21 ..
drwxr-xr-x   2 root root    6 Aug 17 18:27 cdrecorder
drwxrwxrwx   1 root root    0 Aug 20 10:23 floppy
drwxrwxrwx   1 root root    0 Aug 20 10:23 floppy_1
drwxrwxrwx   1 root root    0 Aug 20 10:23 floppy_2
drwxrwxrwx   1 root root    0 Aug 20 10:23 floppy_3
drwxrwxrwx   1 root root    0 Aug 20 10:23 floppy_4
drwxrwxrwx   1 root root    0 Aug 20 10:23 floppy_5
drwxrwxrwx   1 root root    0 Aug 20 10:23 floppy_6
drwxrwxrwx   1 root root    0 Aug 20 10:23 floppy_7
root@orac:/media #
Comment 5 Danny Al-Gaaf 2005-08-20 15:58:47 UTC
The kernel generates 8 floppy devices, HAL only react on this new devices and 
mount them. Looks like the kernel generate for each LUN a new device. I reassign 
this to kernel 
Comment 6 Olaf Hering 2005-08-23 09:49:56 UTC
can you paste the output of /proc/bus/usb/devices? This drive needs an entry in
the unusual_devs.h of usb-storage.
Comment 7 Glenn Holmer 2005-08-23 11:35:02 UTC
Created attachment 47177 [details]
content of /proc/bus/usb/devices
Comment 8 Olaf Hering 2005-08-23 16:40:33 UTC
try ftp.suse.com/pub/people/olh/kernel/bug105878/

it has an entry in the unusual_devs.h table.

+UNUSUAL_DEV(  0x0424, 0x0fdc, 0x0210, 0x0210,
+               "SMSC",
+               "FDC GOLD-2.30",
+               US_SC_DEVICE, US_PR_DEVICE, NULL,
+               US_FL_SINGLE_LUN ),
Comment 9 Glenn Holmer 2005-08-24 01:34:58 UTC
That solves it, thanks. I now see only /media/floppy.

Comment 10 Olaf Hering 2005-08-24 06:26:33 UTC
thanks for testing, patch is in cvs, sent it also to the usb-storage list.
Comment 11 Glenn Holmer 2005-08-24 16:33:07 UTC
I tested another USB floppy at work (NEC) and found that it did the same thing.
 I'll attach /proc/bus/usb/devices again.
Comment 12 Glenn Holmer 2005-08-24 16:34:09 UTC
Created attachment 47439 [details]
contents of /proc/bus/usb/devices
Comment 13 Olaf Hering 2005-08-26 10:46:21 UTC
there are new kernels in the same dir.
Comment 14 Glenn Holmer 2005-08-28 15:13:39 UTC
kernel-default-2.6.13_rc7_git1-20050826_bug105878.i586.rpm in that directory
works correctly with both USB floppy drives, thanks.
Comment 15 Olaf Hering 2005-08-28 16:02:36 UTC
new patch is now in cvs, thanks for testing.