.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /**************************************************************************** |
---|
2 | 3 | * Driver for Solarflare network controllers and boards |
---|
3 | 4 | * Copyright 2005-2006 Fen Systems Ltd. |
---|
4 | 5 | * Copyright 2005-2013 Solarflare Communications Inc. |
---|
5 | | - * |
---|
6 | | - * This program is free software; you can redistribute it and/or modify it |
---|
7 | | - * under the terms of the GNU General Public License version 2 as published |
---|
8 | | - * by the Free Software Foundation, incorporated herein by reference. |
---|
9 | 6 | */ |
---|
10 | 7 | |
---|
11 | 8 | #include <linux/module.h> |
---|
.. | .. |
---|
1268 | 1265 | rc = -EIO; |
---|
1269 | 1266 | goto fail3; |
---|
1270 | 1267 | } |
---|
1271 | | - efx->membase = ioremap_nocache(efx->membase_phys, mem_map_size); |
---|
| 1268 | + efx->membase = ioremap(efx->membase_phys, mem_map_size); |
---|
1272 | 1269 | if (!efx->membase) { |
---|
1273 | 1270 | netif_err(efx, probe, efx->net_dev, |
---|
1274 | 1271 | "could not map memory BAR at %llx+%x\n", |
---|
.. | .. |
---|
2111 | 2108 | } |
---|
2112 | 2109 | |
---|
2113 | 2110 | /* Context: netif_tx_lock held, BHs disabled. */ |
---|
2114 | | -static void ef4_watchdog(struct net_device *net_dev) |
---|
| 2111 | +static void ef4_watchdog(struct net_device *net_dev, unsigned int txqueue) |
---|
2115 | 2112 | { |
---|
2116 | 2113 | struct ef4_nic *efx = netdev_priv(net_dev); |
---|
2117 | 2114 | |
---|
.. | .. |
---|
2259 | 2256 | static ssize_t |
---|
2260 | 2257 | show_phy_type(struct device *dev, struct device_attribute *attr, char *buf) |
---|
2261 | 2258 | { |
---|
2262 | | - struct ef4_nic *efx = pci_get_drvdata(to_pci_dev(dev)); |
---|
| 2259 | + struct ef4_nic *efx = dev_get_drvdata(dev); |
---|
2263 | 2260 | return sprintf(buf, "%d\n", efx->phy_type); |
---|
2264 | 2261 | } |
---|
2265 | 2262 | static DEVICE_ATTR(phy_type, 0444, show_phy_type, NULL); |
---|
.. | .. |
---|
3002 | 2999 | |
---|
3003 | 3000 | static int ef4_pm_freeze(struct device *dev) |
---|
3004 | 3001 | { |
---|
3005 | | - struct ef4_nic *efx = pci_get_drvdata(to_pci_dev(dev)); |
---|
| 3002 | + struct ef4_nic *efx = dev_get_drvdata(dev); |
---|
3006 | 3003 | |
---|
3007 | 3004 | rtnl_lock(); |
---|
3008 | 3005 | |
---|
.. | .. |
---|
3023 | 3020 | static int ef4_pm_thaw(struct device *dev) |
---|
3024 | 3021 | { |
---|
3025 | 3022 | int rc; |
---|
3026 | | - struct ef4_nic *efx = pci_get_drvdata(to_pci_dev(dev)); |
---|
| 3023 | + struct ef4_nic *efx = dev_get_drvdata(dev); |
---|
3027 | 3024 | |
---|
3028 | 3025 | rtnl_lock(); |
---|
3029 | 3026 | |
---|
.. | .. |
---|
3121 | 3118 | * Stop the software path and request a slot reset. |
---|
3122 | 3119 | */ |
---|
3123 | 3120 | static pci_ers_result_t ef4_io_error_detected(struct pci_dev *pdev, |
---|
3124 | | - enum pci_channel_state state) |
---|
| 3121 | + pci_channel_state_t state) |
---|
3125 | 3122 | { |
---|
3126 | 3123 | pci_ers_result_t status = PCI_ERS_RESULT_RECOVERED; |
---|
3127 | 3124 | struct ef4_nic *efx = pci_get_drvdata(pdev); |
---|
.. | .. |
---|
3160 | 3157 | { |
---|
3161 | 3158 | struct ef4_nic *efx = pci_get_drvdata(pdev); |
---|
3162 | 3159 | pci_ers_result_t status = PCI_ERS_RESULT_RECOVERED; |
---|
3163 | | - int rc; |
---|
3164 | 3160 | |
---|
3165 | 3161 | if (pci_enable_device(pdev)) { |
---|
3166 | 3162 | netif_err(efx, hw, efx->net_dev, |
---|
3167 | 3163 | "Cannot re-enable PCI device after reset.\n"); |
---|
3168 | 3164 | status = PCI_ERS_RESULT_DISCONNECT; |
---|
3169 | | - } |
---|
3170 | | - |
---|
3171 | | - rc = pci_cleanup_aer_uncorrect_error_status(pdev); |
---|
3172 | | - if (rc) { |
---|
3173 | | - netif_err(efx, hw, efx->net_dev, |
---|
3174 | | - "pci_cleanup_aer_uncorrect_error_status failed (%d)\n", rc); |
---|
3175 | | - /* Non-fatal error. Continue. */ |
---|
3176 | 3165 | } |
---|
3177 | 3166 | |
---|
3178 | 3167 | return status; |
---|