aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r--drivers/net/ethernet/atheros/atl1c/atl1c_main.c4
-rw-r--r--drivers/net/ethernet/broadcom/b44.c2
-rw-r--r--drivers/net/ethernet/broadcom/cnic.c6
-rw-r--r--drivers/net/ethernet/cirrus/Kconfig19
-rw-r--r--drivers/net/ethernet/cirrus/cs89x0.c148
-rw-r--r--drivers/net/ethernet/cisco/enic/cq_enet_desc.h2
-rw-r--r--drivers/net/ethernet/cisco/enic/enic_pp.c2
-rw-r--r--drivers/net/ethernet/jme.c10
-rw-r--r--drivers/net/ethernet/jme.h2
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/eq.c8
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/fw.c2
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/main.c10
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/mlx4.h2
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/mr.c12
-rw-r--r--drivers/net/ethernet/micrel/ks8851_mll.c2
-rw-r--r--drivers/net/ethernet/sfc/rx.c4
-rw-r--r--drivers/net/ethernet/ti/davinci_emac.c6
17 files changed, 168 insertions, 73 deletions
diff --git a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
index b8591246eb4c..1ff3c6df35a2 100644
--- a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
+++ b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
@@ -2244,10 +2244,6 @@ static netdev_tx_t atl1c_xmit_frame(struct sk_buff *skb,
2244 dev_info(&adapter->pdev->dev, "tx locked\n"); 2244 dev_info(&adapter->pdev->dev, "tx locked\n");
2245 return NETDEV_TX_LOCKED; 2245 return NETDEV_TX_LOCKED;
2246 } 2246 }
2247 if (skb->mark == 0x01)
2248 type = atl1c_trans_high;
2249 else
2250 type = atl1c_trans_normal;
2251 2247
2252 if (atl1c_tpd_avail(adapter, type) < tpd_req) { 2248 if (atl1c_tpd_avail(adapter, type) < tpd_req) {
2253 /* no enough descriptor, just stop queue */ 2249 /* no enough descriptor, just stop queue */
diff --git a/drivers/net/ethernet/broadcom/b44.c b/drivers/net/ethernet/broadcom/b44.c
index 3fb66d09ece5..cab87456a34a 100644
--- a/drivers/net/ethernet/broadcom/b44.c
+++ b/drivers/net/ethernet/broadcom/b44.c
@@ -2339,7 +2339,7 @@ static inline int __init b44_pci_init(void)
2339 return err; 2339 return err;
2340} 2340}
2341 2341
2342static inline void __exit b44_pci_exit(void) 2342static inline void b44_pci_exit(void)
2343{ 2343{
2344#ifdef CONFIG_B44_PCI 2344#ifdef CONFIG_B44_PCI
2345 ssb_pcihost_unregister(&b44_pci_driver); 2345 ssb_pcihost_unregister(&b44_pci_driver);
diff --git a/drivers/net/ethernet/broadcom/cnic.c b/drivers/net/ethernet/broadcom/cnic.c
index dd3a0a232ea0..818a573669e6 100644
--- a/drivers/net/ethernet/broadcom/cnic.c
+++ b/drivers/net/ethernet/broadcom/cnic.c
@@ -3584,7 +3584,11 @@ static int cnic_get_v6_route(struct sockaddr_in6 *dst_addr,
3584 fl6.flowi6_oif = dst_addr->sin6_scope_id; 3584 fl6.flowi6_oif = dst_addr->sin6_scope_id;
3585 3585
3586 *dst = ip6_route_output(&init_net, NULL, &fl6); 3586 *dst = ip6_route_output(&init_net, NULL, &fl6);
3587 if (*dst) 3587 if ((*dst)->error) {
3588 dst_release(*dst);
3589 *dst = NULL;
3590 return -ENETUNREACH;
3591 } else
3588 return 0; 3592 return 0;
3589#endif 3593#endif
3590 3594
diff --git a/drivers/net/ethernet/cirrus/Kconfig b/drivers/net/ethernet/cirrus/Kconfig
index 1f8648f099c7..8388e36cf08f 100644
--- a/drivers/net/ethernet/cirrus/Kconfig
+++ b/drivers/net/ethernet/cirrus/Kconfig
@@ -5,8 +5,7 @@
5config NET_VENDOR_CIRRUS 5config NET_VENDOR_CIRRUS
6 bool "Cirrus devices" 6 bool "Cirrus devices"
7 default y 7 default y
8 depends on ISA || EISA || MACH_IXDP2351 || ARCH_IXDP2X01 \ 8 depends on ISA || EISA || ARM || MAC
9 || MACH_MX31ADS || MACH_QQ2440 || (ARM && ARCH_EP93XX) || MAC
10 ---help--- 9 ---help---
11 If you have a network (Ethernet) card belonging to this class, say Y 10 If you have a network (Ethernet) card belonging to this class, say Y
12 and read the Ethernet-HOWTO, available from 11 and read the Ethernet-HOWTO, available from
@@ -21,8 +20,7 @@ if NET_VENDOR_CIRRUS
21 20
22config CS89x0 21config CS89x0
23 tristate "CS89x0 support" 22 tristate "CS89x0 support"
24 depends on (ISA || EISA || MACH_IXDP2351 \ 23 depends on ISA || EISA || ARM
25 || ARCH_IXDP2X01 || MACH_MX31ADS || MACH_QQ2440)
26 ---help--- 24 ---help---
27 Support for CS89x0 chipset based Ethernet cards. If you have a 25 Support for CS89x0 chipset based Ethernet cards. If you have a
28 network (Ethernet) card of this type, say Y and read the 26 network (Ethernet) card of this type, say Y and read the
@@ -33,10 +31,15 @@ config CS89x0
33 To compile this driver as a module, choose M here. The module 31 To compile this driver as a module, choose M here. The module
34 will be called cs89x0. 32 will be called cs89x0.
35 33
36config CS89x0_NONISA_IRQ 34config CS89x0_PLATFORM
37 def_bool y 35 bool "CS89x0 platform driver support"
38 depends on CS89x0 != n 36 depends on CS89x0
39 depends on MACH_IXDP2351 || ARCH_IXDP2X01 || MACH_MX31ADS || MACH_QQ2440 37 help
38 Say Y to compile the cs89x0 driver as a platform driver. This
39 makes this driver suitable for use on certain evaluation boards
40 such as the iMX21ADS.
41
42 If you are unsure, say N.
40 43
41config EP93XX_ETH 44config EP93XX_ETH
42 tristate "EP93xx Ethernet support" 45 tristate "EP93xx Ethernet support"
diff --git a/drivers/net/ethernet/cirrus/cs89x0.c b/drivers/net/ethernet/cirrus/cs89x0.c
index f328da24c8fa..7202ca951bf3 100644
--- a/drivers/net/ethernet/cirrus/cs89x0.c
+++ b/drivers/net/ethernet/cirrus/cs89x0.c
@@ -100,9 +100,6 @@
100 100
101*/ 101*/
102 102
103/* Always include 'config.h' first in case the user wants to turn on
104 or override something. */
105#include <linux/module.h>
106 103
107/* 104/*
108 * Set this to zero to disable DMA code 105 * Set this to zero to disable DMA code
@@ -131,9 +128,12 @@
131 128
132*/ 129*/
133 130
131#include <linux/module.h>
132#include <linux/printk.h>
134#include <linux/errno.h> 133#include <linux/errno.h>
135#include <linux/netdevice.h> 134#include <linux/netdevice.h>
136#include <linux/etherdevice.h> 135#include <linux/etherdevice.h>
136#include <linux/platform_device.h>
137#include <linux/kernel.h> 137#include <linux/kernel.h>
138#include <linux/types.h> 138#include <linux/types.h>
139#include <linux/fcntl.h> 139#include <linux/fcntl.h>
@@ -151,6 +151,7 @@
151#include <asm/system.h> 151#include <asm/system.h>
152#include <asm/io.h> 152#include <asm/io.h>
153#include <asm/irq.h> 153#include <asm/irq.h>
154#include <linux/atomic.h>
154#if ALLOW_DMA 155#if ALLOW_DMA
155#include <asm/dma.h> 156#include <asm/dma.h>
156#endif 157#endif
@@ -174,26 +175,20 @@ static char version[] __initdata =
174 them to system IRQ numbers. This mapping is card specific and is set to 175 them to system IRQ numbers. This mapping is card specific and is set to
175 the configuration of the Cirrus Eval board for this chip. */ 176 the configuration of the Cirrus Eval board for this chip. */
176#if defined(CONFIG_MACH_IXDP2351) 177#if defined(CONFIG_MACH_IXDP2351)
178#define CS89x0_NONISA_IRQ
177static unsigned int netcard_portlist[] __used __initdata = {IXDP2351_VIRT_CS8900_BASE, 0}; 179static unsigned int netcard_portlist[] __used __initdata = {IXDP2351_VIRT_CS8900_BASE, 0};
178static unsigned int cs8900_irq_map[] = {IRQ_IXDP2351_CS8900, 0, 0, 0}; 180static unsigned int cs8900_irq_map[] = {IRQ_IXDP2351_CS8900, 0, 0, 0};
179#elif defined(CONFIG_ARCH_IXDP2X01) 181#elif defined(CONFIG_ARCH_IXDP2X01)
182#define CS89x0_NONISA_IRQ
180static unsigned int netcard_portlist[] __used __initdata = {IXDP2X01_CS8900_VIRT_BASE, 0}; 183static unsigned int netcard_portlist[] __used __initdata = {IXDP2X01_CS8900_VIRT_BASE, 0};
181static unsigned int cs8900_irq_map[] = {IRQ_IXDP2X01_CS8900, 0, 0, 0}; 184static unsigned int cs8900_irq_map[] = {IRQ_IXDP2X01_CS8900, 0, 0, 0};
182#elif defined(CONFIG_MACH_QQ2440)
183#include <mach/qq2440.h>
184static unsigned int netcard_portlist[] __used __initdata = { QQ2440_CS8900_VIRT_BASE + 0x300, 0 };
185static unsigned int cs8900_irq_map[] = { QQ2440_CS8900_IRQ, 0, 0, 0 };
186#elif defined(CONFIG_MACH_MX31ADS)
187#include <mach/board-mx31ads.h>
188static unsigned int netcard_portlist[] __used __initdata = {
189 PBC_BASE_ADDRESS + PBC_CS8900A_IOBASE + 0x300, 0
190};
191static unsigned cs8900_irq_map[] = {EXPIO_INT_ENET_INT, 0, 0, 0};
192#else 185#else
186#ifndef CONFIG_CS89x0_PLATFORM
193static unsigned int netcard_portlist[] __used __initdata = 187static unsigned int netcard_portlist[] __used __initdata =
194 { 0x300, 0x320, 0x340, 0x360, 0x200, 0x220, 0x240, 0x260, 0x280, 0x2a0, 0x2c0, 0x2e0, 0}; 188 { 0x300, 0x320, 0x340, 0x360, 0x200, 0x220, 0x240, 0x260, 0x280, 0x2a0, 0x2c0, 0x2e0, 0};
195static unsigned int cs8900_irq_map[] = {10,11,12,5}; 189static unsigned int cs8900_irq_map[] = {10,11,12,5};
196#endif 190#endif
191#endif
197 192
198#if DEBUGGING 193#if DEBUGGING
199static unsigned int net_debug = DEBUGGING; 194static unsigned int net_debug = DEBUGGING;
@@ -236,11 +231,16 @@ struct net_local {
236 unsigned char *end_dma_buff; /* points to the end of the buffer */ 231 unsigned char *end_dma_buff; /* points to the end of the buffer */
237 unsigned char *rx_dma_ptr; /* points to the next packet */ 232 unsigned char *rx_dma_ptr; /* points to the next packet */
238#endif 233#endif
234#ifdef CONFIG_CS89x0_PLATFORM
235 void __iomem *virt_addr;/* Virtual address for accessing the CS89x0. */
236 unsigned long phys_addr;/* Physical address for accessing the CS89x0. */
237 unsigned long size; /* Length of CS89x0 memory region. */
238#endif
239}; 239};
240 240
241/* Index to functions, as function prototypes. */ 241/* Index to functions, as function prototypes. */
242 242
243static int cs89x0_probe1(struct net_device *dev, int ioaddr, int modular); 243static int cs89x0_probe1(struct net_device *dev, unsigned long ioaddr, int modular);
244static int net_open(struct net_device *dev); 244static int net_open(struct net_device *dev);
245static netdev_tx_t net_send_packet(struct sk_buff *skb, struct net_device *dev); 245static netdev_tx_t net_send_packet(struct sk_buff *skb, struct net_device *dev);
246static irqreturn_t net_interrupt(int irq, void *dev_id); 246static irqreturn_t net_interrupt(int irq, void *dev_id);
@@ -294,6 +294,7 @@ static int __init media_fn(char *str)
294__setup("cs89x0_media=", media_fn); 294__setup("cs89x0_media=", media_fn);
295 295
296 296
297#ifndef CONFIG_CS89x0_PLATFORM
297/* Check for a network adaptor of this type, and return '0' iff one exists. 298/* Check for a network adaptor of this type, and return '0' iff one exists.
298 If dev->base_addr == 0, probe all likely locations. 299 If dev->base_addr == 0, probe all likely locations.
299 If dev->base_addr == 1, always return failure. 300 If dev->base_addr == 1, always return failure.
@@ -343,6 +344,7 @@ out:
343 return ERR_PTR(err); 344 return ERR_PTR(err);
344} 345}
345#endif 346#endif
347#endif
346 348
347#if defined(CONFIG_MACH_IXDP2351) 349#if defined(CONFIG_MACH_IXDP2351)
348static u16 350static u16
@@ -504,7 +506,7 @@ static const struct net_device_ops net_ops = {
504 */ 506 */
505 507
506static int __init 508static int __init
507cs89x0_probe1(struct net_device *dev, int ioaddr, int modular) 509cs89x0_probe1(struct net_device *dev, unsigned long ioaddr, int modular)
508{ 510{
509 struct net_local *lp = netdev_priv(dev); 511 struct net_local *lp = netdev_priv(dev);
510 static unsigned version_printed; 512 static unsigned version_printed;
@@ -529,15 +531,12 @@ cs89x0_probe1(struct net_device *dev, int ioaddr, int modular)
529 lp->force = g_cs89x0_media__force; 531 lp->force = g_cs89x0_media__force;
530#endif 532#endif
531 533
532#if defined(CONFIG_MACH_QQ2440)
533 lp->force |= FORCE_RJ45 | FORCE_FULL;
534#endif
535 } 534 }
536 535
537 /* Grab the region so we can find another board if autoIRQ fails. */ 536 /* Grab the region so we can find another board if autoIRQ fails. */
538 /* WTF is going on here? */ 537 /* WTF is going on here? */
539 if (!request_region(ioaddr & ~3, NETCARD_IO_EXTENT, DRV_NAME)) { 538 if (!request_region(ioaddr & ~3, NETCARD_IO_EXTENT, DRV_NAME)) {
540 printk(KERN_ERR "%s: request_region(0x%x, 0x%x) failed\n", 539 printk(KERN_ERR "%s: request_region(0x%lx, 0x%x) failed\n",
541 DRV_NAME, ioaddr, NETCARD_IO_EXTENT); 540 DRV_NAME, ioaddr, NETCARD_IO_EXTENT);
542 retval = -EBUSY; 541 retval = -EBUSY;
543 goto out1; 542 goto out1;
@@ -549,7 +548,7 @@ cs89x0_probe1(struct net_device *dev, int ioaddr, int modular)
549 will skip the test for the ADD_PORT. */ 548 will skip the test for the ADD_PORT. */
550 if (ioaddr & 1) { 549 if (ioaddr & 1) {
551 if (net_debug > 1) 550 if (net_debug > 1)
552 printk(KERN_INFO "%s: odd ioaddr 0x%x\n", dev->name, ioaddr); 551 printk(KERN_INFO "%s: odd ioaddr 0x%lx\n", dev->name, ioaddr);
553 if ((ioaddr & 2) != 2) 552 if ((ioaddr & 2) != 2)
554 if ((readword(ioaddr & ~3, ADD_PORT) & ADD_MASK) != ADD_SIG) { 553 if ((readword(ioaddr & ~3, ADD_PORT) & ADD_MASK) != ADD_SIG) {
555 printk(KERN_ERR "%s: bad signature 0x%x\n", 554 printk(KERN_ERR "%s: bad signature 0x%x\n",
@@ -560,13 +559,13 @@ cs89x0_probe1(struct net_device *dev, int ioaddr, int modular)
560 } 559 }
561 560
562 ioaddr &= ~3; 561 ioaddr &= ~3;
563 printk(KERN_DEBUG "PP_addr at %x[%x]: 0x%x\n", 562 printk(KERN_DEBUG "PP_addr at %lx[%x]: 0x%x\n",
564 ioaddr, ADD_PORT, readword(ioaddr, ADD_PORT)); 563 ioaddr, ADD_PORT, readword(ioaddr, ADD_PORT));
565 writeword(ioaddr, ADD_PORT, PP_ChipID); 564 writeword(ioaddr, ADD_PORT, PP_ChipID);
566 565
567 tmp = readword(ioaddr, DATA_PORT); 566 tmp = readword(ioaddr, DATA_PORT);
568 if (tmp != CHIP_EISA_ID_SIG) { 567 if (tmp != CHIP_EISA_ID_SIG) {
569 printk(KERN_DEBUG "%s: incorrect signature at %x[%x]: 0x%x!=" 568 printk(KERN_DEBUG "%s: incorrect signature at %lx[%x]: 0x%x!="
570 CHIP_EISA_ID_SIG_STR "\n", 569 CHIP_EISA_ID_SIG_STR "\n",
571 dev->name, ioaddr, DATA_PORT, tmp); 570 dev->name, ioaddr, DATA_PORT, tmp);
572 retval = -ENODEV; 571 retval = -ENODEV;
@@ -736,8 +735,9 @@ cs89x0_probe1(struct net_device *dev, int ioaddr, int modular)
736 dev->irq = i; 735 dev->irq = i;
737 } else { 736 } else {
738 i = lp->isa_config & INT_NO_MASK; 737 i = lp->isa_config & INT_NO_MASK;
738#ifndef CONFIG_CS89x0_PLATFORM
739 if (lp->chip_type == CS8900) { 739 if (lp->chip_type == CS8900) {
740#ifdef CONFIG_CS89x0_NONISA_IRQ 740#ifdef CS89x0_NONISA_IRQ
741 i = cs8900_irq_map[0]; 741 i = cs8900_irq_map[0];
742#else 742#else
743 /* Translate the IRQ using the IRQ mapping table. */ 743 /* Translate the IRQ using the IRQ mapping table. */
@@ -758,6 +758,7 @@ cs89x0_probe1(struct net_device *dev, int ioaddr, int modular)
758 } 758 }
759#endif 759#endif
760 } 760 }
761#endif
761 if (!dev->irq) 762 if (!dev->irq)
762 dev->irq = i; 763 dev->irq = i;
763 } 764 }
@@ -1168,6 +1169,7 @@ write_irq(struct net_device *dev, int chip_type, int irq)
1168 int i; 1169 int i;
1169 1170
1170 if (chip_type == CS8900) { 1171 if (chip_type == CS8900) {
1172#ifndef CONFIG_CS89x0_PLATFORM
1171 /* Search the mapping table for the corresponding IRQ pin. */ 1173 /* Search the mapping table for the corresponding IRQ pin. */
1172 for (i = 0; i != ARRAY_SIZE(cs8900_irq_map); i++) 1174 for (i = 0; i != ARRAY_SIZE(cs8900_irq_map); i++)
1173 if (cs8900_irq_map[i] == irq) 1175 if (cs8900_irq_map[i] == irq)
@@ -1175,6 +1177,10 @@ write_irq(struct net_device *dev, int chip_type, int irq)
1175 /* Not found */ 1177 /* Not found */
1176 if (i == ARRAY_SIZE(cs8900_irq_map)) 1178 if (i == ARRAY_SIZE(cs8900_irq_map))
1177 i = 3; 1179 i = 3;
1180#else
1181 /* INTRQ0 pin is used for interrupt generation. */
1182 i = 0;
1183#endif
1178 writereg(dev, PP_CS8900_ISAINT, i); 1184 writereg(dev, PP_CS8900_ISAINT, i);
1179 } else { 1185 } else {
1180 writereg(dev, PP_CS8920_ISAINT, irq); 1186 writereg(dev, PP_CS8920_ISAINT, irq);
@@ -1228,7 +1234,7 @@ net_open(struct net_device *dev)
1228 } 1234 }
1229 else 1235 else
1230 { 1236 {
1231#ifndef CONFIG_CS89x0_NONISA_IRQ 1237#if !defined(CS89x0_NONISA_IRQ) && !defined(CONFIG_CS89x0_PLATFORM)
1232 if (((1 << dev->irq) & lp->irq_map) == 0) { 1238 if (((1 << dev->irq) & lp->irq_map) == 0) {
1233 printk(KERN_ERR "%s: IRQ %d is not in our map of allowable IRQs, which is %x\n", 1239 printk(KERN_ERR "%s: IRQ %d is not in our map of allowable IRQs, which is %x\n",
1234 dev->name, dev->irq, lp->irq_map); 1240 dev->name, dev->irq, lp->irq_map);
@@ -1746,7 +1752,7 @@ static int set_mac_address(struct net_device *dev, void *p)
1746 return 0; 1752 return 0;
1747} 1753}
1748 1754
1749#ifdef MODULE 1755#if defined(MODULE) && !defined(CONFIG_CS89x0_PLATFORM)
1750 1756
1751static struct net_device *dev_cs89x0; 1757static struct net_device *dev_cs89x0;
1752 1758
@@ -1900,7 +1906,97 @@ cleanup_module(void)
1900 release_region(dev_cs89x0->base_addr, NETCARD_IO_EXTENT); 1906 release_region(dev_cs89x0->base_addr, NETCARD_IO_EXTENT);
1901 free_netdev(dev_cs89x0); 1907 free_netdev(dev_cs89x0);
1902} 1908}
1903#endif /* MODULE */ 1909#endif /* MODULE && !CONFIG_CS89x0_PLATFORM */
1910
1911#ifdef CONFIG_CS89x0_PLATFORM
1912static int __init cs89x0_platform_probe(struct platform_device *pdev)
1913{
1914 struct net_device *dev = alloc_etherdev(sizeof(struct net_local));
1915 struct net_local *lp;
1916 struct resource *mem_res;
1917 int err;
1918
1919 if (!dev)
1920 return -ENOMEM;
1921
1922 lp = netdev_priv(dev);
1923
1924 mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
1925 dev->irq = platform_get_irq(pdev, 0);
1926 if (mem_res == NULL || dev->irq <= 0) {
1927 dev_warn(&dev->dev, "memory/interrupt resource missing.\n");
1928 err = -ENXIO;
1929 goto free;
1930 }
1931
1932 lp->phys_addr = mem_res->start;
1933 lp->size = resource_size(mem_res);
1934 if (!request_mem_region(lp->phys_addr, lp->size, DRV_NAME)) {
1935 dev_warn(&dev->dev, "request_mem_region() failed.\n");
1936 err = -EBUSY;
1937 goto free;
1938 }
1939
1940 lp->virt_addr = ioremap(lp->phys_addr, lp->size);
1941 if (!lp->virt_addr) {
1942 dev_warn(&dev->dev, "ioremap() failed.\n");
1943 err = -ENOMEM;
1944 goto release;
1945 }
1946
1947 err = cs89x0_probe1(dev, (unsigned long)lp->virt_addr, 0);
1948 if (err) {
1949 dev_warn(&dev->dev, "no cs8900 or cs8920 detected.\n");
1950 goto unmap;
1951 }
1952
1953 platform_set_drvdata(pdev, dev);
1954 return 0;
1955
1956unmap:
1957 iounmap(lp->virt_addr);
1958release:
1959 release_mem_region(lp->phys_addr, lp->size);
1960free:
1961 free_netdev(dev);
1962 return err;
1963}
1964
1965static int cs89x0_platform_remove(struct platform_device *pdev)
1966{
1967 struct net_device *dev = platform_get_drvdata(pdev);
1968 struct net_local *lp = netdev_priv(dev);
1969
1970 unregister_netdev(dev);
1971 iounmap(lp->virt_addr);
1972 release_mem_region(lp->phys_addr, lp->size);
1973 free_netdev(dev);
1974 return 0;
1975}
1976
1977static struct platform_driver cs89x0_driver = {
1978 .driver = {
1979 .name = DRV_NAME,
1980 .owner = THIS_MODULE,
1981 },
1982 .remove = cs89x0_platform_remove,
1983};
1984
1985static int __init cs89x0_init(void)
1986{
1987 return platform_driver_probe(&cs89x0_driver, cs89x0_platform_probe);
1988}
1989
1990module_init(cs89x0_init);
1991
1992static void __exit cs89x0_cleanup(void)
1993{
1994 platform_driver_unregister(&cs89x0_driver);
1995}
1996
1997module_exit(cs89x0_cleanup);
1998
1999#endif /* CONFIG_CS89x0_PLATFORM */
1904 2000
1905/* 2001/*
1906 * Local variables: 2002 * Local variables:
diff --git a/drivers/net/ethernet/cisco/enic/cq_enet_desc.h b/drivers/net/ethernet/cisco/enic/cq_enet_desc.h
index c2c0680a1146..ac37cacc6136 100644
--- a/drivers/net/ethernet/cisco/enic/cq_enet_desc.h
+++ b/drivers/net/ethernet/cisco/enic/cq_enet_desc.h
@@ -157,7 +157,7 @@ static inline void cq_enet_rq_desc_dec(struct cq_enet_rq_desc *desc,
157 CQ_ENET_RQ_DESC_FCOE_FC_CRC_OK) ? 1 : 0; 157 CQ_ENET_RQ_DESC_FCOE_FC_CRC_OK) ? 1 : 0;
158 *fcoe_enc_error = (desc->flags & 158 *fcoe_enc_error = (desc->flags &
159 CQ_ENET_RQ_DESC_FCOE_ENC_ERROR) ? 1 : 0; 159 CQ_ENET_RQ_DESC_FCOE_ENC_ERROR) ? 1 : 0;
160 *fcoe_eof = (u8)((desc->checksum_fcoe >> 160 *fcoe_eof = (u8)((le16_to_cpu(desc->checksum_fcoe) >>
161 CQ_ENET_RQ_DESC_FCOE_EOF_SHIFT) & 161 CQ_ENET_RQ_DESC_FCOE_EOF_SHIFT) &
162 CQ_ENET_RQ_DESC_FCOE_EOF_MASK); 162 CQ_ENET_RQ_DESC_FCOE_EOF_MASK);
163 *checksum = 0; 163 *checksum = 0;
diff --git a/drivers/net/ethernet/cisco/enic/enic_pp.c b/drivers/net/ethernet/cisco/enic/enic_pp.c
index 22bf03a1829e..c347b6236f8f 100644
--- a/drivers/net/ethernet/cisco/enic/enic_pp.c
+++ b/drivers/net/ethernet/cisco/enic/enic_pp.c
@@ -72,7 +72,7 @@ static int enic_set_port_profile(struct enic *enic, int vf)
72 struct enic_port_profile *pp; 72 struct enic_port_profile *pp;
73 struct vic_provinfo *vp; 73 struct vic_provinfo *vp;
74 const u8 oui[3] = VIC_PROVINFO_CISCO_OUI; 74 const u8 oui[3] = VIC_PROVINFO_CISCO_OUI;
75 const u16 os_type = htons(VIC_GENERIC_PROV_OS_TYPE_LINUX); 75 const __be16 os_type = htons(VIC_GENERIC_PROV_OS_TYPE_LINUX);
76 char uuid_str[38]; 76 char uuid_str[38];
77 char client_mac_str[18]; 77 char client_mac_str[18];
78 u8 *client_mac; 78 u8 *client_mac;
diff --git a/drivers/net/ethernet/jme.c b/drivers/net/ethernet/jme.c
index 27d651a80f3f..55cbf65512c3 100644
--- a/drivers/net/ethernet/jme.c
+++ b/drivers/net/ethernet/jme.c
@@ -2328,19 +2328,11 @@ jme_change_mtu(struct net_device *netdev, int new_mtu)
2328 ((new_mtu) < IPV6_MIN_MTU)) 2328 ((new_mtu) < IPV6_MIN_MTU))
2329 return -EINVAL; 2329 return -EINVAL;
2330 2330
2331 if (new_mtu > 4000) {
2332 jme->reg_rxcs &= ~RXCS_FIFOTHNP;
2333 jme->reg_rxcs |= RXCS_FIFOTHNP_64QW;
2334 jme_restart_rx_engine(jme);
2335 } else {
2336 jme->reg_rxcs &= ~RXCS_FIFOTHNP;
2337 jme->reg_rxcs |= RXCS_FIFOTHNP_128QW;
2338 jme_restart_rx_engine(jme);
2339 }
2340 2331
2341 netdev->mtu = new_mtu; 2332 netdev->mtu = new_mtu;
2342 netdev_update_features(netdev); 2333 netdev_update_features(netdev);
2343 2334
2335 jme_restart_rx_engine(jme);
2344 jme_reset_link(jme); 2336 jme_reset_link(jme);
2345 2337
2346 return 0; 2338 return 0;
diff --git a/drivers/net/ethernet/jme.h b/drivers/net/ethernet/jme.h
index 4304072bd3c5..3efc897c9913 100644
--- a/drivers/net/ethernet/jme.h
+++ b/drivers/net/ethernet/jme.h
@@ -730,7 +730,7 @@ enum jme_rxcs_values {
730 RXCS_RETRYCNT_60 = 0x00000F00, 730 RXCS_RETRYCNT_60 = 0x00000F00,
731 731
732 RXCS_DEFAULT = RXCS_FIFOTHTP_128T | 732 RXCS_DEFAULT = RXCS_FIFOTHTP_128T |
733 RXCS_FIFOTHNP_128QW | 733 RXCS_FIFOTHNP_16QW |
734 RXCS_DMAREQSZ_128B | 734 RXCS_DMAREQSZ_128B |
735 RXCS_RETRYGAP_256ns | 735 RXCS_RETRYGAP_256ns |
736 RXCS_RETRYCNT_32, 736 RXCS_RETRYCNT_32,
diff --git a/drivers/net/ethernet/mellanox/mlx4/eq.c b/drivers/net/ethernet/mellanox/mlx4/eq.c
index 8fa41f3082cf..9129ace02560 100644
--- a/drivers/net/ethernet/mellanox/mlx4/eq.c
+++ b/drivers/net/ethernet/mellanox/mlx4/eq.c
@@ -1036,7 +1036,7 @@ int mlx4_assign_eq(struct mlx4_dev *dev, char* name, int * vector)
1036 struct mlx4_priv *priv = mlx4_priv(dev); 1036 struct mlx4_priv *priv = mlx4_priv(dev);
1037 int vec = 0, err = 0, i; 1037 int vec = 0, err = 0, i;
1038 1038
1039 spin_lock(&priv->msix_ctl.pool_lock); 1039 mutex_lock(&priv->msix_ctl.pool_lock);
1040 for (i = 0; !vec && i < dev->caps.comp_pool; i++) { 1040 for (i = 0; !vec && i < dev->caps.comp_pool; i++) {
1041 if (~priv->msix_ctl.pool_bm & 1ULL << i) { 1041 if (~priv->msix_ctl.pool_bm & 1ULL << i) {
1042 priv->msix_ctl.pool_bm |= 1ULL << i; 1042 priv->msix_ctl.pool_bm |= 1ULL << i;
@@ -1058,7 +1058,7 @@ int mlx4_assign_eq(struct mlx4_dev *dev, char* name, int * vector)
1058 eq_set_ci(&priv->eq_table.eq[vec], 1); 1058 eq_set_ci(&priv->eq_table.eq[vec], 1);
1059 } 1059 }
1060 } 1060 }
1061 spin_unlock(&priv->msix_ctl.pool_lock); 1061 mutex_unlock(&priv->msix_ctl.pool_lock);
1062 1062
1063 if (vec) { 1063 if (vec) {
1064 *vector = vec; 1064 *vector = vec;
@@ -1079,13 +1079,13 @@ void mlx4_release_eq(struct mlx4_dev *dev, int vec)
1079 if (likely(i >= 0)) { 1079 if (likely(i >= 0)) {
1080 /*sanity check , making sure were not trying to free irq's 1080 /*sanity check , making sure were not trying to free irq's
1081 Belonging to a legacy EQ*/ 1081 Belonging to a legacy EQ*/
1082 spin_lock(&priv->msix_ctl.pool_lock); 1082 mutex_lock(&priv->msix_ctl.pool_lock);
1083 if (priv->msix_ctl.pool_bm & 1ULL << i) { 1083 if (priv->msix_ctl.pool_bm & 1ULL << i) {
1084 free_irq(priv->eq_table.eq[vec].irq, 1084 free_irq(priv->eq_table.eq[vec].irq,
1085 &priv->eq_table.eq[vec]); 1085 &priv->eq_table.eq[vec]);
1086 priv->msix_ctl.pool_bm &= ~(1ULL << i); 1086 priv->msix_ctl.pool_bm &= ~(1ULL << i);
1087 } 1087 }
1088 spin_unlock(&priv->msix_ctl.pool_lock); 1088 mutex_unlock(&priv->msix_ctl.pool_lock);
1089 } 1089 }
1090 1090
1091} 1091}
diff --git a/drivers/net/ethernet/mellanox/mlx4/fw.c b/drivers/net/ethernet/mellanox/mlx4/fw.c
index 8a21e10952ea..9ea7cabcaf3c 100644
--- a/drivers/net/ethernet/mellanox/mlx4/fw.c
+++ b/drivers/net/ethernet/mellanox/mlx4/fw.c
@@ -685,7 +685,7 @@ int mlx4_QUERY_PORT_wrapper(struct mlx4_dev *dev, int slave,
685 return err; 685 return err;
686} 686}
687 687
688static int mlx4_QUERY_PORT(struct mlx4_dev *dev, void *ptr, u8 port) 688int mlx4_QUERY_PORT(struct mlx4_dev *dev, void *ptr, u8 port)
689{ 689{
690 struct mlx4_cmd_mailbox *outbox = ptr; 690 struct mlx4_cmd_mailbox *outbox = ptr;
691 691
diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c
index 678558b502fc..d498f049c74e 100644
--- a/drivers/net/ethernet/mellanox/mlx4/main.c
+++ b/drivers/net/ethernet/mellanox/mlx4/main.c
@@ -531,15 +531,14 @@ int mlx4_change_port_types(struct mlx4_dev *dev,
531 for (port = 0; port < dev->caps.num_ports; port++) { 531 for (port = 0; port < dev->caps.num_ports; port++) {
532 /* Change the port type only if the new type is different 532 /* Change the port type only if the new type is different
533 * from the current, and not set to Auto */ 533 * from the current, and not set to Auto */
534 if (port_types[port] != dev->caps.port_type[port + 1]) { 534 if (port_types[port] != dev->caps.port_type[port + 1])
535 change = 1; 535 change = 1;
536 dev->caps.port_type[port + 1] = port_types[port];
537 }
538 } 536 }
539 if (change) { 537 if (change) {
540 mlx4_unregister_device(dev); 538 mlx4_unregister_device(dev);
541 for (port = 1; port <= dev->caps.num_ports; port++) { 539 for (port = 1; port <= dev->caps.num_ports; port++) {
542 mlx4_CLOSE_PORT(dev, port); 540 mlx4_CLOSE_PORT(dev, port);
541 dev->caps.port_type[port] = port_types[port - 1];
543 err = mlx4_SET_PORT(dev, port); 542 err = mlx4_SET_PORT(dev, port);
544 if (err) { 543 if (err) {
545 mlx4_err(dev, "Failed to set port %d, " 544 mlx4_err(dev, "Failed to set port %d, "
@@ -986,6 +985,9 @@ static int map_bf_area(struct mlx4_dev *dev)
986 resource_size_t bf_len; 985 resource_size_t bf_len;
987 int err = 0; 986 int err = 0;
988 987
988 if (!dev->caps.bf_reg_size)
989 return -ENXIO;
990
989 bf_start = pci_resource_start(dev->pdev, 2) + 991 bf_start = pci_resource_start(dev->pdev, 2) +
990 (dev->caps.num_uars << PAGE_SHIFT); 992 (dev->caps.num_uars << PAGE_SHIFT);
991 bf_len = pci_resource_len(dev->pdev, 2) - 993 bf_len = pci_resource_len(dev->pdev, 2) -
@@ -1825,7 +1827,7 @@ slave_start:
1825 goto err_master_mfunc; 1827 goto err_master_mfunc;
1826 1828
1827 priv->msix_ctl.pool_bm = 0; 1829 priv->msix_ctl.pool_bm = 0;
1828 spin_lock_init(&priv->msix_ctl.pool_lock); 1830 mutex_init(&priv->msix_ctl.pool_lock);
1829 1831
1830 mlx4_enable_msi_x(dev); 1832 mlx4_enable_msi_x(dev);
1831 if ((mlx4_is_mfunc(dev)) && 1833 if ((mlx4_is_mfunc(dev)) &&
diff --git a/drivers/net/ethernet/mellanox/mlx4/mlx4.h b/drivers/net/ethernet/mellanox/mlx4/mlx4.h
index c92269f8c057..28f8251561f4 100644
--- a/drivers/net/ethernet/mellanox/mlx4/mlx4.h
+++ b/drivers/net/ethernet/mellanox/mlx4/mlx4.h
@@ -697,7 +697,7 @@ struct mlx4_sense {
697 697
698struct mlx4_msix_ctl { 698struct mlx4_msix_ctl {
699 u64 pool_bm; 699 u64 pool_bm;
700 spinlock_t pool_lock; 700 struct mutex pool_lock;
701}; 701};
702 702
703struct mlx4_steer { 703struct mlx4_steer {
diff --git a/drivers/net/ethernet/mellanox/mlx4/mr.c b/drivers/net/ethernet/mellanox/mlx4/mr.c
index 8deeef98280c..25a80d71fb2a 100644
--- a/drivers/net/ethernet/mellanox/mlx4/mr.c
+++ b/drivers/net/ethernet/mellanox/mlx4/mr.c
@@ -304,7 +304,7 @@ static int mlx4_HW2SW_MPT(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox
304 MLX4_CMD_TIME_CLASS_B, MLX4_CMD_WRAPPED); 304 MLX4_CMD_TIME_CLASS_B, MLX4_CMD_WRAPPED);
305} 305}
306 306
307static int mlx4_mr_reserve_range(struct mlx4_dev *dev, int cnt, int align, 307int mlx4_mr_reserve_range(struct mlx4_dev *dev, int cnt, int align,
308 u32 *base_mridx) 308 u32 *base_mridx)
309{ 309{
310 struct mlx4_priv *priv = mlx4_priv(dev); 310 struct mlx4_priv *priv = mlx4_priv(dev);
@@ -320,14 +320,14 @@ static int mlx4_mr_reserve_range(struct mlx4_dev *dev, int cnt, int align,
320} 320}
321EXPORT_SYMBOL_GPL(mlx4_mr_reserve_range); 321EXPORT_SYMBOL_GPL(mlx4_mr_reserve_range);
322 322
323static void mlx4_mr_release_range(struct mlx4_dev *dev, u32 base_mridx, int cnt) 323void mlx4_mr_release_range(struct mlx4_dev *dev, u32 base_mridx, int cnt)
324{ 324{
325 struct mlx4_priv *priv = mlx4_priv(dev); 325 struct mlx4_priv *priv = mlx4_priv(dev);
326 mlx4_bitmap_free_range(&priv->mr_table.mpt_bitmap, base_mridx, cnt); 326 mlx4_bitmap_free_range(&priv->mr_table.mpt_bitmap, base_mridx, cnt);
327} 327}
328EXPORT_SYMBOL_GPL(mlx4_mr_release_range); 328EXPORT_SYMBOL_GPL(mlx4_mr_release_range);
329 329
330static int mlx4_mr_alloc_reserved(struct mlx4_dev *dev, u32 mridx, u32 pd, 330int mlx4_mr_alloc_reserved(struct mlx4_dev *dev, u32 mridx, u32 pd,
331 u64 iova, u64 size, u32 access, int npages, 331 u64 iova, u64 size, u32 access, int npages,
332 int page_shift, struct mlx4_mr *mr) 332 int page_shift, struct mlx4_mr *mr)
333{ 333{
@@ -457,7 +457,7 @@ int mlx4_mr_alloc(struct mlx4_dev *dev, u32 pd, u64 iova, u64 size, u32 access,
457} 457}
458EXPORT_SYMBOL_GPL(mlx4_mr_alloc); 458EXPORT_SYMBOL_GPL(mlx4_mr_alloc);
459 459
460static void mlx4_mr_free_reserved(struct mlx4_dev *dev, struct mlx4_mr *mr) 460void mlx4_mr_free_reserved(struct mlx4_dev *dev, struct mlx4_mr *mr)
461{ 461{
462 int err; 462 int err;
463 463
@@ -852,7 +852,7 @@ err_free:
852} 852}
853EXPORT_SYMBOL_GPL(mlx4_fmr_alloc); 853EXPORT_SYMBOL_GPL(mlx4_fmr_alloc);
854 854
855static int mlx4_fmr_alloc_reserved(struct mlx4_dev *dev, u32 mridx, 855int mlx4_fmr_alloc_reserved(struct mlx4_dev *dev, u32 mridx,
856 u32 pd, u32 access, int max_pages, 856 u32 pd, u32 access, int max_pages,
857 int max_maps, u8 page_shift, struct mlx4_fmr *fmr) 857 int max_maps, u8 page_shift, struct mlx4_fmr *fmr)
858{ 858{
@@ -954,7 +954,7 @@ int mlx4_fmr_free(struct mlx4_dev *dev, struct mlx4_fmr *fmr)
954} 954}
955EXPORT_SYMBOL_GPL(mlx4_fmr_free); 955EXPORT_SYMBOL_GPL(mlx4_fmr_free);
956 956
957static int mlx4_fmr_free_reserved(struct mlx4_dev *dev, struct mlx4_fmr *fmr) 957int mlx4_fmr_free_reserved(struct mlx4_dev *dev, struct mlx4_fmr *fmr)
958{ 958{
959 if (fmr->maps) 959 if (fmr->maps)
960 return -EBUSY; 960 return -EBUSY;
diff --git a/drivers/net/ethernet/micrel/ks8851_mll.c b/drivers/net/ethernet/micrel/ks8851_mll.c
index 231176fcd2ba..2784bc706f1e 100644
--- a/drivers/net/ethernet/micrel/ks8851_mll.c
+++ b/drivers/net/ethernet/micrel/ks8851_mll.c
@@ -1545,7 +1545,7 @@ static int __devinit ks8851_probe(struct platform_device *pdev)
1545 1545
1546 netdev->irq = platform_get_irq(pdev, 0); 1546 netdev->irq = platform_get_irq(pdev, 0);
1547 1547
1548 if (netdev->irq < 0) { 1548 if ((int)netdev->irq < 0) {
1549 err = netdev->irq; 1549 err = netdev->irq;
1550 goto err_get_irq; 1550 goto err_get_irq;
1551 } 1551 }
diff --git a/drivers/net/ethernet/sfc/rx.c b/drivers/net/ethernet/sfc/rx.c
index aca349861767..fc52fca74193 100644
--- a/drivers/net/ethernet/sfc/rx.c
+++ b/drivers/net/ethernet/sfc/rx.c
@@ -156,11 +156,10 @@ static int efx_init_rx_buffers_skb(struct efx_rx_queue *rx_queue)
156 if (unlikely(!skb)) 156 if (unlikely(!skb))
157 return -ENOMEM; 157 return -ENOMEM;
158 158
159 /* Adjust the SKB for padding and checksum */ 159 /* Adjust the SKB for padding */
160 skb_reserve(skb, NET_IP_ALIGN); 160 skb_reserve(skb, NET_IP_ALIGN);
161 rx_buf->len = skb_len - NET_IP_ALIGN; 161 rx_buf->len = skb_len - NET_IP_ALIGN;
162 rx_buf->is_page = false; 162 rx_buf->is_page = false;
163 skb->ip_summed = CHECKSUM_UNNECESSARY;
164 163
165 rx_buf->dma_addr = pci_map_single(efx->pci_dev, 164 rx_buf->dma_addr = pci_map_single(efx->pci_dev,
166 skb->data, rx_buf->len, 165 skb->data, rx_buf->len,
@@ -496,6 +495,7 @@ static void efx_rx_packet_gro(struct efx_channel *channel,
496 495
497 EFX_BUG_ON_PARANOID(!checksummed); 496 EFX_BUG_ON_PARANOID(!checksummed);
498 rx_buf->u.skb = NULL; 497 rx_buf->u.skb = NULL;
498 skb->ip_summed = CHECKSUM_UNNECESSARY;
499 499
500 gro_result = napi_gro_receive(napi, skb); 500 gro_result = napi_gro_receive(napi, skb);
501 } 501 }
diff --git a/drivers/net/ethernet/ti/davinci_emac.c b/drivers/net/ethernet/ti/davinci_emac.c
index 4fa0bcb25dfc..4b2f54565f64 100644
--- a/drivers/net/ethernet/ti/davinci_emac.c
+++ b/drivers/net/ethernet/ti/davinci_emac.c
@@ -1009,7 +1009,7 @@ static void emac_rx_handler(void *token, int len, int status)
1009 int ret; 1009 int ret;
1010 1010
1011 /* free and bail if we are shutting down */ 1011 /* free and bail if we are shutting down */
1012 if (unlikely(!netif_running(ndev) || !netif_carrier_ok(ndev))) { 1012 if (unlikely(!netif_running(ndev))) {
1013 dev_kfree_skb_any(skb); 1013 dev_kfree_skb_any(skb);
1014 return; 1014 return;
1015 } 1015 }
@@ -1038,7 +1038,9 @@ static void emac_rx_handler(void *token, int len, int status)
1038recycle: 1038recycle:
1039 ret = cpdma_chan_submit(priv->rxchan, skb, skb->data, 1039 ret = cpdma_chan_submit(priv->rxchan, skb, skb->data,
1040 skb_tailroom(skb), GFP_KERNEL); 1040 skb_tailroom(skb), GFP_KERNEL);
1041 if (WARN_ON(ret < 0)) 1041
1042 WARN_ON(ret == -ENOMEM);
1043 if (unlikely(ret < 0))
1042 dev_kfree_skb_any(skb); 1044 dev_kfree_skb_any(skb);
1043} 1045}
1044 1046