From: Olof Johansson <hidden> Date: 2007-09-26 21:18:50
Hi,
Following patches are for various bug fixes against current netdev-2.6.24
upstream branch. Please apply.
[PATCH] [1/6] pasemi_mac: fix build break in pasemi_mac_probe()
[PATCH] [2/6] pasemi_mac: fix build break in pasemi_mac_clean_rx()
[PATCH] [3/6] pasemi_mac: set interface speed correctly on XAUI ports
[PATCH] [4/6] pasemi_mac: flags as passed to spin_*_irqsave() should be unsigned long
[PATCH] [5/6] pasemi_mac: don't enable rx before there are buffers on the ring
[PATCH] [6/6] pasemi_mac: pass in count of buffers to replenish rx ring with
Thanks,
-Olof
From: Olof Johansson <hidden> Date: 2007-09-26 21:19:57
pasemi_mac: fix build break in pasemi_mac_clean_rx()
Fix breakage caused by the unification of stats structs.
Signed-off-by: Olof Johansson <redacted>
Index: k.org/drivers/net/pasemi_mac.c
===================================================================
From: Olof Johansson <hidden> Date: 2007-09-26 21:20:22
pasemi_mac: set interface speed correctly on XAUI ports
Set interface speed for XAUI to 10G per default, not 1G.
Signed-off-by: Olof Johansson <redacted>
Index: 2.6.23/drivers/net/pasemi_mac.c
===================================================================
From: Olof Johansson <hidden> Date: 2007-09-26 21:20:50
pasemi_mac: flags as passed to spin_*_irqsave() should be unsigned long.
Signed-off-by: Tony Breeds <redacted>
Signed-off-by: Olof Johansson <redacted>
---
Found trying to build a -rt kernel, which has a BUILD_BUG_ON(), in this
caswe.
drivers/net/pasemi_mac.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: k.org/drivers/net/pasemi_mac.c
===================================================================
From: Olof Johansson <hidden> Date: 2007-09-26 21:21:33
pasemi_mac: don't enable rx before there are buffers on the ring
Reorder initialization of the DMA channels and the interface. Before there
was a time window when the interface was enabled before DMA was enabled.
Also, now there will always be RX buffers available at the time the
MAC interface is enabled, to avoid temporary out-of-buffer errors for the
very first packets (on busy networks).
Signed-off-by: Olof Johansson <redacted>
Index: 2.6.23/drivers/net/pasemi_mac.c
===================================================================
@@ -791,14 +791,6 @@ static int pasemi_mac_open(struct net_dewrite_mac_reg(mac,PAS_MAC_CFG_TXP,flags);-flags=PAS_MAC_CFG_PCFG_S1|PAS_MAC_CFG_PCFG_PE|-PAS_MAC_CFG_PCFG_PR|PAS_MAC_CFG_PCFG_CE;--if(mac->type==MAC_TYPE_GMAC)-flags|=PAS_MAC_CFG_PCFG_TSR_1G|PAS_MAC_CFG_PCFG_SPD_1G;-else-flags|=PAS_MAC_CFG_PCFG_TSR_10G|PAS_MAC_CFG_PCFG_SPD_10G;-write_iob_reg(mac,PAS_IOB_DMA_RXCH_CFG(mac->dma_rxch),PAS_IOB_DMA_RXCH_CFG_CNTTH(0));
@@ -813,8 +805,6 @@ static int pasemi_mac_open(struct net_dewrite_iob_reg(mac,PAS_IOB_DMA_COM_TIMEOUTCFG,PAS_IOB_DMA_COM_TIMEOUTCFG_TCNT(0xffffff));-write_mac_reg(mac,PAS_MAC_CFG_PCFG,flags);-ret=pasemi_mac_setup_rx_resources(dev);if(ret)gotoout_rx_resources;
@@ -842,6 +832,17 @@ static int pasemi_mac_open(struct net_depasemi_mac_replenish_rx_ring(dev);+flags=PAS_MAC_CFG_PCFG_S1|PAS_MAC_CFG_PCFG_PE|+PAS_MAC_CFG_PCFG_PR|PAS_MAC_CFG_PCFG_CE;++if(mac->type==MAC_TYPE_GMAC)+flags|=PAS_MAC_CFG_PCFG_TSR_1G|PAS_MAC_CFG_PCFG_SPD_1G;+else+flags|=PAS_MAC_CFG_PCFG_TSR_10G|PAS_MAC_CFG_PCFG_SPD_10G;++/* Enable interface in MAC */+write_mac_reg(mac,PAS_MAC_CFG_PCFG,flags);+ret=pasemi_mac_phy_init(dev);/* Some configs don't have PHYs (XAUI etc), so don't complain about*failedinitdueto-ENODEV.
From: Olof Johansson <hidden> Date: 2007-09-26 21:21:57
pasemi_mac: pass in count of buffers to replenish rx ring with
Refactor replenish_rx_ring to take an argument for how many entries to
fill. Since it's normally available from where it's called anyway, this
is just simpler. It also removes the awkward logic to try to figure out
if we're filling for the first time or not.
Signed-off-by: Olof Johansson <redacted>
Index: k.org/drivers/net/pasemi_mac.c
===================================================================
pasemi_mac: fix build break in pasemi_mac_probe()
Fix breakage caused by recent unification of print_mac() stuff.
Signed-off-by: Olof Johansson <redacted>
pasemi_mac: fix build break in pasemi_mac_clean_rx()
Fix breakage caused by the unification of stats structs.
Signed-off-by: Olof Johansson <redacted>
Jeff, I added this to my net-2.6.24 tree because it fixes
a regression causes by a change in my tree.
I hope you don't mind :-) You would just push it to me
in the end anyways :))
[PATCH] [1/6] pasemi_mac: fix build break in pasemi_mac_probe()
[PATCH] [2/6] pasemi_mac: fix build break in pasemi_mac_clean_rx()
[PATCH] [3/6] pasemi_mac: set interface speed correctly on XAUI ports
[PATCH] [4/6] pasemi_mac: flags as passed to spin_*_irqsave() should be unsigned long
[PATCH] [5/6] pasemi_mac: don't enable rx before there are buffers on the ring
[PATCH] [6/6] pasemi_mac: pass in count of buffers to replenish rx ring with
Jeff, patches #1 and #2 are taken care of in my net-2.6.24
tree, please review and take the rest, thanks!
From: Jeff Garzik <hidden> Date: 2007-09-29 04:46:00
Olof Johansson wrote:
pasemi_mac: set interface speed correctly on XAUI ports
Set interface speed for XAUI to 10G per default, not 1G.
Signed-off-by: Olof Johansson <redacted>