qla3xxx.c (5d6bcdfe38ce883946aebf751a64695471ce1ab5) qla3xxx.c (9e903e085262ffbf1fc44a17ac06058aca03524a)
1/*
2 * QLogic QLA3xxx NIC HBA Driver
3 * Copyright (c) 2003-2006 QLogic Corporation
4 *
5 * See LICENSE.qla3xxx for copyright and licensing details.
6 */
7
8#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

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

2383 dma_unmap_addr_set(&tx_cb->map[seg], mapaddr, map);
2384 dma_unmap_len_set(&tx_cb->map[seg], maplen,
2385 sizeof(struct oal));
2386 oal_entry = (struct oal_entry *)oal;
2387 oal++;
2388 seg++;
2389 }
2390
1/*
2 * QLogic QLA3xxx NIC HBA Driver
3 * Copyright (c) 2003-2006 QLogic Corporation
4 *
5 * See LICENSE.qla3xxx for copyright and licensing details.
6 */
7
8#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

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

2383 dma_unmap_addr_set(&tx_cb->map[seg], mapaddr, map);
2384 dma_unmap_len_set(&tx_cb->map[seg], maplen,
2385 sizeof(struct oal));
2386 oal_entry = (struct oal_entry *)oal;
2387 oal++;
2388 seg++;
2389 }
2390
2391 map = skb_frag_dma_map(&qdev->pdev->dev, frag, 0, frag->size,
2391 map = skb_frag_dma_map(&qdev->pdev->dev, frag, 0, skb_frag_size(frag),
2392 DMA_TO_DEVICE);
2393
2394 err = dma_mapping_error(&qdev->pdev->dev, map);
2395 if (err) {
2396 netdev_err(qdev->ndev,
2397 "PCI mapping frags failed with error: %d\n",
2398 err);
2399 goto map_error;
2400 }
2401
2402 oal_entry->dma_lo = cpu_to_le32(LS_64BITS(map));
2403 oal_entry->dma_hi = cpu_to_le32(MS_64BITS(map));
2392 DMA_TO_DEVICE);
2393
2394 err = dma_mapping_error(&qdev->pdev->dev, map);
2395 if (err) {
2396 netdev_err(qdev->ndev,
2397 "PCI mapping frags failed with error: %d\n",
2398 err);
2399 goto map_error;
2400 }
2401
2402 oal_entry->dma_lo = cpu_to_le32(LS_64BITS(map));
2403 oal_entry->dma_hi = cpu_to_le32(MS_64BITS(map));
2404 oal_entry->len = cpu_to_le32(frag->size);
2404 oal_entry->len = cpu_to_le32(skb_frag_size(frag));
2405 dma_unmap_addr_set(&tx_cb->map[seg], mapaddr, map);
2405 dma_unmap_addr_set(&tx_cb->map[seg], mapaddr, map);
2406 dma_unmap_len_set(&tx_cb->map[seg], maplen, frag->size);
2406 dma_unmap_len_set(&tx_cb->map[seg], maplen, skb_frag_size(frag));
2407 }
2408 /* Terminate the last segment. */
2409 oal_entry->len |= cpu_to_le32(OAL_LAST_ENTRY);
2410 return NETDEV_TX_OK;
2411
2412map_error:
2413 /* A PCI mapping failed and now we will need to back out
2414 * We need to traverse through the oal's and associated pages which

--- 1554 unchanged lines hidden ---
2407 }
2408 /* Terminate the last segment. */
2409 oal_entry->len |= cpu_to_le32(OAL_LAST_ENTRY);
2410 return NETDEV_TX_OK;
2411
2412map_error:
2413 /* A PCI mapping failed and now we will need to back out
2414 * We need to traverse through the oal's and associated pages which

--- 1554 unchanged lines hidden ---