[NET]: Remove gratuitous use of skb->tail in network drivers.
authorDavid S. Miller <davem@davemloft.net>
Tue, 28 Jun 2005 22:25:31 +0000 (15:25 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 28 Jun 2005 22:25:31 +0000 (15:25 -0700)
Many drivers use skb->tail unnecessarily.

In these situations, the code roughly looks like:

dev = dev_alloc_skb(...);

[optional] skb_reserve(skb, ...);

... skb->tail ...

But even if the skb_reserve() happens, skb->data equals
skb->tail.  So it doesn't make any sense to use anything
other than skb->data in these cases.

Another case was the s2io.c driver directly mucking with
the skb->data and skb->tail pointers.  It really just wanted
to do an skb_reserve(), so that's what the code was changed
to do instead.

Another reason I'm making this change as it allows some SKB
cleanups I have planned simpler to merge.  In those cleanups,
skb->head, skb->tail, and skb->end pointers are removed, and
replaced with skb->head_room and skb->tail_room integers.

Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Jeff Garzik <jgarzik@pobox.com>
31 files changed:
drivers/net/3c515.c
drivers/net/3c59x.c
drivers/net/8139cp.c
drivers/net/82596.c
drivers/net/dl2k.c
drivers/net/eepro100.c
drivers/net/epic100.c
drivers/net/fealnx.c
drivers/net/hamachi.c
drivers/net/lance.c
drivers/net/lasi_82596.c
drivers/net/natsemi.c
drivers/net/ns83820.c
drivers/net/pcnet32.c
drivers/net/r8169.c
drivers/net/s2io.c
drivers/net/sb1250-mac.c
drivers/net/sis900.c
drivers/net/starfire.c
drivers/net/sundance.c
drivers/net/tulip/de2104x.c
drivers/net/tulip/dmfe.c
drivers/net/tulip/interrupt.c
drivers/net/tulip/tulip_core.c
drivers/net/tulip/winbond-840.c
drivers/net/tulip/xircom_tulip_cb.c
drivers/net/typhoon.c
drivers/net/via-rhine.c
drivers/net/via-velocity.c
drivers/net/wan/hdlc_cisco.c
drivers/net/yellowfin.c

index d272ea36a578b09c3aaa675ae4133124731fd271..91d1c4c24d9b9616799fa3cc7c171ad51f139e76 100644 (file)
@@ -822,7 +822,7 @@ static int corkscrew_open(struct net_device *dev)
                                break;  /* Bad news!  */
                        skb->dev = dev; /* Mark as being used by this device. */
                        skb_reserve(skb, 2);    /* Align IP on 16 byte boundaries */
-                       vp->rx_ring[i].addr = isa_virt_to_bus(skb->tail);
+                       vp->rx_ring[i].addr = isa_virt_to_bus(skb->data);
                }
                vp->rx_ring[i - 1].next = isa_virt_to_bus(&vp->rx_ring[0]);     /* Wrap the ring. */
                outl(isa_virt_to_bus(&vp->rx_ring[0]), ioaddr + UpListPtr);
@@ -1406,7 +1406,7 @@ static int boomerang_rx(struct net_device *dev)
                                break;  /* Bad news!  */
                        skb->dev = dev; /* Mark as being used by this device. */
                        skb_reserve(skb, 2);    /* Align IP on 16 byte boundaries */
-                       vp->rx_ring[entry].addr = isa_virt_to_bus(skb->tail);
+                       vp->rx_ring[entry].addr = isa_virt_to_bus(skb->data);
                        vp->rx_skbuff[entry] = skb;
                }
                vp->rx_ring[entry].status = 0;  /* Clear complete bit. */
index 80ec9aa575bb5df228428afb5d84ae42c3407c35..07746b95fd83754cb3875bdea4ebe9b545bbcf6c 100644 (file)
@@ -1802,7 +1802,7 @@ vortex_open(struct net_device *dev)
                                break;                  /* Bad news!  */
                        skb->dev = dev;                 /* Mark as being used by this device. */
                        skb_reserve(skb, 2);    /* Align IP on 16 byte boundaries */
-                       vp->rx_ring[i].addr = cpu_to_le32(pci_map_single(VORTEX_PCI(vp), skb->tail, PKT_BUF_SZ, PCI_DMA_FROMDEVICE));
+                       vp->rx_ring[i].addr = cpu_to_le32(pci_map_single(VORTEX_PCI(vp), skb->data, PKT_BUF_SZ, PCI_DMA_FROMDEVICE));
                }
                if (i != RX_RING_SIZE) {
                        int j;
@@ -2632,7 +2632,7 @@ boomerang_rx(struct net_device *dev)
                                pci_dma_sync_single_for_cpu(VORTEX_PCI(vp), dma, PKT_BUF_SZ, PCI_DMA_FROMDEVICE);
                                /* 'skb_put()' points to the start of sk_buff data area. */
                                memcpy(skb_put(skb, pkt_len),
-                                          vp->rx_skbuff[entry]->tail,
+                                          vp->rx_skbuff[entry]->data,
                                           pkt_len);
                                pci_dma_sync_single_for_device(VORTEX_PCI(vp), dma, PKT_BUF_SZ, PCI_DMA_FROMDEVICE);
                                vp->rx_copy++;
@@ -2678,7 +2678,7 @@ boomerang_rx(struct net_device *dev)
                        }
                        skb->dev = dev;                 /* Mark as being used by this device. */
                        skb_reserve(skb, 2);    /* Align IP on 16 byte boundaries */
-                       vp->rx_ring[entry].addr = cpu_to_le32(pci_map_single(VORTEX_PCI(vp), skb->tail, PKT_BUF_SZ, PCI_DMA_FROMDEVICE));
+                       vp->rx_ring[entry].addr = cpu_to_le32(pci_map_single(VORTEX_PCI(vp), skb->data, PKT_BUF_SZ, PCI_DMA_FROMDEVICE));
                        vp->rx_skbuff[entry] = skb;
                }
                vp->rx_ring[entry].status = 0;  /* Clear complete bit. */
index e4b3c5c88542dbf8be95324c5a4c2007b1e6f033..7b293f01c9ed1309b67d0523c18191e91c5fc1ba 100644 (file)
@@ -596,7 +596,7 @@ rx_status_loop:
 
                mapping =
                cp->rx_skb[rx_tail].mapping =
-                       pci_map_single(cp->pdev, new_skb->tail,
+                       pci_map_single(cp->pdev, new_skb->data,
                                       buflen, PCI_DMA_FROMDEVICE);
                cp->rx_skb[rx_tail].skb = new_skb;
 
@@ -1101,7 +1101,7 @@ static int cp_refill_rx (struct cp_private *cp)
                skb_reserve(skb, RX_OFFSET);
 
                cp->rx_skb[i].mapping = pci_map_single(cp->pdev,
-                       skb->tail, cp->rx_buf_sz, PCI_DMA_FROMDEVICE);
+                       skb->data, cp->rx_buf_sz, PCI_DMA_FROMDEVICE);
                cp->rx_skb[i].skb = skb;
 
                cp->rx_ring[i].opts2 = 0;
index 65f97b1dc581838012a68dca1002012f74bbab14..13b745b39667710b33308b4c8f4d770758fec599 100644 (file)
@@ -546,11 +546,11 @@ static inline void init_rx_bufs(struct net_device *dev)
                rbd->b_next = WSWAPrbd(virt_to_bus(rbd+1));
                rbd->b_addr = WSWAPrbd(virt_to_bus(rbd));
                rbd->skb = skb;
-               rbd->v_data = skb->tail;
-               rbd->b_data = WSWAPchar(virt_to_bus(skb->tail));
+               rbd->v_data = skb->data;
+               rbd->b_data = WSWAPchar(virt_to_bus(skb->data));
                rbd->size = PKT_BUF_SZ;
 #ifdef __mc68000__
-               cache_clear(virt_to_phys(skb->tail), PKT_BUF_SZ);
+               cache_clear(virt_to_phys(skb->data), PKT_BUF_SZ);
 #endif
        }
        lp->rbd_head = lp->rbds;
@@ -816,10 +816,10 @@ static inline int i596_rx(struct net_device *dev)
                                rx_in_place = 1;
                                rbd->skb = newskb;
                                newskb->dev = dev;
-                               rbd->v_data = newskb->tail;
-                               rbd->b_data = WSWAPchar(virt_to_bus(newskb->tail));
+                               rbd->v_data = newskb->data;
+                               rbd->b_data = WSWAPchar(virt_to_bus(newskb->data));
 #ifdef __mc68000__
-                               cache_clear(virt_to_phys(newskb->tail), PKT_BUF_SZ);
+                               cache_clear(virt_to_phys(newskb->data), PKT_BUF_SZ);
 #endif
                        }
                        else
@@ -840,7 +840,7 @@ memory_squeeze:
                                skb->protocol=eth_type_trans(skb,dev);
                                skb->len = pkt_len;
 #ifdef __mc68000__
-                               cache_clear(virt_to_phys(rbd->skb->tail),
+                               cache_clear(virt_to_phys(rbd->skb->data),
                                                pkt_len);
 #endif
                                netif_rx(skb);
index aa42b7a2773595dec1c25f20a1c7076f4b4fc066..430c628279b311b7c18b60240961ab6a3ee577b9 100644 (file)
@@ -547,7 +547,7 @@ rio_timer (unsigned long data)
                                skb_reserve (skb, 2);
                                np->rx_ring[entry].fraginfo =
                                    cpu_to_le64 (pci_map_single
-                                        (np->pdev, skb->tail, np->rx_buf_sz,
+                                        (np->pdev, skb->data, np->rx_buf_sz,
                                          PCI_DMA_FROMDEVICE));
                        }
                        np->rx_ring[entry].fraginfo |=
@@ -618,7 +618,7 @@ alloc_list (struct net_device *dev)
                /* Rubicon now supports 40 bits of addressing space. */
                np->rx_ring[i].fraginfo =
                    cpu_to_le64 ( pci_map_single (
-                                 np->pdev, skb->tail, np->rx_buf_sz,
+                                 np->pdev, skb->data, np->rx_buf_sz,
                                  PCI_DMA_FROMDEVICE));
                np->rx_ring[i].fraginfo |= cpu_to_le64 (np->rx_buf_sz) << 48;
        }
@@ -906,7 +906,7 @@ receive_packet (struct net_device *dev)
                                /* 16 byte align the IP header */
                                skb_reserve (skb, 2);
                                eth_copy_and_sum (skb,
-                                                 np->rx_skbuff[entry]->tail,
+                                                 np->rx_skbuff[entry]->data,
                                                  pkt_len, 0);
                                skb_put (skb, pkt_len);
                                pci_dma_sync_single_for_device(np->pdev,
@@ -950,7 +950,7 @@ receive_packet (struct net_device *dev)
                        skb_reserve (skb, 2);
                        np->rx_ring[entry].fraginfo =
                            cpu_to_le64 (pci_map_single
-                                        (np->pdev, skb->tail, np->rx_buf_sz,
+                                        (np->pdev, skb->data, np->rx_buf_sz,
                                          PCI_DMA_FROMDEVICE));
                }
                np->rx_ring[entry].fraginfo |=
index 98b3a2fdce90d6dbc9d737b48d1c4c1885d65a48..1795425f512e1f789dbccea4492cc1d659ed2111 100644 (file)
@@ -1269,7 +1269,7 @@ speedo_init_rx_ring(struct net_device *dev)
                if (skb == NULL)
                        break;                  /* OK.  Just initially short of Rx bufs. */
                skb->dev = dev;                 /* Mark as being used by this device. */
-               rxf = (struct RxFD *)skb->tail;
+               rxf = (struct RxFD *)skb->data;
                sp->rx_ringp[i] = rxf;
                sp->rx_ring_dma[i] =
                        pci_map_single(sp->pdev, rxf,
@@ -1661,7 +1661,7 @@ static inline struct RxFD *speedo_rx_alloc(struct net_device *dev, int entry)
                sp->rx_ringp[entry] = NULL;
                return NULL;
        }
-       rxf = sp->rx_ringp[entry] = (struct RxFD *)skb->tail;
+       rxf = sp->rx_ringp[entry] = (struct RxFD *)skb->data;
        sp->rx_ring_dma[entry] =
                pci_map_single(sp->pdev, rxf,
                                           PKT_BUF_SZ + sizeof(struct RxFD), PCI_DMA_FROMDEVICE);
@@ -1808,10 +1808,10 @@ speedo_rx(struct net_device *dev)
 
 #if 1 || USE_IP_CSUM
                                /* Packet is in one chunk -- we can copy + cksum. */
-                               eth_copy_and_sum(skb, sp->rx_skbuff[entry]->tail, pkt_len, 0);
+                               eth_copy_and_sum(skb, sp->rx_skbuff[entry]->data, pkt_len, 0);
                                skb_put(skb, pkt_len);
 #else
-                               memcpy(skb_put(skb, pkt_len), sp->rx_skbuff[entry]->tail,
+                               memcpy(skb_put(skb, pkt_len), sp->rx_skbuff[entry]->data,
                                           pkt_len);
 #endif
                                pci_dma_sync_single_for_device(sp->pdev, sp->rx_ring_dma[entry],
index 81ebaedaa2408ee86d55e58284a3dbef69ea1a6e..87f522738bfcb718b63526450844f696bd750181 100644 (file)
@@ -1003,7 +1003,7 @@ static void epic_init_ring(struct net_device *dev)
                skb->dev = dev;                 /* Mark as being used by this device. */
                skb_reserve(skb, 2);    /* 16 byte align the IP header. */
                ep->rx_ring[i].bufaddr = pci_map_single(ep->pci_dev, 
-                       skb->tail, ep->rx_buf_sz, PCI_DMA_FROMDEVICE);
+                       skb->data, ep->rx_buf_sz, PCI_DMA_FROMDEVICE);
                ep->rx_ring[i].rxstatus = cpu_to_le32(DescOwn);
        }
        ep->dirty_rx = (unsigned int)(i - RX_RING_SIZE);
@@ -1274,7 +1274,7 @@ static int epic_rx(struct net_device *dev, int budget)
                                                            ep->rx_ring[entry].bufaddr,
                                                            ep->rx_buf_sz,
                                                            PCI_DMA_FROMDEVICE);
-                               eth_copy_and_sum(skb, ep->rx_skbuff[entry]->tail, pkt_len, 0);
+                               eth_copy_and_sum(skb, ep->rx_skbuff[entry]->data, pkt_len, 0);
                                skb_put(skb, pkt_len);
                                pci_dma_sync_single_for_device(ep->pci_dev,
                                                               ep->rx_ring[entry].bufaddr,
@@ -1308,7 +1308,7 @@ static int epic_rx(struct net_device *dev, int budget)
                        skb->dev = dev;                 /* Mark as being used by this device. */
                        skb_reserve(skb, 2);    /* Align IP on 16 byte boundaries */
                        ep->rx_ring[entry].bufaddr = pci_map_single(ep->pci_dev, 
-                               skb->tail, ep->rx_buf_sz, PCI_DMA_FROMDEVICE);
+                               skb->data, ep->rx_buf_sz, PCI_DMA_FROMDEVICE);
                        work_done++;
                }
                ep->rx_ring[entry].rxstatus = cpu_to_le32(DescOwn);
index 9e0303f6d73c5dcaf5b8473b39daf1299e630949..55dbe9a3fd56fadcd2cab367cc26924489f5d06e 100644 (file)
@@ -1107,7 +1107,7 @@ static void allocate_rx_buffers(struct net_device *dev)
 
                skb->dev = dev; /* Mark as being used by this device. */
                np->lack_rxbuf->skbuff = skb;
-               np->lack_rxbuf->buffer = pci_map_single(np->pci_dev, skb->tail,
+               np->lack_rxbuf->buffer = pci_map_single(np->pci_dev, skb->data,
                        np->rx_buf_sz, PCI_DMA_FROMDEVICE);
                np->lack_rxbuf->status = RXOWN;
                ++np->really_rx_count;
@@ -1300,7 +1300,7 @@ static void init_ring(struct net_device *dev)
                ++np->really_rx_count;
                np->rx_ring[i].skbuff = skb;
                skb->dev = dev; /* Mark as being used by this device. */
-               np->rx_ring[i].buffer = pci_map_single(np->pci_dev, skb->tail,
+               np->rx_ring[i].buffer = pci_map_single(np->pci_dev, skb->data,
                        np->rx_buf_sz, PCI_DMA_FROMDEVICE);
                np->rx_ring[i].status = RXOWN;
                np->rx_ring[i].control |= RXIC;
@@ -1737,11 +1737,11 @@ static int netdev_rx(struct net_device *dev)
 
 #if ! defined(__alpha__)
                                eth_copy_and_sum(skb, 
-                                       np->cur_rx->skbuff->tail, pkt_len, 0);
+                                       np->cur_rx->skbuff->data, pkt_len, 0);
                                skb_put(skb, pkt_len);
 #else
                                memcpy(skb_put(skb, pkt_len),
-                                       np->cur_rx->skbuff->tail, pkt_len);
+                                       np->cur_rx->skbuff->data, pkt_len);
 #endif
                                pci_dma_sync_single_for_device(np->pci_dev,
                                                               np->cur_rx->buffer,
index 3d96714ed3cf8dbddbd4a8fc1a920604d18c98df..d9df1d9a5739c471c82ec43186c8312c90f6b63f 100644 (file)
@@ -1149,7 +1149,7 @@ static void hamachi_tx_timeout(struct net_device *dev)
                skb->dev = dev;         /* Mark as being used by this device. */
                skb_reserve(skb, 2); /* 16 byte align the IP header. */
                 hmp->rx_ring[i].addr = cpu_to_leXX(pci_map_single(hmp->pci_dev, 
-                       skb->tail, hmp->rx_buf_sz, PCI_DMA_FROMDEVICE));
+                       skb->data, hmp->rx_buf_sz, PCI_DMA_FROMDEVICE));
                hmp->rx_ring[i].status_n_length = cpu_to_le32(DescOwn | 
                        DescEndPacket | DescIntr | (hmp->rx_buf_sz - 2));
        }
@@ -1210,7 +1210,7 @@ static void hamachi_init_ring(struct net_device *dev)
                skb->dev = dev;         /* Mark as being used by this device. */
                skb_reserve(skb, 2); /* 16 byte align the IP header. */
                 hmp->rx_ring[i].addr = cpu_to_leXX(pci_map_single(hmp->pci_dev, 
-                       skb->tail, hmp->rx_buf_sz, PCI_DMA_FROMDEVICE));
+                       skb->data, hmp->rx_buf_sz, PCI_DMA_FROMDEVICE));
                /* -2 because it doesn't REALLY have that first 2 bytes -KDU */
                hmp->rx_ring[i].status_n_length = cpu_to_le32(DescOwn | 
                        DescEndPacket | DescIntr | (hmp->rx_buf_sz -2));
@@ -1509,7 +1509,7 @@ static int hamachi_rx(struct net_device *dev)
                                            desc->addr,
                                            hmp->rx_buf_sz,
                                            PCI_DMA_FROMDEVICE);
-               buf_addr = (u8 *) hmp->rx_skbuff[entry]->tail;
+               buf_addr = (u8 *) hmp->rx_skbuff[entry]->data;
                frame_status = le32_to_cpu(get_unaligned((s32*)&(buf_addr[data_size - 12])));
                if (hamachi_debug > 4)
                        printk(KERN_DEBUG "  hamachi_rx() status was %8.8x.\n",
@@ -1678,7 +1678,7 @@ static int hamachi_rx(struct net_device *dev)
                        skb->dev = dev;         /* Mark as being used by this device. */
                        skb_reserve(skb, 2);    /* Align IP on 16 byte boundaries */
                        desc->addr = cpu_to_leXX(pci_map_single(hmp->pci_dev, 
-                               skb->tail, hmp->rx_buf_sz, PCI_DMA_FROMDEVICE));
+                               skb->data, hmp->rx_buf_sz, PCI_DMA_FROMDEVICE));
                }
                desc->status_n_length = cpu_to_le32(hmp->rx_buf_sz);
                if (entry >= RX_RING_SIZE-1)
@@ -1772,9 +1772,9 @@ static int hamachi_close(struct net_device *dev)
                                   readl(ioaddr + RxCurPtr) == (long)&hmp->rx_ring[i] ? '>' : ' ',
                                   i, hmp->rx_ring[i].status_n_length, hmp->rx_ring[i].addr);
                        if (hamachi_debug > 6) {
-                               if (*(u8*)hmp->rx_skbuff[i]->tail != 0x69) {
+                               if (*(u8*)hmp->rx_skbuff[i]->data != 0x69) {
                                        u16 *addr = (u16 *)
-                                               hmp->rx_skbuff[i]->tail;
+                                               hmp->rx_skbuff[i]->data;
                                        int j;
 
                                        for (j = 0; j < 0x50; j++)
index ca90f0d1e4b0f257e75e14473eb2ed535754e0f8..b4929beb33b2359d29a37fc16e4535590c1098e9 100644 (file)
@@ -862,7 +862,7 @@ lance_init_ring(struct net_device *dev, int gfp)
                lp->rx_skbuff[i] = skb;
                if (skb) {
                        skb->dev = dev;
-                       rx_buff = skb->tail;
+                       rx_buff = skb->data;
                } else
                        rx_buff = kmalloc(PKT_BUF_SZ, GFP_DMA | gfp);
                if (rx_buff == NULL)
index 5e263fcba6696046b8dad88a4d61064ebb7ca8de..41bad07ac1acc94be2b4db36b13e27d0faceaf5c 100644 (file)
@@ -553,14 +553,14 @@ static inline void init_rx_bufs(struct net_device *dev)
                if (skb == NULL)
                        panic("%s: alloc_skb() failed", __FILE__);
                skb_reserve(skb, 2);
-               dma_addr = dma_map_single(lp->dev, skb->tail,PKT_BUF_SZ,
+               dma_addr = dma_map_single(lp->dev, skb->data,PKT_BUF_SZ,
                                          DMA_FROM_DEVICE);
                skb->dev = dev;
                rbd->v_next = rbd+1;
                rbd->b_next = WSWAPrbd(virt_to_dma(lp,rbd+1));
                rbd->b_addr = WSWAPrbd(virt_to_dma(lp,rbd));
                rbd->skb = skb;
-               rbd->v_data = skb->tail;
+               rbd->v_data = skb->data;
                rbd->b_data = WSWAPchar(dma_addr);
                rbd->size = PKT_BUF_SZ;
        }
@@ -783,8 +783,8 @@ static inline int i596_rx(struct net_device *dev)
                                rx_in_place = 1;
                                rbd->skb = newskb;
                                newskb->dev = dev;
-                               dma_addr = dma_map_single(lp->dev, newskb->tail, PKT_BUF_SZ, DMA_FROM_DEVICE);
-                               rbd->v_data = newskb->tail;
+                               dma_addr = dma_map_single(lp->dev, newskb->data, PKT_BUF_SZ, DMA_FROM_DEVICE);
+                               rbd->v_data = newskb->data;
                                rbd->b_data = WSWAPchar(dma_addr);
                                CHECK_WBACK_INV(rbd, sizeof(struct i596_rbd));
                        }
index babb59e146ea62524fc00c50ee1d284502e69c56..9d6d2548c2d36a4a04f9dfb9e31dbccb2e7729e4 100644 (file)
@@ -1926,7 +1926,7 @@ static void refill_rx(struct net_device *dev)
                                break; /* Better luck next round. */
                        skb->dev = dev; /* Mark as being used by this device. */
                        np->rx_dma[entry] = pci_map_single(np->pci_dev,
-                               skb->tail, buflen, PCI_DMA_FROMDEVICE);
+                               skb->data, buflen, PCI_DMA_FROMDEVICE);
                        np->rx_ring[entry].addr = cpu_to_le32(np->rx_dma[entry]);
                }
                np->rx_ring[entry].cmd_status = cpu_to_le32(np->rx_buf_sz);
@@ -2280,7 +2280,7 @@ static void netdev_rx(struct net_device *dev)
                                        buflen,
                                        PCI_DMA_FROMDEVICE);
                                eth_copy_and_sum(skb,
-                                       np->rx_skbuff[entry]->tail, pkt_len, 0);
+                                       np->rx_skbuff[entry]->data, pkt_len, 0);
                                skb_put(skb, pkt_len);
                                pci_dma_sync_single_for_device(np->pci_dev,
                                        np->rx_dma[entry],
index cc7965271778b1e87b1726c006dfc67c04d034da..e64df4d0800b2a1802f5e350871f62f5ad58d85f 100644 (file)
@@ -574,7 +574,7 @@ static inline int ns83820_add_rx_skb(struct ns83820 *dev, struct sk_buff *skb)
 
        dev->rx_info.next_empty = (next_empty + 1) % NR_RX_DESC;
        cmdsts = REAL_RX_BUF_SIZE | CMDSTS_INTR;
-       buf = pci_map_single(dev->pci_dev, skb->tail,
+       buf = pci_map_single(dev->pci_dev, skb->data,
                             REAL_RX_BUF_SIZE, PCI_DMA_FROMDEVICE);
        build_rx_desc(dev, sg, 0, buf, cmdsts, 0);
        /* update link of previous rx */
@@ -604,7 +604,7 @@ static inline int rx_refill(struct net_device *ndev, int gfp)
                if (unlikely(!skb))
                        break;
 
-               res = (long)skb->tail & 0xf;
+               res = (long)skb->data & 0xf;
                res = 0x10 - res;
                res &= 0xf;
                skb_reserve(skb, res);
index 3213f3e50487cee1076d9d69407ea520108bbd07..113b68099216b4aeac8af443d690e21cd1c15cb4 100644 (file)
@@ -1602,7 +1602,7 @@ pcnet32_init_ring(struct net_device *dev)
 
        rmb();
        if (lp->rx_dma_addr[i] == 0)
-           lp->rx_dma_addr[i] = pci_map_single(lp->pci_dev, rx_skbuff->tail,
+           lp->rx_dma_addr[i] = pci_map_single(lp->pci_dev, rx_skbuff->data,
                    PKT_BUF_SZ-2, PCI_DMA_FROMDEVICE);
        lp->rx_ring[i].base = (u32)le32_to_cpu(lp->rx_dma_addr[i]);
        lp->rx_ring[i].buf_length = le16_to_cpu(2-PKT_BUF_SZ);
@@ -1983,7 +1983,7 @@ pcnet32_rx(struct net_device *dev)
                        lp->rx_skbuff[entry] = newskb;
                        newskb->dev = dev;
                        lp->rx_dma_addr[entry] =
-                           pci_map_single(lp->pci_dev, newskb->tail,
+                           pci_map_single(lp->pci_dev, newskb->data,
                                    PKT_BUF_SZ-2, PCI_DMA_FROMDEVICE);
                        lp->rx_ring[entry].base = le32_to_cpu(lp->rx_dma_addr[entry]);
                        rx_in_place = 1;
@@ -2020,7 +2020,7 @@ pcnet32_rx(struct net_device *dev)
                                                PKT_BUF_SZ-2,
                                                PCI_DMA_FROMDEVICE);
                    eth_copy_and_sum(skb,
-                           (unsigned char *)(lp->rx_skbuff[entry]->tail),
+                           (unsigned char *)(lp->rx_skbuff[entry]->data),
                            pkt_len,0);
                    pci_dma_sync_single_for_device(lp->pci_dev,
                                                   lp->rx_dma_addr[entry],
index ce449fe90e6d66169a1e93399b75282b8c472b47..d5afe05cd8267de3b9e3e308f28bf711d5efc093 100644 (file)
@@ -1876,7 +1876,7 @@ static int rtl8169_alloc_rx_skb(struct pci_dev *pdev, struct sk_buff **sk_buff,
        skb_reserve(skb, NET_IP_ALIGN);
        *sk_buff = skb;
 
-       mapping = pci_map_single(pdev, skb->tail, rx_buf_sz,
+       mapping = pci_map_single(pdev, skb->data, rx_buf_sz,
                                 PCI_DMA_FROMDEVICE);
 
        rtl8169_map_to_asic(desc, mapping, rx_buf_sz);
@@ -2336,7 +2336,7 @@ static inline int rtl8169_try_rx_copy(struct sk_buff **sk_buff, int pkt_size,
                skb = dev_alloc_skb(pkt_size + NET_IP_ALIGN);
                if (skb) {
                        skb_reserve(skb, NET_IP_ALIGN);
-                       eth_copy_and_sum(skb, sk_buff[0]->tail, pkt_size, 0);
+                       eth_copy_and_sum(skb, sk_buff[0]->data, pkt_size, 0);
                        *sk_buff = skb;
                        rtl8169_mark_to_asic(desc, rx_buf_sz);
                        ret = 0;
index bb639a8794d455459244d1aa556ff5ecaef27122..ea638b162d3f09223cd16ca8b97f16073650f354 100644 (file)
@@ -1699,11 +1699,9 @@ static int fill_rx_buffers(struct s2io_nic *nic, int ring_no)
 #else
                ba = &nic->ba[ring_no][block_no][off];
                skb_reserve(skb, BUF0_LEN);
-               tmp = (unsigned long) skb->data;
-               tmp += ALIGN_SIZE;
-               tmp &= ~ALIGN_SIZE;
-               skb->data = (void *) tmp;
-               skb->tail = (void *) tmp;
+               tmp = ((unsigned long) skb->data & ALIGN_SIZE);
+               if (tmp)
+                       skb_reserve(skb, (ALIGN_SIZE + 1) - tmp);
 
                memset(rxdp, 0, sizeof(RxD_t));
                rxdp->Buffer2_ptr = pci_map_single
index fd2e7c3749064b87be8dfbce76e849127948ad6b..7abd55a4fb21fecf9e0e6204fafb490117ca464a 100644 (file)
@@ -963,11 +963,11 @@ static int sbdma_add_rcvbuffer(sbmacdma_t *d,struct sk_buff *sb)
        /*
         * Do not interrupt per DMA transfer.
         */
-       dsc->dscr_a = virt_to_phys(sb_new->tail) |
+       dsc->dscr_a = virt_to_phys(sb_new->data) |
                V_DMA_DSCRA_A_SIZE(NUMCACHEBLKS(pktsize+ETHER_ALIGN)) |
                0;
 #else
-       dsc->dscr_a = virt_to_phys(sb_new->tail) |
+       dsc->dscr_a = virt_to_phys(sb_new->data) |
                V_DMA_DSCRA_A_SIZE(NUMCACHEBLKS(pktsize+ETHER_ALIGN)) |
                M_DMA_DSCRA_INTERRUPT;
 #endif
index 127324f014de0a78d07694fe4a355b475d90f78c..23b713c700b3beb2e3db8aad2a1321254afae46e 100644 (file)
@@ -1154,7 +1154,7 @@ sis900_init_rx_ring(struct net_device *net_dev)
                sis_priv->rx_skbuff[i] = skb;
                sis_priv->rx_ring[i].cmdsts = RX_BUF_SIZE;
                 sis_priv->rx_ring[i].bufptr = pci_map_single(sis_priv->pci_dev,
-                        skb->tail, RX_BUF_SIZE, PCI_DMA_FROMDEVICE);
+                        skb->data, RX_BUF_SIZE, PCI_DMA_FROMDEVICE);
        }
        sis_priv->dirty_rx = (unsigned int) (i - NUM_RX_DESC);
 
@@ -1776,7 +1776,7 @@ static int sis900_rx(struct net_device *net_dev)
                        sis_priv->rx_skbuff[entry] = skb;
                        sis_priv->rx_ring[entry].cmdsts = RX_BUF_SIZE;
                        sis_priv->rx_ring[entry].bufptr = 
-                               pci_map_single(sis_priv->pci_dev, skb->tail
+                               pci_map_single(sis_priv->pci_dev, skb->data
                                        RX_BUF_SIZE, PCI_DMA_FROMDEVICE);
                        sis_priv->dirty_rx++;
                }
@@ -1809,7 +1809,7 @@ static int sis900_rx(struct net_device *net_dev)
                        sis_priv->rx_skbuff[entry] = skb;
                        sis_priv->rx_ring[entry].cmdsts = RX_BUF_SIZE;
                        sis_priv->rx_ring[entry].bufptr =
-                               pci_map_single(sis_priv->pci_dev, skb->tail,
+                               pci_map_single(sis_priv->pci_dev, skb->data,
                                        RX_BUF_SIZE, PCI_DMA_FROMDEVICE);
                }
        }
index 12e2b6826fa3768e2c72ee9afd92bc0bee6b2e5d..88b89dc95c77c8b2643745bf06618c6e2742ccf8 100644 (file)
@@ -1286,7 +1286,7 @@ static void init_ring(struct net_device *dev)
                np->rx_info[i].skb = skb;
                if (skb == NULL)
                        break;
-               np->rx_info[i].mapping = pci_map_single(np->pci_dev, skb->tail, np->rx_buf_sz, PCI_DMA_FROMDEVICE);
+               np->rx_info[i].mapping = pci_map_single(np->pci_dev, skb->data, np->rx_buf_sz, PCI_DMA_FROMDEVICE);
                skb->dev = dev;                 /* Mark as being used by this device. */
                /* Grrr, we cannot offset to correctly align the IP header. */
                np->rx_ring[i].rxaddr = cpu_to_dma(np->rx_info[i].mapping | RxDescValid);
@@ -1572,7 +1572,7 @@ static int __netdev_rx(struct net_device *dev, int *quota)
                        pci_dma_sync_single_for_cpu(np->pci_dev,
                                                    np->rx_info[entry].mapping,
                                                    pkt_len, PCI_DMA_FROMDEVICE);
-                       eth_copy_and_sum(skb, np->rx_info[entry].skb->tail, pkt_len, 0);
+                       eth_copy_and_sum(skb, np->rx_info[entry].skb->data, pkt_len, 0);
                        pci_dma_sync_single_for_device(np->pci_dev,
                                                       np->rx_info[entry].mapping,
                                                       pkt_len, PCI_DMA_FROMDEVICE);
@@ -1696,7 +1696,7 @@ static void refill_rx_ring(struct net_device *dev)
                        if (skb == NULL)
                                break;  /* Better luck next round. */
                        np->rx_info[entry].mapping =
-                               pci_map_single(np->pci_dev, skb->tail, np->rx_buf_sz, PCI_DMA_FROMDEVICE);
+                               pci_map_single(np->pci_dev, skb->data, np->rx_buf_sz, PCI_DMA_FROMDEVICE);
                        skb->dev = dev; /* Mark as being used by this device. */
                        np->rx_ring[entry].rxaddr =
                                cpu_to_dma(np->rx_info[entry].mapping | RxDescValid);
index 08cb7177a17598cbb9eb236531a18891a9ab8c64..d500a5771dbc5c05f5f03428b71f58e21b96530f 100644 (file)
@@ -1028,7 +1028,7 @@ static void init_ring(struct net_device *dev)
                skb->dev = dev;         /* Mark as being used by this device. */
                skb_reserve(skb, 2);    /* 16 byte align the IP header. */
                np->rx_ring[i].frag[0].addr = cpu_to_le32(
-                       pci_map_single(np->pci_dev, skb->tail, np->rx_buf_sz,
+                       pci_map_single(np->pci_dev, skb->data, np->rx_buf_sz,
                                PCI_DMA_FROMDEVICE));
                np->rx_ring[i].frag[0].length = cpu_to_le32(np->rx_buf_sz | LastFrag);
        }
@@ -1341,7 +1341,7 @@ static void rx_poll(unsigned long data)
                                                            np->rx_buf_sz,
                                                            PCI_DMA_FROMDEVICE);
 
-                               eth_copy_and_sum(skb, np->rx_skbuff[entry]->tail, pkt_len, 0);
+                               eth_copy_and_sum(skb, np->rx_skbuff[entry]->data, pkt_len, 0);
                                pci_dma_sync_single_for_device(np->pci_dev,
                                                               desc->frag[0].addr,
                                                               np->rx_buf_sz,
@@ -1400,7 +1400,7 @@ static void refill_rx (struct net_device *dev)
                        skb->dev = dev;         /* Mark as being used by this device. */
                        skb_reserve(skb, 2);    /* Align IP on 16 byte boundaries */
                        np->rx_ring[entry].frag[0].addr = cpu_to_le32(
-                               pci_map_single(np->pci_dev, skb->tail,
+                               pci_map_single(np->pci_dev, skb->data,
                                        np->rx_buf_sz, PCI_DMA_FROMDEVICE));
                }
                /* Perhaps we need not reset this field. */
index dd357dd8c370282f6533fec7417b89b5f9a9f390..fc353e348f9aeaab909b216d8301706d014178af 100644 (file)
@@ -446,13 +446,13 @@ static void de_rx (struct de_private *de)
 
                        mapping =
                        de->rx_skb[rx_tail].mapping =
-                               pci_map_single(de->pdev, copy_skb->tail,
+                               pci_map_single(de->pdev, copy_skb->data,
                                               buflen, PCI_DMA_FROMDEVICE);
                        de->rx_skb[rx_tail].skb = copy_skb;
                } else {
                        pci_dma_sync_single_for_cpu(de->pdev, mapping, len, PCI_DMA_FROMDEVICE);
                        skb_reserve(copy_skb, RX_OFFSET);
-                       memcpy(skb_put(copy_skb, len), skb->tail, len);
+                       memcpy(skb_put(copy_skb, len), skb->data, len);
 
                        pci_dma_sync_single_for_device(de->pdev, mapping, len, PCI_DMA_FROMDEVICE);
 
@@ -1269,7 +1269,7 @@ static int de_refill_rx (struct de_private *de)
                skb->dev = de->dev;
 
                de->rx_skb[i].mapping = pci_map_single(de->pdev,
-                       skb->tail, de->rx_buf_sz, PCI_DMA_FROMDEVICE);
+                       skb->data, de->rx_buf_sz, PCI_DMA_FROMDEVICE);
                de->rx_skb[i].skb = skb;
 
                de->rx_ring[i].opts1 = cpu_to_le32(DescOwn);
index 7b899702ceb946374f7ee7dd2466ed68f6f5a1ea..74e9075d9c48edee4d5c908849025d8dfe2cb169 100644 (file)
@@ -945,8 +945,8 @@ static void dmfe_rx_packet(struct DEVICE *dev, struct dmfe_board_info * db)
 
                                /* Received Packet CRC check need or not */
                                if ( (db->dm910x_chk_mode & 1) &&
-                                       (cal_CRC(skb->tail, rxlen, 1) !=
-                                       (*(u32 *) (skb->tail+rxlen) ))) { /* FIXME (?) */
+                                       (cal_CRC(skb->data, rxlen, 1) !=
+                                       (*(u32 *) (skb->data+rxlen) ))) { /* FIXME (?) */
                                        /* Found a error received packet */
                                        dmfe_reuse_skb(db, rxptr->rx_skb_ptr);
                                        db->dm910x_chk_mode = 3;
@@ -959,7 +959,7 @@ static void dmfe_rx_packet(struct DEVICE *dev, struct dmfe_board_info * db)
                                                /* size less than COPY_SIZE, allocate a rxlen SKB */
                                                skb->dev = dev;
                                                skb_reserve(skb, 2); /* 16byte align */
-                                               memcpy(skb_put(skb, rxlen), rxptr->rx_skb_ptr->tail, rxlen);
+                                               memcpy(skb_put(skb, rxlen), rxptr->rx_skb_ptr->data, rxlen);
                                                dmfe_reuse_skb(db, rxptr->rx_skb_ptr);
                                        } else {
                                                skb->dev = dev;
@@ -1252,7 +1252,7 @@ static void dmfe_reuse_skb(struct dmfe_board_info *db, struct sk_buff * skb)
 
        if (!(rxptr->rdes0 & cpu_to_le32(0x80000000))) {
                rxptr->rx_skb_ptr = skb;
-               rxptr->rdes2 = cpu_to_le32( pci_map_single(db->pdev, skb->tail, RX_ALLOC_SIZE, PCI_DMA_FROMDEVICE) );
+               rxptr->rdes2 = cpu_to_le32( pci_map_single(db->pdev, skb->data, RX_ALLOC_SIZE, PCI_DMA_FROMDEVICE) );
                wmb();
                rxptr->rdes0 = cpu_to_le32(0x80000000);
                db->rx_avail_cnt++;
@@ -1463,7 +1463,7 @@ static void allocate_rx_buffer(struct dmfe_board_info *db)
                if ( ( skb = dev_alloc_skb(RX_ALLOC_SIZE) ) == NULL )
                        break;
                rxptr->rx_skb_ptr = skb; /* FIXME (?) */
-               rxptr->rdes2 = cpu_to_le32( pci_map_single(db->pdev, skb->tail, RX_ALLOC_SIZE, PCI_DMA_FROMDEVICE) );
+               rxptr->rdes2 = cpu_to_le32( pci_map_single(db->pdev, skb->data, RX_ALLOC_SIZE, PCI_DMA_FROMDEVICE) );
                wmb();
                rxptr->rdes0 = cpu_to_le32(0x80000000);
                rxptr = rxptr->next_rx_desc;
index afb5cda9d8e1e32ed17424bfa0749f492470712f..bb3558164a5b09b8155eb2f2c04e20742187ff9a 100644 (file)
@@ -78,7 +78,7 @@ int tulip_refill_rx(struct net_device *dev)
                        if (skb == NULL)
                                break;
 
-                       mapping = pci_map_single(tp->pdev, skb->tail, PKT_BUF_SZ,
+                       mapping = pci_map_single(tp->pdev, skb->data, PKT_BUF_SZ,
                                                 PCI_DMA_FROMDEVICE);
                        tp->rx_buffers[entry].mapping = mapping;
 
@@ -199,12 +199,12 @@ int tulip_poll(struct net_device *dev, int *budget)
                                                                   tp->rx_buffers[entry].mapping,
                                                                   pkt_len, PCI_DMA_FROMDEVICE);
 #if ! defined(__alpha__)
-                                       eth_copy_and_sum(skb, tp->rx_buffers[entry].skb->tail,
+                                       eth_copy_and_sum(skb, tp->rx_buffers[entry].skb->data,
                                                         pkt_len, 0);
                                        skb_put(skb, pkt_len);
 #else
                                        memcpy(skb_put(skb, pkt_len),
-                                              tp->rx_buffers[entry].skb->tail,
+                                              tp->rx_buffers[entry].skb->data,
                                               pkt_len);
 #endif
                                        pci_dma_sync_single_for_device(tp->pdev,
@@ -423,12 +423,12 @@ static int tulip_rx(struct net_device *dev)
                                                            tp->rx_buffers[entry].mapping,
                                                            pkt_len, PCI_DMA_FROMDEVICE);
 #if ! defined(__alpha__)
-                               eth_copy_and_sum(skb, tp->rx_buffers[entry].skb->tail,
+                               eth_copy_and_sum(skb, tp->rx_buffers[entry].skb->data,
                                                 pkt_len, 0);
                                skb_put(skb, pkt_len);
 #else
                                memcpy(skb_put(skb, pkt_len),
-                                      tp->rx_buffers[entry].skb->tail,
+                                      tp->rx_buffers[entry].skb->data,
                                       pkt_len);
 #endif
                                pci_dma_sync_single_for_device(tp->pdev,
index 08e0f80f89d5356b59370e064f6f4ce78178840d..d45d8f56e5b4a3df298aa6ae3b42b602db2f5b55 100644 (file)
@@ -625,7 +625,7 @@ static void tulip_init_ring(struct net_device *dev)
                tp->rx_buffers[i].skb = skb;
                if (skb == NULL)
                        break;
-               mapping = pci_map_single(tp->pdev, skb->tail,
+               mapping = pci_map_single(tp->pdev, skb->data,
                                         PKT_BUF_SZ, PCI_DMA_FROMDEVICE);
                tp->rx_buffers[i].mapping = mapping;
                skb->dev = dev;                 /* Mark as being used by this device. */
index db4b32c2369ac2ad7bcc32e79234dcef015b1946..5b1af3986abf533eae23e5384287bc9c1804b7e0 100644 (file)
@@ -849,7 +849,7 @@ static void init_rxtx_rings(struct net_device *dev)
                if (skb == NULL)
                        break;
                skb->dev = dev;                 /* Mark as being used by this device. */
-               np->rx_addr[i] = pci_map_single(np->pci_dev,skb->tail,
+               np->rx_addr[i] = pci_map_single(np->pci_dev,skb->data,
                                        skb->len,PCI_DMA_FROMDEVICE);
 
                np->rx_ring[i].buffer1 = np->rx_addr[i];
@@ -1269,7 +1269,7 @@ static int netdev_rx(struct net_device *dev)
                                pci_dma_sync_single_for_cpu(np->pci_dev,np->rx_addr[entry],
                                                            np->rx_skbuff[entry]->len,
                                                            PCI_DMA_FROMDEVICE);
-                               eth_copy_and_sum(skb, np->rx_skbuff[entry]->tail, pkt_len, 0);
+                               eth_copy_and_sum(skb, np->rx_skbuff[entry]->data, pkt_len, 0);
                                skb_put(skb, pkt_len);
                                pci_dma_sync_single_for_device(np->pci_dev,np->rx_addr[entry],
                                                               np->rx_skbuff[entry]->len,
@@ -1315,7 +1315,7 @@ static int netdev_rx(struct net_device *dev)
                                break;                  /* Better luck next round. */
                        skb->dev = dev;                 /* Mark as being used by this device. */
                        np->rx_addr[entry] = pci_map_single(np->pci_dev,
-                                                       skb->tail,
+                                                       skb->data,
                                                        skb->len, PCI_DMA_FROMDEVICE);
                        np->rx_ring[entry].buffer1 = np->rx_addr[entry];
                }
index b8a9b395c5ea17a5b842646e64f89e5e9faf78b2..887d7245fe7b436231eee334d6aefc1f7de969c6 100644 (file)
@@ -899,7 +899,7 @@ static void xircom_init_ring(struct net_device *dev)
                        break;
                skb->dev = dev;                 /* Mark as being used by this device. */
                tp->rx_ring[i].status = Rx0DescOwned;   /* Owned by Xircom chip */
-               tp->rx_ring[i].buffer1 = virt_to_bus(skb->tail);
+               tp->rx_ring[i].buffer1 = virt_to_bus(skb->data);
        }
        tp->dirty_rx = (unsigned int)(i - RX_RING_SIZE);
 
@@ -1291,7 +1291,7 @@ xircom_rx(struct net_device *dev)
                        if (skb == NULL)
                                break;
                        skb->dev = dev;                 /* Mark as being used by this device. */
-                       tp->rx_ring[entry].buffer1 = virt_to_bus(skb->tail);
+                       tp->rx_ring[entry].buffer1 = virt_to_bus(skb->data);
                        work_done++;
                }
                tp->rx_ring[entry].status = Rx0DescOwned;
index 8f3392989a06e83188a1323341d04ff3f4176bca..0b5ca25379634cc9e49f8ca63c3132151e7a531b 100644 (file)
@@ -1661,7 +1661,7 @@ typhoon_alloc_rx_skb(struct typhoon *tp, u32 idx)
 #endif
 
        skb->dev = tp->dev;
-       dma_addr = pci_map_single(tp->pdev, skb->tail,
+       dma_addr = pci_map_single(tp->pdev, skb->data,
                                  PKT_BUF_SZ, PCI_DMA_FROMDEVICE);
 
        /* Since no card does 64 bit DAC, the high bits will never
@@ -1721,7 +1721,7 @@ typhoon_rx(struct typhoon *tp, struct basic_ring *rxRing, volatile u32 * ready,
                        pci_dma_sync_single_for_cpu(tp->pdev, dma_addr,
                                                    PKT_BUF_SZ,
                                                    PCI_DMA_FROMDEVICE);
-                       eth_copy_and_sum(new_skb, skb->tail, pkt_len, 0);
+                       eth_copy_and_sum(new_skb, skb->data, pkt_len, 0);
                        pci_dma_sync_single_for_device(tp->pdev, dma_addr,
                                                       PKT_BUF_SZ,
                                                       PCI_DMA_FROMDEVICE);
index be1c1047b9bac2a11d68cf95d568fa6b2d923379..a56ef0df203ad223ca0575407bb9d0bc37c0cad3 100644 (file)
@@ -990,7 +990,7 @@ static void alloc_rbufs(struct net_device *dev)
                skb->dev = dev;                 /* Mark as being used by this device. */
 
                rp->rx_skbuff_dma[i] =
-                       pci_map_single(rp->pdev, skb->tail, rp->rx_buf_sz,
+                       pci_map_single(rp->pdev, skb->data, rp->rx_buf_sz,
                                       PCI_DMA_FROMDEVICE);
 
                rp->rx_ring[i].addr = cpu_to_le32(rp->rx_skbuff_dma[i]);
@@ -1518,7 +1518,7 @@ static void rhine_rx(struct net_device *dev)
                                                            PCI_DMA_FROMDEVICE);
 
                                eth_copy_and_sum(skb,
-                                                rp->rx_skbuff[entry]->tail,
+                                                rp->rx_skbuff[entry]->data,
                                                 pkt_len, 0);
                                skb_put(skb, pkt_len);
                                pci_dma_sync_single_for_device(rp->pdev,
@@ -1561,7 +1561,7 @@ static void rhine_rx(struct net_device *dev)
                                break;  /* Better luck next round. */
                        skb->dev = dev; /* Mark as being used by this device. */
                        rp->rx_skbuff_dma[entry] =
-                               pci_map_single(rp->pdev, skb->tail,
+                               pci_map_single(rp->pdev, skb->data,
                                               rp->rx_buf_sz,
                                               PCI_DMA_FROMDEVICE);
                        rp->rx_ring[entry].addr = cpu_to_le32(rp->rx_skbuff_dma[entry]);
index 15e710283493fa672e3a408b36171675e77b81f4..abc5cee6eedc28d87f8d75e13b1ccb1b7268b074 100644 (file)
@@ -1335,7 +1335,7 @@ static inline int velocity_rx_copy(struct sk_buff **rx_skb, int pkt_size,
                        if (vptr->flags & VELOCITY_FLAGS_IP_ALIGN)
                                skb_reserve(new_skb, 2);
 
-                       memcpy(new_skb->data, rx_skb[0]->tail, pkt_size);
+                       memcpy(new_skb->data, rx_skb[0]->data, pkt_size);
                        *rx_skb = new_skb;
                        ret = 0;
                }
@@ -1456,9 +1456,9 @@ static int velocity_alloc_rx_buf(struct velocity_info *vptr, int idx)
         *      Do the gymnastics to get the buffer head for data at
         *      64byte alignment.
         */
-       skb_reserve(rd_info->skb, (unsigned long) rd_info->skb->tail & 63);
+       skb_reserve(rd_info->skb, (unsigned long) rd_info->skb->data & 63);
        rd_info->skb->dev = vptr->dev;
-       rd_info->skb_dma = pci_map_single(vptr->pdev, rd_info->skb->tail, vptr->rx_buf_sz, PCI_DMA_FROMDEVICE);
+       rd_info->skb_dma = pci_map_single(vptr->pdev, rd_info->skb->data, vptr->rx_buf_sz, PCI_DMA_FROMDEVICE);
        
        /*
         *      Fill in the descriptor to match
index c1b6896d70072d3ff12014883598ca69808fe862..87496843681a874d463b6aaa5ae56a73cb548ab6 100644 (file)
@@ -72,7 +72,7 @@ static void cisco_keepalive_send(struct net_device *dev, u32 type,
        }
        skb_reserve(skb, 4);
        cisco_hard_header(skb, dev, CISCO_KEEPALIVE, NULL, NULL, 0);
-       data = (cisco_packet*)skb->tail;
+       data = (cisco_packet*)skb->data;
 
        data->type = htonl(type);
        data->par1 = htonl(par1);
index 9da925430109c1c698f6c8a93f02434a7441de1e..1c2506535f7e666c6970c0d901d4621d6d3c3bf7 100644 (file)
@@ -786,7 +786,7 @@ static void yellowfin_init_ring(struct net_device *dev)
                skb->dev = dev;         /* Mark as being used by this device. */
                skb_reserve(skb, 2);    /* 16 byte align the IP header. */
                yp->rx_ring[i].addr = cpu_to_le32(pci_map_single(yp->pci_dev,
-                       skb->tail, yp->rx_buf_sz, PCI_DMA_FROMDEVICE));
+                       skb->data, yp->rx_buf_sz, PCI_DMA_FROMDEVICE));
        }
        yp->rx_ring[i-1].dbdma_cmd = cpu_to_le32(CMD_STOP);
        yp->dirty_rx = (unsigned int)(i - RX_RING_SIZE);
@@ -1111,7 +1111,7 @@ static int yellowfin_rx(struct net_device *dev)
                pci_dma_sync_single_for_cpu(yp->pci_dev, desc->addr,
                        yp->rx_buf_sz, PCI_DMA_FROMDEVICE);
                desc_status = le32_to_cpu(desc->result_status) >> 16;
-               buf_addr = rx_skb->tail;
+               buf_addr = rx_skb->data;
                data_size = (le32_to_cpu(desc->dbdma_cmd) - 
                        le32_to_cpu(desc->result_status)) & 0xffff;
                frame_status = le16_to_cpu(get_unaligned((s16*)&(buf_addr[data_size - 2])));
@@ -1185,7 +1185,7 @@ static int yellowfin_rx(struct net_device *dev)
                                        break;
                                skb->dev = dev;
                                skb_reserve(skb, 2);    /* 16 byte align the IP header */
-                               eth_copy_and_sum(skb, rx_skb->tail, pkt_len, 0);
+                               eth_copy_and_sum(skb, rx_skb->data, pkt_len, 0);
                                skb_put(skb, pkt_len);
                                pci_dma_sync_single_for_device(yp->pci_dev, desc->addr,
                                                                                           yp->rx_buf_sz,
@@ -1211,7 +1211,7 @@ static int yellowfin_rx(struct net_device *dev)
                        skb->dev = dev; /* Mark as being used by this device. */
                        skb_reserve(skb, 2);    /* Align IP on 16 byte boundaries */
                        yp->rx_ring[entry].addr = cpu_to_le32(pci_map_single(yp->pci_dev,
-                               skb->tail, yp->rx_buf_sz, PCI_DMA_FROMDEVICE));
+                               skb->data, yp->rx_buf_sz, PCI_DMA_FROMDEVICE));
                }
                yp->rx_ring[entry].dbdma_cmd = cpu_to_le32(CMD_STOP);
                yp->rx_ring[entry].result_status = 0;   /* Clear complete bit. */