Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 66906
b: refs/heads/master
c: 1dad939
h: refs/heads/master
v: v3
  • Loading branch information
trem authored and David S. Miller committed Oct 10, 2007
1 parent 0457791 commit 5bbc46e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 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: b5254eee7994ba0a44ba7386cb66c2ce2f30fcc6
refs/heads/master: 1dad939ddbbd8d64e1edc7799df00a9e591b4197
10 changes: 8 additions & 2 deletions trunk/drivers/net/ipg.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
#include <linux/mii.h>
#include <linux/mutex.h>

#include <asm/div64.h>

#define IPG_RX_RING_BYTES (sizeof(struct ipg_rx) * IPG_RFDLIST_LENGTH)
#define IPG_TX_RING_BYTES (sizeof(struct ipg_tx) * IPG_TFDLIST_LENGTH)
#define IPG_RESET_MASK \
Expand Down Expand Up @@ -836,10 +838,14 @@ static void ipg_nic_txfree(struct net_device *dev)
{
struct ipg_nic_private *sp = netdev_priv(dev);
void __iomem *ioaddr = sp->ioaddr;
const unsigned int curr = ipg_r32(TFD_LIST_PTR_0) -
(sp->txd_map / sizeof(struct ipg_tx)) - 1;
unsigned int curr;
u64 txd_map;
unsigned int released, pending;

txd_map = (u64)sp->txd_map;
curr = ipg_r32(TFD_LIST_PTR_0) -
do_div(txd_map, sizeof(struct ipg_tx)) - 1;

IPG_DEBUG_MSG("_nic_txfree\n");

pending = sp->tx_current - sp->tx_dirty;
Expand Down

0 comments on commit 5bbc46e

Please sign in to comment.