netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@linux-foundation.org>
To: Tino Keitel <tino.keitel@tikei.de>
Cc: netdev@vger.kernel.org
Subject: Re: sky2 hangs without any messages
Date: Wed, 23 May 2007 08:49:22 -0700	[thread overview]
Message-ID: <20070523084922.04dedd08@freepuppy> (raw)
In-Reply-To: <20070523150118.GA25026@dose.home.local>

Does this patch fix the problem? It is something I saw while doing
review for support of newer chips.
--------------------
Subject: sky2: don't set bogus bit in PHY register

This code inherited from the sk98lin driver is incorrect on the Yukon2.
The definition used for these bits is incorrect. Actual usage varies
with chip type, and we don't need to mess with them (yet).

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>


--- a/drivers/net/sky2.c	2007-05-23 08:44:09.000000000 -0700
+++ b/drivers/net/sky2.c	2007-05-23 08:47:11.000000000 -0700
@@ -658,7 +658,7 @@ static void sky2_mac_init(struct sky2_hw
 	const u8 *addr = hw->dev[port]->dev_addr;
 
 	sky2_write32(hw, SK_REG(port, GPHY_CTRL), GPC_RST_SET);
-	sky2_write32(hw, SK_REG(port, GPHY_CTRL), GPC_RST_CLR|GPC_ENA_PAUSE);
+	sky2_write32(hw, SK_REG(port, GPHY_CTRL), GPC_RST_CLR);
 
 	sky2_write8(hw, SK_REG(port, GMAC_CTRL), GMC_RST_CLR);
 
--- a/drivers/net/sky2.h	2007-05-23 08:44:09.000000000 -0700
+++ b/drivers/net/sky2.h	2007-05-23 08:47:11.000000000 -0700
@@ -1732,28 +1732,6 @@ enum {
 
 /*	GPHY_CTRL		32 bit	GPHY Control Reg (YUKON only) */
 enum {
-	GPC_SEL_BDT	= 1<<28, /* Select Bi-Dir. Transfer for MDC/MDIO */
-	GPC_INT_POL_HI	= 1<<27, /* IRQ Polarity is Active HIGH */
-	GPC_75_OHM	= 1<<26, /* Use 75 Ohm Termination instead of 50 */
-	GPC_DIS_FC	= 1<<25, /* Disable Automatic Fiber/Copper Detection */
-	GPC_DIS_SLEEP	= 1<<24, /* Disable Energy Detect */
-	GPC_HWCFG_M_3	= 1<<23, /* HWCFG_MODE[3] */
-	GPC_HWCFG_M_2	= 1<<22, /* HWCFG_MODE[2] */
-	GPC_HWCFG_M_1	= 1<<21, /* HWCFG_MODE[1] */
-	GPC_HWCFG_M_0	= 1<<20, /* HWCFG_MODE[0] */
-	GPC_ANEG_0	= 1<<19, /* ANEG[0] */
-	GPC_ENA_XC	= 1<<18, /* Enable MDI crossover */
-	GPC_DIS_125	= 1<<17, /* Disable 125 MHz clock */
-	GPC_ANEG_3	= 1<<16, /* ANEG[3] */
-	GPC_ANEG_2	= 1<<15, /* ANEG[2] */
-	GPC_ANEG_1	= 1<<14, /* ANEG[1] */
-	GPC_ENA_PAUSE	= 1<<13, /* Enable Pause (SYM_OR_REM) */
-	GPC_PHYADDR_4	= 1<<12, /* Bit 4 of Phy Addr */
-	GPC_PHYADDR_3	= 1<<11, /* Bit 3 of Phy Addr */
-	GPC_PHYADDR_2	= 1<<10, /* Bit 2 of Phy Addr */
-	GPC_PHYADDR_1	= 1<<9,	 /* Bit 1 of Phy Addr */
-	GPC_PHYADDR_0	= 1<<8,	 /* Bit 0 of Phy Addr */
-						/* Bits  7..2:	reserved */
 	GPC_RST_CLR	= 1<<1,	/* Clear GPHY Reset */
 	GPC_RST_SET	= 1<<0,	/* Set   GPHY Reset */
 };

  reply	other threads:[~2007-05-23 15:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-23  7:54 sky2 hangs without any messages Tino Keitel
2007-05-23 14:50 ` Stephen Hemminger
2007-05-23 15:01   ` Tino Keitel
2007-05-23 15:49     ` Stephen Hemminger [this message]
2007-06-27 17:31 ` Stephen Hemminger
     [not found] <6278d2220707020315q7c3df1cci5c7bb52316ad6081@mail.gmail.com>
2007-07-02 10:17 ` Daniel J Blueman
     [not found] ` <20070703123546.5d41410b@freepuppy.localdomain.hemminger.net>
     [not found]   ` <6278d2220707031402o7b13e45egc564076a1114b6f5@mail.gmail.com>
     [not found]     ` <6278d2220707050609s3579915bo50cf259ba73712f4@mail.gmail.com>
     [not found]       ` <20070705101046.542c1f8e@freepuppy.localdomain.hemminger.net>
2007-07-11 10:15         ` Daniel J Blueman
2007-07-11 15:27           ` Stephen Hemminger
2007-07-11 15:43             ` Daniel J Blueman
2007-07-11 21:39               ` Daniel J Blueman
2007-07-11 21:45                 ` Stephen Hemminger
2007-07-11 22:21                   ` Daniel J Blueman
2007-07-11 22:55                     ` Daniel J Blueman
2007-07-12  1:46                       ` Stephen Hemminger
2007-07-12 21:29                         ` Daniel J Blueman
2007-07-12 21:43                           ` Stephen Hemminger
2007-07-13  8:53                             ` Daniel J Blueman

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=20070523084922.04dedd08@freepuppy \
    --to=shemminger@linux-foundation.org \
    --cc=netdev@vger.kernel.org \
    --cc=tino.keitel@tikei.de \
    /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).