mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-27 01:11:06 +00:00
4dafdbd5b7
Fixes #3432
35 lines
1.2 KiB
Diff
35 lines
1.2 KiB
Diff
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
|
|
index 74664a6..38cc18a 100644
|
|
--- a/drivers/net/phy/phy_device.c
|
|
+++ b/drivers/net/phy/phy_device.c
|
|
@@ -944,7 +944,10 @@ EXPORT_SYMBOL(phy_attached_print);
|
|
int phy_attach_direct(struct net_device *dev, struct phy_device *phydev,
|
|
u32 flags, phy_interface_t interface)
|
|
{
|
|
+#if 0
|
|
+ /* 'driver' has not been set yet on Genode */
|
|
struct module *ndev_owner = dev->dev.parent->driver->owner;
|
|
+#endif
|
|
struct mii_bus *bus = phydev->mdio.bus;
|
|
struct device *d = &phydev->mdio.dev;
|
|
bool using_genphy = false;
|
|
@@ -955,7 +958,7 @@ int phy_attach_direct(struct net_device *dev, struct phy_device *phydev,
|
|
* our own module->refcnt here, otherwise we would not be able to
|
|
* unload later on.
|
|
*/
|
|
- if (ndev_owner != bus->owner && !try_module_get(bus->owner)) {
|
|
+ if (/*ndev_owner != bus->owner &&*/ !try_module_get(bus->owner)) {
|
|
dev_err(&dev->dev, "failed to get the bus module\n");
|
|
return -EIO;
|
|
}
|
|
@@ -1060,7 +1063,9 @@ error_module_put:
|
|
module_put(d->driver->owner);
|
|
error_put_device:
|
|
put_device(d);
|
|
+#if 0
|
|
if (ndev_owner != bus->owner)
|
|
+#endif
|
|
module_put(bus->owner);
|
|
return err;
|
|
}
|