.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * Applied Micro X-Gene SoC Ethernet v2 Driver |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (c) 2017, Applied Micro Circuits Corporation |
---|
5 | 6 | * Author(s): Iyappan Subramanian <isubramanian@apm.com> |
---|
6 | 7 | * Keyur Chudgar <kchudgar@apm.com> |
---|
7 | | - * |
---|
8 | | - * This program is free software; you can redistribute it and/or modify it |
---|
9 | | - * under the terms of the GNU General Public License as published by the |
---|
10 | | - * Free Software Foundation; either version 2 of the License, or (at your |
---|
11 | | - * option) any later version. |
---|
12 | | - * |
---|
13 | | - * This program is distributed in the hope that it will be useful, |
---|
14 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
15 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
16 | | - * GNU General Public License for more details. |
---|
17 | | - * |
---|
18 | | - * You should have received a copy of the GNU General Public License |
---|
19 | | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
---|
20 | 8 | */ |
---|
21 | 9 | |
---|
22 | 10 | #include "main.h" |
---|
.. | .. |
---|
66 | 54 | } |
---|
67 | 55 | |
---|
68 | 56 | ret = platform_get_irq(pdev, 0); |
---|
69 | | - if (ret < 0) { |
---|
70 | | - dev_err(dev, "Unable to get irq\n"); |
---|
| 57 | + if (ret < 0) |
---|
71 | 58 | return ret; |
---|
72 | | - } |
---|
73 | 59 | pdata->resources.irq = ret; |
---|
74 | 60 | |
---|
75 | 61 | return 0; |
---|
.. | .. |
---|
206 | 192 | } |
---|
207 | 193 | |
---|
208 | 194 | /* Packet buffers should be 64B aligned */ |
---|
209 | | - pkt_buf = dma_zalloc_coherent(dev, XGENE_ENET_STD_MTU, &dma_addr, |
---|
210 | | - GFP_ATOMIC); |
---|
| 195 | + pkt_buf = dma_alloc_coherent(dev, XGENE_ENET_STD_MTU, &dma_addr, |
---|
| 196 | + GFP_ATOMIC); |
---|
211 | 197 | if (unlikely(!pkt_buf)) { |
---|
212 | 198 | dev_kfree_skb_any(skb); |
---|
213 | 199 | return NETDEV_TX_OK; |
---|
.. | .. |
---|
428 | 414 | ring->ndev = ndev; |
---|
429 | 415 | |
---|
430 | 416 | size = XGENE_ENET_DESC_SIZE * XGENE_ENET_NUM_DESC; |
---|
431 | | - ring->desc_addr = dma_zalloc_coherent(dev, size, &ring->dma_addr, |
---|
432 | | - GFP_KERNEL); |
---|
| 417 | + ring->desc_addr = dma_alloc_coherent(dev, size, &ring->dma_addr, |
---|
| 418 | + GFP_KERNEL); |
---|
433 | 419 | if (!ring->desc_addr) |
---|
434 | 420 | goto err; |
---|
435 | 421 | |
---|
.. | .. |
---|
589 | 575 | } |
---|
590 | 576 | } |
---|
591 | 577 | |
---|
592 | | -static void xge_timeout(struct net_device *ndev) |
---|
| 578 | +static void xge_timeout(struct net_device *ndev, unsigned int txqueue) |
---|
593 | 579 | { |
---|
594 | 580 | struct xge_pdata *pdata = netdev_priv(ndev); |
---|
595 | 581 | |
---|
.. | .. |
---|
757 | 743 | |
---|
758 | 744 | MODULE_DESCRIPTION("APM X-Gene SoC Ethernet v2 driver"); |
---|
759 | 745 | MODULE_AUTHOR("Iyappan Subramanian <isubramanian@apm.com>"); |
---|
760 | | -MODULE_VERSION(XGENE_ENET_V2_VERSION); |
---|
761 | 746 | MODULE_LICENSE("GPL"); |
---|