mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-29 10:08:59 +00:00
69d0ff5803
Notify via dev_info when a random MAC address is set. of_get_ethdev_address can return -EPROBE_DEFER for NVMEM devices, return this up, so that ipqess can defer as well. Also move this MAC assignment from _init into _probe, so that this defer can happen earlier. Before change, with MAC address allocated from a built-in NVMEM layout driver (mikrotik,routerboot-nvmem) with extra of_get_ethdev_address result and random MAC printfs: [ 1.197571] ipqess-edma c080000.ethernet: ipqess_init of_get_ethdev_address ret:-517, of_node: /soc/ethernet@c080000 [ 1.197690] ipqess-edma c080000.ethernet: generated random MAC address 22:e7:36:e0:e4:a3 [ 1.614444] ipqess-edma c080000.ethernet eth0: entered promiscuous mode [ 5.055929] ipqess-edma c080000.ethernet eth0: configuring for fixed/internal link mode after change: [ 1.173776] ipqess-edma c080000.ethernet: of_get_ethdev_address: -517 [ 1.614607] ipqess-edma c080000.ethernet eth0: entered promiscuous mode [ 5.246105] ipqess-edma c080000.ethernet eth0: configuring for fixed/internal link mode [ 5.260754] ipqess-edma c080000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx with extra __func__ printf to show _probe and _init: [ 1.173685] ipqess-edma c080000.ethernet: ipqess_axi_probe [ 1.173784] ipqess-edma c080000.ethernet: of_get_ethdev_address: -517 [ 1.280347] ipqess-edma c080000.ethernet: ipqess_axi_probe [ 1.304844] ipqess-edma c080000.ethernet: ipqess_init [ 1.614664] ipqess-edma c080000.ethernet eth0: entered promiscuous mode Signed-off-by: John Thomson <git@johnthomson.fastmail.com.au> Link: https://github.com/openwrt/openwrt/pull/15831 Signed-off-by: Robert Marko <robimarko@gmail.com>
50 lines
1.6 KiB
Diff
50 lines
1.6 KiB
Diff
From 9fa4a57a65e270e4d579cace4de5c438f46c7d12 Mon Sep 17 00:00:00 2001
|
|
From: Robert Marko <robimarko@gmail.com>
|
|
Date: Tue, 15 Aug 2023 14:38:44 +0200
|
|
Subject: [PATCH] net: qualcomm: ipqess: enable threaded NAPI by default
|
|
|
|
Threaded NAPI provides a nice performance boost, so lets enable it by
|
|
default.
|
|
|
|
We do however need to move the __napi_schedule() after HW IRQ has been
|
|
cleared in order to avoid concurency issues.
|
|
|
|
Signed-off-by: Robert Marko <robimarko@gmail.com>
|
|
---
|
|
drivers/net/ethernet/qualcomm/ipqess/ipqess.c | 6 ++++--
|
|
1 file changed, 4 insertions(+), 2 deletions(-)
|
|
|
|
--- a/drivers/net/ethernet/qualcomm/ipqess/ipqess.c
|
|
+++ b/drivers/net/ethernet/qualcomm/ipqess/ipqess.c
|
|
@@ -530,9 +530,9 @@ static irqreturn_t ipqess_interrupt_tx(i
|
|
struct ipqess_tx_ring *tx_ring = (struct ipqess_tx_ring *)priv;
|
|
|
|
if (likely(napi_schedule_prep(&tx_ring->napi_tx))) {
|
|
- __napi_schedule(&tx_ring->napi_tx);
|
|
ipqess_w32(tx_ring->ess, IPQESS_REG_TX_INT_MASK_Q(tx_ring->idx),
|
|
0x0);
|
|
+ __napi_schedule(&tx_ring->napi_tx);
|
|
}
|
|
|
|
return IRQ_HANDLED;
|
|
@@ -543,9 +543,9 @@ static irqreturn_t ipqess_interrupt_rx(i
|
|
struct ipqess_rx_ring *rx_ring = (struct ipqess_rx_ring *)priv;
|
|
|
|
if (likely(napi_schedule_prep(&rx_ring->napi_rx))) {
|
|
- __napi_schedule(&rx_ring->napi_rx);
|
|
ipqess_w32(rx_ring->ess, IPQESS_REG_RX_INT_MASK_Q(rx_ring->idx),
|
|
0x0);
|
|
+ __napi_schedule(&rx_ring->napi_rx);
|
|
}
|
|
|
|
return IRQ_HANDLED;
|
|
@@ -1269,6 +1269,8 @@ static int ipqess_axi_probe(struct platf
|
|
if (err)
|
|
goto err_notifier_unregister;
|
|
|
|
+ dev_set_threaded(netdev, true);
|
|
+
|
|
return 0;
|
|
|
|
err_notifier_unregister:
|