1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/net/dsa/microchip
Tristram Ha b1c4b4d452 net: dsa: microchip: fix wrong register write when masking interrupt
The switch global port interrupt mask, REG_SW_PORT_INT_MASK__4, is
defined as 0x001C in ksz9477_reg.h.  The designers used 32-bit value in
anticipation for increase of port count in future product but currently
the maximum port count is 7 and the effective value is 0x7F in register
0x001F.  Each port has its own interrupt mask and is defined as 0x#01F.
It uses only 4 bits for different interrupts.

The developer who implemented the current interrupt mechanism in the
switch driver noticed there are similarities between the mechanism to
mask port interrupts in global interrupt and individual interrupts in
each port and so used the same code to handle these interrupts.  He
updated the code to use the new macro REG_SW_PORT_INT_MASK__1 which is
defined as 0x1F in ksz_common.h but he forgot to update the 32-bit write
to 8-bit as now the mask registers are 0x1F and 0x#01F.

In addition all KSZ switches other than the KSZ9897/KSZ9893 and LAN937X
families use only 8-bit access and so this common code will eventually
be changed to accommodate them.

Fixes: e1add7dd61 ("net: dsa: microchip: use common irq routines for girq and pirq")
Signed-off-by: Tristram Ha <tristram.ha@microchip.com>
Link: https://lore.kernel.org/r/1719009262-2948-1-git-send-email-Tristram.Ha@microchip.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2024-06-25 13:26:25 +02:00
..
Kconfig net: dsa: microchip: add support for different DCB app configurations 2024-05-08 10:35:10 +01:00
ksz8.h net: dsa: microchip: dcb: add special handling for KSZ88X3 family 2024-05-08 10:35:10 +01:00
ksz8795.c net: dsa: microchip: let DCB code do PCP and DSCP policy configuration 2024-05-08 10:35:10 +01:00
ksz8795_reg.h net: dsa: microchip: add multi queue support for KSZ88X3 variants 2024-05-08 10:35:10 +01:00
ksz8863_smi.c net: dsa: Explicitly include correct DT includes 2023-07-26 21:54:16 -07:00
ksz9477.c net: dsa: microchip: monitor potential faults in half-duplex mode 2024-06-23 10:06:58 +01:00
ksz9477.h net: dsa: microchip: monitor potential faults in half-duplex mode 2024-06-23 10:06:58 +01:00
ksz9477_acl.c net: dsa: microchip: Fix uninitialized var in ksz9477_acl_move_entries() 2023-10-10 11:12:01 +02:00
ksz9477_i2c.c net: dsa: Add KSZ8567 switch support 2024-02-01 11:17:24 +01:00
ksz9477_reg.h net: dsa: microchip: monitor potential faults in half-duplex mode 2024-06-23 10:06:58 +01:00
ksz9477_tc_flower.c net: dsa: microchip: ksz9477: flower: validate control flags 2024-04-15 10:33:14 +01:00
ksz_common.c net: dsa: microchip: fix wrong register write when masking interrupt 2024-06-25 13:26:25 +02:00
ksz_common.h net: dsa: microchip: monitor potential faults in half-duplex mode 2024-06-23 10:06:58 +01:00
ksz_dcb.c net: dsa: microchip: Correct initialization order for KSZ88x3 ports 2024-05-17 12:25:22 -07:00
ksz_dcb.h net: dsa: microchip: add support DSCP priority mapping 2024-05-08 10:35:11 +01:00
ksz_ptp.c net: dsa: Use conduit and user terms 2023-10-24 13:08:14 -07:00
ksz_ptp.h net: dsa: microchip: ptp: add support for perout programmable pins 2023-01-13 08:40:41 +00:00
ksz_ptp_reg.h net: dsa: microchip: ptp: lan937x: Enable periodic output in LED pins 2023-01-13 08:40:41 +00:00
ksz_spi.c net: dsa: microchip: drop unneeded MODULE_ALIAS 2024-04-16 17:13:15 -07:00
lan937x.h net: dsa: microchip: add support for credit based shaper 2023-01-23 22:12:35 -08:00
lan937x_main.c net: dsa: microchip: add an enum for regmap widths 2023-05-30 09:48:17 +02:00
lan937x_reg.h net: dsa: microchip: add support for credit based shaper 2023-01-23 22:12:35 -08:00
Makefile net: dsa: microchip: add support for different DCB app configurations 2024-05-08 10:35:10 +01:00