1 Index: linux-2.6.22-rc4/drivers/net/b44.c
2 ===================================================================
3 --- linux-2.6.22-rc4.orig/drivers/net/b44.c 2007-06-10 21:33:15.000000000 +0100
4 +++ linux-2.6.22-rc4/drivers/net/b44.c 2007-06-10 21:33:23.000000000 +0100
7 enum dma_data_direction dir)
9 - dma_sync_single_range_for_device(&sdev->dev, dma_base,
10 + dma_sync_single_range_for_device(sdev->dev, dma_base,
11 offset & dma_desc_align_mask,
12 dma_desc_sync_size, dir);
16 enum dma_data_direction dir)
18 - dma_sync_single_range_for_cpu(&sdev->dev, dma_base,
19 + dma_sync_single_range_for_cpu(sdev->dev, dma_base,
20 offset & dma_desc_align_mask,
21 dma_desc_sync_size, dir);
27 - dma_unmap_single(&bp->sdev->dev,
28 + dma_unmap_single(bp->sdev->dev,
29 pci_unmap_addr(rp, mapping),
36 - mapping = dma_map_single(&bp->sdev->dev, skb->data,
37 + mapping = dma_map_single(bp->sdev->dev, skb->data,
42 mapping + RX_PKT_BUF_SZ > DMA_30BIT_MASK) {
44 if (!dma_mapping_error(mapping))
45 - dma_unmap_single(&bp->sdev->dev, mapping, RX_PKT_BUF_SZ,DMA_FROM_DEVICE);
46 + dma_unmap_single(bp->sdev->dev, mapping, RX_PKT_BUF_SZ,DMA_FROM_DEVICE);
47 dev_kfree_skb_any(skb);
48 skb = __dev_alloc_skb(RX_PKT_BUF_SZ,GFP_DMA);
51 - mapping = dma_map_single(&bp->sdev->dev, skb->data,
52 + mapping = dma_map_single(bp->sdev->dev, skb->data,
55 if (dma_mapping_error(mapping) ||
56 mapping + RX_PKT_BUF_SZ > DMA_30BIT_MASK) {
57 if (!dma_mapping_error(mapping))
58 - dma_unmap_single(&bp->sdev->dev, mapping, RX_PKT_BUF_SZ,DMA_FROM_DEVICE);
59 + dma_unmap_single(bp->sdev->dev, mapping, RX_PKT_BUF_SZ,DMA_FROM_DEVICE);
60 dev_kfree_skb_any(skb);
64 dest_idx * sizeof(dest_desc),
67 - dma_sync_single_for_device(&bp->sdev->dev, le32_to_cpu(src_desc->addr),
68 + dma_sync_single_for_device(bp->sdev->dev, le32_to_cpu(src_desc->addr),
76 - dma_sync_single_for_cpu(&bp->sdev->dev, map,
77 + dma_sync_single_for_cpu(bp->sdev->dev, map,
80 rh = (struct rx_header *) skb->data;
82 skb_size = b44_alloc_rx_skb(bp, cons, bp->rx_prod);
85 - dma_unmap_single(&bp->sdev->dev, map,
86 + dma_unmap_single(bp->sdev->dev, map,
87 skb_size, DMA_FROM_DEVICE);
88 /* Leave out rx_header */
89 skb_put(skb, len+bp->rx_offset);
94 - mapping = dma_map_single(&bp->sdev->dev, skb->data, len, DMA_TO_DEVICE);
95 + mapping = dma_map_single(bp->sdev->dev, skb->data, len, DMA_TO_DEVICE);
96 if (dma_mapping_error(mapping) || mapping + len > DMA_30BIT_MASK) {
97 /* Chip can't handle DMA to/from >1GB, use bounce buffer */
98 if (!dma_mapping_error(mapping))
99 - dma_unmap_single(&bp->sdev->dev, mapping, len, DMA_TO_DEVICE);
100 + dma_unmap_single(bp->sdev->dev, mapping, len, DMA_TO_DEVICE);
102 bounce_skb = __dev_alloc_skb(TX_PKT_BUF_SZ,
107 - mapping = dma_map_single(&bp->sdev->dev, bounce_skb->data,
108 + mapping = dma_map_single(bp->sdev->dev, bounce_skb->data,
110 if (dma_mapping_error(mapping) || mapping + len > DMA_30BIT_MASK) {
111 if (!dma_mapping_error(mapping))
112 - dma_unmap_single(&bp->sdev->dev, mapping,
113 + dma_unmap_single(bp->sdev->dev, mapping,
115 dev_kfree_skb_any(bounce_skb);
117 @@ -1046,7 +1046,7 @@
121 - dma_unmap_single(&bp->sdev->dev,
122 + dma_unmap_single(bp->sdev->dev,
123 pci_unmap_addr(rp, mapping),
126 @@ -1060,7 +1060,7 @@
130 - dma_unmap_single(&bp->sdev->dev,
131 + dma_unmap_single(bp->sdev->dev,
132 pci_unmap_addr(rp, mapping),
135 @@ -1085,12 +1085,12 @@
136 memset(bp->tx_ring, 0, B44_TX_RING_BYTES);
138 if (bp->flags & B44_FLAG_RX_RING_HACK)
139 - dma_sync_single_for_device(&bp->sdev->dev, bp->rx_ring_dma,
140 + dma_sync_single_for_device(bp->sdev->dev, bp->rx_ring_dma,
144 if (bp->flags & B44_FLAG_TX_RING_HACK)
145 - dma_sync_single_for_device(&bp->sdev->dev, bp->tx_ring_dma,
146 + dma_sync_single_for_device(bp->sdev->dev, bp->tx_ring_dma,
150 @@ -1112,24 +1112,24 @@
151 bp->tx_buffers = NULL;
153 if (bp->flags & B44_FLAG_RX_RING_HACK) {
154 - dma_unmap_single(&bp->sdev->dev, bp->rx_ring_dma,
155 + dma_unmap_single(bp->sdev->dev, bp->rx_ring_dma,
160 - dma_free_coherent(&bp->sdev->dev, DMA_TABLE_BYTES,
161 + dma_free_coherent(bp->sdev->dev, DMA_TABLE_BYTES,
162 bp->rx_ring, bp->rx_ring_dma);
164 bp->flags &= ~B44_FLAG_RX_RING_HACK;
167 if (bp->flags & B44_FLAG_TX_RING_HACK) {
168 - dma_unmap_single(&bp->sdev->dev, bp->tx_ring_dma,
169 + dma_unmap_single(bp->sdev->dev, bp->tx_ring_dma,
174 - dma_free_coherent(&bp->sdev->dev, DMA_TABLE_BYTES,
175 + dma_free_coherent(bp->sdev->dev, DMA_TABLE_BYTES,
176 bp->tx_ring, bp->tx_ring_dma);
178 bp->flags &= ~B44_FLAG_TX_RING_HACK;
179 @@ -1155,7 +1155,7 @@
182 size = DMA_TABLE_BYTES;
183 - bp->rx_ring = dma_alloc_coherent(&bp->sdev->dev, size, &bp->rx_ring_dma, GFP_ATOMIC);
184 + bp->rx_ring = dma_alloc_coherent(bp->sdev->dev, size, &bp->rx_ring_dma, GFP_ATOMIC);
186 /* Allocation may have failed due to pci_alloc_consistent
187 insisting on use of GFP_DMA, which is more restrictive
188 @@ -1167,7 +1167,7 @@
192 - rx_ring_dma = dma_map_single(&bp->sdev->dev, rx_ring,
193 + rx_ring_dma = dma_map_single(bp->sdev->dev, rx_ring,
197 @@ -1182,7 +1182,7 @@
198 bp->flags |= B44_FLAG_RX_RING_HACK;
201 - bp->tx_ring = dma_alloc_coherent(&bp->sdev->dev, size, &bp->tx_ring_dma, GFP_ATOMIC);
202 + bp->tx_ring = dma_alloc_coherent(bp->sdev->dev, size, &bp->tx_ring_dma, GFP_ATOMIC);
204 /* Allocation may have failed due to dma_alloc_coherent
205 insisting on use of GFP_DMA, which is more restrictive
206 @@ -1194,7 +1194,7 @@
210 - tx_ring_dma = dma_map_single(&bp->sdev->dev, tx_ring,
211 + tx_ring_dma = dma_map_single(bp->sdev->dev, tx_ring,
215 @@ -2314,13 +2314,13 @@
217 dev = alloc_etherdev(sizeof(*bp));
219 - dev_err(&sdev->dev, "Etherdev alloc failed, aborting.\n");
220 + dev_err(sdev->dev, "Etherdev alloc failed, aborting.\n");
225 SET_MODULE_OWNER(dev);
226 - SET_NETDEV_DEV(dev,&sdev->dev);
227 + SET_NETDEV_DEV(dev,sdev->dev);
229 /* No interesting netdevice features in this card... */
231 @@ -2358,7 +2358,7 @@
233 err = b44_get_invariants(bp);
235 - dev_err(&sdev->dev,
237 "Problem fetching invariants of chip, aborting.\n");
238 goto err_out_free_dev;
240 @@ -2379,7 +2379,7 @@
242 err = register_netdev(dev);
244 - dev_err(&sdev->dev, "Cannot register net device, aborting.\n");
245 + dev_err(sdev->dev, "Cannot register net device, aborting.\n");
249 @@ -2458,7 +2458,6 @@
250 rc = request_irq(dev->irq, b44_interrupt, IRQF_SHARED, dev->name, dev);
252 printk(KERN_ERR PFX "%s: request_irq failed\n", dev->name);
253 - pci_disable_device(pdev);