Skip to content

Commit

Permalink
Revert "net: ethernet: ti: am65-cpsw: retain PORT_VLAN_REG after susp…
Browse files Browse the repository at this point in the history
…end/resume"

This reverts commit 643cf0e.

This is to make it easier to revert the offending commit
fd23df7 ("net: ethernet: ti: am65-cpsw: Add suspend/resume support")

Signed-off-by: Roger Quadros <rogerq@kernel.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Roger Quadros authored and Jakub Kicinski committed Dec 8, 2022
1 parent 1a35259 commit 1bae8fa
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
7 changes: 0 additions & 7 deletions drivers/net/ethernet/ti/am65-cpsw-nuss.c
Original file line number Diff line number Diff line change
Expand Up @@ -2876,17 +2876,14 @@ static int am65_cpsw_nuss_suspend(struct device *dev)
struct am65_cpsw_port *port;
struct net_device *ndev;
int i, ret;
struct am65_cpsw_host *host_p = am65_common_get_host(common);

host_p->vid_context = readl(host_p->port_base + AM65_CPSW_PORT_VLAN_REG_OFFSET);
for (i = 0; i < common->port_num; i++) {
port = &common->ports[i];
ndev = port->ndev;

if (!ndev)
continue;

port->vid_context = readl(port->port_base + AM65_CPSW_PORT_VLAN_REG_OFFSET);
netif_device_detach(ndev);
if (netif_running(ndev)) {
rtnl_lock();
Expand All @@ -2910,7 +2907,6 @@ static int am65_cpsw_nuss_resume(struct device *dev)
struct am65_cpsw_port *port;
struct net_device *ndev;
int i, ret;
struct am65_cpsw_host *host_p = am65_common_get_host(common);

am65_cpts_resume(common->cpts);

Expand All @@ -2932,11 +2928,8 @@ static int am65_cpsw_nuss_resume(struct device *dev)
}

netif_device_attach(ndev);
writel(port->vid_context, port->port_base + AM65_CPSW_PORT_VLAN_REG_OFFSET);
}

writel(host_p->vid_context, host_p->port_base + AM65_CPSW_PORT_VLAN_REG_OFFSET);

return 0;
}
#endif /* CONFIG_PM_SLEEP */
Expand Down
4 changes: 0 additions & 4 deletions drivers/net/ethernet/ti/am65-cpsw-nuss.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,12 @@ struct am65_cpsw_port {
bool rx_ts_enabled;
struct am65_cpsw_qos qos;
struct devlink_port devlink_port;
/* Only for suspend resume context */
u32 vid_context;
};

struct am65_cpsw_host {
struct am65_cpsw_common *common;
void __iomem *port_base;
void __iomem *stat_base;
/* Only for suspend resume context */
u32 vid_context;
};

struct am65_cpsw_tx_chn {
Expand Down

0 comments on commit 1bae8fa

Please sign in to comment.