tmp_suning_uos_patched/drivers/net/irda
Thomas Jarosch 9476d39366 mcs7780: Fix initialization when CONFIG_VMAP_STACK is enabled
DMA transfers are not allowed to buffers that are on the stack.
Therefore allocate a buffer to store the result of usb_control_message().

Fixes these bugreports:
https://bugzilla.kernel.org/show_bug.cgi?id=195217

https://bugzilla.redhat.com/show_bug.cgi?id=1421387
https://bugzilla.redhat.com/show_bug.cgi?id=1427398

Shortened kernel backtrace from 4.11.9-200.fc25.x86_64:
kernel: ------------[ cut here ]------------
kernel: WARNING: CPU: 3 PID: 2957 at drivers/usb/core/hcd.c:1587
kernel: transfer buffer not dma capable
kernel: Call Trace:
kernel: dump_stack+0x63/0x86
kernel: __warn+0xcb/0xf0
kernel: warn_slowpath_fmt+0x5a/0x80
kernel: usb_hcd_map_urb_for_dma+0x37f/0x570
kernel: ? try_to_del_timer_sync+0x53/0x80
kernel: usb_hcd_submit_urb+0x34e/0xb90
kernel: ? schedule_timeout+0x17e/0x300
kernel: ? del_timer_sync+0x50/0x50
kernel: ? __slab_free+0xa9/0x300
kernel: usb_submit_urb+0x2f4/0x560
kernel: ? urb_destroy+0x24/0x30
kernel: usb_start_wait_urb+0x6e/0x170
kernel: usb_control_msg+0xdc/0x120
kernel: mcs_get_reg+0x36/0x40 [mcs7780]
kernel: mcs_net_open+0xb5/0x5c0 [mcs7780]
...

Regression goes back to 4.9, so it's a good candidate for -stable.
Though it's the decision of the maintainer.

Thanks to Dan Williams for adding the "transfer buffer not dma capable"
warning in the first place. It instantly pointed me in the right direction.

Patch has been tested with transferring data from a Polar watch.

Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-07-24 16:24:05 -07:00
..
act200l-sir.c
actisys-sir.c
ali-ircc.c
ali-ircc.h
au1k_ir.c
bfin_sir.c
bfin_sir.h
donauboe.c
donauboe.h
esi-sir.c
girbil-sir.c
irda-usb.c
irda-usb.h
irtty-sir.c
irtty-sir.h
Kconfig
kingsun-sir.c
ks959-sir.c
ksdazzle-sir.c
litelink-sir.c
ma600-sir.c
Makefile
mcp2120-sir.c
mcs7780.c mcs7780: Fix initialization when CONFIG_VMAP_STACK is enabled 2017-07-24 16:24:05 -07:00
mcs7780.h
nsc-ircc.c
nsc-ircc.h
old_belkin-sir.c
pxaficp_ir.c
sa1100_ir.c
sh_sir.c
sir_dev.c
sir_dongle.c
sir-dev.h
smsc-ircc2.c networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
smsc-ircc2.h
smsc-sio.h
stir4200.c
tekram-sir.c
toim3232-sir.c
via-ircc.c
via-ircc.h
vlsi_ir.c networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
vlsi_ir.h
w83977af_ir.c
w83977af_ir.h
w83977af.h