]> git.baikalelectronics.ru Git - kernel.git/commit
fs_enet: Revive fixed link support
authorAnton Vorontsov <avorontsov@ru.mvista.com>
Thu, 16 Jul 2009 21:31:36 +0000 (21:31 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 22 Jul 2009 16:27:19 +0000 (09:27 -0700)
commitd1a4a2a2d8e2fed4fc67c828d9dc8def7b88323c
tree7de68b7181306455819c69ff0a831622a4322e1f
parentd0eb25257db2b9b23fa0c592fe8d8997009f435f
fs_enet: Revive fixed link support

Since commit db820fce7f3f7d5bf824fd13b05a9262e5b2df74 ("Rework
fs_enet driver to use of_mdio infrastructure") the fixed-link support
is broken in the fs_enet driver.

This patch fixes the support by removing a check for phy_node, and adding
a call to of_phy_connect_fixed_link().

Also set netdev parent device via SET_NETDEV_DEV() call, this is needed
so that OF MDIO core could find a node pointer for a device.

Plus, fix "if (IS_ERR(phydev))" check, in case of errors,
of_phy_connect() returns NULL, not ERR_PTR as phy_connect().

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/fs_enet/fs_enet-main.c