01-00-29
1. Max C22/C45 PHY address changed to PHY_MAX_ADDR. 2. Added error check for phydev in tc956xmac_suspend().
This commit is contained in:
parent
b25d65f4a9
commit
63bead311e
@ -1,7 +1,7 @@
|
||||
# Toshiba Electronic Devices & Storage Corporation TC956X PCIe Ethernet Host Driver
|
||||
Release Date: 01 Dec 2021
|
||||
Release Date: 03 Dec 2021
|
||||
|
||||
Release Version: V_01-00-28 : Limited-tested version
|
||||
Release Version: V_01-00-29 : Limited-tested version
|
||||
|
||||
TC956X PCIe EMAC driver is based on "Fedora 30, kernel-5.4.19".
|
||||
|
||||
@ -348,3 +348,8 @@ TC956X PCIe EMAC driver is based on "Fedora 30, kernel-5.4.19".
|
||||
## TC956X_Host_Driver_20211201_V_01-00-28:
|
||||
|
||||
1. Resetting SRAM Region before loading firmware.
|
||||
|
||||
## TC956X_Host_Driver_20211203_V_01-00-29:
|
||||
|
||||
1. Max C22/C45 PHY address changed to PHY_MAX_ADDR.
|
||||
2. Added error check for phydev in tc956xmac_suspend().
|
||||
|
@ -103,6 +103,8 @@
|
||||
* 01 Dec 2021 : 1. Resetting SRAM Region before loading firmware.
|
||||
2. Version update
|
||||
* VERSION : 01-00-28
|
||||
* 03 Dec 2021 : 1. Version update
|
||||
* VERSION : 01-00-29
|
||||
*/
|
||||
|
||||
#include <linux/clk-provider.h>
|
||||
@ -140,7 +142,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, 8};
|
||||
static const struct tc956x_version tc956x_drv_version = {0, 1, 0, 0, 2, 9};
|
||||
|
||||
static int tc956xmac_pm_usage_counter; /* Device Usage Counter */
|
||||
struct mutex tc956x_pm_suspend_lock; /* This mutex is shared between all available EMAC ports. */
|
||||
|
@ -100,6 +100,8 @@
|
||||
* VERSION : 01-00-27
|
||||
* 01 Dec 2021 : 1. Version update
|
||||
* VERSION : 01-00-28
|
||||
* 03 Dec 2021 : 1. Version update
|
||||
* VERSION : 01-00-29
|
||||
*/
|
||||
|
||||
#ifndef __TC956XMAC_H__
|
||||
@ -152,7 +154,7 @@
|
||||
#ifdef TC956X
|
||||
|
||||
#define TC956X_RESOURCE_NAME "tc956x_pci-eth"
|
||||
#define DRV_MODULE_VERSION "V_01-00-28"
|
||||
#define DRV_MODULE_VERSION "V_01-00-29"
|
||||
#define TC956X_FW_MAX_SIZE (64*1024)
|
||||
|
||||
#define ATR_AXI4_SLV_BASE 0x0800
|
||||
|
@ -79,6 +79,8 @@
|
||||
* VERSION : 01-00-26
|
||||
* 01 Dec 2021 : 1. Free EMAC IRQ during suspend and request EMAC IRQ during resume.
|
||||
* VERSION : 01-00-27
|
||||
* 03 Dec 2021 : 1. Added error check for phydev in tc956xmac_suspend().
|
||||
* VERSION : 01-00-29
|
||||
*/
|
||||
|
||||
#include <linux/clk.h>
|
||||
@ -10771,6 +10773,12 @@ int tc956xmac_suspend(struct device *dev)
|
||||
return 0;
|
||||
|
||||
KPRINT_INFO("---> %s : Port %d", __func__, priv->port_num);
|
||||
|
||||
if (!phydev) {
|
||||
netdev_err(priv->dev, "no phy at addr %d\n", addr);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Disabling EEE for issue in TC9560/62, to be tested for TC956X */
|
||||
if (priv->eee_enabled)
|
||||
tc956xmac_disable_eee_mode(priv);
|
||||
@ -10784,7 +10792,7 @@ int tc956xmac_suspend(struct device *dev)
|
||||
goto clean_exit;
|
||||
|
||||
/* Cancel all work-queues before suspend start only when net interface is up and running */
|
||||
if(phydev->drv != NULL) {
|
||||
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__);
|
||||
|
@ -39,6 +39,8 @@
|
||||
* 24 Nov 2021 : 1. Restricted MDIO access when no PHY found or MDIO registration fails
|
||||
* 2. Added mdio lock for making mii bus of private member to null to avoid parallel accessing to MDIO bus
|
||||
* VERSION : 01-00-23
|
||||
* 03 Dec 2021 : 1. Max C22/C45 PHY address changed to PHY_MAX_ADDR.
|
||||
* VERSION : 01-00-29
|
||||
*/
|
||||
|
||||
#include <linux/gpio/consumer.h>
|
||||
@ -457,7 +459,7 @@ int tc956xmac_mdio_register(struct net_device *ndev)
|
||||
struct tc956xmac_mdio_bus_data *mdio_bus_data = priv->plat->mdio_bus_data;
|
||||
struct device_node *mdio_node = priv->plat->mdio_node;
|
||||
struct device *dev = ndev->dev.parent;
|
||||
int addr, found, max_addr;
|
||||
int addr, found;
|
||||
|
||||
if (!mdio_bus_data)
|
||||
return 0;
|
||||
@ -474,9 +476,6 @@ int tc956xmac_mdio_register(struct net_device *ndev)
|
||||
if (priv->plat->has_xgmac) {
|
||||
new_bus->read = &tc956xmac_xgmac2_mdio_read;
|
||||
new_bus->write = &tc956xmac_xgmac2_mdio_write;
|
||||
|
||||
/* Right now only C22 phys are supported */
|
||||
max_addr = PHY_MAX_ADDR + 1;
|
||||
#ifndef TC956X
|
||||
/* Check if DT specified an unsupported phy addr */
|
||||
if (priv->plat->phy_addr > MII_XGMAC_MAX_C22ADDR)
|
||||
@ -488,7 +487,6 @@ int tc956xmac_mdio_register(struct net_device *ndev)
|
||||
else {
|
||||
new_bus->read = &tc956xmac_mdio_read;
|
||||
new_bus->write = &tc956xmac_mdio_write;
|
||||
max_addr = PHY_MAX_ADDR;
|
||||
}
|
||||
#endif /* TC956X_UNSUPPORTED_UNTESTED_FEATURE */
|
||||
|
||||
@ -519,7 +517,7 @@ int tc956xmac_mdio_register(struct net_device *ndev)
|
||||
goto bus_register_done;
|
||||
#endif
|
||||
found = 0;
|
||||
for (addr = 0; addr < max_addr; addr++) {
|
||||
for (addr = 0; addr < PHY_MAX_ADDR; addr++) {
|
||||
|
||||
#ifdef TC956X
|
||||
int phy_reg_read;
|
||||
@ -533,10 +531,10 @@ int tc956xmac_mdio_register(struct net_device *ndev)
|
||||
if (phy_reg_read != 0x0000 && phy_reg_read != 0xffff) {
|
||||
if (priv->plat->c45_needed == true)
|
||||
NMSGPR_ALERT(priv->device,
|
||||
"TC956X: Phy detected C45 at ID/ADDR %d\n", addr);
|
||||
"TC956X: [1] Phy detected C45 at ID/ADDR %d\n", addr);
|
||||
else
|
||||
NMSGPR_ALERT(priv->device,
|
||||
"TC956X: Phy detected C22 at ID/ADDR %d\n", addr);
|
||||
"TC956X: [1] Phy detected C22 at ID/ADDR %d\n", addr);
|
||||
#else
|
||||
struct phy_device *phydev = mdiobus_get_phy(new_bus, addr);
|
||||
|
||||
@ -577,7 +575,7 @@ int tc956xmac_mdio_register(struct net_device *ndev)
|
||||
}
|
||||
/* If C22 PHY is not found, probe for C45 based PHY*/
|
||||
if (!found) {
|
||||
for (addr = 0; addr < max_addr; addr++) {
|
||||
for (addr = 0; addr < PHY_MAX_ADDR; addr++) {
|
||||
|
||||
#ifdef TC956X
|
||||
int phy_reg_read1, phy_reg_read2, phy_id;
|
||||
@ -592,7 +590,7 @@ int tc956xmac_mdio_register(struct net_device *ndev)
|
||||
phy_id = ((phy_reg_read1 << 16) | phy_reg_read2);
|
||||
if (phy_id != 0x00000000 && phy_id != 0xffffffff) {
|
||||
NMSGPR_ALERT(priv->device,
|
||||
"TC956X: Phy detected C45 at ID/ADDR %d\n", addr);
|
||||
"TC956X: [2] Phy detected C45 at ID/ADDR %d\n", addr);
|
||||
|
||||
#else
|
||||
struct phy_device *phydev = mdiobus_get_phy(new_bus, addr);
|
||||
|
Loading…
Reference in New Issue
Block a user