national.c (db8c246937713e60b7628661ccc187eeb81f2bae) | national.c (116dffa0b543a2e560abd62a0b3207b1694f9ab9) |
---|---|
1/* 2 * drivers/net/phy/national.c 3 * 4 * Driver for National Semiconductor PHYs 5 * 6 * Author: Stuart Menefy <stuart.menefy@st.com> 7 * Maintainer: Giuseppe Cavallaro <peppe.cavallaro@st.com> 8 * --- 115 unchanged lines hidden (view full) --- 124{ 125 ns_giga_speed_fallback(phydev, ALL_FALLBACK_ON); 126 /* In the latest MAC or switches design, the 10 Mbps loopback 127 is desired to be turned off. */ 128 ns_10_base_t_hdx_loopack(phydev, hdx_loopback_off); 129 return ns_ack_interrupt(phydev); 130} 131 | 1/* 2 * drivers/net/phy/national.c 3 * 4 * Driver for National Semiconductor PHYs 5 * 6 * Author: Stuart Menefy <stuart.menefy@st.com> 7 * Maintainer: Giuseppe Cavallaro <peppe.cavallaro@st.com> 8 * --- 115 unchanged lines hidden (view full) --- 124{ 125 ns_giga_speed_fallback(phydev, ALL_FALLBACK_ON); 126 /* In the latest MAC or switches design, the 10 Mbps loopback 127 is desired to be turned off. */ 128 ns_10_base_t_hdx_loopack(phydev, hdx_loopback_off); 129 return ns_ack_interrupt(phydev); 130} 131 |
132static struct phy_driver dp83865_driver = { | 132static struct phy_driver dp83865_driver[] = { { |
133 .phy_id = DP83865_PHY_ID, 134 .phy_id_mask = 0xfffffff0, 135 .name = "NatSemi DP83865", 136 .features = PHY_GBIT_FEATURES | SUPPORTED_Pause | SUPPORTED_Asym_Pause, 137 .flags = PHY_HAS_INTERRUPT, 138 .config_init = ns_config_init, 139 .config_aneg = genphy_config_aneg, 140 .read_status = genphy_read_status, 141 .ack_interrupt = ns_ack_interrupt, 142 .config_intr = ns_config_intr, 143 .driver = {.owner = THIS_MODULE,} | 133 .phy_id = DP83865_PHY_ID, 134 .phy_id_mask = 0xfffffff0, 135 .name = "NatSemi DP83865", 136 .features = PHY_GBIT_FEATURES | SUPPORTED_Pause | SUPPORTED_Asym_Pause, 137 .flags = PHY_HAS_INTERRUPT, 138 .config_init = ns_config_init, 139 .config_aneg = genphy_config_aneg, 140 .read_status = genphy_read_status, 141 .ack_interrupt = ns_ack_interrupt, 142 .config_intr = ns_config_intr, 143 .driver = {.owner = THIS_MODULE,} |
144}; | 144} }; |
145 | 145 |
146static int __init ns_init(void) 147{ 148 return phy_driver_register(&dp83865_driver); 149} | 146module_phy_driver(dp83865_driver); |
150 | 147 |
151static void __exit ns_exit(void) 152{ 153 phy_driver_unregister(&dp83865_driver); 154} 155 | |
156MODULE_DESCRIPTION("NatSemi PHY driver"); 157MODULE_AUTHOR("Stuart Menefy"); 158MODULE_LICENSE("GPL"); 159 | 148MODULE_DESCRIPTION("NatSemi PHY driver"); 149MODULE_AUTHOR("Stuart Menefy"); 150MODULE_LICENSE("GPL"); 151 |
160module_init(ns_init); 161module_exit(ns_exit); 162 | |
163static struct mdio_device_id __maybe_unused ns_tbl[] = { 164 { DP83865_PHY_ID, 0xfffffff0 }, 165 { } 166}; 167 168MODULE_DEVICE_TABLE(mdio, ns_tbl); | 152static struct mdio_device_id __maybe_unused ns_tbl[] = { 153 { DP83865_PHY_ID, 0xfffffff0 }, 154 { } 155}; 156 157MODULE_DEVICE_TABLE(mdio, ns_tbl); |