]> git.baikalelectronics.ru Git - kernel.git/commit
sfc: Disable VF queues during register self-test
authorBen Hutchings <bhutchings@solarflare.com>
Wed, 4 Jul 2012 02:58:33 +0000 (03:58 +0100)
committerBen Hutchings <bhutchings@solarflare.com>
Tue, 17 Jul 2012 15:12:33 +0000 (16:12 +0100)
commit7c9a49853ab72d3ad632773b9074fa14dc69caca
tree19a93bad8f6a56361b3b2f12beecae97be4d8ea0
parent800913d5976d35498ce92771732fd9a57690a0d0
sfc: Disable VF queues during register self-test

Currently VF queues and drivers may remain active during this test.
This could cause memory corruption or spurious test failures.
Therefore we reset the port/function before running these tests on
Siena.

On Falcon this doesn't work: we have to do some additional
initialisation before some blocks will work again.  So refactor the
reset/register-test sequence into an efx_nic_type method so
efx_selftest() doesn't have to consider such quirks.

In the process, fix another minor bug: Siena does not have an
'invisible' reset and the self-test currently fails to push the PHY
configuration after resetting.  Passing RESET_TYPE_ALL to
efx_reset_{down,up}() fixes this.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
drivers/net/ethernet/sfc/falcon.c
drivers/net/ethernet/sfc/net_driver.h
drivers/net/ethernet/sfc/nic.c
drivers/net/ethernet/sfc/selftest.c
drivers/net/ethernet/sfc/siena.c