1
0
Fork 0
alistair23-linux/arch/mips
Jonas Gorski 18836b48eb
MIPS: BCM63XX: provide DMA masks for ethernet devices
The switch to the generic dma ops made dma masks mandatory, breaking
devices having them not set. In case of bcm63xx, it broke ethernet with
the following warning when trying to up the device:

[    2.633123] ------------[ cut here ]------------
[    2.637949] WARNING: CPU: 0 PID: 325 at ./include/linux/dma-mapping.h:516 bcm_enetsw_open+0x160/0xbbc
[    2.647423] Modules linked in: gpio_button_hotplug
[    2.652361] CPU: 0 PID: 325 Comm: ip Not tainted 4.19.16 #0
[    2.658080] Stack : 80520000 804cd3ec 00000000 00000000 804ccc00 87085bdc 87d3f9d4 804f9a17
[    2.666707]         8049cf18 00000145 80a942a0 00000204 80ac0000 10008400 87085b90 eb3d5ab7
[    2.675325]         00000000 00000000 80ac0000 000022b0 00000000 00000000 00000007 00000000
[    2.683954]         0000007a 80500000 0013b381 00000000 80000000 00000000 804a1664 80289878
[    2.692572]         00000009 00000204 80ac0000 00000200 00000002 00000000 00000000 80a90000
[    2.701191]         ...
[    2.703701] Call Trace:
[    2.706244] [<8001f3c8>] show_stack+0x58/0x100
[    2.710840] [<800336e4>] __warn+0xe4/0x118
[    2.715049] [<800337d4>] warn_slowpath_null+0x48/0x64
[    2.720237] [<80289878>] bcm_enetsw_open+0x160/0xbbc
[    2.725347] [<802d1d4c>] __dev_open+0xf8/0x16c
[    2.729913] [<802d20cc>] __dev_change_flags+0x100/0x1c4
[    2.735290] [<802d21b8>] dev_change_flags+0x28/0x70
[    2.740326] [<803539e0>] devinet_ioctl+0x310/0x7b0
[    2.745250] [<80355fd8>] inet_ioctl+0x1f8/0x224
[    2.749939] [<802af290>] sock_ioctl+0x30c/0x488
[    2.754632] [<80112b34>] do_vfs_ioctl+0x740/0x7dc
[    2.759459] [<80112c20>] ksys_ioctl+0x50/0x94
[    2.763955] [<800240b8>] syscall_common+0x34/0x58
[    2.768782] ---[ end trace fb1a6b14d74e28b6 ]---
[    2.773544] bcm63xx_enetsw bcm63xx_enetsw.0: cannot allocate rx ring 512

Fix this by adding appropriate DMA masks for the platform devices.

Fixes: f8c55dc6e8 ("MIPS: use generic dma noncoherent ops for simple noncoherent platforms")
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Paul Burton <paul.burton@mips.com>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: James Hogan <jhogan@kernel.org>
Cc: stable@vger.kernel.org # v4.19+
2019-02-25 12:56:39 -08:00
..
alchemy A few early MIPS fixes for 4.21: 2019-01-05 12:48:25 -08:00
ar7 mm: remove include/linux/bootmem.h 2018-10-31 08:54:16 -07:00
ath25 PCI: consolidate PCI config entry in drivers/pci 2018-11-23 11:45:34 +09:00
ath79 PCI: consolidate PCI config entry in drivers/pci 2018-11-23 11:45:34 +09:00
bcm47xx MIPS: BCM47XX: Setup struct device for the SoC 2019-01-09 13:21:02 -08:00
bcm63xx MIPS: BCM63XX: provide DMA masks for ethernet devices 2019-02-25 12:56:39 -08:00
bmips mm: remove include/linux/bootmem.h 2018-10-31 08:54:16 -07:00
boot MIPS: Use lower case for addresses in nexys4ddr.dts 2019-02-04 11:55:49 -08:00
cavium-octeon MIPS: OCTEON: fix kexec support 2019-01-14 13:51:03 -08:00
cobalt
configs MIPS: ath79: Enable OF serial ports in the default config 2019-01-07 13:39:06 -08:00
crypto MIPS: crypto: Add crc32 and crc32c hw accelerated module 2018-02-19 20:50:36 +00:00
dec mm: remove include/linux/bootmem.h 2018-10-31 08:54:16 -07:00
emma mm: remove include/linux/bootmem.h 2018-10-31 08:54:16 -07:00
fw mm: remove include/linux/bootmem.h 2018-10-31 08:54:16 -07:00
generic MIPS: mscc: add PCB120 to the ocelot fitImage 2018-10-09 10:38:29 -07:00
include MIPS: Loongson: Introduce and use loongson_llsc_mb() 2019-02-04 10:53:34 -08:00
jazz MIPS: jazz: fix 64bit build 2019-01-09 13:14:34 -08:00
jz4740 mmc: jz4740: Use GPIO descriptor for power 2018-12-17 08:26:24 +01:00
kernel MIPS: fix truncation in __cmpxchg_small for short values 2019-02-11 12:02:08 -08:00
kvm Kconfig updates for v4.21 2018-12-29 13:03:29 -08:00
lantiq MIPS: lantiq: pass struct device to DMA API functions 2019-02-12 09:40:33 -08:00
lasat mm: remove include/linux/bootmem.h 2018-10-31 08:54:16 -07:00
lib MIPS: lib: Use kernel_pref & user_pref in memcpy() 2018-10-15 23:11:14 -07:00
loongson32 MIPS: Loongson: Merge load addresses 2018-07-30 18:59:01 -07:00
loongson64 mips: loongson64: remove unreachable(), fix loongson_poweroff(). 2019-02-07 11:50:14 -08:00
math-emu Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
mm MIPS: Loongson: Introduce and use loongson_llsc_mb() 2019-02-04 10:53:34 -08:00
mti-malta MIPS: malta: Use img-ascii-lcd driver for LCD display 2018-11-20 21:05:39 -08:00
net mips: bpf: implement jitting of BPF_ALU | BPF_ARSH | BPF_X 2018-12-07 13:30:48 -08:00
netlogic mm: remove include/linux/bootmem.h 2018-10-31 08:54:16 -07:00
oprofile Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
paravirt mips: unify prom_putchar() declarations 2018-07-17 09:40:17 -07:00
pci MIPS: OCTEON: don't set octeon_dma_bar_type if PCI is disabled 2019-01-29 11:47:02 -08:00
pic32 mips: unify prom_putchar() declarations 2018-07-17 09:40:17 -07:00
pistachio License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pmcs-msp71xx PCI: consolidate PCI config entry in drivers/pci 2018-11-23 11:45:34 +09:00
pnx833x mtd: rawnand: Move platform_nand_xxx definitions out of rawnand.h 2018-10-03 11:12:25 +02:00
power License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ralink A few early MIPS fixes for 4.21: 2019-01-05 12:48:25 -08:00
rb532 ata: rb532_cf: Convert to use GPIO descriptors 2018-12-04 17:15:25 -07:00
sgi-ip22 MIPS: Remove no-op/identity casts 2018-08-31 11:49:20 -07:00
sgi-ip27 MIPS: Loongson3,SGI-IP27: Simplify max_low_pfn calculation 2018-11-15 15:42:15 -08:00
sgi-ip32 MIPS: IP32: use generic dma noncoherent ops 2018-06-24 09:27:27 -07:00
sibyte Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
sni MIPS: sni: Remove the read_persistent_clock() 2018-05-14 23:58:25 +01:00
tools MIPS: Use a custom elf-entry program to find kernel entry point 2018-08-30 09:39:22 -07:00
txx9 PCI: consolidate PCI config entry in drivers/pci 2018-11-23 11:45:34 +09:00
vdso MIPS: VDSO: Include $(ccflags-vdso) in o32,n32 .lds builds 2019-01-29 11:50:58 -08:00
vr41xx PCI: consolidate PCI config entry in drivers/pci 2018-11-23 11:45:34 +09:00
Kbuild MIPS: Disable Werror when W= is set 2017-04-10 11:56:07 +02:00
Kbuild.platforms MIPS: Xilfpga: Switch to using generic defconfigs 2017-11-08 22:54:14 +00:00
Kconfig MIPS: Loongson: Introduce and use loongson_llsc_mb() 2019-02-04 10:53:34 -08:00
Kconfig.debug Kconfig: consolidate the "Kernel hacking" menu 2018-08-02 08:06:48 +09:00
Makefile mips: generate uapi header and system call table files 2018-12-14 11:19:02 -08:00
Makefile.postlink License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00