Merge branch 'master'
authorJeff Garzik <jgarzik@pobox.com>
Fri, 28 Oct 2005 16:17:52 +0000 (12:17 -0400)
committerJeff Garzik <jgarzik@pobox.com>
Fri, 28 Oct 2005 16:17:52 +0000 (12:17 -0400)
1  2 
drivers/net/Kconfig
drivers/net/Makefile
include/linux/netdevice.h

diff --combined drivers/net/Kconfig
index d8adb4222ca3cb01a73652be7711c1fe2d216077,5148d47492a0c1b90eb225826ff85ea0a0c046f9..b39cba36d15e1078c5b2c23e702c6668ab1bd266
@@@ -475,6 -475,14 +475,14 @@@ config SGI_IOC3_ETH_HW_TX_CSU
          the moment only acceleration of IPv4 is supported.  This option
          enables offloading for checksums on transmit.  If unsure, say Y.
  
+ config MIPS_SIM_NET
+       tristate "MIPS simulator Network device (EXPERIMENTAL)"
+       depends on NETDEVICES && MIPS_SIM && EXPERIMENTAL
+       help
+         The MIPSNET device is a simple Ethernet network device which is
+         emulated by the MIPS Simulator.
+         If you are not using a MIPSsim or are unsure, say N.
  config SGI_O2MACE_ETH
        tristate "SGI O2 MACE Fast Ethernet support"
        depends on NET_ETHERNET && SGI_IP32=y
@@@ -548,6 -556,14 +556,14 @@@ config SUNGE
          Support for the Sun GEM chip, aka Sun GigabitEthernet/P 2.0.  See also
          <http://www.sun.com/products-n-solutions/hardware/docs/pdf/806-3985-10.pdf>.
  
+ config CASSINI
+       tristate "Sun Cassini support"
+       depends on NET_ETHERNET && PCI
+       select CRC32
+       help
+         Support for the Sun Cassini chip, aka Sun GigaSwift Ethernet. See also
+         <http://www.sun.com/products-n-solutions/hardware/docs/pdf/817-4341-10.pdf>
  config NET_VENDOR_3COM
        bool "3COM cards"
        depends on NET_ETHERNET && (ISA || EISA || MCA || PCI)
@@@ -1647,7 -1663,7 +1663,7 @@@ config LAN_SAA973
  
  config NET_POCKET
        bool "Pocket and portable adapters"
-       depends on NET_ETHERNET && ISA
+       depends on NET_ETHERNET && PARPORT
        ---help---
          Cute little network (Ethernet) devices which attach to the parallel
          port ("pocket adapters"), commonly used with laptops. If you have
  
  config ATP
        tristate "AT-LAN-TEC/RealTek pocket adapter support"
-       depends on NET_POCKET && ISA && X86
+       depends on NET_POCKET && PARPORT && X86
        select CRC32
        ---help---
          This is a network (Ethernet) device which attaches to your parallel
  
  config DE600
        tristate "D-Link DE600 pocket adapter support"
-       depends on NET_POCKET && ISA
+       depends on NET_POCKET && PARPORT
        ---help---
          This is a network (Ethernet) device which attaches to your parallel
          port. Read <file:Documentation/networking/DLINK.txt> as well as the
  
  config DE620
        tristate "D-Link DE620 pocket adapter support"
-       depends on NET_POCKET && ISA
+       depends on NET_POCKET && PARPORT
        ---help---
          This is a network (Ethernet) device which attaches to your parallel
          port. Read <file:Documentation/networking/DLINK.txt> as well as the
@@@ -1955,25 -1971,7 +1971,25 @@@ config SKG
  
          It does not support the link failover and network management 
          features that "portable" vendor supplied sk98lin driver does.
 -      
 +
 +
 +config SKY2
 +      tristate "SysKonnect Yukon2 support (EXPERIMENTAL)"
 +      depends on PCI && EXPERIMENTAL
 +      select CRC32
 +      ---help---
 +        This driver support the Marvell Yukon 2 Gigabit Ethernet adapter.
 +
 +        To compile this driver as a module, choose M here: the module
 +        will be called sky2.  This is recommended.
 +
 +config SKY2_EC_A1
 +      bool "Support old Yukon-EC A1 chipset"
 +      depends on SKY2
 +      ---help---
 +        Include support for early revisions of the Yukon EC chipset
 +        that required extra workarounds. If in doubt, say N.
 +
  config SK98LIN
        tristate "Marvell Yukon Chipset / SysKonnect SK-98xx Support"
        depends on PCI
@@@ -2093,6 -2091,7 +2109,7 @@@ config SPIDER_NE
  config GIANFAR
        tristate "Gianfar Ethernet"
        depends on 85xx || 83xx
+       select PHYLIB
        help
          This driver supports the Gigabit TSEC on the MPC85xx 
          family of chips, and the FEC on the 8540
@@@ -2253,6 -2252,20 +2270,20 @@@ config ISERIES_VET
        tristate "iSeries Virtual Ethernet driver support"
        depends on PPC_ISERIES
  
+ config RIONET
+       tristate "RapidIO Ethernet over messaging driver support"
+       depends on NETDEVICES && RAPIDIO
+ config RIONET_TX_SIZE
+       int "Number of outbound queue entries"
+       depends on RIONET
+       default "128"
+ config RIONET_RX_SIZE
+       int "Number of inbound queue entries"
+       depends on RIONET
+       default "128"
  config FDDI
        bool "FDDI driver support"
        depends on (PCI || EISA)
diff --combined drivers/net/Makefile
index c849afc25c000a45f3104cde3af424cd0e7bef04,1a84e0435f64b52d022aaa3f3ebd4efca0f62f4a..8b3403c7f5e025d864c7bf0d14668dbf3d2e3a22
@@@ -13,7 -13,7 +13,7 @@@ obj-$(CONFIG_CHELSIO_T1) += chelsio
  obj-$(CONFIG_BONDING) += bonding/
  obj-$(CONFIG_GIANFAR) += gianfar_driver.o
  
- gianfar_driver-objs := gianfar.o gianfar_ethtool.o gianfar_phy.o
+ gianfar_driver-objs := gianfar.o gianfar_ethtool.o gianfar_mii.o
  
  #
  # link order important here
@@@ -28,6 -28,7 +28,7 @@@ obj-$(CONFIG_SUNQE) += sunqe.
  obj-$(CONFIG_SUNBMAC) += sunbmac.o
  obj-$(CONFIG_MYRI_SBUS) += myri_sbus.o
  obj-$(CONFIG_SUNGEM) += sungem.o sungem_phy.o
+ obj-$(CONFIG_CASSINI) += cassini.o
  
  obj-$(CONFIG_MACE) += mace.o
  obj-$(CONFIG_BMAC) += bmac.o
@@@ -58,12 -59,12 +59,13 @@@ spidernet-y += spider_net.o spider_net_
  obj-$(CONFIG_SPIDER_NET) += spidernet.o
  obj-$(CONFIG_TC35815) += tc35815.o
  obj-$(CONFIG_SKGE) += skge.o
 +obj-$(CONFIG_SKY2) += sky2.o
  obj-$(CONFIG_SK98LIN) += sk98lin/
  obj-$(CONFIG_SKFP) += skfp/
  obj-$(CONFIG_VIA_RHINE) += via-rhine.o
  obj-$(CONFIG_VIA_VELOCITY) += via-velocity.o
  obj-$(CONFIG_ADAPTEC_STARFIRE) += starfire.o
+ obj-$(CONFIG_RIONET) += rionet.o
  
  #
  # end link order section
@@@ -166,6 -167,7 +168,7 @@@ obj-$(CONFIG_EQUALIZER) += eql.
  obj-$(CONFIG_MIPS_JAZZ_SONIC) += jazzsonic.o
  obj-$(CONFIG_MIPS_GT96100ETH) += gt96100eth.o
  obj-$(CONFIG_MIPS_AU1X00_ENET) += au1000_eth.o
+ obj-$(CONFIG_MIPS_SIM_NET) += mipsnet.o
  obj-$(CONFIG_SGI_IOC3_ETH) += ioc3-eth.o
  obj-$(CONFIG_DECLANCE) += declance.o
  obj-$(CONFIG_ATARILANCE) += atarilance.o
index 5e90557715ab3b6532d85e398e573cc25754f0a6,a9281b24c40b8bfa748899dad4c5e17574e4aaaf..deacea65273a4212b59ea06a368b910ec0be21d1
@@@ -265,6 -265,8 +265,8 @@@ struct net_devic
         * the interface.
         */
        char                    name[IFNAMSIZ];
+       /* device name hash chain */
+       struct hlist_node       name_hlist;
  
        /*
         *      I/O specific fields
  
        /* ------- Fields preinitialized in Space.c finish here ------- */
  
+       /* Net device features */
+       unsigned long           features;
+ #define NETIF_F_SG            1       /* Scatter/gather IO. */
+ #define NETIF_F_IP_CSUM               2       /* Can checksum only TCP/UDP over IPv4. */
+ #define NETIF_F_NO_CSUM               4       /* Does not require checksum. F.e. loopack. */
+ #define NETIF_F_HW_CSUM               8       /* Can checksum all the packets. */
+ #define NETIF_F_HIGHDMA               32      /* Can DMA to high memory. */
+ #define NETIF_F_FRAGLIST      64      /* Scatter/gather IO. */
+ #define NETIF_F_HW_VLAN_TX    128     /* Transmit VLAN hw acceleration */
+ #define NETIF_F_HW_VLAN_RX    256     /* Receive VLAN hw acceleration */
+ #define NETIF_F_HW_VLAN_FILTER        512     /* Receive filtering on VLAN */
+ #define NETIF_F_VLAN_CHALLENGED       1024    /* Device cannot handle VLAN packets */
+ #define NETIF_F_TSO           2048    /* Can offload TCP/IP segmentation */
+ #define NETIF_F_LLTX          4096    /* LockLess TX */
        struct net_device       *next_sched;
  
        /* Interface index. Unique device identifier    */
         * will (read: may be cleaned up at will).
         */
  
-       /* These may be needed for future network-power-down code. */
-       unsigned long           trans_start;    /* Time (in jiffies) of last Tx */
-       unsigned long           last_rx;        /* Time of last Rx      */
  
        unsigned short          flags;  /* interface flags (a la BSD)   */
        unsigned short          gflags;
        unsigned                mtu;    /* interface MTU value          */
        unsigned short          type;   /* interface hardware type      */
        unsigned short          hard_header_len;        /* hardware hdr length  */
-       void                    *priv;  /* pointer to private data      */
  
        struct net_device       *master; /* Pointer to master device of a group,
                                          * which this device is member of.
                                          */
  
        /* Interface address info. */
-       unsigned char           broadcast[MAX_ADDR_LEN];        /* hw bcast add */
-       unsigned char           dev_addr[MAX_ADDR_LEN]; /* hw address   */
        unsigned char           perm_addr[MAX_ADDR_LEN]; /* permanent hw address */
        unsigned char           addr_len;       /* hardware address length      */
        unsigned short          dev_id;         /* for shared network cards */
        int                     promiscuity;
        int                     allmulti;
  
-       int                     watchdog_timeo;
-       struct timer_list       watchdog_timer;
  
        /* Protocol specific pointers */
        
        void                    *ec_ptr;        /* Econet specific data */
        void                    *ax25_ptr;      /* AX.25 specific data */
  
-       struct list_head        poll_list;      /* Link to poll list    */
+ /*
+  * Cache line mostly used on receive path (including eth_type_trans())
+  */
+       struct list_head        poll_list ____cacheline_aligned_in_smp;
+                                       /* Link to poll list    */
+       int                     (*poll) (struct net_device *dev, int *quota);
        int                     quota;
        int                     weight;
+       unsigned long           last_rx;        /* Time of last Rx      */
+       /* Interface address info used in eth_type_trans() */
+       unsigned char           dev_addr[MAX_ADDR_LEN]; /* hw address, (before bcast 
+                                                       because most packets are unicast) */
+       unsigned char           broadcast[MAX_ADDR_LEN];        /* hw bcast add */
  
+ /*
+  * Cache line mostly used on queue transmit path (qdisc)
+  */
+       /* device queue lock */
+       spinlock_t              queue_lock ____cacheline_aligned_in_smp;
        struct Qdisc            *qdisc;
        struct Qdisc            *qdisc_sleeping;
-       struct Qdisc            *qdisc_ingress;
        struct list_head        qdisc_list;
        unsigned long           tx_queue_len;   /* Max frames per queue allowed */
  
        /* ingress path synchronizer */
        spinlock_t              ingress_lock;
+       struct Qdisc            *qdisc_ingress;
+ /*
+  * One part is mostly used on xmit path (device)
+  */
        /* hard_start_xmit synchronizer */
-       spinlock_t              xmit_lock;
+       spinlock_t              xmit_lock ____cacheline_aligned_in_smp;
        /* cpu id of processor entered to hard_start_xmit or -1,
           if nobody entered there.
         */
        int                     xmit_lock_owner;
-       /* device queue lock */
-       spinlock_t              queue_lock;
+       void                    *priv;  /* pointer to private data      */
+       int                     (*hard_start_xmit) (struct sk_buff *skb,
+                                                   struct net_device *dev);
+       /* These may be needed for future network-power-down code. */
+       unsigned long           trans_start;    /* Time (in jiffies) of last Tx */
+       int                     watchdog_timeo; /* used by dev_watchdog() */
+       struct timer_list       watchdog_timer;
+ /*
+  * refcnt is a very hot point, so align it on SMP
+  */
        /* Number of references to this device */
-       atomic_t                refcnt;
+       atomic_t                refcnt ____cacheline_aligned_in_smp;
        /* delayed register/unregister */
        struct list_head        todo_list;
-       /* device name hash chain */
-       struct hlist_node       name_hlist;
        /* device index hash chain */
        struct hlist_node       index_hlist;
  
               NETREG_RELEASED,         /* called free_netdev */
        } reg_state;
  
-       /* Net device features */
-       unsigned long           features;
- #define NETIF_F_SG            1       /* Scatter/gather IO. */
- #define NETIF_F_IP_CSUM               2       /* Can checksum only TCP/UDP over IPv4. */
- #define NETIF_F_NO_CSUM               4       /* Does not require checksum. F.e. loopack. */
- #define NETIF_F_HW_CSUM               8       /* Can checksum all the packets. */
- #define NETIF_F_HIGHDMA               32      /* Can DMA to high memory. */
- #define NETIF_F_FRAGLIST      64      /* Scatter/gather IO. */
- #define NETIF_F_HW_VLAN_TX    128     /* Transmit VLAN hw acceleration */
- #define NETIF_F_HW_VLAN_RX    256     /* Receive VLAN hw acceleration */
- #define NETIF_F_HW_VLAN_FILTER        512     /* Receive filtering on VLAN */
- #define NETIF_F_VLAN_CHALLENGED       1024    /* Device cannot handle VLAN packets */
- #define NETIF_F_TSO           2048    /* Can offload TCP/IP segmentation */
- #define NETIF_F_LLTX          4096    /* LockLess TX */
        /* Called after device is detached from network. */
        void                    (*uninit)(struct net_device *dev);
        /* Called after last user reference disappears. */
        /* Pointers to interface service routines.      */
        int                     (*open)(struct net_device *dev);
        int                     (*stop)(struct net_device *dev);
-       int                     (*hard_start_xmit) (struct sk_buff *skb,
-                                                   struct net_device *dev);
  #define HAVE_NETDEV_POLL
-       int                     (*poll) (struct net_device *dev, int *quota);
        int                     (*hard_header) (struct sk_buff *skb,
                                                struct net_device *dev,
                                                unsigned short type,
@@@ -780,15 -801,11 +801,15 @@@ static inline u32 netif_msg_init(int de
  }
  
  /* Schedule rx intr now? */
 +static inline int netif_rx_schedule_test(struct net_device *dev)
 +{
 +      return !test_and_set_bit(__LINK_STATE_RX_SCHED, &dev->state);
 +}
  
 +/* Schedule only if device is up */
  static inline int netif_rx_schedule_prep(struct net_device *dev)
  {
 -      return netif_running(dev) &&
 -              !test_and_set_bit(__LINK_STATE_RX_SCHED, &dev->state);
 +      return netif_running(dev) && netif_rx_schedule_test(dev);
  }
  
  /* Add interface to tail of rx poll list. This assumes that _prep has
@@@ -856,11 -873,9 +877,9 @@@ static inline void netif_rx_complete(st
  
  static inline void netif_poll_disable(struct net_device *dev)
  {
-       while (test_and_set_bit(__LINK_STATE_RX_SCHED, &dev->state)) {
+       while (test_and_set_bit(__LINK_STATE_RX_SCHED, &dev->state))
                /* No hurry. */
-               current->state = TASK_INTERRUPTIBLE;
-               schedule_timeout(1);
-       }
+               schedule_timeout_interruptible(1);
  }
  
  static inline void netif_poll_enable(struct net_device *dev)