-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: FEC: Fix kernel panic in fec_set_mac_address. ipv6: Fix default multicast hops setting. net: ep93xx_eth stops receiving packets drivers/net/phy: micrel phy driver dm9601: fix phy/eeprom write routine ppp_generic: handle non-linear skbs when passing them to pppd ppp_generic: pull 2 bytes so that PPP_PROTO(skb) is valid net: fix compile error due to double return type in SOCK_DEBUG net/usb: initiate sync sequence in sierra_net.c driver net/usb: remove default in Kconfig for sierra_net driver r8169: Fix rtl8169_rx_interrupt() e1000e: Fix oops caused by ASPM patch. net/sb1250: register mdio bus in probe sctp: Fix skb_over_panic resulting from multiple invalid parameter errors (CVE-2010-1173) (v4) p54pci: fix bugs in p54p_check_tx_ring
- Loading branch information
Showing
17 changed files
with
256 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
/* | ||
* drivers/net/phy/micrel.c | ||
* | ||
* Driver for Micrel PHYs | ||
* | ||
* Author: David J. Choi | ||
* | ||
* Copyright (c) 2010 Micrel, Inc. | ||
* | ||
* This program is free software; you can redistribute it and/or modify it | ||
* under the terms of the GNU General Public License as published by the | ||
* Free Software Foundation; either version 2 of the License, or (at your | ||
* option) any later version. | ||
* | ||
* Support : ksz9021 , vsc8201, ks8001 | ||
*/ | ||
|
||
#include <linux/kernel.h> | ||
#include <linux/module.h> | ||
#include <linux/phy.h> | ||
|
||
#define PHY_ID_KSZ9021 0x00221611 | ||
#define PHY_ID_VSC8201 0x000FC413 | ||
#define PHY_ID_KS8001 0x0022161A | ||
|
||
|
||
static int kszphy_config_init(struct phy_device *phydev) | ||
{ | ||
return 0; | ||
} | ||
|
||
|
||
static struct phy_driver ks8001_driver = { | ||
.phy_id = PHY_ID_KS8001, | ||
.phy_id_mask = 0x00fffff0, | ||
.features = PHY_BASIC_FEATURES, | ||
.flags = PHY_POLL, | ||
.config_init = kszphy_config_init, | ||
.config_aneg = genphy_config_aneg, | ||
.read_status = genphy_read_status, | ||
.driver = { .owner = THIS_MODULE,}, | ||
}; | ||
|
||
static struct phy_driver vsc8201_driver = { | ||
.phy_id = PHY_ID_VSC8201, | ||
.name = "Micrel VSC8201", | ||
.phy_id_mask = 0x00fffff0, | ||
.features = PHY_BASIC_FEATURES, | ||
.flags = PHY_POLL, | ||
.config_init = kszphy_config_init, | ||
.config_aneg = genphy_config_aneg, | ||
.read_status = genphy_read_status, | ||
.driver = { .owner = THIS_MODULE,}, | ||
}; | ||
|
||
static struct phy_driver ksz9021_driver = { | ||
.phy_id = PHY_ID_KSZ9021, | ||
.phy_id_mask = 0x000fff10, | ||
.name = "Micrel KSZ9021 Gigabit PHY", | ||
.features = PHY_GBIT_FEATURES | SUPPORTED_Pause, | ||
.flags = PHY_POLL, | ||
.config_init = kszphy_config_init, | ||
.config_aneg = genphy_config_aneg, | ||
.read_status = genphy_read_status, | ||
.driver = { .owner = THIS_MODULE, }, | ||
}; | ||
|
||
static int __init ksphy_init(void) | ||
{ | ||
int ret; | ||
|
||
ret = phy_driver_register(&ks8001_driver); | ||
if (ret) | ||
goto err1; | ||
ret = phy_driver_register(&vsc8201_driver); | ||
if (ret) | ||
goto err2; | ||
|
||
ret = phy_driver_register(&ksz9021_driver); | ||
if (ret) | ||
goto err3; | ||
return 0; | ||
|
||
err3: | ||
phy_driver_unregister(&vsc8201_driver); | ||
err2: | ||
phy_driver_unregister(&ks8001_driver); | ||
err1: | ||
return ret; | ||
} | ||
|
||
static void __exit ksphy_exit(void) | ||
{ | ||
phy_driver_unregister(&ks8001_driver); | ||
phy_driver_unregister(&vsc8201_driver); | ||
phy_driver_unregister(&ksz9021_driver); | ||
} | ||
|
||
module_init(ksphy_init); | ||
module_exit(ksphy_exit); | ||
|
||
MODULE_DESCRIPTION("Micrel PHY driver"); | ||
MODULE_AUTHOR("David J. Choi"); | ||
MODULE_LICENSE("GPL"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.