All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mfd: sm501: Set coherent_dma_mask when creating subdevices
@ 2018-08-04  3:59 Guenter Roeck
  2018-08-16  9:07 ` Lee Jones
  0 siblings, 1 reply; 2+ messages in thread
From: Guenter Roeck @ 2018-08-04  3:59 UTC (permalink / raw)
  To: Lee Jones; +Cc: linux-kernel, Guenter Roeck

Instantiating the sm501 OHCI subdevice results in a kernel warning.

sm501-usb sm501-usb: SM501 OHCI
sm501-usb sm501-usb: new USB bus registered, assigned bus number 1
WARNING: CPU: 0 PID: 1 at ./include/linux/dma-mapping.h:516
ohci_init+0x194/0x2d8
Modules linked in:

CPU: 0 PID: 1 Comm: swapper Tainted: G        W
4.18.0-rc7-00178-g0b5b1f9a78b5 #1
PC is at ohci_init+0x194/0x2d8
PR is at ohci_init+0x168/0x2d8
PC  : 8c27844c SP  : 8f81dd94 SR  : 40008001
TEA : 29613060
R0  : 00000000 R1  : 00000000 R2  : 00000000 R3  : 00000202
R4  : 8fa98b88 R5  : 8c277e68 R6  : 00000000 R7  : 00000000
R8  : 8f965814 R9  : 8c388100 R10 : 8fa98800 R11 : 8fa98928
R12 : 8c48302c R13 : 8fa98920 R14 : 8c48302c
MACH: 00000096 MACL: 0000017c GBR : 00000000 PR  : 8c278420

Call trace:
 [<(ptrval)>] usb_add_hcd+0x1e8/0x6ec
 [<(ptrval)>] _dev_info+0x0/0x54
 [<(ptrval)>] arch_local_save_flags+0x0/0x8
 [<(ptrval)>] arch_local_irq_restore+0x0/0x24
 [<(ptrval)>] ohci_hcd_sm501_drv_probe+0x114/0x2d8
...

Initialize coherent_dma_mask when creating SM501 subdevices to fix
the problem.

Fixes: b6d6454fdb66f ("mfd: SM501 core driver")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
 drivers/mfd/sm501.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mfd/sm501.c b/drivers/mfd/sm501.c
index 2a87b0d2f21f..a530972c5a7e 100644
--- a/drivers/mfd/sm501.c
+++ b/drivers/mfd/sm501.c
@@ -715,6 +715,7 @@ sm501_create_subdev(struct sm501_devdata *sm, char *name,
 	smdev->pdev.name = name;
 	smdev->pdev.id = sm->pdev_id;
 	smdev->pdev.dev.parent = sm->dev;
+	smdev->pdev.dev.coherent_dma_mask = 0xffffffff;
 
 	if (res_count) {
 		smdev->pdev.resource = (struct resource *)(smdev+1);
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mfd: sm501: Set coherent_dma_mask when creating subdevices
  2018-08-04  3:59 [PATCH] mfd: sm501: Set coherent_dma_mask when creating subdevices Guenter Roeck
@ 2018-08-16  9:07 ` Lee Jones
  0 siblings, 0 replies; 2+ messages in thread
From: Lee Jones @ 2018-08-16  9:07 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: linux-kernel

On Fri, 03 Aug 2018, Guenter Roeck wrote:

> Instantiating the sm501 OHCI subdevice results in a kernel warning.
> 
> sm501-usb sm501-usb: SM501 OHCI
> sm501-usb sm501-usb: new USB bus registered, assigned bus number 1
> WARNING: CPU: 0 PID: 1 at ./include/linux/dma-mapping.h:516
> ohci_init+0x194/0x2d8
> Modules linked in:
> 
> CPU: 0 PID: 1 Comm: swapper Tainted: G        W
> 4.18.0-rc7-00178-g0b5b1f9a78b5 #1
> PC is at ohci_init+0x194/0x2d8
> PR is at ohci_init+0x168/0x2d8
> PC  : 8c27844c SP  : 8f81dd94 SR  : 40008001
> TEA : 29613060
> R0  : 00000000 R1  : 00000000 R2  : 00000000 R3  : 00000202
> R4  : 8fa98b88 R5  : 8c277e68 R6  : 00000000 R7  : 00000000
> R8  : 8f965814 R9  : 8c388100 R10 : 8fa98800 R11 : 8fa98928
> R12 : 8c48302c R13 : 8fa98920 R14 : 8c48302c
> MACH: 00000096 MACL: 0000017c GBR : 00000000 PR  : 8c278420
> 
> Call trace:
>  [<(ptrval)>] usb_add_hcd+0x1e8/0x6ec
>  [<(ptrval)>] _dev_info+0x0/0x54
>  [<(ptrval)>] arch_local_save_flags+0x0/0x8
>  [<(ptrval)>] arch_local_irq_restore+0x0/0x24
>  [<(ptrval)>] ohci_hcd_sm501_drv_probe+0x114/0x2d8
> ...
> 
> Initialize coherent_dma_mask when creating SM501 subdevices to fix
> the problem.
> 
> Fixes: b6d6454fdb66f ("mfd: SM501 core driver")
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---
>  drivers/mfd/sm501.c | 1 +
>  1 file changed, 1 insertion(+)

Applied, thanks.

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-08-16  9:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-04  3:59 [PATCH] mfd: sm501: Set coherent_dma_mask when creating subdevices Guenter Roeck
2018-08-16  9:07 ` Lee Jones

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.