aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/atm/idt77252.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2007-04-19 23:43:29 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:26:29 -0400
commit4305b541357ddbd205aa145dc378926b7cb12283 (patch)
tree9b1f57ee4ee757a9324c48a7dea84bc8c279ad82 /drivers/atm/idt77252.c
parent27a884dc3cb63b93c2b3b643f5b31eed5f8a4d26 (diff)
[SK_BUFF]: Convert skb->end to sk_buff_data_t
Now to convert the last one, skb->data, that will allow many simplifications and removal of some of the offset helpers. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/atm/idt77252.c')
-rw-r--r--drivers/atm/idt77252.c24
1 files changed, 15 insertions, 9 deletions
diff --git a/drivers/atm/idt77252.c b/drivers/atm/idt77252.c
index 1e49799cd6cf..20f2a3a82656 100644
--- a/drivers/atm/idt77252.c
+++ b/drivers/atm/idt77252.c
@@ -1065,7 +1065,8 @@ dequeue_rx(struct idt77252_dev *card, struct rsq_entry *rsqe)
1065 vcc = vc->rx_vcc; 1065 vcc = vc->rx_vcc;
1066 1066
1067 pci_dma_sync_single_for_cpu(card->pcidev, IDT77252_PRV_PADDR(skb), 1067 pci_dma_sync_single_for_cpu(card->pcidev, IDT77252_PRV_PADDR(skb),
1068 skb->end - skb->data, PCI_DMA_FROMDEVICE); 1068 skb_end_pointer(skb) - skb->data,
1069 PCI_DMA_FROMDEVICE);
1069 1070
1070 if ((vcc->qos.aal == ATM_AAL0) || 1071 if ((vcc->qos.aal == ATM_AAL0) ||
1071 (vcc->qos.aal == ATM_AAL34)) { 1072 (vcc->qos.aal == ATM_AAL34)) {
@@ -1194,7 +1195,8 @@ dequeue_rx(struct idt77252_dev *card, struct rsq_entry *rsqe)
1194 } 1195 }
1195 1196
1196 pci_unmap_single(card->pcidev, IDT77252_PRV_PADDR(skb), 1197 pci_unmap_single(card->pcidev, IDT77252_PRV_PADDR(skb),
1197 skb->end - skb->data, PCI_DMA_FROMDEVICE); 1198 skb_end_pointer(skb) - skb->data,
1199 PCI_DMA_FROMDEVICE);
1198 sb_pool_remove(card, skb); 1200 sb_pool_remove(card, skb);
1199 1201
1200 skb_trim(skb, len); 1202 skb_trim(skb, len);
@@ -1267,7 +1269,7 @@ idt77252_rx_raw(struct idt77252_dev *card)
1267 tail = readl(SAR_REG_RAWCT); 1269 tail = readl(SAR_REG_RAWCT);
1268 1270
1269 pci_dma_sync_single_for_cpu(card->pcidev, IDT77252_PRV_PADDR(queue), 1271 pci_dma_sync_single_for_cpu(card->pcidev, IDT77252_PRV_PADDR(queue),
1270 queue->end - queue->head - 16, 1272 skb_end_pointer(queue) - queue->head - 16,
1271 PCI_DMA_FROMDEVICE); 1273 PCI_DMA_FROMDEVICE);
1272 1274
1273 while (head != tail) { 1275 while (head != tail) {
@@ -1363,7 +1365,8 @@ drop:
1363 queue = card->raw_cell_head; 1365 queue = card->raw_cell_head;
1364 pci_dma_sync_single_for_cpu(card->pcidev, 1366 pci_dma_sync_single_for_cpu(card->pcidev,
1365 IDT77252_PRV_PADDR(queue), 1367 IDT77252_PRV_PADDR(queue),
1366 queue->end - queue->data, 1368 (skb_end_pointer(queue) -
1369 queue->data),
1367 PCI_DMA_FROMDEVICE); 1370 PCI_DMA_FROMDEVICE);
1368 } else { 1371 } else {
1369 card->raw_cell_head = NULL; 1372 card->raw_cell_head = NULL;
@@ -1875,7 +1878,7 @@ add_rx_skb(struct idt77252_dev *card, int queue,
1875 } 1878 }
1876 1879
1877 paddr = pci_map_single(card->pcidev, skb->data, 1880 paddr = pci_map_single(card->pcidev, skb->data,
1878 skb->end - skb->data, 1881 skb_end_pointer(skb) - skb->data,
1879 PCI_DMA_FROMDEVICE); 1882 PCI_DMA_FROMDEVICE);
1880 IDT77252_PRV_PADDR(skb) = paddr; 1883 IDT77252_PRV_PADDR(skb) = paddr;
1881 1884
@@ -1889,7 +1892,7 @@ add_rx_skb(struct idt77252_dev *card, int queue,
1889 1892
1890outunmap: 1893outunmap:
1891 pci_unmap_single(card->pcidev, IDT77252_PRV_PADDR(skb), 1894 pci_unmap_single(card->pcidev, IDT77252_PRV_PADDR(skb),
1892 skb->end - skb->data, PCI_DMA_FROMDEVICE); 1895 skb_end_pointer(skb) - skb->data, PCI_DMA_FROMDEVICE);
1893 1896
1894 handle = IDT77252_PRV_POOL(skb); 1897 handle = IDT77252_PRV_POOL(skb);
1895 card->sbpool[POOL_QUEUE(handle)].skb[POOL_INDEX(handle)] = NULL; 1898 card->sbpool[POOL_QUEUE(handle)].skb[POOL_INDEX(handle)] = NULL;
@@ -1906,12 +1909,14 @@ recycle_rx_skb(struct idt77252_dev *card, struct sk_buff *skb)
1906 int err; 1909 int err;
1907 1910
1908 pci_dma_sync_single_for_device(card->pcidev, IDT77252_PRV_PADDR(skb), 1911 pci_dma_sync_single_for_device(card->pcidev, IDT77252_PRV_PADDR(skb),
1909 skb->end - skb->data, PCI_DMA_FROMDEVICE); 1912 skb_end_pointer(skb) - skb->data,
1913 PCI_DMA_FROMDEVICE);
1910 1914
1911 err = push_rx_skb(card, skb, POOL_QUEUE(handle)); 1915 err = push_rx_skb(card, skb, POOL_QUEUE(handle));
1912 if (err) { 1916 if (err) {
1913 pci_unmap_single(card->pcidev, IDT77252_PRV_PADDR(skb), 1917 pci_unmap_single(card->pcidev, IDT77252_PRV_PADDR(skb),
1914 skb->end - skb->data, PCI_DMA_FROMDEVICE); 1918 skb_end_pointer(skb) - skb->data,
1919 PCI_DMA_FROMDEVICE);
1915 sb_pool_remove(card, skb); 1920 sb_pool_remove(card, skb);
1916 dev_kfree_skb(skb); 1921 dev_kfree_skb(skb);
1917 } 1922 }
@@ -3123,7 +3128,8 @@ deinit_card(struct idt77252_dev *card)
3123 if (skb) { 3128 if (skb) {
3124 pci_unmap_single(card->pcidev, 3129 pci_unmap_single(card->pcidev,
3125 IDT77252_PRV_PADDR(skb), 3130 IDT77252_PRV_PADDR(skb),
3126 skb->end - skb->data, 3131 (skb_end_pointer(skb) -
3132 skb->data),
3127 PCI_DMA_FROMDEVICE); 3133 PCI_DMA_FROMDEVICE);
3128 card->sbpool[i].skb[j] = NULL; 3134 card->sbpool[i].skb[j] = NULL;
3129 dev_kfree_skb(skb); 3135 dev_kfree_skb(skb);