Skip to content

Commit

Permalink
rt61pci: fix module reloading
Browse files Browse the repository at this point in the history
Unloading rt61pci can leave the device in such state that reloading
rt61pci would fail to reinitialize it.  Bogus data would be read from
the EEPROM and the RF version won't be recognized.

It appears that unloading rt61pci with power saving enabled would have
such effect.  To initialize the device properly, SOFT_RESET_CSR should
be set to the same value as rt61pci_config_ps() uses to wake up the
device.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Pavel Roskin authored and John W. Linville committed Aug 4, 2009
1 parent c1be515 commit 117839b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/net/wireless/rt2x00/rt61pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -2600,6 +2600,11 @@ static int rt61pci_probe_hw(struct rt2x00_dev *rt2x00dev)
{
int retval;

/*
* Disable power saving.
*/
rt2x00pci_register_write(rt2x00dev, SOFT_RESET_CSR, 0x00000007);

/*
* Allocate eeprom data.
*/
Expand Down

0 comments on commit 117839b

Please sign in to comment.