net: txgbe: Remove specified SP type
authorJiawen Wu <jiawenwu@trustnetic.com>
Wed, 21 May 2025 06:43:54 +0000 (14:43 +0800)
committerPaolo Abeni <pabeni@redhat.com>
Mon, 26 May 2025 15:25:41 +0000 (17:25 +0200)
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>
drivers/net/ethernet/wangxun/libwx/wx_type.h
drivers/net/ethernet/wangxun/txgbe/txgbe_hw.c
drivers/net/ethernet/wangxun/txgbe/txgbe_main.c
drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c
drivers/net/ethernet/wangxun/txgbe/txgbe_type.h

index 8cfed5d4ebf7ecd322db10f5ce50f840191e4870..5f024f5ac3a62e6e1df67eabae32cf1648ef15dc 100644 (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;
index a054b259d435ddd2fa9768bdba759cabf39fafb5..e551ae0e20698387285d16234e95b55782d81f8f 100644 (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);
index f57d84628e071abff8a52368c5e73af3f0a40110..ea0b1cb721c86e53cec17a45daca89eab7ccee4e 100644 (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);
index 1863cfd27ee79f70c7f5f9ba2a19891735169eaf..b5ae7c25ac998e817f105d173a341e8195fca45e 100644 (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;
index 261a833085688f034435b540b4d589002ae267bc..8376248fecdab44bddb3622dc843848733cd4b5c 100644 (file)
 #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