提交 e5254244 编写于 作者: R Russell King 提交者: Jeff Garzik

[PATCH] smc91x: fix bank mismatch

The smc91x driver relies upon register bank 2 being selected whenever
the interrupt handler is called.  This isn't always so, especially if
we have a link change event during PHY configuration.

This results in register bank 0 being selected when the interrupt
handler is called, causing the wrong registers to be read for the
IRQ mask and status.  In turn, this causes us to spin with a
permanently asserted IRQ.

The patch ensures that smc_phy_configure always exits with register
bank 2 selected.
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: NNicolas Pitre <nico@cam.org>
Signed-off-by: NJeff Garzik <jgarzik@pobox.com>
上级 5d0571d9
......@@ -1212,6 +1212,7 @@ static void smc_phy_configure(void *data)
smc_phy_check_media(dev, 1);
smc_phy_configure_exit:
SMC_SELECT_BANK(2);
spin_unlock_irq(&lp->lock);
lp->work_pending = 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册