Re: Writing a rule specific to a USB connector

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 23, 2011 at 10:03 AM, Diego Iastrubni <diegoiast@xxxxxxxxx> wrote:
> KERNEL=="hidraw[0-9]*", ATTRS{serial}=="musb_hdrc", SYMLINK+="aaaaaaaaaa"
> KERNEL=="hidraw[0-9]*", ATTRS{idVendor}=="c1ca", SYMLINK+="bbbbbbbbbbb"
>
>
> OK, works. I see both links generated. Now I need to combine them:
>
> KERNEL=="hidraw[0-9]*", ATTRS{idVendor}=="c1ca",
> ATTRS{serial}=="musb_hdrc", SYMLINK+="cccccccccc"
> KERNEL=="hidraw[0-9]*", ATTRS{serial}=="musb_hdrc",
> ATTRS{idVendor}=="c1ca", SYMLINK+="dddddddddd"

ATTRS matches on a parent device, two instances of ATTRS matches on
_the same_ parent device. In your case I guess idVendor and serial
match on different parent devices, which would explain why they work
separately but no together.

Finally you say:

> None working. What I think in happening is that the idVendor of the
> USB hub is matched and not of the device. I need to match:
>
> ATTR{idVendor}=="c1ca" and some parent has ATTRS{serial}=="musb_hdrc"
>
>
> What is the golden rule I am missing?

Sounds to me like you should have used:

KERNEL=="hidraw[0-9]*", ATTR{idVendor}=="c1ca",
ATTRS{serial}=="musb_hdrc", SYMLINK+="eeeeeeeee"

Cheers,

Tom
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux