Skip to content

Commit

Permalink
[PATCH] smc91x: fix bank mismatch
Browse files Browse the repository at this point in the history
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: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
  • Loading branch information
Russell King authored and Jeff Garzik committed Nov 18, 2005
1 parent 5d0571d commit e525424
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/smc91x.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit e525424

Please sign in to comment.