hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/net/ethernet/3com/3c59x.c
....@@ -776,7 +776,7 @@
776776 #ifdef CONFIG_PCI
777777 static int vortex_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
778778 #endif
779
-static void vortex_tx_timeout(struct net_device *dev);
779
+static void vortex_tx_timeout(struct net_device *dev, unsigned int txqueue);
780780 static void acpi_set_WOL(struct net_device *dev);
781781 static const struct ethtool_ops vortex_ethtool_ops;
782782 static void set_8021q_mode(struct net_device *dev, int enable);
....@@ -847,8 +847,7 @@
847847
848848 static int vortex_suspend(struct device *dev)
849849 {
850
- struct pci_dev *pdev = to_pci_dev(dev);
851
- struct net_device *ndev = pci_get_drvdata(pdev);
850
+ struct net_device *ndev = dev_get_drvdata(dev);
852851
853852 if (!ndev || !netif_running(ndev))
854853 return 0;
....@@ -861,8 +860,7 @@
861860
862861 static int vortex_resume(struct device *dev)
863862 {
864
- struct pci_dev *pdev = to_pci_dev(dev);
865
- struct net_device *ndev = pci_get_drvdata(pdev);
863
+ struct net_device *ndev = dev_get_drvdata(dev);
866864 int err;
867865
868866 if (!ndev || !netif_running(ndev))
....@@ -1151,7 +1149,7 @@
11511149
11521150 print_info = (vortex_debug > 1);
11531151 if (print_info)
1154
- pr_info("See Documentation/networking/vortex.txt\n");
1152
+ pr_info("See Documentation/networking/device_drivers/ethernet/3com/vortex.rst\n");
11551153
11561154 pr_info("%s: 3Com %s %s at %p.\n",
11571155 print_name,
....@@ -1550,7 +1548,7 @@
15501548 struct vortex_private *vp = netdev_priv(dev);
15511549 void __iomem *ioaddr = vp->ioaddr;
15521550 unsigned int config;
1553
- int i, mii_reg1, mii_reg5, err = 0;
1551
+ int i, mii_reg5, err = 0;
15541552
15551553 if (VORTEX_PCI(vp)) {
15561554 pci_set_power_state(VORTEX_PCI(vp), PCI_D0); /* Go active */
....@@ -1607,7 +1605,7 @@
16071605 window_write32(vp, config, 3, Wn3_Config);
16081606
16091607 if (dev->if_port == XCVR_MII || dev->if_port == XCVR_NWAY) {
1610
- mii_reg1 = mdio_read(dev, vp->phys[0], MII_BMSR);
1608
+ mdio_read(dev, vp->phys[0], MII_BMSR);
16111609 mii_reg5 = mdio_read(dev, vp->phys[0], MII_LPA);
16121610 vp->partner_flow_ctrl = ((mii_reg5 & 0x0400) != 0);
16131611 vp->mii.full_duplex = vp->full_duplex;
....@@ -1879,7 +1877,7 @@
18791877 iowrite16(FakeIntr, ioaddr + EL3_CMD);
18801878 }
18811879
1882
-static void vortex_tx_timeout(struct net_device *dev)
1880
+static void vortex_tx_timeout(struct net_device *dev, unsigned int txqueue)
18831881 {
18841882 struct vortex_private *vp = netdev_priv(dev);
18851883 void __iomem *ioaddr = vp->ioaddr;
....@@ -1956,7 +1954,7 @@
19561954 dev->name, tx_status);
19571955 if (tx_status == 0x82) {
19581956 pr_err("Probably a duplex mismatch. See "
1959
- "Documentation/networking/vortex.txt\n");
1957
+ "Documentation/networking/device_drivers/ethernet/3com/vortex.rst\n");
19601958 }
19611959 dump_tx_ring(dev);
19621960 }
....@@ -2175,7 +2173,7 @@
21752173
21762174 dma_addr = skb_frag_dma_map(vp->gendev, frag,
21772175 0,
2178
- frag->size,
2176
+ skb_frag_size(frag),
21792177 DMA_TO_DEVICE);
21802178 if (dma_mapping_error(vp->gendev, dma_addr)) {
21812179 for(i = i-1; i >= 0; i--)
....@@ -2307,7 +2305,7 @@
23072305 dma_unmap_single(vp->gendev, vp->tx_skb_dma, (vp->tx_skb->len + 3) & ~3, DMA_TO_DEVICE);
23082306 pkts_compl++;
23092307 bytes_compl += vp->tx_skb->len;
2310
- dev_kfree_skb_irq(vp->tx_skb); /* Release the transferred buffer */
2308
+ dev_consume_skb_irq(vp->tx_skb); /* Release the transferred buffer */
23112309 if (ioread16(ioaddr + TxFree) > 1536) {
23122310 /*
23132311 * AKPM: FIXME: I don't think we need this. If the queue was stopped due to
....@@ -2449,7 +2447,7 @@
24492447 #endif
24502448 pkts_compl++;
24512449 bytes_compl += skb->len;
2452
- dev_kfree_skb_irq(skb);
2450
+ dev_consume_skb_irq(skb);
24532451 vp->tx_skbuff[entry] = NULL;
24542452 } else {
24552453 pr_debug("boomerang_interrupt: no skb!\n");