Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 167002
b: refs/heads/master
c: 3ee19a8
h: refs/heads/master
v: v3
  • Loading branch information
Thomas Chou authored and David S. Miller committed Oct 7, 2009
1 parent c1d6b2f commit e1bb5ce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 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: 639b62a5284fab27122ec607fe341eb8e29411f4
refs/heads/master: 3ee19a85bb428b8363699dff9e1c4041c107d46a
7 changes: 3 additions & 4 deletions trunk/drivers/net/ethoc.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ static int ethoc_init_ring(struct ethoc *dev)
dev->cur_rx = 0;

/* setup transmission buffers */
bd.addr = 0;
bd.addr = virt_to_phys(dev->membase);
bd.stat = TX_BD_IRQ | TX_BD_CRC;

for (i = 0; i < dev->num_tx; i++) {
Expand All @@ -295,7 +295,6 @@ static int ethoc_init_ring(struct ethoc *dev)
bd.addr += ETHOC_BUFSIZ;
}

bd.addr = dev->num_tx * ETHOC_BUFSIZ;
bd.stat = RX_BD_EMPTY | RX_BD_IRQ;

for (i = 0; i < dev->num_rx; i++) {
Expand Down Expand Up @@ -401,7 +400,7 @@ static int ethoc_rx(struct net_device *dev, int limit)
int size = bd.stat >> 16;
struct sk_buff *skb = netdev_alloc_skb(dev, size);
if (likely(skb)) {
void *src = priv->membase + bd.addr;
void *src = phys_to_virt(bd.addr);
memcpy_fromio(skb_put(skb, size), src, size);
skb->protocol = eth_type_trans(skb, dev);
priv->stats.rx_packets++;
Expand Down Expand Up @@ -823,7 +822,7 @@ static netdev_tx_t ethoc_start_xmit(struct sk_buff *skb, struct net_device *dev)
else
bd.stat &= ~TX_BD_PAD;

dest = priv->membase + bd.addr;
dest = phys_to_virt(bd.addr);
memcpy_toio(dest, skb->data, skb->len);

bd.stat &= ~(TX_BD_STATS | TX_BD_LEN_MASK);
Expand Down

0 comments on commit e1bb5ce

Please sign in to comment.