linux/arch/mips/bcm63xx
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
..
boards MIPS: BCM63XX: drop unused and broken DSP platform device 2018-12-31 07:12:35 -08:00
Kconfig PCI: consolidate PCI config entry in drivers/pci 2018-11-23 11:45:34 +09:00
Makefile MIPS: BCM63XX: drop unused and broken DSP platform device 2018-12-31 07:12:35 -08:00
Platform MIPS: BCM63xx: Migrate to new platform makefile style. 2010-08-05 13:25:54 +01:00
clk.c MIPS: BCM63XX: split out swpkt_sar/usb clocks 2017-11-07 18:33:20 +00:00
cpu.c MIPS: Audit and remove any unnecessary uses of module.h 2017-02-14 09:00:25 +00:00
cs.c MIPS: Audit and remove any unnecessary uses of module.h 2017-02-14 09:00:25 +00:00
dev-enet.c MIPS: BCM63XX: provide DMA masks for ethernet devices 2019-02-25 12:56:39 -08:00
dev-flash.c MIPS: BCM63XX: add support for BCM3368 Cable Modem 2013-07-01 15:10:53 +02:00
dev-hsspi.c MIPS: BCM63XX: add HSSPI platform device and register it 2014-01-22 20:18:50 +01:00
dev-pcmcia.c MIPS: BCM63XX: Use pr_* instead of printk 2015-11-11 08:38:29 +01:00
dev-rng.c MIPS: BCM63XX: add RNG driver platform_device stub 2012-07-24 16:33:10 +02:00
dev-spi.c spi/bcm63xx: move register definitions into the driver 2015-10-23 01:19:58 +09:00
dev-uart.c MIPS: BCM63XX: add support for BCM3368 Cable Modem 2013-07-01 15:10:53 +02:00
dev-usb-usbd.c MIPS: BCM63XX: Create platform_device for USBD 2012-08-30 20:15:52 +02:00
dev-wdt.c MIPS: BCM63XX: Fix platform_devices id 2012-07-24 16:33:09 +02:00
early_printk.c mips: unify prom_putchar() declarations 2018-07-17 09:40:17 -07:00
gpio.c MIPS: Audit and remove any unnecessary uses of module.h 2017-02-14 09:00:25 +00:00
irq.c MIPS: Audit and remove any unnecessary uses of module.h 2017-02-14 09:00:25 +00:00
nvram.c Revert "MIPS: bcm63xx: nvram: Remove unused bcm63xx_nvram_get_psi_size() function" 2016-01-27 20:51:50 +01:00
prom.c mm: remove include/linux/bootmem.h 2018-10-31 08:54:16 -07:00
reset.c MIPS: BCM63XX: fix switch core reset on BCM6368 2018-12-23 07:57:11 -08:00
setup.c mm: remove include/linux/bootmem.h 2018-10-31 08:54:16 -07:00
timer.c MIPS: Audit and remove any unnecessary uses of module.h 2017-02-14 09:00:25 +00:00