tx.c (a2ed933dfefac8976ac915e1b1b60028b9c344b3) tx.c (003eae5a28c6c9d50290a4ac9b955be912f24c9f)
1// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
2/*
3 * Copyright (C) 2003-2014, 2018-2021, 2023-2024 Intel Corporation
4 * Copyright (C) 2013-2015 Intel Mobile Communications GmbH
5 * Copyright (C) 2016-2017 Intel Deutschland GmbH
6 */
7#include <linux/etherdevice.h>
8#include <linux/ieee80211.h>

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

1765 * Note that we put a page chaining pointer *last* in the
1766 * page - we need it somewhere, and if it's there then we
1767 * avoid DMA mapping the last bits of the page which may
1768 * trigger the 32-bit boundary hardware bug.
1769 *
1770 * (see also get_workaround_page() in tx-gen2.c)
1771 */
1772 if (((unsigned long)p->pos & ~PAGE_MASK) + len < IWL_TSO_PAGE_DATA_SIZE) {
1// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
2/*
3 * Copyright (C) 2003-2014, 2018-2021, 2023-2024 Intel Corporation
4 * Copyright (C) 2013-2015 Intel Mobile Communications GmbH
5 * Copyright (C) 2016-2017 Intel Deutschland GmbH
6 */
7#include <linux/etherdevice.h>
8#include <linux/ieee80211.h>

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

1765 * Note that we put a page chaining pointer *last* in the
1766 * page - we need it somewhere, and if it's there then we
1767 * avoid DMA mapping the last bits of the page which may
1768 * trigger the 32-bit boundary hardware bug.
1769 *
1770 * (see also get_workaround_page() in tx-gen2.c)
1771 */
1772 if (((unsigned long)p->pos & ~PAGE_MASK) + len < IWL_TSO_PAGE_DATA_SIZE) {
1773 info = IWL_TSO_PAGE_INFO(page_address(ret));
1773 info = IWL_TSO_PAGE_INFO(page_address(p->page));
1774 goto out;
1775 }
1776
1777 /* We don't have enough room on this page, get a new one. */
1778 iwl_pcie_free_and_unmap_tso_page(trans, p->page);
1779
1780alloc:
1781 p->page = alloc_page(GFP_ATOMIC);
1782 if (!p->page)
1783 return NULL;
1784 p->pos = page_address(p->page);
1785
1774 goto out;
1775 }
1776
1777 /* We don't have enough room on this page, get a new one. */
1778 iwl_pcie_free_and_unmap_tso_page(trans, p->page);
1779
1780alloc:
1781 p->page = alloc_page(GFP_ATOMIC);
1782 if (!p->page)
1783 return NULL;
1784 p->pos = page_address(p->page);
1785
1786 info = IWL_TSO_PAGE_INFO(page_address(ret));
1786 info = IWL_TSO_PAGE_INFO(page_address(p->page));
1787
1788 /* set the chaining pointer to NULL */
1789 info->next = NULL;
1790
1791 /* Create a DMA mapping for the page */
1792 phys = dma_map_page_attrs(trans->dev, p->page, 0, PAGE_SIZE,
1793 DMA_TO_DEVICE, DMA_ATTR_SKIP_CPU_SYNC);
1794 if (unlikely(dma_mapping_error(trans->dev, phys))) {

--- 871 unchanged lines hidden ---
1787
1788 /* set the chaining pointer to NULL */
1789 info->next = NULL;
1790
1791 /* Create a DMA mapping for the page */
1792 phys = dma_map_page_attrs(trans->dev, p->page, 0, PAGE_SIZE,
1793 DMA_TO_DEVICE, DMA_ATTR_SKIP_CPU_SYNC);
1794 if (unlikely(dma_mapping_error(trans->dev, phys))) {

--- 871 unchanged lines hidden ---