diff options
author | Steve Glendinning | 2008-11-05 00:35:37 +0000 |
---|---|---|
committer | Jeff Garzik | 2008-11-06 00:58:40 -0500 |
commit | fd9abb3d97c2ab883e4732ec1214fe64190236e7 (patch) | |
tree | e5f9c0b1ab77980e22434c85cf50644e18c1e134 /drivers/net/phy | |
parent | c5916cf8dbd3ac5ec675d9347aeaa796b546b50e (diff) |
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>
Diffstat (limited to 'drivers/net/phy')
-rw-r--r-- | drivers/net/phy/smsc.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/net/phy/smsc.c b/drivers/net/phy/smsc.c index 73baa7a3bb0e..c05d38d46350 100644 --- a/drivers/net/phy/smsc.c +++ b/drivers/net/phy/smsc.c @@ -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); |