aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/mcdi_phy.c
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
committerGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
commitc71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch)
treeecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /drivers/net/sfc/mcdi_phy.c
parentea53c912f8a86a8567697115b6a0d8152beee5c8 (diff)
parent6a00f206debf8a5c8899055726ad127dbeeed098 (diff)
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts: litmus/sched_cedf.c
Diffstat (limited to 'drivers/net/sfc/mcdi_phy.c')
-rw-r--r--drivers/net/sfc/mcdi_phy.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/net/sfc/mcdi_phy.c b/drivers/net/sfc/mcdi_phy.c
index 0121e71702bf..6c63ab0710af 100644
--- a/drivers/net/sfc/mcdi_phy.c
+++ b/drivers/net/sfc/mcdi_phy.c
@@ -1,6 +1,6 @@
1/**************************************************************************** 1/****************************************************************************
2 * Driver for Solarflare Solarstorm network controllers and boards 2 * Driver for Solarflare Solarstorm network controllers and boards
3 * Copyright 2009 Solarflare Communications Inc. 3 * Copyright 2009-2010 Solarflare Communications Inc.
4 * 4 *
5 * This program is free software; you can redistribute it and/or modify it 5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 as published 6 * under the terms of the GNU General Public License version 2 as published
@@ -16,7 +16,6 @@
16#include "phy.h" 16#include "phy.h"
17#include "mcdi.h" 17#include "mcdi.h"
18#include "mcdi_pcol.h" 18#include "mcdi_pcol.h"
19#include "mdio_10g.h"
20#include "nic.h" 19#include "nic.h"
21#include "selftest.h" 20#include "selftest.h"
22 21
@@ -450,7 +449,7 @@ void efx_mcdi_phy_check_fcntl(struct efx_nic *efx, u32 lpa)
450 struct efx_mcdi_phy_data *phy_cfg = efx->phy_data; 449 struct efx_mcdi_phy_data *phy_cfg = efx->phy_data;
451 u32 rmtadv; 450 u32 rmtadv;
452 451
453 /* The link partner capabilities are only relevent if the 452 /* The link partner capabilities are only relevant if the
454 * link supports flow control autonegotiation */ 453 * link supports flow control autonegotiation */
455 if (~phy_cfg->supported_cap & (1 << MC_CMD_PHY_CAP_AN_LBN)) 454 if (~phy_cfg->supported_cap & (1 << MC_CMD_PHY_CAP_AN_LBN))
456 return; 455 return;
@@ -514,7 +513,7 @@ static void efx_mcdi_phy_get_settings(struct efx_nic *efx, struct ethtool_cmd *e
514 ecmd->supported = 513 ecmd->supported =
515 mcdi_to_ethtool_cap(phy_cfg->media, phy_cfg->supported_cap); 514 mcdi_to_ethtool_cap(phy_cfg->media, phy_cfg->supported_cap);
516 ecmd->advertising = efx->link_advertising; 515 ecmd->advertising = efx->link_advertising;
517 ecmd->speed = efx->link_state.speed; 516 ethtool_cmd_speed_set(ecmd, efx->link_state.speed);
518 ecmd->duplex = efx->link_state.fd; 517 ecmd->duplex = efx->link_state.fd;
519 ecmd->port = mcdi_to_ethtool_media(phy_cfg->media); 518 ecmd->port = mcdi_to_ethtool_media(phy_cfg->media);
520 ecmd->phy_address = phy_cfg->port; 519 ecmd->phy_address = phy_cfg->port;
@@ -546,7 +545,7 @@ static int efx_mcdi_phy_set_settings(struct efx_nic *efx, struct ethtool_cmd *ec
546 caps = (ethtool_to_mcdi_cap(ecmd->advertising) | 545 caps = (ethtool_to_mcdi_cap(ecmd->advertising) |
547 1 << MC_CMD_PHY_CAP_AN_LBN); 546 1 << MC_CMD_PHY_CAP_AN_LBN);
548 } else if (ecmd->duplex) { 547 } else if (ecmd->duplex) {
549 switch (ecmd->speed) { 548 switch (ethtool_cmd_speed(ecmd)) {
550 case 10: caps = 1 << MC_CMD_PHY_CAP_10FDX_LBN; break; 549 case 10: caps = 1 << MC_CMD_PHY_CAP_10FDX_LBN; break;
551 case 100: caps = 1 << MC_CMD_PHY_CAP_100FDX_LBN; break; 550 case 100: caps = 1 << MC_CMD_PHY_CAP_100FDX_LBN; break;
552 case 1000: caps = 1 << MC_CMD_PHY_CAP_1000FDX_LBN; break; 551 case 1000: caps = 1 << MC_CMD_PHY_CAP_1000FDX_LBN; break;
@@ -554,7 +553,7 @@ static int efx_mcdi_phy_set_settings(struct efx_nic *efx, struct ethtool_cmd *ec
554 default: return -EINVAL; 553 default: return -EINVAL;
555 } 554 }
556 } else { 555 } else {
557 switch (ecmd->speed) { 556 switch (ethtool_cmd_speed(ecmd)) {
558 case 10: caps = 1 << MC_CMD_PHY_CAP_10HDX_LBN; break; 557 case 10: caps = 1 << MC_CMD_PHY_CAP_10HDX_LBN; break;
559 case 100: caps = 1 << MC_CMD_PHY_CAP_100HDX_LBN; break; 558 case 100: caps = 1 << MC_CMD_PHY_CAP_100HDX_LBN; break;
560 case 1000: caps = 1 << MC_CMD_PHY_CAP_1000HDX_LBN; break; 559 case 1000: caps = 1 << MC_CMD_PHY_CAP_1000HDX_LBN; break;
@@ -713,7 +712,8 @@ static int efx_mcdi_phy_run_tests(struct efx_nic *efx, int *results,
713 return 0; 712 return 0;
714} 713}
715 714
716const char *efx_mcdi_phy_test_name(struct efx_nic *efx, unsigned int index) 715static const char *efx_mcdi_phy_test_name(struct efx_nic *efx,
716 unsigned int index)
717{ 717{
718 struct efx_mcdi_phy_data *phy_cfg = efx->phy_data; 718 struct efx_mcdi_phy_data *phy_cfg = efx->phy_data;
719 719
@@ -739,7 +739,7 @@ const char *efx_mcdi_phy_test_name(struct efx_nic *efx, unsigned int index)
739 return NULL; 739 return NULL;
740} 740}
741 741
742struct efx_phy_operations efx_mcdi_phy_ops = { 742const struct efx_phy_operations efx_mcdi_phy_ops = {
743 .probe = efx_mcdi_phy_probe, 743 .probe = efx_mcdi_phy_probe,
744 .init = efx_port_dummy_op_int, 744 .init = efx_port_dummy_op_int,
745 .reconfigure = efx_mcdi_phy_reconfigure, 745 .reconfigure = efx_mcdi_phy_reconfigure,