hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/net/ethernet/smsc/smc911x.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * smc911x.c
34 * This is a driver for SMSC's LAN911{5,6,7,8} single-chip Ethernet devices.
....@@ -5,19 +6,6 @@
56 * Copyright (C) 2005 Sensoria Corp
67 * Derived from the unified SMC91x driver by Nicolas Pitre
78 * and the smsc911x.c reference driver by SMSC
8
- *
9
- * This program is free software; you can redistribute it and/or modify
10
- * it under the terms of the GNU General Public License as published by
11
- * the Free Software Foundation; either version 2 of the License, or
12
- * (at your option) any later version.
13
- *
14
- * This program is distributed in the hope that it will be useful,
15
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
- * GNU General Public License for more details.
18
- *
19
- * You should have received a copy of the GNU General Public License
20
- * along with this program; if not, see <http://www.gnu.org/licenses/>.
219 *
2210 * Arguments:
2311 * watchdog = TX watchdog timeout
....@@ -724,6 +712,7 @@
724712 /* Found an external PHY */
725713 break;
726714 }
715
+ fallthrough;
727716 default:
728717 /* Internal media only */
729718 SMC_GET_PHY_ID1(lp, 1, id1);
....@@ -1188,7 +1177,7 @@
11881177
11891178 DBG(SMC_DEBUG_TX | SMC_DEBUG_DMA, dev, "TX DMA irq handler\n");
11901179 BUG_ON(skb == NULL);
1191
- dma_unmap_single(NULL, tx_dmabuf, tx_dmalen, DMA_TO_DEVICE);
1180
+ dma_unmap_single(lp->dev, tx_dmabuf, tx_dmalen, DMA_TO_DEVICE);
11921181 netif_trans_update(dev);
11931182 dev_kfree_skb_irq(skb);
11941183 lp->current_tx_skb = NULL;
....@@ -1219,7 +1208,7 @@
12191208
12201209 DBG(SMC_DEBUG_FUNC, dev, "--> %s\n", __func__);
12211210 DBG(SMC_DEBUG_RX | SMC_DEBUG_DMA, dev, "RX DMA irq handler\n");
1222
- dma_unmap_single(NULL, rx_dmabuf, rx_dmalen, DMA_FROM_DEVICE);
1211
+ dma_unmap_single(lp->dev, rx_dmabuf, rx_dmalen, DMA_FROM_DEVICE);
12231212 BUG_ON(skb == NULL);
12241213 lp->current_rx_skb = NULL;
12251214 PRINT_PKT(skb->data, skb->len);
....@@ -1256,7 +1245,7 @@
12561245 #endif
12571246
12581247 /* Our watchdog timed out. Called by the networking layer */
1259
-static void smc911x_timeout(struct net_device *dev)
1248
+static void smc911x_timeout(struct net_device *dev, unsigned int txqueue)
12601249 {
12611250 struct smc911x_local *lp = netdev_priv(dev);
12621251 int status, mask;