--- zzzz-none-000/linux-3.10.107/drivers/net/ethernet/rdc/r6040.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/net/ethernet/rdc/r6040.c 2021-02-04 17:41:59.000000000 +0000 @@ -34,7 +34,6 @@ #include #include #include -#include #include #include #include @@ -222,6 +221,7 @@ cmd = ioread16(ioaddr + MMDIO); if (!(cmd & MDIO_READ)) break; + udelay(1); } if (limit < 0) @@ -245,6 +245,7 @@ cmd = ioread16(ioaddr + MMDIO); if (!(cmd & MDIO_WRITE)) break; + udelay(1); } return (limit < 0) ? -ETIMEDOUT : 0; @@ -269,11 +270,6 @@ return r6040_phy_write(ioaddr, phy_addr, reg, value); } -static int r6040_mdiobus_reset(struct mii_bus *bus) -{ - return 0; -} - static void r6040_free_txbufs(struct net_device *dev) { struct r6040_private *lp = netdev_priv(dev); @@ -834,8 +830,8 @@ /* Set TX descriptor & Transmit it */ lp->tx_free_desc--; descptr = lp->tx_insert_ptr; - if (skb->len < MISR) - descptr->len = MISR; + if (skb->len < ETH_ZLEN) + descptr->len = ETH_ZLEN; else descptr->len = skb->len; @@ -1190,7 +1186,6 @@ lp->mii_bus->priv = dev; lp->mii_bus->read = r6040_mdiobus_read; lp->mii_bus->write = r6040_mdiobus_write; - lp->mii_bus->reset = r6040_mdiobus_reset; lp->mii_bus->name = "r6040_eth_mii"; snprintf(lp->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x", dev_name(&pdev->dev), card_idx); @@ -1231,7 +1226,6 @@ mdiobus_free(lp->mii_bus); err_out_unmap: netif_napi_del(&lp->napi); - pci_set_drvdata(pdev, NULL); pci_iounmap(pdev, ioaddr); err_out_free_res: pci_release_regions(pdev); @@ -1257,11 +1251,10 @@ pci_release_regions(pdev); free_netdev(dev); pci_disable_device(pdev); - pci_set_drvdata(pdev, NULL); } -static DEFINE_PCI_DEVICE_TABLE(r6040_pci_tbl) = { +static const struct pci_device_id r6040_pci_tbl[] = { { PCI_DEVICE(PCI_VENDOR_ID_RDC, 0x6040) }, { 0 } };