linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Phillip Susi <psusi@ubuntu.com>
To: linux-hotplug@vger.kernel.org
Subject: Matching on the ata port number, which is an attribute that is not a direct ancestor
Date: Wed, 25 Jun 2014 23:22:32 +0000	[thread overview]
Message-ID: <53AB59B8.80507@ubuntu.com> (raw)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

I am trying to figure out how to set up a rule, preferably using
information stored in the hwdb, to identify ata ports that are known
to be esata on specific hardware.  The problem seems to be that ata
exposes this information not in a direct ancestor of the block device
node, but off to the side.  For example, the block node is:

/devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0

But the ata port number is exposed in the attribute:

/devices/pci0000:00/0000:00:1f.2/ata1/ata_port/ata1/port_no

So how can I write a udev rule to match on a specific port_no, and
then add in the modalias for this specific controller?

Matching on ATTRS{ata_port/ata1/port_no} doesn't seem to work.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBCgAGBQJTq1m0AAoJEI5FoCIzSKrw39wH/2cnCWPjpm1rFIVN5a/ufcm1
Ah3JsOw1GESdNMnUKcYYz1A56SXbTRKRitTNfm6/Gi91HPobdoauNhSQDQwpZZ4X
RpxrEUe2Cg/uZOPQ7QAMWQ8mPgXJ0jCcdnlO9iPzkYrEsW/CaK4UmUnqOIGYaeCm
ekA/Cz16ZMBxa4qqv2NFV+uuRfiXVJAuqoJykELeEu4zc0EiLw7veHXI66AO9HSv
kL+FRWyfH1cncfs7FmS/zLdt/fq8rYQtkWcOzCX/7xVCWJ2orI5lS9aJYQRrSrZb
Am3tpID6TjXwSRvc/6tP3KD6h67lP9bHgU82jq9sYVio+ehpTw3f41xx6rGMwDE=sU17
-----END PGP SIGNATURE-----

                 reply	other threads:[~2014-06-25 23:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53AB59B8.80507@ubuntu.com \
    --to=psusi@ubuntu.com \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).