All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@linux-foundation.org>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: [PATCH 3/6] sky2: fix power settings on Yukon XL
Date: Thu, 11 Oct 2007 18:19:54 -0700	[thread overview]
Message-ID: <20071012012125.169362665@linux-foundation.org> (raw)
In-Reply-To: 20071012011951.575936605@linux-foundation.org

[-- Attachment #1: sky2-phy-power.patch --]
[-- Type: text/plain, Size: 1178 bytes --]

Make sure PCI register for PHY power gets set correctly.

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


--- a/drivers/net/sky2.c	2007-10-11 18:12:56.000000000 -0700
+++ b/drivers/net/sky2.c	2007-10-11 18:13:00.000000000 -0700
@@ -606,20 +606,19 @@ static void sky2_phy_power(struct sky2_h
 {
 	struct pci_dev *pdev = hw->pdev;
 	u32 reg1;
-	static const u32 phy_power[]
-		= { PCI_Y2_PHY1_POWD, PCI_Y2_PHY2_POWD };
-
-	/* looks like this XL is back asswards .. */
-	if (hw->chip_id == CHIP_ID_YUKON_XL && hw->chip_rev > 1)
-		onoff = !onoff;
+	static const u32 phy_power[] = { PCI_Y2_PHY1_POWD, PCI_Y2_PHY2_POWD };
+	static const u32 coma_mode[] = { PCI_Y2_PHY1_COMA, PCI_Y2_PHY2_COMA };
 
 	pci_read_config_dword(pdev, PCI_DEV_REG1, &reg1);
+	/* Turn on/off phy power saving */
 	if (onoff)
-		/* Turn off phy power saving */
 		reg1 &= ~phy_power[port];
 	else
 		reg1 |= phy_power[port];
 
+	if (onoff && hw->chip_id == CHIP_ID_YUKON_XL && hw->chip_rev > 1)
+		reg1 |= coma_mode[port];
+
 	pci_write_config_dword(pdev, PCI_DEV_REG1, reg1);
 	pci_read_config_dword(pdev, PCI_DEV_REG1, &reg1);
 

-- 
Stephen Hemminger <shemminger@linux-foundation.org>


  parent reply	other threads:[~2007-10-12  1:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-12  1:19 [PATCH 0/6] sky2 patches for net-2.6 Stephen Hemminger
2007-10-12  1:19 ` [PATCH 1/6] sky2: status polling loop Stephen Hemminger
2007-10-12  1:23   ` David Miller
2007-10-12  1:25     ` Stephen Hemminger
2007-10-12  1:29     ` [PATCH 1/6] sky2: status polling loop (post merge) Stephen Hemminger
2007-10-12  1:31       ` David Miller
2007-10-12  1:36         ` Stephen Hemminger
2007-10-12  1:19 ` [PATCH 2/6] sky2: ethtool register reserved area blackout Stephen Hemminger
2007-10-12  1:19 ` Stephen Hemminger [this message]
2007-10-12  1:19 ` [PATCH 4/6] sky2: fiber advertise bits initialization (trivial) Stephen Hemminger
2007-10-12  1:19 ` [PATCH 5/6] sky2: use netdevice stats struct Stephen Hemminger
2007-10-12  1:19 ` [PATCH 6/6] sky2: version 1.19 Stephen Hemminger

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=20071012012125.169362665@linux-foundation.org \
    --to=shemminger@linux-foundation.org \
    --cc=davem@davemloft.net \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.