[PATCH] S2io: Offline diagnostics fixes
authorravinandan.arakali@neterion.com <ravinandan.arakali@neterion.com>
Tue, 18 Oct 2005 01:26:20 +0000 (18:26 -0700)
committerJeff Garzik <jgarzik@pobox.com>
Tue, 18 Oct 2005 20:58:27 +0000 (16:58 -0400)
commitad4ebed00fbf570411edbf6eb6c391e16b71df25
tree37f236700d5e831fee6bf8494cd57753231ddf14
parent59aee3c2a1e69fe5062bd1facb72d6fcea3f3f8f
[PATCH] S2io: Offline diagnostics fixes

This patch fixes the following bugs with offline diagnostics
code(run with "ethtool -t").

1. After running offline diagnostics, adapter would report
corrupted packets on receive. This was because of adapter not
being brought out of "RLDRAM test mode".
2. Current EEPROM test works only for Xframe I. Since Xframe II
uses different interface(SPI), support for this interface has
been added. Also, since SPI supports write access to all areas
of EEPROM, negative testing is done only for Xframe I.
3. Return values from subfunctions of offline diagnostics have
been corrected.
4. In register test, expected value from rx_queue_cfg register
is made to depend on adapter type.
5. After the test, need to restore values at EEPROM offsets
0x4F0 and 0x7F0. These locations were modified as part of test.
6. Use macro SPECIAL_REG_WRITE for write access to mc_rldram_test_ctrl
register. Also, couple of unnecessary writes to mc_rldram_test_ctrl
have been removed.

Signed-off-by: Ravinandan Arakali <ravinandan.arakali@neterion.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
drivers/net/s2io-regs.h
drivers/net/s2io.c