Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 122622
b: refs/heads/master
c: e6fa2eb
h: refs/heads/master
v: v3
  • Loading branch information
Ben Hutchings authored and David S. Miller committed Dec 13, 2008
1 parent 4b57501 commit e4ce41a
Show file tree
Hide file tree
Showing 9 changed files with 468 additions and 106 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 766ca0fa6bf1600bdf4bc7726c74f14c8455c6b8
refs/heads/master: e6fa2eb789f49dc51a20d3db0d410bc8158abb43
3 changes: 3 additions & 0 deletions trunk/drivers/net/sfc/enum.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ extern const char *efx_loopback_mode_names[];
#define LOOPBACK_INTERNAL(_efx) \
(!!(LOOPBACKS_INTERNAL & LOOPBACK_MASK(_efx)))

#define LOOPBACK_CHANGED(_from, _to, _mask) \
(!!((LOOPBACK_MASK(_from) ^ LOOPBACK_MASK(_to)) & (_mask)))

#define LOOPBACK_OUT_OF(_from, _to, _mask) \
((LOOPBACK_MASK(_from) & (_mask)) && !(LOOPBACK_MASK(_to) & (_mask)))

Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/net/sfc/ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,9 @@ int efx_ethtool_set_settings(struct net_device *net_dev,
struct efx_nic *efx = netdev_priv(net_dev);
int rc;

if (EFX_WORKAROUND_13963(efx) && !ecmd->autoneg)
return -EINVAL;

/* Falcon GMAC does not support 1000Mbps HD */
if (ecmd->speed == SPEED_1000 && ecmd->duplex != DUPLEX_FULL) {
EFX_LOG(efx, "rejecting unsupported 1000Mbps HD"
Expand Down
10 changes: 7 additions & 3 deletions trunk/drivers/net/sfc/falcon.c
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,7 @@ static void falcon_handle_rx_not_ok(struct efx_rx_queue *rx_queue,
#endif

if (unlikely(rx_ev_eth_crc_err && EFX_WORKAROUND_10750(efx) &&
efx->phy_type == PHY_TYPE_10XPRESS))
efx->phy_type == PHY_TYPE_SFX7101))
tenxpress_crc_err(efx);
}

Expand Down Expand Up @@ -2245,8 +2245,12 @@ static void falcon_init_mdio(struct mii_if_info *gmii)
static int falcon_probe_phy(struct efx_nic *efx)
{
switch (efx->phy_type) {
case PHY_TYPE_10XPRESS:
efx->phy_op = &falcon_tenxpress_phy_ops;
case PHY_TYPE_SFX7101:
efx->phy_op = &falcon_sfx7101_phy_ops;
break;
case PHY_TYPE_SFT9001A:
case PHY_TYPE_SFT9001B:
efx->phy_op = &falcon_sft9001_phy_ops;
break;
case PHY_TYPE_XFP:
efx->phy_op = &falcon_xfp_phy_ops;
Expand Down
8 changes: 8 additions & 0 deletions trunk/drivers/net/sfc/mdio_10g.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
#define MDIO_MMD_TC (6)
/* Auto negotiation */
#define MDIO_MMD_AN (7)
/* Clause 22 extension */
#define MDIO_MMD_C22EXT 29

/* Generic register locations */
#define MDIO_MMDREG_CTRL1 (0)
Expand Down Expand Up @@ -82,6 +84,7 @@
#define MDIO_MMDREG_DEVS_PCS DEV_PRESENT_BIT(MDIO_MMD_PCS)
#define MDIO_MMDREG_DEVS_PMAPMD DEV_PRESENT_BIT(MDIO_MMD_PMAPMD)
#define MDIO_MMDREG_DEVS_AN DEV_PRESENT_BIT(MDIO_MMD_AN)
#define MDIO_MMDREG_DEVS_C22EXT DEV_PRESENT_BIT(MDIO_MMD_C22EXT)

/* Bits in MMDREG_SPEED */
#define MDIO_MMDREG_SPEED_10G_LBN 0
Expand Down Expand Up @@ -125,6 +128,11 @@
#define MDIO_PMAPMD_CTRL2_10_BT (0xf)
#define MDIO_PMAPMD_CTRL2_TYPE_MASK (0xf)

/* PMA 10GBT registers */
#define MDIO_PMAPMD_10GBT_TXPWR (131)
#define MDIO_PMAPMD_10GBT_TXPWR_SHORT_LBN (0)
#define MDIO_PMAPMD_10GBT_TXPWR_SHORT_WIDTH (1)

/* PHY XGXS lane state */
#define MDIO_PHYXS_LANE_STATE (0x18)
#define MDIO_PHYXS_LANE_ALIGNED_LBN (12)
Expand Down
4 changes: 3 additions & 1 deletion trunk/drivers/net/sfc/net_driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -455,9 +455,11 @@ enum phy_type {
PHY_TYPE_NONE = 0,
PHY_TYPE_CX4_RTMR = 1,
PHY_TYPE_1G_ALASKA = 2,
PHY_TYPE_10XPRESS = 3,
PHY_TYPE_SFX7101 = 3,
PHY_TYPE_XFP = 4,
PHY_TYPE_PM8358 = 6,
PHY_TYPE_SFT9001A = 8,
PHY_TYPE_SFT9001B = 10,
PHY_TYPE_MAX /* Insert any new items before this */
};

Expand Down
7 changes: 4 additions & 3 deletions trunk/drivers/net/sfc/phy.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/****************************************************************************
* Driver for Solarflare Solarstorm network controllers and boards
* Copyright 2007 Solarflare Communications Inc.
* Copyright 2007-2008 Solarflare Communications Inc.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as published
Expand All @@ -11,9 +11,10 @@
#define EFX_PHY_H

/****************************************************************************
* 10Xpress (SFX7101) PHY
* 10Xpress (SFX7101 and SFT9001) PHYs
*/
extern struct efx_phy_operations falcon_tenxpress_phy_ops;
extern struct efx_phy_operations falcon_sfx7101_phy_ops;
extern struct efx_phy_operations falcon_sft9001_phy_ops;

extern void tenxpress_phy_blink(struct efx_nic *efx, bool blink);
extern void tenxpress_crc_err(struct efx_nic *efx);
Expand Down
Loading

0 comments on commit e4ce41a

Please sign in to comment.