Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Oct 2009 21:34:22 -0700
From:      "Kevin Oberman" <oberman@es.net>
To:        Warren Block <wblock@wonkity.com>
Cc:        current@freebsd.org
Subject:   Re: Why does hal think my USB devices are fixed? 
Message-ID:  <20091015043422.6B42D1CC37@ptavv.es.net>
In-Reply-To: Your message of "Wed, 14 Oct 2009 14:38:47 MDT." <alpine.BSF.2.00.0910141417190.74210@wonkity.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
> Date: Wed, 14 Oct 2009 14:38:47 -0600 (MDT)
> From: Warren Block <wblock@wonkity.com>
> Sender: owner-freebsd-current@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@es.net			Phone: +1 510 486-8634
Key fingerprint:059B 2DDF 031C 9BA3 14A4  EADA 927D EBB3 987B 3751



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091015043422.6B42D1CC37>