starfire.c (0cd83cc020fdf9fcc56d9456d9978430f41873cf) starfire.c (9e903e085262ffbf1fc44a17ac06058aca03524a)
1/* starfire.c: Linux device driver for the Adaptec Starfire network adapter. */
2/*
3 Written 1998-2000 by Donald Becker.
4
5 Current maintainer is Ion Badulescu <ionut ta badula tod org>. Please
6 send all bug reports to me, and not to Donald Becker, as this code
7 has been heavily modified from Donald's original version.
8

--- 1242 unchanged lines hidden (view full) ---

1251 status |= TxCalTCP;
1252 dev->stats.tx_compressed++;
1253 }
1254 status |= skb_first_frag_len(skb) | (skb_num_frags(skb) << 16);
1255
1256 np->tx_info[entry].mapping =
1257 pci_map_single(np->pci_dev, skb->data, skb_first_frag_len(skb), PCI_DMA_TODEVICE);
1258 } else {
1/* starfire.c: Linux device driver for the Adaptec Starfire network adapter. */
2/*
3 Written 1998-2000 by Donald Becker.
4
5 Current maintainer is Ion Badulescu <ionut ta badula tod org>. Please
6 send all bug reports to me, and not to Donald Becker, as this code
7 has been heavily modified from Donald's original version.
8

--- 1242 unchanged lines hidden (view full) ---

1251 status |= TxCalTCP;
1252 dev->stats.tx_compressed++;
1253 }
1254 status |= skb_first_frag_len(skb) | (skb_num_frags(skb) << 16);
1255
1256 np->tx_info[entry].mapping =
1257 pci_map_single(np->pci_dev, skb->data, skb_first_frag_len(skb), PCI_DMA_TODEVICE);
1258 } else {
1259 skb_frag_t *this_frag = &skb_shinfo(skb)->frags[i - 1];
1260 status |= this_frag->size;
1259 const skb_frag_t *this_frag = &skb_shinfo(skb)->frags[i - 1];
1260 status |= skb_frag_size(this_frag);
1261 np->tx_info[entry].mapping =
1262 pci_map_single(np->pci_dev,
1263 skb_frag_address(this_frag),
1261 np->tx_info[entry].mapping =
1262 pci_map_single(np->pci_dev,
1263 skb_frag_address(this_frag),
1264 this_frag->size,
1264 skb_frag_size(this_frag),
1265 PCI_DMA_TODEVICE);
1266 }
1267
1268 np->tx_ring[entry].addr = cpu_to_dma(np->tx_info[entry].mapping);
1269 np->tx_ring[entry].status = cpu_to_le32(status);
1270 if (debug > 3)
1271 printk(KERN_DEBUG "%s: Tx #%d/#%d slot %d status %#8.8x.\n",
1272 dev->name, np->cur_tx, np->dirty_tx,

--- 100 unchanged lines hidden (view full) ---

1373 np->tx_info[entry].mapping = 0;
1374 np->dirty_tx += np->tx_info[entry].used_slots;
1375 entry = (entry + np->tx_info[entry].used_slots) % TX_RING_SIZE;
1376 {
1377 int i;
1378 for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) {
1379 pci_unmap_single(np->pci_dev,
1380 np->tx_info[entry].mapping,
1265 PCI_DMA_TODEVICE);
1266 }
1267
1268 np->tx_ring[entry].addr = cpu_to_dma(np->tx_info[entry].mapping);
1269 np->tx_ring[entry].status = cpu_to_le32(status);
1270 if (debug > 3)
1271 printk(KERN_DEBUG "%s: Tx #%d/#%d slot %d status %#8.8x.\n",
1272 dev->name, np->cur_tx, np->dirty_tx,

--- 100 unchanged lines hidden (view full) ---

1373 np->tx_info[entry].mapping = 0;
1374 np->dirty_tx += np->tx_info[entry].used_slots;
1375 entry = (entry + np->tx_info[entry].used_slots) % TX_RING_SIZE;
1376 {
1377 int i;
1378 for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) {
1379 pci_unmap_single(np->pci_dev,
1380 np->tx_info[entry].mapping,
1381 skb_shinfo(skb)->frags[i].size,
1381 skb_frag_size(&skb_shinfo(skb)->frags[i]),
1382 PCI_DMA_TODEVICE);
1383 np->dirty_tx++;
1384 entry++;
1385 }
1386 }
1387
1388 dev_kfree_skb_irq(skb);
1389 }

--- 702 unchanged lines hidden ---
1382 PCI_DMA_TODEVICE);
1383 np->dirty_tx++;
1384 entry++;
1385 }
1386 }
1387
1388 dev_kfree_skb_irq(skb);
1389 }

--- 702 unchanged lines hidden ---