devd problem with 9-stable

Kevin Oberman kob6558 at gmail.com
Fri Jun 15 16:40:49 UTC 2012


On Fri, Jun 15, 2012 at 7:53 AM, Ronald Klop
<ronald-freebsd8 at klop.yi.org> wrote:
> On Fri, 15 Jun 2012 15:50:49 +0200, Warren Block <wblock at wonkity.com> wrote:
>
>> On Fri, 15 Jun 2012, Ronald Klop wrote:
>>
>>> On Fri, 15 Jun 2012 08:01:21 +0200, Kevin Oberman <kob6558 at gmail.com>
>>> wrote:
>>>
>>>> On Thu, Jun 14, 2012 at 3:11 AM, Ronald Klop
>>>> <ronald-freebsd8 at klop.yi.org> wrote:
>>>>>
>>>>> On Thu, 14 Jun 2012 02:41:58 +0200, Kevin Oberman <kob6558 at gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Since updating my systems to 9-Stable, I am not getting my smartcard
>>>>>> reader attached when hot-plugged.
>>>>>>
>>>>>>> From devd.conf
>>>>>>
>>>>>>  attach 50 {
>>>>>>      device-name "ugen[0-9]+";
>>>>>>      match "vendor" "0x0529";
>>>>>>      match "product" "0x0600";
>>>>>>      action "/usr/local/sbin/openct-control attach usb:529/600 usb
>>>>>> /dev/$dev$
>>>>>> };
>>>>>> detach 50 {
>>>>>>      device-name "ugen[0-9]+";
>>>>>>      match "vendor" "0x0529";
>>>>>>      match "product" "0x0600";
>>>>>>      action "/usr/bin/pkill -fx '/usr/local/sbin/ifdhandler -H -p
>>>>>> [a-z0-9]+ $
>>>>>> };
>>>>>>  If I manually enter the "action" command, it works fine, but it fails
>>>>>> when I insert the device. It worked fine under version 8. I have
>>>>>> confirmed devd is seeing the device inserted just fine. the action
>>>>>> just does not seem to be carried out.
>>>>>>  Any idea where I should look? I saw a couple of threads on current
>>>>>> from others seeing something similar, but could find no resolution.
>>>>>> I have seen a
>>>>>
>>>>>  Did you run devd with debug messages on? Options -D and -d are
>>>>> helpful.
>>>>> If you do does devd match the right devd.conf sections and start the
>>>>> action?
>>>>
>>>>  With debug i get:
>>>> Processing event '!system=USB subsystem=DEVICE type=ATTACH
>>>> ugen=ugen1.3 cdev=ugen1.3 vendor=0x0529 product=0x0600 devclass=0xff
>>>> devsubclass=0x00 sernum="" release=0x0100 mode=host port=1
>>>> parent=ugen1.2'
>>>> [long list of "Testing" entries, none of which 'vendor' matched]
>>>> Executing 'logger Unknown USB device: vendor 0x0529 product 0x0600 bus
>>>> uhub3'
>>>>  So it looks like devd is not matching the vendor. But my devd.conf
>>>> file contains that vendor. I don't know exactly why it is not being
>>>> tested against. Nothing in the debug output gives me a clue and I
>>>> tried grepping for one of the tested vendor IDs in /etc/devd.conf and
>>>> /etc/devd/*.conf.  Not found.
>>>>  I am at a loss.
>>>
>>>
>>> http://www.freebsd.org/releases/9.0R/errata.html
>>> See point 3 under Open Issues.
>>
>>
>> Even with those changes, devd is not triggering on my scanner attach:
>>
>>         match "subsystem" "DEVICE";
>>         match "type" "ATTACH";
>>         match "cdev" "ugen[0-9]+.[0-9]+";
>>         match "vendor" "0x04b8";
>>         match "product" "0x010a";
>>         action "echo HERE! $cdev > /tmp/zoot";
>>
>> # devd -d -D -f /etc/devd/wb.conf
>>
>> Processing event '!system=USB subsystem=DEVICE type=ATTACH ugen=ugen0.6
>> cdev=ugen0.6 vendor=0x04b8 product=0x010a devclass=0xff devsubclass=0xff
>> sernum="" release=0x0103 mode=host port=4 parent=ugen0.4'
>> Pushing table
>> setting system=USB
>> setting subsystem=DEVICE
>> setting type=ATTACH
>> setting ugen=ugen0.6
>> setting cdev=ugen0.6
>> setting vendor=0x04b8
>> setting product=0x010a
>> setting devclass=0xff
>> setting devsubclass=0xff
>> setting sernum=
>> setting release=0x0103
>> setting mode=host
>> setting port=4
>> setting parent=ugen0.4
>> Processing notify event
>> Testing system=USB against ^DEVFS
>> Testing system=USB against ^DEVFS
>> Popping table
>>
>
> I tried the same attaching my webcam on pcbsd in vmware.
>
> [root at pcbsd-1684 /etc/devd]# cat /tmp/bla.conf
> notify 100 {
>
>  match "subsystem" "DEVICE";
>  match "type" "ATTACH";
>  match "cdev" "ugen[0-9]+.[0-9]+";
>  match "vendor" "0x2232";
>  match "product" "0x1008";
>  action "echo HERE! $cdev >> /tmp/bla.log";
>  };
>
> # devd -d -D -f /tmp/bla.conf
> ...
> Processing event '!system=USB subsystem=DEVICE type=ATTACH ugen=ugen1.2
> cdev=ugen1.2 vendor=0x2232 product=0x1008 devclass=0xef devsubclass=0x02
> sernum="" release=0x0019 mode=host port=1 parent=ugen1.1'
>
>  Pushing table
> setting system=USB
> setting subsystem=DEVICE
> setting type=ATTACH
> setting ugen=ugen1.2
> setting cdev=ugen1.2
> setting vendor=0x2232
> setting product=0x1008
> setting devclass=0xef
> setting devsubclass=0x02
>  setting sernum=
> setting release=0x0019
> setting mode=host
> setting port=1
> setting parent=ugen1.1
> Processing notify event
> Testing subsystem=DEVICE against ^DEVICE
> Testing type=ATTACH against ^ATTACH
> Testing cdev=ugen1.2 against ^ugen[0-9]+.[0-9]+
>  Testing vendor=0x2232 against ^0x2232
> Testing product=0x1008 against ^0x1008
> Executing 'echo HERE! ugen1.2 >> /tmp/bla.log'
> Popping table
>
> [root at pcbsd-1684 /etc/devd]# cat /tmp/bla.log
> HERE! ugen1.2
>
> Do you see a significant difference with your setup?

Switched to 'notify' with:
notify 50 {
        match "system" "USB"
        match "subsystem" "DEVICE";
        match "type" "ATTACH";
        match "cdev" "ugen[0-9\.]+";
        match "vendor" "0x0529";
        match "product" "0x0600";
        action "/usr/local/sbin/openct-control attach usb:529/600 usb /dev/$devi
ce-name";
};

I still see no attempt to match against vendor 0x0529. Still no go.
(Note that I prefer the [0-9\.] + syntax, but tried yours, as well.)

The real issue is that devd seems to have a long list of vendors that
it matches against, but 0x529 is not in that list, so matching the
device name is not likely an issue.
-- 
R. Kevin Oberman, Network Engineer
E-mail: kob6558 at gmail.com


More information about the freebsd-stable mailing list