V_01-00-26

1. Added PHY Workqueue Cancel during suspend only if network interface available.
This commit is contained in:
TC956X 2021-11-30 19:53:18 +05:30 committed by jianzhou
parent 73836258d0
commit 9c6c249025
4 changed files with 29 additions and 16 deletions

View File

@ -1,7 +1,7 @@
# Toshiba Electronic Devices & Storage Corporation TC956X PCIe Ethernet Host Driver
Release Date: 30 Nov 2021
Release Version: V_01-00-25 : Limited-tested version
Release Version: V_01-00-26 : Limited-tested version
TC956X PCIe EMAC driver is based on "Fedora 30, kernel-5.4.19".
@ -336,3 +336,7 @@ TC956X PCIe EMAC driver is based on "Fedora 30, kernel-5.4.19".
## TC956X_Host_Driver_20211130_V_01-00-25:
1. Print message correction for PCIe BAR size and Physical Address.
## TC956X_Host_Driver_20211130_V_01-00-26:
1. Added PHY Workqueue Cancel during suspend only if network interface available.

View File

@ -95,6 +95,9 @@
* 30 Nov 2021 : 1. Print message correction for PCIe BAR size and Physical Address.
2. Version update
* VERSION : 01-00-25
* 30 Nov 2021 : 1. Removed PHY Workqueue Cancellation before suspend.
2. Version update
* VERSION : 01-00-26
*/
#include <linux/clk-provider.h>
@ -132,7 +135,7 @@ static unsigned int tc956x_port0_lpi_auto_entry_timer = TC956XMAC_LPIET_600US;
static unsigned int tc956x_port1_enable_eee = DISABLE;
static unsigned int tc956x_port1_lpi_auto_entry_timer = TC956XMAC_LPIET_600US;
static const struct tc956x_version tc956x_drv_version = {0, 1, 0, 0, 2, 5};
static const struct tc956x_version tc956x_drv_version = {0, 1, 0, 0, 2, 6};
static int tc956xmac_pm_usage_counter; /* Device Usage Counter */
struct mutex tc956x_pm_suspend_lock; /* This mutex is shared between all available EMAC ports. */
@ -2539,9 +2542,6 @@ static int tc956x_pcie_suspend(struct device *dev)
u8 i;
u32 val;
#endif
struct phy_device *phydev; /* For cancelling Work queue */
int addr = priv->plat->phy_addr;
phydev = mdiobus_get_phy(priv->mii, addr);
DBGPR_FUNC(&(pdev->dev), "-->%s\n", __func__);
if (priv->tc956x_port_pm_suspend == true) {
@ -2550,13 +2550,6 @@ static int tc956x_pcie_suspend(struct device *dev)
}
/* Set flag to avoid queuing any more work */
priv->tc956x_port_pm_suspend = true;
/* Flush all work-queues before suspend start */
if(phydev->drv != NULL) {
if ((true == priv->plat->phy_interrupt_mode) && (phydev->drv->config_intr)) {
DBGPR_FUNC(&(pdev->dev), "%s : (Flush All PHY work-queues) \n", __func__);
cancel_work_sync(&priv->emac_phy_work);
}
}
mutex_lock(&tc956x_pm_suspend_lock);

View File

@ -94,6 +94,8 @@
* VERSION : 01-00-24
* 30 Nov 2021 : 1. Version update
* VERSION : 01-00-25
* 30 Nov 2021 : 1. Version update
* VERSION : 01-00-26
*/
#ifndef __TC956XMAC_H__
@ -146,7 +148,7 @@
#ifdef TC956X
#define TC956X_RESOURCE_NAME "tc956x_pci-eth"
#define DRV_MODULE_VERSION "V_01-00-25"
#define DRV_MODULE_VERSION "V_01-00-26"
#define TC956X_FW_MAX_SIZE (64*1024)
#define ATR_AXI4_SLV_BASE 0x0800

View File

@ -75,7 +75,9 @@
2. EEE SW timers removed. Only HW timers used to control EEE LPI entry/exit
3. USXGMII support during link change
* VERSION : 01-00-24
*/
* 30 Nov 2021 : 1. Added PHY Workqueue Cancel during suspend only if network interface available.
* VERSION : 01-00-26
*/
#include <linux/clk.h>
#include <linux/kernel.h>
@ -10760,6 +10762,9 @@ int tc956xmac_suspend(struct device *dev)
{
struct net_device *ndev = dev_get_drvdata(dev);
struct tc956xmac_priv *priv = netdev_priv(ndev);
struct phy_device *phydev; /* For cancelling Work queue */
int addr = priv->plat->phy_addr;
phydev = mdiobus_get_phy(priv->mii, addr);
if (!ndev)
return 0;
@ -10777,6 +10782,15 @@ int tc956xmac_suspend(struct device *dev)
if (!netif_running(ndev))
goto clean_exit;
/* Cancel all work-queues before suspend start only when net interface is up and running */
if(phydev->drv != NULL) {
if ((true == priv->plat->phy_interrupt_mode) &&
(phydev->drv->config_intr)) {
DBGPR_FUNC(priv->device, "%s : (Flush All PHY work-queues) \n", __func__);
cancel_work_sync(&priv->emac_phy_work);
}
}
/* Invoke device driver close only when net inteface is up and running. */
rtnl_lock();
tc956xmac_release(ndev);