Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 122091
b: refs/heads/master
c: 0b59cef
h: refs/heads/master
i:
  122089: 71aea89
  122087: 89c85b6
v: v3
  • Loading branch information
Krzysztof Hałasa committed Nov 22, 2008
1 parent 0b590e9 commit 047ffc7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 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: 61e0a6a268947f7385282c6841f3e3d64b4c5cb9
refs/heads/master: 0b59cef885f7d451acad02f70c9712f1ef3638b1
13 changes: 3 additions & 10 deletions trunk/drivers/net/wan/hd64572.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,6 @@ static inline void disable_intr(port_t *port)
(port->chan ? 0x00FF00FF : 0xFF00FF00), IER0, port->card);
}

static inline u16 next_desc(port_t *port, u16 desc, int transmit)
{
return (desc + 1) % (transmit ? port->card->tx_ring_buffers
: port->card->rx_ring_buffers);
}


static inline u16 desc_abs_number(port_t *port, u16 desc, int transmit)
{
u16 rx_buffs = port->card->rx_ring_buffers;
Expand Down Expand Up @@ -291,7 +284,7 @@ static inline int sca_rx_done(port_t *port, int budget)

/* Set new error descriptor address */
sca_outl(desc_off, dmac + EDAL, card);
port->rxin = next_desc(port, port->rxin, 0);
port->rxin = (port->rxin + 1) % card->rx_ring_buffers;
}

/* make sure RX DMA is enabled */
Expand Down Expand Up @@ -329,7 +322,7 @@ static inline void sca_tx_done(port_t *port)
dev->stats.tx_bytes += readw(&desc->len);
}
writeb(0, &desc->stat); /* Free descriptor */
port->txlast = next_desc(port, port->txlast, 1);
port->txlast = (port->txlast + 1) % card->tx_ring_buffers;
}

netif_wake_queue(dev);
Expand Down Expand Up @@ -599,7 +592,7 @@ static int sca_xmit(struct sk_buff *skb, struct net_device *dev)
writeb(ST_TX_EOM, &desc->stat);
dev->trans_start = jiffies;

port->txin = next_desc(port, port->txin, 1);
port->txin = (port->txin + 1) % card->tx_ring_buffers;
sca_outl(desc_offset(port, port->txin, 1),
get_dmac_tx(port) + EDAL, card);

Expand Down

0 comments on commit 047ffc7

Please sign in to comment.