Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 35128
b: refs/heads/master
c: fe2a24d
h: refs/heads/master
v: v3
  • Loading branch information
Stephen Hemminger authored and Jeff Garzik committed Aug 3, 2006
1 parent cbf8513 commit bfb83fd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 19 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: 834695ee415f064036dacdd1b2c414cff1e81cb4
refs/heads/master: fe2a24dfc577a05349a39c6c8a6312818d28bb59
30 changes: 12 additions & 18 deletions trunk/drivers/net/sky2.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
#include "sky2.h"

#define DRV_NAME "sky2"
#define DRV_VERSION "1.5"
#define DRV_VERSION "1.6"
#define PFX DRV_NAME " "

/*
Expand Down Expand Up @@ -1932,12 +1932,6 @@ static inline void sky2_tx_done(struct net_device *dev, u16 last)
}
}

/* Is status ring empty or is there more to do? */
static inline int sky2_more_work(const struct sky2_hw *hw)
{
return (hw->st_idx != sky2_read16(hw, STAT_PUT_IDX));
}

/* Process status response ring */
static int sky2_status_intr(struct sky2_hw *hw, int to_do)
{
Expand Down Expand Up @@ -2028,6 +2022,9 @@ static int sky2_status_intr(struct sky2_hw *hw, int to_do)
}
}

/* Fully processed status ring so clear irq */
sky2_write32(hw, STAT_CTRL, SC_STAT_CLR_IRQ);

exit_loop:
if (buf_write[0]) {
sky2 = netdev_priv(hw->dev[0]);
Expand Down Expand Up @@ -2237,19 +2234,16 @@ static int sky2_poll(struct net_device *dev0, int *budget)
sky2_descriptor_error(hw, 1, "transmit", Y2_IS_CHK_TXA2);

work_done = sky2_status_intr(hw, work_limit);
*budget -= work_done;
dev0->quota -= work_done;

if (status & Y2_IS_STAT_BMU)
sky2_write32(hw, STAT_CTRL, SC_STAT_CLR_IRQ);
if (work_done < work_limit) {
netif_rx_complete(dev0);

if (sky2_more_work(hw))
sky2_read32(hw, B0_Y2_SP_LISR);
return 0;
} else {
*budget -= work_done;
dev0->quota -= work_done;
return 1;

netif_rx_complete(dev0);

sky2_read32(hw, B0_Y2_SP_LISR);
return 0;
}
}

static irqreturn_t sky2_intr(int irq, void *dev_id, struct pt_regs *regs)
Expand Down

0 comments on commit bfb83fd

Please sign in to comment.