Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 149769
b: refs/heads/master
c: 8d4dd5c
h: refs/heads/master
i:
  149767: be144a3
v: v3
  • Loading branch information
Sascha Hauer authored and David S. Miller committed Apr 16, 2009
1 parent 95080c6 commit 2fe3bf2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 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: 2e28532f7e63c3011f7b3c1516cfebd5321bdd15
refs/heads/master: 8d4dd5cff892e18a34422852c05a88b79ff978ed
14 changes: 5 additions & 9 deletions trunk/drivers/net/fec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1660,11 +1660,10 @@ int __init fec_enet_init(struct net_device *dev, int index)
struct bufdesc *bdp, *cbd_base;
int i, j;

/* Allocate memory for buffer descriptors.
*/
mem_addr = (unsigned long)dma_alloc_coherent(NULL, PAGE_SIZE,
&fep->bd_dma, GFP_KERNEL);
if (mem_addr == 0) {
/* Allocate memory for buffer descriptors. */
cbd_base = dma_alloc_coherent(NULL, PAGE_SIZE, &fep->bd_dma,
GFP_KERNEL);
if (!cbd_base) {
printk("FEC: allocate descriptor memory failed?\n");
return -ENOMEM;
}
Expand Down Expand Up @@ -1698,10 +1697,7 @@ int __init fec_enet_init(struct net_device *dev, int index)
}
#endif

cbd_base = (struct bufdesc *)mem_addr;

/* Set receive and transmit descriptor base.
*/
/* Set receive and transmit descriptor base. */
fep->rx_bd_base = cbd_base;
fep->tx_bd_base = cbd_base + RX_RING_SIZE;

Expand Down

0 comments on commit 2fe3bf2

Please sign in to comment.