From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-ey0-f177.google.com ([209.85.215.177]) by canuck.infradead.org with esmtps (Exim 4.72 #1 (Red Hat Linux)) id 1Q9BTb-0003Vn-5U for barebox@lists.infradead.org; Mon, 11 Apr 2011 07:24:00 +0000 Received: by eyh6 with SMTP id 6so1749996eyh.36 for ; Mon, 11 Apr 2011 00:23:56 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20110411023702.GA18925@game.jcrosoft.org> References: <1302358087-9756-1-git-send-email-franck.jullien@gmail.com> <1302358087-9756-2-git-send-email-franck.jullien@gmail.com> <20110410040649.GA8392@game.jcrosoft.org> <20110410105159.GA18343@game.jcrosoft.org> <20110411023702.GA18925@game.jcrosoft.org> Date: Mon, 11 Apr 2011 09:23:56 +0200 Message-ID: From: Franck JULLIEN List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============0368644403==" Sender: barebox-bounces@lists.infradead.org Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: Re: [PATCH] [v2] Nios2: Add Altera TSE MAC driver To: Jean-Christophe PLAGNIOL-VILLARD Cc: barebox --===============0368644403== Content-Type: multipart/alternative; boundary=00504502ca1c5df64c04a09f757f --00504502ca1c5df64c04a09f757f Content-Type: text/plain; charset=ISO-8859-1 2011/4/11 Jean-Christophe PLAGNIOL-VILLARD > On 20:21 Sun 10 Apr , Franck JULLIEN wrote: > > 2011/4/10 Jean-Christophe PLAGNIOL-VILLARD > > > > > > index 0000000..2687377 > > > > --- /dev/null > > > > + > > > > +static int tse_get_ethaddr(struct eth_device *edev, > unsigned > > char *m) > > > > +{ > > > > + /* There is no eeprom */ > > > so return the content of the register no? > > > > > > Well, the register is reseted to 0 when the MAC starts so there > is > > no > > > Ethernet address > > > to get. > > > > > except this function is supposed to return the mac address of the > device > > at > > any time so after a set of it it will not be true any more > > > > If I implement the function I get a "eth@eth0: got MAC address from > > EEPROM: 00:00:00:00:00:00" at startup. > > That why I returned -1 as what I could find int at91_ether.c...... > > Or, I could find something to return -1 as long as the MAC address > hasn't > > been set. > > > I known this issue I re-write recently the at91_ether and the same on macb > will post the patch soon > > It's fine the uperlayer will see that it's not a valid mac so this will > generate a random one > cf net/net.c IIRC > > For me, it's a bit annoying to get this message at startup. Don't you really think I could have a flag in the private structure to check if an address has been set and then return -1 or the address in the tse_get_ethaddr function ? > Best Regads, > J. > --00504502ca1c5df64c04a09f757f Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

2011/4/11 Jean-Christophe PLAGNIOL-VILLA= RD <plagnioj@= jcrosoft.com>
On 20:21 Sun 10 Apr =A0 =A0 , Franck JULLIEN wrote:
> =A0 =A02011/4/10 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
>
> =A0 =A0 =A0> =A0 =A0 =A0> index 0000000..2687377
> =A0 =A0 =A0> =A0 =A0 =A0> --- /dev/null
> =A0 =A0 =A0> =A0 =A0 =A0> +
> =A0 =A0 =A0> =A0 =A0 =A0> +static int tse_get_ethaddr(struct eth= _device *edev, unsigned
> =A0 =A0 =A0char *m)
> =A0 =A0 =A0> =A0 =A0 =A0> +{
> =A0 =A0 =A0> =A0 =A0 =A0> + =A0 =A0 /* There is no eeprom */
> =A0 =A0 =A0> =A0 =A0 =A0so return the content of the register no? > =A0 =A0 =A0>
> =A0 =A0 =A0> =A0 =A0Well, the register is reseted to 0 when the MAC= starts so there is
> =A0 =A0 =A0no
> =A0 =A0 =A0> =A0 =A0Ethernet address
> =A0 =A0 =A0> =A0 =A0to get.
> =A0 =A0 =A0>
> =A0 =A0 =A0except this function is supposed to return the mac address = of the device
> =A0 =A0 =A0at
> =A0 =A0 =A0any time so after a set of it it will not be true any more<= br> >
> =A0 =A0If I implement the function I get a "eth@eth0: got MAC add= ress from
> =A0 =A0EEPROM: 00:00:00:00:00:00" at startup.
> =A0 =A0That why I returned -1 as what I could find int at91_ether.c...= ...
> =A0 =A0Or, I could find something to return -1 as long as the MAC addr= ess hasn't
> =A0 =A0been set.
>
I known this issue I re-write recently the at91_ether and the same on= macb
will post the patch soon

It's fine the uperlayer will see that it's not a valid mac so this = will
generate a random one
cf net/net.c IIRC


For me, it's a bit annoying =A0to = get this message at startup.

Don't you really = think=A0I could have a flag in the private structure to check
if = an address has been set=A0and then return -1 or the address in the=A0
tse_get_ethaddr function ?

=A0
Best Regads,
J.

--00504502ca1c5df64c04a09f757f-- --===============0368644403== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox --===============0368644403==--