diff options
Diffstat (limited to 'drivers/net')
44 files changed, 104 insertions, 169 deletions
diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c index 6deb20fc7a08..001c66dd3a94 100644 --- a/drivers/net/3c59x.c +++ b/drivers/net/3c59x.c | |||
@@ -2886,7 +2886,6 @@ static const struct ethtool_ops vortex_ethtool_ops = { | |||
2886 | .set_settings = vortex_set_settings, | 2886 | .set_settings = vortex_set_settings, |
2887 | .get_link = ethtool_op_get_link, | 2887 | .get_link = ethtool_op_get_link, |
2888 | .nway_reset = vortex_nway_reset, | 2888 | .nway_reset = vortex_nway_reset, |
2889 | .get_perm_addr = ethtool_op_get_perm_addr, | ||
2890 | }; | 2889 | }; |
2891 | 2890 | ||
2892 | #ifdef CONFIG_PCI | 2891 | #ifdef CONFIG_PCI |
diff --git a/drivers/net/8139cp.c b/drivers/net/8139cp.c index e970e64bf966..a79f28c7a100 100644 --- a/drivers/net/8139cp.c +++ b/drivers/net/8139cp.c | |||
@@ -1578,7 +1578,6 @@ static const struct ethtool_ops cp_ethtool_ops = { | |||
1578 | .set_wol = cp_set_wol, | 1578 | .set_wol = cp_set_wol, |
1579 | .get_strings = cp_get_strings, | 1579 | .get_strings = cp_get_strings, |
1580 | .get_ethtool_stats = cp_get_ethtool_stats, | 1580 | .get_ethtool_stats = cp_get_ethtool_stats, |
1581 | .get_perm_addr = ethtool_op_get_perm_addr, | ||
1582 | .get_eeprom_len = cp_get_eeprom_len, | 1581 | .get_eeprom_len = cp_get_eeprom_len, |
1583 | .get_eeprom = cp_get_eeprom, | 1582 | .get_eeprom = cp_get_eeprom, |
1584 | .set_eeprom = cp_set_eeprom, | 1583 | .set_eeprom = cp_set_eeprom, |
diff --git a/drivers/net/8139too.c b/drivers/net/8139too.c index 327eaa7b4999..f4e4298d24b9 100644 --- a/drivers/net/8139too.c +++ b/drivers/net/8139too.c | |||
@@ -2452,7 +2452,6 @@ static const struct ethtool_ops rtl8139_ethtool_ops = { | |||
2452 | .get_strings = rtl8139_get_strings, | 2452 | .get_strings = rtl8139_get_strings, |
2453 | .get_stats_count = rtl8139_get_stats_count, | 2453 | .get_stats_count = rtl8139_get_stats_count, |
2454 | .get_ethtool_stats = rtl8139_get_ethtool_stats, | 2454 | .get_ethtool_stats = rtl8139_get_ethtool_stats, |
2455 | .get_perm_addr = ethtool_op_get_perm_addr, | ||
2456 | }; | 2455 | }; |
2457 | 2456 | ||
2458 | static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) | 2457 | static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) |
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index f8a602caabcb..81ef81c9a584 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig | |||
@@ -2851,7 +2851,7 @@ config PPPOATM | |||
2851 | 2851 | ||
2852 | config PPPOL2TP | 2852 | config PPPOL2TP |
2853 | tristate "PPP over L2TP (EXPERIMENTAL)" | 2853 | tristate "PPP over L2TP (EXPERIMENTAL)" |
2854 | depends on EXPERIMENTAL && PPP | 2854 | depends on EXPERIMENTAL && PPP && INET |
2855 | help | 2855 | help |
2856 | Support for PPP-over-L2TP socket family. L2TP is a protocol | 2856 | Support for PPP-over-L2TP socket family. L2TP is a protocol |
2857 | used by ISPs and enterprises to tunnel PPP traffic over UDP | 2857 | used by ISPs and enterprises to tunnel PPP traffic over UDP |
diff --git a/drivers/net/atl1/atl1_main.c b/drivers/net/atl1/atl1_main.c index 56f6389a300e..3c1984ecf36c 100644 --- a/drivers/net/atl1/atl1_main.c +++ b/drivers/net/atl1/atl1_main.c | |||
@@ -1704,10 +1704,8 @@ static int atl1_xmit_frame(struct sk_buff *skb, struct net_device *netdev) | |||
1704 | } | 1704 | } |
1705 | } | 1705 | } |
1706 | 1706 | ||
1707 | local_irq_save(flags); | 1707 | if (!spin_trylock_irqsave(&adapter->lock, flags)) { |
1708 | if (!spin_trylock(&adapter->lock)) { | ||
1709 | /* Can't get lock - tell upper layer to requeue */ | 1708 | /* Can't get lock - tell upper layer to requeue */ |
1710 | local_irq_restore(flags); | ||
1711 | dev_printk(KERN_DEBUG, &adapter->pdev->dev, "tx locked\n"); | 1709 | dev_printk(KERN_DEBUG, &adapter->pdev->dev, "tx locked\n"); |
1712 | return NETDEV_TX_LOCKED; | 1710 | return NETDEV_TX_LOCKED; |
1713 | } | 1711 | } |
diff --git a/drivers/net/ax88796.c b/drivers/net/ax88796.c index e43e8047b90e..83da1770bafb 100644 --- a/drivers/net/ax88796.c +++ b/drivers/net/ax88796.c | |||
@@ -580,7 +580,6 @@ static const struct ethtool_ops ax_ethtool_ops = { | |||
580 | .set_settings = ax_set_settings, | 580 | .set_settings = ax_set_settings, |
581 | .nway_reset = ax_nway_reset, | 581 | .nway_reset = ax_nway_reset, |
582 | .get_link = ax_get_link, | 582 | .get_link = ax_get_link, |
583 | .get_perm_addr = ethtool_op_get_perm_addr, | ||
584 | }; | 583 | }; |
585 | 584 | ||
586 | /* setup code */ | 585 | /* setup code */ |
diff --git a/drivers/net/b44.c b/drivers/net/b44.c index 37f1b6ff5c12..0795df235492 100644 --- a/drivers/net/b44.c +++ b/drivers/net/b44.c | |||
@@ -2033,7 +2033,6 @@ static const struct ethtool_ops b44_ethtool_ops = { | |||
2033 | .get_strings = b44_get_strings, | 2033 | .get_strings = b44_get_strings, |
2034 | .get_stats_count = b44_get_stats_count, | 2034 | .get_stats_count = b44_get_stats_count, |
2035 | .get_ethtool_stats = b44_get_ethtool_stats, | 2035 | .get_ethtool_stats = b44_get_ethtool_stats, |
2036 | .get_perm_addr = ethtool_op_get_perm_addr, | ||
2037 | }; | 2036 | }; |
2038 | 2037 | ||
2039 | static int b44_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) | 2038 | static int b44_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) |
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index a729da061bbb..24e7f9ab3f5a 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c | |||
@@ -54,8 +54,8 @@ | |||
54 | 54 | ||
55 | #define DRV_MODULE_NAME "bnx2" | 55 | #define DRV_MODULE_NAME "bnx2" |
56 | #define PFX DRV_MODULE_NAME ": " | 56 | #define PFX DRV_MODULE_NAME ": " |
57 | #define DRV_MODULE_VERSION "1.6.3" | 57 | #define DRV_MODULE_VERSION "1.6.4" |
58 | #define DRV_MODULE_RELDATE "July 16, 2007" | 58 | #define DRV_MODULE_RELDATE "August 3, 2007" |
59 | 59 | ||
60 | #define RUN_AT(x) (jiffies + (x)) | 60 | #define RUN_AT(x) (jiffies + (x)) |
61 | 61 | ||
@@ -6269,7 +6269,6 @@ static const struct ethtool_ops bnx2_ethtool_ops = { | |||
6269 | .phys_id = bnx2_phys_id, | 6269 | .phys_id = bnx2_phys_id, |
6270 | .get_stats_count = bnx2_get_stats_count, | 6270 | .get_stats_count = bnx2_get_stats_count, |
6271 | .get_ethtool_stats = bnx2_get_ethtool_stats, | 6271 | .get_ethtool_stats = bnx2_get_ethtool_stats, |
6272 | .get_perm_addr = ethtool_op_get_perm_addr, | ||
6273 | }; | 6272 | }; |
6274 | 6273 | ||
6275 | /* Called with rtnl_lock */ | 6274 | /* Called with rtnl_lock */ |
@@ -6938,6 +6937,11 @@ bnx2_suspend(struct pci_dev *pdev, pm_message_t state) | |||
6938 | struct bnx2 *bp = netdev_priv(dev); | 6937 | struct bnx2 *bp = netdev_priv(dev); |
6939 | u32 reset_code; | 6938 | u32 reset_code; |
6940 | 6939 | ||
6940 | /* PCI register 4 needs to be saved whether netif_running() or not. | ||
6941 | * MSI address and data need to be saved if using MSI and | ||
6942 | * netif_running(). | ||
6943 | */ | ||
6944 | pci_save_state(pdev); | ||
6941 | if (!netif_running(dev)) | 6945 | if (!netif_running(dev)) |
6942 | return 0; | 6946 | return 0; |
6943 | 6947 | ||
@@ -6953,7 +6957,6 @@ bnx2_suspend(struct pci_dev *pdev, pm_message_t state) | |||
6953 | reset_code = BNX2_DRV_MSG_CODE_SUSPEND_NO_WOL; | 6957 | reset_code = BNX2_DRV_MSG_CODE_SUSPEND_NO_WOL; |
6954 | bnx2_reset_chip(bp, reset_code); | 6958 | bnx2_reset_chip(bp, reset_code); |
6955 | bnx2_free_skbs(bp); | 6959 | bnx2_free_skbs(bp); |
6956 | pci_save_state(pdev); | ||
6957 | bnx2_set_power_state(bp, pci_choose_state(pdev, state)); | 6960 | bnx2_set_power_state(bp, pci_choose_state(pdev, state)); |
6958 | return 0; | 6961 | return 0; |
6959 | } | 6962 | } |
@@ -6964,10 +6967,10 @@ bnx2_resume(struct pci_dev *pdev) | |||
6964 | struct net_device *dev = pci_get_drvdata(pdev); | 6967 | struct net_device *dev = pci_get_drvdata(pdev); |
6965 | struct bnx2 *bp = netdev_priv(dev); | 6968 | struct bnx2 *bp = netdev_priv(dev); |
6966 | 6969 | ||
6970 | pci_restore_state(pdev); | ||
6967 | if (!netif_running(dev)) | 6971 | if (!netif_running(dev)) |
6968 | return 0; | 6972 | return 0; |
6969 | 6973 | ||
6970 | pci_restore_state(pdev); | ||
6971 | bnx2_set_power_state(bp, PCI_D0); | 6974 | bnx2_set_power_state(bp, PCI_D0); |
6972 | netif_device_attach(dev); | 6975 | netif_device_attach(dev); |
6973 | bnx2_init_nic(bp); | 6976 | bnx2_init_nic(bp); |
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index cb9cb3013f42..070b78d959cc 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -613,38 +613,20 @@ down: | |||
613 | static int bond_update_speed_duplex(struct slave *slave) | 613 | static int bond_update_speed_duplex(struct slave *slave) |
614 | { | 614 | { |
615 | struct net_device *slave_dev = slave->dev; | 615 | struct net_device *slave_dev = slave->dev; |
616 | static int (* ioctl)(struct net_device *, struct ifreq *, int); | ||
617 | struct ifreq ifr; | ||
618 | struct ethtool_cmd etool; | 616 | struct ethtool_cmd etool; |
617 | int res; | ||
619 | 618 | ||
620 | /* Fake speed and duplex */ | 619 | /* Fake speed and duplex */ |
621 | slave->speed = SPEED_100; | 620 | slave->speed = SPEED_100; |
622 | slave->duplex = DUPLEX_FULL; | 621 | slave->duplex = DUPLEX_FULL; |
623 | 622 | ||
624 | if (slave_dev->ethtool_ops) { | 623 | if (!slave_dev->ethtool_ops || !slave_dev->ethtool_ops->get_settings) |
625 | int res; | 624 | return -1; |
626 | |||
627 | if (!slave_dev->ethtool_ops->get_settings) { | ||
628 | return -1; | ||
629 | } | ||
630 | |||
631 | res = slave_dev->ethtool_ops->get_settings(slave_dev, &etool); | ||
632 | if (res < 0) { | ||
633 | return -1; | ||
634 | } | ||
635 | |||
636 | goto verify; | ||
637 | } | ||
638 | 625 | ||
639 | ioctl = slave_dev->do_ioctl; | 626 | res = slave_dev->ethtool_ops->get_settings(slave_dev, &etool); |
640 | strncpy(ifr.ifr_name, slave_dev->name, IFNAMSIZ); | 627 | if (res < 0) |
641 | etool.cmd = ETHTOOL_GSET; | ||
642 | ifr.ifr_data = (char*)&etool; | ||
643 | if (!ioctl || (IOCTL(slave_dev, &ifr, SIOCETHTOOL) < 0)) { | ||
644 | return -1; | 628 | return -1; |
645 | } | ||
646 | 629 | ||
647 | verify: | ||
648 | switch (etool.speed) { | 630 | switch (etool.speed) { |
649 | case SPEED_10: | 631 | case SPEED_10: |
650 | case SPEED_100: | 632 | case SPEED_100: |
@@ -690,7 +672,6 @@ static int bond_check_dev_link(struct bonding *bond, struct net_device *slave_de | |||
690 | static int (* ioctl)(struct net_device *, struct ifreq *, int); | 672 | static int (* ioctl)(struct net_device *, struct ifreq *, int); |
691 | struct ifreq ifr; | 673 | struct ifreq ifr; |
692 | struct mii_ioctl_data *mii; | 674 | struct mii_ioctl_data *mii; |
693 | struct ethtool_value etool; | ||
694 | 675 | ||
695 | if (bond->params.use_carrier) { | 676 | if (bond->params.use_carrier) { |
696 | return netif_carrier_ok(slave_dev) ? BMSR_LSTATUS : 0; | 677 | return netif_carrier_ok(slave_dev) ? BMSR_LSTATUS : 0; |
@@ -721,9 +702,10 @@ static int bond_check_dev_link(struct bonding *bond, struct net_device *slave_de | |||
721 | } | 702 | } |
722 | } | 703 | } |
723 | 704 | ||
724 | /* try SIOCETHTOOL ioctl, some drivers cache ETHTOOL_GLINK */ | 705 | /* |
725 | /* for a period of time so we attempt to get link status */ | 706 | * Some drivers cache ETHTOOL_GLINK for a period of time so we only |
726 | /* from it last if the above MII ioctls fail... */ | 707 | * attempt to get link status from it if the above MII ioctls fail. |
708 | */ | ||
727 | if (slave_dev->ethtool_ops) { | 709 | if (slave_dev->ethtool_ops) { |
728 | if (slave_dev->ethtool_ops->get_link) { | 710 | if (slave_dev->ethtool_ops->get_link) { |
729 | u32 link; | 711 | u32 link; |
@@ -734,23 +716,9 @@ static int bond_check_dev_link(struct bonding *bond, struct net_device *slave_de | |||
734 | } | 716 | } |
735 | } | 717 | } |
736 | 718 | ||
737 | if (ioctl) { | ||
738 | strncpy(ifr.ifr_name, slave_dev->name, IFNAMSIZ); | ||
739 | etool.cmd = ETHTOOL_GLINK; | ||
740 | ifr.ifr_data = (char*)&etool; | ||
741 | if (IOCTL(slave_dev, &ifr, SIOCETHTOOL) == 0) { | ||
742 | if (etool.data == 1) { | ||
743 | return BMSR_LSTATUS; | ||
744 | } else { | ||
745 | dprintk("SIOCETHTOOL shows link down\n"); | ||
746 | return 0; | ||
747 | } | ||
748 | } | ||
749 | } | ||
750 | |||
751 | /* | 719 | /* |
752 | * If reporting, report that either there's no dev->do_ioctl, | 720 | * If reporting, report that either there's no dev->do_ioctl, |
753 | * or both SIOCGMIIREG and SIOCETHTOOL failed (meaning that we | 721 | * or both SIOCGMIIREG and get_link failed (meaning that we |
754 | * cannot report link status). If not reporting, pretend | 722 | * cannot report link status). If not reporting, pretend |
755 | * we're ok. | 723 | * we're ok. |
756 | */ | 724 | */ |
diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c index 6fd1e5241833..dc5d26988bb3 100644 --- a/drivers/net/cxgb3/cxgb3_main.c +++ b/drivers/net/cxgb3/cxgb3_main.c | |||
@@ -1583,7 +1583,6 @@ static const struct ethtool_ops cxgb_ethtool_ops = { | |||
1583 | .get_wol = get_wol, | 1583 | .get_wol = get_wol, |
1584 | .get_tso = ethtool_op_get_tso, | 1584 | .get_tso = ethtool_op_get_tso, |
1585 | .set_tso = ethtool_op_set_tso, | 1585 | .set_tso = ethtool_op_set_tso, |
1586 | .get_perm_addr = ethtool_op_get_perm_addr | ||
1587 | }; | 1586 | }; |
1588 | 1587 | ||
1589 | static int in_range(int val, int lo, int hi) | 1588 | static int in_range(int val, int lo, int hi) |
diff --git a/drivers/net/e100.c b/drivers/net/e100.c index 6b6401e9304e..280313b9b069 100644 --- a/drivers/net/e100.c +++ b/drivers/net/e100.c | |||
@@ -2506,7 +2506,6 @@ static const struct ethtool_ops e100_ethtool_ops = { | |||
2506 | .phys_id = e100_phys_id, | 2506 | .phys_id = e100_phys_id, |
2507 | .get_stats_count = e100_get_stats_count, | 2507 | .get_stats_count = e100_get_stats_count, |
2508 | .get_ethtool_stats = e100_get_ethtool_stats, | 2508 | .get_ethtool_stats = e100_get_ethtool_stats, |
2509 | .get_perm_addr = ethtool_op_get_perm_addr, | ||
2510 | }; | 2509 | }; |
2511 | 2510 | ||
2512 | static int e100_do_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd) | 2511 | static int e100_do_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd) |
diff --git a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c index bb08375b5f13..c90c92e72d2a 100644 --- a/drivers/net/e1000/e1000_ethtool.c +++ b/drivers/net/e1000/e1000_ethtool.c | |||
@@ -1973,7 +1973,6 @@ static const struct ethtool_ops e1000_ethtool_ops = { | |||
1973 | .phys_id = e1000_phys_id, | 1973 | .phys_id = e1000_phys_id, |
1974 | .get_stats_count = e1000_get_stats_count, | 1974 | .get_stats_count = e1000_get_stats_count, |
1975 | .get_ethtool_stats = e1000_get_ethtool_stats, | 1975 | .get_ethtool_stats = e1000_get_ethtool_stats, |
1976 | .get_perm_addr = ethtool_op_get_perm_addr, | ||
1977 | }; | 1976 | }; |
1978 | 1977 | ||
1979 | void e1000_set_ethtool_ops(struct net_device *netdev) | 1978 | void e1000_set_ethtool_ops(struct net_device *netdev) |
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index 51e1cb472738..69f5f365239a 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c | |||
@@ -4707,7 +4707,6 @@ static const struct ethtool_ops ops = { | |||
4707 | .get_regs_len = nv_get_regs_len, | 4707 | .get_regs_len = nv_get_regs_len, |
4708 | .get_regs = nv_get_regs, | 4708 | .get_regs = nv_get_regs, |
4709 | .nway_reset = nv_nway_reset, | 4709 | .nway_reset = nv_nway_reset, |
4710 | .get_perm_addr = ethtool_op_get_perm_addr, | ||
4711 | .get_tso = ethtool_op_get_tso, | 4710 | .get_tso = ethtool_op_get_tso, |
4712 | .set_tso = nv_set_tso, | 4711 | .set_tso = nv_set_tso, |
4713 | .get_ringparam = nv_get_ringparam, | 4712 | .get_ringparam = nv_get_ringparam, |
diff --git a/drivers/net/hamradio/bpqether.c b/drivers/net/hamradio/bpqether.c index 656f2789c9ba..cc0ee93669ea 100644 --- a/drivers/net/hamradio/bpqether.c +++ b/drivers/net/hamradio/bpqether.c | |||
@@ -413,12 +413,12 @@ static void *bpq_seq_next(struct seq_file *seq, void *v, loff_t *pos) | |||
413 | ++*pos; | 413 | ++*pos; |
414 | 414 | ||
415 | if (v == SEQ_START_TOKEN) | 415 | if (v == SEQ_START_TOKEN) |
416 | p = bpq_devices.next; | 416 | p = rcu_dereference(bpq_devices.next); |
417 | else | 417 | else |
418 | p = ((struct bpqdev *)v)->bpq_list.next; | 418 | p = rcu_dereference(((struct bpqdev *)v)->bpq_list.next); |
419 | 419 | ||
420 | return (p == &bpq_devices) ? NULL | 420 | return (p == &bpq_devices) ? NULL |
421 | : rcu_dereference(list_entry(p, struct bpqdev, bpq_list)); | 421 | : list_entry(p, struct bpqdev, bpq_list); |
422 | } | 422 | } |
423 | 423 | ||
424 | static void bpq_seq_stop(struct seq_file *seq, void *v) | 424 | static void bpq_seq_stop(struct seq_file *seq, void *v) |
diff --git a/drivers/net/ixgb/ixgb_ethtool.c b/drivers/net/ixgb/ixgb_ethtool.c index afde84868bea..0413cd95eda7 100644 --- a/drivers/net/ixgb/ixgb_ethtool.c +++ b/drivers/net/ixgb/ixgb_ethtool.c | |||
@@ -724,7 +724,6 @@ static const struct ethtool_ops ixgb_ethtool_ops = { | |||
724 | .phys_id = ixgb_phys_id, | 724 | .phys_id = ixgb_phys_id, |
725 | .get_stats_count = ixgb_get_stats_count, | 725 | .get_stats_count = ixgb_get_stats_count, |
726 | .get_ethtool_stats = ixgb_get_ethtool_stats, | 726 | .get_ethtool_stats = ixgb_get_ethtool_stats, |
727 | .get_perm_addr = ethtool_op_get_perm_addr, | ||
728 | }; | 727 | }; |
729 | 728 | ||
730 | void ixgb_set_ethtool_ops(struct net_device *netdev) | 729 | void ixgb_set_ethtool_ops(struct net_device *netdev) |
diff --git a/drivers/net/loopback.c b/drivers/net/loopback.c index 6ba6ed2b480a..5106c2328d12 100644 --- a/drivers/net/loopback.c +++ b/drivers/net/loopback.c | |||
@@ -229,7 +229,12 @@ struct net_device loopback_dev = { | |||
229 | /* Setup and register the loopback device. */ | 229 | /* Setup and register the loopback device. */ |
230 | static int __init loopback_init(void) | 230 | static int __init loopback_init(void) |
231 | { | 231 | { |
232 | return register_netdev(&loopback_dev); | 232 | int err = register_netdev(&loopback_dev); |
233 | |||
234 | if (err) | ||
235 | panic("loopback: Failed to register netdevice: %d\n", err); | ||
236 | |||
237 | return err; | ||
233 | }; | 238 | }; |
234 | 239 | ||
235 | module_init(loopback_init); | 240 | module_init(loopback_init); |
diff --git a/drivers/net/mlx4/mr.c b/drivers/net/mlx4/mr.c index d0808fa3ec82..5b87183e62ce 100644 --- a/drivers/net/mlx4/mr.c +++ b/drivers/net/mlx4/mr.c | |||
@@ -255,10 +255,8 @@ int mlx4_mr_alloc(struct mlx4_dev *dev, u32 pd, u64 iova, u64 size, u32 access, | |||
255 | int err; | 255 | int err; |
256 | 256 | ||
257 | index = mlx4_bitmap_alloc(&priv->mr_table.mpt_bitmap); | 257 | index = mlx4_bitmap_alloc(&priv->mr_table.mpt_bitmap); |
258 | if (index == -1) { | 258 | if (index == -1) |
259 | err = -ENOMEM; | 259 | return -ENOMEM; |
260 | goto err; | ||
261 | } | ||
262 | 260 | ||
263 | mr->iova = iova; | 261 | mr->iova = iova; |
264 | mr->size = size; | 262 | mr->size = size; |
@@ -269,15 +267,8 @@ int mlx4_mr_alloc(struct mlx4_dev *dev, u32 pd, u64 iova, u64 size, u32 access, | |||
269 | 267 | ||
270 | err = mlx4_mtt_init(dev, npages, page_shift, &mr->mtt); | 268 | err = mlx4_mtt_init(dev, npages, page_shift, &mr->mtt); |
271 | if (err) | 269 | if (err) |
272 | goto err_index; | 270 | mlx4_bitmap_free(&priv->mr_table.mpt_bitmap, index); |
273 | |||
274 | return 0; | ||
275 | |||
276 | err_index: | ||
277 | mlx4_bitmap_free(&priv->mr_table.mpt_bitmap, index); | ||
278 | 271 | ||
279 | err: | ||
280 | kfree(mr); | ||
281 | return err; | 272 | return err; |
282 | } | 273 | } |
283 | EXPORT_SYMBOL_GPL(mlx4_mr_alloc); | 274 | EXPORT_SYMBOL_GPL(mlx4_mr_alloc); |
diff --git a/drivers/net/ne2k-pci.c b/drivers/net/ne2k-pci.c index cfdeaf7aa163..f81d9398d605 100644 --- a/drivers/net/ne2k-pci.c +++ b/drivers/net/ne2k-pci.c | |||
@@ -638,7 +638,6 @@ static const struct ethtool_ops ne2k_pci_ethtool_ops = { | |||
638 | .get_drvinfo = ne2k_pci_get_drvinfo, | 638 | .get_drvinfo = ne2k_pci_get_drvinfo, |
639 | .get_tx_csum = ethtool_op_get_tx_csum, | 639 | .get_tx_csum = ethtool_op_get_tx_csum, |
640 | .get_sg = ethtool_op_get_sg, | 640 | .get_sg = ethtool_op_get_sg, |
641 | .get_perm_addr = ethtool_op_get_perm_addr, | ||
642 | }; | 641 | }; |
643 | 642 | ||
644 | static void __devexit ne2k_pci_remove_one (struct pci_dev *pdev) | 643 | static void __devexit ne2k_pci_remove_one (struct pci_dev *pdev) |
diff --git a/drivers/net/netxen/netxen_nic_ethtool.c b/drivers/net/netxen/netxen_nic_ethtool.c index 0175f6c353f6..a6138b474b4a 100644 --- a/drivers/net/netxen/netxen_nic_ethtool.c +++ b/drivers/net/netxen/netxen_nic_ethtool.c | |||
@@ -755,5 +755,4 @@ struct ethtool_ops netxen_nic_ethtool_ops = { | |||
755 | .get_strings = netxen_nic_get_strings, | 755 | .get_strings = netxen_nic_get_strings, |
756 | .get_stats_count = netxen_nic_get_stats_count, | 756 | .get_stats_count = netxen_nic_get_stats_count, |
757 | .get_ethtool_stats = netxen_nic_get_ethtool_stats, | 757 | .get_ethtool_stats = netxen_nic_get_ethtool_stats, |
758 | .get_perm_addr = ethtool_op_get_perm_addr, | ||
759 | }; | 758 | }; |
diff --git a/drivers/net/pcnet32.c b/drivers/net/pcnet32.c index 465485a3fbc6..e6a67531de99 100644 --- a/drivers/net/pcnet32.c +++ b/drivers/net/pcnet32.c | |||
@@ -1515,7 +1515,6 @@ static const struct ethtool_ops pcnet32_ethtool_ops = { | |||
1515 | .phys_id = pcnet32_phys_id, | 1515 | .phys_id = pcnet32_phys_id, |
1516 | .get_regs_len = pcnet32_get_regs_len, | 1516 | .get_regs_len = pcnet32_get_regs_len, |
1517 | .get_regs = pcnet32_get_regs, | 1517 | .get_regs = pcnet32_get_regs, |
1518 | .get_perm_addr = ethtool_op_get_perm_addr, | ||
1519 | }; | 1518 | }; |
1520 | 1519 | ||
1521 | /* only probes for non-PCI devices, the rest are handled by | 1520 | /* only probes for non-PCI devices, the rest are handled by |
diff --git a/drivers/net/pppoe.c b/drivers/net/pppoe.c index 6f98834e6ace..68631a5721ac 100644 --- a/drivers/net/pppoe.c +++ b/drivers/net/pppoe.c | |||
@@ -108,19 +108,24 @@ static inline int cmp_addr(struct pppoe_addr *a, unsigned long sid, char *addr) | |||
108 | (memcmp(a->remote,addr,ETH_ALEN) == 0)); | 108 | (memcmp(a->remote,addr,ETH_ALEN) == 0)); |
109 | } | 109 | } |
110 | 110 | ||
111 | static int hash_item(unsigned long sid, unsigned char *addr) | 111 | #if 8%PPPOE_HASH_BITS |
112 | #error 8 must be a multiple of PPPOE_HASH_BITS | ||
113 | #endif | ||
114 | |||
115 | static int hash_item(unsigned int sid, unsigned char *addr) | ||
112 | { | 116 | { |
113 | char hash = 0; | 117 | unsigned char hash = 0; |
114 | int i, j; | 118 | unsigned int i; |
115 | 119 | ||
116 | for (i = 0; i < ETH_ALEN ; ++i) { | 120 | for (i = 0 ; i < ETH_ALEN ; i++) { |
117 | for (j = 0; j < 8/PPPOE_HASH_BITS ; ++j) { | 121 | hash ^= addr[i]; |
118 | hash ^= addr[i] >> ( j * PPPOE_HASH_BITS ); | 122 | } |
119 | } | 123 | for (i = 0 ; i < sizeof(sid_t)*8 ; i += 8 ){ |
124 | hash ^= sid>>i; | ||
125 | } | ||
126 | for (i = 8 ; (i>>=1) >= PPPOE_HASH_BITS ; ) { | ||
127 | hash ^= hash>>i; | ||
120 | } | 128 | } |
121 | |||
122 | for (i = 0; i < (sizeof(unsigned long)*8) / PPPOE_HASH_BITS ; ++i) | ||
123 | hash ^= sid >> (i*PPPOE_HASH_BITS); | ||
124 | 129 | ||
125 | return hash & ( PPPOE_HASH_SIZE - 1 ); | 130 | return hash & ( PPPOE_HASH_SIZE - 1 ); |
126 | } | 131 | } |
@@ -664,8 +669,8 @@ static int pppoe_ioctl(struct socket *sock, unsigned int cmd, | |||
664 | { | 669 | { |
665 | struct sock *sk = sock->sk; | 670 | struct sock *sk = sock->sk; |
666 | struct pppox_sock *po = pppox_sk(sk); | 671 | struct pppox_sock *po = pppox_sk(sk); |
667 | int val = 0; | 672 | int val; |
668 | int err = 0; | 673 | int err; |
669 | 674 | ||
670 | switch (cmd) { | 675 | switch (cmd) { |
671 | case PPPIOCGMRU: | 676 | case PPPIOCGMRU: |
@@ -754,8 +759,9 @@ static int pppoe_ioctl(struct socket *sock, unsigned int cmd, | |||
754 | err = 0; | 759 | err = 0; |
755 | break; | 760 | break; |
756 | 761 | ||
757 | default:; | 762 | default: |
758 | }; | 763 | err = -ENOTTY; |
764 | } | ||
759 | 765 | ||
760 | return err; | 766 | return err; |
761 | } | 767 | } |
@@ -773,6 +779,7 @@ static int pppoe_sendmsg(struct kiocb *iocb, struct socket *sock, | |||
773 | struct net_device *dev; | 779 | struct net_device *dev; |
774 | char *start; | 780 | char *start; |
775 | 781 | ||
782 | lock_sock(sk); | ||
776 | if (sock_flag(sk, SOCK_DEAD) || !(sk->sk_state & PPPOX_CONNECTED)) { | 783 | if (sock_flag(sk, SOCK_DEAD) || !(sk->sk_state & PPPOX_CONNECTED)) { |
777 | error = -ENOTCONN; | 784 | error = -ENOTCONN; |
778 | goto end; | 785 | goto end; |
@@ -783,8 +790,6 @@ static int pppoe_sendmsg(struct kiocb *iocb, struct socket *sock, | |||
783 | hdr.code = 0; | 790 | hdr.code = 0; |
784 | hdr.sid = po->num; | 791 | hdr.sid = po->num; |
785 | 792 | ||
786 | lock_sock(sk); | ||
787 | |||
788 | dev = po->pppoe_dev; | 793 | dev = po->pppoe_dev; |
789 | 794 | ||
790 | error = -EMSGSIZE; | 795 | error = -EMSGSIZE; |
diff --git a/drivers/net/pppox.c b/drivers/net/pppox.c index f3e47d0c2b3c..25c52b55c38f 100644 --- a/drivers/net/pppox.c +++ b/drivers/net/pppox.c | |||
@@ -73,7 +73,7 @@ int pppox_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) | |||
73 | { | 73 | { |
74 | struct sock *sk = sock->sk; | 74 | struct sock *sk = sock->sk; |
75 | struct pppox_sock *po = pppox_sk(sk); | 75 | struct pppox_sock *po = pppox_sk(sk); |
76 | int rc = 0; | 76 | int rc; |
77 | 77 | ||
78 | lock_sock(sk); | 78 | lock_sock(sk); |
79 | 79 | ||
@@ -94,12 +94,9 @@ int pppox_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) | |||
94 | break; | 94 | break; |
95 | } | 95 | } |
96 | default: | 96 | default: |
97 | if (pppox_protos[sk->sk_protocol]->ioctl) | 97 | rc = pppox_protos[sk->sk_protocol]->ioctl ? |
98 | rc = pppox_protos[sk->sk_protocol]->ioctl(sock, cmd, | 98 | pppox_protos[sk->sk_protocol]->ioctl(sock, cmd, arg) : -ENOTTY; |
99 | arg); | 99 | } |
100 | |||
101 | break; | ||
102 | }; | ||
103 | 100 | ||
104 | release_sock(sk); | 101 | release_sock(sk); |
105 | return rc; | 102 | return rc; |
diff --git a/drivers/net/qla3xxx.c b/drivers/net/qla3xxx.c index 8be8be451ada..69da95b5ad0c 100755 --- a/drivers/net/qla3xxx.c +++ b/drivers/net/qla3xxx.c | |||
@@ -1904,7 +1904,6 @@ static void ql_get_pauseparam(struct net_device *ndev, | |||
1904 | static const struct ethtool_ops ql3xxx_ethtool_ops = { | 1904 | static const struct ethtool_ops ql3xxx_ethtool_ops = { |
1905 | .get_settings = ql_get_settings, | 1905 | .get_settings = ql_get_settings, |
1906 | .get_drvinfo = ql_get_drvinfo, | 1906 | .get_drvinfo = ql_get_drvinfo, |
1907 | .get_perm_addr = ethtool_op_get_perm_addr, | ||
1908 | .get_link = ethtool_op_get_link, | 1907 | .get_link = ethtool_op_get_link, |
1909 | .get_msglevel = ql_get_msglevel, | 1908 | .get_msglevel = ql_get_msglevel, |
1910 | .set_msglevel = ql_set_msglevel, | 1909 | .set_msglevel = ql_set_msglevel, |
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index 631e55dbbdd0..b85ab4a8f2a3 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c | |||
@@ -1072,7 +1072,6 @@ static const struct ethtool_ops rtl8169_ethtool_ops = { | |||
1072 | .get_strings = rtl8169_get_strings, | 1072 | .get_strings = rtl8169_get_strings, |
1073 | .get_stats_count = rtl8169_get_stats_count, | 1073 | .get_stats_count = rtl8169_get_stats_count, |
1074 | .get_ethtool_stats = rtl8169_get_ethtool_stats, | 1074 | .get_ethtool_stats = rtl8169_get_ethtool_stats, |
1075 | .get_perm_addr = ethtool_op_get_perm_addr, | ||
1076 | }; | 1075 | }; |
1077 | 1076 | ||
1078 | static void rtl8169_write_gmii_reg_bit(void __iomem *ioaddr, int reg, | 1077 | static void rtl8169_write_gmii_reg_bit(void __iomem *ioaddr, int reg, |
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c index 2be0a0f1b48f..24feb00600ee 100644 --- a/drivers/net/s2io.c +++ b/drivers/net/s2io.c | |||
@@ -2430,7 +2430,7 @@ static int fill_rx_buffers(struct s2io_nic *nic, int ring_no) | |||
2430 | (rxdp3->Buffer1_ptr == DMA_ERROR_CODE)) { | 2430 | (rxdp3->Buffer1_ptr == DMA_ERROR_CODE)) { |
2431 | pci_unmap_single | 2431 | pci_unmap_single |
2432 | (nic->pdev, | 2432 | (nic->pdev, |
2433 | (dma_addr_t)skb->data, | 2433 | (dma_addr_t)rxdp3->Buffer2_ptr, |
2434 | dev->mtu + 4, | 2434 | dev->mtu + 4, |
2435 | PCI_DMA_FROMDEVICE); | 2435 | PCI_DMA_FROMDEVICE); |
2436 | goto pci_map_failed; | 2436 | goto pci_map_failed; |
@@ -6211,7 +6211,7 @@ static int set_rxd_buffer_pointer(struct s2io_nic *sp, struct RxD_t *rxdp, | |||
6211 | if( (rxdp3->Buffer0_ptr == 0) || | 6211 | if( (rxdp3->Buffer0_ptr == 0) || |
6212 | (rxdp3->Buffer0_ptr == DMA_ERROR_CODE)) { | 6212 | (rxdp3->Buffer0_ptr == DMA_ERROR_CODE)) { |
6213 | pci_unmap_single (sp->pdev, | 6213 | pci_unmap_single (sp->pdev, |
6214 | (dma_addr_t)(*skb)->data, | 6214 | (dma_addr_t)rxdp3->Buffer2_ptr, |
6215 | dev->mtu + 4, PCI_DMA_FROMDEVICE); | 6215 | dev->mtu + 4, PCI_DMA_FROMDEVICE); |
6216 | goto memalloc_failed; | 6216 | goto memalloc_failed; |
6217 | } | 6217 | } |
@@ -6224,7 +6224,10 @@ static int set_rxd_buffer_pointer(struct s2io_nic *sp, struct RxD_t *rxdp, | |||
6224 | if( (rxdp3->Buffer1_ptr == 0) || | 6224 | if( (rxdp3->Buffer1_ptr == 0) || |
6225 | (rxdp3->Buffer1_ptr == DMA_ERROR_CODE)) { | 6225 | (rxdp3->Buffer1_ptr == DMA_ERROR_CODE)) { |
6226 | pci_unmap_single (sp->pdev, | 6226 | pci_unmap_single (sp->pdev, |
6227 | (dma_addr_t)(*skb)->data, | 6227 | (dma_addr_t)rxdp3->Buffer0_ptr, |
6228 | BUF0_LEN, PCI_DMA_FROMDEVICE); | ||
6229 | pci_unmap_single (sp->pdev, | ||
6230 | (dma_addr_t)rxdp3->Buffer2_ptr, | ||
6228 | dev->mtu + 4, PCI_DMA_FROMDEVICE); | 6231 | dev->mtu + 4, PCI_DMA_FROMDEVICE); |
6229 | goto memalloc_failed; | 6232 | goto memalloc_failed; |
6230 | } | 6233 | } |
diff --git a/drivers/net/sc92031.c b/drivers/net/sc92031.c index 5b7284c955dc..872cb1cc9c41 100644 --- a/drivers/net/sc92031.c +++ b/drivers/net/sc92031.c | |||
@@ -1402,7 +1402,6 @@ static struct ethtool_ops sc92031_ethtool_ops = { | |||
1402 | .get_strings = sc92031_ethtool_get_strings, | 1402 | .get_strings = sc92031_ethtool_get_strings, |
1403 | .get_stats_count = sc92031_ethtool_get_stats_count, | 1403 | .get_stats_count = sc92031_ethtool_get_stats_count, |
1404 | .get_ethtool_stats = sc92031_ethtool_get_ethtool_stats, | 1404 | .get_ethtool_stats = sc92031_ethtool_get_ethtool_stats, |
1405 | .get_perm_addr = ethtool_op_get_perm_addr, | ||
1406 | .get_ufo = ethtool_op_get_ufo, | 1405 | .get_ufo = ethtool_op_get_ufo, |
1407 | }; | 1406 | }; |
1408 | 1407 | ||
diff --git a/drivers/net/sis190.c b/drivers/net/sis190.c index ec2ad9f0efa2..d470b19c0810 100644 --- a/drivers/net/sis190.c +++ b/drivers/net/sis190.c | |||
@@ -1593,6 +1593,9 @@ static int __devinit sis190_get_mac_addr_from_apc(struct pci_dev *pdev, | |||
1593 | pci_name(pdev)); | 1593 | pci_name(pdev)); |
1594 | 1594 | ||
1595 | isa_bridge = pci_get_device(PCI_VENDOR_ID_SI, 0x0965, NULL); | 1595 | isa_bridge = pci_get_device(PCI_VENDOR_ID_SI, 0x0965, NULL); |
1596 | if (!isa_bridge) | ||
1597 | isa_bridge = pci_get_device(PCI_VENDOR_ID_SI, 0x0966, NULL); | ||
1598 | |||
1596 | if (!isa_bridge) { | 1599 | if (!isa_bridge) { |
1597 | net_probe(tp, KERN_INFO "%s: Can not find ISA bridge.\n", | 1600 | net_probe(tp, KERN_INFO "%s: Can not find ISA bridge.\n", |
1598 | pci_name(pdev)); | 1601 | pci_name(pdev)); |
diff --git a/drivers/net/skfp/pmf.c b/drivers/net/skfp/pmf.c index efc639c013fd..ea85de918233 100644 --- a/drivers/net/skfp/pmf.c +++ b/drivers/net/skfp/pmf.c | |||
@@ -575,7 +575,7 @@ void smt_add_para(struct s_smc *smc, struct s_pcon *pcon, u_short para, | |||
575 | int sp_len ; | 575 | int sp_len ; |
576 | 576 | ||
577 | /* | 577 | /* |
578 | * skip if errror | 578 | * skip if error |
579 | */ | 579 | */ |
580 | if (pcon->pc_err) | 580 | if (pcon->pc_err) |
581 | return ; | 581 | return ; |
diff --git a/drivers/net/skge.c b/drivers/net/skge.c index 776692946562..e3d8520209b8 100644 --- a/drivers/net/skge.c +++ b/drivers/net/skge.c | |||
@@ -821,7 +821,6 @@ static const struct ethtool_ops skge_ethtool_ops = { | |||
821 | .phys_id = skge_phys_id, | 821 | .phys_id = skge_phys_id, |
822 | .get_stats_count = skge_get_stats_count, | 822 | .get_stats_count = skge_get_stats_count, |
823 | .get_ethtool_stats = skge_get_ethtool_stats, | 823 | .get_ethtool_stats = skge_get_ethtool_stats, |
824 | .get_perm_addr = ethtool_op_get_perm_addr, | ||
825 | }; | 824 | }; |
826 | 825 | ||
827 | /* | 826 | /* |
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index 13f08a390e1f..e7a2eadcc3b0 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c | |||
@@ -3548,7 +3548,6 @@ static const struct ethtool_ops sky2_ethtool_ops = { | |||
3548 | .phys_id = sky2_phys_id, | 3548 | .phys_id = sky2_phys_id, |
3549 | .get_stats_count = sky2_get_stats_count, | 3549 | .get_stats_count = sky2_get_stats_count, |
3550 | .get_ethtool_stats = sky2_get_ethtool_stats, | 3550 | .get_ethtool_stats = sky2_get_ethtool_stats, |
3551 | .get_perm_addr = ethtool_op_get_perm_addr, | ||
3552 | }; | 3551 | }; |
3553 | 3552 | ||
3554 | #ifdef CONFIG_SKY2_DEBUG | 3553 | #ifdef CONFIG_SKY2_DEBUG |
diff --git a/drivers/net/smc91x.h b/drivers/net/smc91x.h index f8429449dc1e..6ff3a1627af8 100644 --- a/drivers/net/smc91x.h +++ b/drivers/net/smc91x.h | |||
@@ -299,7 +299,7 @@ SMC_outw(u16 val, void __iomem *ioaddr, int reg) | |||
299 | 299 | ||
300 | #define SMC_CAN_USE_8BIT 1 | 300 | #define SMC_CAN_USE_8BIT 1 |
301 | #define SMC_CAN_USE_16BIT 1 | 301 | #define SMC_CAN_USE_16BIT 1 |
302 | #define SMC_CAN_USE_32BIT 1 | 302 | #define SMC_CAN_USE_32BIT 0 |
303 | 303 | ||
304 | #define SMC_inb(a, r) inb((a) + (r)) | 304 | #define SMC_inb(a, r) inb((a) + (r)) |
305 | #define SMC_inw(a, r) inw((a) + (r)) | 305 | #define SMC_inw(a, r) inw((a) + (r)) |
@@ -310,8 +310,6 @@ SMC_outw(u16 val, void __iomem *ioaddr, int reg) | |||
310 | 310 | ||
311 | #endif /* BOARDS */ | 311 | #endif /* BOARDS */ |
312 | 312 | ||
313 | #define set_irq_type(irq, type) do {} while (0) | ||
314 | |||
315 | #elif defined(CONFIG_M32R) | 313 | #elif defined(CONFIG_M32R) |
316 | 314 | ||
317 | #define SMC_CAN_USE_8BIT 0 | 315 | #define SMC_CAN_USE_8BIT 0 |
diff --git a/drivers/net/sundance.c b/drivers/net/sundance.c index af0c9831074c..a8f2af8f778a 100644 --- a/drivers/net/sundance.c +++ b/drivers/net/sundance.c | |||
@@ -1586,7 +1586,6 @@ static const struct ethtool_ops ethtool_ops = { | |||
1586 | .get_link = get_link, | 1586 | .get_link = get_link, |
1587 | .get_msglevel = get_msglevel, | 1587 | .get_msglevel = get_msglevel, |
1588 | .set_msglevel = set_msglevel, | 1588 | .set_msglevel = set_msglevel, |
1589 | .get_perm_addr = ethtool_op_get_perm_addr, | ||
1590 | }; | 1589 | }; |
1591 | 1590 | ||
1592 | static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) | 1591 | static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) |
diff --git a/drivers/net/sunlance.c b/drivers/net/sunlance.c index 053b7cb0d944..68e4f660367d 100644 --- a/drivers/net/sunlance.c +++ b/drivers/net/sunlance.c | |||
@@ -99,8 +99,7 @@ static char lancestr[] = "LANCE"; | |||
99 | #include <asm/byteorder.h> /* Used by the checksum routines */ | 99 | #include <asm/byteorder.h> /* Used by the checksum routines */ |
100 | #include <asm/idprom.h> | 100 | #include <asm/idprom.h> |
101 | #include <asm/sbus.h> | 101 | #include <asm/sbus.h> |
102 | #include <asm/openprom.h> | 102 | #include <asm/prom.h> |
103 | #include <asm/oplib.h> | ||
104 | #include <asm/auxio.h> /* For tpe-link-test? setting */ | 103 | #include <asm/auxio.h> /* For tpe-link-test? setting */ |
105 | #include <asm/irq.h> | 104 | #include <asm/irq.h> |
106 | 105 | ||
@@ -1326,6 +1325,7 @@ static int __devinit sparc_lance_probe_one(struct sbus_dev *sdev, | |||
1326 | struct sbus_dev *lebuffer) | 1325 | struct sbus_dev *lebuffer) |
1327 | { | 1326 | { |
1328 | static unsigned version_printed; | 1327 | static unsigned version_printed; |
1328 | struct device_node *dp = sdev->ofdev.node; | ||
1329 | struct net_device *dev; | 1329 | struct net_device *dev; |
1330 | struct lance_private *lp; | 1330 | struct lance_private *lp; |
1331 | int i; | 1331 | int i; |
@@ -1389,54 +1389,46 @@ static int __devinit sparc_lance_probe_one(struct sbus_dev *sdev, | |||
1389 | lp->rx = lance_rx_dvma; | 1389 | lp->rx = lance_rx_dvma; |
1390 | lp->tx = lance_tx_dvma; | 1390 | lp->tx = lance_tx_dvma; |
1391 | } | 1391 | } |
1392 | lp->busmaster_regval = prom_getintdefault(sdev->prom_node, | 1392 | lp->busmaster_regval = of_getintprop_default(dp, "busmaster-regval", |
1393 | "busmaster-regval", | 1393 | (LE_C3_BSWP | |
1394 | (LE_C3_BSWP | LE_C3_ACON | | 1394 | LE_C3_ACON | |
1395 | LE_C3_BCON)); | 1395 | LE_C3_BCON)); |
1396 | 1396 | ||
1397 | lp->name = lancestr; | 1397 | lp->name = lancestr; |
1398 | lp->ledma = ledma; | 1398 | lp->ledma = ledma; |
1399 | 1399 | ||
1400 | lp->burst_sizes = 0; | 1400 | lp->burst_sizes = 0; |
1401 | if (lp->ledma) { | 1401 | if (lp->ledma) { |
1402 | char prop[6]; | 1402 | struct device_node *ledma_dp = ledma->sdev->ofdev.node; |
1403 | const char *prop; | ||
1403 | unsigned int sbmask; | 1404 | unsigned int sbmask; |
1404 | u32 csr; | 1405 | u32 csr; |
1405 | 1406 | ||
1406 | /* Find burst-size property for ledma */ | 1407 | /* Find burst-size property for ledma */ |
1407 | lp->burst_sizes = prom_getintdefault(ledma->sdev->prom_node, | 1408 | lp->burst_sizes = of_getintprop_default(ledma_dp, |
1408 | "burst-sizes", 0); | 1409 | "burst-sizes", 0); |
1409 | 1410 | ||
1410 | /* ledma may be capable of fast bursts, but sbus may not. */ | 1411 | /* ledma may be capable of fast bursts, but sbus may not. */ |
1411 | sbmask = prom_getintdefault(ledma->sdev->bus->prom_node, | 1412 | sbmask = of_getintprop_default(ledma_dp, "burst-sizes", |
1412 | "burst-sizes", DMA_BURSTBITS); | 1413 | DMA_BURSTBITS); |
1413 | lp->burst_sizes &= sbmask; | 1414 | lp->burst_sizes &= sbmask; |
1414 | 1415 | ||
1415 | /* Get the cable-selection property */ | 1416 | /* Get the cable-selection property */ |
1416 | memset(prop, 0, sizeof(prop)); | 1417 | prop = of_get_property(ledma_dp, "cable-selection", NULL); |
1417 | prom_getstring(ledma->sdev->prom_node, "cable-selection", | 1418 | if (!prop || prop[0] == '\0') { |
1418 | prop, sizeof(prop)); | 1419 | struct device_node *nd; |
1419 | if (prop[0] == 0) { | ||
1420 | int topnd, nd; | ||
1421 | 1420 | ||
1422 | printk(KERN_INFO "SunLance: using auto-carrier-detection.\n"); | 1421 | printk(KERN_INFO "SunLance: using " |
1422 | "auto-carrier-detection.\n"); | ||
1423 | 1423 | ||
1424 | /* Is this found at /options .attributes in all | 1424 | nd = of_find_node_by_path("/options"); |
1425 | * Prom versions? XXX | ||
1426 | */ | ||
1427 | topnd = prom_getchild(prom_root_node); | ||
1428 | |||
1429 | nd = prom_searchsiblings(topnd, "options"); | ||
1430 | if (!nd) | 1425 | if (!nd) |
1431 | goto no_link_test; | 1426 | goto no_link_test; |
1432 | 1427 | ||
1433 | if (!prom_node_has_property(nd, "tpe-link-test?")) | 1428 | prop = of_get_property(nd, "tpe-link-test?", NULL); |
1429 | if (!prop) | ||
1434 | goto no_link_test; | 1430 | goto no_link_test; |
1435 | 1431 | ||
1436 | memset(prop, 0, sizeof(prop)); | ||
1437 | prom_getstring(nd, "tpe-link-test?", prop, | ||
1438 | sizeof(prop)); | ||
1439 | |||
1440 | if (strcmp(prop, "true")) { | 1432 | if (strcmp(prop, "true")) { |
1441 | printk(KERN_NOTICE "SunLance: warning: overriding option " | 1433 | printk(KERN_NOTICE "SunLance: warning: overriding option " |
1442 | "'tpe-link-test?'\n"); | 1434 | "'tpe-link-test?'\n"); |
diff --git a/drivers/net/sunvnet.c b/drivers/net/sunvnet.c index 61f98251feab..ff1028a597df 100644 --- a/drivers/net/sunvnet.c +++ b/drivers/net/sunvnet.c | |||
@@ -906,7 +906,6 @@ static const struct ethtool_ops vnet_ethtool_ops = { | |||
906 | .get_msglevel = vnet_get_msglevel, | 906 | .get_msglevel = vnet_get_msglevel, |
907 | .set_msglevel = vnet_set_msglevel, | 907 | .set_msglevel = vnet_set_msglevel, |
908 | .get_link = ethtool_op_get_link, | 908 | .get_link = ethtool_op_get_link, |
909 | .get_perm_addr = ethtool_op_get_perm_addr, | ||
910 | }; | 909 | }; |
911 | 910 | ||
912 | static void vnet_port_free_tx_bufs(struct vnet_port *port) | 911 | static void vnet_port_free_tx_bufs(struct vnet_port *port) |
diff --git a/drivers/net/tc35815.c b/drivers/net/tc35815.c index 7f94ca930988..ec41469eee82 100644 --- a/drivers/net/tc35815.c +++ b/drivers/net/tc35815.c | |||
@@ -2198,7 +2198,6 @@ static const struct ethtool_ops tc35815_ethtool_ops = { | |||
2198 | .get_strings = tc35815_get_strings, | 2198 | .get_strings = tc35815_get_strings, |
2199 | .get_stats_count = tc35815_get_stats_count, | 2199 | .get_stats_count = tc35815_get_stats_count, |
2200 | .get_ethtool_stats = tc35815_get_ethtool_stats, | 2200 | .get_ethtool_stats = tc35815_get_ethtool_stats, |
2201 | .get_perm_addr = ethtool_op_get_perm_addr, | ||
2202 | }; | 2201 | }; |
2203 | 2202 | ||
2204 | static int tc35815_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) | 2203 | static int tc35815_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) |
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 887b9a5cfe48..58740428dd07 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -64,8 +64,8 @@ | |||
64 | 64 | ||
65 | #define DRV_MODULE_NAME "tg3" | 65 | #define DRV_MODULE_NAME "tg3" |
66 | #define PFX DRV_MODULE_NAME ": " | 66 | #define PFX DRV_MODULE_NAME ": " |
67 | #define DRV_MODULE_VERSION "3.79" | 67 | #define DRV_MODULE_VERSION "3.80" |
68 | #define DRV_MODULE_RELDATE "July 18, 2007" | 68 | #define DRV_MODULE_RELDATE "August 2, 2007" |
69 | 69 | ||
70 | #define TG3_DEF_MAC_MODE 0 | 70 | #define TG3_DEF_MAC_MODE 0 |
71 | #define TG3_DEF_RX_MODE 0 | 71 | #define TG3_DEF_RX_MODE 0 |
@@ -9294,7 +9294,6 @@ static const struct ethtool_ops tg3_ethtool_ops = { | |||
9294 | .get_ethtool_stats = tg3_get_ethtool_stats, | 9294 | .get_ethtool_stats = tg3_get_ethtool_stats, |
9295 | .get_coalesce = tg3_get_coalesce, | 9295 | .get_coalesce = tg3_get_coalesce, |
9296 | .set_coalesce = tg3_set_coalesce, | 9296 | .set_coalesce = tg3_set_coalesce, |
9297 | .get_perm_addr = ethtool_op_get_perm_addr, | ||
9298 | }; | 9297 | }; |
9299 | 9298 | ||
9300 | static void __devinit tg3_get_eeprom_size(struct tg3 *tp) | 9299 | static void __devinit tg3_get_eeprom_size(struct tg3 *tp) |
@@ -12112,6 +12111,12 @@ static int tg3_suspend(struct pci_dev *pdev, pm_message_t state) | |||
12112 | struct tg3 *tp = netdev_priv(dev); | 12111 | struct tg3 *tp = netdev_priv(dev); |
12113 | int err; | 12112 | int err; |
12114 | 12113 | ||
12114 | /* PCI register 4 needs to be saved whether netif_running() or not. | ||
12115 | * MSI address and data need to be saved if using MSI and | ||
12116 | * netif_running(). | ||
12117 | */ | ||
12118 | pci_save_state(pdev); | ||
12119 | |||
12115 | if (!netif_running(dev)) | 12120 | if (!netif_running(dev)) |
12116 | return 0; | 12121 | return 0; |
12117 | 12122 | ||
@@ -12131,9 +12136,6 @@ static int tg3_suspend(struct pci_dev *pdev, pm_message_t state) | |||
12131 | tp->tg3_flags &= ~TG3_FLAG_INIT_COMPLETE; | 12136 | tp->tg3_flags &= ~TG3_FLAG_INIT_COMPLETE; |
12132 | tg3_full_unlock(tp); | 12137 | tg3_full_unlock(tp); |
12133 | 12138 | ||
12134 | /* Save MSI address and data for resume. */ | ||
12135 | pci_save_state(pdev); | ||
12136 | |||
12137 | err = tg3_set_power_state(tp, pci_choose_state(pdev, state)); | 12139 | err = tg3_set_power_state(tp, pci_choose_state(pdev, state)); |
12138 | if (err) { | 12140 | if (err) { |
12139 | tg3_full_lock(tp, 0); | 12141 | tg3_full_lock(tp, 0); |
@@ -12161,11 +12163,11 @@ static int tg3_resume(struct pci_dev *pdev) | |||
12161 | struct tg3 *tp = netdev_priv(dev); | 12163 | struct tg3 *tp = netdev_priv(dev); |
12162 | int err; | 12164 | int err; |
12163 | 12165 | ||
12166 | pci_restore_state(tp->pdev); | ||
12167 | |||
12164 | if (!netif_running(dev)) | 12168 | if (!netif_running(dev)) |
12165 | return 0; | 12169 | return 0; |
12166 | 12170 | ||
12167 | pci_restore_state(tp->pdev); | ||
12168 | |||
12169 | err = tg3_set_power_state(tp, PCI_D0); | 12171 | err = tg3_set_power_state(tp, PCI_D0); |
12170 | if (err) | 12172 | if (err) |
12171 | return err; | 12173 | return err; |
diff --git a/drivers/net/tulip/tulip_core.c b/drivers/net/tulip/tulip_core.c index f87d76981ab7..eca984f89bbf 100644 --- a/drivers/net/tulip/tulip_core.c +++ b/drivers/net/tulip/tulip_core.c | |||
@@ -1471,14 +1471,6 @@ static int __devinit tulip_init_one (struct pci_dev *pdev, | |||
1471 | sa_offset = 2; /* Grrr, damn Matrox boards. */ | 1471 | sa_offset = 2; /* Grrr, damn Matrox boards. */ |
1472 | multiport_cnt = 4; | 1472 | multiport_cnt = 4; |
1473 | } | 1473 | } |
1474 | #ifdef CONFIG_DDB5477 | ||
1475 | if ((pdev->bus->number == 0) && (PCI_SLOT(pdev->devfn) == 4)) { | ||
1476 | /* DDB5477 MAC address in first EEPROM locations. */ | ||
1477 | sa_offset = 0; | ||
1478 | /* No media table either */ | ||
1479 | tp->flags &= ~HAS_MEDIA_TABLE; | ||
1480 | } | ||
1481 | #endif | ||
1482 | #ifdef CONFIG_MIPS_COBALT | 1474 | #ifdef CONFIG_MIPS_COBALT |
1483 | if ((pdev->bus->number == 0) && | 1475 | if ((pdev->bus->number == 0) && |
1484 | ((PCI_SLOT(pdev->devfn) == 7) || | 1476 | ((PCI_SLOT(pdev->devfn) == 7) || |
diff --git a/drivers/net/ucc_geth_ethtool.c b/drivers/net/ucc_geth_ethtool.c index a8994c7b8583..64bef7c12365 100644 --- a/drivers/net/ucc_geth_ethtool.c +++ b/drivers/net/ucc_geth_ethtool.c | |||
@@ -379,7 +379,6 @@ static const struct ethtool_ops uec_ethtool_ops = { | |||
379 | .get_stats_count = uec_get_stats_count, | 379 | .get_stats_count = uec_get_stats_count, |
380 | .get_strings = uec_get_strings, | 380 | .get_strings = uec_get_strings, |
381 | .get_ethtool_stats = uec_get_ethtool_stats, | 381 | .get_ethtool_stats = uec_get_ethtool_stats, |
382 | .get_perm_addr = ethtool_op_get_perm_addr, | ||
383 | }; | 382 | }; |
384 | 383 | ||
385 | void uec_set_ethtool_ops(struct net_device *netdev) | 384 | void uec_set_ethtool_ops(struct net_device *netdev) |
diff --git a/drivers/net/ucc_geth_mii.c b/drivers/net/ucc_geth_mii.c index 5f8c2d30a328..6c257b88ce51 100644 --- a/drivers/net/ucc_geth_mii.c +++ b/drivers/net/ucc_geth_mii.c | |||
@@ -272,7 +272,8 @@ int __init uec_mdio_init(void) | |||
272 | return of_register_platform_driver(&uec_mdio_driver); | 272 | return of_register_platform_driver(&uec_mdio_driver); |
273 | } | 273 | } |
274 | 274 | ||
275 | void __exit uec_mdio_exit(void) | 275 | /* called from __init ucc_geth_init, therefore can not be __exit */ |
276 | void uec_mdio_exit(void) | ||
276 | { | 277 | { |
277 | of_unregister_platform_driver(&uec_mdio_driver); | 278 | of_unregister_platform_driver(&uec_mdio_driver); |
278 | } | 279 | } |
diff --git a/drivers/net/via-rhine.c b/drivers/net/via-rhine.c index f51c2c138f10..c3fe230695a0 100644 --- a/drivers/net/via-rhine.c +++ b/drivers/net/via-rhine.c | |||
@@ -1805,7 +1805,6 @@ static const struct ethtool_ops netdev_ethtool_ops = { | |||
1805 | .set_wol = rhine_set_wol, | 1805 | .set_wol = rhine_set_wol, |
1806 | .get_sg = ethtool_op_get_sg, | 1806 | .get_sg = ethtool_op_get_sg, |
1807 | .get_tx_csum = ethtool_op_get_tx_csum, | 1807 | .get_tx_csum = ethtool_op_get_tx_csum, |
1808 | .get_perm_addr = ethtool_op_get_perm_addr, | ||
1809 | }; | 1808 | }; |
1810 | 1809 | ||
1811 | static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) | 1810 | static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) |
diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c index f331843d1102..93574add4063 100644 --- a/drivers/net/via-velocity.c +++ b/drivers/net/via-velocity.c | |||
@@ -1613,7 +1613,7 @@ static void velocity_error(struct velocity_info *vptr, int status) | |||
1613 | if (status & ISR_TXSTLI) { | 1613 | if (status & ISR_TXSTLI) { |
1614 | struct mac_regs __iomem * regs = vptr->mac_regs; | 1614 | struct mac_regs __iomem * regs = vptr->mac_regs; |
1615 | 1615 | ||
1616 | printk(KERN_ERR "TD structure errror TDindex=%hx\n", readw(®s->TDIdx[0])); | 1616 | printk(KERN_ERR "TD structure error TDindex=%hx\n", readw(®s->TDIdx[0])); |
1617 | BYTE_REG_BITS_ON(TXESR_TDSTR, ®s->TXESR); | 1617 | BYTE_REG_BITS_ON(TXESR_TDSTR, ®s->TXESR); |
1618 | writew(TRDCSR_RUN, ®s->TDCSRClr); | 1618 | writew(TRDCSR_RUN, ®s->TDCSRClr); |
1619 | netif_stop_queue(vptr->dev); | 1619 | netif_stop_queue(vptr->dev); |
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_phy.c b/drivers/net/wireless/bcm43xx/bcm43xx_phy.c index d779199c30d0..b37f1e348700 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_phy.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_phy.c | |||
@@ -1638,7 +1638,7 @@ void bcm43xx_phy_set_baseband_attenuation(struct bcm43xx_private *bcm, | |||
1638 | return; | 1638 | return; |
1639 | } | 1639 | } |
1640 | 1640 | ||
1641 | if (phy->analog == 1) { | 1641 | if (phy->analog > 1) { |
1642 | value = bcm43xx_phy_read(bcm, 0x0060) & ~0x003C; | 1642 | value = bcm43xx_phy_read(bcm, 0x0060) & ~0x003C; |
1643 | value |= (baseband_attenuation << 2) & 0x003C; | 1643 | value |= (baseband_attenuation << 2) & 0x003C; |
1644 | } else { | 1644 | } else { |
diff --git a/drivers/net/wireless/rtl8187_dev.c b/drivers/net/wireless/rtl8187_dev.c index cea85894b7f2..e61c6d5ba1a9 100644 --- a/drivers/net/wireless/rtl8187_dev.c +++ b/drivers/net/wireless/rtl8187_dev.c | |||
@@ -466,7 +466,7 @@ static int rtl8187_add_interface(struct ieee80211_hw *dev, | |||
466 | return -EOPNOTSUPP; | 466 | return -EOPNOTSUPP; |
467 | } | 467 | } |
468 | 468 | ||
469 | priv->hwaddr = conf->mac_addr; | 469 | priv->hwaddr = conf->mac_addr ? conf->mac_addr : dev->wiphy->perm_addr; |
470 | 470 | ||
471 | return 0; | 471 | return 0; |
472 | } | 472 | } |
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c index f6c487aa8246..26869d107e52 100644 --- a/drivers/net/wireless/zd1211rw/zd_mac.c +++ b/drivers/net/wireless/zd1211rw/zd_mac.c | |||
@@ -822,7 +822,7 @@ static void cs_set_control(struct zd_mac *mac, struct zd_ctrlset *cs, | |||
822 | cs->control |= ZD_CS_MULTICAST; | 822 | cs->control |= ZD_CS_MULTICAST; |
823 | 823 | ||
824 | /* PS-POLL */ | 824 | /* PS-POLL */ |
825 | if (stype == IEEE80211_STYPE_PSPOLL) | 825 | if (ftype == IEEE80211_FTYPE_CTL && stype == IEEE80211_STYPE_PSPOLL) |
826 | cs->control |= ZD_CS_PS_POLL_FRAME; | 826 | cs->control |= ZD_CS_PS_POLL_FRAME; |
827 | 827 | ||
828 | /* Unicast data frames over the threshold should have RTS */ | 828 | /* Unicast data frames over the threshold should have RTS */ |