linux/drivers
Simon Horman e9dbebae2e net: stmmac: Correct byte order of perfect_match
The perfect_match parameter of the update_vlan_hash operation is __le16,
and is correctly converted from host byte-order in the lone caller,
stmmac_vlan_update().

However, the implementations of this caller, dwxgmac2_update_vlan_hash()
and dwxgmac2_update_vlan_hash(), both treat this parameter as host byte
order, using the following pattern:

	u32 value = ...
	...
	writel(value | perfect_match, ...);

This is not correct because both:
1) value is host byte order; and
2) writel expects a host byte order value as it's first argument

I believe that this will break on big endian systems. And I expect it
has gone unnoticed by only being exercised on little endian systems.

The approach taken by this patch is to update the callback, and it's
caller to simply use a host byte order value.

Flagged by Sparse.
Compile tested only.

Fixes: c7ab0b8088 ("net: stmmac: Fallback to VLAN Perfect filtering if HASH is not available")
Signed-off-by: Simon Horman <horms@kernel.org>
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2024-07-24 15:11:44 +01:00
..
accel Merge tag 'drm-habanalabs-next-2024-06-23' of https://github.com/HabanaAI/drivers.accel.habanalabs.kernel into drm-next 2024-06-28 09:41:04 +10:00
accessibility Char/Misc bugfix for 6.10-rc1 2024-05-24 08:43:25 -07:00
acpi sound updates for 6.11-rc1 2024-07-19 12:39:34 -07:00
amba
android
ata ata changes for 6.11-rc1 2024-07-17 13:26:01 -07:00
atm
auxdisplay
base drm next for 6.11-rc1: 2024-07-18 09:34:02 -07:00
bcma
block virtio: features, fixes, cleanups 2024-07-19 11:57:55 -07:00
bluetooth virtio: features, fixes, cleanups 2024-07-19 11:57:55 -07:00
bus soc: arm platform updates for 6.11 2024-07-16 12:03:39 -07:00
cache cache: Add StarFive StarLink cache management 2024-05-28 12:34:11 +01:00
cdrom cdrom: Add missing MODULE_DESCRIPTION() 2024-06-22 19:36:08 -06:00
cdx
char virtio: features, fixes, cleanups 2024-07-19 11:57:55 -07:00
clk This a large collection of clk driver updates and a handful of new SoC 2024-07-19 12:16:28 -07:00
clocksource clocksource/drivers/realtek: Add timer driver for rtl-otto platforms 2024-07-12 16:07:06 +02:00
comedi
connector
counter pwm: Changes for v6.11-rc1 2024-07-15 17:42:28 -07:00
cpufreq Power management updates for 6.11-rc1 2024-07-16 15:54:03 -07:00
cpuidle cpuidle: teo: Don't count non-existent intercepts 2024-07-01 18:58:55 +02:00
crypto virtio: features, fixes, cleanups 2024-07-19 11:57:55 -07:00
cxl cxl: documentation: add missing files to cxl driver-api 2024-06-25 14:45:27 -07:00
dax
dca
devfreq
dio
dma iommufd for 6.11 merge window 2024-07-19 09:42:29 -07:00
dma-buf drm-misc-next for 6.11: 2024-06-21 11:06:56 +10:00
dpll
edac - Make error checking of AMD SMN accesses more robust in the callers as 2024-07-15 19:53:07 -07:00
eisa
extcon
firewire firewire: core: record card index in bus_reset_handle tracepoints event 2024-06-15 14:59:26 +09:00
firmware sound updates for 6.11-rc1 2024-07-19 12:39:34 -07:00
fpga
fsi
gnss
gpio virtio: features, fixes, cleanups 2024-07-19 11:57:55 -07:00
gpu virtio: features, fixes, cleanups 2024-07-19 11:57:55 -07:00
greybus
hid for-linus-2024071601 2024-07-17 17:28:31 -07:00
hsi
hte hte: tegra-194: add missing MODULE_DESCRIPTION() macro 2024-06-19 12:24:03 -07:00
hv Drivers: hv: Cosmetic changes for hv.c and balloon.c 2024-06-06 06:03:29 +00:00
hwmon - Make error checking of AMD SMN accesses more robust in the callers as 2024-07-15 19:53:07 -07:00
hwspinlock
hwtracing
i2c hwmon updates for v6.11-rc1 2024-07-15 17:39:13 -07:00
i3c
idle intel_idle: Switch to new Intel CPU model defines 2024-06-07 20:35:54 +02:00
iio iio: light: apds9306: Fix error handing 2024-06-29 18:51:25 +01:00
infiniband IOMMU Updates for Linux v6.11 2024-07-19 09:59:58 -07:00
input - New Drivers 2024-07-17 17:42:20 -07:00
interconnect interconnect: icc-clk: Add devm_icc_clk_register 2024-07-08 11:40:57 -05:00
iommu virtio: features, fixes, cleanups 2024-07-19 11:57:55 -07:00
ipack
irqchip arm64 updates for 6.11: 2024-07-15 17:06:19 -07:00
isdn isdn: add missing MODULE_DESCRIPTION() macros 2024-06-10 18:08:50 -07:00
leds - Core Frameworks 2024-07-17 17:51:30 -07:00
macintosh
mailbox mailbox: zynqmp-ipi: drop irq_to_desc() call 2024-05-31 12:39:15 -05:00
mcb
md - Optimize processing of flush bios in the dm-linear and dm-stripe 2024-07-19 10:48:44 -07:00
media media updates for v6.11-rc1 2024-07-17 18:30:10 -07:00
memory memory: fsl_ifc: Make FSL_IFC config visible and selectable 2024-06-12 10:17:37 +02:00
memstick memstick: rtsx_pci_ms: Remove Realtek PCI memstick driver 2024-07-08 10:59:06 +02:00
message
mfd - New Drivers 2024-07-17 17:42:20 -07:00
misc drm next for 6.11-rc1: 2024-07-18 09:34:02 -07:00
mmc - New Drivers 2024-07-17 17:42:20 -07:00
most
mtd soc: driver updates for 6.11 2024-07-16 11:35:27 -07:00
mux
net net: stmmac: Correct byte order of perfect_match 2024-07-24 15:11:44 +01:00
nfc nfc: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-06-20 19:28:31 -07:00
ntb
nubus
nvdimm block: move the dax flag to queue_limits 2024-06-19 07:58:28 -06:00
nvme for-6.11/block-20240710 2024-07-15 14:20:22 -07:00
nvmem nvmem: core: limit cell sysfs permissions to main attribute ones 2024-07-03 16:37:51 +02:00
of IOMMU Updates for Linux v6.11 2024-07-19 09:59:58 -07:00
opp Merge branches 'pm-opp' and 'pm-tools' 2024-07-15 18:55:14 +02:00
parisc
parport parport: amiga: Mark driver struct with __refdata to prevent section mismatch 2024-06-04 18:08:31 +02:00
pci power sequencing fixes for v6.11-rc1 2024-07-19 14:31:18 -07:00
pcmcia
peci
perf arm64 updates for 6.11: 2024-07-15 17:06:19 -07:00
phy phy: renesas: phy-rcar-gen3-usb2: Control VBUS for RZ/G2L SoCs 2024-07-03 10:51:53 +02:00
pinctrl gpio updates for v6.11-rc1 2024-07-15 17:53:24 -07:00
platform virtio: features, fixes, cleanups 2024-07-19 11:57:55 -07:00
pmdomain mdomain: Merge branch fixes into next 2024-07-09 13:12:41 +02:00
pnp PNP: Hide pnp_bus_type from the non-PNP code 2024-05-28 21:53:51 +02:00
power power sequencing fixes for v6.11-rc1 2024-07-19 14:31:18 -07:00
powercap powercap: idle_inject: Simplify if condition 2024-06-07 20:57:20 +02:00
pps
ps3
ptp Networking changes for 6.11. Not much excitement - a handful of large 2024-07-16 19:28:34 -07:00
pwm pwm: axi-pwmgen: add .max_register to regmap 2024-07-11 15:44:40 +02:00
rapidio
ras - The AMD memory controllers data fabric version 4.5 supports 2024-07-15 18:20:24 -07:00
regulator - New Drivers 2024-07-17 17:42:20 -07:00
remoteproc virtio: rename find_vqs_info() op to find_vqs() 2024-07-17 05:20:57 -04:00
reset soc: driver updates for 6.11 2024-07-16 11:35:27 -07:00
rpmsg virtio: rename virtio_find_vqs_info() to virtio_find_vqs() 2024-07-17 05:20:58 -04:00
rtc
s390 virtio: features, fixes, cleanups 2024-07-19 11:57:55 -07:00
sbus sbus: add missing MODULE_DESCRIPTION() macros 2024-07-11 15:42:03 +02:00
scsi virtio: features, fixes, cleanups 2024-07-19 11:57:55 -07:00
sh
siox
slimbus
soc sound updates for 6.11-rc1 2024-07-19 12:39:34 -07:00
soundwire sound updates for 6.11-rc1 2024-07-19 12:39:34 -07:00
spi spi: Updates for v6.11 2024-07-15 18:03:43 -07:00
spmi
ssb
staging media updates for v6.11-rc1 2024-07-17 18:30:10 -07:00
target block: remove the blk_integrity_profile structure 2024-06-14 10:20:06 -06:00
tc
tee soc: driver updates for 6.11 2024-07-16 11:35:27 -07:00
thermal Merge branch 'thermal-intel' 2024-07-15 20:44:31 +02:00
thunderbolt thunderbolt: debugfs: Fix margin debugfs node creation condition 2024-05-31 13:13:39 +03:00
tty serial: qcom-geni: do not kill the machine on fifo underrun 2024-07-04 12:30:30 +02:00
ufs SCSI misc on 20240718 2024-07-19 10:56:58 -07:00
uio
usb USB-serial fixes for 6.10-rc8 2024-07-10 19:55:07 +02:00
vdpa vdpa/mlx5: Don't enable non-active VQs in .set_vq_ready() 2024-07-09 08:42:51 -04:00
vfio VFIO updates for v6.11 2024-07-19 11:53:09 -07:00
vhost virtio: features, fixes, cleanups 2024-07-19 11:57:55 -07:00
video fbdev fixes and cleanups for 6.11-rc1: 2024-07-18 11:47:14 -07:00
virt virt: sev-guest: Mark driver struct with __refdata to prevent section mismatch 2024-06-20 20:28:50 +02:00
virtio virtio: rename virtio_find_vqs_info() to virtio_find_vqs() 2024-07-17 05:20:58 -04:00
w1
watchdog - New Drivers 2024-07-17 17:42:20 -07:00
xen dma-mapping updates for Linux 6.11 2024-07-19 10:20:26 -07:00
zorro zorro: Use str_plural() in amiga_zorro_probe() 2024-06-24 12:16:33 +02:00
Kconfig
Makefile