diff options
Diffstat (limited to 'drivers/net/e1000')
-rw-r--r-- | drivers/net/e1000/e1000_main.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 872799b746f5..dd8343244378 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
@@ -912,7 +912,6 @@ static int __devinit e1000_probe(struct pci_dev *pdev, | |||
912 | u16 eeprom_data = 0; | 912 | u16 eeprom_data = 0; |
913 | u16 eeprom_apme_mask = E1000_EEPROM_APME; | 913 | u16 eeprom_apme_mask = E1000_EEPROM_APME; |
914 | int bars, need_ioport; | 914 | int bars, need_ioport; |
915 | DECLARE_MAC_BUF(mac); | ||
916 | 915 | ||
917 | /* do not allocate ioport bars when not needed */ | 916 | /* do not allocate ioport bars when not needed */ |
918 | need_ioport = e1000_is_need_ioport(pdev); | 917 | need_ioport = e1000_is_need_ioport(pdev); |
@@ -967,8 +966,7 @@ static int __devinit e1000_probe(struct pci_dev *pdev, | |||
967 | hw->back = adapter; | 966 | hw->back = adapter; |
968 | 967 | ||
969 | err = -EIO; | 968 | err = -EIO; |
970 | hw->hw_addr = ioremap(pci_resource_start(pdev, BAR_0), | 969 | hw->hw_addr = pci_ioremap_bar(pdev, BAR_0); |
971 | pci_resource_len(pdev, BAR_0)); | ||
972 | if (!hw->hw_addr) | 970 | if (!hw->hw_addr) |
973 | goto err_ioremap; | 971 | goto err_ioremap; |
974 | 972 | ||
@@ -1016,9 +1014,7 @@ static int __devinit e1000_probe(struct pci_dev *pdev, | |||
1016 | * because it depends on mac_type */ | 1014 | * because it depends on mac_type */ |
1017 | if ((hw->mac_type == e1000_ich8lan) && | 1015 | if ((hw->mac_type == e1000_ich8lan) && |
1018 | (pci_resource_flags(pdev, 1) & IORESOURCE_MEM)) { | 1016 | (pci_resource_flags(pdev, 1) & IORESOURCE_MEM)) { |
1019 | hw->flash_address = | 1017 | hw->flash_address = pci_ioremap_bar(pdev, 1); |
1020 | ioremap(pci_resource_start(pdev, 1), | ||
1021 | pci_resource_len(pdev, 1)); | ||
1022 | if (!hw->flash_address) | 1018 | if (!hw->flash_address) |
1023 | goto err_flashmap; | 1019 | goto err_flashmap; |
1024 | } | 1020 | } |
@@ -1195,7 +1191,7 @@ static int __devinit e1000_probe(struct pci_dev *pdev, | |||
1195 | (hw->bus_width == e1000_bus_width_pciex_1) ? "Width x1" : | 1191 | (hw->bus_width == e1000_bus_width_pciex_1) ? "Width x1" : |
1196 | "32-bit")); | 1192 | "32-bit")); |
1197 | 1193 | ||
1198 | printk("%s\n", print_mac(mac, netdev->dev_addr)); | 1194 | printk("%pM\n", netdev->dev_addr); |
1199 | 1195 | ||
1200 | if (hw->bus_type == e1000_bus_type_pci_express) { | 1196 | if (hw->bus_type == e1000_bus_type_pci_express) { |
1201 | DPRINTK(PROBE, WARNING, "This device (id %04x:%04x) will no " | 1197 | DPRINTK(PROBE, WARNING, "This device (id %04x:%04x) will no " |
@@ -3791,8 +3787,7 @@ static int e1000_clean(struct napi_struct *napi, int budget) | |||
3791 | struct net_device *poll_dev = adapter->netdev; | 3787 | struct net_device *poll_dev = adapter->netdev; |
3792 | int tx_cleaned = 0, work_done = 0; | 3788 | int tx_cleaned = 0, work_done = 0; |
3793 | 3789 | ||
3794 | /* Must NOT use netdev_priv macro here. */ | 3790 | adapter = netdev_priv(poll_dev); |
3795 | adapter = poll_dev->priv; | ||
3796 | 3791 | ||
3797 | /* e1000_clean is called per-cpu. This lock protects | 3792 | /* e1000_clean is called per-cpu. This lock protects |
3798 | * tx_ring[0] from being cleaned by multiple cpus | 3793 | * tx_ring[0] from being cleaned by multiple cpus |
@@ -4104,8 +4099,6 @@ static bool e1000_clean_rx_irq(struct e1000_adapter *adapter, | |||
4104 | netif_receive_skb(skb); | 4099 | netif_receive_skb(skb); |
4105 | } | 4100 | } |
4106 | 4101 | ||
4107 | netdev->last_rx = jiffies; | ||
4108 | |||
4109 | next_desc: | 4102 | next_desc: |
4110 | rx_desc->status = 0; | 4103 | rx_desc->status = 0; |
4111 | 4104 | ||
@@ -4789,7 +4782,7 @@ static pci_ers_result_t e1000_io_error_detected(struct pci_dev *pdev, | |||
4789 | pci_channel_state_t state) | 4782 | pci_channel_state_t state) |
4790 | { | 4783 | { |
4791 | struct net_device *netdev = pci_get_drvdata(pdev); | 4784 | struct net_device *netdev = pci_get_drvdata(pdev); |
4792 | struct e1000_adapter *adapter = netdev->priv; | 4785 | struct e1000_adapter *adapter = netdev_priv(netdev); |
4793 | 4786 | ||
4794 | netif_device_detach(netdev); | 4787 | netif_device_detach(netdev); |
4795 | 4788 | ||
@@ -4811,7 +4804,7 @@ static pci_ers_result_t e1000_io_error_detected(struct pci_dev *pdev, | |||
4811 | static pci_ers_result_t e1000_io_slot_reset(struct pci_dev *pdev) | 4804 | static pci_ers_result_t e1000_io_slot_reset(struct pci_dev *pdev) |
4812 | { | 4805 | { |
4813 | struct net_device *netdev = pci_get_drvdata(pdev); | 4806 | struct net_device *netdev = pci_get_drvdata(pdev); |
4814 | struct e1000_adapter *adapter = netdev->priv; | 4807 | struct e1000_adapter *adapter = netdev_priv(netdev); |
4815 | struct e1000_hw *hw = &adapter->hw; | 4808 | struct e1000_hw *hw = &adapter->hw; |
4816 | int err; | 4809 | int err; |
4817 | 4810 | ||
@@ -4845,7 +4838,7 @@ static pci_ers_result_t e1000_io_slot_reset(struct pci_dev *pdev) | |||
4845 | static void e1000_io_resume(struct pci_dev *pdev) | 4838 | static void e1000_io_resume(struct pci_dev *pdev) |
4846 | { | 4839 | { |
4847 | struct net_device *netdev = pci_get_drvdata(pdev); | 4840 | struct net_device *netdev = pci_get_drvdata(pdev); |
4848 | struct e1000_adapter *adapter = netdev->priv; | 4841 | struct e1000_adapter *adapter = netdev_priv(netdev); |
4849 | struct e1000_hw *hw = &adapter->hw; | 4842 | struct e1000_hw *hw = &adapter->hw; |
4850 | 4843 | ||
4851 | e1000_init_manageability(adapter); | 4844 | e1000_init_manageability(adapter); |