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: [PATCH 3/3] net: move the eth_dev status detection at driver level
Date: Sun, 16 Sep 2012 10:12:33 +0200	[thread overview]
Message-ID: <20120916081233.GA24458@pengutronix.de> (raw)
In-Reply-To: <1347609426-21286-3-git-send-email-plagnioj@jcrosoft.com>

On Fri, Sep 14, 2012 at 09:57:06AM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> 
> as this is depend on the phy link status
> 
> If not phylib used force active
> 
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> ---
>  drivers/net/altera_tse.c  |    3 ++-
>  drivers/net/at91_ether.c  |    2 ++
>  drivers/net/cs8900.c      |    1 +
>  drivers/net/designware.c  |    2 ++
>  drivers/net/dm9k.c        |    2 +-
>  drivers/net/ep93xx.c      |    2 +-
>  drivers/net/fec_imx.c     |    2 ++
>  drivers/net/fec_mpc5200.c |    2 +-
>  drivers/net/gianfar.c     |    2 ++
>  drivers/net/ks8851_mll.c  |    2 +-
>  drivers/net/macb.c        |    2 ++
>  drivers/net/miidev.c      |   10 ++++++++++
>  drivers/net/netx_eth.c    |    2 +-
>  drivers/net/smc91111.c    |    2 +-
>  drivers/net/smc911x.c     |    2 +-
>  drivers/net/tap.c         |    1 +
>  drivers/net/usb/usbnet.c  |    3 ++-
>  include/miidev.h          |    1 +
>  net/eth.c                 |    4 +++-
>  19 files changed, 37 insertions(+), 10 deletions(-)

Had to squash the following into this patch to make it compile:


diff --git a/drivers/net/at91_ether.c b/drivers/net/at91_ether.c
index c750f10..828af79 100644
--- a/drivers/net/at91_ether.c
+++ b/drivers/net/at91_ether.c
@@ -153,7 +153,7 @@ static void update_linkspeed(struct mii_device *mdev)
 	}
 	at91_emac_write(AT91_EMAC_CFG, mac_cfg);
 
-	edev->active = mdev->phydev->link;
+	mdev->edev->active = mdev->phydev->link;
 }
 
 static int at91_ether_open(struct eth_device *edev)
diff --git a/drivers/net/cs8900.c b/drivers/net/cs8900.c
index 3f7fa05..249194d 100644
--- a/drivers/net/cs8900.c
+++ b/drivers/net/cs8900.c
@@ -250,9 +250,9 @@ static int cs8900_dev_init(struct eth_device *dev)
 	return 0;
 }
 
-static int cs8900_open(struct eth_device *dev)
+static int cs8900_open(struct eth_device *edev)
 {
-	struct cs8900_priv *priv = (struct cs8900_priv *)dev->priv;
+	struct cs8900_priv *priv = (struct cs8900_priv *)edev->priv;
 	cs8900_reset(priv);
 	cs8900_reginit(priv);
 	edev->active = 1;

-- 
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-16  8:12 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-14  7:37 [PATCH 0/3 v3] net: check error and introduce phylib Jean-Christophe PLAGNIOL-VILLARD
2012-09-14  7:57 ` [PATCH 1/3] net: " Jean-Christophe PLAGNIOL-VILLARD
2012-09-14  7:57   ` [PATCH 2/3] net: catch error on eth_send Jean-Christophe PLAGNIOL-VILLARD
2012-09-16  9:57     ` Jean-Christophe PLAGNIOL-VILLARD
2012-09-14  7:57   ` [PATCH 3/3] net: move the eth_dev status detection at driver level Jean-Christophe PLAGNIOL-VILLARD
2012-09-16  8:12     ` Sascha Hauer [this message]
2012-09-15 12:24   ` [PATCH 1/3] net: introduce phylib Sascha Hauer
2012-09-16  8:11   ` Sascha Hauer
2012-09-16  8:28     ` Jean-Christophe PLAGNIOL-VILLARD
2012-09-16  8:34       ` Sascha Hauer
2012-09-16  9:02         ` Jean-Christophe PLAGNIOL-VILLARD
2012-09-16  9:13           ` Sascha Hauer
2012-09-16  9:41             ` Jean-Christophe PLAGNIOL-VILLARD
  -- strict thread matches above, loose matches on Subject: below --
2012-09-09 15:44 [PATCH 1/3 v2] " Jean-Christophe PLAGNIOL-VILLARD
2012-09-09 15:44 ` [PATCH 3/3] net: move the eth_dev status detection at driver level 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=20120916081233.GA24458@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