Skip to content

Commit

Permalink
Merge branch 'e1000-7.0.38-k4' of git://lost.foo-projects.org/~ahkok/…
Browse files Browse the repository at this point in the history
…git/netdev-2.6 into upstream
  • Loading branch information
Jeff Garzik committed May 23, 2006
2 parents 9528454 + 440c052 commit bdad69b
Show file tree
Hide file tree
Showing 5 changed files with 104 additions and 135 deletions.
2 changes: 1 addition & 1 deletion drivers/net/e1000/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
################################################################################
#
#
# Copyright(c) 1999 - 2003 Intel Corporation. All rights reserved.
# Copyright(c) 1999 - 2006 Intel Corporation. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
Expand Down
44 changes: 22 additions & 22 deletions drivers/net/e1000/e1000_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -865,15 +865,15 @@ static int
e1000_intr_test(struct e1000_adapter *adapter, uint64_t *data)
{
struct net_device *netdev = adapter->netdev;
uint32_t mask, i=0, shared_int = TRUE;
uint32_t irq = adapter->pdev->irq;
uint32_t mask, i=0, shared_int = TRUE;
uint32_t irq = adapter->pdev->irq;

*data = 0;

/* Hook up test interrupt handler just for this test */
if (!request_irq(irq, &e1000_test_intr, 0, netdev->name, netdev)) {
shared_int = FALSE;
} else if (request_irq(irq, &e1000_test_intr, SA_SHIRQ,
if (!request_irq(irq, &e1000_test_intr, 0, netdev->name, netdev)) {
shared_int = FALSE;
} else if (request_irq(irq, &e1000_test_intr, SA_SHIRQ,
netdev->name, netdev)){
*data = 1;
return -1;
Expand All @@ -889,22 +889,22 @@ e1000_intr_test(struct e1000_adapter *adapter, uint64_t *data)
/* Interrupt to test */
mask = 1 << i;

if (!shared_int) {
/* Disable the interrupt to be reported in
* the cause register and then force the same
* interrupt and see if one gets posted. If
* an interrupt was posted to the bus, the
* test failed.
*/
adapter->test_icr = 0;
E1000_WRITE_REG(&adapter->hw, IMC, mask);
E1000_WRITE_REG(&adapter->hw, ICS, mask);
msec_delay(10);

if (adapter->test_icr & mask) {
*data = 3;
break;
}
if (!shared_int) {
/* Disable the interrupt to be reported in
* the cause register and then force the same
* interrupt and see if one gets posted. If
* an interrupt was posted to the bus, the
* test failed.
*/
adapter->test_icr = 0;
E1000_WRITE_REG(&adapter->hw, IMC, mask);
E1000_WRITE_REG(&adapter->hw, ICS, mask);
msec_delay(10);

if (adapter->test_icr & mask) {
*data = 3;
break;
}
}

/* Enable the interrupt to be reported in
Expand All @@ -923,7 +923,7 @@ e1000_intr_test(struct e1000_adapter *adapter, uint64_t *data)
break;
}

if (!shared_int) {
if (!shared_int) {
/* Disable the other interrupts to be reported in
* the cause register and then force the other
* interrupts and see if any get posted. If
Expand Down
Loading

0 comments on commit bdad69b

Please sign in to comment.