netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Riesch <michael@riesch.at>
To: Christian Riesch <christian.riesch@omicron.at>
Cc: Ben Hutchings <bhutchings@solarflare.com>,
	netdev@vger.kernel.org, Oliver Neukum <oneukum@suse.de>,
	Eric Dumazet <edumazet@google.com>,
	Allan Chou <allan@asix.com.tw>, Mark Lord <kernel@teksavvy.com>,
	Grant Grundler <grundler@chromium.org>,
	Ming Lei <tom.leiming@gmail.com>
Subject: Re: [PATCH 4/4] asix: Add a new driver for the AX88172A
Date: Wed, 11 Jul 2012 21:23:41 +0200	[thread overview]
Message-ID: <1342034621.1855.15.camel@schesaplana> (raw)
In-Reply-To: <CABkLObq+JtgECK=Q6dxOgDEZ++GxfLzutHGbWzt2uD5LStKjwg@mail.gmail.com>

On Wed, 2012-07-11 at 17:10 +0200, Christian Riesch wrote:
> Hi again,
[...]
> >>> Using the ifindex sounds good to me,
> >>>
> >>> snprintf(priv->mdio->id, MII_BUS_ID_SIZE, "asix-%d",
> >>>         dev->net->ifindex);
> >>>
> >>> works on any system with less than 10^12 network interfaces.
> >>
> >> Ok, I'll change that to use ifindex.
> >
> > No, I won't.
> > At the time the mdio bus is registered, ifindex is not yet set, so the
> > snprintf would always result in "asix-0".
> 
> What do you think about
> snprintf(priv->mdio->id, MII_BUS_ID_SIZE, "usb-%03d:%03d",
> dev->udev->bus->busnum, dev->udev->devnum);
> ??
> 
> This would use the busnum/devnum identifier as reported by lsusb and
> would be short enough for an mdio bus name.

IMHO this would be a good solution - it is unique and there you can tell
which MDIO bus belongs to which USB device by the name (not sure if
someone will ever need to do that, but it is neat).

Regards, Michael

  reply	other threads:[~2012-07-11 19:29 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-06 11:33 [PATCH 0/4] Add a driver for the ASIX AX88172A Christian Riesch
2012-07-06 11:33 ` [PATCH 1/4] asix: Fix checkpatch warnings Christian Riesch
2012-07-06 11:58   ` Eric Dumazet
2012-07-06 12:02     ` David Miller
2012-07-06 21:43     ` Grant Grundler
2012-07-07  8:36       ` Eric Dumazet
2012-07-09  9:48         ` Christian Riesch
2012-07-06 15:25   ` Joe Perches
2012-07-06 11:33 ` [PATCH 2/4] asix: Rename asix.c to asix_devices.c Christian Riesch
2012-07-06 11:33 ` [PATCH 3/4] asix: Factor out common code Christian Riesch
2012-07-06 11:33 ` [PATCH 4/4] asix: Add a new driver for the AX88172A Christian Riesch
2012-07-06 17:37   ` Ben Hutchings
2012-07-08 15:39     ` Michael Riesch
2012-07-08 15:50       ` Ben Hutchings
2012-07-09 10:30       ` Christian Riesch
2012-07-11  8:27         ` Christian Riesch
2012-07-11 15:10           ` Christian Riesch
2012-07-11 19:23             ` Michael Riesch [this message]
2012-07-06 21:20   ` Grant Grundler
2012-07-09 10:22     ` Christian Riesch
2012-07-12  7:22       ` Christian Riesch
2012-07-12 23:10         ` Grant Grundler
2012-07-06 11:51 ` [PATCH 0/4] Add a driver for the ASIX AX88172A Christian Riesch
2012-07-09  2:38 ` ASIX Allan Email [office]
2012-07-09 10:18   ` Christian Riesch
2012-07-09 17:45 ` Grant Grundler
2012-07-09 22:27   ` Mark Lord
2012-07-10  2:20     ` ASIX Allan Email [office]

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=1342034621.1855.15.camel@schesaplana \
    --to=michael@riesch.at \
    --cc=allan@asix.com.tw \
    --cc=bhutchings@solarflare.com \
    --cc=christian.riesch@omicron.at \
    --cc=edumazet@google.com \
    --cc=grundler@chromium.org \
    --cc=kernel@teksavvy.com \
    --cc=netdev@vger.kernel.org \
    --cc=oneukum@suse.de \
    --cc=tom.leiming@gmail.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).