aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/microchip/lan966x/lan966x_main.h
diff options
context:
space:
mode:
authorHoratiu Vultur <horatiu.vultur@microchip.com>2021-12-18 22:49:40 +0100
committerDavid S. Miller <davem@davemloft.net>2021-12-20 11:44:05 +0000
commit5ccd66e01cbef8b10adc9787b6e3ba1889a63742 (patch)
tree0734a9f2feefc243ec9ad9438da4ed3a6c453890 /drivers/net/ethernet/microchip/lan966x/lan966x_main.h
parentdt-bindings: net: lan966x: Extend with the analyzer interrupt (diff)
downloadlinux-dev-5ccd66e01cbef8b10adc9787b6e3ba1889a63742.tar.xz
linux-dev-5ccd66e01cbef8b10adc9787b6e3ba1889a63742.zip
net: lan966x: add support for interrupts from analyzer
This patch adds support for handling the interrupts generated by the analyzer. Currently, only the MAC table generates these interrupts. The MAC table will generate an interrupt whenever it learns or forgets an entry in the table. It is the SW responsibility figure out which entries were added/removed. Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/microchip/lan966x/lan966x_main.h')
-rw-r--r--drivers/net/ethernet/microchip/lan966x/lan966x_main.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ethernet/microchip/lan966x/lan966x_main.h b/drivers/net/ethernet/microchip/lan966x/lan966x_main.h
index 7e5a3b6f168d..ba548d65b58a 100644
--- a/drivers/net/ethernet/microchip/lan966x/lan966x_main.h
+++ b/drivers/net/ethernet/microchip/lan966x/lan966x_main.h
@@ -75,6 +75,9 @@ struct lan966x {
u8 base_mac[ETH_ALEN];
+ struct list_head mac_entries;
+ spinlock_t mac_lock; /* lock for mac_entries list */
+
/* stats */
const struct lan966x_stat_layout *stats_layout;
u32 num_stats;
@@ -87,6 +90,7 @@ struct lan966x {
/* interrupts */
int xtr_irq;
+ int ana_irq;
};
struct lan966x_port_config {
@@ -141,6 +145,8 @@ int lan966x_mac_forget(struct lan966x *lan966x,
int lan966x_mac_cpu_learn(struct lan966x *lan966x, const char *addr, u16 vid);
int lan966x_mac_cpu_forget(struct lan966x *lan966x, const char *addr, u16 vid);
void lan966x_mac_init(struct lan966x *lan966x);
+void lan966x_mac_purge_entries(struct lan966x *lan966x);
+irqreturn_t lan966x_mac_irq_handler(struct lan966x *lan966x);
static inline void __iomem *lan_addr(void __iomem *base[],
int id, int tinst, int tcnt,