Deleted Added
full compact
cxgb_mv88e1xxx.c (176472) cxgb_mv88e1xxx.c (180583)
1/**************************************************************************
2
3Copyright (c) 2007, Chelsio Inc.
4All rights reserved.
5
6Redistribution and use in source and binary forms, with or without
7modification, are permitted provided that the following conditions are met:
8

--- 14 unchanged lines hidden (view full) ---

23INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26POSSIBILITY OF SUCH DAMAGE.
27
28***************************************************************************/
29
30#include <sys/cdefs.h>
1/**************************************************************************
2
3Copyright (c) 2007, Chelsio Inc.
4All rights reserved.
5
6Redistribution and use in source and binary forms, with or without
7modification, are permitted provided that the following conditions are met:
8

--- 14 unchanged lines hidden (view full) ---

23INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26POSSIBILITY OF SUCH DAMAGE.
27
28***************************************************************************/
29
30#include <sys/cdefs.h>
31__FBSDID("$FreeBSD: head/sys/dev/cxgb/common/cxgb_mv88e1xxx.c 176472 2008-02-23 01:06:17Z kmacy $");
31__FBSDID("$FreeBSD: head/sys/dev/cxgb/common/cxgb_mv88e1xxx.c 180583 2008-07-18 06:12:31Z kmacy $");
32
33#ifdef CONFIG_DEFINED
34#include <cxgb_include.h>
35#else
36#include <dev/cxgb/cxgb_include.h>
37#endif
38
39/* Marvell PHY interrupt status bits. */

--- 254 unchanged lines hidden (view full) ---

294 .set_loopback = mv88e1xxx_set_loopback,
295 .set_speed_duplex = mv88e1xxx_set_speed_duplex,
296 .get_link_status = mv88e1xxx_get_link_status,
297 .power_down = mv88e1xxx_power_down,
298};
299#endif
300
301int t3_mv88e1xxx_phy_prep(struct cphy *phy, adapter_t *adapter, int phy_addr,
32
33#ifdef CONFIG_DEFINED
34#include <cxgb_include.h>
35#else
36#include <dev/cxgb/cxgb_include.h>
37#endif
38
39/* Marvell PHY interrupt status bits. */

--- 254 unchanged lines hidden (view full) ---

294 .set_loopback = mv88e1xxx_set_loopback,
295 .set_speed_duplex = mv88e1xxx_set_speed_duplex,
296 .get_link_status = mv88e1xxx_get_link_status,
297 .power_down = mv88e1xxx_power_down,
298};
299#endif
300
301int t3_mv88e1xxx_phy_prep(struct cphy *phy, adapter_t *adapter, int phy_addr,
302 const struct mdio_ops *mdio_ops)
302 const struct mdio_ops *mdio_ops)
303{
304 int err;
305
306 cphy_init(phy, adapter, phy_addr, &mv88e1xxx_ops, mdio_ops,
307 SUPPORTED_10baseT_Full | SUPPORTED_100baseT_Full |
308 SUPPORTED_1000baseT_Full | SUPPORTED_Autoneg | SUPPORTED_MII |
309 SUPPORTED_TP | SUPPORTED_IRQ, "10/100/1000BASE-T");
310
311 /* Configure copper PHY transmitter as class A to reduce EMI. */
312 err = mdio_write(phy, 0, MV88E1XXX_EXTENDED_ADDR, 0xb);
303{
304 int err;
305
306 cphy_init(phy, adapter, phy_addr, &mv88e1xxx_ops, mdio_ops,
307 SUPPORTED_10baseT_Full | SUPPORTED_100baseT_Full |
308 SUPPORTED_1000baseT_Full | SUPPORTED_Autoneg | SUPPORTED_MII |
309 SUPPORTED_TP | SUPPORTED_IRQ, "10/100/1000BASE-T");
310
311 /* Configure copper PHY transmitter as class A to reduce EMI. */
312 err = mdio_write(phy, 0, MV88E1XXX_EXTENDED_ADDR, 0xb);
313
314 if (!err)
315 err = mdio_write(phy, 0, MV88E1XXX_EXTENDED_DATA, 0x8004);
313 if (!err)
314 err = mdio_write(phy, 0, MV88E1XXX_EXTENDED_DATA, 0x8004);
315
316 if (!err)
317 err = mv88e1xxx_downshift_set(phy, 1); /* Enable downshift */
318 return err;
319}
316 if (!err)
317 err = mv88e1xxx_downshift_set(phy, 1); /* Enable downshift */
318 return err;
319}