net: txgbe: Remove specified SP type

Since AML devices are going to reuse some definitions, remove the "SP"
qualifier from these definitions.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/8EF712EC14B8FF70+20250521064402.22348-2-jiawenwu@trustnetic.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
Jiawen Wu
2025-05-21 14:43:54 +08:00
committed by Paolo Abeni
parent e8c35bfce4
commit 893e4656d4
5 changed files with 32 additions and 32 deletions

View File

@@ -840,11 +840,11 @@ enum wx_mac_type {
wx_mac_aml,
};
enum sp_media_type {
sp_media_unknown = 0,
sp_media_fiber,
sp_media_copper,
sp_media_backplane
enum wx_media_type {
wx_media_unknown = 0,
wx_media_fiber,
wx_media_copper,
wx_media_backplane
};
enum em_mac_type {
@@ -1211,7 +1211,7 @@ struct wx {
struct wx_mbx_info mbx;
struct wx_mac_info mac;
enum em_mac_type mac_type;
enum sp_media_type media_type;
enum wx_media_type media_type;
struct wx_eeprom_info eeprom;
struct wx_addr_filter_info addr_ctrl;
struct wx_fc_info fc;

View File

@@ -188,7 +188,7 @@ int txgbe_reset_hw(struct wx *wx)
if (status != 0)
return status;
if (wx->media_type != sp_media_copper) {
if (wx->media_type != wx_media_copper) {
u32 val;
val = WX_MIS_RST_LAN_RST(wx->bus.func);
@@ -218,7 +218,7 @@ int txgbe_reset_hw(struct wx *wx)
* clear the multicast table. Also reset num_rar_entries to 128,
* since we modify this value when programming the SAN MAC address.
*/
wx->mac.num_rar_entries = TXGBE_SP_RAR_ENTRIES;
wx->mac.num_rar_entries = TXGBE_RAR_ENTRIES;
wx_init_rx_addrs(wx);
pci_set_master(wx->pdev);

View File

@@ -251,25 +251,25 @@ static void txgbe_init_type_code(struct wx *wx)
switch (device_type) {
case TXGBE_ID_SFP:
wx->media_type = sp_media_fiber;
wx->media_type = wx_media_fiber;
break;
case TXGBE_ID_XAUI:
case TXGBE_ID_SGMII:
wx->media_type = sp_media_copper;
wx->media_type = wx_media_copper;
break;
case TXGBE_ID_KR_KX_KX4:
case TXGBE_ID_MAC_XAUI:
case TXGBE_ID_MAC_SGMII:
wx->media_type = sp_media_backplane;
wx->media_type = wx_media_backplane;
break;
case TXGBE_ID_SFI_XAUI:
if (wx->bus.func == 0)
wx->media_type = sp_media_fiber;
wx->media_type = wx_media_fiber;
else
wx->media_type = sp_media_copper;
wx->media_type = wx_media_copper;
break;
default:
wx->media_type = sp_media_unknown;
wx->media_type = wx_media_unknown;
break;
}
}
@@ -283,13 +283,13 @@ static int txgbe_sw_init(struct wx *wx)
u16 msix_count = 0;
int err;
wx->mac.num_rar_entries = TXGBE_SP_RAR_ENTRIES;
wx->mac.max_tx_queues = TXGBE_SP_MAX_TX_QUEUES;
wx->mac.max_rx_queues = TXGBE_SP_MAX_RX_QUEUES;
wx->mac.mcft_size = TXGBE_SP_MC_TBL_SIZE;
wx->mac.vft_size = TXGBE_SP_VFT_TBL_SIZE;
wx->mac.rx_pb_size = TXGBE_SP_RX_PB_SIZE;
wx->mac.tx_pb_size = TXGBE_SP_TDB_PB_SZ;
wx->mac.num_rar_entries = TXGBE_RAR_ENTRIES;
wx->mac.max_tx_queues = TXGBE_MAX_TXQ;
wx->mac.max_rx_queues = TXGBE_MAX_RXQ;
wx->mac.mcft_size = TXGBE_MC_TBL_SIZE;
wx->mac.vft_size = TXGBE_VFT_TBL_SIZE;
wx->mac.rx_pb_size = TXGBE_RX_PB_SIZE;
wx->mac.tx_pb_size = TXGBE_TDB_PB_SZ;
/* PCI config space info */
err = wx_sw_init(wx);

View File

@@ -165,7 +165,7 @@ static struct phylink_pcs *txgbe_phylink_mac_select(struct phylink_config *confi
struct wx *wx = phylink_to_wx(config);
struct txgbe *txgbe = wx->priv;
if (wx->media_type != sp_media_copper)
if (wx->media_type != wx_media_copper)
return txgbe->pcs;
return NULL;
@@ -278,7 +278,7 @@ static int txgbe_phylink_init(struct txgbe *txgbe)
config->mac_capabilities = MAC_10000FD | MAC_1000FD | MAC_100FD |
MAC_SYM_PAUSE | MAC_ASYM_PAUSE;
if (wx->media_type == sp_media_copper) {
if (wx->media_type == wx_media_copper) {
phy_mode = PHY_INTERFACE_MODE_XAUI;
__set_bit(PHY_INTERFACE_MODE_XAUI, config->supported_interfaces);
} else {
@@ -576,7 +576,7 @@ int txgbe_init_phy(struct txgbe *txgbe)
if (wx->mac.type == wx_mac_aml)
return 0;
if (txgbe->wx->media_type == sp_media_copper)
if (txgbe->wx->media_type == wx_media_copper)
return txgbe_ext_phy_init(txgbe);
ret = txgbe_swnodes_register(txgbe);
@@ -643,7 +643,7 @@ void txgbe_remove_phy(struct txgbe *txgbe)
if (txgbe->wx->mac.type == wx_mac_aml)
return;
if (txgbe->wx->media_type == sp_media_copper) {
if (txgbe->wx->media_type == wx_media_copper) {
phylink_disconnect_phy(txgbe->wx->phylink);
phylink_destroy(txgbe->wx->phylink);
return;

View File

@@ -173,13 +173,13 @@
#define TXGBE_MAX_RX_QUEUES (TXGBE_MAX_FDIR_INDICES + 1)
#define TXGBE_MAX_TX_QUEUES (TXGBE_MAX_FDIR_INDICES + 1)
#define TXGBE_SP_MAX_TX_QUEUES 128
#define TXGBE_SP_MAX_RX_QUEUES 128
#define TXGBE_SP_RAR_ENTRIES 128
#define TXGBE_SP_MC_TBL_SIZE 128
#define TXGBE_SP_VFT_TBL_SIZE 128
#define TXGBE_SP_RX_PB_SIZE 512
#define TXGBE_SP_TDB_PB_SZ (160 * 1024) /* 160KB Packet Buffer */
#define TXGBE_MAX_TXQ 128
#define TXGBE_MAX_RXQ 128
#define TXGBE_RAR_ENTRIES 128
#define TXGBE_MC_TBL_SIZE 128
#define TXGBE_VFT_TBL_SIZE 128
#define TXGBE_RX_PB_SIZE 512
#define TXGBE_TDB_PB_SZ (160 * 1024) /* 160KB Packet Buffer */
#define TXGBE_MAX_VFS_DRV_LIMIT 63