diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-05-18 12:13:33 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-05-18 12:13:33 -0400 |
commit | 16ee6576e25b83806d26eb771138249fcfb5eddc (patch) | |
tree | 7c717b80f28b5c59ba673dc00f2ca9bd0fc068d4 /drivers/net/ethernet | |
parent | 16fa7e8200fb9066b77a3f27cbed8e4a9fc71998 (diff) | |
parent | 9b63776fa3ca96c4ecda76f6fa947b7b0add66ac (diff) |
Merge remote-tracking branch 'tip/perf/urgent' into perf/core
Merge reason: We are going to queue up a dependent patch:
"perf tools: Move parse event automated tests to separated object"
That depends on:
commit e7c72d8
perf tools: Add 'G' and 'H' modifiers to event parsing
Conflicts:
tools/perf/builtin-stat.c
Conflicted with the recent 'perf_target' patches when checking the
result of perf_evsel open routines to see if a retry is needed to cope
with older kernels where the exclude guest/host perf_event_attr bits
were not used.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r-- | drivers/net/ethernet/atheros/atlx/atl1.c | 12 | ||||
-rw-r--r-- | drivers/net/ethernet/atheros/atlx/atl1.h | 3 | ||||
-rw-r--r-- | drivers/net/ethernet/atheros/atlx/atlx.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c | 12 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/e1000e/ich8lan.c | 15 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c | 10 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 20 | ||||
-rw-r--r-- | drivers/net/ethernet/micrel/ks8851.c | 21 | ||||
-rw-r--r-- | drivers/net/ethernet/micrel/ks8851_mll.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/micrel/ksz884x.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/realtek/8139cp.c | 10 | ||||
-rw-r--r-- | drivers/net/ethernet/smsc/smsc911x.c | 17 | ||||
-rw-r--r-- | drivers/net/ethernet/ti/davinci_mdio.c | 5 | ||||
-rw-r--r-- | drivers/net/ethernet/xilinx/xilinx_axienet.h | 4 | ||||
-rw-r--r-- | drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 6 | ||||
-rw-r--r-- | drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c | 6 |
16 files changed, 84 insertions, 63 deletions
diff --git a/drivers/net/ethernet/atheros/atlx/atl1.c b/drivers/net/ethernet/atheros/atlx/atl1.c index 40ac41436549..c926857e8205 100644 --- a/drivers/net/ethernet/atheros/atlx/atl1.c +++ b/drivers/net/ethernet/atheros/atlx/atl1.c | |||
@@ -2476,7 +2476,7 @@ static irqreturn_t atl1_intr(int irq, void *data) | |||
2476 | "pcie phy link down %x\n", status); | 2476 | "pcie phy link down %x\n", status); |
2477 | if (netif_running(adapter->netdev)) { /* reset MAC */ | 2477 | if (netif_running(adapter->netdev)) { /* reset MAC */ |
2478 | iowrite32(0, adapter->hw.hw_addr + REG_IMR); | 2478 | iowrite32(0, adapter->hw.hw_addr + REG_IMR); |
2479 | schedule_work(&adapter->pcie_dma_to_rst_task); | 2479 | schedule_work(&adapter->reset_dev_task); |
2480 | return IRQ_HANDLED; | 2480 | return IRQ_HANDLED; |
2481 | } | 2481 | } |
2482 | } | 2482 | } |
@@ -2488,7 +2488,7 @@ static irqreturn_t atl1_intr(int irq, void *data) | |||
2488 | "pcie DMA r/w error (status = 0x%x)\n", | 2488 | "pcie DMA r/w error (status = 0x%x)\n", |
2489 | status); | 2489 | status); |
2490 | iowrite32(0, adapter->hw.hw_addr + REG_IMR); | 2490 | iowrite32(0, adapter->hw.hw_addr + REG_IMR); |
2491 | schedule_work(&adapter->pcie_dma_to_rst_task); | 2491 | schedule_work(&adapter->reset_dev_task); |
2492 | return IRQ_HANDLED; | 2492 | return IRQ_HANDLED; |
2493 | } | 2493 | } |
2494 | 2494 | ||
@@ -2633,10 +2633,10 @@ static void atl1_down(struct atl1_adapter *adapter) | |||
2633 | atl1_clean_rx_ring(adapter); | 2633 | atl1_clean_rx_ring(adapter); |
2634 | } | 2634 | } |
2635 | 2635 | ||
2636 | static void atl1_tx_timeout_task(struct work_struct *work) | 2636 | static void atl1_reset_dev_task(struct work_struct *work) |
2637 | { | 2637 | { |
2638 | struct atl1_adapter *adapter = | 2638 | struct atl1_adapter *adapter = |
2639 | container_of(work, struct atl1_adapter, tx_timeout_task); | 2639 | container_of(work, struct atl1_adapter, reset_dev_task); |
2640 | struct net_device *netdev = adapter->netdev; | 2640 | struct net_device *netdev = adapter->netdev; |
2641 | 2641 | ||
2642 | netif_device_detach(netdev); | 2642 | netif_device_detach(netdev); |
@@ -3038,12 +3038,10 @@ static int __devinit atl1_probe(struct pci_dev *pdev, | |||
3038 | (unsigned long)adapter); | 3038 | (unsigned long)adapter); |
3039 | adapter->phy_timer_pending = false; | 3039 | adapter->phy_timer_pending = false; |
3040 | 3040 | ||
3041 | INIT_WORK(&adapter->tx_timeout_task, atl1_tx_timeout_task); | 3041 | INIT_WORK(&adapter->reset_dev_task, atl1_reset_dev_task); |
3042 | 3042 | ||
3043 | INIT_WORK(&adapter->link_chg_task, atlx_link_chg_task); | 3043 | INIT_WORK(&adapter->link_chg_task, atlx_link_chg_task); |
3044 | 3044 | ||
3045 | INIT_WORK(&adapter->pcie_dma_to_rst_task, atl1_tx_timeout_task); | ||
3046 | |||
3047 | err = register_netdev(netdev); | 3045 | err = register_netdev(netdev); |
3048 | if (err) | 3046 | if (err) |
3049 | goto err_common; | 3047 | goto err_common; |
diff --git a/drivers/net/ethernet/atheros/atlx/atl1.h b/drivers/net/ethernet/atheros/atlx/atl1.h index 109d6da8be97..e04bf4d71e46 100644 --- a/drivers/net/ethernet/atheros/atlx/atl1.h +++ b/drivers/net/ethernet/atheros/atlx/atl1.h | |||
@@ -758,9 +758,8 @@ struct atl1_adapter { | |||
758 | u16 link_speed; | 758 | u16 link_speed; |
759 | u16 link_duplex; | 759 | u16 link_duplex; |
760 | spinlock_t lock; | 760 | spinlock_t lock; |
761 | struct work_struct tx_timeout_task; | 761 | struct work_struct reset_dev_task; |
762 | struct work_struct link_chg_task; | 762 | struct work_struct link_chg_task; |
763 | struct work_struct pcie_dma_to_rst_task; | ||
764 | 763 | ||
765 | struct timer_list phy_config_timer; | 764 | struct timer_list phy_config_timer; |
766 | bool phy_timer_pending; | 765 | bool phy_timer_pending; |
diff --git a/drivers/net/ethernet/atheros/atlx/atlx.c b/drivers/net/ethernet/atheros/atlx/atlx.c index 3cd8837236dc..c9e9dc57986c 100644 --- a/drivers/net/ethernet/atheros/atlx/atlx.c +++ b/drivers/net/ethernet/atheros/atlx/atlx.c | |||
@@ -194,7 +194,7 @@ static void atlx_tx_timeout(struct net_device *netdev) | |||
194 | { | 194 | { |
195 | struct atlx_adapter *adapter = netdev_priv(netdev); | 195 | struct atlx_adapter *adapter = netdev_priv(netdev); |
196 | /* Do the reset outside of interrupt context */ | 196 | /* Do the reset outside of interrupt context */ |
197 | schedule_work(&adapter->tx_timeout_task); | 197 | schedule_work(&adapter->reset_dev_task); |
198 | } | 198 | } |
199 | 199 | ||
200 | /* | 200 | /* |
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c index ad95324dc042..64392ec410a3 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c | |||
@@ -942,6 +942,12 @@ static int bnx2x_ets_e3b0_sp_pri_to_cos_set(const struct link_params *params, | |||
942 | const u8 max_num_of_cos = (port) ? DCBX_E3B0_MAX_NUM_COS_PORT1 : | 942 | const u8 max_num_of_cos = (port) ? DCBX_E3B0_MAX_NUM_COS_PORT1 : |
943 | DCBX_E3B0_MAX_NUM_COS_PORT0; | 943 | DCBX_E3B0_MAX_NUM_COS_PORT0; |
944 | 944 | ||
945 | if (pri >= max_num_of_cos) { | ||
946 | DP(NETIF_MSG_LINK, "bnx2x_ets_e3b0_sp_pri_to_cos_set invalid " | ||
947 | "parameter Illegal strict priority\n"); | ||
948 | return -EINVAL; | ||
949 | } | ||
950 | |||
945 | if (sp_pri_to_cos[pri] != DCBX_INVALID_COS) { | 951 | if (sp_pri_to_cos[pri] != DCBX_INVALID_COS) { |
946 | DP(NETIF_MSG_LINK, "bnx2x_ets_e3b0_sp_pri_to_cos_set invalid " | 952 | DP(NETIF_MSG_LINK, "bnx2x_ets_e3b0_sp_pri_to_cos_set invalid " |
947 | "parameter There can't be two COS's with " | 953 | "parameter There can't be two COS's with " |
@@ -949,12 +955,6 @@ static int bnx2x_ets_e3b0_sp_pri_to_cos_set(const struct link_params *params, | |||
949 | return -EINVAL; | 955 | return -EINVAL; |
950 | } | 956 | } |
951 | 957 | ||
952 | if (pri > max_num_of_cos) { | ||
953 | DP(NETIF_MSG_LINK, "bnx2x_ets_e3b0_sp_pri_to_cos_set invalid " | ||
954 | "parameter Illegal strict priority\n"); | ||
955 | return -EINVAL; | ||
956 | } | ||
957 | |||
958 | sp_pri_to_cos[pri] = cos_entry; | 958 | sp_pri_to_cos[pri] = cos_entry; |
959 | return 0; | 959 | return 0; |
960 | 960 | ||
diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.c b/drivers/net/ethernet/intel/e1000e/ich8lan.c index 64c76443a7aa..b461c24945e3 100644 --- a/drivers/net/ethernet/intel/e1000e/ich8lan.c +++ b/drivers/net/ethernet/intel/e1000e/ich8lan.c | |||
@@ -1310,10 +1310,6 @@ static s32 e1000_oem_bits_config_ich8lan(struct e1000_hw *hw, bool d0_state) | |||
1310 | 1310 | ||
1311 | if (mac_reg & E1000_PHY_CTRL_D0A_LPLU) | 1311 | if (mac_reg & E1000_PHY_CTRL_D0A_LPLU) |
1312 | oem_reg |= HV_OEM_BITS_LPLU; | 1312 | oem_reg |= HV_OEM_BITS_LPLU; |
1313 | |||
1314 | /* Set Restart auto-neg to activate the bits */ | ||
1315 | if (!hw->phy.ops.check_reset_block(hw)) | ||
1316 | oem_reg |= HV_OEM_BITS_RESTART_AN; | ||
1317 | } else { | 1313 | } else { |
1318 | if (mac_reg & (E1000_PHY_CTRL_GBE_DISABLE | | 1314 | if (mac_reg & (E1000_PHY_CTRL_GBE_DISABLE | |
1319 | E1000_PHY_CTRL_NOND0A_GBE_DISABLE)) | 1315 | E1000_PHY_CTRL_NOND0A_GBE_DISABLE)) |
@@ -1324,6 +1320,11 @@ static s32 e1000_oem_bits_config_ich8lan(struct e1000_hw *hw, bool d0_state) | |||
1324 | oem_reg |= HV_OEM_BITS_LPLU; | 1320 | oem_reg |= HV_OEM_BITS_LPLU; |
1325 | } | 1321 | } |
1326 | 1322 | ||
1323 | /* Set Restart auto-neg to activate the bits */ | ||
1324 | if ((d0_state || (hw->mac.type != e1000_pchlan)) && | ||
1325 | !hw->phy.ops.check_reset_block(hw)) | ||
1326 | oem_reg |= HV_OEM_BITS_RESTART_AN; | ||
1327 | |||
1327 | ret_val = hw->phy.ops.write_reg_locked(hw, HV_OEM_BITS, oem_reg); | 1328 | ret_val = hw->phy.ops.write_reg_locked(hw, HV_OEM_BITS, oem_reg); |
1328 | 1329 | ||
1329 | release: | 1330 | release: |
@@ -3682,7 +3683,11 @@ void e1000_suspend_workarounds_ich8lan(struct e1000_hw *hw) | |||
3682 | 3683 | ||
3683 | if (hw->mac.type >= e1000_pchlan) { | 3684 | if (hw->mac.type >= e1000_pchlan) { |
3684 | e1000_oem_bits_config_ich8lan(hw, false); | 3685 | e1000_oem_bits_config_ich8lan(hw, false); |
3685 | e1000_phy_hw_reset_ich8lan(hw); | 3686 | |
3687 | /* Reset PHY to activate OEM bits on 82577/8 */ | ||
3688 | if (hw->mac.type == e1000_pchlan) | ||
3689 | e1000e_phy_hw_reset_generic(hw); | ||
3690 | |||
3686 | ret_val = hw->phy.ops.acquire(hw); | 3691 | ret_val = hw->phy.ops.acquire(hw); |
3687 | if (ret_val) | 3692 | if (ret_val) |
3688 | return; | 3693 | return; |
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c index 027d7a75be39..ed1b47dc0834 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c | |||
@@ -622,6 +622,16 @@ static int ixgbe_alloc_q_vector(struct ixgbe_adapter *adapter, int v_idx, | |||
622 | if (adapter->hw.mac.type == ixgbe_mac_82599EB) | 622 | if (adapter->hw.mac.type == ixgbe_mac_82599EB) |
623 | set_bit(__IXGBE_RX_CSUM_UDP_ZERO_ERR, &ring->state); | 623 | set_bit(__IXGBE_RX_CSUM_UDP_ZERO_ERR, &ring->state); |
624 | 624 | ||
625 | #ifdef IXGBE_FCOE | ||
626 | if (adapter->netdev->features & NETIF_F_FCOE_MTU) { | ||
627 | struct ixgbe_ring_feature *f; | ||
628 | f = &adapter->ring_feature[RING_F_FCOE]; | ||
629 | if ((rxr_idx >= f->mask) && | ||
630 | (rxr_idx < f->mask + f->indices)) | ||
631 | set_bit(__IXGBE_RX_FCOE_BUFSZ, &ring->state); | ||
632 | } | ||
633 | |||
634 | #endif /* IXGBE_FCOE */ | ||
625 | /* apply Rx specific ring traits */ | 635 | /* apply Rx specific ring traits */ |
626 | ring->count = adapter->rx_ring_count; | 636 | ring->count = adapter->rx_ring_count; |
627 | ring->queue_index = rxr_idx; | 637 | ring->queue_index = rxr_idx; |
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index 3e26b1f9ac75..a7f3cd872caf 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | |||
@@ -3154,14 +3154,6 @@ static void ixgbe_set_rx_buffer_len(struct ixgbe_adapter *adapter) | |||
3154 | set_ring_rsc_enabled(rx_ring); | 3154 | set_ring_rsc_enabled(rx_ring); |
3155 | else | 3155 | else |
3156 | clear_ring_rsc_enabled(rx_ring); | 3156 | clear_ring_rsc_enabled(rx_ring); |
3157 | #ifdef IXGBE_FCOE | ||
3158 | if (netdev->features & NETIF_F_FCOE_MTU) { | ||
3159 | struct ixgbe_ring_feature *f; | ||
3160 | f = &adapter->ring_feature[RING_F_FCOE]; | ||
3161 | if ((i >= f->mask) && (i < f->mask + f->indices)) | ||
3162 | set_bit(__IXGBE_RX_FCOE_BUFSZ, &rx_ring->state); | ||
3163 | } | ||
3164 | #endif /* IXGBE_FCOE */ | ||
3165 | } | 3157 | } |
3166 | } | 3158 | } |
3167 | 3159 | ||
@@ -4836,7 +4828,9 @@ static int ixgbe_resume(struct pci_dev *pdev) | |||
4836 | 4828 | ||
4837 | pci_wake_from_d3(pdev, false); | 4829 | pci_wake_from_d3(pdev, false); |
4838 | 4830 | ||
4831 | rtnl_lock(); | ||
4839 | err = ixgbe_init_interrupt_scheme(adapter); | 4832 | err = ixgbe_init_interrupt_scheme(adapter); |
4833 | rtnl_unlock(); | ||
4840 | if (err) { | 4834 | if (err) { |
4841 | e_dev_err("Cannot initialize interrupts for device\n"); | 4835 | e_dev_err("Cannot initialize interrupts for device\n"); |
4842 | return err; | 4836 | return err; |
@@ -4893,6 +4887,16 @@ static int __ixgbe_shutdown(struct pci_dev *pdev, bool *enable_wake) | |||
4893 | if (wufc) { | 4887 | if (wufc) { |
4894 | ixgbe_set_rx_mode(netdev); | 4888 | ixgbe_set_rx_mode(netdev); |
4895 | 4889 | ||
4890 | /* | ||
4891 | * enable the optics for both mult-speed fiber and | ||
4892 | * 82599 SFP+ fiber as we can WoL. | ||
4893 | */ | ||
4894 | if (hw->mac.ops.enable_tx_laser && | ||
4895 | (hw->phy.multispeed_fiber || | ||
4896 | (hw->mac.ops.get_media_type(hw) == ixgbe_media_type_fiber && | ||
4897 | hw->mac.type == ixgbe_mac_82599EB))) | ||
4898 | hw->mac.ops.enable_tx_laser(hw); | ||
4899 | |||
4896 | /* turn on all-multi mode if wake on multicast is enabled */ | 4900 | /* turn on all-multi mode if wake on multicast is enabled */ |
4897 | if (wufc & IXGBE_WUFC_MC) { | 4901 | if (wufc & IXGBE_WUFC_MC) { |
4898 | fctrl = IXGBE_READ_REG(hw, IXGBE_FCTRL); | 4902 | fctrl = IXGBE_READ_REG(hw, IXGBE_FCTRL); |
diff --git a/drivers/net/ethernet/micrel/ks8851.c b/drivers/net/ethernet/micrel/ks8851.c index c722aa607d07..f8dda009d3c0 100644 --- a/drivers/net/ethernet/micrel/ks8851.c +++ b/drivers/net/ethernet/micrel/ks8851.c | |||
@@ -889,16 +889,17 @@ static int ks8851_net_stop(struct net_device *dev) | |||
889 | netif_stop_queue(dev); | 889 | netif_stop_queue(dev); |
890 | 890 | ||
891 | mutex_lock(&ks->lock); | 891 | mutex_lock(&ks->lock); |
892 | /* turn off the IRQs and ack any outstanding */ | ||
893 | ks8851_wrreg16(ks, KS_IER, 0x0000); | ||
894 | ks8851_wrreg16(ks, KS_ISR, 0xffff); | ||
895 | mutex_unlock(&ks->lock); | ||
892 | 896 | ||
893 | /* stop any outstanding work */ | 897 | /* stop any outstanding work */ |
894 | flush_work(&ks->irq_work); | 898 | flush_work(&ks->irq_work); |
895 | flush_work(&ks->tx_work); | 899 | flush_work(&ks->tx_work); |
896 | flush_work(&ks->rxctrl_work); | 900 | flush_work(&ks->rxctrl_work); |
897 | 901 | ||
898 | /* turn off the IRQs and ack any outstanding */ | 902 | mutex_lock(&ks->lock); |
899 | ks8851_wrreg16(ks, KS_IER, 0x0000); | ||
900 | ks8851_wrreg16(ks, KS_ISR, 0xffff); | ||
901 | |||
902 | /* shutdown RX process */ | 903 | /* shutdown RX process */ |
903 | ks8851_wrreg16(ks, KS_RXCR1, 0x0000); | 904 | ks8851_wrreg16(ks, KS_RXCR1, 0x0000); |
904 | 905 | ||
@@ -907,6 +908,7 @@ static int ks8851_net_stop(struct net_device *dev) | |||
907 | 908 | ||
908 | /* set powermode to soft power down to save power */ | 909 | /* set powermode to soft power down to save power */ |
909 | ks8851_set_powermode(ks, PMECR_PM_SOFTDOWN); | 910 | ks8851_set_powermode(ks, PMECR_PM_SOFTDOWN); |
911 | mutex_unlock(&ks->lock); | ||
910 | 912 | ||
911 | /* ensure any queued tx buffers are dumped */ | 913 | /* ensure any queued tx buffers are dumped */ |
912 | while (!skb_queue_empty(&ks->txq)) { | 914 | while (!skb_queue_empty(&ks->txq)) { |
@@ -918,7 +920,6 @@ static int ks8851_net_stop(struct net_device *dev) | |||
918 | dev_kfree_skb(txb); | 920 | dev_kfree_skb(txb); |
919 | } | 921 | } |
920 | 922 | ||
921 | mutex_unlock(&ks->lock); | ||
922 | return 0; | 923 | return 0; |
923 | } | 924 | } |
924 | 925 | ||
@@ -1418,6 +1419,7 @@ static int __devinit ks8851_probe(struct spi_device *spi) | |||
1418 | struct net_device *ndev; | 1419 | struct net_device *ndev; |
1419 | struct ks8851_net *ks; | 1420 | struct ks8851_net *ks; |
1420 | int ret; | 1421 | int ret; |
1422 | unsigned cider; | ||
1421 | 1423 | ||
1422 | ndev = alloc_etherdev(sizeof(struct ks8851_net)); | 1424 | ndev = alloc_etherdev(sizeof(struct ks8851_net)); |
1423 | if (!ndev) | 1425 | if (!ndev) |
@@ -1484,8 +1486,8 @@ static int __devinit ks8851_probe(struct spi_device *spi) | |||
1484 | ks8851_soft_reset(ks, GRR_GSR); | 1486 | ks8851_soft_reset(ks, GRR_GSR); |
1485 | 1487 | ||
1486 | /* simple check for a valid chip being connected to the bus */ | 1488 | /* simple check for a valid chip being connected to the bus */ |
1487 | 1489 | cider = ks8851_rdreg16(ks, KS_CIDER); | |
1488 | if ((ks8851_rdreg16(ks, KS_CIDER) & ~CIDER_REV_MASK) != CIDER_ID) { | 1490 | if ((cider & ~CIDER_REV_MASK) != CIDER_ID) { |
1489 | dev_err(&spi->dev, "failed to read device ID\n"); | 1491 | dev_err(&spi->dev, "failed to read device ID\n"); |
1490 | ret = -ENODEV; | 1492 | ret = -ENODEV; |
1491 | goto err_id; | 1493 | goto err_id; |
@@ -1516,15 +1518,14 @@ static int __devinit ks8851_probe(struct spi_device *spi) | |||
1516 | } | 1518 | } |
1517 | 1519 | ||
1518 | netdev_info(ndev, "revision %d, MAC %pM, IRQ %d, %s EEPROM\n", | 1520 | netdev_info(ndev, "revision %d, MAC %pM, IRQ %d, %s EEPROM\n", |
1519 | CIDER_REV_GET(ks8851_rdreg16(ks, KS_CIDER)), | 1521 | CIDER_REV_GET(cider), ndev->dev_addr, ndev->irq, |
1520 | ndev->dev_addr, ndev->irq, | ||
1521 | ks->rc_ccr & CCR_EEPROM ? "has" : "no"); | 1522 | ks->rc_ccr & CCR_EEPROM ? "has" : "no"); |
1522 | 1523 | ||
1523 | return 0; | 1524 | return 0; |
1524 | 1525 | ||
1525 | 1526 | ||
1526 | err_netdev: | 1527 | err_netdev: |
1527 | free_irq(ndev->irq, ndev); | 1528 | free_irq(ndev->irq, ks); |
1528 | 1529 | ||
1529 | err_id: | 1530 | err_id: |
1530 | err_irq: | 1531 | err_irq: |
diff --git a/drivers/net/ethernet/micrel/ks8851_mll.c b/drivers/net/ethernet/micrel/ks8851_mll.c index b8104d9f4081..5ffde23ac8fb 100644 --- a/drivers/net/ethernet/micrel/ks8851_mll.c +++ b/drivers/net/ethernet/micrel/ks8851_mll.c | |||
@@ -40,7 +40,7 @@ | |||
40 | #define DRV_NAME "ks8851_mll" | 40 | #define DRV_NAME "ks8851_mll" |
41 | 41 | ||
42 | static u8 KS_DEFAULT_MAC_ADDRESS[] = { 0x00, 0x10, 0xA1, 0x86, 0x95, 0x11 }; | 42 | static u8 KS_DEFAULT_MAC_ADDRESS[] = { 0x00, 0x10, 0xA1, 0x86, 0x95, 0x11 }; |
43 | #define MAX_RECV_FRAMES 32 | 43 | #define MAX_RECV_FRAMES 255 |
44 | #define MAX_BUF_SIZE 2048 | 44 | #define MAX_BUF_SIZE 2048 |
45 | #define TX_BUF_SIZE 2000 | 45 | #define TX_BUF_SIZE 2000 |
46 | #define RX_BUF_SIZE 2000 | 46 | #define RX_BUF_SIZE 2000 |
diff --git a/drivers/net/ethernet/micrel/ksz884x.c b/drivers/net/ethernet/micrel/ksz884x.c index ef723b185d85..eaf9ff0262a9 100644 --- a/drivers/net/ethernet/micrel/ksz884x.c +++ b/drivers/net/ethernet/micrel/ksz884x.c | |||
@@ -5675,7 +5675,7 @@ static int netdev_set_mac_address(struct net_device *dev, void *addr) | |||
5675 | memcpy(hw->override_addr, mac->sa_data, ETH_ALEN); | 5675 | memcpy(hw->override_addr, mac->sa_data, ETH_ALEN); |
5676 | } | 5676 | } |
5677 | 5677 | ||
5678 | memcpy(dev->dev_addr, mac->sa_data, MAX_ADDR_LEN); | 5678 | memcpy(dev->dev_addr, mac->sa_data, ETH_ALEN); |
5679 | 5679 | ||
5680 | interrupt = hw_block_intr(hw); | 5680 | interrupt = hw_block_intr(hw); |
5681 | 5681 | ||
diff --git a/drivers/net/ethernet/realtek/8139cp.c b/drivers/net/ethernet/realtek/8139cp.c index abc79076f867..b3287c0fe279 100644 --- a/drivers/net/ethernet/realtek/8139cp.c +++ b/drivers/net/ethernet/realtek/8139cp.c | |||
@@ -958,6 +958,11 @@ static inline void cp_start_hw (struct cp_private *cp) | |||
958 | cpw8(Cmd, RxOn | TxOn); | 958 | cpw8(Cmd, RxOn | TxOn); |
959 | } | 959 | } |
960 | 960 | ||
961 | static void cp_enable_irq(struct cp_private *cp) | ||
962 | { | ||
963 | cpw16_f(IntrMask, cp_intr_mask); | ||
964 | } | ||
965 | |||
961 | static void cp_init_hw (struct cp_private *cp) | 966 | static void cp_init_hw (struct cp_private *cp) |
962 | { | 967 | { |
963 | struct net_device *dev = cp->dev; | 968 | struct net_device *dev = cp->dev; |
@@ -997,8 +1002,6 @@ static void cp_init_hw (struct cp_private *cp) | |||
997 | 1002 | ||
998 | cpw16(MultiIntr, 0); | 1003 | cpw16(MultiIntr, 0); |
999 | 1004 | ||
1000 | cpw16_f(IntrMask, cp_intr_mask); | ||
1001 | |||
1002 | cpw8_f(Cfg9346, Cfg9346_Lock); | 1005 | cpw8_f(Cfg9346, Cfg9346_Lock); |
1003 | } | 1006 | } |
1004 | 1007 | ||
@@ -1130,6 +1133,8 @@ static int cp_open (struct net_device *dev) | |||
1130 | if (rc) | 1133 | if (rc) |
1131 | goto err_out_hw; | 1134 | goto err_out_hw; |
1132 | 1135 | ||
1136 | cp_enable_irq(cp); | ||
1137 | |||
1133 | netif_carrier_off(dev); | 1138 | netif_carrier_off(dev); |
1134 | mii_check_media(&cp->mii_if, netif_msg_link(cp), true); | 1139 | mii_check_media(&cp->mii_if, netif_msg_link(cp), true); |
1135 | netif_start_queue(dev); | 1140 | netif_start_queue(dev); |
@@ -2031,6 +2036,7 @@ static int cp_resume (struct pci_dev *pdev) | |||
2031 | /* FIXME: sh*t may happen if the Rx ring buffer is depleted */ | 2036 | /* FIXME: sh*t may happen if the Rx ring buffer is depleted */ |
2032 | cp_init_rings_index (cp); | 2037 | cp_init_rings_index (cp); |
2033 | cp_init_hw (cp); | 2038 | cp_init_hw (cp); |
2039 | cp_enable_irq(cp); | ||
2034 | netif_start_queue (dev); | 2040 | netif_start_queue (dev); |
2035 | 2041 | ||
2036 | spin_lock_irqsave (&cp->lock, flags); | 2042 | spin_lock_irqsave (&cp->lock, flags); |
diff --git a/drivers/net/ethernet/smsc/smsc911x.c b/drivers/net/ethernet/smsc/smsc911x.c index 4a6971027076..cd3defb11ffb 100644 --- a/drivers/net/ethernet/smsc/smsc911x.c +++ b/drivers/net/ethernet/smsc/smsc911x.c | |||
@@ -1166,10 +1166,8 @@ smsc911x_rx_counterrors(struct net_device *dev, unsigned int rxstat) | |||
1166 | 1166 | ||
1167 | /* Quickly dumps bad packets */ | 1167 | /* Quickly dumps bad packets */ |
1168 | static void | 1168 | static void |
1169 | smsc911x_rx_fastforward(struct smsc911x_data *pdata, unsigned int pktbytes) | 1169 | smsc911x_rx_fastforward(struct smsc911x_data *pdata, unsigned int pktwords) |
1170 | { | 1170 | { |
1171 | unsigned int pktwords = (pktbytes + NET_IP_ALIGN + 3) >> 2; | ||
1172 | |||
1173 | if (likely(pktwords >= 4)) { | 1171 | if (likely(pktwords >= 4)) { |
1174 | unsigned int timeout = 500; | 1172 | unsigned int timeout = 500; |
1175 | unsigned int val; | 1173 | unsigned int val; |
@@ -1233,7 +1231,7 @@ static int smsc911x_poll(struct napi_struct *napi, int budget) | |||
1233 | continue; | 1231 | continue; |
1234 | } | 1232 | } |
1235 | 1233 | ||
1236 | skb = netdev_alloc_skb(dev, pktlength + NET_IP_ALIGN); | 1234 | skb = netdev_alloc_skb(dev, pktwords << 2); |
1237 | if (unlikely(!skb)) { | 1235 | if (unlikely(!skb)) { |
1238 | SMSC_WARN(pdata, rx_err, | 1236 | SMSC_WARN(pdata, rx_err, |
1239 | "Unable to allocate skb for rx packet"); | 1237 | "Unable to allocate skb for rx packet"); |
@@ -1243,14 +1241,12 @@ static int smsc911x_poll(struct napi_struct *napi, int budget) | |||
1243 | break; | 1241 | break; |
1244 | } | 1242 | } |
1245 | 1243 | ||
1246 | skb->data = skb->head; | 1244 | pdata->ops->rx_readfifo(pdata, |
1247 | skb_reset_tail_pointer(skb); | 1245 | (unsigned int *)skb->data, pktwords); |
1248 | 1246 | ||
1249 | /* Align IP on 16B boundary */ | 1247 | /* Align IP on 16B boundary */ |
1250 | skb_reserve(skb, NET_IP_ALIGN); | 1248 | skb_reserve(skb, NET_IP_ALIGN); |
1251 | skb_put(skb, pktlength - 4); | 1249 | skb_put(skb, pktlength - 4); |
1252 | pdata->ops->rx_readfifo(pdata, | ||
1253 | (unsigned int *)skb->head, pktwords); | ||
1254 | skb->protocol = eth_type_trans(skb, dev); | 1250 | skb->protocol = eth_type_trans(skb, dev); |
1255 | skb_checksum_none_assert(skb); | 1251 | skb_checksum_none_assert(skb); |
1256 | netif_receive_skb(skb); | 1252 | netif_receive_skb(skb); |
@@ -1565,7 +1561,7 @@ static int smsc911x_open(struct net_device *dev) | |||
1565 | smsc911x_reg_write(pdata, FIFO_INT, temp); | 1561 | smsc911x_reg_write(pdata, FIFO_INT, temp); |
1566 | 1562 | ||
1567 | /* set RX Data offset to 2 bytes for alignment */ | 1563 | /* set RX Data offset to 2 bytes for alignment */ |
1568 | smsc911x_reg_write(pdata, RX_CFG, (2 << 8)); | 1564 | smsc911x_reg_write(pdata, RX_CFG, (NET_IP_ALIGN << 8)); |
1569 | 1565 | ||
1570 | /* enable NAPI polling before enabling RX interrupts */ | 1566 | /* enable NAPI polling before enabling RX interrupts */ |
1571 | napi_enable(&pdata->napi); | 1567 | napi_enable(&pdata->napi); |
@@ -2382,7 +2378,6 @@ static int __devinit smsc911x_drv_probe(struct platform_device *pdev) | |||
2382 | SET_NETDEV_DEV(dev, &pdev->dev); | 2378 | SET_NETDEV_DEV(dev, &pdev->dev); |
2383 | 2379 | ||
2384 | pdata = netdev_priv(dev); | 2380 | pdata = netdev_priv(dev); |
2385 | |||
2386 | dev->irq = irq_res->start; | 2381 | dev->irq = irq_res->start; |
2387 | irq_flags = irq_res->flags & IRQF_TRIGGER_MASK; | 2382 | irq_flags = irq_res->flags & IRQF_TRIGGER_MASK; |
2388 | pdata->ioaddr = ioremap_nocache(res->start, res_size); | 2383 | pdata->ioaddr = ioremap_nocache(res->start, res_size); |
@@ -2446,7 +2441,7 @@ static int __devinit smsc911x_drv_probe(struct platform_device *pdev) | |||
2446 | if (retval) { | 2441 | if (retval) { |
2447 | SMSC_WARN(pdata, probe, | 2442 | SMSC_WARN(pdata, probe, |
2448 | "Unable to claim requested irq: %d", dev->irq); | 2443 | "Unable to claim requested irq: %d", dev->irq); |
2449 | goto out_free_irq; | 2444 | goto out_disable_resources; |
2450 | } | 2445 | } |
2451 | 2446 | ||
2452 | retval = register_netdev(dev); | 2447 | retval = register_netdev(dev); |
diff --git a/drivers/net/ethernet/ti/davinci_mdio.c b/drivers/net/ethernet/ti/davinci_mdio.c index 2757c7d6e633..e4e47088e26b 100644 --- a/drivers/net/ethernet/ti/davinci_mdio.c +++ b/drivers/net/ethernet/ti/davinci_mdio.c | |||
@@ -181,6 +181,11 @@ static inline int wait_for_user_access(struct davinci_mdio_data *data) | |||
181 | __davinci_mdio_reset(data); | 181 | __davinci_mdio_reset(data); |
182 | return -EAGAIN; | 182 | return -EAGAIN; |
183 | } | 183 | } |
184 | |||
185 | reg = __raw_readl(®s->user[0].access); | ||
186 | if ((reg & USERACCESS_GO) == 0) | ||
187 | return 0; | ||
188 | |||
184 | dev_err(data->dev, "timed out waiting for user access\n"); | 189 | dev_err(data->dev, "timed out waiting for user access\n"); |
185 | return -ETIMEDOUT; | 190 | return -ETIMEDOUT; |
186 | } | 191 | } |
diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet.h b/drivers/net/ethernet/xilinx/xilinx_axienet.h index cc83af083fd7..44b8d2bad8c3 100644 --- a/drivers/net/ethernet/xilinx/xilinx_axienet.h +++ b/drivers/net/ethernet/xilinx/xilinx_axienet.h | |||
@@ -2,9 +2,7 @@ | |||
2 | * Definitions for Xilinx Axi Ethernet device driver. | 2 | * Definitions for Xilinx Axi Ethernet device driver. |
3 | * | 3 | * |
4 | * Copyright (c) 2009 Secret Lab Technologies, Ltd. | 4 | * Copyright (c) 2009 Secret Lab Technologies, Ltd. |
5 | * Copyright (c) 2010 Xilinx, Inc. All rights reserved. | 5 | * Copyright (c) 2010 - 2012 Xilinx, Inc. All rights reserved. |
6 | * Copyright (c) 2012 Daniel Borkmann, <daniel.borkmann@tik.ee.ethz.ch> | ||
7 | * Copyright (c) 2012 Ariane Keller, <ariane.keller@tik.ee.ethz.ch> | ||
8 | */ | 6 | */ |
9 | 7 | ||
10 | #ifndef XILINX_AXIENET_H | 8 | #ifndef XILINX_AXIENET_H |
diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c index 2fcbeba6814b..9c365e192a31 100644 --- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c +++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c | |||
@@ -4,9 +4,9 @@ | |||
4 | * Copyright (c) 2008 Nissin Systems Co., Ltd., Yoshio Kashiwagi | 4 | * Copyright (c) 2008 Nissin Systems Co., Ltd., Yoshio Kashiwagi |
5 | * Copyright (c) 2005-2008 DLA Systems, David H. Lynch Jr. <dhlii@dlasys.net> | 5 | * Copyright (c) 2005-2008 DLA Systems, David H. Lynch Jr. <dhlii@dlasys.net> |
6 | * Copyright (c) 2008-2009 Secret Lab Technologies Ltd. | 6 | * Copyright (c) 2008-2009 Secret Lab Technologies Ltd. |
7 | * Copyright (c) 2010 Xilinx, Inc. All rights reserved. | 7 | * Copyright (c) 2010 - 2011 Michal Simek <monstr@monstr.eu> |
8 | * Copyright (c) 2012 Daniel Borkmann, <daniel.borkmann@tik.ee.ethz.ch> | 8 | * Copyright (c) 2010 - 2011 PetaLogix |
9 | * Copyright (c) 2012 Ariane Keller, <ariane.keller@tik.ee.ethz.ch> | 9 | * Copyright (c) 2010 - 2012 Xilinx, Inc. All rights reserved. |
10 | * | 10 | * |
11 | * This is a driver for the Xilinx Axi Ethernet which is used in the Virtex6 | 11 | * This is a driver for the Xilinx Axi Ethernet which is used in the Virtex6 |
12 | * and Spartan6. | 12 | * and Spartan6. |
diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c b/drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c index d70b6e79f6c0..e90e1f46121e 100644 --- a/drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c +++ b/drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c | |||
@@ -2,9 +2,9 @@ | |||
2 | * MDIO bus driver for the Xilinx Axi Ethernet device | 2 | * MDIO bus driver for the Xilinx Axi Ethernet device |
3 | * | 3 | * |
4 | * Copyright (c) 2009 Secret Lab Technologies, Ltd. | 4 | * Copyright (c) 2009 Secret Lab Technologies, Ltd. |
5 | * Copyright (c) 2010 Xilinx, Inc. All rights reserved. | 5 | * Copyright (c) 2010 - 2011 Michal Simek <monstr@monstr.eu> |
6 | * Copyright (c) 2012 Daniel Borkmann, <daniel.borkmann@tik.ee.ethz.ch> | 6 | * Copyright (c) 2010 - 2011 PetaLogix |
7 | * Copyright (c) 2012 Ariane Keller, <ariane.keller@tik.ee.ethz.ch> | 7 | * Copyright (c) 2010 - 2012 Xilinx, Inc. All rights reserved. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/of_address.h> | 10 | #include <linux/of_address.h> |