mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: barebox@lists.infradead.org
Subject: Re: issue patch in next net/eth: fix link handling
Date: Fri, 28 Sep 2012 10:55:24 +0200	[thread overview]
Message-ID: <20120928085524.GB1322@pengutronix.de> (raw)
In-Reply-To: <20120928082716.GG26553@game.jcrosoft.org>

On Fri, Sep 28, 2012 at 10:27:16AM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 09:50 Fri 28 Sep     , Sascha Hauer wrote:
> > On Fri, Sep 28, 2012 at 04:28:21AM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > > HI,
> > > 
> > > 	The patch is next
> > > 	net/eth: fix link handling
> > > 
> > > 	was NEVER send to the ML
> > > 
> > > 	IIRC I was the author of the first version and this disapear
> > > 
> > > 	Uwe and I just get this discussion on the kernel ML about patch update
> > > 
> > 
> > I was basically pissed off because I got the strong feeling that I spent
> > more time reviewing and testing the patch than you initially spent
> > writing it in the first place. The second version still stored apples
> > in edev->phydev->link and bananas in edev->carrier, but still did a
> > edev->carrier = dev->link.
> I did this on purpose as I do want to store the link and later export it via
> env as I get a patch here for 2 wifi driver where I'll not use the phylib
> 
> so store the carrier is the correct way

Whatever it is, adding a variable to an ethernet device and then
manipulating it in both the phylib and the ethernet code is desastrous.
It must be clear everytime who owns a variable. Doing a

eth_current->carrier = CARRIER_UNKNOW;

in the ethernet code, and then:

edev->carrier = dev->link;

in the phy code is a recipe for spaghetti code.

Sascha (Who loves spaghetti - on his plate)

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2012-09-28  8:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-28  2:28 Jean-Christophe PLAGNIOL-VILLARD
2012-09-28  7:50 ` Sascha Hauer
2012-09-28  8:27   ` Jean-Christophe PLAGNIOL-VILLARD
2012-09-28  8:55     ` Sascha Hauer [this message]
2012-09-28  9:14       ` Jean-Christophe PLAGNIOL-VILLARD

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=20120928085524.GB1322@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=plagnioj@jcrosoft.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