Refreshed all patches.
Compile-tested on: ar7
Runtime-tested on: none
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
LINUX_RELEASE?=1
LINUX_VERSION-3.18 = .136
-LINUX_VERSION-4.9 = .163
+LINUX_VERSION-4.9 = .164
LINUX_VERSION-4.14 = .106
LINUX_VERSION-4.19 = .25
LINUX_KERNEL_HASH-3.18.136 = 48c8775013d23229462134f911bbb14c7935096fcccfb19ce28ecd5f7154f35c
-LINUX_KERNEL_HASH-4.9.163 = c27cf9962c17b91275ab9e74b43c1269f726f79e7a85421be7c5c73d267eef91
+LINUX_KERNEL_HASH-4.9.164 = adf598758d3a5390100ea754ccd64668ccd5eebb3507d78e3588d13f3e73f8e7
LINUX_KERNEL_HASH-4.14.106 = a0e2af6add699d86cf15e1ee31ad408aa28dbab82f4462450eba51f90e7d2760
LINUX_KERNEL_HASH-4.19.25 = 7ec71d90d6e96e6f741676d157ac06f30c75be4eaf1649143a3c8b7d4f919731
if (NULL == bus || NULL == bus->name ||
NULL == bus->read || NULL == bus->write)
-@@ -330,6 +334,35 @@ int __mdiobus_register(struct mii_bus *b
+@@ -329,6 +333,35 @@ int __mdiobus_register(struct mii_bus *b
if (bus->reset)
bus->reset(bus);
for (i = 0; i < PHY_MAX_ADDR; i++) {
if ((bus->phy_mask & (1 << i)) == 0) {
struct phy_device *phydev;
-@@ -355,6 +388,13 @@ error:
+@@ -354,6 +387,13 @@ error:
mdiodev->device_remove(mdiodev);
mdiodev->device_free(mdiodev);
}
device_del(&bus->dev);
return err;
}
-@@ -376,6 +416,13 @@ void mdiobus_unregister(struct mii_bus *
+@@ -375,6 +415,13 @@ void mdiobus_unregister(struct mii_bus *
mdiodev->device_remove(mdiodev);
mdiodev->device_free(mdiodev);
}
--- a/drivers/net/phy/mdio_bus.c
+++ b/drivers/net/phy/mdio_bus.c
-@@ -331,9 +331,6 @@ int __mdiobus_register(struct mii_bus *b
+@@ -330,9 +330,6 @@ int __mdiobus_register(struct mii_bus *b
mutex_init(&bus->mdio_lock);
/* de-assert bus level PHY GPIO resets */
if (bus->num_reset_gpios > 0) {
bus->reset_gpiod = devm_kcalloc(&bus->dev,
-@@ -363,6 +360,9 @@ int __mdiobus_register(struct mii_bus *b
+@@ -362,6 +359,9 @@ int __mdiobus_register(struct mii_bus *b
}
}
/**
* mdiobus_alloc_size - allocate a mii_bus structure
* @size: extra amount of memory to allocate for private storage.
-@@ -401,6 +403,17 @@ void mdiobus_free(struct mii_bus *bus)
+@@ -400,6 +402,17 @@ void mdiobus_free(struct mii_bus *bus)
}
EXPORT_SYMBOL(mdiobus_free);
/**
* mdiobus_scan - scan a bus for MDIO devices.
* @bus: mii_bus to scan
-@@ -416,6 +429,7 @@ EXPORT_SYMBOL(mdiobus_free);
+@@ -415,6 +428,7 @@ EXPORT_SYMBOL(mdiobus_free);
struct phy_device *mdiobus_scan(struct mii_bus *bus, int addr)
{
struct phy_device *phydev;
int err;
phydev = get_phy_device(bus, addr, false);
-@@ -428,6 +442,12 @@ struct phy_device *mdiobus_scan(struct m
+@@ -427,6 +441,12 @@ struct phy_device *mdiobus_scan(struct m
*/
of_mdiobus_link_mdiodev(bus, &phydev->mdio);