net driver updates for .27
Subsystems (8)
PATCH 1/1 net driver updates for .27
This is rebased and updated from the last pull. The lone change:
dropped retina driver, as it needs further work.
Please pull from 'davem-next' branch of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git davem-next
to receive the following updates:
Documentation/networking/dm9000.txt | 167 ++++ arch/blackfin/mach-bf527/boards/ezkit.c | 7 +- arch/blackfin/mach-bf533/boards/H8606.c | 7 +- arch/blackfin/mach-bf537/boards/generic_board.c | 7 +- drivers/net/8139cp.c | 1 - drivers/net/8139too.c | 13 +- drivers/net/Kconfig | 31 +- drivers/net/cxgb3/cxgb3_offload.c | 21 +- drivers/net/cxgb3/t3cdev.h | 3 +- drivers/net/dl2k.c | 2 +- drivers/net/dm9000.c | 1159 ++++++++++++----------- drivers/net/dm9000.h | 11 + drivers/net/e1000/e1000_main.c | 34 - drivers/net/e1000e/e1000.h | 4 + drivers/net/e1000e/netdev.c | 48 +- drivers/net/fealnx.c | 43 +- drivers/net/forcedeth.c | 5 + drivers/net/igb/igb.h | 4 + drivers/net/igb/igb_main.c | 47 +- drivers/net/ixgbe/ixgbe.h | 9 + drivers/net/ixgbe/ixgbe_ethtool.c | 11 + drivers/net/ixgbe/ixgbe_main.c | 111 ++- drivers/net/pci-skeleton.c | 1 - drivers/net/sh_eth.c | 4 +- drivers/net/sh_eth.h | 4 +- drivers/net/tsi108_eth.c | 1 - drivers/net/tulip/21142.c | 6 +- drivers/net/tulip/de2104x.c | 10 +- drivers/net/tulip/eeprom.c | 6 +- drivers/net/tulip/interrupt.c | 5 +- drivers/net/tulip/media.c | 5 +- drivers/net/tulip/pnic.c | 5 +- drivers/net/tulip/pnic2.c | 5 +- drivers/net/tulip/timer.c | 6 +- drivers/net/tulip/tulip.h | 4 +- drivers/net/tulip/tulip_core.c | 8 +- drivers/net/typhoon.c | 3 - drivers/net/usb/rndis_host.c | 14 +- drivers/net/wireless/rndis_wlan.c | 4 +- drivers/pci/pci-acpi.c | 20 + include/linux/dm9000.h | 1 + include/linux/usb/rndis_host.h | 3 +- 42 files changed, 1122 insertions(+), 738 deletions(-) create mode 100644 Documentation/networking/dm9000.txt
Andy Gospodarek (1):
e1000: remove e1000_clean_tx_irq call from e1000_netpoll
Auke Kok (1):
e1000: remove PCI Express device IDs
Ben Dooks (10):
DM9000: Add support for DM9000A and DM9000B chips
DM9000: Cleanups after the resource changes
DM9000: Cleanup source code
DM9000: Cleanup source code - remove forward declerations
DM9000: Use NSR to determine link-status on internal PHY
DM9000: Allow the use of the NSR register to get link status.
DM9000: Add missing msleep() in EEPROM wait code.
DM9000: Re-unite menuconfig entries for DM9000 driver
DM9000: Remove DEFAULT_TRIGGER for request_irq() flags.
DM9000: Add documentation for the driver.
Divy Le Ray (1):
cxgb3 - add missing adapter type for RDMA
Grant Grundler (1):
drivers/net/tulip: update first comment in tulip files
Harvey Harrison (1):
tulip: remove wrapper around get_unaligned
Jeff Garzik (2):
[netdrvr] fealnx: clean up nasty mess of arch ifdefs [netdrvr] kill sync_irq-before-freq_irq pattern
Jussi Kivilinna (1):
rndis_host: pass buffer length to rndis_command
Laurent Pinchart (2):
DM9000: Remove the 2 resources probe scheme.
DM9000: Fixup blackfin after removing 2 resource usage
Mallikarjuna R Chilakala (1):
ixgbe: add LRO support
Márton Németh (1):
8139too: some style cleanups
Nobuhiro Iwamatsu (1):
net: sh_eth: Fix compile error sh_eth
Taku Izumi (2):
e1000e: make ioport free
igb: make ioport free
Tobias Diedrich (2):
Fix forcedeth hibernate/wake-on-lan problems Fix forcedeth hibernate/wake-on-lan problems
Documentation/networking/dm9000.txt new file +167 -0
@@ -0,0 +1,167 @@ +DM9000 Network driver +===================== + +Copyright 2008 Simtec Electronics, + Ben Dooks <[email protected]> <[email protected]> + + +Introduction +------------ + +This file describes how to use the DM9000 platform-device based network driver +that is contained in the files drivers/net/dm9000.c and drivers/net/dm9000.h. + +The driver supports three DM9000 variants, the DM9000E which is the first chip +supported as well as the newer DM9000A and DM9000B devices. It is currently +maintained and tested by Ben Dooks, who should be CC: to any patches for this +driver. + + +Defining the platform device +---------------------------- + +The minimum set of resources attached to the platform device are as follows: + + 1) The physical address of the address register + 2) The physical address of the data register + 3) The IRQ line the device's interrupt pin is connected to. + +These resources should be specified in that order, as the ordering of the +two address regions is important (the driver expects these to be address +and then data). + +An example from arch/arm/mach-s3c2410/mach-bast.c is: + +static struct resource bast_dm9k_resource[] = { + [0] = { + .start = S3C2410_CS5 + BAST_PA_DM9000, + .end = S3C2410_CS5 + BAST_PA_DM9000 + 3, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = S3C2410_CS5 + BAST_PA_DM9000 + 0x40, + .end = S3C2410_CS5 + BAST_PA_DM9000 + 0x40 + 0x3f, + .flags = IORESOURCE_MEM, + }, + [2] = { + .start = IRQ_DM9000, + .end = IRQ_DM9000, + .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, + } +}; + +static struct platform_device bast_device_dm9k = { + .name = "dm9000", + .id = 0, + .num_resources = ARRAY_SIZE(bast_dm9k_resource), + .resource = bast_dm9k_resource, +}; + +Note the setting of the IRQ trigger flag in bast_dm9k_resource[2].flags, +as this will generate a warning if it is not present. The trigger from +the flags field will be passed to request_irq() when registering the IRQ +handler to ensure that the IRQ is setup correctly. + +This shows a typical platform device, without the optional configuration +platform data supplied. The next example uses the same resources, but adds +the optional platform data to pass extra configuration data: + +static struct dm9000_plat_data bast_dm9k_platdata = { + .flags = DM9000_PLATF_16BITONLY, +}; + +static struct platform_device bast_device_dm9k = { + .name = "dm9000", + .id = 0, + .num_resources = ARRAY_SIZE(bast_dm9k_resource), + .resource = bast_dm9k_resource, + .dev = { + .platform_data = &bast_dm9k_platdata, + } +}; + +The platform data is defined in include/linux/dm9000.h and described below. + + +Platform data +------------- + +Extra platform data for the DM9000 can describe the IO bus width to the +device, whether or not an external PHY is attached to the device and +the availability of an external configuration EEPROM. + +The flags for the platform data .flags field are as follows: + +DM9000_PLATF_8BITONLY + + The IO should be done with 8bit operations. + +DM9000_PLATF_16BITONLY + + The IO should be done with 16bit operations. + +DM9000_PLATF_32BITONLY + + The IO should be done with 32bit operations. + +DM9000_PLATF_EXT_PHY + + The chip is connected to an external PHY. + +DM9000_PLATF_NO_EEPROM + + This can be used to signify that the board does not have an + EEPROM, or that the EEPROM should be hidden from the user. + +DM9000_PLATF_SIMPLE_PHY + + Switch to using the simpler PHY polling method which does not + try and read the MII PHY state regularly. This is only available + when using the internal PHY. See the section on link state polling + for more information. + + The config symbol DM9000_FORCE_SIMPLE_PHY_POLL, Kconfig entry + "Force simple NSR based PHY polling" allows this flag to be + forced on at build time. + + +PHY Link state polling +---------------------- + +The driver keeps track of the link state and informs the network core +about link (carrier) availablilty. This is managed by several methods +depending on the version of the chip and on which PHY is being used. + +For the internal PHY, the original (and currently default) method is +to read the MII state, either when the status changes if we have the +necessary interrupt support in the chip or every two seconds via a +periodic timer. + +To reduce the overhead for the internal PHY, there is now the option +of using the DM9000_FORCE_SIMPLE_PHY_POLL config, or DM9000_PLATF_SIMPLE_PHY +platform data option to read the summary information without the +expensive MII accesses. This method is faster, but does not print +as much information. + +When using an external PHY, the driver currently has to poll the MII +link status as there is no method for getting an interrupt on link change. + + +DM9000A / DM9000B +----------------- + +These chips are functionally similar to the DM9000E and are supported easily +by the same driver. The features are: + + 1) Interrupt on internal PHY state change. This means that the periodic + polling of the PHY status may be disabled on these devices when using + the internal PHY. + + 2) TCP/UDP checksum offloading, which the driver does not currently support. + + +ethtool +------- + +The driver supports the ethtool interface for access to the driver +state information, the PHY state and the EEPROM.
arch/blackfin/mach-bf527/boards/ezkit.c +6 -1
@@ -323,10 +323,15 @@ static struct platform_device smc91x_device = {static struct resource dm9000_resources[] = { [0 ] = { .start =0x203FB800 , - .end =0x203FB800 +8 , + .end =0x203FB800 +1 , .flags =IORESOURCE_MEM , }, [1 ] = { + .start =0x203FB800 +4 , + .end =0x203FB800 +5 , + .flags =IORESOURCE_MEM , + }, + [2 ] = { .start =IRQ_PF9 , .end =IRQ_PF9 , .flags = (IORESOURCE_IRQ |IORESOURCE_IRQ_HIGHEDGE ),
arch/blackfin/mach-bf533/boards/H8606.c +6 -1
@@ -65,10 +65,15 @@ static struct platform_device rtc_device = {static struct resource dm9000_resources[] = { [0 ] = { .start =0x20300000 , - .end =0x20300000 +8 , + .end =0x20300000 +1 , .flags =IORESOURCE_MEM , }, [1 ] = { + .start =0x20300000 +4 , + .end =0x20300000 +5 , + .flags =IORESOURCE_MEM , + }, + [2 ] = { .start =IRQ_PF10 , .end =IRQ_PF10 , .flags = (IORESOURCE_IRQ |IORESOURCE_IRQ_HIGHEDGE ),
arch/blackfin/mach-bf537/boards/generic_board.c +6 -1
@@ -166,10 +166,15 @@ static struct platform_device smc91x_device = {static struct resource dm9000_resources[] = { [0 ] = { .start =0x203FB800 , - .end =0x203FB800 +8 , + .end =0x203FB800 +1 , .flags =IORESOURCE_MEM , }, [1 ] = { + .start =0x203FB800 +4 , + .end =0x203FB800 +5 , + .flags =IORESOURCE_MEM , + }, + [2 ] = { .start =IRQ_PF9 , .end =IRQ_PF9 , .flags = (IORESOURCE_IRQ |IORESOURCE_IRQ_HIGHEDGE ),
drivers/net/8139cp.c +0 -1
@@ -1213,7 +1213,6 @@ static int cp_close (struct net_device *dev)spin_unlock_irqrestore (&cp->lock, flags); -synchronize_irq (dev->irq);free_irq (dev->irq, dev);cp_free_rings (cp);
drivers/net/8139too.c +6 -7
@@ -107,8 +107,8 @@#include <linux/mii.h> #include <linux/completion.h> #include <linux/crc32.h> -#include <asm/io.h> -#include <asm/uaccess.h> +#include <linux/io.h> +#include <linux/uaccess.h> #include <asm/irq.h> #define RTL8139_DRIVER_NAME DRV_NAME " Fast Ethernet driver " DRV_VERSION
@@ -134,7 +134,7 @@#if RTL8139_DEBUG /* note: prints function name for you */ -# define DPRINTK(fmt, args...) printk(KERN_DEBUG "%s: " fmt, __FUNCTION__ , ## args) +# define DPRINTK(fmt, args...) printk(KERN_DEBUG "%s: " fmt, __func__ , ## args)#else # define DPRINTK(fmt, args...)#endif
@@ -145,7 +145,7 @@# define assert (expr) \ if(unlikely(!(expr))) { \ printk(KERN_ERR "Assertion failed! %s,%s,%s,line=%d\n", \ - #expr,__FILE__,__FUNCTION__,__LINE__); \ + #expr, __FILE__, __func__, __LINE__); \ }#endif
@@ -219,7 +219,7 @@ enum {#define RTL8139B_IO_SIZE 256#define RTL8129_CAPS HAS_MII_XCVR -#define RTL8139_CAPS HAS_CHIP_XCVR|HAS_LNK_CHNG +#define RTL8139_CAPS (HAS_CHIP_XCVR|HAS_LNK_CHNG) typedef enum { RTL8139 = 0,
@@ -1889,7 +1889,7 @@ static void rtl8139_rx_err (u32 rx_status, struct net_device *dev, }#if RX_BUF_IDX ==3 -static __inline__void wrap_copy (struct sk_buff *skb,const unsigned char *ring, +static inline void wrap_copy (struct sk_buff *skb,const unsigned char *ring,u32 offset,unsigned int size) {u32 left =RX_BUF_LEN - offset;
@@ -2231,7 +2231,6 @@ static int rtl8139_close (struct net_device *dev)spin_unlock_irqrestore (&tp->lock, flags); -synchronize_irq (dev->irq);/* racy, but that's ok here */ free_irq (dev->irq, dev);rtl8139_tx_clear (tp);
drivers/net/Kconfig +19 -12
@@ -938,6 +938,23 @@ config DM9000 To compile this driver as a module, choose M here. The module will be called dm9000. +config DM9000_DEBUGLEVEL + int "DM9000 maximum debug level" + depends on DM9000 + default 4 + help + The maximum level of debugging code compiled into the DM9000 + driver. + +config DM9000_FORCE_SIMPLE_PHY_POLL + bool "Force simple NSR based PHY polling" + depends on DM9000 + ---help--- + This configuration forces the DM9000 to use the NSR's LinkStatus + bit to determine if the link is up or down instead of the more + costly MII PHY reads. Note, this will not work if the chip is + operating with an external PHY. + config ENC28J60 tristate "ENC28J60 support" depends on EXPERIMENTAL && SPI && NET_ETHERNET
@@ -955,14 +972,6 @@ config ENC28J60_WRITEVERIFY Enable the verify after the buffer write useful for debugging purpose. If unsure, say N. -config DM9000_DEBUGLEVEL - int "DM9000 maximum debug level" - depends on DM9000 - default 4 - help - The maximum level of debugging code compiled into the DM9000 - driver. - config SMC911X tristate "SMSC LAN911[5678] support" select CRC32
@@ -2025,9 +2034,6 @@ config E1000E To compile this driver as a module, choose M here. The module will be called e1000e. -config E1000E_ENABLED - def_bool E1000E != n - config IP1000 tristate "IP1000 Gigabit Ethernet support" depends on PCI && EXPERIMENTAL
@@ -2462,7 +2468,8 @@ config EHEA config IXGBE tristate "Intel(R) 10GbE PCI Express adapters support" - depends on PCI + depends on PCI && INET + select INET_LRO ---help--- This driver supports Intel(R) 10GbE PCI Express family of adapters. For more information on how to identify your adapter, go
drivers/net/cxgb3/cxgb3_offload.c +20 -1
@@ -1248,6 +1248,25 @@ static inline void unregister_tdev(struct t3cdev *tdev)mutex_unlock (&cxgb3_db_lock); } +static inline int adap2type (struct adapter *adapter) +{ +int type =0 ; + +switch (adapter->params.rev) { +case T3_REV_A : + type =T3A ; +break ; +case T3_REV_B : +case T3_REV_B2 : + type =T3B ; +break ; +case T3_REV_C : + type =T3C ; +break ; + } +return type; +} +void __devinit cxgb3_adapter_ofld (struct adapter *adapter) {struct t3cdev *tdev = &adapter->tdev;
@@ -1257,7 +1276,7 @@ void __devinit cxgb3_adapter_ofld(struct adapter *adapter)cxgb3_set_dummy_ops (tdev); tdev->send = t3_offload_tx; tdev->ctl = cxgb_offload_ctl; - tdev->type = adapter->params.rev ==0 ?T3A :T3B ; + tdev->type =adap2type (adapter);register_tdev (tdev); }
drivers/net/cxgb3/t3cdev.h +2 -1
@@ -45,7 +45,8 @@ struct cxgb3_client;enum t3ctype {T3A =0 , -T3B +T3B , +T3C , };struct t3cdev {
drivers/net/dl2k.c +1 -1
@@ -1753,7 +1753,7 @@ rio_close (struct net_device *dev)/* Stop Tx and Rx logics */ writel (TxDisable | RxDisable | StatsDisable, ioaddr + MACCtrl); -synchronize_irq (dev->irq); +free_irq (dev->irq, dev);del_timer_sync (&np->timer);
drivers/net/dm9000.c +600 -559
1,374 lines not on this page · raw message
drivers/net/dm9000.h +11 -0
@@ -45,6 +45,9 @@#define DM9000_CHIPR 0x2C#define DM9000_SMCR 0x2F +#define CHIPR_DM9000A 0x19 +#define CHIPR_DM9000B 0x1B +#define DM9000_MRCMDX 0xF0#define DM9000_MRCMD 0xF2#define DM9000_MRRL 0xF4
@@ -131,5 +134,13 @@#define DM9000_PKT_RDY 0x01/* Packet ready to receive */ #define DM9000_PKT_MAX 1536/* Received packet max size */ +/* DM9000A / DM9000B definitions */ + +#define IMR_LNKCHNG (1<<5) +#define IMR_UNDERRUN (1<<4) + +#define ISR_LNKCHNG (1<<5) +#define ISR_UNDERRUN (1<<4) +#endif /* _DM9000X_H_ */
drivers/net/e1000/e1000_main.c +0 -34
@@ -47,12 +47,6 @@ static const char e1000_copyright[] = "Copyright (c) 1999-2006 Intel Corporation* Macro expands to... * {PCI_DEVICE(PCI_VENDOR_ID_INTEL, device_id)} */ -#ifdef CONFIG_E1000E_ENABLED -#define PCIE (x) -#else -#define PCIE (x) x, -#endif -static struct pci_device_id e1000_pci_tbl[] = {INTEL_E1000_ETHERNET_DEVICE (0x1000 ),INTEL_E1000_ETHERNET_DEVICE (0x1001 ),
@@ -79,14 +73,6 @@ static struct pci_device_id e1000_pci_tbl[] = {INTEL_E1000_ETHERNET_DEVICE (0x1026 ),INTEL_E1000_ETHERNET_DEVICE (0x1027 ),INTEL_E1000_ETHERNET_DEVICE (0x1028 ), -PCIE( INTEL_E1000_ETHERNET_DEVICE(0x1049)) -PCIE( INTEL_E1000_ETHERNET_DEVICE(0x104A)) -PCIE( INTEL_E1000_ETHERNET_DEVICE(0x104B)) -PCIE( INTEL_E1000_ETHERNET_DEVICE(0x104C)) -PCIE( INTEL_E1000_ETHERNET_DEVICE(0x104D)) -PCIE( INTEL_E1000_ETHERNET_DEVICE(0x105E)) -PCIE( INTEL_E1000_ETHERNET_DEVICE(0x105F)) -PCIE( INTEL_E1000_ETHERNET_DEVICE(0x1060))INTEL_E1000_ETHERNET_DEVICE (0x1075 ),INTEL_E1000_ETHERNET_DEVICE (0x1076 ), INTEL_E1000_ETHERNET_DEVICE(0x1077),
@@ -95,28 +81,9 @@ PCIE( INTEL_E1000_ETHERNET_DEVICE(0x1060))INTEL_E1000_ETHERNET_DEVICE (0x107A ),INTEL_E1000_ETHERNET_DEVICE (0x107B ),INTEL_E1000_ETHERNET_DEVICE (0x107C ), -PCIE( INTEL_E1000_ETHERNET_DEVICE(0x107D)) -PCIE( INTEL_E1000_ETHERNET_DEVICE(0x107E)) -PCIE( INTEL_E1000_ETHERNET_DEVICE(0x107F))INTEL_E1000_ETHERNET_DEVICE (0x108A ), -PCIE( INTEL_E1000_ETHERNET_DEVICE(0x108B)) -PCIE( INTEL_E1000_ETHERNET_DEVICE(0x108C)) -PCIE( INTEL_E1000_ETHERNET_DEVICE(0x1096)) -PCIE( INTEL_E1000_ETHERNET_DEVICE(0x1098))INTEL_E1000_ETHERNET_DEVICE (0x1099 ), -PCIE( INTEL_E1000_ETHERNET_DEVICE(0x109A)) -PCIE( INTEL_E1000_ETHERNET_DEVICE(0x10A4)) -PCIE( INTEL_E1000_ETHERNET_DEVICE(0x10A5))INTEL_E1000_ETHERNET_DEVICE (0x10B5 ), -PCIE( INTEL_E1000_ETHERNET_DEVICE(0x10B9)) -PCIE( INTEL_E1000_ETHERNET_DEVICE(0x10BA)) -PCIE( INTEL_E1000_ETHERNET_DEVICE(0x10BB)) -PCIE( INTEL_E1000_ETHERNET_DEVICE(0x10BC)) -PCIE( INTEL_E1000_ETHERNET_DEVICE(0x10C4)) -PCIE( INTEL_E1000_ETHERNET_DEVICE(0x10C5)) -PCIE( INTEL_E1000_ETHERNET_DEVICE(0x10D5)) -PCIE( INTEL_E1000_ETHERNET_DEVICE(0x10D9)) -PCIE (INTEL_E1000_ETHERNET_DEVICE (0x10DA ))/* required last entry */ {0,} };
@@ -5284,7 +5251,6 @@ e1000_netpoll(struct net_device *netdev)disable_irq (adapter->pdev->irq);e1000_intr (adapter->pdev->irq, netdev); -e1000_clean_tx_irq (adapter, adapter->tx_ring);#ifndef CONFIG_E1000_NAPI adapter->clean_rx (adapter, adapter->rx_ring);#endif
drivers/net/e1000e/e1000.h +4 -0
@@ -283,6 +283,10 @@ struct e1000_adapter {unsigned long led_status;unsigned int flags; + +/* for ioport free */ +int bars; +int need_ioport; };struct e1000_info {
drivers/net/e1000e/netdev.c +42 -6
100 lines not on this page · raw message
drivers/net/fealnx.c +12 -31
58 lines not on this page · raw message
drivers/net/forcedeth.c +5 -0
@@ -5559,6 +5559,11 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i/* set mac address */ nv_copy_mac_to_hw (dev); +/* Workaround current PCI init glitch: wakeup bits aren't +* being set from PCI PM capability. +*/ +device_init_wakeup (&pci_dev->dev,1 ); +/* disable WOL */ writel (0 , base + NvRegWakeUpFlags); np->wolenabled =0 ;
drivers/net/igb/igb.h +4 -0
@@ -271,6 +271,10 @@ struct igb_adapter {unsigned int msi_enabled;u32 eeprom_wol; + +/* for ioport free */ +int bars; +int need_ioport; };enum e1000_state_t {
drivers/net/igb/igb_main.c +41 -6
97 lines not on this page · raw message
drivers/net/ixgbe/ixgbe.h +9 -0
@@ -32,6 +32,7 @@#include <linux/types.h> #include <linux/pci.h> #include <linux/netdevice.h> +#include <linux/inet_lro.h> #include "ixgbe_type.h" #include "ixgbe_common.h"
@@ -100,6 +101,9 @@#define IXGBE_TX_FLAGS_VLAN_MASK 0xffff0000#define IXGBE_TX_FLAGS_VLAN_SHIFT 16 +#define IXGBE_MAX_LRO_DESCRIPTORS 8 +#define IXGBE_MAX_LRO_AGGREGATE 32 +/* wrapper around a pointer to a socket buffer, * so a DMA handle can be stored along with the buffer */ struct ixgbe_tx_buffer {
@@ -150,6 +154,8 @@ struct ixgbe_ring {/* cpu for tx queue */ int cpu;#endif +struct net_lro_mgr lro_mgr; +bool lro_used;struct ixgbe_queue_stats stats;u8 v_idx;/* maps directly to the index for this ring in the hardware * vector array, can also be used for finding the bit in EICR
@@ -287,6 +293,9 @@ struct ixgbe_adapter {unsigned long state;u64 tx_busy; +u64 lro_aggregated; +u64 lro_flushed; +u64 lro_no_desc; };enum ixbge_state_t {
drivers/net/ixgbe/ixgbe_ethtool.c +11 -0
@@ -90,6 +90,8 @@ static struct ixgbe_stats ixgbe_gstrings_stats[] = { {"rx_header_split", IXGBE_STAT(rx_hdr_split)}, {"alloc_rx_page_failed", IXGBE_STAT(alloc_rx_page_failed)}, {"alloc_rx_buff_failed", IXGBE_STAT(alloc_rx_buff_failed)}, + {"lro_aggregated", IXGBE_STAT(lro_aggregated)}, + {"lro_flushed", IXGBE_STAT(lro_flushed)}, };#define IXGBE_QUEUE_STATS_LEN \
@@ -787,6 +789,7 @@ static void ixgbe_get_ethtool_stats(struct net_device *netdev,int stat_count =sizeof (struct ixgbe_queue_stats ) /sizeof (u64);int j, k;int i; +u64 aggregated =0 , flushed =0 , no_desc =0 ;ixgbe_update_stats (adapter);for (i =0 ; i <IXGBE_GLOBAL_STATS_LEN ; i++) {
@@ -801,11 +804,17 @@ static void ixgbe_get_ethtool_stats(struct net_device *netdev, i += k; }for (j =0 ; j < adapter->num_rx_queues; j++) { + aggregated += adapter->rx_ring[j].lro_mgr.stats.aggregated; + flushed += adapter->rx_ring[j].lro_mgr.stats.flushed; + no_desc += adapter->rx_ring[j].lro_mgr.stats.no_desc; queue_stat = (u64 *)&adapter->rx_ring[j].stats;for (k =0 ; k < stat_count; k++) data[i + k] = queue_stat[k]; i += k; } + adapter->lro_aggregated = aggregated; + adapter->lro_flushed = flushed; + adapter->lro_no_desc = no_desc; } static void ixgbe_get_strings(struct net_device *netdev, u32 stringset,
@@ -973,6 +982,8 @@ static struct ethtool_ops ixgbe_ethtool_ops = { .get_ethtool_stats = ixgbe_get_ethtool_stats, .get_coalesce = ixgbe_get_coalesce, .set_coalesce = ixgbe_set_coalesce, + .get_flags = ethtool_op_get_flags, + .set_flags = ethtool_op_set_flags, };void ixgbe_set_ethtool_ops (struct net_device *netdev)
drivers/net/ixgbe/ixgbe_main.c +90 -21
194 lines not on this page · raw message
drivers/net/pci-skeleton.c +0 -1
@@ -1739,7 +1739,6 @@ static int netdrv_close (struct net_device *dev)spin_unlock_irqrestore (&tp->lock, flags); -synchronize_irq (dev->irq);free_irq (dev->irq, dev);netdrv_tx_clear (dev);
drivers/net/sh_eth.c +2 -2
@@ -322,7 +322,7 @@ static int sh_eth_dev_init(struct net_device *ndev)ctrl_outl ((FIFO_SIZE_T |FIFO_SIZE_R ), ioaddr +FDR );ctrl_outl (0 , ioaddr +TFTR ); -ctrl_outl (RMCR_RST , ioaddr +RMCR ); +ctrl_outl (0 , ioaddr +RMCR ); rx_int_var = mdp->rx_int_var =DESC_I_RINT8 |DESC_I_RINT5 ; tx_int_var = mdp->tx_int_var =DESC_I_TINT2 ;
@@ -994,7 +994,7 @@ static int sh_mdio_init(struct net_device *ndev, int id)/* Hook up MII support for ethtool */ mdp->mii_bus->name ="sh_mii" ; mdp->mii_bus->dev = &ndev->dev; - mdp->mii_bus->id = id; + mdp->mii_bus->id[0 ] = id;/* PHY IRQ */ mdp->mii_bus->irq =kmalloc (sizeof (int )*PHY_MAX_ADDR ,GFP_KERNEL );
drivers/net/sh_eth.h +2 -2
@@ -40,8 +40,6 @@#define PKT_BUF_SZ 1538/* Chip Base Address */ -#define SH_ETH0_BASE 0xA7000000 -#define SH_ETH1_BASE 0xA7000400#define SH_TSU_ADDR 0xA7000804/* Chip Registers */
@@ -462,3 +460,5 @@ static void swaps(char *src, int len) *p =swab32 (*p); #endif } + +#endif
drivers/net/tsi108_eth.c +0 -1
@@ -1437,7 +1437,6 @@ static int tsi108_close(struct net_device *dev)dev_kfree_skb (skb); } -synchronize_irq (data->irq_num);free_irq (data->irq_num, dev);/* Discard the RX ring. */
drivers/net/tulip/21142.c +2 -4
@@ -1,7 +1,6 @@/* drivers/net/tulip/21142.c -Maintained by Valerie Henson <[email protected]> Copyright 2000,2001 The Linux Kernel Team Written/copyright 1994-2001 by Donald Becker.
@@ -9,9 +8,8 @@of the GNU General Public License, incorporated herein by reference. Please refer to Documentation/DocBook/tulip-user.{pdf,ps,html} -for more information on this driver, or visit the project -Web page at http://sourceforge.net/projects/tulip/ - +for more information on this driver. +Please submit bugs to http://bugzilla.kernel.org/ . */ #include <linux/delay.h>
drivers/net/tulip/de2104x.c +4 -6
@@ -124,8 +124,6 @@ MODULE_PARM_DESC (rx_copybreak, "de2104x Breakpoint at which Rx packets are copi/* Time in jiffies before concluding the transmitter is hung. */ #define TX_TIMEOUT (6*HZ) -#define DE_UNALIGNED_16 (a) (u16)(get_unaligned((u16 *)(a))) -/* This is a mysterious value that can be written to CSR11 in the 21040 (only) to support a pre-NWay full-duplex signaling mechanism using short frames. No one knows what it should be, but if left at its default value some
@@ -1811,7 +1809,7 @@ static void __devinit de21041_get_srom_info (struct de_private *de) goto bad_srom;/* get default media type */ -switch (DE_UNALIGNED_16 (&il->default_media)) { +switch (get_unaligned (&il->default_media)) {case 0x0001 : de->media_type =DE_MEDIA_BNC ;break ;case 0x0002 : de->media_type =DE_MEDIA_AUI ;break ;case 0x0204 : de->media_type =DE_MEDIA_TP_FD ;break ;
@@ -1875,9 +1873,9 @@ static void __devinit de21041_get_srom_info (struct de_private *de) bufp +=sizeof (ib->opts);if (ib->opts & MediaCustomCSRs) { - de->media[idx].csr13 =DE_UNALIGNED_16 (&ib->csr13); - de->media[idx].csr14 =DE_UNALIGNED_16 (&ib->csr14); - de->media[idx].csr15 =DE_UNALIGNED_16 (&ib->csr15); + de->media[idx].csr13 =get_unaligned (&ib->csr13); + de->media[idx].csr14 =get_unaligned (&ib->csr14); + de->media[idx].csr15 =get_unaligned (&ib->csr15); bufp +=sizeof (ib->csr13) +sizeof (ib->csr14) +sizeof (ib->csr15);
drivers/net/tulip/eeprom.c +2 -4
@@ -1,7 +1,6 @@/* drivers/net/tulip/eeprom.c -Maintained by Valerie Henson <[email protected]> Copyright 2000,2001 The Linux Kernel Team Written/copyright 1994-2001 by Donald Becker.
@@ -9,9 +8,8 @@of the GNU General Public License, incorporated herein by reference. Please refer to Documentation/DocBook/tulip-user.{pdf,ps,html} -for more information on this driver, or visit the project -Web page at http://sourceforge.net/projects/tulip/ - +for more information on this driver. +Please submit bug reports to http://bugzilla.kernel.org/. */ #include <linux/pci.h>
drivers/net/tulip/interrupt.c +2 -3
@@ -1,7 +1,6 @@/* drivers/net/tulip/interrupt.c -Maintained by Valerie Henson <[email protected]> Copyright 2000,2001 The Linux Kernel Team Written/copyright 1994-2001 by Donald Becker.
@@ -9,8 +8,8 @@of the GNU General Public License, incorporated herein by reference. Please refer to Documentation/DocBook/tulip-user.{pdf,ps,html} -for more information on this driver, or visit the project -Web page at http://sourceforge.net/projects/tulip/ +for more information on this driver. +Please submit bugs to http://bugzilla.kernel.org/ . */
drivers/net/tulip/media.c +2 -3
@@ -1,7 +1,6 @@/* drivers/net/tulip/media.c -Maintained by Valerie Henson <[email protected]> Copyright 2000,2001 The Linux Kernel Team Written/copyright 1994-2001 by Donald Becker.
@@ -9,9 +8,9 @@of the GNU General Public License, incorporated herein by reference. Please refer to Documentation/DocBook/tulip-user.{pdf,ps,html} -for more information on this driver, or visit the project -Web page at http://sourceforge.net/projects/tulip/ +for more information on this driver. +Please submit bugs to http://bugzilla.kernel.org/ . */ #include <linux/kernel.h>
drivers/net/tulip/pnic.c +2 -3
@@ -1,7 +1,6 @@/* drivers/net/tulip/pnic.c -Maintained by Valerie Henson <[email protected]> Copyright 2000,2001 The Linux Kernel Team Written/copyright 1994-2001 by Donald Becker.
@@ -9,9 +8,9 @@of the GNU General Public License, incorporated herein by reference. Please refer to Documentation/DocBook/tulip-user.{pdf,ps,html} -for more information on this driver, or visit the project -Web page at http://sourceforge.net/projects/tulip/ +for more information on this driver. +Please submit bugs to http://bugzilla.kernel.org/ . */ #include <linux/kernel.h>
drivers/net/tulip/pnic2.c +2 -3
@@ -1,7 +1,6 @@/* drivers/net/tulip/pnic2.c -Maintained by Valerie Henson <[email protected]> Copyright 2000,2001 The Linux Kernel Team Written/copyright 1994-2001 by Donald Becker. Modified to hep support PNIC_II by Kevin B. Hendricks
@@ -10,9 +9,9 @@of the GNU General Public License, incorporated herein by reference. Please refer to Documentation/DocBook/tulip-user.{pdf,ps,html} -for more information on this driver, or visit the project -Web page at http://sourceforge.net/projects/tulip/ +for more information on this driver. +Please submit bugs to http://bugzilla.kernel.org/ . */
drivers/net/tulip/timer.c +3 -3
@@ -1,7 +1,6 @@/* drivers/net/tulip/timer.c -Maintained by Valerie Henson <[email protected]> Copyright 2000,2001 The Linux Kernel Team Written/copyright 1994-2001 by Donald Becker.
@@ -9,11 +8,12 @@of the GNU General Public License, incorporated herein by reference. Please refer to Documentation/DocBook/tulip-user.{pdf,ps,html} -for more information on this driver, or visit the project -Web page at http://sourceforge.net/projects/tulip/ +for more information on this driver. +Please submit bugs to http://bugzilla.kernel.org/ . */ +#include "tulip.h"
drivers/net/tulip/tulip.h +2 -2
@@ -8,9 +8,9 @@of the GNU General Public License, incorporated herein by reference. Please refer to Documentation/DocBook/tulip-user.{pdf,ps,html} -for more information on this driver, or visit the project -Web page at http://sourceforge.net/projects/tulip/ +for more information on this driver. +Please submit bugs to http://bugzilla.kernel.org/ . */ #ifndef __NET_TULIP_H__
drivers/net/tulip/tulip_core.c +3 -5
@@ -1,7 +1,5 @@ -/* tulip_core.c: A DEC 21x4x-family ethernet driver for Linux. */ +/* tulip_core.c: A DEC 21x4x-family ethernet driver for Linux. -/* -Maintained by Valerie Henson <[email protected]> Copyright 2000,2001 The Linux Kernel Team Written/copyright 1994-2001 by Donald Becker.
@@ -9,9 +7,9 @@of the GNU General Public License, incorporated herein by reference. Please refer to Documentation/DocBook/tulip-user.{pdf,ps,html} -for more information on this driver, or visit the project -Web page at http://sourceforge.net/projects/tulip/ +for more information on this driver. +Please submit bugs to http://bugzilla.kernel.org/ . */
drivers/net/typhoon.c +0 -3
@@ -334,8 +334,6 @@ enum state_values {#define TYPHOON_RESET_TIMEOUT_NOSLEEP ((6 * 1000000) / TYPHOON_UDELAY)#define TYPHOON_WAIT_TIMEOUT ((1000000 / 2) / TYPHOON_UDELAY) -#define typhoon_synchronize_irq (x) synchronize_irq(x) -#if defined(NETIF_F_TSO )#define skb_tso_size (x) (skb_shinfo(x)->gso_size)#define TSO_NUM_DESCRIPTORS 2
@@ -2143,7 +2141,6 @@ typhoon_close(struct net_device *dev)printk (KERN_ERR "%s: unable to stop runtime\n" , dev->name);/* Make sure there is no irq handler running on a different CPU. */ -typhoon_synchronize_irq (dev->irq);free_irq (dev->irq, dev);typhoon_free_rx_rings (tp);
drivers/net/usb/rndis_host.c +7 -7
@@ -74,7 +74,7 @@ EXPORT_SYMBOL_GPL(rndis_status);* Call context is likely probe(), before interface name is known, * which is why we won't try to use it in the diagnostics. */ -int rndis_command (struct usbnet *dev,struct rndis_msg_hdr *buf) +int rndis_command (struct usbnet *dev,struct rndis_msg_hdr *buf,int buflen) {struct cdc_state *info = (void *) &dev->data;int master_ifnum;
@@ -121,7 +121,7 @@ int rndis_command(struct usbnet *dev, struct rndis_msg_hdr *buf)USB_CDC_GET_ENCAPSULATED_RESPONSE ,USB_DIR_IN |USB_TYPE_CLASS |USB_RECIP_INTERFACE ,0 , master_ifnum, - buf,CONTROL_BUFFER_SIZE , + buf, buflen, RNDIS_CONTROL_TIMEOUT_MS);if (likely (retval >=8 )) { msg_len =le32_to_cpu (buf->msg_len);
@@ -239,7 +239,7 @@ static int rndis_query(struct usbnet *dev, struct usb_interface *intf, u.get->len =cpu_to_le32 (in_len); u.get->offset =ccpu2 (20 ); - retval =rndis_command (dev, u.header); + retval =rndis_command (dev, u.header,CONTROL_BUFFER_SIZE );if (unlikely (retval <0 )) {dev_err (&intf->dev,"RNDIS_MSG_QUERY(0x%08x) failed, %d\n" , oid, retval);
@@ -328,7 +328,7 @@ generic_rndis_bind(struct usbnet *dev, struct usb_interface *intf, int flags) u.init->max_transfer_size =cpu_to_le32 (dev->rx_urb_size); net->change_mtu =NULL ; - retval =rndis_command (dev, u.header); + retval =rndis_command (dev, u.header,CONTROL_BUFFER_SIZE );if (unlikely (retval <0 )) {/* it might not even be an RNDIS device!! */ dev_err (&intf->dev,"RNDIS init failed, %d\n" , retval);
@@ -409,7 +409,7 @@ generic_rndis_bind(struct usbnet *dev, struct usb_interface *intf, int flags) u.set->offset =ccpu2 ((sizeof *u.set) -8 ); *(__le32 *)(u.buf +sizeof *u.set) =RNDIS_DEFAULT_FILTER ; - retval =rndis_command (dev, u.header); + retval =rndis_command (dev, u.header,CONTROL_BUFFER_SIZE );if (unlikely (retval <0 )) {dev_err (&intf->dev,"rndis set packet filter, %d\n" , retval); goto halt_fail_and_release;
@@ -424,7 +424,7 @@ halt_fail_and_release:memset (u.halt,0 ,sizeof *u.halt); u.halt->msg_type =RNDIS_MSG_HALT ; u.halt->msg_len =ccpu2 (sizeof *u.halt); - (void )rndis_command (dev, (void *)u.halt); + (void )rndis_command (dev, (void *)u.halt,CONTROL_BUFFER_SIZE ); fail_and_release:usb_set_intfdata (info->data,NULL );usb_driver_release_interface (driver_of (intf), info->data);
@@ -449,7 +449,7 @@ void rndis_unbind(struct usbnet *dev, struct usb_interface *intf)if (halt) { halt->msg_type =RNDIS_MSG_HALT ; halt->msg_len =ccpu2 (sizeof *halt); - (void )rndis_command (dev, (void *)halt); + (void )rndis_command (dev, (void *)halt,CONTROL_BUFFER_SIZE );kfree (halt); }
drivers/net/wireless/rndis_wlan.c +2 -2
@@ -448,7 +448,7 @@ static int rndis_query_oid(struct usbnet *dev, __le32 oid, void *data, int *len) u.get->msg_len =ccpu2 (sizeof *u.get); u.get->oid = oid; - ret =rndis_command (dev, u.header); + ret =rndis_command (dev, u.header, buflen);if (ret ==0 ) { ret =le32_to_cpu (u.get_c->len); *len = (*len > ret) ? ret : *len;
@@ -498,7 +498,7 @@ static int rndis_set_oid(struct usbnet *dev, __le32 oid, void *data, int len) u.set->handle =ccpu2 (0 );memcpy (u.buf +sizeof (*u.set), data, len); - ret =rndis_command (dev, u.header); + ret =rndis_command (dev, u.header, buflen);if (ret ==0 ) ret =rndis_error_status (u.set_c->status);
drivers/pci/pci-acpi.c +20 -0
@@ -315,6 +315,25 @@ static pci_power_t acpi_pci_choose_state(struct pci_dev *pdev, }return PCI_POWER_ERROR ; } + +static int acpi_platform_enable_wakeup (struct device *dev,int is_on) +{ +struct acpi_device *adev; +int status; + +if (!device_can_wakeup (dev)) +return -EINVAL ; + +if (is_on && !device_may_wakeup (dev)) +return -EINVAL ; + + status =acpi_bus_get_device (DEVICE_ACPI_HANDLE (dev), &adev); +if (status <0 ) +return status; + + adev->wakeup.state.enabled = !!is_on; +return 0 ; +}#endif static int acpi_pci_set_power_state (struct pci_dev *dev,pci_power_t state)
@@ -399,6 +418,7 @@ static int __init acpi_pci_init(void)return 0 ;#ifdef CONFIG_ACPI_SLEEP platform_pci_choose_state = acpi_pci_choose_state; + platform_enable_wakeup = acpi_platform_enable_wakeup;#endif platform_pci_set_power_state = acpi_pci_set_power_state;return 0 ;
include/linux/dm9000.h +1 -0
@@ -21,6 +21,7 @@#define DM9000_PLATF_32BITONLY (0x0004)#define DM9000_PLATF_EXT_PHY (0x0008)#define DM9000_PLATF_NO_EEPROM (0x0010) +#define DM9000_PLATF_SIMPLE_PHY (0x0020)/* Use NSR to find LinkStatus */ /* platfrom data for platfrom device structure's platfrom_data field */
include/linux/usb/rndis_host.h +2 -1
@@ -260,7 +260,8 @@ struct rndis_keepalive_c { /* IN (optionally OUT) */extern void rndis_status (struct usbnet *dev,struct urb *urb); -extern int rndis_command (struct usbnet *dev,struct rndis_msg_hdr *buf); +extern int +rndis_command (struct usbnet *dev,struct rndis_msg_hdr *buf,int buflen);extern int generic_rndis_bind (struct usbnet *dev,struct usb_interface *intf,int flags);extern void rndis_unbind (struct usbnet *dev,struct usb_interface *intf);
David Miller
maintainerFrom: Jeff Garzik <[email protected]>
Date: Sat, 28 Jun 2008 11:09:42 -0400
Quoted 1 line
master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git davem-next
Pulled and pushed back out to net-next-2.6
Thanks!