V_01-00-14
1. Updated RX Queue Threshold limits for Activating and Deactivating Flow control 2. Filtering All pause frames by default. 3. Capturing RBU status and updating to ethtool statistics for both S/W & IPA DMA channels
This commit is contained in:
parent
47410a0776
commit
47b7310e67
22
Readme.md
22
Readme.md
@ -1,7 +1,7 @@
|
||||
# Toshiba Electronic Devices & Storage Corporation TC956X PCIe Ethernet Host Driver
|
||||
Release Date: 14 Sep 2021
|
||||
Release Date: 23 Sep 2021
|
||||
|
||||
Release Version: V_01-00-13 : Limited-tested version
|
||||
Release Version: V_01-00-14 : Limited-tested version
|
||||
|
||||
TC956X PCIe EMAC driver is based on "Fedora 30, kernel-5.4.19".
|
||||
|
||||
@ -43,17 +43,17 @@ TC956X PCIe EMAC driver is based on "Fedora 30, kernel-5.4.19".
|
||||
|
||||
1. Use below commands to advertise with Autonegotiation ON for speeds 10Gbps, 5Gbps, 2.5Gbps, 1Gbps, 100Mbps and 10Mbps as ethtool speed command does not support.
|
||||
|
||||
ethtool -s <interface> advertise 0x1000 autoneg on --> changes the advertisement to 10Gbps
|
||||
ethtool -s <interface> advertise 0x7000 autoneg on --> changes the advertisement to 10Gbps
|
||||
|
||||
ethtool -s <interface> advertise 0x1000000000000 autoneg on --> changes the advertisement to 5Gbps
|
||||
ethtool -s <interface> advertise 0x1000000006000 autoneg on --> changes the advertisement to 5Gbps
|
||||
|
||||
ethtool -s <interface> advertise 0x800000000000 autoneg on --> changes the advertisement to 2.5Gbps
|
||||
ethtool -s <interface> advertise 0x800000006000 autoneg on --> changes the advertisement to 2.5Gbps
|
||||
|
||||
ethtool -s <interface> advertise 0x020 autoneg on --> changes the advertisement to 1Gbps
|
||||
ethtool -s <interface> advertise 0x6020 autoneg on --> changes the advertisement to 1Gbps
|
||||
|
||||
ethtool -s <interface> advertise 0x008 autoneg on --> changes the advertisement to 100Mbps
|
||||
ethtool -s <interface> advertise 0x6008 autoneg on --> changes the advertisement to 100Mbps
|
||||
|
||||
ethtool -s <interface> advertise 0x002 autoneg on --> changes the advertisement 10Mbps
|
||||
ethtool -s <interface> advertise 0x6002 autoneg on --> changes the advertisement 10Mbps
|
||||
|
||||
2. Use the below command to insert the kernel module with specific modes for interfaces:
|
||||
|
||||
@ -223,3 +223,9 @@ Default Configuraton:
|
||||
2. Added ethtool support to update "rx-vlan-offload", "rx-vlan-filter", and "tx-vlan-offload".
|
||||
3. Removed IOCTL TC956XMAC_VLAN_STRIP_CONFIG.
|
||||
4. Removed "Disable VLAN Filter" option in IOCTL TC956XMAC_VLAN_FILTERING.
|
||||
|
||||
## TC956X_Host_Driver_20210923_V_01-00-14:
|
||||
|
||||
1. Updated RX Queue Threshold limits for Activating and Deactivating Flow control
|
||||
2. Filtering All pause frames by default.
|
||||
3. Capturing RBU status and updating to ethtool statistics for both S/W & IPA DMA channels
|
||||
|
4
common.h
4
common.h
@ -44,6 +44,8 @@
|
||||
* VERSION : 01-00-06
|
||||
* 02 Sep 2021 : 1. Configuration of Link state L0 and L1 transaction delay for PCIe switch ports & Endpoint.
|
||||
* VERSION : 01-00-11
|
||||
* 23 Sep 2021 : 1. Enabling MSI MASK for MAC EVENT Interrupt to process RBU status and update to ethtool statistics
|
||||
* VERSION : 01-00-14
|
||||
*/
|
||||
|
||||
#ifndef __COMMON_H__
|
||||
@ -986,7 +988,7 @@ entry delay = n * 256 ns */
|
||||
#define TC956X_MSI_PF1 (0x000)
|
||||
#endif
|
||||
|
||||
#define ENABLE_MSI_INTR (0x17FFF9)
|
||||
#define ENABLE_MSI_INTR (0x17FFFD)
|
||||
|
||||
#define TC956X_MSI_OUT_EN_OFFSET(pf_id) (TC956X_MSI_BASE + \
|
||||
(pf_id * TC956X_MSI_PF1) + (0x0000))
|
||||
|
@ -45,6 +45,8 @@
|
||||
* 3. Removed IOCTL TC956XMAC_VLAN_STRIP_CONFIG.
|
||||
* 4. Removed "Disable VLAN Filter" option in IOCTL TC956XMAC_VLAN_FILTERING.
|
||||
* VERSION : 01-00-13
|
||||
* 23 Sep 2021 : 1. Filtering All pause frames by default
|
||||
* VERSION : 01-00-14
|
||||
*/
|
||||
|
||||
#include <linux/bitrev.h>
|
||||
@ -822,7 +824,7 @@ static int tc956x_add_actual_mac_table(struct net_device *dev,
|
||||
KPRINT_INFO("Space is not available in MAC_Table\n");
|
||||
KPRINT_INFO("Enabling the promisc mode\n");
|
||||
value = readl(ioaddr + XGMAC_PACKET_FILTER);
|
||||
value |= XGMAC_FILTER_RA;
|
||||
value |= XGMAC_FILTER_PR;
|
||||
writel(value, ioaddr + XGMAC_PACKET_FILTER);
|
||||
}
|
||||
return ret_value;
|
||||
@ -947,7 +949,7 @@ static void dwxgmac2_set_filter(struct tc956xmac_priv *priv, struct mac_device_i
|
||||
value |= XGMAC_FILTER_HPF;
|
||||
writel(value, ioaddr + XGMAC_PACKET_FILTER);
|
||||
if (dev->flags & IFF_PROMISC) {
|
||||
value |= XGMAC_FILTER_RA;
|
||||
value |= XGMAC_FILTER_PR;
|
||||
writel(value, ioaddr + XGMAC_PACKET_FILTER);
|
||||
} else if (dev->flags & IFF_ALLMULTI) {
|
||||
value |= XGMAC_FILTER_PM;
|
||||
|
@ -34,6 +34,10 @@
|
||||
* VERSION : 01-00-02
|
||||
* 20 Jul 2021 : 1. Debug prints removed
|
||||
* VERSION : 01-00-03
|
||||
* 23 Sep 2021 : 1. Updating RX Queue Threshold Limits for Flow control
|
||||
* Threshold Limit for Activating Flow control
|
||||
* Threshold Limit for Deactivating Flow control
|
||||
* VERSION : 01-00-14
|
||||
*/
|
||||
|
||||
#include <linux/iopoll.h>
|
||||
@ -266,10 +270,10 @@ static void dwxgmac2_dma_rx_mode(struct tc956xmac_priv *priv,
|
||||
break;
|
||||
|
||||
default:
|
||||
/* 7K Clear Trigger when ~1/4th of Q0 is filled */
|
||||
rfd = 0x0E;
|
||||
/* 2.5K Trigger when ~3/4th of Q0 is filled */
|
||||
rfa = 0x03;
|
||||
/* 13K Clear Trigger when Q(x) is filled with Max Size - 13K */
|
||||
rfd = 24;
|
||||
/* 13K Trigger when Q(x) is filled with Max Size - 13K */
|
||||
rfa = 24;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -60,6 +60,8 @@
|
||||
* VERSION : 01-00-12
|
||||
* 14 Sep 2021 : 1. Version update
|
||||
* VERSION : 01-00-13
|
||||
* 23 Sep 2021 : 1. Version update
|
||||
* VERSION : 01-00-14
|
||||
*/
|
||||
|
||||
#include <linux/clk-provider.h>
|
||||
@ -89,7 +91,7 @@ static unsigned int tc956x_speed = 3;
|
||||
static unsigned int tc956x_port0_interface = ENABLE_XFI_INTERFACE;
|
||||
static unsigned int tc956x_port1_interface = ENABLE_SGMII_INTERFACE;
|
||||
|
||||
static const struct tc956x_version tc956x_drv_version = {0, 1, 0, 0, 1, 3};
|
||||
static const struct tc956x_version tc956x_drv_version = {0, 1, 0, 0, 1, 4};
|
||||
|
||||
/*
|
||||
* This struct is used to associate PCI Function of MAC controller on a board,
|
||||
|
@ -62,6 +62,8 @@
|
||||
* VERSION : 01-00-12
|
||||
* 14 Sep 2021 : 1. Version update
|
||||
* VERSION : 01-00-13
|
||||
* 23 Sep 2021 : 1. Version update
|
||||
* VERSION : 01-00-14
|
||||
*/
|
||||
|
||||
#ifndef __TC956XMAC_H__
|
||||
@ -110,7 +112,7 @@
|
||||
#ifdef TC956X
|
||||
|
||||
#define TC956X_RESOURCE_NAME "tc956x_pci-eth"
|
||||
#define DRV_MODULE_VERSION "V_01-00-13"
|
||||
#define DRV_MODULE_VERSION "V_01-00-14"
|
||||
#define TC956X_FW_MAX_SIZE (64*1024)
|
||||
|
||||
#define ATR_AXI4_SLV_BASE 0x0800
|
||||
|
@ -56,6 +56,8 @@
|
||||
* 3. Removed IOCTL TC956XMAC_VLAN_STRIP_CONFIG.
|
||||
* 4. Removed "Disable VLAN Filter" option in IOCTL TC956XMAC_VLAN_FILTERING.
|
||||
* VERSION : 01-00-13
|
||||
* 23 Sep 2021 : 1. Capturing RBU status using MAC EVENT Interupt and updating to ethtool statistics for both S/W & IPA DMA channels
|
||||
* VERSION : 01-00-14
|
||||
*/
|
||||
|
||||
#include <linux/clk.h>
|
||||
@ -3920,6 +3922,7 @@ static int tc956xmac_open(struct net_device *dev)
|
||||
rd_val |= (1 << MSI_INT_EXT_PHY);
|
||||
}
|
||||
|
||||
/* rd_val |= (1 << 2); *//* Disable MSI for MAC EVENT Interrupt */
|
||||
/* Disable MAC Event and XPCS interrupt */
|
||||
rd_val = ENABLE_MSI_INTR & (~rd_val);
|
||||
|
||||
@ -5432,6 +5435,7 @@ static irqreturn_t tc956xmac_interrupt(int irq, void *dev_id)
|
||||
u32 queue;
|
||||
bool xmac;
|
||||
u32 val = 0;
|
||||
uint32_t uiIntSts, uiIntclr = 0;
|
||||
|
||||
xmac = priv->plat->has_gmac4 || priv->plat->has_xgmac;
|
||||
#ifdef TC956X
|
||||
@ -5480,6 +5484,17 @@ static irqreturn_t tc956xmac_interrupt(int irq, void *dev_id)
|
||||
if (val & (1 << 24))
|
||||
priv->xstats.sw_msi_n++;
|
||||
|
||||
/* Checking if any RBUs occurred and updating the statistics corresponding to channel */
|
||||
|
||||
for (queue = 0; queue < queues_count; queue++) {
|
||||
uiIntSts = readl(priv->ioaddr + XGMAC_DMA_CH_STATUS(queue));
|
||||
if(uiIntSts & XGMAC_RBU) {
|
||||
priv->xstats.rx_buf_unav_irq[queue]++;
|
||||
uiIntclr |= XGMAC_RBU;
|
||||
}
|
||||
writel(uiIntclr, (priv->ioaddr + XGMAC_DMA_CH_STATUS(queue)));
|
||||
}
|
||||
|
||||
/* To handle GMAC own interrupts */
|
||||
if ((priv->plat->has_gmac) || xmac) {
|
||||
int status = tc956xmac_host_irq_status(priv, priv->hw, &priv->xstats);
|
||||
|
Loading…
Reference in New Issue
Block a user