aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/phy/phy.c5
-rw-r--r--drivers/net/phy/phy_device.c2
2 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index bd88d818f082..5130db8f5c4e 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -361,6 +361,11 @@ int phy_mii_ioctl(struct phy_device *phydev,
361 } 361 }
362 break; 362 break;
363 363
364 case SIOCSHWTSTAMP:
365 if (phydev->drv->hwtstamp)
366 return phydev->drv->hwtstamp(phydev, ifr);
367 /* fall through */
368
364 default: 369 default:
365 return -EOPNOTSUPP; 370 return -EOPNOTSUPP;
366 } 371 }
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index 1a99bb244106..c0761197c07e 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -460,6 +460,7 @@ int phy_attach_direct(struct net_device *dev, struct phy_device *phydev,
460 } 460 }
461 461
462 phydev->attached_dev = dev; 462 phydev->attached_dev = dev;
463 dev->phydev = phydev;
463 464
464 phydev->dev_flags = flags; 465 phydev->dev_flags = flags;
465 466
@@ -513,6 +514,7 @@ EXPORT_SYMBOL(phy_attach);
513 */ 514 */
514void phy_detach(struct phy_device *phydev) 515void phy_detach(struct phy_device *phydev)
515{ 516{
517 phydev->attached_dev->phydev = NULL;
516 phydev->attached_dev = NULL; 518 phydev->attached_dev = NULL;
517 519
518 /* If the device had no specific driver before (i.e. - it 520 /* If the device had no specific driver before (i.e. - it