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

Commit 10b066c1 authored by Dmitry Bogdanov's avatar Dmitry Bogdanov Committed by Gerrit - the friendly Code Review server
Browse files

atlantic forwarding driver v1.1.14



 [ATLDRV-1609] - Facing failure for the DMA Network Loopback Test
 [ATLDRV-1605] - AQC107 GPIO_0 PPS alignment
 [ATLDRV-1614] - probe of 0000:02:00.0 failed with error -22 after loading driver with "msi=N max_queues_non_msi=4".

Change-Id: Icdad49b4a1f72dee34b7601a72ba4113917931ff
Signed-off-by: default avatarDmitry Bogdanov <dbogdanov@marvell.com>
Git-commit: 6288945d8b0ffec0edc1e909b1390cfce3ccb7f0
Git-repo: https://github.com/aquantia/linux-4.14-atlantic-forwarding


Signed-off-by: default avatarLakshit Tyagi <ltyagi@codeaurora.org>
parent 2260359c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@
#include <linux/netdevice.h>
#include <linux/moduleparam.h>

#define ATL_VERSION "1.1.13"
#define ATL_VERSION "1.1.14"

struct atl_nic;

+1 −1
Original line number Diff line number Diff line
@@ -1178,7 +1178,7 @@ static int request_ring(struct net_device *ndev, struct genl_info *info)
			goto err_relring;
		}

		result = atl_init_rx_ring(ring_desc);
		result = atl_init_rx_ring(ring_desc, ATL_QUEUE_REGULAR);
	}
	if (result)
		goto err_relring;
+3 −0
Original line number Diff line number Diff line
@@ -898,6 +898,9 @@ void atl_set_rx_mode(struct net_device *ndev)
	else if (uc_count + mc_count > nic->rxf_mac.available - 1)
		all_multi_needed = true;

	if (nic->priv_flags & ATL_PF_BIT(LPB_NET_DMA))
		promisc_needed = true;

	/* Enable promisc VLAN mode if IFF_PROMISC explicitly
	 * requested or too many VIDs registered
	 */
+39 −1
Original line number Diff line number Diff line
@@ -34,6 +34,12 @@
#define PTP_4TC_RING_IDX            16
#define PTP_HWTS_RING_IDX           31

enum ptp_perout_action {
	ptp_perout_disabled = 0,
	ptp_perout_enabled,
	ptp_perout_pps,
};

enum ptp_speed_offsets {
	ptp_offset_idx_10 = 0,
	ptp_offset_idx_100,
@@ -105,6 +111,8 @@ struct ptp_tm_offset {

static struct ptp_tm_offset ptp_offset[6];

static int atl_ptp_pps_reconfigure(struct atl_ptp *ptp);

static int __atl_ptp_skb_put(struct ptp_skb_ring *ring, struct sk_buff *skb)
{
	unsigned int next_head = (ring->head + 1) % ring->size;
@@ -309,6 +317,8 @@ static int atl_ptp_adjtime(struct ptp_clock_info *ptp_info, s64 delta)
	hw_atl_adj_sys_clock(&nic->hw, delta);
	spin_unlock_irqrestore(&ptp->ptp_lock, flags);

	atl_ptp_pps_reconfigure(ptp);

	return 0;
}

@@ -354,9 +364,10 @@ static int atl_ptp_settime(struct ptp_clock_info *ptp_info,
	spin_lock_irqsave(&ptp->ptp_lock, flags);
	hw_atl_get_ptp_ts(&nic->hw, &now);
	hw_atl_adj_sys_clock(&nic->hw, (s64)ns - (s64)now);

	spin_unlock_irqrestore(&ptp->ptp_lock, flags);

	atl_ptp_pps_reconfigure(ptp);

	return 0;
}

@@ -418,6 +429,8 @@ static int atl_ptp_perout_pin_configure(struct ptp_clock_info *ptp_clock,
	start = on ? s->sec * NSEC_PER_SEC + s->nsec : 0;

	atl_ptp_hw_pin_conf(nic, pin_index, start, period);
	ptp->ptp_info.pin_config[pin_index].rsv[2] = on ? ptp_perout_enabled :
							  ptp_perout_disabled;

	return 0;
}
@@ -442,8 +455,33 @@ static int atl_ptp_pps_pin_configure(struct ptp_clock_info *ptp_clock,
		(rest > 990000000LL ? 2 : 1) : 0;

	atl_ptp_hw_pin_conf(nic, pin_index, start, period);
	ptp->ptp_info.pin_config[pin_index].rsv[2] = on ? ptp_perout_pps :
							  ptp_perout_disabled;

	return 0;
}

static int atl_ptp_pps_reconfigure(struct atl_ptp *ptp)
{
	struct atl_nic *nic = ptp->nic;
	u64 start, period;
	u32 rest = 0;
	int i;

	for (i = 0; i < ptp->ptp_info.n_pins; i++)
		if ((ptp->ptp_info.pin_config[i].func == PTP_PF_PEROUT) &&
		    (ptp->ptp_info.pin_config[i].rsv[2] == ptp_perout_pps)) {

			hw_atl_get_ptp_ts(&nic->hw, &start);
			div_u64_rem(start, NSEC_PER_SEC, &rest);
			period = NSEC_PER_SEC;
			start = start - rest + NSEC_PER_SEC * (rest > 990000000LL ? 2 : 1);

			atl_ptp_hw_pin_conf(nic, i, start, period);
		}

	return 0;

}

static void atl_ptp_extts_pin_ctrl(struct atl_ptp *ptp)
+4 −4
Original line number Diff line number Diff line
@@ -1825,7 +1825,7 @@ void atl_set_intr_mod(struct atl_nic *nic)
		atl_set_intr_mod_qvec(qvec);
}

int atl_init_rx_ring(struct atl_desc_ring *rx)
int atl_init_rx_ring(struct atl_desc_ring *rx, enum atl_queue_type type)
{
	struct atl_hw *hw = &rx->nic->hw;
	struct atl_rxbuf *rxbuf;
@@ -1835,7 +1835,7 @@ int atl_init_rx_ring(struct atl_desc_ring *rx)
	if (rx->head > 0x1FFF)
		return -EIO;

	switch (rx->qvec->type) {
	switch (type) {
	case ATL_QUEUE_HWTS:
		ret = atl_fill_hwts_rx(rx, ring_space(rx), false);
		break;
@@ -1851,7 +1851,7 @@ int atl_init_rx_ring(struct atl_desc_ring *rx)
	if (ret)
		return ret;

	if (likely(rx->qvec->type != ATL_QUEUE_HWTS)) {
	if (likely(type != ATL_QUEUE_HWTS)) {
		rx->next_to_recycle = rx->tail;
		/* rxbuf at ->next_to_recycle is always kept empty so that
		 * atl_maybe_recycle_rxbuf() always have a spot to recycle into
@@ -1962,7 +1962,7 @@ int atl_start_qvec(struct atl_queue_vec *qvec)
	int intr = atl_qvec_intr(qvec);
	int ret;

	ret = atl_init_rx_ring(rx);
	ret = atl_init_rx_ring(rx, qvec->type);
	if (ret)
		return ret;
	if (likely(qvec->type != ATL_QUEUE_HWTS)) {
Loading