All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next-2.6 1/2] cxgb3: FIx VLAN over Jumbo frames
@ 2010-02-13 19:44 Divy Le Ray
  2010-02-13 19:44 ` [PATCH net-next-2.6 2/2] cxgb3: fix link flap Divy Le Ray
  2010-02-16  5:53 ` [PATCH net-next-2.6 1/2] cxgb3: FIx VLAN over Jumbo frames David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Divy Le Ray @ 2010-02-13 19:44 UTC (permalink / raw)
  To: davem; +Cc: netdev, linux-kernel, swise

From: Divy Le Ray <divy@chelsio.com>

The mac is expected to auto-inflate the Maximum Frame size for VLAN
tagged frames. It however does not work with jumbo frames.
Work around the bug adding 4 to the Maximum Frame for MTUs
greater than 1536.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
---

 drivers/net/cxgb3/xgmac.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)


diff --git a/drivers/net/cxgb3/xgmac.c b/drivers/net/cxgb3/xgmac.c
index 0109ee4..0c08de5 100644
--- a/drivers/net/cxgb3/xgmac.c
+++ b/drivers/net/cxgb3/xgmac.c
@@ -353,6 +353,9 @@ int t3_mac_set_mtu(struct cmac *mac, unsigned int mtu)
 	 * packet size register includes header, but not FCS.
 	 */
 	mtu += 14;
+	if (mtu > 1536)
+		mtu += 4;
+
 	if (mtu > MAX_FRAME_SIZE - 4)
 		return -EINVAL;
 	t3_write_reg(adap, A_XGM_RX_MAX_PKT_SIZE + mac->offset, mtu);


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

* [PATCH net-next-2.6 2/2] cxgb3: fix link flap
  2010-02-13 19:44 [PATCH net-next-2.6 1/2] cxgb3: FIx VLAN over Jumbo frames Divy Le Ray
@ 2010-02-13 19:44 ` Divy Le Ray
  2010-02-16  5:53   ` David Miller
  2010-02-16  5:53 ` [PATCH net-next-2.6 1/2] cxgb3: FIx VLAN over Jumbo frames David Miller
  1 sibling, 1 reply; 4+ messages in thread
From: Divy Le Ray @ 2010-02-13 19:44 UTC (permalink / raw)
  To: davem; +Cc: netdev, linux-kernel, swise

From: Divy Le Ray <divy@chelsio.com>

The driver is expected to report that the link is up
when the phy Rx signal is established and the mac
has not detected a link fault.
The code is however broken, the driver does not check the link fault
status when the phy link status changes.
The link fault status being checked within a short period of time,
it leads to link up/link down events.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
---

 drivers/net/cxgb3/t3_hw.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)


diff --git a/drivers/net/cxgb3/t3_hw.c b/drivers/net/cxgb3/t3_hw.c
index 032cfe0..3ab9f51 100644
--- a/drivers/net/cxgb3/t3_hw.c
+++ b/drivers/net/cxgb3/t3_hw.c
@@ -1262,7 +1262,8 @@ void t3_link_changed(struct adapter *adapter, int port_id)
 		lc->fc = fc;
 	}
 
-	t3_os_link_changed(adapter, port_id, link_ok, speed, duplex, fc);
+	t3_os_link_changed(adapter, port_id, link_ok && !pi->link_fault,
+			   speed, duplex, fc);
 }
 
 void t3_link_fault(struct adapter *adapter, int port_id)


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

* Re: [PATCH net-next-2.6 1/2] cxgb3: FIx VLAN over Jumbo frames
  2010-02-13 19:44 [PATCH net-next-2.6 1/2] cxgb3: FIx VLAN over Jumbo frames Divy Le Ray
  2010-02-13 19:44 ` [PATCH net-next-2.6 2/2] cxgb3: fix link flap Divy Le Ray
@ 2010-02-16  5:53 ` David Miller
  1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2010-02-16  5:53 UTC (permalink / raw)
  To: divy; +Cc: netdev, linux-kernel, swise

From: Divy Le Ray <divy@chelsio.com>
Date: Sat, 13 Feb 2010 11:44:30 -0800

> From: Divy Le Ray <divy@chelsio.com>
> 
> The mac is expected to auto-inflate the Maximum Frame size for VLAN
> tagged frames. It however does not work with jumbo frames.
> Work around the bug adding 4 to the Maximum Frame for MTUs
> greater than 1536.
> 
> Signed-off-by: Divy Le Ray <divy@chelsio.com>

Applied.

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

* Re: [PATCH net-next-2.6 2/2] cxgb3: fix link flap
  2010-02-13 19:44 ` [PATCH net-next-2.6 2/2] cxgb3: fix link flap Divy Le Ray
@ 2010-02-16  5:53   ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2010-02-16  5:53 UTC (permalink / raw)
  To: divy; +Cc: netdev, linux-kernel, swise

From: Divy Le Ray <divy@chelsio.com>
Date: Sat, 13 Feb 2010 11:44:35 -0800

> From: Divy Le Ray <divy@chelsio.com>
> 
> The driver is expected to report that the link is up
> when the phy Rx signal is established and the mac
> has not detected a link fault.
> The code is however broken, the driver does not check the link fault
> status when the phy link status changes.
> The link fault status being checked within a short period of time,
> it leads to link up/link down events.
> 
> Signed-off-by: Divy Le Ray <divy@chelsio.com>

Applied.

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

end of thread, other threads:[~2010-02-16  5:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-13 19:44 [PATCH net-next-2.6 1/2] cxgb3: FIx VLAN over Jumbo frames Divy Le Ray
2010-02-13 19:44 ` [PATCH net-next-2.6 2/2] cxgb3: fix link flap Divy Le Ray
2010-02-16  5:53   ` David Miller
2010-02-16  5:53 ` [PATCH net-next-2.6 1/2] cxgb3: FIx VLAN over Jumbo frames 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.