From: Albert H. <he...@us...> - 2009-02-01 18:29:48
|
Update of /cvsroot/gc-linux/linux/drivers/net In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv17186/drivers/net Modified Files: Kconfig Makefile gcn-bba.c Log Message: Merge 2.6.28. Also: - run checkpatch against the non-broken source code - add GPIO driver fixes - implement getgeo for the special block drivers - small fixes Index: gcn-bba.c =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/net/gcn-bba.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- gcn-bba.c 14 Sep 2008 19:20:29 -0000 1.15 +++ gcn-bba.c 1 Feb 2009 18:29:35 -0000 1.16 @@ -2,9 +2,9 @@ * drivers/net/gcn-bba.c * * Nintendo GameCube Broadband Adapter (BBA) driver - * Copyright (C) 2004-2008 The GameCube Linux Team + * Copyright (C) 2004-2009 The GameCube Linux Team * Copyright (C) 2005 Todd Jeffreys - * Copyright (C) 2004,2005,2006,2007,2008 Albert Herranz + * Copyright (C) 2004,2005,2006,2007,2008,2009 Albert Herranz * * Based on previous work by Stefan Esser, Franz Lehner, Costis and tmbinc. * @@ -34,9 +34,9 @@ #include <linux/spinlock.h> #include <linux/kthread.h> #include <linux/wait.h> +#include <linux/io.h> #include <linux/exi.h> #include <asm/system.h> -#include <asm/io.h> #define DRV_MODULE_NAME "gcn-bba" @@ -48,11 +48,11 @@ #define bba_printk(level, format, arg...) \ - printk(level DRV_MODULE_NAME ": " format , ## arg) + printk(level DRV_MODULE_NAME ": " format , ## arg) #ifdef BBA_DEBUG # define DBG(fmt, args...) \ - printk(KERN_ERR "%s: " fmt, __FUNCTION__ , ## args) + printk(KERN_ERR "%s: " fmt, __func__ , ## args) #else # define DBG(fmt, args...) #endif @@ -166,7 +166,7 @@ } #define bba_in12(reg) (bba_in16(reg) & 0x0fff) -#define bba_out12(reg,val) do { bba_out16((reg),(val)&0x0fff); } while(0) +#define bba_out12(reg, val) do { bba_out16(reg, (val)&0x0fff); } while (0) static inline void bba_ins_nosel(int reg, void *val, int len) { @@ -254,11 +254,11 @@ #define BBA_BP 0x0a/*+0x0b*/ /* Boundary Page Pointer Register */ #define BBA_TLBP 0x0c/*+0x0d*/ /* TX Low Boundary Page Pointer Register */ -#define BBA_TWP 0x0e/*+0x0f*/ /* Transmit Buffer Write Page Pointer Register */ -#define BBA_TRP 0x12/*+0x13*/ /* Transmit Buffer Read Page Pointer Register */ +#define BBA_TWP 0x0e/*+0x0f*/ /* Transmit Buf Write Page Pointer Register */ +#define BBA_TRP 0x12/*+0x13*/ /* Transmit Buf Read Page Pointer Register */ #define BBA_RWP 0x16/*+0x17*/ /* Receive Buffer Write Page Pointer Register */ #define BBA_RRP 0x18/*+0x19*/ /* Receive Buffer Read Page Pointer Register */ -#define BBA_RHBP 0x1a/*+0x1b*/ /* Receive High Boundary Page Pointer Register */ +#define BBA_RHBP 0x1a/*+0x1b*/ /* Receive High Boundary Page Ptr Register */ #define BBA_RXINTT 0x14/*+0x15*/ /* Receive Interrupt Timer Register */ @@ -277,7 +277,7 @@ #define BBA_NWAYC_LTE (1<<7) /* LTE, Link Test Enable */ #define BBA_GCA 0x32 /* GMAC Configuration A Register, RW, 00h */ -#define BBA_GCA_ARXERRB (1<<3) /* ARXERRB, Accept RX packet with error */ +#define BBA_GCA_ARXERRB (1<<3) /* ARXERRB, Accept RX pkt with error */ #define BBA_MISC 0x3d /* MISC Control Register 1, RW, 3ch */ #define BBA_MISC_BURSTDMA (1<<0) @@ -340,18 +340,20 @@ #define BBA_INIT_RWP BBA_INIT_BP #define BBA_INIT_RRP BBA_INIT_BP -#if defined(__BIG_ENDIAN_BITFIELD) -#define X(a,b) b,a -#else -#define X(a,b) a,b -#endif - enum { __BBA_RBFIM_OFF = 0, }; struct bba_descr { - u32 X(X(next_packet_ptr:12, packet_len:12), status:8); +#if defined(__BIG_ENDIAN_BITFIELD) + __u32 status:8, + packet_len : 12, + next_packet_ptr : 12; +#else + __u32 next_packet_ptr:12, + packet_len : 12, + status : 8; +#endif } __attribute((packed)); @@ -539,19 +541,19 @@ unsigned long flags; int retval = NETDEV_TX_OK; - static u8 pad[ETH_ZLEN] __attribute__ ((aligned (EXI_DMA_ALIGN+1))); + static u8 pad[ETH_ZLEN] __attribute__ ((aligned(EXI_DMA_ALIGN+1))); int pad_len; exi_dev_take(priv->exi_device); /* if the TXFIFO is in use, we'll try it later when free */ - if (bba_in8(BBA_NCRA) & (BBA_NCRA_ST0 | BBA_NCRA_ST1)) { + if (bba_in8(BBA_NCRA) & (BBA_NCRA_ST0 | BBA_NCRA_ST1)) { retval = NETDEV_TX_BUSY; goto out; - } + } spin_lock_irqsave(&priv->lock, flags); - skb = priv->tx_skb; + skb = priv->tx_skb; priv->tx_skb = NULL; spin_unlock_irqrestore(&priv->lock, flags); @@ -659,7 +661,7 @@ while (netif_running(dev) && received < budget && rrp != rwp) { bba_ins(rrp << 8, &descr, sizeof(descr)); - le32_to_cpus((u32 *) & descr); + le32_to_cpus((u32 *) &descr); size = descr.packet_len - 4; /* ignore CRC */ lrps = descr.status; @@ -725,9 +727,8 @@ priv->rx_work = 0; /* re-enable RBFI if it was disabled before */ - if (test_and_clear_bit(__BBA_RBFIM_OFF, &priv->flags)) { + if (test_and_clear_bit(__BBA_RBFIM_OFF, &priv->flags)) bba_out8(BBA_IMR, bba_in8(BBA_IMR) | BBA_IMR_RBFIM); - } exi_dev_give(priv->exi_device); @@ -740,10 +741,10 @@ static int bba_io_thread(void *bba_priv) { struct bba_private *priv = bba_priv; -// struct task_struct *me = current; -// struct sched_param param = { .sched_priority = MAX_RT_PRIO-1 }; +/* struct task_struct *me = current; */ +/* struct sched_param param = { .sched_priority = MAX_RT_PRIO-1 }; */ -// sched_setscheduler(me, SCHED_FIFO, ¶m); +/* sched_setscheduler(me, SCHED_FIFO, ¶m); */ set_user_nice(current, -20); current->flags |= PF_NOFREEZE; @@ -754,7 +755,7 @@ * The bba is often used to access the root filesystem. */ - while(!kthread_should_stop()) { + while (!kthread_should_stop()) { /* * We want to get scheduled at least once every 2 minutes * to avoid a softlockup spurious message... @@ -776,7 +777,7 @@ * Handles interrupt work from the network device. * Caller has already taken the exi channel. */ -static void inline bba_interrupt(struct net_device *dev) +static void bba_interrupt(struct net_device *dev) { struct bba_private *priv = (struct bba_private *)dev->priv; u8 ir, imr, status, lrps, ltps; @@ -791,7 +792,7 @@ bba_out8(BBA_IR, status); bba_out8(BBA_IMR, 0x00); goto out; - } + } while (status) { bba_out8(BBA_IR, status); @@ -820,15 +821,12 @@ bba_tx_err(ltps, dev); } - if (status & BBA_IR_FIFOEI) { + if (status & BBA_IR_FIFOEI) DBG("FIFOEI\n"); - } - if (status & BBA_IR_BUSEI) { + if (status & BBA_IR_BUSEI) DBG("BUSEI\n"); - } - if (status & BBA_IR_FRAGI) { + if (status & BBA_IR_FRAGI) DBG("FRAGI\n"); - } ir = bba_in8(BBA_IR); imr = bba_in8(BBA_IMR); @@ -841,9 +839,8 @@ DBG("a lot of interrupt work (%d loops)\n", loops); /* wake up xmit queue in case transmitter is idle */ - if ((bba_in8(BBA_NCRA) & (BBA_NCRA_ST0 | BBA_NCRA_ST1)) == 0) { + if ((bba_in8(BBA_NCRA) & (BBA_NCRA_ST0 | BBA_NCRA_ST1)) == 0) netif_wake_queue(dev); - } out: return; @@ -856,9 +853,8 @@ static void bba_retrieve_ether_addr(struct net_device *dev) { bba_ins(BBA_NAFR_PAR0, dev->dev_addr, ETH_ALEN); - if (!is_valid_ether_addr(dev->dev_addr)) { + if (!is_valid_ether_addr(dev->dev_addr)) random_ether_addr(dev->dev_addr); - } } /* @@ -942,7 +938,7 @@ bba_out8(BBA_IR, 0xFF); /* enable all interrupts */ - bba_out8(BBA_IMR, 0xFF & ~(BBA_IMR_FIFOEIM /*| BBA_IMR_REIM*/ )); + bba_out8(BBA_IMR, 0xFF & ~(BBA_IMR_FIFOEIM /*| BBA_IMR_REIM*/)); /* unknown, short command registers 0x02 */ /* XXX enable interrupts on the EXI glue logic */ @@ -977,7 +973,7 @@ c2 = (i2 + 0xc8) ^ (c0 + ((revid_eth_0 + revid_0 * 0x23) ^ 0x19)); c3 = (i0 + 0xc1) ^ (i3 + ((revid_eth_1 + 0xc8) ^ 0x90)); - return ((c0 << 24) | (c1 << 16) | (c2 << 8) | c3); + return (c0 << 24) | (c1 << 16) | (c2 << 8) | c3; } /* @@ -1021,9 +1017,8 @@ /* command error interrupt, haven't seen one yet */ mask >>= 1; - if (status & mask) { + if (status & mask) goto out; - } /* challenge/response interrupt */ mask >>= 1; @@ -1065,7 +1060,7 @@ return 1; } -static struct net_device *bba_dev = NULL; +static struct net_device *bba_dev; static inline void bba_select(void) { @@ -1199,9 +1194,8 @@ { int ret = -ENODEV; - if (exi_device_get(exi_device)) { + if (exi_device_get(exi_device)) ret = bba_init_device(exi_device); - } return ret; } @@ -1221,7 +1215,7 @@ .eid_table = bba_eid_table, .frequency = BBA_EXI_FREQ, .probe = bba_probe, - .remove = bba_remove + .remove = bba_remove, }; /** Index: Makefile =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/net/Makefile,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- Makefile 15 Nov 2008 20:10:15 -0000 1.28 +++ Makefile 1 Feb 2009 18:29:35 -0000 1.29 @@ -15,9 +15,12 @@ obj-$(CONFIG_CAN) += can/ obj-$(CONFIG_BONDING) += bonding/ obj-$(CONFIG_ATL1) += atlx/ +obj-$(CONFIG_ATL2) += atlx/ obj-$(CONFIG_ATL1E) += atl1e/ obj-$(CONFIG_GIANFAR) += gianfar_driver.o obj-$(CONFIG_TEHUTI) += tehuti.o +obj-$(CONFIG_ENIC) += enic/ +obj-$(CONFIG_JME) += jme.o gianfar_driver-objs := gianfar.o \ gianfar_ethtool.o \ @@ -128,6 +131,7 @@ obj-$(CONFIG_TSI108_ETH) += tsi108_eth.o obj-$(CONFIG_MV643XX_ETH) += mv643xx_eth.o obj-$(CONFIG_QLA3XXX) += qla3xxx.o +obj-$(CONFIG_QLGE) += qlge/ obj-$(CONFIG_PPP) += ppp_generic.o obj-$(CONFIG_PPP_ASYNC) += ppp_async.o @@ -224,6 +228,8 @@ obj-$(CONFIG_ENC28J60) += enc28j60.o obj-$(CONFIG_GAMECUBE_BBA) += gcn-bba.o +obj-$(CONFIG_XTENSA_XT2000_SONIC) += xtsonic.o + obj-$(CONFIG_MACB) += macb.o obj-$(CONFIG_ARM) += arm/ Index: Kconfig =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/net/Kconfig,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- Kconfig 15 Nov 2008 20:10:15 -0000 1.34 +++ Kconfig 1 Feb 2009 18:29:35 -0000 1.35 @@ -473,6 +473,12 @@ This is the driver for the onboard card of MIPS Magnum 4000, Acer PICA, Olivetti M700-10 and a few other identical OEM systems. +config XTENSA_XT2000_SONIC + tristate "Xtensa XT2000 onboard SONIC Ethernet support" + depends on XTENSA_PLATFORM_XT2000 + help + This is the driver for the onboard card of the Xtensa XT2000 board. + config MIPS_AU1X00_ENET bool "MIPS AU1000 Ethernet support" depends on SOC_AU1X00 @@ -897,7 +903,7 @@ select CRC32 select MII depends on ARM || REDWOOD_5 || REDWOOD_6 || M32R || SUPERH || \ - SOC_AU1X00 || BLACKFIN || MN10300 + MIPS || BLACKFIN || MN10300 help This is a driver for SMC's 91x series of Ethernet chipsets, including the SMC91C94 and the SMC91C111. Say Y if you want it @@ -969,7 +975,7 @@ tristate "SMSC LAN911[5678] support" select CRC32 select MII - depends on ARCH_PXA || SUPERH + depends on ARM || SUPERH help This is a driver for SMSC's LAN911x series of Ethernet chipsets including the new LAN9115, LAN9116, LAN9117, and LAN9118. @@ -1395,7 +1401,8 @@ config CS89x0 tristate "CS89x0 support" - depends on NET_PCI && (ISA || MACH_IXDP2351 || ARCH_IXDP2X01 || ARCH_PNX010X) + depends on NET_ETHERNET && (ISA || EISA || MACH_IXDP2351 \ + || ARCH_IXDP2X01 || ARCH_PNX010X || MACH_MX31ADS) ---help--- Support for CS89x0 chipset based Ethernet cards. If you have a network (Ethernet) card of this type, say Y and read the @@ -1406,6 +1413,11 @@ To compile this driver as a module, choose M here. The module will be called cs89x0. +config CS89x0_NONISA_IRQ + def_bool y + depends on CS89x0 != n + depends on MACH_IXDP2351 || ARCH_IXDP2X01 || ARCH_PNX010X || MACH_MX31ADS + config TC35815 tristate "TOSHIBA TC35815 Ethernet support" depends on NET_PCI && PCI && MIPS @@ -1822,9 +1834,10 @@ config FEC_MPC52xx tristate "MPC52xx FEC driver" - depends on PPC_MERGE && PPC_MPC52xx && PPC_BESTCOMM_FEC + depends on PPC_MPC52xx && PPC_BESTCOMM select CRC32 select PHYLIB + select PPC_BESTCOMM_FEC ---help--- This option enables support for the MPC5200's on-chip Fast Ethernet Controller @@ -1849,6 +1862,17 @@ Say Y here if you want to use the NE2000 compatible controller on the Renesas H8/300 processor. +config ATL2 + tristate "Atheros L2 Fast Ethernet support" + depends on PCI + select CRC32 + select MII + help + This driver supports the Atheros L2 fast ethernet adapter. + + To compile this driver as a module, choose M here. The module + will be called atl2. + source "drivers/net/fs_enet/Kconfig" endif # NET_ETHERNET @@ -1936,15 +1960,6 @@ To compile this driver as a module, choose M here. The module will be called e1000. -config E1000_DISABLE_PACKET_SPLIT - bool "Disable Packet Split for PCI express adapters" - depends on E1000 - help - Say Y here if you want to use the legacy receive path for PCI express - hardware. - - If in doubt, say N. - config E1000E tristate "Intel(R) PRO/1000 PCI-Express Gigabit Ethernet support" depends on PCI && (!SPARC32 || BROKEN) @@ -2004,6 +2019,15 @@ If in doubt, say N. +config IGB_DCA + bool "Direct Cache Access (DCA) Support" + default y + depends on IGB && DCA && !(IGB=y && DCA=m) + ---help--- + Say Y here if you want to use Direct Cache Access (DCA) in the + driver. DCA is a method for warming the CPU cache before data + is used, with the intent of lessening the impact of cache misses. + source "drivers/net/ixp2000/Kconfig" config MYRI_SBUS @@ -2055,6 +2079,7 @@ tristate "Realtek 8169 gigabit ethernet support" depends on PCI select CRC32 + select MII ---help--- Say Y here if you have a Realtek 8169 PCI Gigabit Ethernet adapter. @@ -2271,7 +2296,7 @@ config MV643XX_ETH tristate "Marvell Discovery (643XX) and Orion ethernet support" depends on MV64360 || MV64X60 || (PPC_MULTIPLATFORM && PPC32) || PLAT_ORION - select MII + select PHYLIB help This driver supports the gigabit ethernet MACs in the Marvell Discovery PPC/MIPS chipset family (MV643XX) and @@ -2290,12 +2315,13 @@ will be called qla3xxx. config ATL1 - tristate "Attansic L1 Gigabit Ethernet support (EXPERIMENTAL)" - depends on PCI && EXPERIMENTAL + tristate "Atheros/Attansic L1 Gigabit Ethernet support" + depends on PCI select CRC32 select MII help - This driver supports the Attansic L1 gigabit ethernet adapter. + This driver supports the Atheros/Attansic L1 gigabit ethernet + adapter. To compile this driver as a module, choose M here. The module will be called atl1. @@ -2311,6 +2337,18 @@ To compile this driver as a module, choose M here. The module will be called atl1e. +config JME + tristate "JMicron(R) PCI-Express Gigabit Ethernet support" + depends on PCI + select CRC32 + select MII + ---help--- + This driver supports the PCI-Express gigabit ethernet adapters + based on JMicron JMC250 chipset. + + To compile this driver as a module, choose M here. The module + will be called jme. + endif # NETDEV_1000 # @@ -2386,6 +2424,13 @@ To compile the driver as a module, choose M here. The module will be called ehea. +config ENIC + tristate "Cisco 10G Ethernet NIC support" + depends on PCI && INET + select INET_LRO + help + This enables the support for the Cisco 10G Ethernet card. + config IXGBE tristate "Intel(R) 10GbE PCI Express adapters support" depends on PCI && INET @@ -2405,6 +2450,15 @@ To compile this driver as a module, choose M here. The module will be called ixgbe. +config IXGBE_DCA + bool "Direct Cache Access (DCA) Support" + default y + depends on IXGBE && DCA && !(IXGBE=y && DCA=m) + ---help--- + Say Y here if you want to use Direct Cache Access (DCA) in the + driver. DCA is a method for warming the CPU cache before data + is used, with the intent of lessening the impact of cache misses. + config IXGB tristate "Intel(R) PRO/10GbE support" depends on PCI @@ -2452,6 +2506,15 @@ To compile this driver as a module, choose M here. The module will be called myri10ge. +config MYRI10GE_DCA + bool "Direct Cache Access (DCA) Support" + default y + depends on MYRI10GE && DCA && !(MYRI10GE=y && DCA=m) + ---help--- + Say Y here if you want to use Direct Cache Access (DCA) in the + driver. DCA is a method for warming the CPU cache before data + is used, with the intent of lessening the impact of cache misses. + config NETXEN_NIC tristate "NetXen Multi port (1/10) Gigabit Ethernet NIC" depends on PCI @@ -2474,6 +2537,15 @@ This driver supports the on-chip 1/10Gbit Ethernet controller on PA Semi's PWRficient line of chips. +config MLX4_EN + tristate "Mellanox Technologies 10Gbit Ethernet support" + depends on PCI && INET + select MLX4_CORE + select INET_LRO + help + This driver supports Mellanox Technologies ConnectX Ethernet + devices. + config MLX4_CORE tristate depends on PCI @@ -2505,6 +2577,15 @@ To compile this driver as a module, choose M here: the module will be called bnx2x. This is recommended. +config QLGE + tristate "QLogic QLGE 10Gb Ethernet Driver Support" + depends on PCI + help + This driver supports QLogic ISP8XXX 10Gb Ethernet cards. + + To compile this driver as a module, choose M here: the module + will be called qlge. + source "drivers/net/sfc/Kconfig" endif # NETDEV_10000 |