linux_dsm_epyc7002/drivers/net
Martin Blumenstingl 68fbe79291 ath9k: Make the EEPROM swapping check use the eepmisc register
There are two ways of swapping the EEPROM data in the ath9k driver:
1) swab16 based on the first two EEPROM "magic" bytes (same for all
   EEPROM formats)
2) field and EEPROM format specific swab16/swab32 (different for
   eeprom_def, eeprom_4k and eeprom_9287)

The result of the first check was used to also enable the second swap.
This behavior seems incorrect, since the data may only be byte-swapped
(afterwards the data could be in the correct endianness).
Thus we introduce a separate check based on the "eepmisc" register
(which is part of the EEPROM data). When bit 0 is set, then the EEPROM
format specific values are in "big endian". This is also done by the
FreeBSD kernel, see [0] for example.

This allows us to parse EEPROMs with the "correct" magic bytes but
swapped EEPROM format specific values. These EEPROMs (mostly found in
lantiq and broadcom based big endian MIPS based devices) only worked
due to platform specific "hacks" which swapped the EEPROM so the
magic was inverted, which also enabled the format specific swapping.
With this patch the old behavior is still supported, but neither
recommended nor needed anymore.

[0]
50719b56d9/sys/dev/ath/ath_hal/ah_eeprom_9287.c (L351)

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-12-15 10:26:37 +02:00
..
appletalk
arcnet
bonding netns: make struct pernet_operations::id unsigned int 2016-11-18 10:59:15 -05:00
caif
can linux-can-next-for-4.10-20161201 2016-12-03 15:26:30 -05:00
cris
dsa net: dsa: mv88e6xxx: Implement mv88e6390 pause control 2016-12-03 23:18:39 -05:00
ethernet ipv4: fib: Replay events when registering FIB notifier 2016-12-03 19:29:35 -05:00
fddi
fjes
hamradio
hippi
hyperv hv_netvsc: remove excessive logging on MTU change 2016-11-29 20:50:07 -05:00
ieee802154 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-11-26 23:42:21 -05:00
ipvlan Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-12-03 12:29:53 -05:00
irda irda: w83977af_ir: fix damaged whitespace 2016-12-03 15:09:36 -05:00
phy Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-12-03 12:29:53 -05:00
plip
ppp netns: make struct pernet_operations::id unsigned int 2016-11-18 10:59:15 -05:00
slip
team
usb Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-12-03 12:29:53 -05:00
vmxnet3
wan
wimax
wireless ath9k: Make the EEPROM swapping check use the eepmisc register 2016-12-15 10:26:37 +02:00
xen-netback xen-netback: prefer xenbus_scanf() over xenbus_gather() 2016-11-09 20:24:35 -05:00
dummy.c
eql.c
geneve.c geneve: avoid use-after-free of skb->data 2016-12-02 14:07:11 -05:00
gtp.c netns: make struct pernet_operations::id unsigned int 2016-11-18 10:59:15 -05:00
ifb.c
Kconfig
LICENSE.SRC
loopback.c
macsec.c
macvlan.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-11-26 23:42:21 -05:00
macvtap.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-12-03 12:29:53 -05:00
Makefile
mdio.c
mii.c net: mii: report 0 for unknown lp_advertising 2016-11-09 20:26:58 -05:00
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tun.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-12-03 12:29:53 -05:00
veth.c
virtio_net.c virtio-net: enable multiqueue by default 2016-11-28 13:17:40 -05:00
vrf.c
vxlan.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-12-03 12:29:53 -05:00
xen-netfront.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-11-15 10:54:36 -05:00