2.6.x net driver updates
Subsystems (3)
PATCH 1/1 2.6.x net driver updates
The day's net driver merges.
Please do a
bk pull bk://gkernel.bkbits.net/net-drivers-2.6
This will update the following files:
drivers/net/8139cp.c | 1 drivers/net/b44.c | 131 +++-- drivers/net/b44.h | 113 ---- drivers/net/depca.c | 8 drivers/net/forcedeth.c | 31 + drivers/net/sis900.c | 258 +++++----- drivers/net/smc91x.c | 484 ++++++++++--------- drivers/net/smc91x.h | 33 - drivers/net/tokenring/lanstreamer.c | 2 drivers/net/tulip/dmfe.c | 1 drivers/net/via-rhine.c | 4 drivers/net/wireless/prism54/isl_38xx.c | 15 drivers/net/wireless/prism54/isl_38xx.h | 4 drivers/net/wireless/prism54/isl_ioctl.c | 639 ++++++++++++++++++++++---- drivers/net/wireless/prism54/isl_ioctl.h | 2 drivers/net/wireless/prism54/isl_oid.h | 9 drivers/net/wireless/prism54/islpci_dev.c | 49 + drivers/net/wireless/prism54/islpci_dev.h | 4 drivers/net/wireless/prism54/islpci_eth.c | 5 drivers/net/wireless/prism54/islpci_hotplug.c | 3 drivers/net/wireless/prism54/islpci_mgt.c | 1 drivers/net/wireless/prism54/islpci_mgt.h | 2 drivers/net/wireless/prism54/oid_mgt.c | 126 ++++- drivers/net/wireless/prism54/oid_mgt.h | 5 24 files changed, 1273 insertions(+), 657 deletions(-)
through these ChangeSets:
<jolt:tuxbox.org>:
o [netdrvr b44] clean up SiliconBackplane definitions/functions
o [netdrvr b44] ignore carrier lost errors
Alexander Viro:
o depca removal of bogus virt_to_bus() uses
o missing includes of asm/irq.h
o lanstreamer fix
Andrew Morton:
o typhoon build fix
Con Kolivas:
o b44poll - whitespace
o netconsole support for b44
Daniele Venzano:
o [netdrvr sis900] whitespace and codingstyle updates
Hirokazu Takata:
o m32r: trivial fix of smc91x.h
Jeff Garzik:
o [netdrvr b44] update MODULE_AUTHORS
Manfred Spraul:
o rx checksum support for gige nForce ethernet
Margit Schubert-While:
o prism54 bug initialization/mgt_commit
o prism54 print firmware version
o prism54 Bug in timeout scheduling
o prism54 remove TRACE
o prism54 fix wpa_supplicant frequency parsing
o prism54 initial WPA support
o prism54 add WE17 support
o prism54 remove module params
o prism54 Code cleanup
Nicolas Pitre:
o smc91x: release on-chip RX packet memory ASAP
o smc91x: receives two bytes too many
o smc91x: fix compilation with DMA on PXA2xx
o smc91x: more SMP locking fixes
o smc91x: fix SMP lock usage
o smc91x: cosmetics
o smc91x: straighten SMP locking
o smc91x: display pertinent register values from the timeout function
o smc91x: fix possible leak of the skb waiting for mem allocation
o smc91x: use a work queue to reconfigure the phy from smc_timeout()
o smc91x: move TX processing out of IRQ context entirely
o smc91x: simplify register bank usage
o smc91x: fold smc_setmulticast() into smc_set_multicast_list()
o smc91x: set the MAC addr from the smc_enable function
o smc91x: Assorted minor cleanups
o smc91x: Revert 1.1923.3.58: "m32r: modify drivers/net/smc91x.c for m32r"
Pavel Machek:
o Fix suspend/resume support in via-rhine2
Pekka Pietikäinen:
o b44: use bounce buffers to workaround chip DMA bug/limitations
Stephen Hemminger:
o b44: use netdev_priv
o b44: replace MODULE_PARM
drivers/net/8139cp.c +1 -0
@@ -71,6 +71,7 @@#include <linux/udp.h> #include <linux/cache.h> #include <asm/io.h> +#include <asm/irq.h> #include <asm/uaccess.h> /* VLAN tagging feature enable/disable */
drivers/net/b44.c +83 -48
264 lines not on this page · raw message
drivers/net/b44.h +5 -108
153 lines not on this page · raw message
drivers/net/depca.c +4 -4
@@ -1222,10 +1222,10 @@/* clear IDON by writing a "1", enable interrupts and start lance */ outw (IDON |INEA |STRT ,DEPCA_DATA );if (depca_debug >2 ) { -printk ("%s: DEPCA open after %d ticks, init block 0x%08lx csr0 %4.4x.\n" , dev->name, i,virt_to_phys (lp->sh_mem),inw (DEPCA_DATA )); +printk ("%s: DEPCA open after %d ticks, init block 0x%08lx csr0 %4.4x.\n" , dev->name, i, lp->mem_start,inw (DEPCA_DATA )); } }else { -printk ("%s: DEPCA unopen after %d ticks, init block 0x%08lx csr0 %4.4x.\n" , dev->name, i,virt_to_phys (lp->sh_mem),inw (DEPCA_DATA )); +printk ("%s: DEPCA unopen after %d ticks, init block 0x%08lx csr0 %4.4x.\n" , dev->name, i, lp->mem_start,inw (DEPCA_DATA )); status =-1 ; }
@@ -1901,7 +1901,7 @@ } }printk ("...0x%8.8x\n" ,readl (&lp->tx_ring[i].base)); -printk ("Initialisation block at 0x%8.8lx(Phys)\n" ,virt_to_phys (lp->sh_mem)); +printk ("Initialisation block at 0x%8.8lx(Phys)\n" , lp->mem_start);printk (" mode: 0x%4.4x\n" , p->mode);printk (" physical address: " );for (i =0 ; i <ETH_ALEN -1 ; i++) {
@@ -1915,7 +1915,7 @@printk ("%2.2x\n" , p->mcast_table[i]);printk (" rx_ring at: 0x%8.8x\n" , p->rx_ring);printk (" tx_ring at: 0x%8.8x\n" , p->tx_ring); -printk ("buffers (Phys): 0x%8.8lx\n" ,virt_to_phys (lp->sh_mem) + lp->buffs_offset); +printk ("buffers (Phys): 0x%8.8lx\n" , lp->mem_start + lp->buffs_offset);printk ("Ring size:\nRX: %d Log2(rxRingMask): 0x%8.8x\n" , (int ) lp->rxRingMask +1 , lp->rx_rlen);printk ("TX: %d Log2(txRingMask): 0x%8.8x\n" , (int ) lp->txRingMask +1 , lp->tx_rlen);outw (CSR2 ,DEPCA_ADDR );
drivers/net/forcedeth.c +28 -3
@@ -76,6 +76,9 @@* for registers, link status and other minor fixes. * 0.28: 21 Jun 2004: Big cleanup, making driver mostly endian safe * 0.29: 31 Aug 2004: Add backup timer for link change notification. +* 0.30: 25 Sep 2004: rx checksum support for nf 250 Gb. Add rx reset +* into nv_close, otherwise reenabling for wol can +* cause DMA to kfree'd memory. * * Known bugs: * We suspect that on some hardware no TX done interrupts are generated.
@@ -87,7 +90,7 @@* DEV_NEED_TIMERIRQ will not harm you on sane hardware, only generating a few * superfluous timer interrupts from the nic. */ -#define FORCEDETH_VERSION "0.29" +#define FORCEDETH_VERSION "0.30"#define DRV_NAME "forcedeth"#include <linux/module.h>
@@ -217,6 +220,7 @@#define NVREG_TXRXCTL_BIT2 0x0004#define NVREG_TXRXCTL_IDLE 0x0008#define NVREG_TXRXCTL_RESET 0x0010 +#define NVREG_TXRXCTL_RXCHECK 0x0400 NvRegMIIStatus = 0x180,#define NVREG_MIISTAT_ERROR 0x0001#define NVREG_MIISTAT_LINKCHANGE 0x0008
@@ -313,6 +317,10 @@#define NV_RX_ERROR (1<<30)#define NV_RX_AVAIL (1<<31) +#define NV_RX2_CHECKSUMMASK (0x1C000000) +#define NV_RX2_CHECKSUMOK1 (0x10000000) +#define NV_RX2_CHECKSUMOK2 (0x14000000) +#define NV_RX2_CHECKSUMOK3 (0x18000000)#define NV_RX2_DESCRIPTORVALID (1<<29)#define NV_RX2_SUBSTRACT1 (1<<25)#define NV_RX2_ERROR1 (1<<18)
@@ -371,8 +379,15 @@#define POLL_WAIT (1+HZ/100)#define LINK_TIMEOUT (3*HZ) +/* +* desc_ver values: +* This field has two purposes: +* - Newer nics uses a different ring layout. The layout is selected by +* comparing np->desc_ver with DESC_VER_xy. +* - It contains bits that are forced on when writing to NvRegTxRxControl. +*/ #define DESC_VER_1 0x0 -#define DESC_VER_2 0x02100 +#define DESC_VER_2 (0x02100|NVREG_TXRXCTL_RXCHECK)/* PHY defines */ #define PHY_OUI_MARVELL 0x5043
@@ -1142,6 +1157,15 @@ goto next_pkt; } } + Flags &=NV_RX2_CHECKSUMMASK ; +if (Flags ==NV_RX2_CHECKSUMOK1 || + Flags ==NV_RX2_CHECKSUMOK2 || + Flags ==NV_RX2_CHECKSUMOK3 ) { +dprintk (KERN_DEBUG "%s: hw checksum hit!.\n" , dev->name); + np->rx_skbuff[i]->ip_summed =CHECKSUM_UNNECESSARY ; + }else { +dprintk (KERN_DEBUG "%s: hwchecksum miss!.\n" , dev->name); + } }/* got a valid packet - forward it to the network core */ skb = np->rx_skbuff[i];
@@ -1634,9 +1658,10 @@spin_lock_irq (&np->lock);nv_stop_tx (dev);nv_stop_rx (dev); - base =get_hwbase (dev); +nv_txrx_reset (dev);/* disable interrupts on the nic or we will lock up */ + base =get_hwbase (dev);writel (0 , base + NvRegIrqMask);pci_push (base);dprintk (KERN_INFO "%s: Irqmask is zero again\n" , dev->name);
drivers/net/sis900.c +142 -116
545 lines not on this page · raw message
drivers/net/smc91x.c +258 -226
952 lines not on this page · raw message
drivers/net/smc91x.h +18 -15
@@ -173,6 +173,11 @@#define SMC_insw (a, r, p, l) insw((a) + (r) - 0xa0000000, p, l)#define SMC_outsw (a, r, p, l) outsw((a) + (r) - 0xa0000000, p, l) +#define set_irq_type (irq, type) do {} while(0) + +#define RPC_LSA_DEFAULT RPC_LED_TX_RX +#define RPC_LSB_DEFAULT RPC_LED_100_10 +#else #define SMC_CAN_USE_8BIT 1
@@ -202,8 +207,9 @@* different and probably not worth it for that reason, and not as critical * as RX which can overrun memory and lose packets. */ -#include <linux/pci.h> +#include <linux/dma-mapping.h> #include <asm/dma.h> +#include <asm/arch/pxa-regs.h> #ifdef SMC_insl#undef SMC_insl
@@ -223,19 +229,21 @@/* 64 bit alignment is required for memory to memory DMA */ if ((long )buf &4 ) { - *((u32 *)buf)++ =SMC_inl (ioaddr, reg); + *((u32 *)buf) =SMC_inl (ioaddr, reg); + buf +=4 ; len--; } len *=4 ; - dmabuf =dma_map_single (NULL , buf, len,PCI_DMA_FROMDEVICE ); + dmabuf =dma_map_single (NULL , buf, len,DMA_FROM_DEVICE );DCSR (dma) =DCSR_NODESC ;DTADR (dma) = dmabuf;DSADR (dma) = physaddr + reg;DCMD (dma) = (DCMD_INCTRGADDR |DCMD_BURST32 |DCMD_WIDTH4 | (DCMD_LENGTH & len));DCSR (dma) =DCSR_NODESC |DCSR_RUN ; -while (!(DCSR (dma) &DCSR_STOPSTATE )); +while (!(DCSR (dma) &DCSR_STOPSTATE )) +cpu_relax ();DCSR (dma) =0 ;dma_unmap_single (NULL , dmabuf, len,PCI_DMA_FROMDEVICE ); }
@@ -259,7 +267,8 @@/* 64 bit alignment is required for memory to memory DMA */ while ((long )buf &6 ) { - *((u16 *)buf)++ =SMC_inw (ioaddr, reg); + *((u16 *)buf) =SMC_inw (ioaddr, reg); + buf +=2 ; len--; }
@@ -271,9 +280,10 @@DCMD (dma) = (DCMD_INCTRGADDR |DCMD_BURST32 |DCMD_WIDTH2 | (DCMD_LENGTH & len));DCSR (dma) =DCSR_NODESC |DCSR_RUN ; -while (!(DCSR (dma) &DCSR_STOPSTATE )); +while (!(DCSR (dma) &DCSR_STOPSTATE )) +cpu_relax ();DCSR (dma) =0 ; - dma_unmap_single(NULL, dmabuf, len, PCI_DMA_FROMDEVICE); + dma_unmap_single(NULL, dmabuf, len, DMA_FROM_DEVICE); }#endif
@@ -762,16 +772,9 @@SMC_outw ( addr[4 ]|(addr[5 ] <<8 ), ioaddr,ADDR2_REG ); \ } while (0) -#define SMC_CLEAR_MCAST () \ - do { \ - SMC_outw( 0, ioaddr, MCAST_REG1 ); \ - SMC_outw( 0, ioaddr, MCAST_REG2 ); \ - SMC_outw( 0, ioaddr, MCAST_REG3 ); \ - SMC_outw( 0, ioaddr, MCAST_REG4 ); \ - } while (0)#define SMC_SET_MCAST (x) \ do { \ - unsigned char *mt = (x); \ + const unsigned char *mt = (x); \ SMC_outw( mt[0] | (mt[1] << 8), ioaddr, MCAST_REG1 ); \ SMC_outw( mt[2] | (mt[3] << 8), ioaddr, MCAST_REG2 ); \ SMC_outw( mt[4] | (mt[5] << 8), ioaddr, MCAST_REG3 ); \
drivers/net/tokenring/lanstreamer.c +1 -1
@@ -1606,7 +1606,7 @@ i +=2 ; } -memcpy_fromio (skb_put (mac_frame, buffer_len), +memcpy (skb_put (mac_frame, buffer_len), frame_data, buffer_len); }while (next_ptr && (buff_off = next_ptr));
drivers/net/tulip/dmfe.c +1 -0
@@ -92,6 +92,7 @@#include <asm/io.h> #include <asm/dma.h> #include <asm/uaccess.h> +#include <asm/irq.h> /* Board/System/Debug information/definition ---------------- */
drivers/net/via-rhine.c +4 -0
@@ -1957,6 +1957,7 @@rhine_shutdown (&pdev->dev);spin_unlock_irqrestore (&rp->lock, flags); +free_irq (dev->irq, dev);return 0 ; }
@@ -1969,6 +1970,9 @@if (!netif_running (dev))return 0 ; + +if (request_irq (dev->irq, rhine_interrupt,SA_SHIRQ , dev->name, dev)) +printk (KERN_ERR "via-rhine %s: request_irq failed\n" , dev->name); ret =pci_set_power_state (pdev,0 );if (debug >1 )
drivers/net/wireless/prism54/isl_38xx.c +5 -10
@@ -133,8 +133,8 @@ readl(device_base + ISL38XX_CTRL_STAT_REG));udelay (ISL38XX_WRITEIO_DELAY ); -if (reg =readl (device_base +ISL38XX_INT_IDENT_REG ), - reg ==0xabadface ) { + reg =readl (device_base +ISL38XX_INT_IDENT_REG ); +if (reg ==0xabadface ) {#if VERBOSE >SHOW_ERROR_MESSAGES do_gettimeofday (¤t_time); DEBUG(SHOW_TRACING,
@@ -192,10 +192,8 @@void isl38xx_interface_reset (void __iomem *device_base,dma_addr_t host_address) { -u32 reg; -#if VERBOSE >SHOW_ERROR_MESSAGES -DEBUG (SHOW_FUNCTION_CALLS ,"isl38xx_interface_reset \n" ); +DEBUG (SHOW_FUNCTION_CALLS ,"isl38xx_interface_reset\n" );#endif /* load the address of the control block in the device */
@@ -203,8 +201,7 @@udelay (ISL38XX_WRITEIO_DELAY );/* set the reset bit in the Device Interrupt Register */ -isl38xx_w32_flush (device_base,ISL38XX_DEV_INT_RESET , -ISL38XX_DEV_INT_REG ); +isl38xx_w32_flush (device_base,ISL38XX_DEV_INT_RESET ,ISL38XX_DEV_INT_REG );udelay (ISL38XX_WRITEIO_DELAY );/* enable the interrupt for detecting initialization */
@@ -212,9 +209,7 @@/* Note: Do not enable other interrupts here. We want the * device to have come up first 100% before allowing any other * interrupts. */ - reg =ISL38XX_INT_IDENT_INIT ; - -isl38xx_w32_flush (device_base, reg,ISL38XX_INT_EN_REG ); +isl38xx_w32_flush (device_base,ISL38XX_INT_IDENT_INIT ,ISL38XX_INT_EN_REG );udelay (ISL38XX_WRITEIO_DELAY );/* allow complete full reset */ }
drivers/net/wireless/prism54/isl_38xx.h +4 -0
@@ -95,6 +95,10 @@#define ISL38XX_INT_SOURCES 0x001E/* Control/Status register bits */ +/* Looks like there are other meaningful bits +0x20004400 seen in normal operation, +0x200044db at 'timeout waiting for mgmt response' +*/ #define ISL38XX_CTRL_STAT_SLEEPMODE 0x00000200#define ISL38XX_CTRL_STAT_CLKRUN 0x00800000#define ISL38XX_CTRL_STAT_RESET 0x10000000
drivers/net/wireless/prism54/isl_ioctl.c +554 -85
767 lines not on this page · raw message
drivers/net/wireless/prism54/isl_ioctl.h +2 -0
@@ -48,6 +48,8 @@int prism54_set_mac_address (struct net_device *,void *);int prism54_ioctl (struct net_device *,struct ifreq *,int ); +int prism54_set_wpa (struct net_device *,struct iw_request_info *, +__u32 *,char *);extern const struct iw_handler_def prism54_handler_def;
drivers/net/wireless/prism54/isl_oid.h +9 -0
@@ -91,6 +91,14 @@u16 mhz[0 ]; } __attribute__ ((packed)); +struct obj_attachment { +char type; +char reserved; +short id; +short size; +char data[0 ]; +} __attribute__((packed)); +/* * in case everything's ok, the inlined function below will be * optimized away by the compiler...
@@ -472,6 +480,7 @@#define OID_TYPE_MLMEEX 0x09#define OID_TYPE_ADDR 0x0A#define OID_TYPE_RAW 0x0B +#define OID_TYPE_ATTACH 0x0C/* OID_TYPE_MLMEEX is special because of a variable size field when sending. * Not yet implemented (not used in driver anyway).
drivers/net/wireless/prism54/islpci_dev.c +32 -17
15 lines not on this page · raw message
drivers/net/wireless/prism54/islpci_dev.h +4 -0
Lines of this file are not shown. View the raw message.
drivers/net/wireless/prism54/islpci_eth.c +3 -2
Lines of this file are not shown. View the raw message.
drivers/net/wireless/prism54/islpci_hotplug.c +0 -3
Lines of this file are not shown. View the raw message.
drivers/net/wireless/prism54/islpci_mgt.c +1 -0
Lines of this file are not shown. View the raw message.
drivers/net/wireless/prism54/islpci_mgt.h +0 -2
Lines of this file are not shown. View the raw message.
drivers/net/wireless/prism54/oid_mgt.c +110 -16
126 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.