Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2993024f authored by Sameer Saurabh's avatar Sameer Saurabh Committed by Gerrit - the friendly Code Review server
Browse files

atlantic forwarding driver v1.1.23



- Add License headers to atl_dump parser files.
- Fixed cpus_read lock/unlock apis for latest kernel
- Fixed the coalescing APIs for the latest kernel.

Change-Id: Ic01e197195e715eca6388759298d54c4c51b0fe8
Signed-off-by: default avatarSameer Saurabh <ssaurabh@marvell.com>
Git-commit: 5721b086beed3aa34fd8b2c503b169b19b302664
Git-repo: https://github.com/aquantia/linux-4.14-atlantic-forwarding


Signed-off-by: default avatarRaihan Haider <quic_rhaider@quicinc.com>
parent 1298adeb
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -20,7 +20,7 @@
#include <linux/netdevice.h>
#include <linux/netdevice.h>
#include <linux/moduleparam.h>
#include <linux/moduleparam.h>


#define ATL_VERSION "1.1.22"
#define ATL_VERSION "1.1.23"


struct atl_nic;
struct atl_nic;


+10 −0
Original line number Original line Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0-only */
/* Atlantic Network Driver
 *
 * Copyright (C) 2021 Marvell International Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */

#include <stdio.h>
#include <stdio.h>
#include <stddef.h>
#include <stddef.h>
#include <sys/types.h>
#include <sys/types.h>
+10 −0
Original line number Original line Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0-only */
/* Atlantic Network Driver
 *
 * Copyright (C) 2021 Marvell International Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */

#ifndef __ATL_DUMP_PARSER
#ifndef __ATL_DUMP_PARSER
#define __ATL_DUMP_PARSER
#define __ATL_DUMP_PARSER


+14 −0
Original line number Original line Diff line number Diff line
@@ -1181,8 +1181,15 @@ static int atl_set_priv_flags(struct net_device *ndev, uint32_t flags)
	return 0;
	return 0;
}
}


#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0))
static int atl_get_coalesce(struct net_device *ndev,
			    struct ethtool_coalesce *ec,
			    struct kernel_ethtool_coalesce *kec,
			    struct netlink_ext_ack *extack)
#else
static int atl_get_coalesce(struct net_device *ndev,
static int atl_get_coalesce(struct net_device *ndev,
			    struct ethtool_coalesce *ec)
			    struct ethtool_coalesce *ec)
#endif
{
{
	struct atl_nic *nic = netdev_priv(ndev);
	struct atl_nic *nic = netdev_priv(ndev);


@@ -1193,8 +1200,15 @@ static int atl_get_coalesce(struct net_device *ndev,
	return 0;
	return 0;
}
}


#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0)
static int atl_set_coalesce(struct net_device *ndev,
			    struct ethtool_coalesce *ec,
			    struct kernel_ethtool_coalesce *kec,
			    struct netlink_ext_ack *extack)
#else
static int atl_set_coalesce(struct net_device *ndev,
static int atl_set_coalesce(struct net_device *ndev,
			    struct ethtool_coalesce *ec)
			    struct ethtool_coalesce *ec)
#endif
{
{
	struct atl_nic *nic = netdev_priv(ndev);
	struct atl_nic *nic = netdev_priv(ndev);


+8 −0
Original line number Original line Diff line number Diff line
@@ -1397,7 +1397,11 @@ static void atl_calc_affinities(struct atl_nic *nic)
	int i;
	int i;
	unsigned int cpu;
	unsigned int cpu;


#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0)
	cpus_read_lock();
#else
	get_online_cpus();
	get_online_cpus();
#endif
	cpu = cpumask_first(cpu_online_mask);
	cpu = cpumask_first(cpu_online_mask);


	for (i = 0; i < nic->nvecs; i++) {
	for (i = 0; i < nic->nvecs; i++) {
@@ -1414,7 +1418,11 @@ static void atl_calc_affinities(struct atl_nic *nic)
		cpumask_set_cpu(cpu, cpumask);
		cpumask_set_cpu(cpu, cpumask);
		cpu = cpumask_next(cpu, cpu_online_mask);
		cpu = cpumask_next(cpu, cpu_online_mask);
	}
	}
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0)
	cpus_read_unlock();
#else
	put_online_cpus();
	put_online_cpus();
#endif
}
}


void atl_init_qvec(struct atl_nic *nic, struct atl_queue_vec *qvec, int idx)
void atl_init_qvec(struct atl_nic *nic, struct atl_queue_vec *qvec, int idx)
Loading