public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Dan Murphy <dmurphy-l0cyMroinI0@public•gmane.org>
To: Ming Lei <tom.leiming-Re5JQEeQqe8AvxtiuMwx3w@public•gmane.org>
Cc: Steve Glendinning
	<steve.glendinning-nksJyM/082jR7s880joybQ@public•gmane.org>,
	Network Development
	<netdev-u79uwXL29TY76Z2rM5mHXA@public•gmane.org>,
	Linux Kernel Mailing List
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public•gmane.org>,
	linux-usb <linux-usb-u79uwXL29TY76Z2rM5mHXA@public•gmane.org>,
	<mugunthanvnm-l0cyMroinI0@public•gmane.org>
Subject: Re: [PATCH] usbnet: smsc95xx: Add device tree input for MAC address
Date: Mon, 7 Oct 2013 08:30:31 -0500	[thread overview]
Message-ID: <5252B777.2080102@ti.com> (raw)
In-Reply-To: <CACVXFVNAB3VnmdoP_LGJsBjQ17j1aoqKMsBE7LRt65OqROeRUQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On 10/07/2013 06:42 AM, Ming Lei wrote:
> On Mon, Oct 7, 2013 at 1:31 AM, Dan Murphy <dmurphy-l0cyMroinI0@public•gmane.org> wrote:
>> On 10/06/2013 10:05 AM, Ming Lei wrote:
>>> On Sat, Oct 5, 2013 at 2:25 AM, Dan Murphy <dmurphy-l0cyMroinI0@public•gmane.org> wrote:
>>>> If the smsc95xx does not have a valid MAC address stored within
>>>> the eeprom then a random number is generated.  The MAC can also
>>>> be set by uBoot but the smsc95xx does not have a way to read this.
>>>>
>>>> Create the binding for the smsc95xx so that uBoot can set the MAC
>>>> and the code can retrieve the MAC from the modified DTB file.
>>> Suppose there are two smsc95xx usbnet devices connected to usb bus, and
>>> one is built-in, another is hotplug device, can your patch handle the situation
>>> correctly?
>> Look at this line in the patch below
>>
>> sprintf(of_name, "%s%i", SMSC95XX_OF_NAME, dev->udev->dev.id);
>>
>> I am appending the dev ID of the device to the of_name here.  As long as init_mac_address is called, the dev.id and the uBoot
>> entry match then yes.
> Currently, non-root-hub usb device is created and added into usb bus without
> any platform(device tree) knowledge, so you can't expect the match here.

That is correct.  Platform/dev tree will have no concept of the PnP USB dongle therefore there should be no entry in either.

I will need to test this issue with a PnP usb->ethernet dongle.

Dan




> Also not mention the two smsc95xx devices may attach to two different
> usb host controllers(buses).
>
> Thanks,


-- 
------------------
Dan Murphy

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public•gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2013-10-07 13:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-04 18:25 [PATCH] usbnet: smsc95xx: Add device tree input for MAC address Dan Murphy
2013-10-06 15:05 ` Ming Lei
     [not found]   ` <CACVXFVOVMvP=3y9h2Jrqn2sBQdKOZtrhQDAFYkdHKXFgQj=d0Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-10-06 17:31     ` Dan Murphy
2013-10-07 11:42       ` Ming Lei
     [not found]         ` <CACVXFVNAB3VnmdoP_LGJsBjQ17j1aoqKMsBE7LRt65OqROeRUQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-10-07 13:30           ` Dan Murphy [this message]
2013-10-10 12:08         ` Dan Murphy
2013-10-10 12:39           ` Ming Lei
2013-10-10 12:47             ` Dan Murphy
2013-10-11  1:51               ` Ming Lei

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=5252B777.2080102@ti.com \
    --to=dmurphy-l0cymroini0@public$(echo .)gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public$(echo .)gmane.org \
    --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public$(echo .)gmane.org \
    --cc=mugunthanvnm-l0cyMroinI0@public$(echo .)gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public$(echo .)gmane.org \
    --cc=steve.glendinning-nksJyM/082jR7s880joybQ@public$(echo .)gmane.org \
    --cc=tom.leiming-Re5JQEeQqe8AvxtiuMwx3w@public$(echo .)gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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