Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

BNX2X: prevent ethtool from setting port type

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>

authored by

Eliezer Tamir and committed by
David S. Miller
2572c149 53a6201f

+2 -34
+2 -34
drivers/net/bnx2x.c
··· 63 63 #include "bnx2x.h" 64 64 #include "bnx2x_init.h" 65 65 66 - #define DRV_MODULE_VERSION "1.40.22" 67 - #define DRV_MODULE_RELDATE "2007/11/27" 66 + #define DRV_MODULE_VERSION "1.42.3" 67 + #define DRV_MODULE_RELDATE "2008/3/9" 68 68 #define BNX2X_BC_VER 0x040200 69 69 70 70 /* Time in jiffies before concluding the transmitter is hung. */ ··· 8007 8007 cmd->cmd, cmd->supported, cmd->advertising, cmd->speed, 8008 8008 cmd->duplex, cmd->port, cmd->phy_address, cmd->transceiver, 8009 8009 cmd->autoneg, cmd->maxtxpkt, cmd->maxrxpkt); 8010 - 8011 - switch (cmd->port) { 8012 - case PORT_TP: 8013 - if (!(bp->supported & SUPPORTED_TP)) { 8014 - DP(NETIF_MSG_LINK, "TP not supported\n"); 8015 - return -EINVAL; 8016 - } 8017 - 8018 - if (bp->phy_flags & PHY_XGXS_FLAG) { 8019 - bnx2x_link_reset(bp); 8020 - bnx2x_link_settings_supported(bp, SWITCH_CFG_1G); 8021 - bnx2x_phy_deassert(bp); 8022 - } 8023 - break; 8024 - 8025 - case PORT_FIBRE: 8026 - if (!(bp->supported & SUPPORTED_FIBRE)) { 8027 - DP(NETIF_MSG_LINK, "FIBRE not supported\n"); 8028 - return -EINVAL; 8029 - } 8030 - 8031 - if (!(bp->phy_flags & PHY_XGXS_FLAG)) { 8032 - bnx2x_link_reset(bp); 8033 - bnx2x_link_settings_supported(bp, SWITCH_CFG_10G); 8034 - bnx2x_phy_deassert(bp); 8035 - } 8036 - break; 8037 - 8038 - default: 8039 - DP(NETIF_MSG_LINK, "Unknown port type\n"); 8040 - return -EINVAL; 8041 - } 8042 8010 8043 8011 if (cmd->autoneg == AUTONEG_ENABLE) { 8044 8012 if (!(bp->supported & SUPPORTED_Autoneg)) {