diff options
Diffstat (limited to 'drivers/net')
28 files changed, 272 insertions, 101 deletions
diff --git a/drivers/net/Space.c b/drivers/net/Space.c index 068c3563e00f..88bbd8ffa7fe 100644 --- a/drivers/net/Space.c +++ b/drivers/net/Space.c | |||
| @@ -190,8 +190,10 @@ static struct devprobe2 isa_probes[] __initdata = { | |||
| 190 | {seeq8005_probe, 0}, | 190 | {seeq8005_probe, 0}, |
| 191 | #endif | 191 | #endif |
| 192 | #ifdef CONFIG_CS89x0 | 192 | #ifdef CONFIG_CS89x0 |
| 193 | #ifndef CONFIG_CS89x0_PLATFORM | ||
| 193 | {cs89x0_probe, 0}, | 194 | {cs89x0_probe, 0}, |
| 194 | #endif | 195 | #endif |
| 196 | #endif | ||
| 195 | #ifdef CONFIG_AT1700 | 197 | #ifdef CONFIG_AT1700 |
| 196 | {at1700_probe, 0}, | 198 | {at1700_probe, 0}, |
| 197 | #endif | 199 | #endif |
diff --git a/drivers/net/can/sja1000/sja1000.c b/drivers/net/can/sja1000/sja1000.c index 04a3f1b756a8..192b0d118df4 100644 --- a/drivers/net/can/sja1000/sja1000.c +++ b/drivers/net/can/sja1000/sja1000.c | |||
| @@ -95,11 +95,16 @@ static void sja1000_write_cmdreg(struct sja1000_priv *priv, u8 val) | |||
| 95 | spin_unlock_irqrestore(&priv->cmdreg_lock, flags); | 95 | spin_unlock_irqrestore(&priv->cmdreg_lock, flags); |
| 96 | } | 96 | } |
| 97 | 97 | ||
| 98 | static int sja1000_is_absent(struct sja1000_priv *priv) | ||
| 99 | { | ||
| 100 | return (priv->read_reg(priv, REG_MOD) == 0xFF); | ||
| 101 | } | ||
| 102 | |||
| 98 | static int sja1000_probe_chip(struct net_device *dev) | 103 | static int sja1000_probe_chip(struct net_device *dev) |
| 99 | { | 104 | { |
| 100 | struct sja1000_priv *priv = netdev_priv(dev); | 105 | struct sja1000_priv *priv = netdev_priv(dev); |
| 101 | 106 | ||
| 102 | if (priv->reg_base && (priv->read_reg(priv, 0) == 0xFF)) { | 107 | if (priv->reg_base && sja1000_is_absent(priv)) { |
| 103 | printk(KERN_INFO "%s: probing @0x%lX failed\n", | 108 | printk(KERN_INFO "%s: probing @0x%lX failed\n", |
| 104 | DRV_NAME, dev->base_addr); | 109 | DRV_NAME, dev->base_addr); |
| 105 | return 0; | 110 | return 0; |
| @@ -493,6 +498,9 @@ irqreturn_t sja1000_interrupt(int irq, void *dev_id) | |||
| 493 | while ((isrc = priv->read_reg(priv, REG_IR)) && (n < SJA1000_MAX_IRQ)) { | 498 | while ((isrc = priv->read_reg(priv, REG_IR)) && (n < SJA1000_MAX_IRQ)) { |
| 494 | n++; | 499 | n++; |
| 495 | status = priv->read_reg(priv, REG_SR); | 500 | status = priv->read_reg(priv, REG_SR); |
| 501 | /* check for absent controller due to hw unplug */ | ||
| 502 | if (status == 0xFF && sja1000_is_absent(priv)) | ||
| 503 | return IRQ_NONE; | ||
| 496 | 504 | ||
| 497 | if (isrc & IRQ_WUI) | 505 | if (isrc & IRQ_WUI) |
| 498 | dev_warn(dev->dev.parent, "wakeup interrupt\n"); | 506 | dev_warn(dev->dev.parent, "wakeup interrupt\n"); |
| @@ -509,6 +517,9 @@ irqreturn_t sja1000_interrupt(int irq, void *dev_id) | |||
| 509 | while (status & SR_RBS) { | 517 | while (status & SR_RBS) { |
| 510 | sja1000_rx(dev); | 518 | sja1000_rx(dev); |
| 511 | status = priv->read_reg(priv, REG_SR); | 519 | status = priv->read_reg(priv, REG_SR); |
| 520 | /* check for absent controller */ | ||
| 521 | if (status == 0xFF && sja1000_is_absent(priv)) | ||
| 522 | return IRQ_NONE; | ||
| 512 | } | 523 | } |
| 513 | } | 524 | } |
| 514 | if (isrc & (IRQ_DOI | IRQ_EI | IRQ_BEI | IRQ_EPI | IRQ_ALI)) { | 525 | if (isrc & (IRQ_DOI | IRQ_EI | IRQ_BEI | IRQ_EPI | IRQ_ALI)) { |
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 | ||
| 2342 | static inline void __exit b44_pci_exit(void) | 2342 | static 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 @@ | |||
| 5 | config NET_VENDOR_CIRRUS | 5 | config 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 | ||
| 22 | config CS89x0 | 21 | config 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 | ||
| 36 | config CS89x0_NONISA_IRQ | 34 | config 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 | ||
| 41 | config EP93XX_ETH | 44 | config 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 | ||
| 177 | static unsigned int netcard_portlist[] __used __initdata = {IXDP2351_VIRT_CS8900_BASE, 0}; | 179 | static unsigned int netcard_portlist[] __used __initdata = {IXDP2351_VIRT_CS8900_BASE, 0}; |
| 178 | static unsigned int cs8900_irq_map[] = {IRQ_IXDP2351_CS8900, 0, 0, 0}; | 180 | static 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 | ||
| 180 | static unsigned int netcard_portlist[] __used __initdata = {IXDP2X01_CS8900_VIRT_BASE, 0}; | 183 | static unsigned int netcard_portlist[] __used __initdata = {IXDP2X01_CS8900_VIRT_BASE, 0}; |
| 181 | static unsigned int cs8900_irq_map[] = {IRQ_IXDP2X01_CS8900, 0, 0, 0}; | 184 | static unsigned int cs8900_irq_map[] = {IRQ_IXDP2X01_CS8900, 0, 0, 0}; |
| 182 | #elif defined(CONFIG_MACH_QQ2440) | ||
| 183 | #include <mach/qq2440.h> | ||
| 184 | static unsigned int netcard_portlist[] __used __initdata = { QQ2440_CS8900_VIRT_BASE + 0x300, 0 }; | ||
| 185 | static unsigned int cs8900_irq_map[] = { QQ2440_CS8900_IRQ, 0, 0, 0 }; | ||
| 186 | #elif defined(CONFIG_MACH_MX31ADS) | ||
| 187 | #include <mach/board-mx31ads.h> | ||
| 188 | static unsigned int netcard_portlist[] __used __initdata = { | ||
| 189 | PBC_BASE_ADDRESS + PBC_CS8900A_IOBASE + 0x300, 0 | ||
| 190 | }; | ||
| 191 | static unsigned cs8900_irq_map[] = {EXPIO_INT_ENET_INT, 0, 0, 0}; | ||
| 192 | #else | 185 | #else |
| 186 | #ifndef CONFIG_CS89x0_PLATFORM | ||
| 193 | static unsigned int netcard_portlist[] __used __initdata = | 187 | static 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}; |
| 195 | static unsigned int cs8900_irq_map[] = {10,11,12,5}; | 189 | static unsigned int cs8900_irq_map[] = {10,11,12,5}; |
| 196 | #endif | 190 | #endif |
| 191 | #endif | ||
| 197 | 192 | ||
| 198 | #if DEBUGGING | 193 | #if DEBUGGING |
| 199 | static unsigned int net_debug = DEBUGGING; | 194 | static 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 | ||
| 243 | static int cs89x0_probe1(struct net_device *dev, int ioaddr, int modular); | 243 | static int cs89x0_probe1(struct net_device *dev, unsigned long ioaddr, int modular); |
| 244 | static int net_open(struct net_device *dev); | 244 | static int net_open(struct net_device *dev); |
| 245 | static netdev_tx_t net_send_packet(struct sk_buff *skb, struct net_device *dev); | 245 | static netdev_tx_t net_send_packet(struct sk_buff *skb, struct net_device *dev); |
| 246 | static irqreturn_t net_interrupt(int irq, void *dev_id); | 246 | static 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) |
| 348 | static u16 | 350 | static u16 |
| @@ -504,7 +506,7 @@ static const struct net_device_ops net_ops = { | |||
| 504 | */ | 506 | */ |
| 505 | 507 | ||
| 506 | static int __init | 508 | static int __init |
| 507 | cs89x0_probe1(struct net_device *dev, int ioaddr, int modular) | 509 | cs89x0_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 | ||
| 1751 | static struct net_device *dev_cs89x0; | 1757 | static 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 | ||
| 1912 | static 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 | |||
| 1956 | unmap: | ||
| 1957 | iounmap(lp->virt_addr); | ||
| 1958 | release: | ||
| 1959 | release_mem_region(lp->phys_addr, lp->size); | ||
| 1960 | free: | ||
| 1961 | free_netdev(dev); | ||
| 1962 | return err; | ||
| 1963 | } | ||
| 1964 | |||
| 1965 | static 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 | |||
| 1977 | static struct platform_driver cs89x0_driver = { | ||
| 1978 | .driver = { | ||
| 1979 | .name = DRV_NAME, | ||
| 1980 | .owner = THIS_MODULE, | ||
| 1981 | }, | ||
| 1982 | .remove = cs89x0_platform_remove, | ||
| 1983 | }; | ||
| 1984 | |||
| 1985 | static int __init cs89x0_init(void) | ||
| 1986 | { | ||
| 1987 | return platform_driver_probe(&cs89x0_driver, cs89x0_platform_probe); | ||
| 1988 | } | ||
| 1989 | |||
| 1990 | module_init(cs89x0_init); | ||
| 1991 | |||
| 1992 | static void __exit cs89x0_cleanup(void) | ||
| 1993 | { | ||
| 1994 | platform_driver_unregister(&cs89x0_driver); | ||
| 1995 | } | ||
| 1996 | |||
| 1997 | module_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 | ||
| 688 | static int mlx4_QUERY_PORT(struct mlx4_dev *dev, void *ptr, u8 port) | 688 | int 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 | ||
| 698 | struct mlx4_msix_ctl { | 698 | struct 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 | ||
| 703 | struct mlx4_steer { | 703 | struct 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 | ||
| 307 | static int mlx4_mr_reserve_range(struct mlx4_dev *dev, int cnt, int align, | 307 | int 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 | } |
| 321 | EXPORT_SYMBOL_GPL(mlx4_mr_reserve_range); | 321 | EXPORT_SYMBOL_GPL(mlx4_mr_reserve_range); |
| 322 | 322 | ||
| 323 | static void mlx4_mr_release_range(struct mlx4_dev *dev, u32 base_mridx, int cnt) | 323 | void 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 | } |
| 328 | EXPORT_SYMBOL_GPL(mlx4_mr_release_range); | 328 | EXPORT_SYMBOL_GPL(mlx4_mr_release_range); |
| 329 | 329 | ||
| 330 | static int mlx4_mr_alloc_reserved(struct mlx4_dev *dev, u32 mridx, u32 pd, | 330 | int 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 | } |
| 458 | EXPORT_SYMBOL_GPL(mlx4_mr_alloc); | 458 | EXPORT_SYMBOL_GPL(mlx4_mr_alloc); |
| 459 | 459 | ||
| 460 | static void mlx4_mr_free_reserved(struct mlx4_dev *dev, struct mlx4_mr *mr) | 460 | void 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 | } |
| 853 | EXPORT_SYMBOL_GPL(mlx4_fmr_alloc); | 853 | EXPORT_SYMBOL_GPL(mlx4_fmr_alloc); |
| 854 | 854 | ||
| 855 | static int mlx4_fmr_alloc_reserved(struct mlx4_dev *dev, u32 mridx, | 855 | int 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 | } |
| 955 | EXPORT_SYMBOL_GPL(mlx4_fmr_free); | 955 | EXPORT_SYMBOL_GPL(mlx4_fmr_free); |
| 956 | 956 | ||
| 957 | static int mlx4_fmr_free_reserved(struct mlx4_dev *dev, struct mlx4_fmr *fmr) | 957 | int 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) | |||
| 1038 | recycle: | 1038 | recycle: |
| 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 | ||
diff --git a/drivers/net/phy/icplus.c b/drivers/net/phy/icplus.c index c81f136ae670..0856e1b7a849 100644 --- a/drivers/net/phy/icplus.c +++ b/drivers/net/phy/icplus.c | |||
| @@ -30,16 +30,16 @@ | |||
| 30 | #include <asm/irq.h> | 30 | #include <asm/irq.h> |
| 31 | #include <asm/uaccess.h> | 31 | #include <asm/uaccess.h> |
| 32 | 32 | ||
| 33 | MODULE_DESCRIPTION("ICPlus IP175C/IP101A/IC1001 PHY drivers"); | 33 | MODULE_DESCRIPTION("ICPlus IP175C/IP101A/IP101G/IC1001 PHY drivers"); |
| 34 | MODULE_AUTHOR("Michael Barkowski"); | 34 | MODULE_AUTHOR("Michael Barkowski"); |
| 35 | MODULE_LICENSE("GPL"); | 35 | MODULE_LICENSE("GPL"); |
| 36 | 36 | ||
| 37 | /* IP101A/IP1001 */ | 37 | /* IP101A/G - IP1001 */ |
| 38 | #define IP10XX_SPEC_CTRL_STATUS 16 /* Spec. Control Register */ | 38 | #define IP10XX_SPEC_CTRL_STATUS 16 /* Spec. Control Register */ |
| 39 | #define IP1001_SPEC_CTRL_STATUS_2 20 /* IP1001 Spec. Control Reg 2 */ | 39 | #define IP1001_SPEC_CTRL_STATUS_2 20 /* IP1001 Spec. Control Reg 2 */ |
| 40 | #define IP1001_PHASE_SEL_MASK 3 /* IP1001 RX/TXPHASE_SEL */ | 40 | #define IP1001_PHASE_SEL_MASK 3 /* IP1001 RX/TXPHASE_SEL */ |
| 41 | #define IP1001_APS_ON 11 /* IP1001 APS Mode bit */ | 41 | #define IP1001_APS_ON 11 /* IP1001 APS Mode bit */ |
| 42 | #define IP101A_APS_ON 2 /* IP101A APS Mode bit */ | 42 | #define IP101A_G_APS_ON 2 /* IP101A/G APS Mode bit */ |
| 43 | 43 | ||
| 44 | static int ip175c_config_init(struct phy_device *phydev) | 44 | static int ip175c_config_init(struct phy_device *phydev) |
| 45 | { | 45 | { |
| @@ -98,20 +98,24 @@ static int ip175c_config_init(struct phy_device *phydev) | |||
| 98 | 98 | ||
| 99 | static int ip1xx_reset(struct phy_device *phydev) | 99 | static int ip1xx_reset(struct phy_device *phydev) |
| 100 | { | 100 | { |
| 101 | int err, bmcr; | 101 | int bmcr; |
| 102 | 102 | ||
| 103 | /* Software Reset PHY */ | 103 | /* Software Reset PHY */ |
| 104 | bmcr = phy_read(phydev, MII_BMCR); | 104 | bmcr = phy_read(phydev, MII_BMCR); |
| 105 | if (bmcr < 0) | ||
| 106 | return bmcr; | ||
| 105 | bmcr |= BMCR_RESET; | 107 | bmcr |= BMCR_RESET; |
| 106 | err = phy_write(phydev, MII_BMCR, bmcr); | 108 | bmcr = phy_write(phydev, MII_BMCR, bmcr); |
| 107 | if (err < 0) | 109 | if (bmcr < 0) |
| 108 | return err; | 110 | return bmcr; |
| 109 | 111 | ||
| 110 | do { | 112 | do { |
| 111 | bmcr = phy_read(phydev, MII_BMCR); | 113 | bmcr = phy_read(phydev, MII_BMCR); |
| 114 | if (bmcr < 0) | ||
| 115 | return bmcr; | ||
| 112 | } while (bmcr & BMCR_RESET); | 116 | } while (bmcr & BMCR_RESET); |
| 113 | 117 | ||
| 114 | return err; | 118 | return 0; |
| 115 | } | 119 | } |
| 116 | 120 | ||
| 117 | static int ip1001_config_init(struct phy_device *phydev) | 121 | static int ip1001_config_init(struct phy_device *phydev) |
| @@ -124,7 +128,10 @@ static int ip1001_config_init(struct phy_device *phydev) | |||
| 124 | 128 | ||
| 125 | /* Enable Auto Power Saving mode */ | 129 | /* Enable Auto Power Saving mode */ |
| 126 | c = phy_read(phydev, IP1001_SPEC_CTRL_STATUS_2); | 130 | c = phy_read(phydev, IP1001_SPEC_CTRL_STATUS_2); |
| 131 | if (c < 0) | ||
| 132 | return c; | ||
| 127 | c |= IP1001_APS_ON; | 133 | c |= IP1001_APS_ON; |
| 134 | c = phy_write(phydev, IP1001_SPEC_CTRL_STATUS_2, c); | ||
| 128 | if (c < 0) | 135 | if (c < 0) |
| 129 | return c; | 136 | return c; |
| 130 | 137 | ||
| @@ -132,14 +139,19 @@ static int ip1001_config_init(struct phy_device *phydev) | |||
| 132 | /* Additional delay (2ns) used to adjust RX clock phase | 139 | /* Additional delay (2ns) used to adjust RX clock phase |
| 133 | * at RGMII interface */ | 140 | * at RGMII interface */ |
| 134 | c = phy_read(phydev, IP10XX_SPEC_CTRL_STATUS); | 141 | c = phy_read(phydev, IP10XX_SPEC_CTRL_STATUS); |
| 142 | if (c < 0) | ||
| 143 | return c; | ||
| 144 | |||
| 135 | c |= IP1001_PHASE_SEL_MASK; | 145 | c |= IP1001_PHASE_SEL_MASK; |
| 136 | c = phy_write(phydev, IP10XX_SPEC_CTRL_STATUS, c); | 146 | c = phy_write(phydev, IP10XX_SPEC_CTRL_STATUS, c); |
| 147 | if (c < 0) | ||
| 148 | return c; | ||
| 137 | } | 149 | } |
| 138 | 150 | ||
| 139 | return c; | 151 | return 0; |
| 140 | } | 152 | } |
| 141 | 153 | ||
| 142 | static int ip101a_config_init(struct phy_device *phydev) | 154 | static int ip101a_g_config_init(struct phy_device *phydev) |
| 143 | { | 155 | { |
| 144 | int c; | 156 | int c; |
| 145 | 157 | ||
| @@ -149,7 +161,7 @@ static int ip101a_config_init(struct phy_device *phydev) | |||
| 149 | 161 | ||
| 150 | /* Enable Auto Power Saving mode */ | 162 | /* Enable Auto Power Saving mode */ |
| 151 | c = phy_read(phydev, IP10XX_SPEC_CTRL_STATUS); | 163 | c = phy_read(phydev, IP10XX_SPEC_CTRL_STATUS); |
| 152 | c |= IP101A_APS_ON; | 164 | c |= IP101A_G_APS_ON; |
| 153 | return c; | 165 | return c; |
| 154 | } | 166 | } |
| 155 | 167 | ||
| @@ -191,6 +203,7 @@ static struct phy_driver ip1001_driver = { | |||
| 191 | .phy_id_mask = 0x0ffffff0, | 203 | .phy_id_mask = 0x0ffffff0, |
| 192 | .features = PHY_GBIT_FEATURES | SUPPORTED_Pause | | 204 | .features = PHY_GBIT_FEATURES | SUPPORTED_Pause | |
| 193 | SUPPORTED_Asym_Pause, | 205 | SUPPORTED_Asym_Pause, |
| 206 | .flags = PHY_HAS_INTERRUPT, | ||
| 194 | .config_init = &ip1001_config_init, | 207 | .config_init = &ip1001_config_init, |
| 195 | .config_aneg = &genphy_config_aneg, | 208 | .config_aneg = &genphy_config_aneg, |
| 196 | .read_status = &genphy_read_status, | 209 | .read_status = &genphy_read_status, |
| @@ -199,13 +212,14 @@ static struct phy_driver ip1001_driver = { | |||
| 199 | .driver = { .owner = THIS_MODULE,}, | 212 | .driver = { .owner = THIS_MODULE,}, |
| 200 | }; | 213 | }; |
| 201 | 214 | ||
| 202 | static struct phy_driver ip101a_driver = { | 215 | static struct phy_driver ip101a_g_driver = { |
| 203 | .phy_id = 0x02430c54, | 216 | .phy_id = 0x02430c54, |
| 204 | .name = "ICPlus IP101A", | 217 | .name = "ICPlus IP101A/G", |
| 205 | .phy_id_mask = 0x0ffffff0, | 218 | .phy_id_mask = 0x0ffffff0, |
| 206 | .features = PHY_BASIC_FEATURES | SUPPORTED_Pause | | 219 | .features = PHY_BASIC_FEATURES | SUPPORTED_Pause | |
| 207 | SUPPORTED_Asym_Pause, | 220 | SUPPORTED_Asym_Pause, |
| 208 | .config_init = &ip101a_config_init, | 221 | .flags = PHY_HAS_INTERRUPT, |
| 222 | .config_init = &ip101a_g_config_init, | ||
| 209 | .config_aneg = &genphy_config_aneg, | 223 | .config_aneg = &genphy_config_aneg, |
| 210 | .read_status = &genphy_read_status, | 224 | .read_status = &genphy_read_status, |
| 211 | .suspend = genphy_suspend, | 225 | .suspend = genphy_suspend, |
| @@ -221,7 +235,7 @@ static int __init icplus_init(void) | |||
| 221 | if (ret < 0) | 235 | if (ret < 0) |
| 222 | return -ENODEV; | 236 | return -ENODEV; |
| 223 | 237 | ||
| 224 | ret = phy_driver_register(&ip101a_driver); | 238 | ret = phy_driver_register(&ip101a_g_driver); |
| 225 | if (ret < 0) | 239 | if (ret < 0) |
| 226 | return -ENODEV; | 240 | return -ENODEV; |
| 227 | 241 | ||
| @@ -231,7 +245,7 @@ static int __init icplus_init(void) | |||
| 231 | static void __exit icplus_exit(void) | 245 | static void __exit icplus_exit(void) |
| 232 | { | 246 | { |
| 233 | phy_driver_unregister(&ip1001_driver); | 247 | phy_driver_unregister(&ip1001_driver); |
| 234 | phy_driver_unregister(&ip101a_driver); | 248 | phy_driver_unregister(&ip101a_g_driver); |
| 235 | phy_driver_unregister(&ip175c_driver); | 249 | phy_driver_unregister(&ip175c_driver); |
| 236 | } | 250 | } |
| 237 | 251 | ||
| @@ -241,6 +255,7 @@ module_exit(icplus_exit); | |||
| 241 | static struct mdio_device_id __maybe_unused icplus_tbl[] = { | 255 | static struct mdio_device_id __maybe_unused icplus_tbl[] = { |
| 242 | { 0x02430d80, 0x0ffffff0 }, | 256 | { 0x02430d80, 0x0ffffff0 }, |
| 243 | { 0x02430d90, 0x0ffffff0 }, | 257 | { 0x02430d90, 0x0ffffff0 }, |
| 258 | { 0x02430c54, 0x0ffffff0 }, | ||
| 244 | { } | 259 | { } |
| 245 | }; | 260 | }; |
| 246 | 261 | ||
diff --git a/drivers/net/phy/mdio-gpio.c b/drivers/net/phy/mdio-gpio.c index 50e8e5e74465..7189adf54bd1 100644 --- a/drivers/net/phy/mdio-gpio.c +++ b/drivers/net/phy/mdio-gpio.c | |||
| @@ -255,13 +255,13 @@ static inline int __init mdio_ofgpio_init(void) | |||
| 255 | return platform_driver_register(&mdio_ofgpio_driver); | 255 | return platform_driver_register(&mdio_ofgpio_driver); |
| 256 | } | 256 | } |
| 257 | 257 | ||
| 258 | static inline void __exit mdio_ofgpio_exit(void) | 258 | static inline void mdio_ofgpio_exit(void) |
| 259 | { | 259 | { |
| 260 | platform_driver_unregister(&mdio_ofgpio_driver); | 260 | platform_driver_unregister(&mdio_ofgpio_driver); |
| 261 | } | 261 | } |
| 262 | #else | 262 | #else |
| 263 | static inline int __init mdio_ofgpio_init(void) { return 0; } | 263 | static inline int __init mdio_ofgpio_init(void) { return 0; } |
| 264 | static inline void __exit mdio_ofgpio_exit(void) { } | 264 | static inline void mdio_ofgpio_exit(void) { } |
| 265 | #endif /* CONFIG_OF_GPIO */ | 265 | #endif /* CONFIG_OF_GPIO */ |
| 266 | 266 | ||
| 267 | static struct platform_driver mdio_gpio_driver = { | 267 | static struct platform_driver mdio_gpio_driver = { |
diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c index edfa15d2e795..486b4048850d 100644 --- a/drivers/net/ppp/ppp_generic.c +++ b/drivers/net/ppp/ppp_generic.c | |||
| @@ -2024,14 +2024,22 @@ ppp_mp_reconstruct(struct ppp *ppp) | |||
| 2024 | continue; | 2024 | continue; |
| 2025 | } | 2025 | } |
| 2026 | if (PPP_MP_CB(p)->sequence != seq) { | 2026 | if (PPP_MP_CB(p)->sequence != seq) { |
| 2027 | u32 oldseq; | ||
| 2027 | /* Fragment `seq' is missing. If it is after | 2028 | /* Fragment `seq' is missing. If it is after |
| 2028 | minseq, it might arrive later, so stop here. */ | 2029 | minseq, it might arrive later, so stop here. */ |
| 2029 | if (seq_after(seq, minseq)) | 2030 | if (seq_after(seq, minseq)) |
| 2030 | break; | 2031 | break; |
| 2031 | /* Fragment `seq' is lost, keep going. */ | 2032 | /* Fragment `seq' is lost, keep going. */ |
| 2032 | lost = 1; | 2033 | lost = 1; |
| 2034 | oldseq = seq; | ||
| 2033 | seq = seq_before(minseq, PPP_MP_CB(p)->sequence)? | 2035 | seq = seq_before(minseq, PPP_MP_CB(p)->sequence)? |
| 2034 | minseq + 1: PPP_MP_CB(p)->sequence; | 2036 | minseq + 1: PPP_MP_CB(p)->sequence; |
| 2037 | |||
| 2038 | if (ppp->debug & 1) | ||
| 2039 | netdev_printk(KERN_DEBUG, ppp->dev, | ||
| 2040 | "lost frag %u..%u\n", | ||
| 2041 | oldseq, seq-1); | ||
| 2042 | |||
| 2035 | goto again; | 2043 | goto again; |
| 2036 | } | 2044 | } |
| 2037 | 2045 | ||
| @@ -2076,6 +2084,10 @@ ppp_mp_reconstruct(struct ppp *ppp) | |||
| 2076 | struct sk_buff *tmp2; | 2084 | struct sk_buff *tmp2; |
| 2077 | 2085 | ||
| 2078 | skb_queue_reverse_walk_from_safe(list, p, tmp2) { | 2086 | skb_queue_reverse_walk_from_safe(list, p, tmp2) { |
| 2087 | if (ppp->debug & 1) | ||
| 2088 | netdev_printk(KERN_DEBUG, ppp->dev, | ||
| 2089 | "discarding frag %u\n", | ||
| 2090 | PPP_MP_CB(p)->sequence); | ||
| 2079 | __skb_unlink(p, list); | 2091 | __skb_unlink(p, list); |
| 2080 | kfree_skb(p); | 2092 | kfree_skb(p); |
| 2081 | } | 2093 | } |
| @@ -2091,6 +2103,17 @@ ppp_mp_reconstruct(struct ppp *ppp) | |||
| 2091 | /* If we have discarded any fragments, | 2103 | /* If we have discarded any fragments, |
| 2092 | signal a receive error. */ | 2104 | signal a receive error. */ |
| 2093 | if (PPP_MP_CB(head)->sequence != ppp->nextseq) { | 2105 | if (PPP_MP_CB(head)->sequence != ppp->nextseq) { |
| 2106 | skb_queue_walk_safe(list, p, tmp) { | ||
| 2107 | if (p == head) | ||
| 2108 | break; | ||
| 2109 | if (ppp->debug & 1) | ||
| 2110 | netdev_printk(KERN_DEBUG, ppp->dev, | ||
| 2111 | "discarding frag %u\n", | ||
| 2112 | PPP_MP_CB(p)->sequence); | ||
| 2113 | __skb_unlink(p, list); | ||
| 2114 | kfree_skb(p); | ||
| 2115 | } | ||
| 2116 | |||
| 2094 | if (ppp->debug & 1) | 2117 | if (ppp->debug & 1) |
| 2095 | netdev_printk(KERN_DEBUG, ppp->dev, | 2118 | netdev_printk(KERN_DEBUG, ppp->dev, |
| 2096 | " missed pkts %u..%u\n", | 2119 | " missed pkts %u..%u\n", |
diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c index 41a61efc331e..90a30026a931 100644 --- a/drivers/net/usb/cdc_ether.c +++ b/drivers/net/usb/cdc_ether.c | |||
| @@ -573,6 +573,13 @@ static const struct usb_device_id products [] = { | |||
| 573 | .driver_info = 0, | 573 | .driver_info = 0, |
| 574 | }, | 574 | }, |
| 575 | 575 | ||
| 576 | /* Logitech Harmony 900 - uses the pseudo-MDLM (BLAN) driver */ | ||
| 577 | { | ||
| 578 | USB_DEVICE_AND_INTERFACE_INFO(0x046d, 0xc11f, USB_CLASS_COMM, | ||
| 579 | USB_CDC_SUBCLASS_MDLM, USB_CDC_PROTO_NONE), | ||
| 580 | .driver_info = 0, | ||
| 581 | }, | ||
| 582 | |||
| 576 | /* | 583 | /* |
| 577 | * WHITELIST!!! | 584 | * WHITELIST!!! |
| 578 | * | 585 | * |
diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c index 304fe78ff60e..e1324b4a0f66 100644 --- a/drivers/net/usb/hso.c +++ b/drivers/net/usb/hso.c | |||
| @@ -1632,7 +1632,7 @@ static int hso_get_count(struct tty_struct *tty, | |||
| 1632 | struct hso_serial *serial = get_serial_by_tty(tty); | 1632 | struct hso_serial *serial = get_serial_by_tty(tty); |
| 1633 | struct hso_tiocmget *tiocmget = serial->tiocmget; | 1633 | struct hso_tiocmget *tiocmget = serial->tiocmget; |
| 1634 | 1634 | ||
| 1635 | memset(&icount, 0, sizeof(struct serial_icounter_struct)); | 1635 | memset(icount, 0, sizeof(struct serial_icounter_struct)); |
| 1636 | 1636 | ||
| 1637 | if (!tiocmget) | 1637 | if (!tiocmget) |
| 1638 | return -ENOENT; | 1638 | return -ENOENT; |
diff --git a/drivers/net/usb/zaurus.c b/drivers/net/usb/zaurus.c index f701d4127087..c3197ce0e2ad 100644 --- a/drivers/net/usb/zaurus.c +++ b/drivers/net/usb/zaurus.c | |||
| @@ -316,6 +316,11 @@ static const struct usb_device_id products [] = { | |||
| 316 | ZAURUS_MASTER_INTERFACE, | 316 | ZAURUS_MASTER_INTERFACE, |
| 317 | .driver_info = ZAURUS_PXA_INFO, | 317 | .driver_info = ZAURUS_PXA_INFO, |
| 318 | }, { | 318 | }, { |
| 319 | /* C-750/C-760/C-860/SL-C3000 PDA in MDLM mode */ | ||
| 320 | USB_DEVICE_AND_INTERFACE_INFO(0x04DD, 0x9031, USB_CLASS_COMM, | ||
| 321 | USB_CDC_SUBCLASS_MDLM, USB_CDC_PROTO_NONE), | ||
| 322 | .driver_info = (unsigned long) &bogus_mdlm_info, | ||
| 323 | }, { | ||
| 319 | .match_flags = USB_DEVICE_ID_MATCH_INT_INFO | 324 | .match_flags = USB_DEVICE_ID_MATCH_INT_INFO |
| 320 | | USB_DEVICE_ID_MATCH_DEVICE, | 325 | | USB_DEVICE_ID_MATCH_DEVICE, |
| 321 | .idVendor = 0x04DD, | 326 | .idVendor = 0x04DD, |
| @@ -349,6 +354,13 @@ static const struct usb_device_id products [] = { | |||
| 349 | ZAURUS_MASTER_INTERFACE, | 354 | ZAURUS_MASTER_INTERFACE, |
| 350 | .driver_info = OLYMPUS_MXL_INFO, | 355 | .driver_info = OLYMPUS_MXL_INFO, |
| 351 | }, | 356 | }, |
| 357 | |||
| 358 | /* Logitech Harmony 900 - uses the pseudo-MDLM (BLAN) driver */ | ||
| 359 | { | ||
| 360 | USB_DEVICE_AND_INTERFACE_INFO(0x046d, 0xc11f, USB_CLASS_COMM, | ||
| 361 | USB_CDC_SUBCLASS_MDLM, USB_CDC_PROTO_NONE), | ||
| 362 | .driver_info = (unsigned long) &bogus_mdlm_info, | ||
| 363 | }, | ||
| 352 | { }, // END | 364 | { }, // END |
| 353 | }; | 365 | }; |
| 354 | MODULE_DEVICE_TABLE(usb, products); | 366 | MODULE_DEVICE_TABLE(usb, products); |
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c index de7fc345148a..3dcd3857a36c 100644 --- a/drivers/net/vmxnet3/vmxnet3_drv.c +++ b/drivers/net/vmxnet3/vmxnet3_drv.c | |||
| @@ -843,8 +843,8 @@ vmxnet3_parse_and_copy_hdr(struct sk_buff *skb, struct vmxnet3_tx_queue *tq, | |||
| 843 | /* for simplicity, don't copy L4 headers */ | 843 | /* for simplicity, don't copy L4 headers */ |
| 844 | ctx->l4_hdr_size = 0; | 844 | ctx->l4_hdr_size = 0; |
| 845 | } | 845 | } |
| 846 | ctx->copy_size = ctx->eth_ip_hdr_size + | 846 | ctx->copy_size = min(ctx->eth_ip_hdr_size + |
| 847 | ctx->l4_hdr_size; | 847 | ctx->l4_hdr_size, skb->len); |
| 848 | } else { | 848 | } else { |
| 849 | ctx->eth_ip_hdr_size = 0; | 849 | ctx->eth_ip_hdr_size = 0; |
| 850 | ctx->l4_hdr_size = 0; | 850 | ctx->l4_hdr_size = 0; |
diff --git a/drivers/net/wireless/ath/ath9k/rc.c b/drivers/net/wireless/ath/ath9k/rc.c index 635b592ad961..a427a16bb739 100644 --- a/drivers/net/wireless/ath/ath9k/rc.c +++ b/drivers/net/wireless/ath/ath9k/rc.c | |||
| @@ -1346,7 +1346,7 @@ static void ath_tx_status(void *priv, struct ieee80211_supported_band *sband, | |||
| 1346 | fc = hdr->frame_control; | 1346 | fc = hdr->frame_control; |
| 1347 | for (i = 0; i < sc->hw->max_rates; i++) { | 1347 | for (i = 0; i < sc->hw->max_rates; i++) { |
| 1348 | struct ieee80211_tx_rate *rate = &tx_info->status.rates[i]; | 1348 | struct ieee80211_tx_rate *rate = &tx_info->status.rates[i]; |
| 1349 | if (!rate->count) | 1349 | if (rate->idx < 0 || !rate->count) |
| 1350 | break; | 1350 | break; |
| 1351 | 1351 | ||
| 1352 | final_ts_idx = i; | 1352 | final_ts_idx = i; |
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c index c3b6c4652cd6..5b2972b43b0e 100644 --- a/drivers/net/wireless/mwifiex/cfg80211.c +++ b/drivers/net/wireless/mwifiex/cfg80211.c | |||
| @@ -841,7 +841,12 @@ mwifiex_cfg80211_assoc(struct mwifiex_private *priv, size_t ssid_len, u8 *ssid, | |||
| 841 | ret = mwifiex_set_rf_channel(priv, channel, | 841 | ret = mwifiex_set_rf_channel(priv, channel, |
| 842 | priv->adapter->channel_type); | 842 | priv->adapter->channel_type); |
| 843 | 843 | ||
| 844 | ret = mwifiex_set_encode(priv, NULL, 0, 0, 1); /* Disable keys */ | 844 | /* As this is new association, clear locally stored |
| 845 | * keys and security related flags */ | ||
| 846 | priv->sec_info.wpa_enabled = false; | ||
| 847 | priv->sec_info.wpa2_enabled = false; | ||
| 848 | priv->wep_key_curr_index = 0; | ||
| 849 | ret = mwifiex_set_encode(priv, NULL, 0, 0, 1); | ||
| 845 | 850 | ||
| 846 | if (mode == NL80211_IFTYPE_ADHOC) { | 851 | if (mode == NL80211_IFTYPE_ADHOC) { |
| 847 | /* "privacy" is set only for ad-hoc mode */ | 852 | /* "privacy" is set only for ad-hoc mode */ |
| @@ -886,6 +891,7 @@ mwifiex_cfg80211_assoc(struct mwifiex_private *priv, size_t ssid_len, u8 *ssid, | |||
| 886 | dev_dbg(priv->adapter->dev, | 891 | dev_dbg(priv->adapter->dev, |
| 887 | "info: setting wep encryption" | 892 | "info: setting wep encryption" |
| 888 | " with key len %d\n", sme->key_len); | 893 | " with key len %d\n", sme->key_len); |
| 894 | priv->wep_key_curr_index = sme->key_idx; | ||
| 889 | ret = mwifiex_set_encode(priv, sme->key, sme->key_len, | 895 | ret = mwifiex_set_encode(priv, sme->key, sme->key_len, |
| 890 | sme->key_idx, 0); | 896 | sme->key_idx, 0); |
| 891 | } | 897 | } |
