Deleted Added
full compact
mem.c (346923) mem.c (346950)
1/*
2 * Copyright (c) 2009-2013 Chelsio, Inc. All rights reserved.
3 *
4 * This software is available to you under a choice of one of two
5 * licenses. You may choose to be licensed under the terms of the GNU
6 * General Public License (GPL) Version 2, available from the file
7 * COPYING in the main directory of this source tree, or the
8 * OpenIB.org BSD license below:

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

25 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
26 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
27 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
28 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
29 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30 * SOFTWARE.
31 */
32#include <sys/cdefs.h>
1/*
2 * Copyright (c) 2009-2013 Chelsio, Inc. All rights reserved.
3 *
4 * This software is available to you under a choice of one of two
5 * licenses. You may choose to be licensed under the terms of the GNU
6 * General Public License (GPL) Version 2, available from the file
7 * COPYING in the main directory of this source tree, or the
8 * OpenIB.org BSD license below:

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

25 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
26 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
27 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
28 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
29 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30 * SOFTWARE.
31 */
32#include <sys/cdefs.h>
33__FBSDID("$FreeBSD: stable/11/sys/dev/cxgbe/iw_cxgbe/mem.c 346923 2019-04-29 20:10:28Z np $");
33__FBSDID("$FreeBSD: stable/11/sys/dev/cxgbe/iw_cxgbe/mem.c 346950 2019-04-30 07:53:15Z np $");
34
35#include "opt_inet.h"
36
37#ifdef TCP_OFFLOAD
38#include <linux/types.h>
39#include <linux/kref.h>
40#include <rdma/ib_umem.h>
41#include <asm/atomic.h>

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

200 } else
201 dmalen = T4_ULPTX_MAX_DMA;
202 remain -= dmalen;
203 ret = _c4iw_write_mem_dma_aligned(rdev, addr, dmalen,
204 (void *)daddr, !remain);
205 if (ret)
206 goto out;
207 addr += dmalen >> 5;
34
35#include "opt_inet.h"
36
37#ifdef TCP_OFFLOAD
38#include <linux/types.h>
39#include <linux/kref.h>
40#include <rdma/ib_umem.h>
41#include <asm/atomic.h>

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

200 } else
201 dmalen = T4_ULPTX_MAX_DMA;
202 remain -= dmalen;
203 ret = _c4iw_write_mem_dma_aligned(rdev, addr, dmalen,
204 (void *)daddr, !remain);
205 if (ret)
206 goto out;
207 addr += dmalen >> 5;
208 data = (u64 *)data + dmalen;
208 data = (u8 *)data + dmalen;
209 daddr = daddr + dmalen;
210 }
211 if (remain)
212 ret = _c4iw_write_mem_inline(rdev, addr, remain, data);
213out:
214 dma_unmap_single(rhp->ibdev.dma_device, save, len, DMA_TO_DEVICE);
215 return ret;
216}

--- 521 unchanged lines hidden ---
209 daddr = daddr + dmalen;
210 }
211 if (remain)
212 ret = _c4iw_write_mem_inline(rdev, addr, remain, data);
213out:
214 dma_unmap_single(rhp->ibdev.dma_device, save, len, DMA_TO_DEVICE);
215 return ret;
216}

--- 521 unchanged lines hidden ---