summaryrefslogtreecommitdiff
path: root/drivers/net/wan
diff options
context:
space:
mode:
authorKrzysztof Hałasa <khc@pm.waw.pl>2008-07-09 19:47:05 +0200
committerKrzysztof Hałasa <khc@pm.waw.pl>2008-11-22 02:49:47 +0100
commit09fd65aa8ac934ea4ce7e55945a687292731e9c9 (patch)
tree0fb2af1c72f8018a58025375dda7c04e8683c744 /drivers/net/wan
parentabc9d91a35a924c8db0e949cd443471672e37cdb (diff)
WAN: TX-done handler now uses the ownership bit in HD64572 drivers.
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
Diffstat (limited to 'drivers/net/wan')
-rw-r--r--drivers/net/wan/hd64572.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/net/wan/hd64572.c b/drivers/net/wan/hd64572.c
index 22adec06d93a..e332fe906aba 100644
--- a/drivers/net/wan/hd64572.c
+++ b/drivers/net/wan/hd64572.c
@@ -338,7 +338,6 @@ static inline int sca_rx_done(port_t *port, int budget)
static inline void sca_tx_done(port_t *port)
{
struct net_device *dev = port_to_dev(port);
- u16 dmac = get_dmac_tx(port);
card_t* card = port_to_card(port);
u8 stat;
@@ -351,14 +350,10 @@ static inline void sca_tx_done(port_t *port)
DSR_TX(phy_node(port)), card);
while (1) {
- pkt_desc __iomem *desc;
-
- u32 desc_off = desc_offset(port, port->txlast, 1);
- u32 cda = sca_inl(dmac + CDAL, card);
- if ((cda >= desc_off) && (cda < desc_off + sizeof(pkt_desc)))
- break; /* Transmitter is/will_be sending this frame */
+ pkt_desc __iomem *desc = desc_address(port, port->txlast, 1);
- desc = desc_address(port, port->txlast, 1);
+ if (!(readb(&desc->stat) & ST_TX_OWNRSHP))
+ break; /* not yet transmitted */
dev->stats.tx_packets++;
dev->stats.tx_bytes += readw(&desc->len);
writeb(0, &desc->stat); /* Free descriptor */