netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 05/37] bridge-netfilter: dont overwrite memory outside of skb
       [not found] ` <20060906225444.GA15922@kroah.com>
@ 2006-09-06 22:55   ` Greg KH
  2006-09-06 22:57   ` [patch 32/37] sky2: accept flow control Greg KH
                     ` (5 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: Greg KH @ 2006-09-06 22:55 UTC (permalink / raw)
  To: linux-kernel, stable, David Miller
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, torvalds, akpm, alan,
	netdev, Stephen Hemminger, Greg Kroah-Hartman

[-- Attachment #1: bridge-netfilter-don-t-overwrite-memory-outside-of-skb.patch --]
[-- Type: text/plain, Size: 1987 bytes --]

-stable review patch.  If anyone has any objections, please let us know.

------------------
From: Stephen Hemminger <shemminger@osdl.org>

The bridge netfilter code needs to check for space at the
front of the skb before overwriting; otherwise if skb from
device doesn't have headroom, then it will cause random
memory corruption.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 include/linux/netfilter_bridge.h |   16 ++++++++++++----
 net/bridge/br_forward.c          |   10 +++++++---
 2 files changed, 19 insertions(+), 7 deletions(-)

--- linux-2.6.17.11.orig/include/linux/netfilter_bridge.h
+++ linux-2.6.17.11/include/linux/netfilter_bridge.h
@@ -47,18 +47,26 @@ enum nf_br_hook_priorities {
 #define BRNF_BRIDGED			0x08
 #define BRNF_NF_BRIDGE_PREROUTING	0x10
 
-
 /* Only used in br_forward.c */
-static inline
-void nf_bridge_maybe_copy_header(struct sk_buff *skb)
+static inline int nf_bridge_maybe_copy_header(struct sk_buff *skb)
 {
+	int err;
+
 	if (skb->nf_bridge) {
 		if (skb->protocol == __constant_htons(ETH_P_8021Q)) {
+			err = skb_cow(skb, 18);
+			if (err)
+				return err;
 			memcpy(skb->data - 18, skb->nf_bridge->data, 18);
 			skb_push(skb, 4);
-		} else
+		} else {
+			err = skb_cow(skb, 16);
+			if (err)
+				return err;
 			memcpy(skb->data - 16, skb->nf_bridge->data, 16);
+		}
 	}
+	return 0;
 }
 
 /* This is called by the IP fragmenting code and it ensures there is
--- linux-2.6.17.11.orig/net/bridge/br_forward.c
+++ linux-2.6.17.11/net/bridge/br_forward.c
@@ -43,11 +43,15 @@ int br_dev_queue_push_xmit(struct sk_buf
 	else {
 #ifdef CONFIG_BRIDGE_NETFILTER
 		/* ip_refrag calls ip_fragment, doesn't copy the MAC header. */
-		nf_bridge_maybe_copy_header(skb);
+		if (nf_bridge_maybe_copy_header(skb))
+			kfree_skb(skb);
+		else
 #endif
-		skb_push(skb, ETH_HLEN);
+		{
+			skb_push(skb, ETH_HLEN);
 
-		dev_queue_xmit(skb);
+			dev_queue_xmit(skb);
+		}
 	}
 
 	return 0;

--

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

* [patch 32/37] sky2: accept flow control
       [not found] ` <20060906225444.GA15922@kroah.com>
  2006-09-06 22:55   ` [patch 05/37] bridge-netfilter: dont overwrite memory outside of skb Greg KH
@ 2006-09-06 22:57   ` Greg KH
  2006-09-06 22:57   ` [patch 33/37] sky2: clear status IRQ after empty Greg KH
                     ` (4 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: Greg KH @ 2006-09-06 22:57 UTC (permalink / raw)
  To: linux-kernel, stable, Jeff Garzik
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, torvalds, akpm, alan,
	netdev, Stephen Hemminger, Greg Kroah-Hartman

[-- Attachment #1: sky2-pause-fixes.patch --]
[-- Type: text/plain, Size: 794 bytes --]

-stable review patch.  If anyone has any objections, please let us know.

------------------
From: Stephen Hemminger <shemminger@osdl.org>

Don't program the GMAC to reject flow control packets.
This maybe the cause of some of the transmit hangs.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/net/sky2.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-2.6.17.11.orig/drivers/net/sky2.h
+++ linux-2.6.17.11/drivers/net/sky2.h
@@ -1566,7 +1566,7 @@ enum {
 
 	GMR_FS_ANY_ERR	= GMR_FS_RX_FF_OV | GMR_FS_CRC_ERR |
 			  GMR_FS_FRAGMENT | GMR_FS_LONG_ERR |
-		  	  GMR_FS_MII_ERR | GMR_FS_BAD_FC | GMR_FS_GOOD_FC |
+		  	  GMR_FS_MII_ERR | GMR_FS_BAD_FC |
 			  GMR_FS_UN_SIZE | GMR_FS_JABBER,
 };
 

--

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

* [patch 33/37] sky2: clear status IRQ after empty
       [not found] ` <20060906225444.GA15922@kroah.com>
  2006-09-06 22:55   ` [patch 05/37] bridge-netfilter: dont overwrite memory outside of skb Greg KH
  2006-09-06 22:57   ` [patch 32/37] sky2: accept flow control Greg KH
@ 2006-09-06 22:57   ` Greg KH
  2006-09-06 22:57   ` [patch 34/37] sky2: use dev_alloc_skb for receive buffers Greg KH
                     ` (3 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: Greg KH @ 2006-09-06 22:57 UTC (permalink / raw)
  To: linux-kernel, stable, Jeff Garzik
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, torvalds, akpm, alan,
	netdev, Stephen Hemminger, Greg Kroah-Hartman

[-- Attachment #1: sky2-status-clr.patch --]
[-- Type: text/plain, Size: 1023 bytes --]

-stable review patch.  If anyone has any objections, please let us know.

------------------
From: Stephen Hemminger <shemminger@osdl.org>

Don't clear status IRQ until list has been read to avoid causing
status list wraparound. Clearing IRQ forces a Transmit Status update
if it is pending.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/net/sky2.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- linux-2.6.17.11.orig/drivers/net/sky2.c
+++ linux-2.6.17.11/drivers/net/sky2.c
@@ -2016,6 +2016,9 @@ static int sky2_status_intr(struct sky2_
 		}
 	}
 
+	/* Fully processed status ring so clear irq */
+	sky2_write32(hw, STAT_CTRL, SC_STAT_CLR_IRQ);
+
 exit_loop:
 	return work_done;
 }
@@ -2218,9 +2221,6 @@ static int sky2_poll(struct net_device *
 	*budget -= work_done;
 	dev0->quota -= work_done;
 
-	if (status & Y2_IS_STAT_BMU)
-		sky2_write32(hw, STAT_CTRL, SC_STAT_CLR_IRQ);
-
 	if (sky2_more_work(hw))
 		return 1;
 

--

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

* [patch 34/37] sky2: use dev_alloc_skb for receive buffers
       [not found] ` <20060906225444.GA15922@kroah.com>
                     ` (2 preceding siblings ...)
  2006-09-06 22:57   ` [patch 33/37] sky2: clear status IRQ after empty Greg KH
@ 2006-09-06 22:57   ` Greg KH
  2006-09-06 22:58   ` [patch 35/37] sky2: MSI test timing Greg KH
                     ` (2 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: Greg KH @ 2006-09-06 22:57 UTC (permalink / raw)
  To: linux-kernel, stable, Jeff Garzik
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, torvalds, akpm, alan,
	netdev, Stephen Hemminger, Greg Kroah-Hartman

[-- Attachment #1: sky2-dev-alloc.patch --]
[-- Type: text/plain, Size: 1472 bytes --]

-stable review patch.  If anyone has any objections, please let us know.

------------------
From: Stephen Hemminger <shemminger@osdl.org>

Several code paths assume an additional 16 bytes of header padding
on the receive path. Use dev_alloc_skb to get that padding.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/net/sky2.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- linux-2.6.17.11.orig/drivers/net/sky2.c
+++ linux-2.6.17.11/drivers/net/sky2.c
@@ -949,14 +949,14 @@ static void sky2_vlan_rx_kill_vid(struct
 /*
  * It appears the hardware has a bug in the FIFO logic that
  * cause it to hang if the FIFO gets overrun and the receive buffer
- * is not aligned. ALso alloc_skb() won't align properly if slab
+ * is not aligned. Also dev_alloc_skb() won't align properly if slab
  * debugging is enabled.
  */
 static inline struct sk_buff *sky2_alloc_skb(unsigned int size, gfp_t gfp_mask)
 {
 	struct sk_buff *skb;
 
-	skb = alloc_skb(size + RX_SKB_ALIGN, gfp_mask);
+	skb = __dev_alloc_skb(size + RX_SKB_ALIGN, gfp_mask);
 	if (likely(skb)) {
 		unsigned long p	= (unsigned long) skb->data;
 		skb_reserve(skb, ALIGN(p, RX_SKB_ALIGN) - p);
@@ -1855,7 +1855,7 @@ static struct sk_buff *sky2_receive(stru
 		goto oversize;
 
 	if (length < copybreak) {
-		skb = alloc_skb(length + 2, GFP_ATOMIC);
+		skb = dev_alloc_skb(length + 2);
 		if (!skb)
 			goto resubmit;
 

--

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

* [patch 35/37] sky2: MSI test timing
       [not found] ` <20060906225444.GA15922@kroah.com>
                     ` (3 preceding siblings ...)
  2006-09-06 22:57   ` [patch 34/37] sky2: use dev_alloc_skb for receive buffers Greg KH
@ 2006-09-06 22:58   ` Greg KH
  2006-09-06 22:58   ` [patch 36/37] sky2: fix fiber support Greg KH
  2006-09-06 22:58   ` [patch 37/37] sky2: version 1.6.1 Greg KH
  6 siblings, 0 replies; 11+ messages in thread
From: Greg KH @ 2006-09-06 22:58 UTC (permalink / raw)
  To: linux-kernel, stable, Jeff Garzik
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, torvalds, akpm, alan,
	netdev, Stephen Hemminger, Greg Kroah-Hartman

[-- Attachment #1: sky2-post-bug.patch --]
[-- Type: text/plain, Size: 1119 bytes --]

-stable review patch.  If anyone has any objections, please let us know.

------------------
From: Stephen Hemminger <shemminger@osdl.org>

The test for MSI IRQ could have timing issues. The PCI write needs to be 
pushed out before waiting, and the wait queue should be initialized before
the IRQ.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/net/sky2.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- linux-2.6.17.11.orig/drivers/net/sky2.c
+++ linux-2.6.17.11/drivers/net/sky2.c
@@ -3184,6 +3184,8 @@ static int __devinit sky2_test_msi(struc
 	struct pci_dev *pdev = hw->pdev;
 	int err;
 
+	init_waitqueue_head (&hw->msi_wait);
+
 	sky2_write32(hw, B0_IMSK, Y2_IS_IRQ_SW);
 
 	err = request_irq(pdev->irq, sky2_test_intr, SA_SHIRQ, DRV_NAME, hw);
@@ -3193,10 +3195,8 @@ static int __devinit sky2_test_msi(struc
 		return err;
 	}
 
-	init_waitqueue_head (&hw->msi_wait);
-
 	sky2_write8(hw, B0_CTST, CS_ST_SW_IRQ);
-	wmb();
+	sky2_read8(hw, B0_CTST);
 
 	wait_event_timeout(hw->msi_wait, hw->msi_detected, HZ/10);
 

--

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

* [patch 36/37] sky2: fix fiber support
       [not found] ` <20060906225444.GA15922@kroah.com>
                     ` (4 preceding siblings ...)
  2006-09-06 22:58   ` [patch 35/37] sky2: MSI test timing Greg KH
@ 2006-09-06 22:58   ` Greg KH
  2006-09-06 22:58   ` [patch 37/37] sky2: version 1.6.1 Greg KH
  6 siblings, 0 replies; 11+ messages in thread
From: Greg KH @ 2006-09-06 22:58 UTC (permalink / raw)
  To: linux-kernel, stable, Jeff Garzik
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, torvalds, akpm, alan,
	netdev, Stephen Hemminger, Greg Kroah-Hartman

[-- Attachment #1: sky2-fiber.patch --]
[-- Type: text/plain, Size: 7295 bytes --]

-stable review patch.  If anyone has any objections, please let us know.

------------------
From: Stephen Hemminger <shemminger@osdl.org>

Fix support for fiber based devices.  Needed to keep track of PMD type to
add workaround in setup. Add support for gigabit half duplex fiber.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/net/sky2.c |   81 ++++++++++++++++++++++++++++++++---------------------
 drivers/net/sky2.h |   15 +++++++++
 2 files changed, 63 insertions(+), 33 deletions(-)

--- linux-2.6.17.11.orig/drivers/net/sky2.c
+++ linux-2.6.17.11/drivers/net/sky2.c
@@ -321,7 +321,7 @@ static void sky2_phy_init(struct sky2_hw
 	}
 
 	ctrl = gm_phy_read(hw, port, PHY_MARV_PHY_CTRL);
-	if (hw->copper) {
+	if (sky2_is_copper(hw)) {
 		if (hw->chip_id == CHIP_ID_YUKON_FE) {
 			/* enable automatic crossover */
 			ctrl |= PHY_M_PC_MDI_XMODE(PHY_M_PC_ENA_AUTO) >> 1;
@@ -338,25 +338,37 @@ static void sky2_phy_init(struct sky2_hw
 				ctrl |= PHY_M_PC_DSC(2) | PHY_M_PC_DOWN_S_ENA;
 			}
 		}
-		gm_phy_write(hw, port, PHY_MARV_PHY_CTRL, ctrl);
 	} else {
 		/* workaround for deviation #4.88 (CRC errors) */
 		/* disable Automatic Crossover */
 
 		ctrl &= ~PHY_M_PC_MDIX_MSK;
-		gm_phy_write(hw, port, PHY_MARV_PHY_CTRL, ctrl);
+	}
 
-		if (hw->chip_id == CHIP_ID_YUKON_XL) {
-			/* Fiber: select 1000BASE-X only mode MAC Specific Ctrl Reg. */
-			gm_phy_write(hw, port, PHY_MARV_EXT_ADR, 2);
-			ctrl = gm_phy_read(hw, port, PHY_MARV_PHY_CTRL);
-			ctrl &= ~PHY_M_MAC_MD_MSK;
-			ctrl |= PHY_M_MAC_MODE_SEL(PHY_M_MAC_MD_1000BX);
-			gm_phy_write(hw, port, PHY_MARV_PHY_CTRL, ctrl);
+	gm_phy_write(hw, port, PHY_MARV_PHY_CTRL, ctrl);
+
+	/* special setup for PHY 88E1112 Fiber */
+	if (hw->chip_id == CHIP_ID_YUKON_XL && !sky2_is_copper(hw)) {
+		pg = gm_phy_read(hw, port, PHY_MARV_EXT_ADR);
 
+		/* Fiber: select 1000BASE-X only mode MAC Specific Ctrl Reg. */
+		gm_phy_write(hw, port, PHY_MARV_EXT_ADR, 2);
+		ctrl = gm_phy_read(hw, port, PHY_MARV_PHY_CTRL);
+		ctrl &= ~PHY_M_MAC_MD_MSK;
+		ctrl |= PHY_M_MAC_MODE_SEL(PHY_M_MAC_MD_1000BX);
+		gm_phy_write(hw, port, PHY_MARV_PHY_CTRL, ctrl);
+
+		if (hw->pmd_type  == 'P') {
 			/* select page 1 to access Fiber registers */
 			gm_phy_write(hw, port, PHY_MARV_EXT_ADR, 1);
+
+			/* for SFP-module set SIGDET polarity to low */
+			ctrl = gm_phy_read(hw, port, PHY_MARV_PHY_CTRL);
+			ctrl |= PHY_M_FIB_SIGD_POL;
+			gm_phy_write(hw, port, PHY_MARV_CTRL, ctrl);
 		}
+
+		gm_phy_write(hw, port, PHY_MARV_EXT_ADR, pg);
 	}
 
 	ctrl = gm_phy_read(hw, port, PHY_MARV_CTRL);
@@ -373,7 +385,7 @@ static void sky2_phy_init(struct sky2_hw
 	adv = PHY_AN_CSMA;
 
 	if (sky2->autoneg == AUTONEG_ENABLE) {
-		if (hw->copper) {
+		if (sky2_is_copper(hw)) {
 			if (sky2->advertising & ADVERTISED_1000baseT_Full)
 				ct1000 |= PHY_M_1000C_AFD;
 			if (sky2->advertising & ADVERTISED_1000baseT_Half)
@@ -386,8 +398,12 @@ static void sky2_phy_init(struct sky2_hw
 				adv |= PHY_M_AN_10_FD;
 			if (sky2->advertising & ADVERTISED_10baseT_Half)
 				adv |= PHY_M_AN_10_HD;
-		} else		/* special defines for FIBER (88E1011S only) */
-			adv |= PHY_M_AN_1000X_AHD | PHY_M_AN_1000X_AFD;
+		} else {	/* special defines for FIBER (88E1040S only) */
+			if (sky2->advertising & ADVERTISED_1000baseT_Full)
+				adv |= PHY_M_AN_1000X_AFD;
+			if (sky2->advertising & ADVERTISED_1000baseT_Half)
+				adv |= PHY_M_AN_1000X_AHD;
+		}
 
 		/* Set Flow-control capabilities */
 		if (sky2->tx_pause && sky2->rx_pause)
@@ -1497,7 +1513,7 @@ static int sky2_down(struct net_device *
 
 static u16 sky2_phy_speed(const struct sky2_hw *hw, u16 aux)
 {
-	if (!hw->copper)
+	if (!sky2_is_copper(hw))
 		return SPEED_1000;
 
 	if (hw->chip_id == CHIP_ID_YUKON_FE)
@@ -2287,7 +2303,7 @@ static inline u32 sky2_clk2us(const stru
 static int __devinit sky2_reset(struct sky2_hw *hw)
 {
 	u16 status;
-	u8 t8, pmd_type;
+	u8 t8;
 	int i;
 
 	sky2_write8(hw, B0_CTST, CS_RST_CLR);
@@ -2333,9 +2349,7 @@ static int __devinit sky2_reset(struct s
 		sky2_pci_write32(hw, PEX_UNC_ERR_STAT, 0xffffffffUL);
 
 
-	pmd_type = sky2_read8(hw, B2_PMD_TYP);
-	hw->copper = !(pmd_type == 'L' || pmd_type == 'S');
-
+	hw->pmd_type = sky2_read8(hw, B2_PMD_TYP);
 	hw->ports = 1;
 	t8 = sky2_read8(hw, B2_Y2_HW_RES);
 	if ((t8 & CFG_DUAL_MAC_MSK) == CFG_DUAL_MAC_MSK) {
@@ -2432,21 +2446,22 @@ static int __devinit sky2_reset(struct s
 
 static u32 sky2_supported_modes(const struct sky2_hw *hw)
 {
-	u32 modes;
-	if (hw->copper) {
-		modes = SUPPORTED_10baseT_Half
-		    | SUPPORTED_10baseT_Full
-		    | SUPPORTED_100baseT_Half
-		    | SUPPORTED_100baseT_Full
-		    | SUPPORTED_Autoneg | SUPPORTED_TP;
+	if (sky2_is_copper(hw)) {
+		u32 modes = SUPPORTED_10baseT_Half
+			| SUPPORTED_10baseT_Full
+			| SUPPORTED_100baseT_Half
+			| SUPPORTED_100baseT_Full
+			| SUPPORTED_Autoneg | SUPPORTED_TP;
 
 		if (hw->chip_id != CHIP_ID_YUKON_FE)
 			modes |= SUPPORTED_1000baseT_Half
-			    | SUPPORTED_1000baseT_Full;
+				| SUPPORTED_1000baseT_Full;
+		return modes;
 	} else
-		modes = SUPPORTED_1000baseT_Full | SUPPORTED_FIBRE
-		    | SUPPORTED_Autoneg;
-	return modes;
+		return  SUPPORTED_1000baseT_Half
+			| SUPPORTED_1000baseT_Full
+			| SUPPORTED_Autoneg
+			| SUPPORTED_FIBRE;
 }
 
 static int sky2_get_settings(struct net_device *dev, struct ethtool_cmd *ecmd)
@@ -2457,7 +2472,7 @@ static int sky2_get_settings(struct net_
 	ecmd->transceiver = XCVR_INTERNAL;
 	ecmd->supported = sky2_supported_modes(hw);
 	ecmd->phy_address = PHY_ADDR_MARV;
-	if (hw->copper) {
+	if (sky2_is_copper(hw)) {
 		ecmd->supported = SUPPORTED_10baseT_Half
 		    | SUPPORTED_10baseT_Full
 		    | SUPPORTED_100baseT_Half
@@ -2466,12 +2481,14 @@ static int sky2_get_settings(struct net_
 		    | SUPPORTED_1000baseT_Full
 		    | SUPPORTED_Autoneg | SUPPORTED_TP;
 		ecmd->port = PORT_TP;
-	} else
+		ecmd->speed = sky2->speed;
+	} else {
+		ecmd->speed = SPEED_1000;
 		ecmd->port = PORT_FIBRE;
+	}
 
 	ecmd->advertising = sky2->advertising;
 	ecmd->autoneg = sky2->autoneg;
-	ecmd->speed = sky2->speed;
 	ecmd->duplex = sky2->duplex;
 	return 0;
 }
--- linux-2.6.17.11.orig/drivers/net/sky2.h
+++ linux-2.6.17.11/drivers/net/sky2.h
@@ -1318,6 +1318,14 @@ enum {
 };
 
 /* for Yukon-2 Gigabit Ethernet PHY (88E1112 only) */
+/*****  PHY_MARV_PHY_CTRL (page 1)		16 bit r/w	Fiber Specific Ctrl *****/
+enum {
+	PHY_M_FIB_FORCE_LNK	= 1<<10,/* Force Link Good */
+	PHY_M_FIB_SIGD_POL	= 1<<9,	/* SIGDET Polarity */
+	PHY_M_FIB_TX_DIS	= 1<<3,	/* Transmitter Disable */
+};
+
+/* for Yukon-2 Gigabit Ethernet PHY (88E1112 only) */
 /*****  PHY_MARV_PHY_CTRL (page 2)		16 bit r/w	MAC Specific Ctrl *****/
 enum {
 	PHY_M_MAC_MD_MSK	= 7<<7, /* Bit  9.. 7: Mode Select Mask */
@@ -1879,7 +1887,7 @@ struct sky2_hw {
 	int		     pm_cap;
 	u8	     	     chip_id;
 	u8		     chip_rev;
-	u8		     copper;
+	u8		     pmd_type;
 	u8		     ports;
 
 	struct sky2_status_le *st_le;
@@ -1891,6 +1899,11 @@ struct sky2_hw {
 	wait_queue_head_t    msi_wait;
 };
 
+static inline int sky2_is_copper(const struct sky2_hw *hw)
+{
+	return !(hw->pmd_type == 'L' || hw->pmd_type == 'S' || hw->pmd_type == 'P');
+}
+
 /* Register accessor for memory mapped device */
 static inline u32 sky2_read32(const struct sky2_hw *hw, unsigned reg)
 {

--

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

* [patch 37/37] sky2: version 1.6.1
       [not found] ` <20060906225444.GA15922@kroah.com>
                     ` (5 preceding siblings ...)
  2006-09-06 22:58   ` [patch 36/37] sky2: fix fiber support Greg KH
@ 2006-09-06 22:58   ` Greg KH
  2006-09-07 19:25     ` Pavel Machek
  6 siblings, 1 reply; 11+ messages in thread
From: Greg KH @ 2006-09-06 22:58 UTC (permalink / raw)
  To: linux-kernel, stable, Jeff Garzik
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, torvalds, akpm, alan,
	netdev, Stephen Hemminger, Greg Kroah-Hartman

[-- Attachment #1: sky2-dotvers.patch --]
[-- Type: text/plain, Size: 661 bytes --]

-stable review patch.  If anyone has any objections, please let us know.

------------------
From: Stephen Hemminger <shemminger@osdl.org>

Since this code incorporates some of the fixes from 2.6.18, change
the version number.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/net/sky2.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-2.6.17.11.orig/drivers/net/sky2.c
+++ linux-2.6.17.11/drivers/net/sky2.c
@@ -51,7 +51,7 @@
 #include "sky2.h"
 
 #define DRV_NAME		"sky2"
-#define DRV_VERSION		"1.4"
+#define DRV_VERSION		"1.6.1"
 #define PFX			DRV_NAME " "
 
 /*

--

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

* Re: [patch 37/37] sky2: version 1.6.1
  2006-09-06 22:58   ` [patch 37/37] sky2: version 1.6.1 Greg KH
@ 2006-09-07 19:25     ` Pavel Machek
  2006-09-07 20:34       ` Greg KH
  0 siblings, 1 reply; 11+ messages in thread
From: Pavel Machek @ 2006-09-07 19:25 UTC (permalink / raw)
  To: Greg KH
  Cc: linux-kernel, stable, Jeff Garzik, Justin Forbes, Zwane Mwaikambo,
	Theodore Ts'o, Randy Dunlap, Dave Jones, Chuck Wolber,
	Chris Wedgwood, torvalds, akpm, alan, netdev, Stephen Hemminger

On Wed 06-09-06 15:58:12, Greg KH wrote:
> -stable review patch.  If anyone has any objections, please let us know.
> 
> ------------------
> From: Stephen Hemminger <shemminger@osdl.org>
> 
> Since this code incorporates some of the fixes from 2.6.18, change
> the version number.
> 
> Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

Not sure, one of 'stable' criteria is 'fixes bad bug'. What bug does
this fix?

							Pavel
-- 
Thanks for all the (sleeping) penguins.

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

* Re: [patch 37/37] sky2: version 1.6.1
  2006-09-07 19:25     ` Pavel Machek
@ 2006-09-07 20:34       ` Greg KH
  2006-09-07 21:03         ` Pavel Machek
  0 siblings, 1 reply; 11+ messages in thread
From: Greg KH @ 2006-09-07 20:34 UTC (permalink / raw)
  To: Pavel Machek
  Cc: linux-kernel, stable, Jeff Garzik, Justin Forbes, Zwane Mwaikambo,
	Theodore Ts'o, Randy Dunlap, Dave Jones, Chuck Wolber,
	Chris Wedgwood, torvalds, akpm, alan, netdev, Stephen Hemminger

On Thu, Sep 07, 2006 at 07:25:28PM +0000, Pavel Machek wrote:
> On Wed 06-09-06 15:58:12, Greg KH wrote:
> > -stable review patch.  If anyone has any objections, please let us know.
> > 
> > ------------------
> > From: Stephen Hemminger <shemminger@osdl.org>
> > 
> > Since this code incorporates some of the fixes from 2.6.18, change
> > the version number.
> > 
> > Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
> > Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
> 
> Not sure, one of 'stable' criteria is 'fixes bad bug'. What bug does
> this fix?

The previous 5 patches changed this driver, so changing the version
number of it is acceptable to me.

thanks,

greg k-h

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

* Re: [patch 37/37] sky2: version 1.6.1
  2006-09-07 20:34       ` Greg KH
@ 2006-09-07 21:03         ` Pavel Machek
  2006-09-07 21:50           ` Stephen Hemminger
  0 siblings, 1 reply; 11+ messages in thread
From: Pavel Machek @ 2006-09-07 21:03 UTC (permalink / raw)
  To: Greg KH
  Cc: linux-kernel, stable, Jeff Garzik, Justin Forbes, Zwane Mwaikambo,
	Theodore Ts'o, Randy Dunlap, Dave Jones, Chuck Wolber,
	Chris Wedgwood, torvalds, akpm, alan, netdev, Stephen Hemminger

Hi!

> > > -stable review patch.  If anyone has any objections, please let us know.
> > > 
> > > ------------------
> > > From: Stephen Hemminger <shemminger@osdl.org>
> > > 
> > > Since this code incorporates some of the fixes from 2.6.18, change
> > > the version number.
> > > 
> > > Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
> > > Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
> > 
> > Not sure, one of 'stable' criteria is 'fixes bad bug'. What bug does
> > this fix?
> 
> The previous 5 patches changed this driver, so changing the version
> number of it is acceptable to me.

Well... I agree that version change is understandable, but it will be
also surprising for the users, and stable rules were quite strict with
"must fix obvious bug"...
								Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

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

* Re: [patch 37/37] sky2: version 1.6.1
  2006-09-07 21:03         ` Pavel Machek
@ 2006-09-07 21:50           ` Stephen Hemminger
  0 siblings, 0 replies; 11+ messages in thread
From: Stephen Hemminger @ 2006-09-07 21:50 UTC (permalink / raw)
  To: Pavel Machek
  Cc: Greg KH, linux-kernel, stable, Jeff Garzik, Justin Forbes,
	Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap, Dave Jones,
	Chuck Wolber, Chris Wedgwood, torvalds, akpm, alan, netdev

On Thu, 7 Sep 2006 23:03:46 +0200
Pavel Machek <pavel@suse.cz> wrote:

> Hi!
> 
> > > > -stable review patch.  If anyone has any objections, please let us know.
> > > > 
> > > > ------------------
> > > > From: Stephen Hemminger <shemminger@osdl.org>
> > > > 
> > > > Since this code incorporates some of the fixes from 2.6.18, change
> > > > the version number.
> > > > 
> > > > Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
> > > > Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
> > > 
> > > Not sure, one of 'stable' criteria is 'fixes bad bug'. What bug does
> > > this fix?
> > 
> > The previous 5 patches changed this driver, so changing the version
> > number of it is acceptable to me.
> 
> Well... I agree that version change is understandable, but it will be
> also surprising for the users, and stable rules were quite strict with
> "must fix obvious bug"...
> 

I get lots of bug reports which are from distro and other kernels
that cherrypick code from stable. How am I supposed to know if it
is a new or old problem?

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

end of thread, other threads:[~2006-09-07 21:53 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20060906224631.999046890@quad.kroah.org>
     [not found] ` <20060906225444.GA15922@kroah.com>
2006-09-06 22:55   ` [patch 05/37] bridge-netfilter: dont overwrite memory outside of skb Greg KH
2006-09-06 22:57   ` [patch 32/37] sky2: accept flow control Greg KH
2006-09-06 22:57   ` [patch 33/37] sky2: clear status IRQ after empty Greg KH
2006-09-06 22:57   ` [patch 34/37] sky2: use dev_alloc_skb for receive buffers Greg KH
2006-09-06 22:58   ` [patch 35/37] sky2: MSI test timing Greg KH
2006-09-06 22:58   ` [patch 36/37] sky2: fix fiber support Greg KH
2006-09-06 22:58   ` [patch 37/37] sky2: version 1.6.1 Greg KH
2006-09-07 19:25     ` Pavel Machek
2006-09-07 20:34       ` Greg KH
2006-09-07 21:03         ` Pavel Machek
2006-09-07 21:50           ` Stephen Hemminger

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).