From 86b716c06ae2e6fde05c881e9e7c597211f32afa Mon Sep 17 00:00:00 2001 From: Lucas Stach Date: Tue, 1 Nov 2016 09:57:42 +0100 Subject: net: e1000: set edev parent pointer This way the ethernet device will show up at the correct point in the device hierarchy. Signed-off-by: Lucas Stach Signed-off-by: Sascha Hauer --- drivers/net/e1000/main.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/net') diff --git a/drivers/net/e1000/main.c b/drivers/net/e1000/main.c index 77bcd179a8..6f9dddaf23 100644 --- a/drivers/net/e1000/main.c +++ b/drivers/net/e1000/main.c @@ -3600,6 +3600,7 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *id) e1000_get_ethaddr(edev, edev->ethaddr); /* Set up the function pointers and register the device */ + edev->parent = &pdev->dev; edev->init = e1000_init; edev->recv = e1000_poll; edev->send = e1000_transmit; -- cgit v1.2.3 From 9549b10a7ec8a20ccc0177d7b5c5f03c902793c5 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Mon, 7 Nov 2016 14:26:47 +0100 Subject: net: phy: micrel: Do not overwrite reserved bits ksz8021_config_init() unconditionally sets the KSZPHY_OMSO_RMII_OVERRIDE bit. This is since the initial micrel phy commit, so it's not reproducible where this comes from and why this is done. Neither U-Boot nor the kernel ever touch this bit and so should we. Also, instead of doing a write only operation, read/modify/write the bit we actually want to change. This fixes operation on a KSZ8081MLX which is a MII only phy. KSZPHY_OMSO_RMII_OVERRIDE is reserved here and must be written to 0. KSZPHY_OMSO_MII_OVERRIDE is default 1 and must be written as 1. Signed-off-by: Sascha Hauer --- drivers/net/phy/micrel.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'drivers/net') diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c index 9a30cb7e90..0ca359b0ba 100644 --- a/drivers/net/phy/micrel.c +++ b/drivers/net/phy/micrel.c @@ -72,8 +72,12 @@ static int kszphy_config_init(struct phy_device *phydev) static int ksz8021_config_init(struct phy_device *phydev) { - const u16 val = KSZPHY_OMSO_B_CAST_OFF | KSZPHY_OMSO_RMII_OVERRIDE; + u16 val; + + val = phy_read(phydev, MII_KSZPHY_OMSO); + val |= KSZPHY_OMSO_B_CAST_OFF; phy_write(phydev, MII_KSZPHY_OMSO, val); + return 0; } -- cgit v1.2.3