linux/drivers/net/dsa
Tristram Ha 784079f697 net: dsa: microchip: fix wrong register write when masking interrupt
[ Upstream commit b1c4b4d452 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2024-07-05 09:33:48 +02:00
..
b53 net: dsa: use capital "OR" for multiple licenses in SPDX 2023-08-24 12:02:53 -07:00
hirschmann net: dsa: use capital "OR" for multiple licenses in SPDX 2023-08-24 12:02:53 -07:00
microchip net: dsa: microchip: fix wrong register write when masking interrupt 2024-07-05 09:33:48 +02:00
mv88e6xxx net: dsa: mv88e6xxx: Avoid EEPROM timeout without EEPROM on 88E6250-family switches 2024-06-12 11:11:46 +02:00
ocelot Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-08-24 10:51:39 -07:00
qca net dsa: qca8k: fix usages of device_get_named_child_node() 2024-06-21 14:38:33 +02:00
realtek net: dsa: realtek: keep default LED state in rtl8366rb 2024-06-27 13:49:02 +02:00
sja1105 net: dsa: sja1105: Fix parameters order in sja1110_pcs_mdio_write_c45() 2024-04-10 16:35:51 +02:00
xrs700x net: dsa: Explicitly include correct DT includes 2023-07-26 21:54:16 -07:00
bcm_sf2.c net: dsa: bcm_sf2: Fix possible memory leak in bcm_sf2_mdio_register() 2023-10-13 16:29:46 -07:00
bcm_sf2.h net: dsa: bcm_sf2: refactor LED regs access 2021-12-30 17:28:32 -08:00
bcm_sf2_cfp.c net: dsa: introduce dsa_port_get_master() 2022-09-20 10:32:35 +02:00
bcm_sf2_regs.h net: dsa: bcm_sf2: refactor LED regs access 2021-12-30 17:28:32 -08:00
dsa_loop.c net: dsa: Fix possible memory leaks in dsa_loop_init() 2022-10-28 10:32:59 +01:00
dsa_loop.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dsa_loop_bdinfo.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
Kconfig net: dsa: mt7530: improve and relax PHY driver dependency 2023-08-09 11:22:55 +01:00
lan9303-core.c net: dsa: Explicitly include correct DT includes 2023-07-26 21:54:16 -07:00
lan9303.h net: dsa: be compatible with masters which unregister on shutdown 2021-09-19 12:08:37 +01:00
lan9303_i2c.c net: dsa: Switch i2c drivers back to use .probe() 2023-05-31 09:52:55 +01:00
lan9303_mdio.c net: dsa: lan9303: consequently nested-lock physical MDIO 2023-11-28 17:20:11 +00:00
lantiq_gswip.c net: dsa: lantiq_gswip: mark OF related data as maybe unused 2023-03-15 08:11:01 +00:00
lantiq_pce.h net: dsa: Use the correct style for SPDX License Identifier 2019-09-22 15:25:08 -07:00
Makefile net: dsa: mt7530: introduce driver for MT7988 built-in switch 2023-04-03 10:13:01 +01:00
mt7530-mdio.c net: dsa: mt7530: fix support for MT7531BE 2023-04-19 17:37:45 -07:00
mt7530-mmio.c net: dsa: Explicitly include correct DT includes 2023-07-26 21:54:16 -07:00
mt7530.c net: dsa: mt7530: fix enabling EEE on MT7531 switch on all boards 2024-04-27 17:11:43 +02:00
mt7530.h net: dsa: mt7530: fix enabling EEE on MT7531 switch on all boards 2024-04-27 17:11:43 +02:00
mv88e6060.c net: dsa: mv88e6060: add phylink_get_caps implementation 2023-08-14 18:57:17 -07:00
mv88e6060.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
rzn1_a5psw.c net: dsa: rzn1-a5psw: remove redundant logs 2023-08-23 09:43:32 +01:00
rzn1_a5psw.h net: dsa: rzn1-a5psw: add vlan support 2023-08-11 11:58:36 +01:00
vitesse-vsc73xx-core.c net: dsa: vsc73xx: Add null pointer check to vsc73xx_gpio_probe 2024-01-25 15:35:58 -08:00
vitesse-vsc73xx-platform.c net: dsa: vitesse-vsc73xx: remove unnecessary set_drvdata() 2022-09-22 19:30:39 -07:00
vitesse-vsc73xx-spi.c net: dsa: vitesse-vsc73xx: remove unnecessary set_drvdata() 2022-09-22 19:30:39 -07:00
vitesse-vsc73xx.h net: dsa: vsc73xxx: Make vsc73xx_remove() return void 2021-11-15 13:15:07 +00:00