net driver fixes
Subsystems (3)
PATCH 1/1 net driver fixes
Please pull from 'upstream-linus' branch of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git upstream-linus
to receive the following updates:
drivers/net/Kconfig | 25 ++-- drivers/net/cxgb3/common.h | 15 ++ drivers/net/cxgb3/cxgb3_main.c | 90 ++++++++++++-- drivers/net/cxgb3/regs.h | 22 +++ drivers/net/cxgb3/t3_hw.c | 15 ++- drivers/net/cxgb3/xgmac.c | 133 +++++++++++++++++-- drivers/net/ewrk3.c | 3 +- drivers/net/mv643xx_eth.c | 14 ++ drivers/net/myri10ge/myri10ge.c | 22 +++- drivers/net/pci-skeleton.c | 4 +- drivers/net/saa9730.c | 177 +++++++++++++------------- drivers/net/skge.c | 110 +++++++++------- drivers/net/skge.h | 6 +- drivers/net/ucc_geth.c | 3 +- drivers/net/wireless/airo.c | 4 +- drivers/net/wireless/bcm43xx/bcm43xx_radio.c | 14 +- 16 files changed, 460 insertions(+), 197 deletions(-)
Anton Blanchard (1):
Fix return code in pci-skeleton.c
Brice Goglin (4):
myri10ge: Serverworks HT2100 provides aligned PCIe completion
myri10ge: update wcfifo and intr_coal_delay default values
myri10ge: fix management of >4kB allocated pages
myri10ge: update driver version to 1.3.0-1.226
Dale Farnsworth (1):
mv643xx_eth: add mv643xx_eth_shutdown function
Divy Le Ray (5):
cxgb3 - fix ethtool cmd on multiple queues port cxgb3 - Auto-load FW if mismatch detected cxgb3 - Fix potential MAC hang
cxgb3 - T3B2 pcie config space
cxgb3 - fix white spaces in drivers/net/Kconfig
Jeff Garzik (1):
[netdrvr] ewrk3: correct card detection bug
Larry Finger (1):
bcm43xx: MANUALWLAN fixes
Li Yang (1):
Revert "ucc_geth: returns NETDEV_TX_BUSY when BD ring is full"
Michal Schmidt (1):
airo: Fix an error path memory leak
Ralf Baechle (1):
SAA9730: Fix large pile of warnings
Stephen Hemminger (3):
skge: deadlock on tx timeout
skge: mask irqs when device down
skge: use per-port phy locking
drivers/net/Kconfig +13 -12
@@ -2372,22 +2372,23 @@ config CHELSIO_T1_NAPI when the driver is receiving lots of packets from the card. config CHELSIO_T3 - tristate "Chelsio Communications T3 10Gb Ethernet support" - depends on PCI - help - This driver supports Chelsio T3-based gigabit and 10Gb Ethernet - adapters. + tristate "Chelsio Communications T3 10Gb Ethernet support" + depends on PCI + select FW_LOADER + help + This driver supports Chelsio T3-based gigabit and 10Gb Ethernet + adapters. - For general information about Chelsio and our products, visit - our website at <http://www.chelsio.com>. + For general information about Chelsio and our products, visit + our website at <http://www.chelsio.com>. - For customer support, please visit our customer support page at - <http://www.chelsio.com/support.htm>. + For customer support, please visit our customer support page at + <http://www.chelsio.com/support.htm>. - Please send feedback to <[email protected]>. + Please send feedback to <[email protected]>. - To compile this driver as a module, choose M here: the module - will be called cxgb3. + To compile this driver as a module, choose M here: the module + will be called cxgb3. config EHEA tristate "eHEA Ethernet support"
drivers/net/cxgb3/common.h +15 -0
@@ -260,6 +260,10 @@ struct mac_stats {unsigned long serdes_signal_loss;unsigned long xaui_pcs_ctc_err;unsigned long xaui_pcs_align_change; + +unsigned long num_toggled;/* # times toggled TxEn due to stuck TX */ +unsigned long num_resets;/* # times reset due to stuck TX */ + };struct tp_mib_stats {
@@ -400,6 +404,12 @@ struct adapter_params {unsigned int rev;/* chip revision */ }; +enum {/* chip revisions */ +T3_REV_A =0 , +T3_REV_B =2 , +T3_REV_B2 =3 , +}; +struct trace_params {u32 sip;u32 sip_mask;
@@ -465,6 +475,10 @@ struct cmac {struct adapter *adapter;unsigned int offset;unsigned int nucast;/* # of address filters for unicast MACs */ +unsigned int tcnt; +unsigned int xcnt; +unsigned int toggle_cnt; +unsigned int txen;struct mac_stats stats; };
@@ -666,6 +680,7 @@ int t3_mac_set_address(struct cmac *mac, unsigned int idx, u8 addr[6]);int t3_mac_set_num_ucast (struct cmac *mac,int n);const struct mac_stats *t3_mac_update_stats (struct cmac *mac);int t3_mac_set_speed_duplex_fc (struct cmac *mac,int speed,int duplex,int fc); +int t3b2_mac_watchdog_task (struct cmac *mac);void t3_mc5_prep (struct adapter *adapter,struct mc5 *mc5,int mode); int t3_mc5_init(struct mc5 *mc5, unsigned int nservers, unsigned int nfilters,
drivers/net/cxgb3/cxgb3_main.c +81 -9
156 lines not on this page · raw message
drivers/net/cxgb3/regs.h +22 -0
@@ -1206,6 +1206,14 @@#define A_TP_RX_TRC_KEY0 0x120 +#define A_TP_TX_DROP_CNT_CH0 0x12d + +#define S_TXDROPCNTCH0RCVD 0 +#define M_TXDROPCNTCH0RCVD 0xffff +#define V_TXDROPCNTCH0RCVD (x) ((x) << S_TXDROPCNTCH0RCVD) +#define G_TXDROPCNTCH0RCVD (x) (((x) >> S_TXDROPCNTCH0RCVD) & \ + M_TXDROPCNTCH0RCVD) +#define A_ULPRX_CTL 0x500#define S_ROUND_ROBIN 4
@@ -1834,6 +1842,8 @@#define V_TXPAUSEEN (x) ((x) << S_TXPAUSEEN)#define F_TXPAUSEEN V_TXPAUSEEN(1U) +#define A_XGM_TX_PAUSE_QUANTA 0x808 +#define A_XGM_RX_CTRL 0x80c#define S_RXEN 0
@@ -1920,6 +1930,11 @@#define A_XGM_TXFIFO_CFG 0x888 +#define S_TXIPG 13 +#define M_TXIPG 0xff +#define V_TXIPG (x) ((x) << S_TXIPG) +#define G_TXIPG (x) (((x) >> S_TXIPG) & M_TXIPG) +#define S_TXFIFOTHRESH 4#define M_TXFIFOTHRESH 0x1ff
@@ -2190,6 +2205,13 @@#define A_XGM_RX_MAX_PKT_SIZE_ERR_CNT 0x9a4 +#define A_XGM_TX_SPI4_SOP_EOP_CNT 0x9a8 + +#define S_TXSPI4SOPCNT 16 +#define M_TXSPI4SOPCNT 0xffff +#define V_TXSPI4SOPCNT (x) ((x) << S_TXSPI4SOPCNT) +#define G_TXSPI4SOPCNT (x) (((x) >> S_TXSPI4SOPCNT) & M_TXSPI4SOPCNT) +#define A_XGM_RX_SPI4_SOP_EOP_CNT 0x9ac#define XGMAC0_1_BASE_ADDR 0xa00
drivers/net/cxgb3/t3_hw.c +9 -6
@@ -681,7 +681,8 @@ enum {SF_ERASE_SECTOR =0xd8 ,/* erase sector */ FW_FLASH_BOOT_ADDR =0x70000 ,/* start address of FW in flash */ - FW_VERS_ADDR = 0x77ffc /* flash address holding FW version */ +FW_VERS_ADDR =0x77ffc ,/* flash address holding FW version */ + FW_MIN_SIZE = 8 /* at least version and csum */ };/**
@@ -935,7 +936,7 @@ int t3_load_fw(struct adapter *adapter, const u8 *fw_data, unsigned int size)const u32 *p = (const u32 *)fw_data;int ret, addr, fw_sector =FW_FLASH_BOOT_ADDR >>16 ; -if (size &3 ) +if ((size &3 ) || size <FW_MIN_SIZE )return -EINVAL ;if (size >FW_VERS_ADDR +8 -FW_FLASH_BOOT_ADDR )return -EFBIG ;
@@ -3243,15 +3244,17 @@ void early_hw_init(struct adapter *adapter, const struct adapter_info *ai) }/* -* Reset the adapter. PCIe cards lose their config space during reset, PCI-X +* Reset the adapter. +* Older PCIe cards lose their config space during reset, PCI-X * ones don't. */ int t3_reset_adapter (struct adapter *adapter) { -int i; +int i, save_and_restore_pcie = + adapter->params.rev <T3_REV_B2 &&is_pcie (adapter);uint16_t devid =0 ; -if (is_pcie (adapter)) +if (save_and_restore_pcie)pci_save_state (adapter->pdev);t3_write_reg (adapter,A_PL_RST ,F_CRSTWRM |F_CRSTWRMMODE );
@@ -3269,7 +3272,7 @@ int t3_reset_adapter(struct adapter *adapter)if (devid !=0x1425 )return -1 ; -if (is_pcie (adapter)) +if (save_and_restore_pcie)pci_restore_state (adapter->pdev);return 0 ; }
drivers/net/cxgb3/xgmac.c +118 -15
189 lines not on this page · raw message
drivers/net/ewrk3.c +1 -2
@@ -414,10 +414,9 @@ ewrk3_hw_init(struct net_device *dev, u_long iobase) icr &=0x70 ;outb (icr,EWRK3_ICR );/* Disable all the IRQs */ -if (nicsr == (CSR_TXD |CSR_RXD )) +if (nicsr != (CSR_TXD |CSR_RXD ))return -ENXIO ; -/* Check that the EEPROM is alive and well and not living on Pluto... */ for (chksum =0 , i =0 ; i <EEPROM_MAX ; i +=2 ) {union {
drivers/net/mv643xx_eth.c +14 -0
@@ -1516,9 +1516,23 @@ static int mv643xx_eth_shared_remove(struct platform_device *pdev)return 0 ; } +static void mv643xx_eth_shutdown (struct platform_device *pdev) +{ +struct net_device *dev =platform_get_drvdata (pdev); +struct mv643xx_private *mp =netdev_priv (dev); +unsigned int port_num = mp->port_num; + +/* Mask all interrupts on ethernet port */ +mv_write (MV643XX_ETH_INTERRUPT_MASK_REG (port_num),0 ); +mv_read (MV643XX_ETH_INTERRUPT_MASK_REG (port_num)); + +eth_port_reset (port_num); +} +static struct platform_driver mv643xx_eth_driver = { .probe = mv643xx_eth_probe, .remove = mv643xx_eth_remove, + .shutdown = mv643xx_eth_shutdown, .driver = { .name =MV643XX_ETH_NAME , },
drivers/net/myri10ge/myri10ge.c +19 -3
@@ -71,7 +71,7 @@#include "myri10ge_mcp.h" #include "myri10ge_mcp_gen_header.h" -#define MYRI10GE_VERSION_STR "1.2.0" +#define MYRI10GE_VERSION_STR "1.3.0-1.226"MODULE_DESCRIPTION ("Myricom 10G driver (10GbE)" );MODULE_AUTHOR ("Maintainer: [email protected]" );
@@ -234,7 +234,7 @@ static int myri10ge_msi = 1; /* enable msi by default */module_param (myri10ge_msi, int,S_IRUGO |S_IWUSR );MODULE_PARM_DESC (myri10ge_msi,"Enable Message Signalled Interrupts\n" ); -static int myri10ge_intr_coal_delay =25 ; +static int myri10ge_intr_coal_delay =75 ;module_param (myri10ge_intr_coal_delay, int,S_IRUGO );MODULE_PARM_DESC (myri10ge_intr_coal_delay,"Interrupt coalescing delay\n" );
@@ -279,7 +279,7 @@ static int myri10ge_fill_thresh = 256;module_param (myri10ge_fill_thresh, int,S_IRUGO |S_IWUSR );MODULE_PARM_DESC (myri10ge_fill_thresh,"Number of empty rx slots allowed\n" ); -static int myri10ge_wcfifo =1 ; +static int myri10ge_wcfifo =0 ;module_param (myri10ge_wcfifo, int,S_IRUGO );MODULE_PARM_DESC (myri10ge_wcfifo,"Enable WC Fifo when WC is enabled\n" );
@@ -905,6 +905,14 @@ myri10ge_alloc_rx_pages(struct myri10ge_priv *mgp, struct myri10ge_rx_buf *rx, (rx->page_offset + bytes <= MYRI10GE_ALLOC_SIZE)) {/* we can use part of previous page */ get_page (rx->page); +#if MYRI10GE_ALLOC_SIZE >4096 +/* Firmware cannot cross 4K boundary.. */ +if ((rx->page_offset >>12 ) != + ((rx->page_offset + bytes -1 ) >>12 )) { + rx->page_offset = + (rx->page_offset + bytes) & ~4095 ; + } +#endif } else {/* we need a new page */ page =
@@ -2483,6 +2491,8 @@ static void myri10ge_enable_ecrc(struct myri10ge_priv *mgp)#define PCI_DEVICE_ID_INTEL_E5000_PCIE23 0x25f7#define PCI_DEVICE_ID_INTEL_E5000_PCIE47 0x25fa +#define PCI_DEVICE_ID_SERVERWORKS_HT2100_PCIE_FIRST 0x140 +#define PCI_DEVICE_ID_SERVERWORKS_HT2100_PCIE_LAST 0x142static void myri10ge_select_firmware (struct myri10ge_priv *mgp) {
@@ -2514,6 +2524,12 @@ static void myri10ge_select_firmware(struct myri10ge_priv *mgp) ((bridge->vendor == PCI_VENDOR_ID_SERVERWORKS && bridge->device == PCI_DEVICE_ID_SERVERWORKS_HT2000_PCIE) + /* ServerWorks HT2100 */ + || (bridge->vendor == PCI_VENDOR_ID_SERVERWORKS + && bridge->device >= + PCI_DEVICE_ID_SERVERWORKS_HT2100_PCIE_FIRST + && bridge->device <= + PCI_DEVICE_ID_SERVERWORKS_HT2100_PCIE_LAST) /* All Intel E5000 PCIE ports */ || (bridge->vendor == PCI_VENDOR_ID_INTEL && bridge->device >=
drivers/net/pci-skeleton.c +2 -2
@@ -710,8 +710,8 @@ match: tp->chipset, rtl_chip_info[tp->chipset].name); - i =register_netdev (dev); -if (i) + rc =register_netdev (dev); +if (rc) goto err_out_unmap;DPRINTK ("EXIT, returning 0\n" );
drivers/net/saa9730.c +88 -89
332 lines not on this page · raw message
drivers/net/skge.c +64 -46
319 lines not on this page · raw message
drivers/net/skge.h +3 -3
@@ -2424,8 +2424,8 @@ struct skge_hw {u32 ram_size;u32 ram_offset;u16 phy_addr; -struct work_struct phy_work; -struct mutex phy_mutex; +spinlock_t phy_lock; +struct tasklet_struct phy_task; };enum pause_control {
@@ -2457,7 +2457,7 @@ struct skge_port {struct net_device_stats net_stats; -struct delayed_work link_thread; +struct timer_list link_timer;enum pause_control flow_control;enum pause_status flow_status;u8 rx_csum;
drivers/net/ucc_geth.c +1 -2
@@ -3607,7 +3607,6 @@ static int ucc_geth_start_xmit(struct sk_buff *skb, struct net_device *dev)if (bd == ugeth->confBd[txQ]) {if (!netif_queue_stopped (dev))netif_stop_queue (dev); -return NETDEV_TX_BUSY ; } ugeth->txBd[txQ] = bd;
@@ -3623,7 +3622,7 @@ static int ucc_geth_start_xmit(struct sk_buff *skb, struct net_device *dev)spin_unlock_irq (&ugeth->lock); -return NETDEV_TX_OK ; +return 0 ; }static int ucc_geth_rx (struct ucc_geth_private *ugeth,u8 rxQ,int rx_work_limit)
drivers/net/wireless/airo.c +3 -1
@@ -2852,7 +2852,7 @@ static struct net_device *_init_airo_card( unsigned short irq, int port,if (rc) {airo_print_err (dev->name,"register interrupt %d failed, rc %d" , irq, rc); - goto err_out_unlink; + goto err_out_nets; }if (!is_pcmcia) {if (!request_region ( dev->base_addr,64 , dev->name )) {
@@ -2935,6 +2935,8 @@ err_out_res:release_region ( dev->base_addr,64 ); err_out_irq:free_irq (dev->irq, dev); +err_out_nets: +airo_networks_free (ai); err_out_unlink:del_airo_dev (dev); err_out_thr:
drivers/net/wireless/bcm43xx/bcm43xx_radio.c +7 -7
@@ -882,10 +882,10 @@ static void _stack_save(u32 *_stackptr, size_t *stackidx, {u32 *stackptr = &(_stackptr[*stackidx]); -assert ((offset &0xF000 ) ==0x0000 ); -assert ((id &0xF0 ) ==0x00 ); +assert ((offset &0xE000 ) ==0x0000 ); +assert ((id &0xF8 ) ==0x00 ); *stackptr = offset; - *stackptr |= ((u32 )id) <<12 ; + *stackptr |= ((u32 )id) <<13 ; *stackptr |= ((u32 )value) <<16 ; (*stackidx)++;assert (*stackidx < BCM43xx_INTERFSTACK_SIZE);
@@ -896,12 +896,12 @@ static u16 _stack_restore(u32 *stackptr, {size_t i; -assert ((offset &0xF000 ) ==0x0000 ); -assert ((id &0xF0 ) ==0x00 ); +assert ((offset &0xE000 ) ==0x0000 ); +assert ((id &0xF8 ) ==0x00 );for (i =0 ; i < BCM43xx_INTERFSTACK_SIZE; i++, stackptr++) { -if ((*stackptr &0x00000FFF ) != offset) +if ((*stackptr &0x00001FFF ) != offset)continue ; -if (((*stackptr &0x0000F000 ) >>12 ) != id) +if (((*stackptr &0x00007000 ) >>13 ) != id)continue ;return ((*stackptr &0xFFFF0000 ) >>16 ); }
Jeff, might be worth getting the sk_buff leak fix in ppp from
http://www.spinics.net/lists/netdev/msg27706.html in 2.6.21 too?
Don't know how important it is for stable. It was present in 2.6.18 too.
Thanks
Guennadi
---
Guennadi Liakhovetski
Quoted 3 lines · Guennadi Liakhovetski
Jeff, might be worth getting the
sk_buffleak fix in ppp from http://www.spinics.net/lists/netdev/msg27706.html in 2.6.21 too?Don't know how important it is for stable. It was present in 2.6.18 too.
Can you resend the patch to me, please?
Easier for the system to apply than the URL...
Jeff
Quoted 9 lines · Jeff Garzik
Quoted 4 lines · Guennadi Liakhovetski
Jeff, might be worth getting the
sk_buffleak fix in ppp from
http://www.spinics.net/lists/netdev/msg27706.html in 2.6.21 too?Don't know how important it is for stable. It was present in 2.6.18 too.
Can you resend the patch to me, please?
Easier for the system to apply than the URL...
Sure, attached below. I think, though, this patch is already in someone's tree. Andrew has applied it to -mm under the name
ppp-dont-leak-an-sk_buff-on-interface-destruction.patch
but then dropped with the reasoning "This patch was dropped because it was merged into mainline or a subsystem tree". So, maybe it is now in Samuel's IrDA tree. Samuel?So, maybe all you have to do is to pull it from his tree.
Thanks
Guennadi
---------------------------------
Guennadi Liakhovetski, Ph.D.
DSA Daten- und Systemtechnik GmbH
Pascalstr. 28
D-52076 Aachen
Germany
Don't leak an sk_buff on interface destruction.
drivers/net/ppp_generic.c +3 -0
@@ -2544,6 +2544,9 @@ ppp->active_filter =NULL ;#endif /* CONFIG_PPP_FILTER */ +if (ppp->xmit_pending) +kfree_skb (ppp->xmit_pending); +kfree (ppp); }
Quoted 15 lines · Guennadi Liakhovetski
Quoted 9 lines · Jeff Garzik
Quoted 4 lines · Guennadi Liakhovetski
Jeff, might be worth getting the
sk_buffleak fix in ppp from
http://www.spinics.net/lists/netdev/msg27706.html in 2.6.21 too?Don't know how important it is for stable. It was present in 2.6.18 too.
Can you resend the patch to me, please?
Easier for the system to apply than the URL...
Sure, attached below. I think, though, this patch is already in someone's tree. Andrew has applied it to -mm under the name
Quoted 6 lines
ppp-dont-leak-an-sk_buff-on-interface-destruction.patch
but then dropped with the reasoning "This patch was dropped because it was merged into mainline or a subsystem tree". So, maybe it is now in Samuel's IrDA tree. Samuel?So, maybe all you have to do is to pull it from his tree.
It's already in Linus tree, and has landed there through davem's net-2.6 tree.
So, this is all taken care of, Jeff doesn't need to worry about this one.
Cheers,
Samuel.
Quoted 25 lines
Thanks
Guennadi
---------------------------------
Guennadi Liakhovetski, Ph.D.
DSA Daten- und Systemtechnik GmbH
Pascalstr. 28
D-52076 Aachen
GermanyDon't leak an
sk_buffon interface destruction.Signed-off-by G. Liakhovetski <[email protected]>drivers/net/ppp_generic.c +3
-0@@ -2544,6 +2544,9 @@ ppp->active_filter =NULL ;#endif /* CONFIG_PPP_FILTER */ +if (ppp->xmit_pending) +kfree_skb (ppp->xmit_pending); +kfree (ppp); }