From: Joe Perches <joe@perches.com>
To: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org
Subject: Re: [PATCH 1/1 v2] net: add micrel KSZ8873MLL switch support
Date: Wed, 21 Nov 2012 11:03:56 -0800 [thread overview]
Message-ID: <1353524636.24807.28.camel@joe-AO722> (raw)
In-Reply-To: <1353512287-24048-1-git-send-email-plagnioj@jcrosoft.com>
On Wed, 2012-11-21 at 16:38 +0100, Jean-Christophe PLAGNIOL-VILLARD
wrote:
> this will allow to detect the link between the switch and the soc
[]
> diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
[]
> @@ -127,6 +127,39 @@ static int ks8051_config_init(struct phy_device *phydev)
[]
> +int ksz8873mll_read_status(struct phy_device *phydev)
> +{
[]
> + regval = phy_read(phydev, KSZ8873MLL_GLOBAL_CONTROL_4);
> +
> + if (regval & KSZ8873MLL_GLOBAL_CONTROL_4_DUPLEX)
> + phydev->duplex = DUPLEX_HALF;
> + else
> + phydev->duplex = DUPLEX_FULL;
This doesn't check for phy_read errors.
Shouldn't it?
next prev parent reply other threads:[~2012-11-21 19:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-21 10:27 [PATCH 1/1] net: add micrel KSZ8873MLL switch support Jean-Christophe PLAGNIOL-VILLARD
2012-11-21 10:40 ` Baruch Siach
2012-11-21 15:38 ` [PATCH 1/1 v2] " Jean-Christophe PLAGNIOL-VILLARD
2012-11-21 19:03 ` Joe Perches [this message]
2012-11-23 19:30 ` David Miller
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=1353524636.24807.28.camel@joe-AO722 \
--to=joe@perches.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=netdev@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).