Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 145444
b: refs/heads/master
c: 10b6d95
h: refs/heads/master
v: v3
  • Loading branch information
Divy Le Ray authored and David S. Miller committed May 29, 2009
1 parent 3b8e7ee commit 983ee10
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 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: 4d3383d0adb6d1047fb9ee3edd9dc05e4d2184f0
refs/heads/master: 10b6d95612672f89deb39b5a60fb677c78ba4844
4 changes: 2 additions & 2 deletions trunk/drivers/net/cxgb3/adapter.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ struct fl_pg_chunk {
struct page *page;
void *va;
unsigned int offset;
u64 *p_cnt;
DECLARE_PCI_UNMAP_ADDR(mapping);
unsigned long *p_cnt;
dma_addr_t mapping;
};

struct rx_desc;
Expand Down
11 changes: 5 additions & 6 deletions trunk/drivers/net/cxgb3/sge.c
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ static void clear_rx_desc(struct pci_dev *pdev, const struct sge_fl *q,
(*d->pg_chunk.p_cnt)--;
if (!*d->pg_chunk.p_cnt)
pci_unmap_page(pdev,
pci_unmap_addr(&d->pg_chunk, mapping),
d->pg_chunk.mapping,
q->alloc_size, PCI_DMA_FROMDEVICE);

put_page(d->pg_chunk.page);
Expand Down Expand Up @@ -454,7 +454,7 @@ static int alloc_pg_chunk(struct adapter *adapter, struct sge_fl *q,
q->pg_chunk.offset = 0;
mapping = pci_map_page(adapter->pdev, q->pg_chunk.page,
0, q->alloc_size, PCI_DMA_FROMDEVICE);
pci_unmap_addr_set(&q->pg_chunk, mapping, mapping);
q->pg_chunk.mapping = mapping;
}
sd->pg_chunk = q->pg_chunk;

Expand Down Expand Up @@ -511,8 +511,7 @@ static int refill_fl(struct adapter *adap, struct sge_fl *q, int n, gfp_t gfp)
nomem: q->alloc_failed++;
break;
}
mapping = pci_unmap_addr(&sd->pg_chunk, mapping) +
sd->pg_chunk.offset;
mapping = sd->pg_chunk.mapping + sd->pg_chunk.offset;
pci_unmap_addr_set(sd, dma_addr, mapping);

add_one_rx_chunk(mapping, d, q->gen);
Expand Down Expand Up @@ -881,7 +880,7 @@ static struct sk_buff *get_packet_pg(struct adapter *adap, struct sge_fl *fl,
(*sd->pg_chunk.p_cnt)--;
if (!*sd->pg_chunk.p_cnt)
pci_unmap_page(adap->pdev,
pci_unmap_addr(&sd->pg_chunk, mapping),
sd->pg_chunk.mapping,
fl->alloc_size,
PCI_DMA_FROMDEVICE);
if (!skb) {
Expand Down Expand Up @@ -2096,7 +2095,7 @@ static void lro_add_page(struct adapter *adap, struct sge_qset *qs,
(*sd->pg_chunk.p_cnt)--;
if (!*sd->pg_chunk.p_cnt)
pci_unmap_page(adap->pdev,
pci_unmap_addr(&sd->pg_chunk, mapping),
sd->pg_chunk.mapping,
fl->alloc_size,
PCI_DMA_FROMDEVICE);

Expand Down

0 comments on commit 983ee10

Please sign in to comment.