r6040.c (a02001086bbfb4da35d1228bebc2f1b442db455f) | r6040.c (84eff6d194df442bee62c129f2f47efb0dbd0468) |
---|---|
1/* 2 * RDC R6040 Fast Ethernet MAC support 3 * 4 * Copyright (C) 2004 Sten Wang <sten.wang@rdc.com.tw> 5 * Copyright (C) 2007 6 * Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us> 7 * Copyright (C) 2007-2012 Florian Fainelli <florian@openwrt.org> 8 * --- 1025 unchanged lines hidden (view full) --- 1034 struct phy_device *phydev = NULL; 1035 1036 phydev = phy_find_first(lp->mii_bus); 1037 if (!phydev) { 1038 dev_err(&lp->pdev->dev, "no PHY found\n"); 1039 return -ENODEV; 1040 } 1041 | 1/* 2 * RDC R6040 Fast Ethernet MAC support 3 * 4 * Copyright (C) 2004 Sten Wang <sten.wang@rdc.com.tw> 5 * Copyright (C) 2007 6 * Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us> 7 * Copyright (C) 2007-2012 Florian Fainelli <florian@openwrt.org> 8 * --- 1025 unchanged lines hidden (view full) --- 1034 struct phy_device *phydev = NULL; 1035 1036 phydev = phy_find_first(lp->mii_bus); 1037 if (!phydev) { 1038 dev_err(&lp->pdev->dev, "no PHY found\n"); 1039 return -ENODEV; 1040 } 1041 |
1042 phydev = phy_connect(dev, dev_name(&phydev->dev), &r6040_adjust_link, | 1042 phydev = phy_connect(dev, phydev_name(phydev), &r6040_adjust_link, |
1043 PHY_INTERFACE_MODE_MII); 1044 1045 if (IS_ERR(phydev)) { 1046 dev_err(&lp->pdev->dev, "could not attach to PHY\n"); 1047 return PTR_ERR(phydev); 1048 } 1049 1050 /* mask with MAC supported features */ --- 7 unchanged lines hidden (view full) --- 1058 1059 phydev->advertising = phydev->supported; 1060 lp->phydev = phydev; 1061 lp->old_link = 0; 1062 lp->old_duplex = -1; 1063 1064 dev_info(&lp->pdev->dev, "attached PHY driver [%s] " 1065 "(mii_bus:phy_addr=%s)\n", | 1043 PHY_INTERFACE_MODE_MII); 1044 1045 if (IS_ERR(phydev)) { 1046 dev_err(&lp->pdev->dev, "could not attach to PHY\n"); 1047 return PTR_ERR(phydev); 1048 } 1049 1050 /* mask with MAC supported features */ --- 7 unchanged lines hidden (view full) --- 1058 1059 phydev->advertising = phydev->supported; 1060 lp->phydev = phydev; 1061 lp->old_link = 0; 1062 lp->old_duplex = -1; 1063 1064 dev_info(&lp->pdev->dev, "attached PHY driver [%s] " 1065 "(mii_bus:phy_addr=%s)\n", |
1066 phydev->drv->name, dev_name(&phydev->dev)); | 1066 phydev->drv->name, phydev_name(phydev)); |
1067 1068 return 0; 1069} 1070 1071static int r6040_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) 1072{ 1073 struct net_device *dev; 1074 struct r6040_private *lp; --- 196 unchanged lines hidden --- | 1067 1068 return 0; 1069} 1070 1071static int r6040_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) 1072{ 1073 struct net_device *dev; 1074 struct r6040_private *lp; --- 196 unchanged lines hidden --- |