netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Tim Harvey <tharvey@gateworks.com>
Cc: netdev <netdev@vger.kernel.org>, David Miller <davem@davemloft.net>
Subject: Re: DSA driver - how to glue to a PCI based NIC's mdio?
Date: Wed, 30 Sep 2015 23:40:52 +0200	[thread overview]
Message-ID: <20150930214052.GG20219@lunn.ch> (raw)
In-Reply-To: <CAJ+vNU2SUpsQ+7dwPfR6EHVofpvVFF42KO=YUDaarLaDwWvXFw@mail.gmail.com>

> > information to the NIC's device driver. Better would be to have a
> > small shim driver which is loaded on your PCI_ID/DEVICE_ID. That would
> > instantiate the NIC driver, and insert a DSA platform device.
> 
> I was thinking of this as well, but then I would still need that shim
> to know the netdevice that the driver I'm shimming creates so I can't
> figure a way to do it without touching the PCI driver.

You can probably get that from the PCI information you have:

# /sys/devices/pci0000:00/0000:00:1c.2/0000:06:00.0 is the PCIe device. And it has

# /sys/devices/pci0000:00/0000:00:1c.2/0000:06:00.0/net$ ls -l
total 0
drwxr-xr-x 5 root root 0 Aug 19 18:23 eth0

So the linking is there.

   Andrew

  parent reply	other threads:[~2015-09-30 21:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-30 20:44 DSA driver - how to glue to a PCI based NIC's mdio? Tim Harvey
2015-09-30 21:12 ` Andrew Lunn
2015-09-30 21:27   ` Tim Harvey
2015-09-30 21:33     ` Florian Fainelli
2015-09-30 21:40     ` Andrew Lunn [this message]
2015-10-02 23:44       ` Tim Harvey

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=20150930214052.GG20219@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=tharvey@gateworks.com \
    /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 NNTP newsgroup(s).