net driver fixes
Subsystems (3)
PATCH 1/1 net driver fixes
Note that this is a completely separate branch from 'netxen-ioctl', submitted separately. Each can be pulled (or not) independently. I mention this mainly because this submit also includes [non-conflicting] NetXen changes.
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/8139cp.c | 6 +- drivers/net/arm/ep93xx_eth.c | 4 +- drivers/net/b44.c | 6 +- drivers/net/e1000/e1000_ethtool.c | 3 + drivers/net/e1000/e1000_hw.c | 296 +++++++++++---------- drivers/net/e1000/e1000_hw.h | 310 +++++++++++----------- drivers/net/e1000/e1000_main.c | 345 +++++++++++++++++------- drivers/net/e1000/e1000_param.c | 4 +- drivers/net/forcedeth.c | 16 +- drivers/net/ibm_emac/ibm_emac_phy.c | 4 +- drivers/net/myri10ge/myri10ge.c | 163 ++++++------ drivers/net/netxen/netxen_nic.h | 14 +- drivers/net/netxen/netxen_nic_hw.c | 2 +- drivers/net/netxen/netxen_nic_init.c | 14 +- drivers/net/netxen/netxen_nic_isr.c | 3 +- drivers/net/netxen/netxen_nic_main.c | 40 ++-- drivers/net/r8169.c | 6 +- drivers/net/skge.c | 5 +- drivers/net/sky2.c | 35 +++- drivers/net/via-velocity.c | 18 +- drivers/net/wireless/zd1211rw/zd_mac.c | 96 +++++-- drivers/net/wireless/zd1211rw/zd_mac.h | 5 +- drivers/net/wireless/zd1211rw/zd_usb.c | 4 +- net/ieee80211/softmac/ieee80211softmac_assoc.c | 4 +- net/ieee80211/softmac/ieee80211softmac_wx.c | 2 +- 25 files changed, 830 insertions(+), 575 deletions(-)
Amit S. Kale (8):
NetXen: Adding new device ids.
NetXen: driver reload fix for newer firmware.
NetXen: Using correct CHECKSUM flag.
NetXen: Multiple adapter fix.
NetXen: Link status message correction for quad port cards.
NetXen: work queue fixes.
NetXen: Fix for PPC machines.
NetXen: Reducing ring sizes for IOMMU issue.
Ayaz Abdulla (1):
forcedeth: modified comment header
Brice Goglin (5):
myri10ge: match number of save_state and restore
myri10ge: move request_irq to myri10ge_open
myri10ge: make msi configurable at runtime through sysfs
myri10ge: no need to save MSI and PCIe state in the driver
myri10ge: handle failures in suspend and resume
Bruce Allan (2):
e1000: fix to set the new max frame size before resetting the adapter
e1000: Fix PBA allocation calculations
Francois Romieu (3):
netpoll: drivers must not enable IRQ unconditionally in their NAPI handler
r8169: use the broken_parity_status field in pci_dev
r8169: extraneous Cmd{Tx/Rx}Enb write
Herbert Xu (1):
e1000: Do not truncate TSO TCP header with 82544 workaround
Hynek Petrak (1):
PHY probe not working properly for ibm_emac (PPC4xx)
Jeff Garzik (5):
e1000: For sanity, reformat e1000_set_mac_type(), struct e1000_hw[_stats]
e1000: omit stats for broken counter in 82543
e1000: consolidate managability enabling/disabling
e1000: workaround for the ESB2 NIC RX unit issue
e1000: 3 new driver stats for managability testing
Jeff Kirsher (1):
e1000: fix ethtool reported bus type for older adapters
Jesse Brandeburg (7):
e1000: The user-supplied itr setting needs the lower 2 bits masked off
e1000: dynamic itr: take TSO and jumbo into account
e1000: Fix Wake-on-Lan with forced gigabit speed
e1000: disable TSO on the 82544 with slab debugging
e1000: narrow down the scope of the tipg timer tweak
e1000: Make the copybreak value a module parameter
e1000: No-delay link detection at interface up
Randy Dunlap (1):
via-velocity uses INET interfaces
Stephen Hemminger (3):
sky2: dual port NAPI problem
sky2: power management/MSI workaround
sky2: phy power down needs PCI config write enabled
Ulrich Kunitz (3):
zd1211rw: Call ieee80211_rx in tasklet
ieee80211softmac: Fix errors related to the work_struct changes
ieee80211softmac: Fix mutex_lock at exit of ieee80211_softmac_get_genie
Yan Burman (1):
ep93xx: some minor cleanups to the ep93xx eth driver
drivers/net/8139cp.c +4 -2
@@ -617,13 +617,15 @@ rx_next:* this round of polling */ if (rx_work) { +unsigned long flags; +if (cpr16 (IntrStatus) & cp_rx_intr_mask) goto rx_status_loop; -local_irq_disable (); +local_irq_save (flags);cpw16_f (IntrMask, cp_intr_mask);__netif_rx_complete (dev); -local_irq_enable (); +local_irq_restore (flags);return 0 ;/* done */ }
drivers/net/arm/ep93xx_eth.c +1 -3
@@ -780,12 +780,10 @@ static struct ethtool_ops ep93xx_ethtool_ops = {struct net_device *ep93xx_dev_alloc (struct ep93xx_eth_data *data) {struct net_device *dev; -struct ep93xx_priv *ep; dev =alloc_etherdev (sizeof (struct ep93xx_priv ));if (dev ==NULL )return NULL ; - ep =netdev_priv (dev);memcpy (dev->dev_addr, data->dev_addr,ETH_ALEN );
@@ -840,9 +838,9 @@ static int ep93xx_eth_probe(struct platform_device *pdev)struct ep93xx_priv *ep;int err; - data = pdev->dev.platform_data;if (pdev ==NULL )return -ENODEV ; + data = pdev->dev.platform_data; dev =ep93xx_dev_alloc (data);if (dev ==NULL ) {
drivers/net/b44.c +4 -2
@@ -879,12 +879,14 @@ static int b44_poll(struct net_device *netdev, int *budget) }if (bp->istat &ISTAT_ERRORS ) { -spin_lock_irq (&bp->lock); +unsigned long flags; + +spin_lock_irqsave (&bp->lock, flags);b44_halt (bp);b44_init_rings (bp);b44_init_hw (bp,1 );netif_wake_queue (bp->dev); -spin_unlock_irq (&bp->lock); +spin_unlock_irqrestore (&bp->lock, flags); done =1 ; }
drivers/net/e1000/e1000_ethtool.c +3 -0
@@ -100,6 +100,9 @@ static const struct e1000_stats e1000_gstrings_stats[] = { { "rx_csum_offload_errors", E1000_STAT(hw_csum_err) }, { "rx_header_split", E1000_STAT(rx_hdr_split) }, { "alloc_rx_buff_failed", E1000_STAT(alloc_rx_buff_failed) }, + { "tx_smbus", E1000_STAT(stats.mgptc) }, + { "rx_smbus", E1000_STAT(stats.mgprc) }, + { "dropped_smbus", E1000_STAT(stats.mgpdc) }, };#define E1000_QUEUE_STATS_LEN 0
drivers/net/e1000/e1000_hw.c +157 -139
314 lines not on this page · raw message
drivers/net/e1000/e1000_hw.h +158 -152
329 lines not on this page · raw message
drivers/net/e1000/e1000_main.c +247 -98
569 lines not on this page · raw message
drivers/net/e1000/e1000_param.c +3 -1
@@ -487,7 +487,9 @@ e1000_check_options(struct e1000_adapter *adapter)e1000_validate_option (&adapter->itr, &opt, adapter);/* save the setting, because the dynamic bits change itr */ - adapter->itr_setting = adapter->itr; +/* clear the lower two bits because they are +* used as control */ + adapter->itr_setting = adapter->itr & ~3 ;break ; } }else {
drivers/net/forcedeth.c +9 -7
@@ -3,8 +3,7 @@* * Note: This driver is a cleanroom reimplementation based on reverse * engineered documentation written by Carl-Daniel Hailfinger -* and Andrew de Quincey. It's neither supported nor endorsed -* by NVIDIA Corp. Use at your own risk. +* and Andrew de Quincey. * * NVIDIA, nForce and other NVIDIA marks are trademarks or registered * trademarks of NVIDIA Corporation in the United States and other
@@ -14,7 +13,7 @@* Copyright (C) 2004 Andrew de Quincey (wol support) * Copyright (C) 2004 Carl-Daniel Hailfinger (invalid MAC handling, insane * IRQ rate fixes, bigendian fixes, cleanups, verification) -* Copyright (c) 2004 NVIDIA Corporation +* Copyright (c) 2004,5,6 NVIDIA Corporation * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by
@@ -2576,14 +2575,15 @@ static int nv_napi_poll(struct net_device *dev, int *budget)int pkts, limit =min (*budget, dev->quota);struct fe_priv *np =netdev_priv (dev);u8 __iomem *base =get_hwbase (dev); +unsigned long flags; pkts =nv_rx_process (dev, limit);if (nv_alloc_rx (dev)) { -spin_lock_irq (&np->lock); +spin_lock_irqsave (&np->lock, flags);if (!np->in_shutdown)mod_timer (&np->oom_kick, jiffies +OOM_REFILL ); -spin_unlock_irq (&np->lock); +spin_unlock_irqrestore (&np->lock, flags); }if (pkts < limit) {
@@ -2591,13 +2591,15 @@ static int nv_napi_poll(struct net_device *dev, int *budget)netif_rx_complete (dev);/* re-enable receive interrupts */ -spin_lock_irq (&np->lock); +spin_lock_irqsave (&np->lock, flags); + np->irqmask |=NVREG_IRQ_RX_ALL ;if (np->msi_flags &NV_MSI_X_ENABLED )writel (NVREG_IRQ_RX_ALL , base + NvRegIrqMask);else writel (np->irqmask, base + NvRegIrqMask); -spin_unlock_irq (&np->lock); + +spin_unlock_irqrestore (&np->lock, flags);return 0 ; }else {/* used up our quantum, so reschedule */
drivers/net/ibm_emac/ibm_emac_phy.c +3 -1
@@ -309,7 +309,7 @@ int mii_phy_probe(struct mii_phy *phy, int address) {struct mii_phy_def *def;int i; -u32 id; +int id; phy->autoneg =AUTONEG_DISABLE ; phy->advertising =0 ;
@@ -324,6 +324,8 @@ int mii_phy_probe(struct mii_phy *phy, int address)/* Read ID and find matching entry */ id = (phy_read (phy,MII_PHYSID1 ) <<16 ) |phy_read (phy,MII_PHYSID2 ); +if (id <0 ) +return -ENODEV ;for (i =0 ; (def = mii_phy_table[i]) !=NULL ; i++)if ((id & def->phy_id_mask) == def->phy_id)break ;
drivers/net/myri10ge/myri10ge.c +77 -86
294 lines not on this page · raw message
drivers/net/netxen/netxen_nic.h +6 -8
@@ -63,7 +63,7 @@#include "netxen_nic_hw.h" -#define NETXEN_NIC_BUILD_NO "1" +#define NETXEN_NIC_BUILD_NO "4"#define _NETXEN_NIC_LINUX_MAJOR 3#define _NETXEN_NIC_LINUX_MINOR 3#define _NETXEN_NIC_LINUX_SUBVERSION 2
@@ -137,7 +137,7 @@ extern struct workqueue_struct *netxen_workq;#define THIRD_PAGE_GROUP_SIZE THIRD_PAGE_GROUP_END - THIRD_PAGE_GROUP_START#define MAX_RX_BUFFER_LENGTH 1760 -#define MAX_RX_JUMBO_BUFFER_LENGTH 9046 +#define MAX_RX_JUMBO_BUFFER_LENGTH 8062#define MAX_RX_LRO_BUFFER_LENGTH ((48*1024)-512)#define RX_DMA_MAP_LEN (MAX_RX_BUFFER_LENGTH - 2)#define RX_JUMBO_DMA_MAP_LEN \
@@ -199,9 +199,9 @@ enum { (RCV_DESC_NORMAL)))#define MAX_CMD_DESCRIPTORS 1024 -#define MAX_RCV_DESCRIPTORS 32768 -#define MAX_JUMBO_RCV_DESCRIPTORS 4096 -#define MAX_LRO_RCV_DESCRIPTORS 2048 +#define MAX_RCV_DESCRIPTORS 16384 +#define MAX_JUMBO_RCV_DESCRIPTORS 1024 +#define MAX_LRO_RCV_DESCRIPTORS 64#define MAX_RCVSTATUS_DESCRIPTORS MAX_RCV_DESCRIPTORS#define MAX_JUMBO_RCV_DESC MAX_JUMBO_RCV_DESCRIPTORS#define MAX_RCV_DESC MAX_RCV_DESCRIPTORS
@@ -852,8 +852,6 @@ struct netxen_adapter {spinlock_t tx_lock;spinlock_t lock;struct work_struct watchdog_task; -struct work_struct tx_timeout_task; -struct net_device *netdev;struct timer_list watchdog_timer;u32 curr_window;
@@ -887,7 +885,6 @@ struct netxen_adapter {struct netxen_recv_context recv_ctx[MAX_RCV_CTX ];int is_up; -int number;struct netxen_dummy_dma dummy_dma;/* Context interface shared between card and host */
@@ -950,6 +947,7 @@ struct netxen_port {struct pci_dev *pdev;struct net_device_stats net_stats;struct netxen_port_stats stats; +struct work_struct tx_timeout_task; };#define PCI_OFFSET_FIRST_RANGE (adapter, off) \
drivers/net/netxen/netxen_nic_hw.c +1 -1
@@ -376,7 +376,7 @@ void netxen_tso_check(struct netxen_adapter *adapter, ((skb->nh.iph)->ihl *sizeof (u32)) + ((skb->h.th)->doff *sizeof (u32));netxen_set_cmd_desc_opcode (desc,TX_TCP_LSO ); - }else if (skb->ip_summed ==CHECKSUM_COMPLETE ) { + }else if (skb->ip_summed ==CHECKSUM_PARTIAL ) {if (skb->nh.iph->protocol ==IPPROTO_TCP ) {netxen_set_cmd_desc_opcode (desc,TX_TCP_PKT ); }else if (skb->nh.iph->protocol ==IPPROTO_UDP ) {
drivers/net/netxen/netxen_nic_init.c +7 -7
@@ -928,7 +928,7 @@ u32 netxen_process_rcv_ring(struct netxen_adapter *adapter, int ctxid, int max) }netxen_process_rcv (adapter, ctxid, desc);netxen_clear_sts_owner (desc); -netxen_set_sts_owner (desc,STATUS_OWNER_PHANTOM ); +netxen_set_sts_owner (desc,cpu_to_le16 (STATUS_OWNER_PHANTOM )); consumer = (consumer +1 ) & (adapter->max_rx_desc_count -1 ); count++; }
@@ -1023,7 +1023,7 @@ int netxen_process_cmd_ring(unsigned long data) && netif_carrier_ok(port->netdev)) && ((jiffies - port->netdev->trans_start) > port->netdev->watchdog_timeo)) { -SCHEDULE_WORK (&port->adapter->tx_timeout_task); +SCHEDULE_WORK (&port->tx_timeout_task); } last_consumer = get_next_index(last_consumer,
@@ -1138,13 +1138,13 @@ void netxen_post_rx_buffers(struct netxen_adapter *adapter, u32 ctx, u32 ringid)*/ dma =pci_map_single (pdev, skb->data, rcv_desc->dma_size,PCI_DMA_FROMDEVICE ); - pdesc->addr_buffer = dma; + pdesc->addr_buffer =cpu_to_le64 (dma); buffer->skb = skb; buffer->state =NETXEN_BUFFER_BUSY ; buffer->dma = dma;/* make a rcv descriptor */ - pdesc->reference_handle = buffer->ref_handle; - pdesc->buffer_length = rcv_desc->dma_size; + pdesc->reference_handle =cpu_to_le16 (buffer->ref_handle); + pdesc->buffer_length =cpu_to_le32 (rcv_desc->dma_size);DPRINTK (INFO ,"done writing descripter\n" ); producer =get_next_index (producer, rcv_desc->max_rx_desc_count);
@@ -1232,8 +1232,8 @@ void netxen_post_rx_buffers_nodb(struct netxen_adapter *adapter, uint32_t ctx, PCI_DMA_FROMDEVICE);/* make a rcv descriptor */ - pdesc->reference_handle =le16_to_cpu (buffer->ref_handle); - pdesc->buffer_length =le16_to_cpu (rcv_desc->dma_size); + pdesc->reference_handle =cpu_to_le16 (buffer->ref_handle); + pdesc->buffer_length =cpu_to_le16 (rcv_desc->dma_size); pdesc->addr_buffer =cpu_to_le64 (buffer->dma);DPRINTK (INFO ,"done writing descripter\n" ); producer =
drivers/net/netxen/netxen_nic_isr.c +2 -1
@@ -157,7 +157,8 @@ void netxen_nic_isr_other(struct netxen_adapter *adapter)for (portno =0 ; portno <NETXEN_NIU_MAX_GBE_PORTS ; portno++) { linkup = val &1 ;if (linkup != (qg_linksup &1 )) { -printk (KERN_INFO "%s: PORT %d link %s\n" , +printk (KERN_INFO "%s: %s PORT %d link %s\n" , + adapter->port[portno]->netdev->name, netxen_nic_driver_name, portno, ((linkup ==0 ) ?"down" :"up" ));netxen_indicate_link_status (adapter, portno, linkup);
drivers/net/netxen/netxen_nic_main.c +18 -22
@@ -53,8 +53,6 @@ char netxen_nic_driver_name[] = "netxen-nic";static char netxen_nic_driver_string[] ="NetXen Network Driver version " NETXEN_NIC_LINUX_VERSIONID ; -struct netxen_adapter *g_adapter =NULL ; -#define NETXEN_NETDEV_WEIGHT 120#define NETXEN_ADAPTER_UP_MAGIC 777#define NETXEN_NIC_PEG_TUNE 0
@@ -90,6 +88,8 @@ static struct pci_device_id netxen_pci_tbl[] __devinitdata = { {PCI_DEVICE(0x4040, 0x0003)}, {PCI_DEVICE(0x4040, 0x0004)}, {PCI_DEVICE(0x4040, 0x0005)}, + {PCI_DEVICE(0x4040, 0x0024)}, + {PCI_DEVICE(0x4040, 0x0025)}, {0,} };
@@ -129,7 +129,6 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)struct netxen_cmd_buffer *cmd_buf_arr =NULL ;u64 mac_addr[FLASH_NUM_PORTS +1 ];int valid_mac =0 ; -static int netxen_cards_found =0 ;printk (KERN_INFO "%s \n" , netxen_nic_driver_string);/* In current scheme, we use only PCI function 0 */
@@ -220,9 +219,6 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) goto err_out_dbunmap; } -if (netxen_cards_found ==0 ) { - g_adapter = adapter; - } adapter->max_tx_desc_count =MAX_CMD_DESCRIPTORS ; adapter->max_rx_desc_count =MAX_RCV_DESCRIPTORS ; adapter->max_jumbo_rx_desc_count =MAX_JUMBO_RCV_DESCRIPTORS ;
@@ -428,8 +424,7 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) netdev->dev_addr); } } - adapter->netdev = netdev; -INIT_WORK (&adapter->tx_timeout_task, netxen_tx_timeout_task); +INIT_WORK (&port->tx_timeout_task, netxen_tx_timeout_task);netif_carrier_off (netdev);netif_stop_queue (netdev);
@@ -444,6 +439,11 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) adapter->port[i] = port; } +writel (0 ,NETXEN_CRB_NORMALIZE (adapter,CRB_CMDPEG_STATE )); +netxen_pinit_from_rom (adapter,0 ); +udelay (500 ); +netxen_load_firmware (adapter); +netxen_phantom_init (adapter,NETXEN_NIC_PEG_TUNE );/* * delay a while to ensure that the Pegs are up & running. * Otherwise, we might see some flaky behaviour.
@@ -461,7 +461,6 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)break ; } - adapter->number = netxen_cards_found; adapter->driver_mismatch =0 ;return 0 ;
@@ -531,6 +530,8 @@ static void __devexit netxen_nic_remove(struct pci_dev *pdev)netxen_nic_stop_all_ports (adapter);/* leave the hw in the same state as reboot */ +netxen_pinit_from_rom (adapter,0 ); +writel (0 ,NETXEN_CRB_NORMALIZE (adapter,CRB_CMDPEG_STATE ));netxen_load_firmware (adapter);netxen_free_adapter_offload (adapter);
@@ -821,8 +822,8 @@ static int netxen_nic_xmit_frame(struct sk_buff *skb, struct net_device *netdev)/* Take skb->data itself */ pbuf = &adapter->cmd_buf_arr[producer];if ((netdev->features &NETIF_F_TSO ) &&skb_shinfo (skb)->gso_size >0 ) { - pbuf->mss =skb_shinfo (skb)->gso_size; - hwdesc->mss =skb_shinfo (skb)->gso_size; + pbuf->mss =cpu_to_le16 (skb_shinfo (skb)->gso_size); + hwdesc->mss =cpu_to_le16 (skb_shinfo (skb)->gso_size); }else { pbuf->mss =0 ; hwdesc->mss =0 ;
@@ -956,11 +957,6 @@ static int netxen_nic_xmit_frame(struct sk_buff *skb, struct net_device *netdev)static void netxen_watchdog (unsigned long v) {struct netxen_adapter *adapter = (struct netxen_adapter *)v; -if (adapter != g_adapter) { -printk ("%s: ***BUG*** adapter[%p] != g_adapter[%p]\n" , - __FUNCTION__, adapter, g_adapter); -return ; - }SCHEDULE_WORK (&adapter->watchdog_task); }
@@ -969,23 +965,23 @@ static void netxen_tx_timeout(struct net_device *netdev) {struct netxen_port *port = (struct netxen_port *)netdev_priv (netdev); -SCHEDULE_WORK (&port->adapter->tx_timeout_task); +SCHEDULE_WORK (&port->tx_timeout_task); }static void netxen_tx_timeout_task (struct work_struct *work) { -struct netxen_adapter *adapter = - container_of(work, struct netxen_adapter, tx_timeout_task); -struct net_device *netdev = adapter->netdev; +struct netxen_port *port = + container_of(work, struct netxen_port, tx_timeout_task); +struct net_device *netdev = port->netdev;unsigned long flags;printk (KERN_ERR "%s %s: transmit timeout, resetting.\n" , netxen_nic_driver_name, netdev->name); -spin_lock_irqsave (&adapter->lock, flags); +spin_lock_irqsave (&port->adapter->lock, flags);netxen_nic_close (netdev);netxen_nic_open (netdev); -spin_unlock_irqrestore (&adapter->lock, flags); +spin_unlock_irqrestore (&port->adapter->lock, flags); netdev->trans_start = jiffies;netif_wake_queue (netdev); }
drivers/net/r8169.c +1 -5
@@ -225,7 +225,6 @@ MODULE_DEVICE_TABLE(pci, rtl8169_pci_tbl);static int rx_copybreak =200 ;static int use_dac; -static int ignore_parity_err;static struct {u32 msg_enable; } debug = {-1 };
@@ -471,8 +470,6 @@ module_param(use_dac, int, 0);MODULE_PARM_DESC (use_dac,"Enable PCI DAC. Unsafe on 32 bit PCI slot." );module_param_named (debug, debug.msg_enable, int,0 );MODULE_PARM_DESC (debug,"Debug verbosity level (0=none, ..., 16=all)" ); -module_param_named (ignore_parity_err, ignore_parity_err, bool,0 ); -MODULE_PARM_DESC (ignore_parity_err,"Ignore PCI parity error as target. Default: false" );MODULE_LICENSE ("GPL" );MODULE_VERSION (RTL8169_VERSION );
@@ -1885,7 +1882,6 @@ static void rtl8169_hw_start(struct net_device *dev) (tp->mac_version == RTL_GIGA_MAC_VER_02) || (tp->mac_version == RTL_GIGA_MAC_VER_03) || (tp->mac_version == RTL_GIGA_MAC_VER_04)) -RTL_W8 (ChipCmd, CmdTxEnb | CmdRxEnb);rtl8169_set_rx_tx_config_registers (tp); cmd =RTL_R16 (CPlusCmd);
@@ -2388,7 +2384,7 @@ static void rtl8169_pcierr_interrupt(struct net_device *dev)* * Feel free to adjust to your needs. */ -if (ignore_parity_err) +if (pdev->broken_parity_status) pci_cmd &= ~PCI_COMMAND_PARITY ;else pci_cmd |=PCI_COMMAND_SERR |PCI_COMMAND_PARITY ;
drivers/net/skge.c +3 -2
@@ -2920,6 +2920,7 @@ static int skge_poll(struct net_device *dev, int *budget)struct skge_hw *hw = skge->hw;struct skge_ring *ring = &skge->rx_ring;struct skge_element *e; +unsigned long flags;int to_do =min (dev->quota, *budget);int work_done =0 ;
@@ -2957,12 +2958,12 @@ static int skge_poll(struct net_device *dev, int *budget)if (work_done >= to_do)return 1 ;/* not done */ -spin_lock_irq (&hw->hw_lock); +spin_lock_irqsave (&hw->hw_lock, flags);__netif_rx_complete (dev); hw->intr_mask |= irqmask[skge->port];skge_write32 (hw,B0_IMSK , hw->intr_mask);skge_read32 (hw,B0_IMSK ); -spin_unlock_irq (&hw->hw_lock); +spin_unlock_irqrestore (&hw->hw_lock, flags);return 0 ; }
drivers/net/sky2.c +34 -1
@@ -569,8 +569,8 @@ static void sky2_phy_power(struct sky2_hw *hw, unsigned port, int onoff)if (hw->chip_id ==CHIP_ID_YUKON_XL && hw->chip_rev >1 ) onoff = !onoff; +sky2_write8 (hw,B2_TST_CTRL1 ,TST_CFG_WRITE_ON ); reg1 =sky2_pci_read32 (hw,PCI_DEV_REG1 ); -if (onoff)/* Turn off phy power saving */ reg1 &= ~phy_power[port];
@@ -579,6 +579,7 @@ static void sky2_phy_power(struct sky2_hw *hw, unsigned port, int onoff)sky2_pci_write32 (hw,PCI_DEV_REG1 , reg1);sky2_pci_read32 (hw,PCI_DEV_REG1 ); +sky2_write8 (hw,B2_TST_CTRL1 ,TST_CFG_WRITE_OFF );udelay (100 ); }
@@ -1511,6 +1512,13 @@ static int sky2_down(struct net_device *dev) imask &= ~portirq_msk[port];sky2_write32 (hw,B0_IMSK , imask); +/* +* Both ports share the NAPI poll on port 0, so if necessary undo the +* the disable that is done in dev_close. +*/ +if (sky2->port ==0 && hw->ports >1 ) +netif_poll_enable (dev); +sky2_gmac_reset (hw, port);/* Stop transmitter */
@@ -3631,6 +3639,29 @@ static int sky2_resume(struct pci_dev *pdev) out: return err; } + +/* BIOS resume runs after device (it's a bug in PM) +* as a temporary workaround on suspend/resume leave MSI disabled +*/ +static int sky2_suspend_late (struct pci_dev *pdev,pm_message_t state) +{ +struct sky2_hw *hw =pci_get_drvdata (pdev); + +free_irq (pdev->irq, hw); +if (hw->msi) { +pci_disable_msi (pdev); + hw->msi =0 ; + } +return 0 ; +} + +static int sky2_resume_early (struct pci_dev *pdev) +{ +struct sky2_hw *hw =pci_get_drvdata (pdev); +struct net_device *dev = hw->dev[0 ]; + +return request_irq (pdev->irq, sky2_intr,IRQF_SHARED , dev->name, hw); +}#endif static struct pci_driver sky2_driver = {
@@ -3641,6 +3672,8 @@ static struct pci_driver sky2_driver = {#ifdef CONFIG_PM .suspend = sky2_suspend, .resume = sky2_resume, + .suspend_late = sky2_suspend_late, + .resume_early = sky2_resume_early,#endif };
drivers/net/via-velocity.c +13 -5
@@ -265,15 +265,19 @@ static int velocity_set_media_mode(struct velocity_info *vptr, u32 mii_status);static int velocity_suspend (struct pci_dev *pdev,pm_message_t state);static int velocity_resume (struct pci_dev *pdev); +static DEFINE_SPINLOCK (velocity_dev_list_lock); +static LIST_HEAD (velocity_dev_list); + +#endif + +#if defined(CONFIG_PM ) && defined(CONFIG_INET ) +static int velocity_netdev_event (struct notifier_block *nb,unsigned long notification,void *ptr);static struct notifier_block velocity_inetaddr_notifier = { .notifier_call = velocity_netdev_event, }; -static DEFINE_SPINLOCK (velocity_dev_list_lock); -static LIST_HEAD (velocity_dev_list); -static void velocity_register_notifier (void ) {register_inetaddr_notifier (&velocity_inetaddr_notifier);
@@ -284,12 +288,12 @@ static void velocity_unregister_notifier(void) unregister_inetaddr_notifier(&velocity_inetaddr_notifier); } -#else /* CONFIG_PM */ +#else #define velocity_register_notifier () do {} while (0)#define velocity_unregister_notifier () do {} while (0) -#endif /* !CONFIG_PM */ +#endif /* * Internal board variants. At the moment we have only one
@@ -3292,6 +3296,8 @@ static int velocity_resume(struct pci_dev *pdev)return 0 ; } +#ifdef CONFIG_INET +static int velocity_netdev_event (struct notifier_block *nb,unsigned long notification,void *ptr) {struct in_ifaddr *ifa = (struct in_ifaddr *) ptr;
@@ -3312,4 +3318,6 @@ static int velocity_netdev_event(struct notifier_block *nb, unsigned long notifi }return NOTIFY_DONE ; } + +#endif #endif
drivers/net/wireless/zd1211rw/zd_mac.c +70 -26
156 lines not on this page · raw message
drivers/net/wireless/zd1211rw/zd_mac.h +4 -1
@@ -138,6 +138,9 @@ struct zd_mac {struct delayed_work set_rts_cts_work;struct delayed_work set_basic_rates_work; +struct tasklet_struct rx_tasklet; +struct sk_buff_head rx_queue; +unsigned int stats_count;u8 qual_buffer[ZD_MAC_STATS_BUFFER_SIZE ];u8 rssi_buffer[ZD_MAC_STATS_BUFFER_SIZE ];
@@ -193,7 +196,7 @@ int zd_mac_stop(struct net_device *netdev);int zd_mac_set_mac_address (struct net_device *dev,void *p);void zd_mac_set_multicast_list (struct net_device *netdev); -int zd_mac_rx (struct zd_mac *mac,const u8 *buffer,unsigned int length); +int zd_mac_rx_irq (struct zd_mac *mac,const u8 *buffer,unsigned int length);int zd_mac_set_regdomain (struct zd_mac *zd_mac,u8 regdomain);u8 zd_mac_get_regdomain (struct zd_mac *zd_mac);
drivers/net/wireless/zd1211rw/zd_usb.c +2 -2
@@ -598,13 +598,13 @@ static void handle_rx_packet(struct zd_usb *usb, const u8 *buffer, n = l+k;if (n > length)return ; -zd_mac_rx (mac, buffer+l, k); +zd_mac_rx_irq (mac, buffer+l, k);if (i >=2 )return ; l = (n+3 ) & ~3 ; } }else { -zd_mac_rx (mac, buffer, length); +zd_mac_rx_irq (mac, buffer, length); } }
net/ieee80211/softmac/ieee80211softmac_assoc.c +2 -2
@@ -167,7 +167,7 @@ static void ieee80211softmac_assoc_notify_scan(struct net_device *dev, int event_type, void *context) { struct ieee80211softmac_device *mac = ieee80211_priv(dev); -ieee80211softmac_assoc_work ((void *)mac); +ieee80211softmac_assoc_work (&mac->associnfo.work.work); } static void
@@ -177,7 +177,7 @@ ieee80211softmac_assoc_notify_auth(struct net_device *dev, int event_type, voidswitch (event_type) {case IEEE80211SOFTMAC_EVENT_AUTHENTICATED : -ieee80211softmac_assoc_work ((void *)mac); +ieee80211softmac_assoc_work (&mac->associnfo.work.work);break ;case IEEE80211SOFTMAC_EVENT_AUTH_FAILED :case IEEE80211SOFTMAC_EVENT_AUTH_TIMEOUT :
net/ieee80211/softmac/ieee80211softmac_wx.c +1 -1
@@ -463,7 +463,7 @@ ieee80211softmac_wx_get_genie(struct net_device *dev, err = -E2BIG ; }spin_unlock_irqrestore (&mac->lock, flags); -mutex_lock (&mac->associnfo.mutex); +mutex_unlock (&mac->associnfo.mutex);return err; }
Quoted 2 lines · Jeff Garzik
e1000: Do not truncate TSO TCP header with 82544 workaround
This change obsoletes the following change.
Quoted 1 line
e1000: disable TSO on the 82544 with slab debugging
So the slab debugging patch should be reverted.
Thanks,
Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt