hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/drivers/net/ethernet/sfc/falcon/efx.c
....@@ -1,11 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /****************************************************************************
23 * Driver for Solarflare network controllers and boards
34 * Copyright 2005-2006 Fen Systems Ltd.
45 * 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.
96 */
107
118 #include <linux/module.h>
....@@ -1268,7 +1265,7 @@
12681265 rc = -EIO;
12691266 goto fail3;
12701267 }
1271
- efx->membase = ioremap_nocache(efx->membase_phys, mem_map_size);
1268
+ efx->membase = ioremap(efx->membase_phys, mem_map_size);
12721269 if (!efx->membase) {
12731270 netif_err(efx, probe, efx->net_dev,
12741271 "could not map memory BAR at %llx+%x\n",
....@@ -2111,7 +2108,7 @@
21112108 }
21122109
21132110 /* 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)
21152112 {
21162113 struct ef4_nic *efx = netdev_priv(net_dev);
21172114
....@@ -2259,7 +2256,7 @@
22592256 static ssize_t
22602257 show_phy_type(struct device *dev, struct device_attribute *attr, char *buf)
22612258 {
2262
- struct ef4_nic *efx = pci_get_drvdata(to_pci_dev(dev));
2259
+ struct ef4_nic *efx = dev_get_drvdata(dev);
22632260 return sprintf(buf, "%d\n", efx->phy_type);
22642261 }
22652262 static DEVICE_ATTR(phy_type, 0444, show_phy_type, NULL);
....@@ -3002,7 +2999,7 @@
30022999
30033000 static int ef4_pm_freeze(struct device *dev)
30043001 {
3005
- struct ef4_nic *efx = pci_get_drvdata(to_pci_dev(dev));
3002
+ struct ef4_nic *efx = dev_get_drvdata(dev);
30063003
30073004 rtnl_lock();
30083005
....@@ -3023,7 +3020,7 @@
30233020 static int ef4_pm_thaw(struct device *dev)
30243021 {
30253022 int rc;
3026
- struct ef4_nic *efx = pci_get_drvdata(to_pci_dev(dev));
3023
+ struct ef4_nic *efx = dev_get_drvdata(dev);
30273024
30283025 rtnl_lock();
30293026
....@@ -3121,7 +3118,7 @@
31213118 * Stop the software path and request a slot reset.
31223119 */
31233120 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)
31253122 {
31263123 pci_ers_result_t status = PCI_ERS_RESULT_RECOVERED;
31273124 struct ef4_nic *efx = pci_get_drvdata(pdev);
....@@ -3160,19 +3157,11 @@
31603157 {
31613158 struct ef4_nic *efx = pci_get_drvdata(pdev);
31623159 pci_ers_result_t status = PCI_ERS_RESULT_RECOVERED;
3163
- int rc;
31643160
31653161 if (pci_enable_device(pdev)) {
31663162 netif_err(efx, hw, efx->net_dev,
31673163 "Cannot re-enable PCI device after reset.\n");
31683164 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. */
31763165 }
31773166
31783167 return status;