| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (C) 2006-2007 PA Semi, Inc |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Driver for the PA Semi PWRficient onchip 1G/10G Ethernet MACs |
|---|
| 5 | | - * |
|---|
| 6 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 7 | | - * it under the terms of the GNU General Public License version 2 as |
|---|
| 8 | | - * published by the Free Software Foundation. |
|---|
| 9 | | - * |
|---|
| 10 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 11 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 12 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 13 | | - * GNU General Public License for more details. |
|---|
| 14 | | - * |
|---|
| 15 | | - * You should have received a copy of the GNU General Public License |
|---|
| 16 | | - * along with this program; if not, see <http://www.gnu.org/licenses/>. |
|---|
| 17 | 6 | */ |
|---|
| 18 | 7 | |
|---|
| 19 | 8 | #include <linux/module.h> |
|---|
| .. | .. |
|---|
| 401 | 390 | if (pasemi_dma_alloc_ring(&ring->chan, RX_RING_SIZE)) |
|---|
| 402 | 391 | goto out_ring_desc; |
|---|
| 403 | 392 | |
|---|
| 404 | | - ring->buffers = dma_zalloc_coherent(&mac->dma_pdev->dev, |
|---|
| 405 | | - RX_RING_SIZE * sizeof(u64), |
|---|
| 406 | | - &ring->buf_dma, GFP_KERNEL); |
|---|
| 393 | + ring->buffers = dma_alloc_coherent(&mac->dma_pdev->dev, |
|---|
| 394 | + RX_RING_SIZE * sizeof(u64), |
|---|
| 395 | + &ring->buf_dma, GFP_KERNEL); |
|---|
| 407 | 396 | if (!ring->buffers) |
|---|
| 408 | 397 | goto out_ring_desc; |
|---|
| 409 | 398 | |
|---|
| .. | .. |
|---|
| 1359 | 1348 | const int nh_off = skb_network_offset(skb); |
|---|
| 1360 | 1349 | const int nh_len = skb_network_header_len(skb); |
|---|
| 1361 | 1350 | const int nfrags = skb_shinfo(skb)->nr_frags; |
|---|
| 1362 | | - int cs_size, i, fill, hdr, cpyhdr, evt; |
|---|
| 1351 | + int cs_size, i, fill, hdr, evt; |
|---|
| 1363 | 1352 | dma_addr_t csdma; |
|---|
| 1364 | 1353 | |
|---|
| 1365 | 1354 | fund = XCT_FUN_ST | XCT_FUN_RR_8BRES | |
|---|
| .. | .. |
|---|
| 1400 | 1389 | fill++; |
|---|
| 1401 | 1390 | |
|---|
| 1402 | 1391 | /* Copy the result into the TCP packet */ |
|---|
| 1403 | | - cpyhdr = fill; |
|---|
| 1404 | 1392 | CS_DESC(csring, fill++) = XCT_FUN_O | XCT_FUN_FUN(csring->fun) | |
|---|
| 1405 | 1393 | XCT_FUN_LLEN(2) | XCT_FUN_SE; |
|---|
| 1406 | 1394 | CS_DESC(csring, fill++) = XCT_PTR_LEN(2) | XCT_PTR_ADDR(cs_dest) | XCT_PTR_T; |
|---|
| .. | .. |
|---|
| 1720 | 1708 | err = -ENODEV; |
|---|
| 1721 | 1709 | goto out; |
|---|
| 1722 | 1710 | } |
|---|
| 1711 | + dma_set_mask(&mac->dma_pdev->dev, DMA_BIT_MASK(64)); |
|---|
| 1723 | 1712 | |
|---|
| 1724 | 1713 | mac->iob_pdev = pci_get_device(PCI_VENDOR_ID_PASEMI, 0xa001, NULL); |
|---|
| 1725 | 1714 | if (!mac->iob_pdev) { |
|---|
| .. | .. |
|---|
| 1842 | 1831 | pci_unregister_driver(&pasemi_mac_driver); |
|---|
| 1843 | 1832 | } |
|---|
| 1844 | 1833 | |
|---|
| 1845 | | -int pasemi_mac_init_module(void) |
|---|
| 1834 | +static int pasemi_mac_init_module(void) |
|---|
| 1846 | 1835 | { |
|---|
| 1847 | 1836 | int err; |
|---|
| 1848 | 1837 | |
|---|