All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] sky2 minor driver updates
@ 2010-03-29 17:36 Stephen Hemminger
  2010-03-29 17:36 ` [PATCH 1/3] sky2: support Yukon EC_U rev B1 and later Stephen Hemminger
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Stephen Hemminger @ 2010-03-29 17:36 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev

These are minor changes related to chip versions as described
in current Marvell driver.
-- 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/3] sky2: support Yukon EC_U rev B1 and later
  2010-03-29 17:36 [PATCH 0/3] sky2 minor driver updates Stephen Hemminger
@ 2010-03-29 17:36 ` Stephen Hemminger
  2010-03-29 17:36 ` [PATCH 2/3] sky2: add XL revisions Stephen Hemminger
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Stephen Hemminger @ 2010-03-29 17:36 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev

[-- Attachment #1: sky2-ec-u-b1.patch --]
[-- Type: text/plain, Size: 2155 bytes --]

Need to change logic to support later versions of Yukon 2 EC_U chip.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

--- a/drivers/net/sky2.c	2010-03-29 08:48:16.490429444 -0700
+++ b/drivers/net/sky2.c	2010-03-29 09:27:36.485594685 -0700
@@ -876,6 +876,10 @@ static void sky2_mac_init(struct sky2_hw
 
 	if (hw->dev[port]->mtu > ETH_DATA_LEN)
 		reg |= GM_SMOD_JUMBO_ENA;
+
+	if (hw->chip_id == CHIP_ID_YUKON_EC_U &&
+	    hw->chip_rev == CHIP_REV_YU_EC_U_B1)
+		reg |= GM_NEW_FLOW_CTRL;
 
 	gma_write16(hw, port, GM_SERIAL_MODE, reg);
 
@@ -1413,8 +1417,7 @@ static void sky2_rx_start(struct sky2_po
 	/* These chips have no ram buffer?
 	 * MAC Rx RAM Read is controlled by hardware */
 	if (hw->chip_id == CHIP_ID_YUKON_EC_U &&
-	    (hw->chip_rev == CHIP_REV_YU_EC_U_A1 ||
-	     hw->chip_rev == CHIP_REV_YU_EC_U_B0))
+	    hw->chip_rev > CHIP_REV_YU_EC_U_A0)
 		sky2_write32(hw, Q_ADDR(rxq, Q_TEST), F_M_RX_RAM_DIS);
 
 	sky2_prefetch_init(hw, rxq, sky2->rx_le_map, RX_LE_SIZE - 1);
--- a/drivers/net/sky2.h	2010-03-29 08:52:02.480429332 -0700
+++ b/drivers/net/sky2.h	2010-03-29 09:25:32.122900699 -0700
@@ -557,6 +557,7 @@ enum yukon_ec_u_rev {
 	CHIP_REV_YU_EC_U_A0  = 1,
 	CHIP_REV_YU_EC_U_A1  = 2,
 	CHIP_REV_YU_EC_U_B0  = 3,
+	CHIP_REV_YU_EC_U_B1  = 5,
 };
 enum yukon_fe_rev {
 	CHIP_REV_YU_FE_A1    = 1,
@@ -1775,10 +1776,13 @@ enum {
 /*	GM_SERIAL_MODE			16 bit r/w	Serial Mode Register */
 enum {
 	GM_SMOD_DATABL_MSK	= 0x1f<<11, /* Bit 15..11:	Data Blinder (r/o) */
-	GM_SMOD_LIMIT_4		= 1<<10, /* Bit 10:	4 consecutive Tx trials */
-	GM_SMOD_VLAN_ENA	= 1<<9,	/* Bit  9:	Enable VLAN  (Max. Frame Len) */
-	GM_SMOD_JUMBO_ENA	= 1<<8,	/* Bit  8:	Enable Jumbo (Max. Frame Len) */
-	 GM_SMOD_IPG_MSK	= 0x1f	/* Bit 4..0:	Inter-Packet Gap (IPG) */
+	GM_SMOD_LIMIT_4		= 1<<10, /* 4 consecutive Tx trials */
+	GM_SMOD_VLAN_ENA	= 1<<9,	 /* Enable VLAN  (Max. Frame Len) */
+	GM_SMOD_JUMBO_ENA	= 1<<8,	 /* Enable Jumbo (Max. Frame Len) */
+
+	GM_NEW_FLOW_CTRL	= 1<<6,	 /* Enable New Flow-Control */
+
+	GM_SMOD_IPG_MSK		= 0x1f	 /* Bit 4..0:	Inter-Packet Gap (IPG) */
 };
 
 #define DATA_BLIND_VAL(x)	(((x)<<11) & GM_SMOD_DATABL_MSK)

-- 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 2/3] sky2: add XL revisions
  2010-03-29 17:36 [PATCH 0/3] sky2 minor driver updates Stephen Hemminger
  2010-03-29 17:36 ` [PATCH 1/3] sky2: support Yukon EC_U rev B1 and later Stephen Hemminger
@ 2010-03-29 17:36 ` Stephen Hemminger
  2010-03-29 17:36 ` [PATCH 3/3] sky2: avoid duplicate link up on Optima chip Stephen Hemminger
  2010-03-31  2:45 ` [PATCH 0/3] sky2 minor driver updates David Miller
  3 siblings, 0 replies; 5+ messages in thread
From: Stephen Hemminger @ 2010-03-29 17:36 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev

[-- Attachment #1: sky2-xl-rev.patch --]
[-- Type: text/plain, Size: 2288 bytes --]

Add definitions for Yukon XL revisions.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

--- a/drivers/net/sky2.h	2010-03-29 09:25:32.122900699 -0700
+++ b/drivers/net/sky2.h	2010-03-29 09:27:47.582049092 -0700
@@ -548,6 +548,14 @@ enum {
 	CHIP_ID_YUKON_UL_2 = 0xba, /* YUKON-2 Ultra 2 */
 	CHIP_ID_YUKON_OPT  = 0xbc, /* YUKON-2 Optima */
 };
+
+enum yukon_xl_rev {
+	CHIP_REV_YU_XL_A0  = 0,
+	CHIP_REV_YU_XL_A1  = 1,
+	CHIP_REV_YU_XL_A2  = 2,
+	CHIP_REV_YU_XL_A3  = 3,
+};
+
 enum yukon_ec_rev {
 	CHIP_REV_YU_EC_A1    = 0,  /* Chip Rev. for Yukon-EC A1/A0 */
 	CHIP_REV_YU_EC_A2    = 1,  /* Chip Rev. for Yukon-EC A2 */
--- a/drivers/net/sky2.c	2010-03-29 09:27:44.992064516 -0700
+++ b/drivers/net/sky2.c	2010-03-29 09:27:47.582049092 -0700
@@ -226,7 +226,7 @@ static void sky2_power_on(struct sky2_hw
 	/* disable Core Clock Division, */
 	sky2_write32(hw, B2_Y2_CLK_CTRL, Y2_CLK_DIV_DIS);
 
-	if (hw->chip_id == CHIP_ID_YUKON_XL && hw->chip_rev > 1)
+	if (hw->chip_id == CHIP_ID_YUKON_XL && hw->chip_rev > CHIP_REV_YU_XL_A1)
 		/* enable bits are inverted */
 		sky2_write8(hw, B2_Y2_CLK_GATE,
 			    Y2_PCI_CLK_LNK1_DIS | Y2_COR_CLK_LNK1_DIS |
@@ -268,7 +268,7 @@ static void sky2_power_on(struct sky2_hw
 
 static void sky2_power_aux(struct sky2_hw *hw)
 {
-	if (hw->chip_id == CHIP_ID_YUKON_XL && hw->chip_rev > 1)
+	if (hw->chip_id == CHIP_ID_YUKON_XL && hw->chip_rev > CHIP_REV_YU_XL_A1)
 		sky2_write8(hw, B2_Y2_CLK_GATE, 0);
 	else
 		/* enable bits are inverted */
@@ -651,7 +651,7 @@ static void sky2_phy_power_up(struct sky
 	reg1 = sky2_pci_read32(hw, PCI_DEV_REG1);
 	reg1 &= ~phy_power[port];
 
-	if (hw->chip_id == CHIP_ID_YUKON_XL && hw->chip_rev > 1)
+	if (hw->chip_id == CHIP_ID_YUKON_XL && hw->chip_rev > CHIP_REV_YU_XL_A1)
 		reg1 |= coma_mode[port];
 
 	sky2_pci_write32(hw, PCI_DEV_REG1, reg1);
@@ -823,7 +823,9 @@ static void sky2_mac_init(struct sky2_hw
 
 	sky2_write8(hw, SK_REG(port, GMAC_CTRL), GMC_RST_CLR);
 
-	if (hw->chip_id == CHIP_ID_YUKON_XL && hw->chip_rev == 0 && port == 1) {
+	if (hw->chip_id == CHIP_ID_YUKON_XL &&
+	    hw->chip_rev == CHIP_REV_YU_XL_A0 &&
+	    port == 1) {
 		/* WA DEV_472 -- looks like crossed wires on port 2 */
 		/* clear GMAC 1 Control reset */
 		sky2_write8(hw, SK_REG(0, GMAC_CTRL), GMC_RST_CLR);

-- 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 3/3] sky2: avoid duplicate link up on Optima chip
  2010-03-29 17:36 [PATCH 0/3] sky2 minor driver updates Stephen Hemminger
  2010-03-29 17:36 ` [PATCH 1/3] sky2: support Yukon EC_U rev B1 and later Stephen Hemminger
  2010-03-29 17:36 ` [PATCH 2/3] sky2: add XL revisions Stephen Hemminger
@ 2010-03-29 17:36 ` Stephen Hemminger
  2010-03-31  2:45 ` [PATCH 0/3] sky2 minor driver updates David Miller
  3 siblings, 0 replies; 5+ messages in thread
From: Stephen Hemminger @ 2010-03-29 17:36 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev

[-- Attachment #1: sky2-ul-link-up.patch --]
[-- Type: text/plain, Size: 597 bytes --]

The Optima version has feature to detect link quickly without PHY interrupt,
but it causes duplicate link up events.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

--- a/drivers/net/sky2.c	2010-03-29 10:29:17.530956219 -0700
+++ b/drivers/net/sky2.c	2010-03-29 10:29:18.261894374 -0700
@@ -2146,7 +2146,8 @@ static void sky2_phy_intr(struct sky2_hw
 		   istatus, phystat);
 
 	if (istatus & PHY_M_IS_AN_COMPL) {
-		if (sky2_autoneg_done(sky2, phystat) == 0)
+		if (sky2_autoneg_done(sky2, phystat) == 0 &&
+		    !netif_carrier_ok(dev))
 			sky2_link_up(sky2);
 		goto out;
 	}

-- 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/3] sky2 minor driver updates
  2010-03-29 17:36 [PATCH 0/3] sky2 minor driver updates Stephen Hemminger
                   ` (2 preceding siblings ...)
  2010-03-29 17:36 ` [PATCH 3/3] sky2: avoid duplicate link up on Optima chip Stephen Hemminger
@ 2010-03-31  2:45 ` David Miller
  3 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2010-03-31  2:45 UTC (permalink / raw)
  To: shemminger; +Cc: netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Mon, 29 Mar 2010 10:36:17 -0700

> These are minor changes related to chip versions as described
> in current Marvell driver.

Applied to net-next-2.6, thanks.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-03-31  2:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-29 17:36 [PATCH 0/3] sky2 minor driver updates Stephen Hemminger
2010-03-29 17:36 ` [PATCH 1/3] sky2: support Yukon EC_U rev B1 and later Stephen Hemminger
2010-03-29 17:36 ` [PATCH 2/3] sky2: add XL revisions Stephen Hemminger
2010-03-29 17:36 ` [PATCH 3/3] sky2: avoid duplicate link up on Optima chip Stephen Hemminger
2010-03-31  2:45 ` [PATCH 0/3] sky2 minor driver updates David Miller

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.