Skip to content

Commit

Permalink
BNX2X: prevent ethtool from setting port type
Browse files Browse the repository at this point in the history
On 10GBaseT boards setting the type to TP will cause the driver to try
to configure 1GBaseT.
Since there are currently no boards that support setting of the port
type, disable this for now.

Signed-off-by: Eliezer Tamir <eliezert@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Eliezer Tamir authored and davem330 committed Mar 23, 2008
1 parent 53a6201 commit 2572c14
Showing 1 changed file with 2 additions and 34 deletions.
36 changes: 2 additions & 34 deletions drivers/net/bnx2x.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@
#include "bnx2x.h"
#include "bnx2x_init.h"

#define DRV_MODULE_VERSION "1.40.22"
#define DRV_MODULE_RELDATE "2007/11/27"
#define DRV_MODULE_VERSION "1.42.3"
#define DRV_MODULE_RELDATE "2008/3/9"
#define BNX2X_BC_VER 0x040200

/* Time in jiffies before concluding the transmitter is hung. */
Expand Down Expand Up @@ -8008,38 +8008,6 @@ static int bnx2x_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
cmd->duplex, cmd->port, cmd->phy_address, cmd->transceiver,
cmd->autoneg, cmd->maxtxpkt, cmd->maxrxpkt);

switch (cmd->port) {
case PORT_TP:
if (!(bp->supported & SUPPORTED_TP)) {
DP(NETIF_MSG_LINK, "TP not supported\n");
return -EINVAL;
}

if (bp->phy_flags & PHY_XGXS_FLAG) {
bnx2x_link_reset(bp);
bnx2x_link_settings_supported(bp, SWITCH_CFG_1G);
bnx2x_phy_deassert(bp);
}
break;

case PORT_FIBRE:
if (!(bp->supported & SUPPORTED_FIBRE)) {
DP(NETIF_MSG_LINK, "FIBRE not supported\n");
return -EINVAL;
}

if (!(bp->phy_flags & PHY_XGXS_FLAG)) {
bnx2x_link_reset(bp);
bnx2x_link_settings_supported(bp, SWITCH_CFG_10G);
bnx2x_phy_deassert(bp);
}
break;

default:
DP(NETIF_MSG_LINK, "Unknown port type\n");
return -EINVAL;
}

if (cmd->autoneg == AUTONEG_ENABLE) {
if (!(bp->supported & SUPPORTED_Autoneg)) {
DP(NETIF_MSG_LINK, "Aotoneg not supported\n");
Expand Down

0 comments on commit 2572c14

Please sign in to comment.