mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 00:34:20 +08:00
e1000: fix ethtool test irq alloc as "probe"
New code added in 2.6.17 caused setup_irq to print a warning when running ethtool -t eth0 offline. This test marks the request_irq call made by this test as a "probe" to see if the interrupt is shared or not. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
This commit is contained in:
parent
e82b0f2cc2
commit
b9b6e78b11
@ -870,13 +870,16 @@ e1000_intr_test(struct e1000_adapter *adapter, uint64_t *data)
|
|||||||
*data = 0;
|
*data = 0;
|
||||||
|
|
||||||
/* Hook up test interrupt handler just for this test */
|
/* Hook up test interrupt handler just for this test */
|
||||||
if (!request_irq(irq, &e1000_test_intr, 0, netdev->name, netdev)) {
|
if (!request_irq(irq, &e1000_test_intr, SA_PROBEIRQ, netdev->name,
|
||||||
|
netdev)) {
|
||||||
shared_int = FALSE;
|
shared_int = FALSE;
|
||||||
} else if (request_irq(irq, &e1000_test_intr, SA_SHIRQ,
|
} else if (request_irq(irq, &e1000_test_intr, SA_SHIRQ,
|
||||||
netdev->name, netdev)){
|
netdev->name, netdev)){
|
||||||
*data = 1;
|
*data = 1;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
DPRINTK(PROBE,INFO, "testing %s interrupt\n",
|
||||||
|
(shared_int ? "shared" : "unshared"));
|
||||||
|
|
||||||
/* Disable all the interrupts */
|
/* Disable all the interrupts */
|
||||||
E1000_WRITE_REG(&adapter->hw, IMC, 0xFFFFFFFF);
|
E1000_WRITE_REG(&adapter->hw, IMC, 0xFFFFFFFF);
|
||||||
|
Loading…
Reference in New Issue
Block a user