From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040518 Firefox/0.8 Description of problem: My FujiFilm FinePix 3800 Digital Camera is not added to fstab as it should be upon insert (yet strangely it's removed just fine...) The entry in updfstab.conf.default is: device camera { partition 1 match hd DSC match hd CAMERA match hd USB-DRIVEUNIT match hd PENTAX match hd PSC } The following fixes it for me: --- kudzu-1.1.67/updfstab.c 2004-03-11 18:26:15.000000000 -0600 +++ kudzu-modded/updfstab.c 2004-05-27 01:41:43.679101496 -0600 @@ -358,7 +358,7 @@ kudzuDevices = readDevices("/etc/sysconfig/hwconf"); } else { kudzuDevices = probeDevices(CLASS_CDROM | CLASS_HD | CLASS_FLOPPY, - BUS_IDE | BUS_SCSI | + BUS_IDE | BUS_SCSI | BUS_USB | BUS_MISC | BUS_FIREWIRE, 0); } if (!kudzuDevices) return 0; Version-Release number of selected component (if applicable): kudzu-1.1.67-1 How reproducible: Always Steps to Reproduce: 1.Connect a FujiFilm 3800 FinePix Digital Camera to a USB port 2. 3. Additional info:
That's not the right fix. What sort of SCSI device does it show up as?
usb 1-2: new full speed USB device using address 3 Initializing USB Mass Storage driver... scsi0 : SCSI emulation for USB Mass Storage devices Vendor: FUJIFILM Model: USB-DRIVEUNIT Rev: 1.00 Type: Direct-Access ANSI SCSI revision: 02 Attached scsi generic sg0 at scsi0, channel 0, id 0, lun 0, type 0 USB Mass Storage device found at 3 usbcore: registered new driver usb-storage USB Mass Storage support registered. SCSI device sda: 256000 512-byte hdwr sectors (131 MB) sda: assuming Write Enabled sda: assuming drive cache: write through sda: sda1 Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0 [root@cobra root]# lsusb Bus 002 Device 001: ID 0000:0000 Bus 001 Device 003: ID 04cb:011a Fuji Photo Film Co., Ltd FinePix S304/3800 Bus 001 Device 002: ID 03f0:1904 Hewlett-Packard DeskJet 3820 Bus 001 Device 001: ID 0000:0000 [root@cobra root]#
Hm, so the correct match would be something like 'FUJIFILM USB-DRIVEUNIT'. If you add *that* to updfstab.conf.default, does it work without the kudzu patch?
It does not. Tried with or without the quotes. device camera { partition 1 match hd DSC match hd CAMERA match hd USB-DRIVEUNIT match hd "FUJIFILM USB-DRIVEUNIT" match hd PENTAX match hd PSC } When I was trying to find the bug probe_devices was returning my printer and my hard drives, not my camera. That's why I made it look at the USB bus. I see you want it looking at SCSI but that doesn't enumerate it. If I remember the source correctly probe_devices is unaffected by the config file, but you'd know best. One more thing - starting kudzu (as in /etc/init.d/kudzu start while the camera is on) detects the camera - I guess I should have mentioned this, but I forgot.
Furthermore this is not the redhat kernel. This is vanilla 2.6.7-rc1, but this should be irrelevant as I have all the necessary modules to make this device works (and it does work - it's just not added to fstab properly)
What does 'kudzu -p -b scsi' with the camera inserted say?
It says: [root@cobra root]# kudzu -p -b scsi - class: HD bus: SCSI detached: 0 device: sda driver: ignore desc: "Fujifilm USB-DRIVEUNIT" host: *(see below) id: 0 channel: 0 lun: 0 generic: sg0 [root@cobra root]# * starts at 0 and increases every time the camera's turned on. Resets at 0 when scsi_mod is removed and re-insmoded. Furthermore, if I remove sd_mod, sg, and usb_storage, the first time I turn on the camera afterwards makes it appear in nautilus and adds it to fstab. Afterwards it stops working until I remove the modules again. If I just remove sd_mod and sg it doesn't work - seems I have to remove usb_storage. Just discovered this...btw I am using the official Fedora kernel to test now - this one is .403. Settled for good 2D performance with vanilla kernel at the expence of 3D :)
Is the camera device partitioned? match hd USB-DRIVEUNIT should work, assuming the partitions match.
This is what fdisk says about it: ================================= Disk /dev/sda: 131 MB, 131072000 bytes 16 heads, 32 sectors/track, 500 cylinders Units = cylinders of 512 * 512 = 262144 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 500 127976+ 6 FAT16 It does work...the first time...and then it doesn't work after that until I modprobe usb-storage out or start kudzu via the rc script.
It's a timing issue. /proc/scsi/scsi is read too fast in scsiProbe and the camera's missed. A sleep(1) before it's read fixes it. What does that mean - what has to be fixed?
Is the kernel supposed to update proc before triggering the hotplug event? Should I email Greg KH and ask?
You can check. What I'm guessing happens is we get hotplug events for the usb attach, but not for the disk, etc.
Greg KH wrote: > On Wed, Jun 02, 2004 at 01:36:09PM -0400, Bill Nottingham wrote: > >>Greg KH (greg) said: >> >>>On Tue, Jun 01, 2004 at 01:32:22PM -0600, Ivan Gyurdiev wrote: >>> >>>>Fedora's updfstab tool (part of kudzu) is trigged by hotplug to >>>>add/remove things from fstab, such as my Fujifilm Digital Camera >>>>(usb-storage, scsi emulation). However... it reads /proc/scsi/scsi, and >>>>doesn't work as it should because it's triggered before /proc/scsi/scsi >>>>is updated most of the time. Where is the bug, and how should this race >>>>be corrected? >>> >>>The race should be fixed by having the hotplug script wait around for >>>the proc file to show up. >> >>Hm, as I was thinking, the hotplug event is triggered by the USB >>insertion; what's really needed for updfstab is that it gets >>run triggered on the *scsi* device creation. Or is this the proc >>file you're referring too? > > > Yes, good point, you should update the fstab after the device node is > created. You can learn of that by putting your script in the > /etc/dev.d/ directory tree. > > thanks, Well I'm rather confused as to how this would work exactly, but I take it you have enough information (from me) to correct the bug? Email if you need me to test anything...
Well, Greg's reply implies the use of udev, which isn't in use by default in FC2.
Well, I don't know what should be done. You're the developer - I can just say that it doesn't work properly the way it is now. Good luck. I.G. P.S. It would be nice for FC2 to start using udev. I hope it's integrated into core soon.
What's the status of this bug after udev integration. I don't have the camera right now to retest anything, but if the bug no longer applies it should be closed.
Yeah, with udev, this is all handled by HAL and gnome-volume-manager. Please open a bug against HAL if this fails there.