Skip to content

Commit

Permalink
SMSC LAN911x and LAN921x vendor driver
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Steve Glendinning authored and Jeff Garzik committed Nov 6, 2008
1 parent c5916cf commit fd9abb3
Show file tree
Hide file tree
Showing 7 changed files with 2,576 additions and 0 deletions.
6 changes: 6 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -3853,6 +3853,12 @@ M: mhoffman@lightlink.com
L: lm-sensors@lm-sensors.org
S: Maintained

SMSC911x ETHERNET DRIVER
P: Steve Glendinning
M: steve.glendinning@smsc.com
L: netdev@vger.kernel.org
S: Supported

SMX UIO Interface
P: Ben Nizette
M: bn@niasdigital.com
Expand Down
14 changes: 14 additions & 0 deletions drivers/net/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -979,6 +979,20 @@ config SMC911X
called smc911x. If you want to compile it as a module, say M
here and read <file:Documentation/kbuild/modules.txt>

config SMSC911X
tristate "SMSC LAN911x/LAN921x families embedded ethernet support"
depends on ARM || SUPERH
select CRC32
select MII
select PHYLIB
---help---
Say Y here if you want support for SMSC LAN911x and LAN921x families
of ethernet controllers.

To compile this driver as a module, choose M here and read
<file:Documentation/networking/net-modules.txt>. The module
will be called smsc911x.

config NET_VENDOR_RACAL
bool "Racal-Interlan (Micom) NI cards"
depends on ISA
Expand Down
1 change: 1 addition & 0 deletions drivers/net/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ obj-$(CONFIG_S2IO) += s2io.o
obj-$(CONFIG_MYRI10GE) += myri10ge/
obj-$(CONFIG_SMC91X) += smc91x.o
obj-$(CONFIG_SMC911X) += smc911x.o
obj-$(CONFIG_SMSC911X) += smsc911x.o
obj-$(CONFIG_BFIN_MAC) += bfin_mac.o
obj-$(CONFIG_DM9000) += dm9000.o
obj-$(CONFIG_PASEMI_MAC) += pasemi_mac_driver.o
Expand Down
28 changes: 28 additions & 0 deletions drivers/net/phy/smsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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:
Expand All @@ -154,6 +181,7 @@ static int __init smsc_init(void)

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);
Expand Down
Loading

0 comments on commit fd9abb3

Please sign in to comment.