From: Olof Johansson <olof@lixom.net>
To: jgarzik@pobox.com
Cc: linuxppc-dev@ozlabs.org, netdev@vger.kernel.org
Subject: [PATCH] [11/12] pasemi_mac: Print warning when not attaching to a PHY
Date: Wed, 28 Nov 2007 20:58:06 -0600 [thread overview]
Message-ID: <20071129025806.GL17215@lixom.net> (raw)
In-Reply-To: <20071129025410.GA17215@lixom.net>
pasemi_mac: Print warning when not attaching to a PHY
Print a warning on the console when not connecting to a phy for an interface.
It turns out to be a pretty common problem when someone gets the MDIO info
wrong in their device tree, resulting in the macs running at a fixed 1Gbit FD.
Signed-off-by: Olof Johansson <olof@lixom.net>
---
drivers/net/pasemi_mac.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
Index: k.org/drivers/net/pasemi_mac.c
===================================================================
--- k.org.orig/drivers/net/pasemi_mac.c
+++ k.org/drivers/net/pasemi_mac.c
@@ -1064,11 +1064,12 @@ static int pasemi_mac_open(struct net_de
write_mac_reg(mac, PAS_MAC_CFG_PCFG, flags);
ret = pasemi_mac_phy_init(dev);
- /* Some configs don't have PHYs (XAUI etc), so don't complain about
- * failed init due to -ENODEV.
+ /* Warn for missing PHY on SGMII (1Gig) ports.
*/
- if (ret && ret != -ENODEV)
- dev_warn(&mac->pdev->dev, "phy init failed: %d\n", ret);
+ if (ret && mac->type == MAC_TYPE_GMAC) {
+ dev_warn(&mac->pdev->dev, "PHY init failed: %d.\n", ret);
+ dev_warn(&mac->pdev->dev, "Defaulting to 1Gbit full duplex\n");
+ }
netif_start_queue(dev);
napi_enable(&mac->napi);
next prev parent reply other threads:[~2007-11-29 2:54 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-29 2:54 [PATCH] [0/12] pasemi_mac updates for 2.6.25 + DMA channel management library Olof Johansson
2007-11-29 2:54 ` [PATCH] [1/12] pasemi_mac: RX/TX ring management cleanup Olof Johansson
2007-12-01 21:54 ` Jeff Garzik
2007-11-29 2:56 ` [PATCH] [2/12] pasemi_mac: Move register definitions to include/asm-powerpc Olof Johansson
2007-11-29 2:56 ` [PATCH] [3/12] pasemi: DMA engine management library Olof Johansson
2007-11-29 2:56 ` [PATCH] [4/12] pasemi_mac: Convert to new dma library Olof Johansson
2007-11-29 2:56 ` [PATCH] [5/12] pasemi_mac: performance tweaks Olof Johansson
2007-11-29 2:56 ` [PATCH] [6/12] pasemi_mac: Fix TX cleaning Olof Johansson
2007-11-29 2:57 ` [PATCH] [7/12] pasemi_mac: Improve RX interrupt mitigation Olof Johansson
2007-11-29 2:57 ` [PATCH] [8/12] pasemi_mac: Software-based LRO support Olof Johansson
2007-11-29 2:57 ` [PATCH] [9/12] pasemi_mac: SKB unmap optimization Olof Johansson
2007-11-29 2:57 ` [PATCH] [10/12] pasemi_mac: Remove SKB copy/recycle logic Olof Johansson
2007-11-29 2:58 ` Olof Johansson [this message]
2007-11-29 2:58 ` [PATCH] [12/12] pasemi_mac: Don't enable RX/TX without a link (if possible) Olof Johansson
2007-11-29 2:59 ` [PATCH] [0/12] pasemi_mac updates for 2.6.25 + DMA channel management library Olof Johansson
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=20071129025806.GL17215@lixom.net \
--to=olof@lixom.net \
--cc=jgarzik@pobox.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=netdev@vger.kernel.org \
/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).