Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 22346
b: refs/heads/master
c: c3da144
h: refs/heads/master
v: v3
  • Loading branch information
Stephen Hemminger authored and Jeff Garzik committed Mar 21, 2006
1 parent 570e52b commit 34f4f33
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 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: cfc3ed796eda2c41fb20986d831ed56c0474279d
refs/heads/master: c3da14474063e71686039d961d14785a9c2971ae
10 changes: 9 additions & 1 deletion trunk/drivers/net/skge.c
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ static struct ethtool_ops skge_ethtool_ops = {
* Allocate ring elements and chain them together
* One-to-one association of board descriptors with ring elements
*/
static int skge_ring_alloc(struct skge_ring *ring, void *vaddr, u64 base)
static int skge_ring_alloc(struct skge_ring *ring, void *vaddr, u32 base)
{
struct skge_tx_desc *d;
struct skge_element *e;
Expand Down Expand Up @@ -2168,6 +2168,14 @@ static int skge_up(struct net_device *dev)
if (!skge->mem)
return -ENOMEM;

BUG_ON(skge->dma & 7);

if ((u64)skge->dma >> 32 != ((u64) skge->dma + skge->mem_size) >> 32) {
printk(KERN_ERR PFX "pci_alloc_consistent region crosses 4G boundary\n");
err = -EINVAL;
goto free_pci_mem;
}

memset(skge->mem, 0, skge->mem_size);

if ((err = skge_ring_alloc(&skge->rx_ring, skge->mem, skge->dma)))
Expand Down

0 comments on commit 34f4f33

Please sign in to comment.