mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
net: mvpp2: disable force link UP during port init procedure
commit8750822448upstream. Force link UP can be enabled by bootloader during tftpboot and breaks NFS support. Force link UP disabled during port init procedure. Fixes:f84bf386f3("net: mvpp2: initialize the GoP") Signed-off-by: Stefan Chulski <stefanc@marvell.com> Acked-by: Marcin Wojtas <mw@semihalf.com> Link: https://lore.kernel.org/r/1608216735-14501-1-git-send-email-stefanc@marvell.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
5b8d3c3a9f
commit
f595e44b16
@@ -4545,7 +4545,7 @@ static int mvpp2_port_init(struct mvpp2_port *port)
|
||||
struct mvpp2 *priv = port->priv;
|
||||
struct mvpp2_txq_pcpu *txq_pcpu;
|
||||
unsigned int thread;
|
||||
int queue, err;
|
||||
int queue, err, val;
|
||||
|
||||
/* Checks for hardware constraints */
|
||||
if (port->first_rxq + port->nrxqs >
|
||||
@@ -4559,6 +4559,18 @@ static int mvpp2_port_init(struct mvpp2_port *port)
|
||||
mvpp2_egress_disable(port);
|
||||
mvpp2_port_disable(port);
|
||||
|
||||
if (mvpp2_is_xlg(port->phy_interface)) {
|
||||
val = readl(port->base + MVPP22_XLG_CTRL0_REG);
|
||||
val &= ~MVPP22_XLG_CTRL0_FORCE_LINK_PASS;
|
||||
val |= MVPP22_XLG_CTRL0_FORCE_LINK_DOWN;
|
||||
writel(val, port->base + MVPP22_XLG_CTRL0_REG);
|
||||
} else {
|
||||
val = readl(port->base + MVPP2_GMAC_AUTONEG_CONFIG);
|
||||
val &= ~MVPP2_GMAC_FORCE_LINK_PASS;
|
||||
val |= MVPP2_GMAC_FORCE_LINK_DOWN;
|
||||
writel(val, port->base + MVPP2_GMAC_AUTONEG_CONFIG);
|
||||
}
|
||||
|
||||
port->tx_time_coal = MVPP2_TXDONE_COAL_USEC;
|
||||
|
||||
port->txqs = devm_kcalloc(dev, port->ntxqs, sizeof(*port->txqs),
|
||||
|
||||
Reference in New Issue
Block a user