SMSC LAN911x and LAN921x vendor driver
Attached is a driver for SMSC's LAN911x and LAN921x families of embedded ethernet controllers. There is an existing smc911x driver in the tree; this is intended to replace it. Dustin McIntire (the author of the smc911x driver) has expressed his support for switching to this driver. This driver contains workarounds for all known hardware issues, and has been tested on all flavours of the chip on multiple architectures. This driver now uses phylib, so this patch also adds support for the device's internal phy Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com> Signed-off-by: Bahadir Balban <Bahadir.Balban@arm.com> Signed-off-by: Dustin Mcintire <dustin@sensoria.com> Signed-off-by: Bill Gatliff <bgat@billgatliff.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
This commit is contained in:

committed by
Jeff Garzik

parent
c5916cf8db
commit
fd9abb3d97
@@ -126,6 +126,27 @@ static struct phy_driver lan8700_driver = {
|
||||
.driver = { .owner = THIS_MODULE, }
|
||||
};
|
||||
|
||||
static struct phy_driver lan911x_int_driver = {
|
||||
.phy_id = 0x0007c0d0, /* OUI=0x00800f, Model#=0x0d */
|
||||
.phy_id_mask = 0xfffffff0,
|
||||
.name = "SMSC LAN911x Internal PHY",
|
||||
|
||||
.features = (PHY_BASIC_FEATURES | SUPPORTED_Pause
|
||||
| SUPPORTED_Asym_Pause),
|
||||
.flags = PHY_HAS_INTERRUPT | PHY_HAS_MAGICANEG,
|
||||
|
||||
/* basic functions */
|
||||
.config_aneg = genphy_config_aneg,
|
||||
.read_status = genphy_read_status,
|
||||
.config_init = smsc_phy_config_init,
|
||||
|
||||
/* IRQ related */
|
||||
.ack_interrupt = smsc_phy_ack_interrupt,
|
||||
.config_intr = smsc_phy_config_intr,
|
||||
|
||||
.driver = { .owner = THIS_MODULE, }
|
||||
};
|
||||
|
||||
static int __init smsc_init(void)
|
||||
{
|
||||
int ret;
|
||||
@@ -142,8 +163,14 @@ static int __init smsc_init(void)
|
||||
if (ret)
|
||||
goto err3;
|
||||
|
||||
ret = phy_driver_register (&lan911x_int_driver);
|
||||
if (ret)
|
||||
goto err4;
|
||||
|
||||
return 0;
|
||||
|
||||
err4:
|
||||
phy_driver_unregister (&lan8700_driver);
|
||||
err3:
|
||||
phy_driver_unregister (&lan8187_driver);
|
||||
err2:
|
||||
@@ -154,6 +181,7 @@ err1:
|
||||
|
||||
static void __exit smsc_exit(void)
|
||||
{
|
||||
phy_driver_unregister (&lan911x_int_driver);
|
||||
phy_driver_unregister (&lan8700_driver);
|
||||
phy_driver_unregister (&lan8187_driver);
|
||||
phy_driver_unregister (&lan83c185_driver);
|
||||
|
Reference in New Issue
Block a user