Skip to contentSkip to conversation

skge/sky2 patches for 2.6.21

PATCH In review Stephen Hemminger 2 participants 6 messages Apr 7, 2007 – Apr 11, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover skge/sky2 patches for 2.6.21

These are little bug fixes found on skge/sky2 driver. I based these on netdev-2.6#upstream-fixes

--

#1 lore raw

PATCH 1/4 skge: turn carrier off when down

Driver needs to turn off carrier when down, otherwise it can confuse bonding and bridging and looks like carrier is on immediately when it is brought back up.

drivers/net/skge.c +1 -0
@@ -2535,6 +2535,7 @@
 		printk(KERN_INFO PFX "%s: disabling interface\n", dev->name);
 
 	netif_stop_queue(dev);
+	netif_carrier_off(dev);
 	if (hw->chip_id == CHIP_ID_GENESIS && hw->phy_type == SK_PHY_XMAC)
 		del_timer_sync(&skge->link_timer);
 

--

#2 lore raw

Re: [PATCH 1/4] skge: turn carrier off when down

Quoted 10 lines · Stephen Hemminger

Driver needs to turn off carrier when down, otherwise it can confuse bonding and bridging and looks like carrier is on immediately when it is brought back up.

drivers/net/skge.c line 2541

Quoted 7 lines
drivers/net/skge.c +1 -0
@@ -2535,6 +2535,7 @@
 		printk(KERN_INFO PFX "%s: disabling interface\n", dev->name);
 
 	netif_stop_queue(dev);
+	netif_carrier_off(dev);
 	if (hw->chip_id == CHIP_ID_GENESIS && hw->phy_type == SK_PHY_XMAC)
 		del_timer_sync(&skge->link_timer);
 

applied 1-4

#4 lore raw

PATCH 3/4 sky2: turn on clocks when doing resume

In reply to Stephen Hemminger

Some of these chips are disabled until clock is enabled. This fixes:

     http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=404107
drivers/net/sky2.c +5 -0
@@ -3770,6 +3770,11 @@
 		goto out;
 
 	pci_enable_wake(pdev, PCI_D0, 0);
+
+	/* Re-enable all clocks */
+	if (hw->chip_id == CHIP_ID_YUKON_EX || hw->chip_id == CHIP_ID_YUKON_EC_U)
+		sky2_pci_write32(hw, PCI_DEV_REG3, 0);
+
 	sky2_reset(hw);
 
 	sky2_write32(hw, B0_IMSK, Y2_IS_BASE);

--

#5 lore raw

PATCH 4/4 sky2: phy workarounds for Yukon EC-U A1

In reply to Stephen Hemminger

The workaround Yukon EC-U wasn't comparing with correct version and wasn't doing correct setup. Without it, 88e8056 throws all sorts of errors.

drivers/net/sky2.c +3 -3
@@ -510,9 +510,9 @@
 		ledover &= ~PHY_M_LED_MO_RX;
 	}
 
-	if (hw->chip_id == CHIP_ID_YUKON_EC_U && hw->chip_rev == CHIP_REV_YU_EC_A1) {
+	if (hw->chip_id == CHIP_ID_YUKON_EC_U &&
+	    hw->chip_rev == CHIP_REV_YU_EC_U_A1) {
 		/* apply fixes in PHY AFE */
-		pg = gm_phy_read(hw, port, PHY_MARV_EXT_ADR);
 		gm_phy_write(hw, port, PHY_MARV_EXT_ADR, 255);
 
 		/* increase differential signal amplitude in 10BASE-T */
@@ -524,7 +524,7 @@
 		gm_phy_write(hw, port, 0x17, 0x2002);
 
 		/* set page register to 0 */
-		gm_phy_write(hw, port, PHY_MARV_EXT_ADR, pg);
+		gm_phy_write(hw, port, PHY_MARV_EXT_ADR, 0);
 	} else if (hw->chip_id != CHIP_ID_YUKON_EX) {
 		gm_phy_write(hw, port, PHY_MARV_LED_CTRL, ledctrl);
 

--