Why does hal think my USB devices are fixed?
Kevin Oberman
oberman at es.net
Thu Oct 15 04:34:25 UTC 2009
> Date: Wed, 14 Oct 2009 14:38:47 -0600 (MDT)
> From: Warren Block <wblock at wonkity.com>
> Sender: owner-freebsd-current at freebsd.org
>
> On Wed, 14 Oct 2009, Joe Marcus Clarke wrote:
> >
> > I don't have any card readers, but as Hans pointed out, this part will
> > come from the SCSI subsystem. If CAM says the device is not removable,
> > then hal will go with that.
>
> Light sledgehammering in /usr/local/share/hal/fdi/preprobe/20thirdparty
> and the card reader can be made to work:
>
> First, stop hal trying to automount a card twice, once for the redundant
> "computer_storage" version of a disk:
>
> 10-ignore-computer_storage.fdi :
>
> <?xml version="1.0" encoding="UTF-8"?>
> <deviceinfo version="0.2">
> <device>
> <!-- ignore duplicate entries for storage devices -->
> <match key="block.storage_device" string="/org/freedesktop/Hal/devices/computer_storage">
> <merge key="info.ignore" type="bool">true</merge>
> </match>
> </device>
> </deviceinfo>
>
> Then set some options for the card reader:
>
> 20-check-media.fdi :
>
> <?xml version="1.0" encoding="UTF-8"?>
> <deviceinfo version="0.2">
> <device>
> <!-- check for media changes in card reader -->
> storage.media_check_enabled
> <match key="freebsd.driver" string="da">
> <merge key="storage.media_check_enabled" type="bool">true</merge>
> <merge key="storage.hotpluggable" type="bool">true</merge>
> </match>
> </device>
> </deviceinfo>
>
> hal still sometimes doesn't notice new cards being connected, and the
> card reader's USB cable has to be reconnected. But at this point, it's
> at least as good as it was under 7-STABLE.
Doing something to access the device seems to cause it to be "noticed".
I use 'fsck -p' on the device, but I suspect dd(1) or most anything else
that touches the device will do it.
--
R. Kevin Oberman, Network Engineer
Energy Sciences Network (ESnet)
Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab)
E-mail: oberman at es.net Phone: +1 510 486-8634
Key fingerprint:059B 2DDF 031C 9BA3 14A4 EADA 927D EBB3 987B 3751
More information about the freebsd-current
mailing list