Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 90856
b: refs/heads/master
c: 9a11fcb
h: refs/heads/master
v: v3
  • Loading branch information
Ishizaki Kou authored and Jeff Garzik committed Apr 17, 2008
1 parent 32b9d30 commit f27612d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fcfcfa205ef59f10d80e67a1762ad27e765d4868
refs/heads/master: 9a11fcb5215d6ecade9aca1f1fba272746a3882d
22 changes: 10 additions & 12 deletions trunk/drivers/net/spider_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -1415,18 +1415,12 @@ spider_net_link_reset(struct net_device *netdev)
* found when an interrupt is presented
*/
static void
spider_net_handle_error_irq(struct spider_net_card *card, u32 status_reg)
spider_net_handle_error_irq(struct spider_net_card *card, u32 status_reg,
u32 error_reg1, u32 error_reg2)
{
u32 error_reg1, error_reg2;
u32 i;
int show_error = 1;

error_reg1 = spider_net_read_reg(card, SPIDER_NET_GHIINT1STS);
error_reg2 = spider_net_read_reg(card, SPIDER_NET_GHIINT2STS);

error_reg1 &= SPIDER_NET_INT1_MASK_VALUE;
error_reg2 &= SPIDER_NET_INT2_MASK_VALUE;

/* check GHIINT0STS ************************************/
if (status_reg)
for (i = 0; i < 32; i++)
Expand Down Expand Up @@ -1656,12 +1650,15 @@ spider_net_interrupt(int irq, void *ptr)
{
struct net_device *netdev = ptr;
struct spider_net_card *card = netdev_priv(netdev);
u32 status_reg;
u32 status_reg, error_reg1, error_reg2;

status_reg = spider_net_read_reg(card, SPIDER_NET_GHIINT0STS);
status_reg &= SPIDER_NET_INT0_MASK_VALUE;
error_reg1 = spider_net_read_reg(card, SPIDER_NET_GHIINT1STS);
error_reg2 = spider_net_read_reg(card, SPIDER_NET_GHIINT2STS);

if (!status_reg)
if (!(status_reg & SPIDER_NET_INT0_MASK_VALUE) &&
!(error_reg1 & SPIDER_NET_INT1_MASK_VALUE) &&
!(error_reg2 & SPIDER_NET_INT2_MASK_VALUE))
return IRQ_NONE;

if (status_reg & SPIDER_NET_RXINT ) {
Expand All @@ -1676,7 +1673,8 @@ spider_net_interrupt(int irq, void *ptr)
spider_net_link_reset(netdev);

if (status_reg & SPIDER_NET_ERRINT )
spider_net_handle_error_irq(card, status_reg);
spider_net_handle_error_irq(card, status_reg,
error_reg1, error_reg2);

/* clear interrupt sources */
spider_net_write_reg(card, SPIDER_NET_GHIINT0STS, status_reg);
Expand Down

0 comments on commit f27612d

Please sign in to comment.