Re: Why does hal think my USB devices are fixed?

From: Kevin Oberman <oberman_at_es.net>
Date: Wed, 14 Oct 2009 21:34:22 -0700
> 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
Received on Thu Oct 15 2009 - 02:34:24 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:57 UTC