diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-02-13 03:44:22 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-02-13 03:44:22 -0500 |
commit | f8a6b2b9cee298a9663cbe38ce1eb5240987cb62 (patch) | |
tree | b356490269c9e77d164dcc1477792b882fbb8bdb /drivers/net | |
parent | ba1511bf7fbda452138e4096bf10d5a382710f4f (diff) | |
parent | 071a0bc2ceace31266836801510879407a3701fa (diff) |
Merge branch 'linus' into x86/apic
Conflicts:
arch/x86/kernel/acpi/boot.c
arch/x86/mm/fault.c
Diffstat (limited to 'drivers/net')
27 files changed, 159 insertions, 83 deletions
diff --git a/drivers/net/3c509.c b/drivers/net/3c509.c index 535c234286e..8c694213035 100644 --- a/drivers/net/3c509.c +++ b/drivers/net/3c509.c | |||
@@ -1475,6 +1475,7 @@ el3_resume(struct device *pdev) | |||
1475 | spin_lock_irqsave(&lp->lock, flags); | 1475 | spin_lock_irqsave(&lp->lock, flags); |
1476 | 1476 | ||
1477 | outw(PowerUp, ioaddr + EL3_CMD); | 1477 | outw(PowerUp, ioaddr + EL3_CMD); |
1478 | EL3WINDOW(0); | ||
1478 | el3_up(dev); | 1479 | el3_up(dev); |
1479 | 1480 | ||
1480 | if (netif_running(dev)) | 1481 | if (netif_running(dev)) |
diff --git a/drivers/net/arm/etherh.c b/drivers/net/arm/etherh.c index d15d8b79d8e..54b52e5b182 100644 --- a/drivers/net/arm/etherh.c +++ b/drivers/net/arm/etherh.c | |||
@@ -646,7 +646,7 @@ static const struct net_device_ops etherh_netdev_ops = { | |||
646 | .ndo_get_stats = ei_get_stats, | 646 | .ndo_get_stats = ei_get_stats, |
647 | .ndo_set_multicast_list = ei_set_multicast_list, | 647 | .ndo_set_multicast_list = ei_set_multicast_list, |
648 | .ndo_validate_addr = eth_validate_addr, | 648 | .ndo_validate_addr = eth_validate_addr, |
649 | .ndo_set_mac_address = eth_set_mac_addr, | 649 | .ndo_set_mac_address = eth_mac_addr, |
650 | .ndo_change_mtu = eth_change_mtu, | 650 | .ndo_change_mtu = eth_change_mtu, |
651 | #ifdef CONFIG_NET_POLL_CONTROLLER | 651 | #ifdef CONFIG_NET_POLL_CONTROLLER |
652 | .ndo_poll_controller = ei_poll, | 652 | .ndo_poll_controller = ei_poll, |
diff --git a/drivers/net/cassini.c b/drivers/net/cassini.c index 840b3d1a22f..bbbc3bb08aa 100644 --- a/drivers/net/cassini.c +++ b/drivers/net/cassini.c | |||
@@ -806,7 +806,7 @@ static int cas_reset_mii_phy(struct cas *cp) | |||
806 | 806 | ||
807 | cas_phy_write(cp, MII_BMCR, BMCR_RESET); | 807 | cas_phy_write(cp, MII_BMCR, BMCR_RESET); |
808 | udelay(100); | 808 | udelay(100); |
809 | while (limit--) { | 809 | while (--limit) { |
810 | val = cas_phy_read(cp, MII_BMCR); | 810 | val = cas_phy_read(cp, MII_BMCR); |
811 | if ((val & BMCR_RESET) == 0) | 811 | if ((val & BMCR_RESET) == 0) |
812 | break; | 812 | break; |
@@ -979,7 +979,7 @@ static void cas_phy_init(struct cas *cp) | |||
979 | writel(val, cp->regs + REG_PCS_MII_CTRL); | 979 | writel(val, cp->regs + REG_PCS_MII_CTRL); |
980 | 980 | ||
981 | limit = STOP_TRIES; | 981 | limit = STOP_TRIES; |
982 | while (limit-- > 0) { | 982 | while (--limit > 0) { |
983 | udelay(10); | 983 | udelay(10); |
984 | if ((readl(cp->regs + REG_PCS_MII_CTRL) & | 984 | if ((readl(cp->regs + REG_PCS_MII_CTRL) & |
985 | PCS_MII_RESET) == 0) | 985 | PCS_MII_RESET) == 0) |
diff --git a/drivers/net/cxgb3/sge.c b/drivers/net/cxgb3/sge.c index 379a1324db4..d31791f6029 100644 --- a/drivers/net/cxgb3/sge.c +++ b/drivers/net/cxgb3/sge.c | |||
@@ -2276,8 +2276,7 @@ no_mem: | |||
2276 | } else if ((len = ntohl(r->len_cq)) != 0) { | 2276 | } else if ((len = ntohl(r->len_cq)) != 0) { |
2277 | struct sge_fl *fl; | 2277 | struct sge_fl *fl; |
2278 | 2278 | ||
2279 | if (eth) | 2279 | lro &= eth && is_eth_tcp(rss_hi); |
2280 | lro = qs->lro_enabled && is_eth_tcp(rss_hi); | ||
2281 | 2280 | ||
2282 | fl = (len & F_RSPD_FLQ) ? &qs->fl[1] : &qs->fl[0]; | 2281 | fl = (len & F_RSPD_FLQ) ? &qs->fl[1] : &qs->fl[0]; |
2283 | if (fl->use_pages) { | 2282 | if (fl->use_pages) { |
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index c986978ce76..6bd63cc67b3 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
@@ -940,7 +940,7 @@ static int __devinit e1000_probe(struct pci_dev *pdev, | |||
940 | err = pci_enable_device(pdev); | 940 | err = pci_enable_device(pdev); |
941 | } else { | 941 | } else { |
942 | bars = pci_select_bars(pdev, IORESOURCE_MEM); | 942 | bars = pci_select_bars(pdev, IORESOURCE_MEM); |
943 | err = pci_enable_device(pdev); | 943 | err = pci_enable_device_mem(pdev); |
944 | } | 944 | } |
945 | if (err) | 945 | if (err) |
946 | return err; | 946 | return err; |
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c index 3f7eab42aef..9b12a13a640 100644 --- a/drivers/net/gianfar.c +++ b/drivers/net/gianfar.c | |||
@@ -351,6 +351,9 @@ static int gfar_probe(struct of_device *ofdev, | |||
351 | /* Reset MAC layer */ | 351 | /* Reset MAC layer */ |
352 | gfar_write(&priv->regs->maccfg1, MACCFG1_SOFT_RESET); | 352 | gfar_write(&priv->regs->maccfg1, MACCFG1_SOFT_RESET); |
353 | 353 | ||
354 | /* We need to delay at least 3 TX clocks */ | ||
355 | udelay(2); | ||
356 | |||
354 | tempval = (MACCFG1_TX_FLOW | MACCFG1_RX_FLOW); | 357 | tempval = (MACCFG1_TX_FLOW | MACCFG1_RX_FLOW); |
355 | gfar_write(&priv->regs->maccfg1, tempval); | 358 | gfar_write(&priv->regs->maccfg1, tempval); |
356 | 359 | ||
@@ -1626,6 +1629,12 @@ static void gfar_schedule_cleanup(struct net_device *dev) | |||
1626 | if (netif_rx_schedule_prep(&priv->napi)) { | 1629 | if (netif_rx_schedule_prep(&priv->napi)) { |
1627 | gfar_write(&priv->regs->imask, IMASK_RTX_DISABLED); | 1630 | gfar_write(&priv->regs->imask, IMASK_RTX_DISABLED); |
1628 | __netif_rx_schedule(&priv->napi); | 1631 | __netif_rx_schedule(&priv->napi); |
1632 | } else { | ||
1633 | /* | ||
1634 | * Clear IEVENT, so interrupts aren't called again | ||
1635 | * because of the packets that have already arrived. | ||
1636 | */ | ||
1637 | gfar_write(&priv->regs->ievent, IEVENT_RTX_MASK); | ||
1629 | } | 1638 | } |
1630 | 1639 | ||
1631 | spin_unlock(&priv->rxlock); | 1640 | spin_unlock(&priv->rxlock); |
diff --git a/drivers/net/gianfar.h b/drivers/net/gianfar.h index b1a83344acc..eaa86897f5c 100644 --- a/drivers/net/gianfar.h +++ b/drivers/net/gianfar.h | |||
@@ -312,7 +312,7 @@ extern const char gfar_driver_version[]; | |||
312 | #define ATTRELI_EI(x) (x) | 312 | #define ATTRELI_EI(x) (x) |
313 | 313 | ||
314 | #define BD_LFLAG(flags) ((flags) << 16) | 314 | #define BD_LFLAG(flags) ((flags) << 16) |
315 | #define BD_LENGTH_MASK 0x00ff | 315 | #define BD_LENGTH_MASK 0x0000ffff |
316 | 316 | ||
317 | /* TxBD status field bits */ | 317 | /* TxBD status field bits */ |
318 | #define TXBD_READY 0x8000 | 318 | #define TXBD_READY 0x8000 |
diff --git a/drivers/net/ibm_newemac/phy.c b/drivers/net/ibm_newemac/phy.c index c40cd8df221..ac9d964e59e 100644 --- a/drivers/net/ibm_newemac/phy.c +++ b/drivers/net/ibm_newemac/phy.c | |||
@@ -60,7 +60,7 @@ int emac_mii_reset_phy(struct mii_phy *phy) | |||
60 | 60 | ||
61 | udelay(300); | 61 | udelay(300); |
62 | 62 | ||
63 | while (limit--) { | 63 | while (--limit) { |
64 | val = phy_read(phy, MII_BMCR); | 64 | val = phy_read(phy, MII_BMCR); |
65 | if (val >= 0 && (val & BMCR_RESET) == 0) | 65 | if (val >= 0 && (val & BMCR_RESET) == 0) |
66 | break; | 66 | break; |
@@ -84,7 +84,7 @@ int emac_mii_reset_gpcs(struct mii_phy *phy) | |||
84 | 84 | ||
85 | udelay(300); | 85 | udelay(300); |
86 | 86 | ||
87 | while (limit--) { | 87 | while (--limit) { |
88 | val = gpcs_phy_read(phy, MII_BMCR); | 88 | val = gpcs_phy_read(phy, MII_BMCR); |
89 | if (val >= 0 && (val & BMCR_RESET) == 0) | 89 | if (val >= 0 && (val & BMCR_RESET) == 0) |
90 | break; | 90 | break; |
diff --git a/drivers/net/netxen/netxen_nic.h b/drivers/net/netxen/netxen_nic.h index 9c78c963b72..f4dd9acb687 100644 --- a/drivers/net/netxen/netxen_nic.h +++ b/drivers/net/netxen/netxen_nic.h | |||
@@ -1203,7 +1203,7 @@ typedef struct { | |||
1203 | #define NETXEN_IS_MSI_FAMILY(adapter) \ | 1203 | #define NETXEN_IS_MSI_FAMILY(adapter) \ |
1204 | ((adapter)->flags & (NETXEN_NIC_MSI_ENABLED | NETXEN_NIC_MSIX_ENABLED)) | 1204 | ((adapter)->flags & (NETXEN_NIC_MSI_ENABLED | NETXEN_NIC_MSIX_ENABLED)) |
1205 | 1205 | ||
1206 | #define MSIX_ENTRIES_PER_ADAPTER 8 | 1206 | #define MSIX_ENTRIES_PER_ADAPTER 1 |
1207 | #define NETXEN_MSIX_TBL_SPACE 8192 | 1207 | #define NETXEN_MSIX_TBL_SPACE 8192 |
1208 | #define NETXEN_PCI_REG_MSIX_TBL 0x44 | 1208 | #define NETXEN_PCI_REG_MSIX_TBL 0x44 |
1209 | 1209 | ||
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c index 645d384fe87..3b17a793614 100644 --- a/drivers/net/netxen/netxen_nic_main.c +++ b/drivers/net/netxen/netxen_nic_main.c | |||
@@ -76,6 +76,7 @@ static void netxen_nic_poll_controller(struct net_device *netdev); | |||
76 | #endif | 76 | #endif |
77 | static irqreturn_t netxen_intr(int irq, void *data); | 77 | static irqreturn_t netxen_intr(int irq, void *data); |
78 | static irqreturn_t netxen_msi_intr(int irq, void *data); | 78 | static irqreturn_t netxen_msi_intr(int irq, void *data); |
79 | static irqreturn_t netxen_msix_intr(int irq, void *data); | ||
79 | 80 | ||
80 | /* PCI Device ID Table */ | 81 | /* PCI Device ID Table */ |
81 | #define ENTRY(device) \ | 82 | #define ENTRY(device) \ |
@@ -1084,7 +1085,9 @@ static int netxen_nic_open(struct net_device *netdev) | |||
1084 | for (ring = 0; ring < adapter->max_rds_rings; ring++) | 1085 | for (ring = 0; ring < adapter->max_rds_rings; ring++) |
1085 | netxen_post_rx_buffers(adapter, ctx, ring); | 1086 | netxen_post_rx_buffers(adapter, ctx, ring); |
1086 | } | 1087 | } |
1087 | if (NETXEN_IS_MSI_FAMILY(adapter)) | 1088 | if (adapter->flags & NETXEN_NIC_MSIX_ENABLED) |
1089 | handler = netxen_msix_intr; | ||
1090 | else if (adapter->flags & NETXEN_NIC_MSI_ENABLED) | ||
1088 | handler = netxen_msi_intr; | 1091 | handler = netxen_msi_intr; |
1089 | else { | 1092 | else { |
1090 | flags |= IRQF_SHARED; | 1093 | flags |= IRQF_SHARED; |
@@ -1612,6 +1615,14 @@ static irqreturn_t netxen_msi_intr(int irq, void *data) | |||
1612 | return IRQ_HANDLED; | 1615 | return IRQ_HANDLED; |
1613 | } | 1616 | } |
1614 | 1617 | ||
1618 | static irqreturn_t netxen_msix_intr(int irq, void *data) | ||
1619 | { | ||
1620 | struct netxen_adapter *adapter = data; | ||
1621 | |||
1622 | napi_schedule(&adapter->napi); | ||
1623 | return IRQ_HANDLED; | ||
1624 | } | ||
1625 | |||
1615 | static int netxen_nic_poll(struct napi_struct *napi, int budget) | 1626 | static int netxen_nic_poll(struct napi_struct *napi, int budget) |
1616 | { | 1627 | { |
1617 | struct netxen_adapter *adapter = container_of(napi, struct netxen_adapter, napi); | 1628 | struct netxen_adapter *adapter = container_of(napi, struct netxen_adapter, napi); |
diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c index c38ed777f0a..a6999403f37 100644 --- a/drivers/net/pcmcia/pcnet_cs.c +++ b/drivers/net/pcmcia/pcnet_cs.c | |||
@@ -586,7 +586,7 @@ static int pcnet_config(struct pcmcia_device *link) | |||
586 | } | 586 | } |
587 | 587 | ||
588 | if ((link->conf.ConfigBase == 0x03c0) | 588 | if ((link->conf.ConfigBase == 0x03c0) |
589 | && (link->manf_id == 0x149) && (link->card_id = 0xc1ab)) { | 589 | && (link->manf_id == 0x149) && (link->card_id == 0xc1ab)) { |
590 | printk(KERN_INFO "pcnet_cs: this is an AX88190 card!\n"); | 590 | printk(KERN_INFO "pcnet_cs: this is an AX88190 card!\n"); |
591 | printk(KERN_INFO "pcnet_cs: use axnet_cs instead.\n"); | 591 | printk(KERN_INFO "pcnet_cs: use axnet_cs instead.\n"); |
592 | goto failed; | 592 | goto failed; |
diff --git a/drivers/net/qlge/qlge.h b/drivers/net/qlge/qlge.h index c1dadadfab1..e6fdce9206c 100644 --- a/drivers/net/qlge/qlge.h +++ b/drivers/net/qlge/qlge.h | |||
@@ -787,12 +787,12 @@ struct mbox_params { | |||
787 | 787 | ||
788 | struct flash_params { | 788 | struct flash_params { |
789 | u8 dev_id_str[4]; | 789 | u8 dev_id_str[4]; |
790 | u16 size; | 790 | __le16 size; |
791 | u16 csum; | 791 | __le16 csum; |
792 | u16 ver; | 792 | __le16 ver; |
793 | u16 sub_dev_id; | 793 | __le16 sub_dev_id; |
794 | u8 mac_addr[6]; | 794 | u8 mac_addr[6]; |
795 | u16 res; | 795 | __le16 res; |
796 | }; | 796 | }; |
797 | 797 | ||
798 | 798 | ||
diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c index 45421c8b601..3d1d7b6e55a 100644 --- a/drivers/net/qlge/qlge_main.c +++ b/drivers/net/qlge/qlge_main.c | |||
@@ -641,7 +641,7 @@ static void ql_enable_all_completion_interrupts(struct ql_adapter *qdev) | |||
641 | 641 | ||
642 | } | 642 | } |
643 | 643 | ||
644 | static int ql_read_flash_word(struct ql_adapter *qdev, int offset, u32 *data) | 644 | static int ql_read_flash_word(struct ql_adapter *qdev, int offset, __le32 *data) |
645 | { | 645 | { |
646 | int status = 0; | 646 | int status = 0; |
647 | /* wait for reg to come ready */ | 647 | /* wait for reg to come ready */ |
@@ -656,8 +656,11 @@ static int ql_read_flash_word(struct ql_adapter *qdev, int offset, u32 *data) | |||
656 | FLASH_ADDR, FLASH_ADDR_RDY, FLASH_ADDR_ERR); | 656 | FLASH_ADDR, FLASH_ADDR_RDY, FLASH_ADDR_ERR); |
657 | if (status) | 657 | if (status) |
658 | goto exit; | 658 | goto exit; |
659 | /* get the data */ | 659 | /* This data is stored on flash as an array of |
660 | *data = ql_read32(qdev, FLASH_DATA); | 660 | * __le32. Since ql_read32() returns cpu endian |
661 | * we need to swap it back. | ||
662 | */ | ||
663 | *data = cpu_to_le32(ql_read32(qdev, FLASH_DATA)); | ||
661 | exit: | 664 | exit: |
662 | return status; | 665 | return status; |
663 | } | 666 | } |
@@ -666,13 +669,20 @@ static int ql_get_flash_params(struct ql_adapter *qdev) | |||
666 | { | 669 | { |
667 | int i; | 670 | int i; |
668 | int status; | 671 | int status; |
669 | u32 *p = (u32 *)&qdev->flash; | 672 | __le32 *p = (__le32 *)&qdev->flash; |
673 | u32 offset = 0; | ||
674 | |||
675 | /* Second function's parameters follow the first | ||
676 | * function's. | ||
677 | */ | ||
678 | if (qdev->func) | ||
679 | offset = sizeof(qdev->flash) / sizeof(u32); | ||
670 | 680 | ||
671 | if (ql_sem_spinlock(qdev, SEM_FLASH_MASK)) | 681 | if (ql_sem_spinlock(qdev, SEM_FLASH_MASK)) |
672 | return -ETIMEDOUT; | 682 | return -ETIMEDOUT; |
673 | 683 | ||
674 | for (i = 0; i < sizeof(qdev->flash) / sizeof(u32); i++, p++) { | 684 | for (i = 0; i < sizeof(qdev->flash) / sizeof(u32); i++, p++) { |
675 | status = ql_read_flash_word(qdev, i, p); | 685 | status = ql_read_flash_word(qdev, i+offset, p); |
676 | if (status) { | 686 | if (status) { |
677 | QPRINTK(qdev, IFUP, ERR, "Error reading flash.\n"); | 687 | QPRINTK(qdev, IFUP, ERR, "Error reading flash.\n"); |
678 | goto exit; | 688 | goto exit; |
@@ -3826,7 +3836,7 @@ static int qlge_suspend(struct pci_dev *pdev, pm_message_t state) | |||
3826 | { | 3836 | { |
3827 | struct net_device *ndev = pci_get_drvdata(pdev); | 3837 | struct net_device *ndev = pci_get_drvdata(pdev); |
3828 | struct ql_adapter *qdev = netdev_priv(ndev); | 3838 | struct ql_adapter *qdev = netdev_priv(ndev); |
3829 | int err; | 3839 | int err, i; |
3830 | 3840 | ||
3831 | netif_device_detach(ndev); | 3841 | netif_device_detach(ndev); |
3832 | 3842 | ||
@@ -3836,6 +3846,9 @@ static int qlge_suspend(struct pci_dev *pdev, pm_message_t state) | |||
3836 | return err; | 3846 | return err; |
3837 | } | 3847 | } |
3838 | 3848 | ||
3849 | for (i = qdev->rss_ring_first_cq_id; i < qdev->rx_ring_count; i++) | ||
3850 | netif_napi_del(&qdev->rx_ring[i].napi); | ||
3851 | |||
3839 | err = pci_save_state(pdev); | 3852 | err = pci_save_state(pdev); |
3840 | if (err) | 3853 | if (err) |
3841 | return err; | 3854 | return err; |
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index 2c73ca606b3..0771eb6fc6e 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c | |||
@@ -437,6 +437,22 @@ enum features { | |||
437 | RTL_FEATURE_GMII = (1 << 2), | 437 | RTL_FEATURE_GMII = (1 << 2), |
438 | }; | 438 | }; |
439 | 439 | ||
440 | struct rtl8169_counters { | ||
441 | __le64 tx_packets; | ||
442 | __le64 rx_packets; | ||
443 | __le64 tx_errors; | ||
444 | __le32 rx_errors; | ||
445 | __le16 rx_missed; | ||
446 | __le16 align_errors; | ||
447 | __le32 tx_one_collision; | ||
448 | __le32 tx_multi_collision; | ||
449 | __le64 rx_unicast; | ||
450 | __le64 rx_broadcast; | ||
451 | __le32 rx_multicast; | ||
452 | __le16 tx_aborted; | ||
453 | __le16 tx_underun; | ||
454 | }; | ||
455 | |||
440 | struct rtl8169_private { | 456 | struct rtl8169_private { |
441 | void __iomem *mmio_addr; /* memory map physical address */ | 457 | void __iomem *mmio_addr; /* memory map physical address */ |
442 | struct pci_dev *pci_dev; /* Index of PCI device */ | 458 | struct pci_dev *pci_dev; /* Index of PCI device */ |
@@ -480,6 +496,7 @@ struct rtl8169_private { | |||
480 | unsigned features; | 496 | unsigned features; |
481 | 497 | ||
482 | struct mii_if_info mii; | 498 | struct mii_if_info mii; |
499 | struct rtl8169_counters counters; | ||
483 | }; | 500 | }; |
484 | 501 | ||
485 | MODULE_AUTHOR("Realtek and the Linux r8169 crew <netdev@vger.kernel.org>"); | 502 | MODULE_AUTHOR("Realtek and the Linux r8169 crew <netdev@vger.kernel.org>"); |
@@ -1100,22 +1117,6 @@ static const char rtl8169_gstrings[][ETH_GSTRING_LEN] = { | |||
1100 | "tx_underrun", | 1117 | "tx_underrun", |
1101 | }; | 1118 | }; |
1102 | 1119 | ||
1103 | struct rtl8169_counters { | ||
1104 | __le64 tx_packets; | ||
1105 | __le64 rx_packets; | ||
1106 | __le64 tx_errors; | ||
1107 | __le32 rx_errors; | ||
1108 | __le16 rx_missed; | ||
1109 | __le16 align_errors; | ||
1110 | __le32 tx_one_collision; | ||
1111 | __le32 tx_multi_collision; | ||
1112 | __le64 rx_unicast; | ||
1113 | __le64 rx_broadcast; | ||
1114 | __le32 rx_multicast; | ||
1115 | __le16 tx_aborted; | ||
1116 | __le16 tx_underun; | ||
1117 | }; | ||
1118 | |||
1119 | static int rtl8169_get_sset_count(struct net_device *dev, int sset) | 1120 | static int rtl8169_get_sset_count(struct net_device *dev, int sset) |
1120 | { | 1121 | { |
1121 | switch (sset) { | 1122 | switch (sset) { |
@@ -1126,16 +1127,21 @@ static int rtl8169_get_sset_count(struct net_device *dev, int sset) | |||
1126 | } | 1127 | } |
1127 | } | 1128 | } |
1128 | 1129 | ||
1129 | static void rtl8169_get_ethtool_stats(struct net_device *dev, | 1130 | static void rtl8169_update_counters(struct net_device *dev) |
1130 | struct ethtool_stats *stats, u64 *data) | ||
1131 | { | 1131 | { |
1132 | struct rtl8169_private *tp = netdev_priv(dev); | 1132 | struct rtl8169_private *tp = netdev_priv(dev); |
1133 | void __iomem *ioaddr = tp->mmio_addr; | 1133 | void __iomem *ioaddr = tp->mmio_addr; |
1134 | struct rtl8169_counters *counters; | 1134 | struct rtl8169_counters *counters; |
1135 | dma_addr_t paddr; | 1135 | dma_addr_t paddr; |
1136 | u32 cmd; | 1136 | u32 cmd; |
1137 | int wait = 1000; | ||
1137 | 1138 | ||
1138 | ASSERT_RTNL(); | 1139 | /* |
1140 | * Some chips are unable to dump tally counters when the receiver | ||
1141 | * is disabled. | ||
1142 | */ | ||
1143 | if ((RTL_R8(ChipCmd) & CmdRxEnb) == 0) | ||
1144 | return; | ||
1139 | 1145 | ||
1140 | counters = pci_alloc_consistent(tp->pci_dev, sizeof(*counters), &paddr); | 1146 | counters = pci_alloc_consistent(tp->pci_dev, sizeof(*counters), &paddr); |
1141 | if (!counters) | 1147 | if (!counters) |
@@ -1146,31 +1152,45 @@ static void rtl8169_get_ethtool_stats(struct net_device *dev, | |||
1146 | RTL_W32(CounterAddrLow, cmd); | 1152 | RTL_W32(CounterAddrLow, cmd); |
1147 | RTL_W32(CounterAddrLow, cmd | CounterDump); | 1153 | RTL_W32(CounterAddrLow, cmd | CounterDump); |
1148 | 1154 | ||
1149 | while (RTL_R32(CounterAddrLow) & CounterDump) { | 1155 | while (wait--) { |
1150 | if (msleep_interruptible(1)) | 1156 | if ((RTL_R32(CounterAddrLow) & CounterDump) == 0) { |
1157 | /* copy updated counters */ | ||
1158 | memcpy(&tp->counters, counters, sizeof(*counters)); | ||
1151 | break; | 1159 | break; |
1160 | } | ||
1161 | udelay(10); | ||
1152 | } | 1162 | } |
1153 | 1163 | ||
1154 | RTL_W32(CounterAddrLow, 0); | 1164 | RTL_W32(CounterAddrLow, 0); |
1155 | RTL_W32(CounterAddrHigh, 0); | 1165 | RTL_W32(CounterAddrHigh, 0); |
1156 | 1166 | ||
1157 | data[0] = le64_to_cpu(counters->tx_packets); | ||
1158 | data[1] = le64_to_cpu(counters->rx_packets); | ||
1159 | data[2] = le64_to_cpu(counters->tx_errors); | ||
1160 | data[3] = le32_to_cpu(counters->rx_errors); | ||
1161 | data[4] = le16_to_cpu(counters->rx_missed); | ||
1162 | data[5] = le16_to_cpu(counters->align_errors); | ||
1163 | data[6] = le32_to_cpu(counters->tx_one_collision); | ||
1164 | data[7] = le32_to_cpu(counters->tx_multi_collision); | ||
1165 | data[8] = le64_to_cpu(counters->rx_unicast); | ||
1166 | data[9] = le64_to_cpu(counters->rx_broadcast); | ||
1167 | data[10] = le32_to_cpu(counters->rx_multicast); | ||
1168 | data[11] = le16_to_cpu(counters->tx_aborted); | ||
1169 | data[12] = le16_to_cpu(counters->tx_underun); | ||
1170 | |||
1171 | pci_free_consistent(tp->pci_dev, sizeof(*counters), counters, paddr); | 1167 | pci_free_consistent(tp->pci_dev, sizeof(*counters), counters, paddr); |
1172 | } | 1168 | } |
1173 | 1169 | ||
1170 | static void rtl8169_get_ethtool_stats(struct net_device *dev, | ||
1171 | struct ethtool_stats *stats, u64 *data) | ||
1172 | { | ||
1173 | struct rtl8169_private *tp = netdev_priv(dev); | ||
1174 | |||
1175 | ASSERT_RTNL(); | ||
1176 | |||
1177 | rtl8169_update_counters(dev); | ||
1178 | |||
1179 | data[0] = le64_to_cpu(tp->counters.tx_packets); | ||
1180 | data[1] = le64_to_cpu(tp->counters.rx_packets); | ||
1181 | data[2] = le64_to_cpu(tp->counters.tx_errors); | ||
1182 | data[3] = le32_to_cpu(tp->counters.rx_errors); | ||
1183 | data[4] = le16_to_cpu(tp->counters.rx_missed); | ||
1184 | data[5] = le16_to_cpu(tp->counters.align_errors); | ||
1185 | data[6] = le32_to_cpu(tp->counters.tx_one_collision); | ||
1186 | data[7] = le32_to_cpu(tp->counters.tx_multi_collision); | ||
1187 | data[8] = le64_to_cpu(tp->counters.rx_unicast); | ||
1188 | data[9] = le64_to_cpu(tp->counters.rx_broadcast); | ||
1189 | data[10] = le32_to_cpu(tp->counters.rx_multicast); | ||
1190 | data[11] = le16_to_cpu(tp->counters.tx_aborted); | ||
1191 | data[12] = le16_to_cpu(tp->counters.tx_underun); | ||
1192 | } | ||
1193 | |||
1174 | static void rtl8169_get_strings(struct net_device *dev, u32 stringset, u8 *data) | 1194 | static void rtl8169_get_strings(struct net_device *dev, u32 stringset, u8 *data) |
1175 | { | 1195 | { |
1176 | switch(stringset) { | 1196 | switch(stringset) { |
@@ -3682,6 +3702,9 @@ static int rtl8169_close(struct net_device *dev) | |||
3682 | struct rtl8169_private *tp = netdev_priv(dev); | 3702 | struct rtl8169_private *tp = netdev_priv(dev); |
3683 | struct pci_dev *pdev = tp->pci_dev; | 3703 | struct pci_dev *pdev = tp->pci_dev; |
3684 | 3704 | ||
3705 | /* update counters before going down */ | ||
3706 | rtl8169_update_counters(dev); | ||
3707 | |||
3685 | rtl8169_down(dev); | 3708 | rtl8169_down(dev); |
3686 | 3709 | ||
3687 | free_irq(dev->irq, dev); | 3710 | free_irq(dev->irq, dev); |
diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c index bf3aa2a1eff..223cde0d43b 100644 --- a/drivers/net/smc911x.c +++ b/drivers/net/smc911x.c | |||
@@ -220,9 +220,9 @@ static void smc911x_reset(struct net_device *dev) | |||
220 | 220 | ||
221 | /* make sure EEPROM has finished loading before setting GPIO_CFG */ | 221 | /* make sure EEPROM has finished loading before setting GPIO_CFG */ |
222 | timeout=1000; | 222 | timeout=1000; |
223 | while ( timeout-- && (SMC_GET_E2P_CMD(lp) & E2P_CMD_EPC_BUSY_)) { | 223 | while (--timeout && (SMC_GET_E2P_CMD(lp) & E2P_CMD_EPC_BUSY_)) |
224 | udelay(10); | 224 | udelay(10); |
225 | } | 225 | |
226 | if (timeout == 0){ | 226 | if (timeout == 0){ |
227 | PRINTK("%s: smc911x_reset timeout waiting for EEPROM busy\n", dev->name); | 227 | PRINTK("%s: smc911x_reset timeout waiting for EEPROM busy\n", dev->name); |
228 | return; | 228 | return; |
diff --git a/drivers/net/smsc9420.c b/drivers/net/smsc9420.c index d801900a503..a1e4b3895b3 100644 --- a/drivers/net/smsc9420.c +++ b/drivers/net/smsc9420.c | |||
@@ -498,7 +498,7 @@ static void smsc9420_check_mac_address(struct net_device *dev) | |||
498 | static void smsc9420_stop_tx(struct smsc9420_pdata *pd) | 498 | static void smsc9420_stop_tx(struct smsc9420_pdata *pd) |
499 | { | 499 | { |
500 | u32 dmac_control, mac_cr, dma_intr_ena; | 500 | u32 dmac_control, mac_cr, dma_intr_ena; |
501 | int timeOut = 1000; | 501 | int timeout = 1000; |
502 | 502 | ||
503 | /* disable TX DMAC */ | 503 | /* disable TX DMAC */ |
504 | dmac_control = smsc9420_reg_read(pd, DMAC_CONTROL); | 504 | dmac_control = smsc9420_reg_read(pd, DMAC_CONTROL); |
@@ -506,13 +506,13 @@ static void smsc9420_stop_tx(struct smsc9420_pdata *pd) | |||
506 | smsc9420_reg_write(pd, DMAC_CONTROL, dmac_control); | 506 | smsc9420_reg_write(pd, DMAC_CONTROL, dmac_control); |
507 | 507 | ||
508 | /* Wait max 10ms for transmit process to stop */ | 508 | /* Wait max 10ms for transmit process to stop */ |
509 | while (timeOut--) { | 509 | while (--timeout) { |
510 | if (smsc9420_reg_read(pd, DMAC_STATUS) & DMAC_STS_TS_) | 510 | if (smsc9420_reg_read(pd, DMAC_STATUS) & DMAC_STS_TS_) |
511 | break; | 511 | break; |
512 | udelay(10); | 512 | udelay(10); |
513 | } | 513 | } |
514 | 514 | ||
515 | if (!timeOut) | 515 | if (!timeout) |
516 | smsc_warn(IFDOWN, "TX DMAC failed to stop"); | 516 | smsc_warn(IFDOWN, "TX DMAC failed to stop"); |
517 | 517 | ||
518 | /* ACK Tx DMAC stop bit */ | 518 | /* ACK Tx DMAC stop bit */ |
@@ -596,7 +596,7 @@ static void smsc9420_free_rx_ring(struct smsc9420_pdata *pd) | |||
596 | 596 | ||
597 | static void smsc9420_stop_rx(struct smsc9420_pdata *pd) | 597 | static void smsc9420_stop_rx(struct smsc9420_pdata *pd) |
598 | { | 598 | { |
599 | int timeOut = 1000; | 599 | int timeout = 1000; |
600 | u32 mac_cr, dmac_control, dma_intr_ena; | 600 | u32 mac_cr, dmac_control, dma_intr_ena; |
601 | 601 | ||
602 | /* mask RX DMAC interrupts */ | 602 | /* mask RX DMAC interrupts */ |
@@ -617,13 +617,13 @@ static void smsc9420_stop_rx(struct smsc9420_pdata *pd) | |||
617 | smsc9420_pci_flush_write(pd); | 617 | smsc9420_pci_flush_write(pd); |
618 | 618 | ||
619 | /* wait up to 10ms for receive to stop */ | 619 | /* wait up to 10ms for receive to stop */ |
620 | while (timeOut--) { | 620 | while (--timeout) { |
621 | if (smsc9420_reg_read(pd, DMAC_STATUS) & DMAC_STS_RS_) | 621 | if (smsc9420_reg_read(pd, DMAC_STATUS) & DMAC_STS_RS_) |
622 | break; | 622 | break; |
623 | udelay(10); | 623 | udelay(10); |
624 | } | 624 | } |
625 | 625 | ||
626 | if (!timeOut) | 626 | if (!timeout) |
627 | smsc_warn(IFDOWN, "RX DMAC did not stop! timeout."); | 627 | smsc_warn(IFDOWN, "RX DMAC did not stop! timeout."); |
628 | 628 | ||
629 | /* ACK the Rx DMAC stop bit */ | 629 | /* ACK the Rx DMAC stop bit */ |
diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c index 86c765d83de..49187634106 100644 --- a/drivers/net/sungem.c +++ b/drivers/net/sungem.c | |||
@@ -148,7 +148,7 @@ static u16 __phy_read(struct gem *gp, int phy_addr, int reg) | |||
148 | cmd |= (MIF_FRAME_TAMSB); | 148 | cmd |= (MIF_FRAME_TAMSB); |
149 | writel(cmd, gp->regs + MIF_FRAME); | 149 | writel(cmd, gp->regs + MIF_FRAME); |
150 | 150 | ||
151 | while (limit--) { | 151 | while (--limit) { |
152 | cmd = readl(gp->regs + MIF_FRAME); | 152 | cmd = readl(gp->regs + MIF_FRAME); |
153 | if (cmd & MIF_FRAME_TALSB) | 153 | if (cmd & MIF_FRAME_TALSB) |
154 | break; | 154 | break; |
@@ -2221,6 +2221,8 @@ static int gem_do_start(struct net_device *dev) | |||
2221 | 2221 | ||
2222 | gp->running = 1; | 2222 | gp->running = 1; |
2223 | 2223 | ||
2224 | napi_enable(&gp->napi); | ||
2225 | |||
2224 | if (gp->lstate == link_up) { | 2226 | if (gp->lstate == link_up) { |
2225 | netif_carrier_on(gp->dev); | 2227 | netif_carrier_on(gp->dev); |
2226 | gem_set_link_modes(gp); | 2228 | gem_set_link_modes(gp); |
@@ -2238,6 +2240,8 @@ static int gem_do_start(struct net_device *dev) | |||
2238 | spin_lock_irqsave(&gp->lock, flags); | 2240 | spin_lock_irqsave(&gp->lock, flags); |
2239 | spin_lock(&gp->tx_lock); | 2241 | spin_lock(&gp->tx_lock); |
2240 | 2242 | ||
2243 | napi_disable(&gp->napi); | ||
2244 | |||
2241 | gp->running = 0; | 2245 | gp->running = 0; |
2242 | gem_reset(gp); | 2246 | gem_reset(gp); |
2243 | gem_clean_rings(gp); | 2247 | gem_clean_rings(gp); |
@@ -2338,8 +2342,6 @@ static int gem_open(struct net_device *dev) | |||
2338 | if (!gp->asleep) | 2342 | if (!gp->asleep) |
2339 | rc = gem_do_start(dev); | 2343 | rc = gem_do_start(dev); |
2340 | gp->opened = (rc == 0); | 2344 | gp->opened = (rc == 0); |
2341 | if (gp->opened) | ||
2342 | napi_enable(&gp->napi); | ||
2343 | 2345 | ||
2344 | mutex_unlock(&gp->pm_mutex); | 2346 | mutex_unlock(&gp->pm_mutex); |
2345 | 2347 | ||
@@ -2476,8 +2478,6 @@ static int gem_resume(struct pci_dev *pdev) | |||
2476 | 2478 | ||
2477 | /* Re-attach net device */ | 2479 | /* Re-attach net device */ |
2478 | netif_device_attach(dev); | 2480 | netif_device_attach(dev); |
2479 | |||
2480 | napi_enable(&gp->napi); | ||
2481 | } | 2481 | } |
2482 | 2482 | ||
2483 | spin_lock_irqsave(&gp->lock, flags); | 2483 | spin_lock_irqsave(&gp->lock, flags); |
diff --git a/drivers/net/sungem_phy.c b/drivers/net/sungem_phy.c index 61843fd5752..78f8cee5fd7 100644 --- a/drivers/net/sungem_phy.c +++ b/drivers/net/sungem_phy.c | |||
@@ -79,7 +79,7 @@ static int reset_one_mii_phy(struct mii_phy* phy, int phy_id) | |||
79 | 79 | ||
80 | udelay(100); | 80 | udelay(100); |
81 | 81 | ||
82 | while (limit--) { | 82 | while (--limit) { |
83 | val = __phy_read(phy, phy_id, MII_BMCR); | 83 | val = __phy_read(phy, phy_id, MII_BMCR); |
84 | if ((val & BMCR_RESET) == 0) | 84 | if ((val & BMCR_RESET) == 0) |
85 | break; | 85 | break; |
diff --git a/drivers/net/sunhme.c b/drivers/net/sunhme.c index 7a72a3112f0..cc4013be5e1 100644 --- a/drivers/net/sunhme.c +++ b/drivers/net/sunhme.c | |||
@@ -2629,6 +2629,14 @@ static int __devinit happy_meal_sbus_probe_one(struct of_device *op, int is_qfe) | |||
2629 | int i, qfe_slot = -1; | 2629 | int i, qfe_slot = -1; |
2630 | int err = -ENODEV; | 2630 | int err = -ENODEV; |
2631 | 2631 | ||
2632 | sbus_dp = to_of_device(op->dev.parent)->node; | ||
2633 | if (is_qfe) | ||
2634 | sbus_dp = to_of_device(op->dev.parent->parent)->node; | ||
2635 | |||
2636 | /* We can match PCI devices too, do not accept those here. */ | ||
2637 | if (strcmp(sbus_dp->name, "sbus")) | ||
2638 | return err; | ||
2639 | |||
2632 | if (is_qfe) { | 2640 | if (is_qfe) { |
2633 | qp = quattro_sbus_find(op); | 2641 | qp = quattro_sbus_find(op); |
2634 | if (qp == NULL) | 2642 | if (qp == NULL) |
@@ -2734,10 +2742,6 @@ static int __devinit happy_meal_sbus_probe_one(struct of_device *op, int is_qfe) | |||
2734 | if (qp != NULL) | 2742 | if (qp != NULL) |
2735 | hp->happy_flags |= HFLAG_QUATTRO; | 2743 | hp->happy_flags |= HFLAG_QUATTRO; |
2736 | 2744 | ||
2737 | sbus_dp = to_of_device(op->dev.parent)->node; | ||
2738 | if (is_qfe) | ||
2739 | sbus_dp = to_of_device(op->dev.parent->parent)->node; | ||
2740 | |||
2741 | /* Get the supported DVMA burst sizes from our Happy SBUS. */ | 2745 | /* Get the supported DVMA burst sizes from our Happy SBUS. */ |
2742 | hp->happy_bursts = of_getintprop_default(sbus_dp, | 2746 | hp->happy_bursts = of_getintprop_default(sbus_dp, |
2743 | "burst-sizes", 0x00); | 2747 | "burst-sizes", 0x00); |
diff --git a/drivers/net/sunqe.c b/drivers/net/sunqe.c index 6e8f377355f..fe0c3f24456 100644 --- a/drivers/net/sunqe.c +++ b/drivers/net/sunqe.c | |||
@@ -227,7 +227,7 @@ static int qe_init(struct sunqe *qep, int from_irq) | |||
227 | if (!(sbus_readb(mregs + MREGS_PHYCONFIG) & MREGS_PHYCONFIG_LTESTDIS)) { | 227 | if (!(sbus_readb(mregs + MREGS_PHYCONFIG) & MREGS_PHYCONFIG_LTESTDIS)) { |
228 | int tries = 50; | 228 | int tries = 50; |
229 | 229 | ||
230 | while (tries--) { | 230 | while (--tries) { |
231 | u8 tmp; | 231 | u8 tmp; |
232 | 232 | ||
233 | mdelay(5); | 233 | mdelay(5); |
diff --git a/drivers/net/tsi108_eth.c b/drivers/net/tsi108_eth.c index 75461dbd487..a9fd2b2ccaf 100644 --- a/drivers/net/tsi108_eth.c +++ b/drivers/net/tsi108_eth.c | |||
@@ -1237,7 +1237,7 @@ static void tsi108_init_phy(struct net_device *dev) | |||
1237 | spin_lock_irqsave(&phy_lock, flags); | 1237 | spin_lock_irqsave(&phy_lock, flags); |
1238 | 1238 | ||
1239 | tsi108_write_mii(data, MII_BMCR, BMCR_RESET); | 1239 | tsi108_write_mii(data, MII_BMCR, BMCR_RESET); |
1240 | while (i--){ | 1240 | while (--i) { |
1241 | if(!(tsi108_read_mii(data, MII_BMCR) & BMCR_RESET)) | 1241 | if(!(tsi108_read_mii(data, MII_BMCR) & BMCR_RESET)) |
1242 | break; | 1242 | break; |
1243 | udelay(10); | 1243 | udelay(10); |
diff --git a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c index d5d53b633cf..d4c5ecc51f7 100644 --- a/drivers/net/tulip/de2104x.c +++ b/drivers/net/tulip/de2104x.c | |||
@@ -392,7 +392,7 @@ static void de_rx (struct de_private *de) | |||
392 | unsigned drop = 0; | 392 | unsigned drop = 0; |
393 | int rc; | 393 | int rc; |
394 | 394 | ||
395 | while (rx_work--) { | 395 | while (--rx_work) { |
396 | u32 status, len; | 396 | u32 status, len; |
397 | dma_addr_t mapping; | 397 | dma_addr_t mapping; |
398 | struct sk_buff *skb, *copy_skb; | 398 | struct sk_buff *skb, *copy_skb; |
@@ -464,13 +464,14 @@ static void de_rx (struct de_private *de) | |||
464 | drop = 1; | 464 | drop = 1; |
465 | 465 | ||
466 | rx_next: | 466 | rx_next: |
467 | de->rx_ring[rx_tail].opts1 = cpu_to_le32(DescOwn); | ||
468 | if (rx_tail == (DE_RX_RING_SIZE - 1)) | 467 | if (rx_tail == (DE_RX_RING_SIZE - 1)) |
469 | de->rx_ring[rx_tail].opts2 = | 468 | de->rx_ring[rx_tail].opts2 = |
470 | cpu_to_le32(RingEnd | de->rx_buf_sz); | 469 | cpu_to_le32(RingEnd | de->rx_buf_sz); |
471 | else | 470 | else |
472 | de->rx_ring[rx_tail].opts2 = cpu_to_le32(de->rx_buf_sz); | 471 | de->rx_ring[rx_tail].opts2 = cpu_to_le32(de->rx_buf_sz); |
473 | de->rx_ring[rx_tail].addr1 = cpu_to_le32(mapping); | 472 | de->rx_ring[rx_tail].addr1 = cpu_to_le32(mapping); |
473 | wmb(); | ||
474 | de->rx_ring[rx_tail].opts1 = cpu_to_le32(DescOwn); | ||
474 | rx_tail = NEXT_RX(rx_tail); | 475 | rx_tail = NEXT_RX(rx_tail); |
475 | } | 476 | } |
476 | 477 | ||
diff --git a/drivers/net/tun.c b/drivers/net/tun.c index d7b81e4fdd5..09fea31d3e3 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c | |||
@@ -157,10 +157,16 @@ static int update_filter(struct tap_filter *filter, void __user *arg) | |||
157 | 157 | ||
158 | nexact = n; | 158 | nexact = n; |
159 | 159 | ||
160 | /* The rest is hashed */ | 160 | /* Remaining multicast addresses are hashed, |
161 | * unicast will leave the filter disabled. */ | ||
161 | memset(filter->mask, 0, sizeof(filter->mask)); | 162 | memset(filter->mask, 0, sizeof(filter->mask)); |
162 | for (; n < uf.count; n++) | 163 | for (; n < uf.count; n++) { |
164 | if (!is_multicast_ether_addr(addr[n].u)) { | ||
165 | err = 0; /* no filter */ | ||
166 | goto done; | ||
167 | } | ||
163 | addr_hash_set(filter->mask, addr[n].u); | 168 | addr_hash_set(filter->mask, addr[n].u); |
169 | } | ||
164 | 170 | ||
165 | /* For ALLMULTI just set the mask to all ones. | 171 | /* For ALLMULTI just set the mask to all ones. |
166 | * This overrides the mask populated above. */ | 172 | * This overrides the mask populated above. */ |
diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c index 0d0fa91c025..fe98acaead9 100644 --- a/drivers/net/usb/hso.c +++ b/drivers/net/usb/hso.c | |||
@@ -455,6 +455,7 @@ static const struct usb_device_id hso_ids[] = { | |||
455 | {icon321_port_device(0x0af0, 0xd033)}, /* Icon-322 */ | 455 | {icon321_port_device(0x0af0, 0xd033)}, /* Icon-322 */ |
456 | {USB_DEVICE(0x0af0, 0x7301)}, /* GE40x */ | 456 | {USB_DEVICE(0x0af0, 0x7301)}, /* GE40x */ |
457 | {USB_DEVICE(0x0af0, 0x7361)}, /* GE40x */ | 457 | {USB_DEVICE(0x0af0, 0x7361)}, /* GE40x */ |
458 | {USB_DEVICE(0x0af0, 0x7381)}, /* GE40x */ | ||
458 | {USB_DEVICE(0x0af0, 0x7401)}, /* GI 0401 */ | 459 | {USB_DEVICE(0x0af0, 0x7401)}, /* GI 0401 */ |
459 | {USB_DEVICE(0x0af0, 0x7501)}, /* GTM 382 */ | 460 | {USB_DEVICE(0x0af0, 0x7501)}, /* GTM 382 */ |
460 | {USB_DEVICE(0x0af0, 0x7601)}, /* GE40x */ | 461 | {USB_DEVICE(0x0af0, 0x7601)}, /* GE40x */ |
@@ -462,7 +463,8 @@ static const struct usb_device_id hso_ids[] = { | |||
462 | {USB_DEVICE(0x0af0, 0x7801)}, | 463 | {USB_DEVICE(0x0af0, 0x7801)}, |
463 | {USB_DEVICE(0x0af0, 0x7901)}, | 464 | {USB_DEVICE(0x0af0, 0x7901)}, |
464 | {USB_DEVICE(0x0af0, 0x7361)}, | 465 | {USB_DEVICE(0x0af0, 0x7361)}, |
465 | {icon321_port_device(0x0af0, 0xd051)}, | 466 | {USB_DEVICE(0x0af0, 0xd057)}, |
467 | {USB_DEVICE(0x0af0, 0xd055)}, | ||
466 | {} | 468 | {} |
467 | }; | 469 | }; |
468 | MODULE_DEVICE_TABLE(usb, hso_ids); | 470 | MODULE_DEVICE_TABLE(usb, hso_ids); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index b35c8813bef..c01ea48da5f 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -4042,6 +4042,7 @@ static int iwl_pci_suspend(struct pci_dev *pdev, pm_message_t state) | |||
4042 | priv->is_open = 1; | 4042 | priv->is_open = 1; |
4043 | } | 4043 | } |
4044 | 4044 | ||
4045 | pci_save_state(pdev); | ||
4045 | pci_set_power_state(pdev, PCI_D3hot); | 4046 | pci_set_power_state(pdev, PCI_D3hot); |
4046 | 4047 | ||
4047 | return 0; | 4048 | return 0; |
@@ -4052,6 +4053,7 @@ static int iwl_pci_resume(struct pci_dev *pdev) | |||
4052 | struct iwl_priv *priv = pci_get_drvdata(pdev); | 4053 | struct iwl_priv *priv = pci_get_drvdata(pdev); |
4053 | 4054 | ||
4054 | pci_set_power_state(pdev, PCI_D0); | 4055 | pci_set_power_state(pdev, PCI_D0); |
4056 | pci_restore_state(pdev); | ||
4055 | 4057 | ||
4056 | if (priv->is_open) | 4058 | if (priv->is_open) |
4057 | iwl_mac_start(priv->hw); | 4059 | iwl_mac_start(priv->hw); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c index 412f66bac1a..70a8b21ca39 100644 --- a/drivers/net/wireless/iwlwifi/iwl-sta.c +++ b/drivers/net/wireless/iwlwifi/iwl-sta.c | |||
@@ -480,6 +480,9 @@ void iwl_clear_stations_table(struct iwl_priv *priv) | |||
480 | priv->num_stations = 0; | 480 | priv->num_stations = 0; |
481 | memset(priv->stations, 0, sizeof(priv->stations)); | 481 | memset(priv->stations, 0, sizeof(priv->stations)); |
482 | 482 | ||
483 | /* clean ucode key table bit map */ | ||
484 | priv->ucode_key_table = 0; | ||
485 | |||
483 | spin_unlock_irqrestore(&priv->sta_lock, flags); | 486 | spin_unlock_irqrestore(&priv->sta_lock, flags); |
484 | } | 487 | } |
485 | EXPORT_SYMBOL(iwl_clear_stations_table); | 488 | EXPORT_SYMBOL(iwl_clear_stations_table); |
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index 95d01984c80..5b44d322b99 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -8143,6 +8143,7 @@ static int iwl3945_pci_suspend(struct pci_dev *pdev, pm_message_t state) | |||
8143 | priv->is_open = 1; | 8143 | priv->is_open = 1; |
8144 | } | 8144 | } |
8145 | 8145 | ||
8146 | pci_save_state(pdev); | ||
8146 | pci_set_power_state(pdev, PCI_D3hot); | 8147 | pci_set_power_state(pdev, PCI_D3hot); |
8147 | 8148 | ||
8148 | return 0; | 8149 | return 0; |
@@ -8153,6 +8154,7 @@ static int iwl3945_pci_resume(struct pci_dev *pdev) | |||
8153 | struct iwl3945_priv *priv = pci_get_drvdata(pdev); | 8154 | struct iwl3945_priv *priv = pci_get_drvdata(pdev); |
8154 | 8155 | ||
8155 | pci_set_power_state(pdev, PCI_D0); | 8156 | pci_set_power_state(pdev, PCI_D0); |
8157 | pci_restore_state(pdev); | ||
8156 | 8158 | ||
8157 | if (priv->is_open) | 8159 | if (priv->is_open) |
8158 | iwl3945_mac_start(priv->hw); | 8160 | iwl3945_mac_start(priv->hw); |