V_01-00-20
1. Added separate control functions for MAC TX and RX start/stop. 2. Stopped disabling/enabling of MAC TX during Link down/up. 3. Disabled link state latency configuration for all PCIe ports by default
This commit is contained in:
parent
8cde5a6522
commit
25fdfed826
10
Readme.md
10
Readme.md
@ -1,7 +1,7 @@
|
||||
# Toshiba Electronic Devices & Storage Corporation TC956X PCIe Ethernet Host Driver
|
||||
Release Date: 26 Oct 2021
|
||||
Release Date: 04 Nov 2021
|
||||
|
||||
Release Version: V_01-00-19 : Limited-tested version
|
||||
Release Version: V_01-00-20 : Limited-tested version
|
||||
|
||||
TC956X PCIe EMAC driver is based on "Fedora 30, kernel-5.4.19".
|
||||
|
||||
@ -282,3 +282,9 @@ ethtool -s eth0 wol pg
|
||||
1. Added PM support for suspend-resume.
|
||||
2. Added WOL Interrupt Handler and ethtool Support.
|
||||
3. Updated EEE support for PHY and MAC Control. (EEE macros are not enabled as EEE LPI interrupts disable are still under validation)
|
||||
|
||||
## TC956X_Host_Driver_20211104_V_01-00-20:
|
||||
|
||||
1. Added separate control functions for MAC TX and RX start/stop.
|
||||
2. Stopped disabling/enabling of MAC TX during Link down/up.
|
||||
3. Disabled link state latency configuration for all PCIe ports by default
|
||||
|
4
common.h
4
common.h
@ -57,6 +57,8 @@
|
||||
: 2. Added enums for PM Suspend-Resume.
|
||||
: 3. Added macros for EEE, LPI Timer and MAC RST Status.
|
||||
* VERSION : 01-00-19
|
||||
* 04 Nov 2021 : 1. Disabled link state latency configuration for all PCIe ports by default
|
||||
* VERSION : 01-00-20
|
||||
*/
|
||||
|
||||
#ifndef __COMMON_H__
|
||||
@ -98,7 +100,7 @@ enum TC956X_PORT_PM_STATE {
|
||||
SUSPEND = 0,
|
||||
RESUME,
|
||||
};
|
||||
#define TC956X_PCIE_LINK_STATE_LATENCY_CTRL
|
||||
//#define TC956X_PCIE_LINK_STATE_LATENCY_CTRL
|
||||
|
||||
#define DISABLE 0
|
||||
#define ENABLE 1
|
||||
|
@ -52,6 +52,8 @@
|
||||
* VERSION : 01-00-16
|
||||
* 26 Oct 2021 : 1. Added EEE print in host IRQ and updated EEE configuration.
|
||||
* VERSION : 01-00-19
|
||||
* 04 Nov 2021 : 1. Added separate control functons for MAC TX and RX start/stop
|
||||
* VERSION : 01-00-20
|
||||
*/
|
||||
|
||||
#include <linux/bitrev.h>
|
||||
@ -147,6 +149,34 @@ static void dwxgmac2_set_mac(struct tc956xmac_priv *priv, void __iomem *ioaddr,
|
||||
writel(rx, ioaddr + XGMAC_RX_CONFIG);
|
||||
}
|
||||
|
||||
static void dwxgmac2_set_mac_tx(struct tc956xmac_priv *priv, void __iomem *ioaddr,
|
||||
bool enable)
|
||||
{
|
||||
u32 tx = readl(ioaddr + XGMAC_TX_CONFIG);
|
||||
|
||||
if (enable) {
|
||||
tx |= XGMAC_CONFIG_TE;
|
||||
} else {
|
||||
tx &= ~XGMAC_CONFIG_TE;
|
||||
}
|
||||
|
||||
writel(tx, ioaddr + XGMAC_TX_CONFIG);
|
||||
}
|
||||
|
||||
static void dwxgmac2_set_mac_rx(struct tc956xmac_priv *priv, void __iomem *ioaddr,
|
||||
bool enable)
|
||||
{
|
||||
u32 rx = readl(ioaddr + XGMAC_RX_CONFIG);
|
||||
|
||||
if (enable) {
|
||||
rx |= XGMAC_CONFIG_RE;
|
||||
} else {
|
||||
rx &= ~XGMAC_CONFIG_RE;
|
||||
}
|
||||
|
||||
writel(rx, ioaddr + XGMAC_RX_CONFIG);
|
||||
}
|
||||
|
||||
static int dwxgmac2_rx_ipc(struct tc956xmac_priv *priv, struct mac_device_info *hw)
|
||||
{
|
||||
void __iomem *ioaddr = hw->pcsr;
|
||||
@ -2734,6 +2764,8 @@ static void tc956x_enable_jumbo_frm(struct tc956xmac_priv *priv,
|
||||
const struct tc956xmac_ops dwxgmac210_ops = {
|
||||
.core_init = dwxgmac2_core_init,
|
||||
.set_mac = dwxgmac2_set_mac,
|
||||
.set_mac_tx = dwxgmac2_set_mac_tx,
|
||||
.set_mac_rx = dwxgmac2_set_mac_rx,
|
||||
.rx_ipc = dwxgmac2_rx_ipc,
|
||||
.rx_queue_enable = dwxgmac2_rx_queue_enable,
|
||||
.rx_queue_prio = dwxgmac2_rx_queue_prio,
|
||||
|
10
hwif.h
10
hwif.h
@ -37,6 +37,8 @@
|
||||
* 3. Removed IOCTL TC956XMAC_VLAN_STRIP_CONFIG.
|
||||
* 4. Removed "Disable VLAN Filter" option in IOCTL TC956XMAC_VLAN_FILTERING.
|
||||
* VERSION : 01-00-13
|
||||
* 04 Nov 2021 : 1. Added separate control functons for MAC TX and RX start/stop
|
||||
* VERSION : 01-00-20
|
||||
*/
|
||||
|
||||
#ifndef __TC956XMAC_HWIF_H__
|
||||
@ -338,6 +340,10 @@ struct tc956xmac_ops {
|
||||
void (*core_init)(struct tc956xmac_priv *priv, struct mac_device_info *hw, struct net_device *dev);
|
||||
/* Enable the MAC RX/TX */
|
||||
void (*set_mac)(struct tc956xmac_priv *priv, void __iomem *ioaddr, bool enable);
|
||||
/* Start/Stop the MAC TX */
|
||||
void (*set_mac_tx)(struct tc956xmac_priv *priv, void __iomem *ioaddr, bool enable);
|
||||
/* Start/Stop the MAC RX */
|
||||
void (*set_mac_rx)(struct tc956xmac_priv *priv, void __iomem *ioaddr, bool enable);
|
||||
/* Enable and verify that the IPC module is supported */
|
||||
int (*rx_ipc)(struct tc956xmac_priv *priv, struct mac_device_info *hw);
|
||||
/* Enable RX Queues */
|
||||
@ -458,6 +464,10 @@ struct tc956xmac_ops {
|
||||
tc956xmac_do_void_callback(__priv, mac, core_init, __args)
|
||||
#define tc956xmac_mac_set(__priv, __args...) \
|
||||
tc956xmac_do_void_callback(__priv, mac, set_mac, __args)
|
||||
#define tc956xmac_mac_set_tx(__priv, __args...) \
|
||||
tc956xmac_do_void_callback(__priv, mac, set_mac_tx, __args)
|
||||
#define tc956xmac_mac_set_rx(__priv, __args...) \
|
||||
tc956xmac_do_void_callback(__priv, mac, set_mac_rx, __args)
|
||||
#define tc956xmac_rx_ipc(__priv, __args...) \
|
||||
tc956xmac_do_callback(__priv, mac, rx_ipc, __args)
|
||||
#define tc956xmac_rx_queue_enable(__priv, __args...) \
|
||||
|
@ -78,6 +78,8 @@
|
||||
3. Added platform api calls.
|
||||
4. Version update
|
||||
* VERSION : 01-00-19
|
||||
* 04 Nov 2021 : 1. Version update
|
||||
* VERSION : 01-00-20
|
||||
*/
|
||||
|
||||
#include <linux/clk-provider.h>
|
||||
@ -110,7 +112,7 @@ static unsigned int tc956x_port1_interface = ENABLE_SGMII_INTERFACE;
|
||||
unsigned int tc956x_port0_filter_phy_pause_frames = DISABLE;
|
||||
unsigned int tc956x_port1_filter_phy_pause_frames = DISABLE;
|
||||
|
||||
static const struct tc956x_version tc956x_drv_version = {0, 1, 0, 0, 1, 9};
|
||||
static const struct tc956x_version tc956x_drv_version = {0, 1, 0, 0, 2, 0};
|
||||
|
||||
enum TC956X_INDEPENDENT_PORT_PM_SUSPEND tc956xmac_pm_suspend_counter = NO_PORT_SUSPENDED;
|
||||
struct mutex tc956x_pm_suspend_lock;
|
||||
|
@ -79,6 +79,8 @@
|
||||
: 2. Added variable for port-wise suspend status.
|
||||
: 3. Added macro to control EEE MAC Control.
|
||||
* VERSION : 01-00-19
|
||||
* 04 Nov 2021 : 1. Version update
|
||||
* VERSION : 01-00-20
|
||||
*/
|
||||
|
||||
#ifndef __TC956XMAC_H__
|
||||
@ -131,7 +133,7 @@
|
||||
#ifdef TC956X
|
||||
|
||||
#define TC956X_RESOURCE_NAME "tc956x_pci-eth"
|
||||
#define DRV_MODULE_VERSION "V_01-00-19"
|
||||
#define DRV_MODULE_VERSION "V_01-00-20"
|
||||
#define TC956X_FW_MAX_SIZE (64*1024)
|
||||
|
||||
#define ATR_AXI4_SLV_BASE 0x0800
|
||||
|
@ -65,6 +65,8 @@
|
||||
3. Changed IRQF_SHARED to IRQF_NO_SUSPEND and added WOL Interrupt Handler support.
|
||||
4. Added Platform Apis.
|
||||
* VERSION : 01-00-19
|
||||
* 04 Nov 2021 : 1. Stopped disabling/enabling of MAC TX during Link down/up.
|
||||
* VERSION : 01-00-20
|
||||
*/
|
||||
|
||||
#include <linux/clk.h>
|
||||
@ -1781,7 +1783,7 @@ static void tc956xmac_mac_link_down(struct phylink_config *config,
|
||||
{
|
||||
struct tc956xmac_priv *priv = netdev_priv(to_net_dev(config->dev));
|
||||
|
||||
tc956xmac_mac_set(priv, priv->ioaddr, false);
|
||||
tc956xmac_mac_set_rx(priv, priv->ioaddr, false);
|
||||
#ifdef EEE
|
||||
priv->eee_active = false;
|
||||
priv->eee_enabled = tc956xmac_eee_init(priv);
|
||||
@ -1875,7 +1877,7 @@ static void tc956xmac_mac_link_up(struct phylink_config *config,
|
||||
{
|
||||
struct tc956xmac_priv *priv = netdev_priv(to_net_dev(config->dev));
|
||||
|
||||
tc956xmac_mac_set(priv, priv->ioaddr, true);
|
||||
tc956xmac_mac_set_rx(priv, priv->ioaddr, true);
|
||||
#ifdef EEE
|
||||
if (phy && priv->dma_cap.eee) {
|
||||
#ifdef TC956X_5_G_2_5_G_EEE_SUPPORT
|
||||
|
Loading…
Reference in New Issue
Block a user