]> git.baikalelectronics.ru Git - kernel.git/commit
amd-xgbe: Request IRQs only after driver is fully setup
authorLendacky, Thomas <Thomas.Lendacky@amd.com>
Wed, 25 Feb 2015 19:50:12 +0000 (13:50 -0600)
committerDavid S. Miller <davem@davemloft.net>
Fri, 27 Feb 2015 22:13:02 +0000 (17:13 -0500)
commita9727af6a0f02e55113e2fb136c4c9a9d728b4ec
treecc27ab027899a71951ad4d1e26ffe2d5a84011fe
parent75aa8c19595ef22f8750fd13643b05a049ef154d
amd-xgbe: Request IRQs only after driver is fully setup

It is possible that the hardware may not have been properly shutdown
before this driver gets control, through use by firmware, for example.
Until the driver is loaded, interrupts associated with the hardware
could go pending. When the IRQs are requested napi support has not
been initialized yet, but the ISR will get control and schedule napi
processing resulting in a kernel panic because the poll routine has not
been set.

Adjust the code so that the driver is fully ready to handle and process
interrupts as soon as the IRQs are requested. This involves requesting
and freeing IRQs during start and stop processing and ordering the napi
add and delete calls appropriately.

Also adjust the powerup and powerdown routines to match the start and
stop routines in regards to the ordering of tasks, including napi
related calls.

Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/amd/xgbe/xgbe-drv.c