diff options
author | Steve Glendinning <steve.glendinning@smsc.com> | 2008-11-04 19:35:37 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 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 = { | |||
126 | .driver = { .owner = THIS_MODULE, } | 126 | .driver = { .owner = THIS_MODULE, } |
127 | }; | 127 | }; |
128 | 128 | ||
129 | static struct phy_driver lan911x_int_driver = { | ||
130 | .phy_id = 0x0007c0d0, /* OUI=0x00800f, Model#=0x0d */ | ||
131 | .phy_id_mask = 0xfffffff0, | ||
132 | .name = "SMSC LAN911x Internal PHY", | ||
133 | |||
134 | .features = (PHY_BASIC_FEATURES | SUPPORTED_Pause | ||
135 | | SUPPORTED_Asym_Pause), | ||
136 | .flags = PHY_HAS_INTERRUPT | PHY_HAS_MAGICANEG, | ||
137 | |||
138 | /* basic functions */ | ||
139 | .config_aneg = genphy_config_aneg, | ||
140 | .read_status = genphy_read_status, | ||
141 | .config_init = smsc_phy_config_init, | ||
142 | |||
143 | /* IRQ related */ | ||
144 | .ack_interrupt = smsc_phy_ack_interrupt, | ||
145 | .config_intr = smsc_phy_config_intr, | ||
146 | |||
147 | .driver = { .owner = THIS_MODULE, } | ||
148 | }; | ||
149 | |||
129 | static int __init smsc_init(void) | 150 | static int __init smsc_init(void) |
130 | { | 151 | { |
131 | int ret; | 152 | int ret; |
@@ -142,8 +163,14 @@ static int __init smsc_init(void) | |||
142 | if (ret) | 163 | if (ret) |
143 | goto err3; | 164 | goto err3; |
144 | 165 | ||
166 | ret = phy_driver_register (&lan911x_int_driver); | ||
167 | if (ret) | ||
168 | goto err4; | ||
169 | |||
145 | return 0; | 170 | return 0; |
146 | 171 | ||
172 | err4: | ||
173 | phy_driver_unregister (&lan8700_driver); | ||
147 | err3: | 174 | err3: |
148 | phy_driver_unregister (&lan8187_driver); | 175 | phy_driver_unregister (&lan8187_driver); |
149 | err2: | 176 | err2: |
@@ -154,6 +181,7 @@ err1: | |||
154 | 181 | ||
155 | static void __exit smsc_exit(void) | 182 | static void __exit smsc_exit(void) |
156 | { | 183 | { |
184 | phy_driver_unregister (&lan911x_int_driver); | ||
157 | phy_driver_unregister (&lan8700_driver); | 185 | phy_driver_unregister (&lan8700_driver); |
158 | phy_driver_unregister (&lan8187_driver); | 186 | phy_driver_unregister (&lan8187_driver); |
159 | phy_driver_unregister (&lan83c185_driver); | 187 | phy_driver_unregister (&lan83c185_driver); |