V_01-00-47

1. Disable MSI and flush phy work queue during driver release.
This commit is contained in:
TC956X 2022-04-05 14:35:52 +09:00 committed by jianzhou
parent d41713507e
commit d052efb32a
4 changed files with 29 additions and 4 deletions

View File

@ -1,7 +1,7 @@
# Toshiba Electronic Devices & Storage Corporation TC956X PCIe Ethernet Host Driver
Release Date: 22 Mar 2022
Release Date: 05 Apr 2022
Release Version: V_01-00-46 : Limited-tested version
Release Version: V_01-00-47 : Limited-tested version
TC956X PCIe EMAC driver is based on "Fedora 30, kernel-5.4.19".
@ -479,3 +479,6 @@ TC956X PCIe EMAC driver is based on "Fedora 30, kernel-5.4.19".
## TC956X_Host_Driver_20220322_V_01-00-46:
1. PCI bus info updated for ethtool get driver version.
## TC956X_Host_Driver_20220405_V_01-00-47:
1. Disable MSI and flush phy work queue during driver release.

View File

@ -151,6 +151,8 @@
* VERSION : 01-00-45
* 22 Mar 2022 : 1. Version update
* VERSION : 01-00-46
* 05 Apr 2022 : 1. Version update
* VERSION : 01-00-47
*/
#include <linux/clk-provider.h>
@ -215,7 +217,7 @@ static unsigned int mac1_txq1_size = TX_QUEUE1_SIZE;
unsigned int mac0_en_lp_pause_frame_cnt = DISABLE;
unsigned int mac1_en_lp_pause_frame_cnt = DISABLE;
static const struct tc956x_version tc956x_drv_version = {0, 1, 0, 0, 4, 6};
static const struct tc956x_version tc956x_drv_version = {0, 1, 0, 0, 4, 7};
static int tc956xmac_pm_usage_counter; /* Device Usage Counter */
struct mutex tc956x_pm_suspend_lock; /* This mutex is shared between all available EMAC ports. */

View File

@ -141,6 +141,8 @@
* VERSION : 01-00-45
* 22 Mar 2022 : 1. Version update
* VERSION : 01-00-46
* 05 Apr 2022 : 1. Version update
* VERSION : 01-00-47
*/
#ifndef __TC956XMAC_H__
@ -196,7 +198,7 @@
#define IRQ_DEV_NAME(x) (((x) == RM_PF0_ID) ? ("eth0") : ("eth1"))
#define WOL_IRQ_DEV_NAME(x) (((x) == RM_PF0_ID) ? ("eth0_wol") : ("eth1_wol"))
#define DRV_MODULE_VERSION "V_01-00-46"
#define DRV_MODULE_VERSION "V_01-00-47"
#define TC956X_FW_MAX_SIZE (64*1024)
#define ATR_AXI4_SLV_BASE 0x0800

View File

@ -115,6 +115,8 @@
* 09 Mar 2022 : 1. Handling of Non S/W path DMA channel abnormal interrupts in Driver and only TI & RI interrupts handled in FW.
* 2. Reading MSI status for checking interrupt status of SW MSI.
* VERSION : 01-00-45
* 05 Apr 2022 : 1. Disable MSI and flush phy work queue during driver release.
* VERSION : 01-00-47
*/
#include <linux/clk.h>
@ -5225,6 +5227,9 @@ static int tc956xmac_open(struct net_device *dev)
static int tc956xmac_release(struct net_device *dev)
{
struct tc956xmac_priv *priv = netdev_priv(dev);
struct phy_device *phydev;
int addr = priv->plat->phy_addr;
#ifdef ENABLE_TX_TIMER
u32 chan;
#endif
@ -5242,6 +5247,10 @@ static int tc956xmac_release(struct net_device *dev)
tc956xmac_stop_all_queues(priv);
tc956xmac_disable_all_queues(priv);
/* MSI_OUT_EN: Disable all MSI*/
writel(0x00000000, priv->ioaddr + TC956X_MSI_OUT_EN_OFFSET(priv->port_num));
#ifdef ENABLE_TX_TIMER
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++) {
if (priv->plat->tx_dma_ch_owner[chan] == USE_IN_TC956X_SW)
@ -5259,6 +5268,15 @@ static int tc956xmac_release(struct net_device *dev)
free_irq(priv->lpi_irq, dev);
#endif
}
phydev = mdiobus_get_phy(priv->mii, addr);
if(phydev->drv != NULL) {
if ((true == priv->plat->phy_interrupt_mode) && (phydev->drv->config_intr)) {
DBGPR_FUNC((priv->device), "-->%s Flush work queue\n", __func__);
flush_work(&priv->emac_phy_work);
}
}
/* Stop TX/RX DMA and clear the descriptors */
tc956xmac_stop_all_dma(priv);