]> git.karo-electronics.de Git - karo-tx-linux.git/commit
V4L/DVB: gspca - main: Fix a crash of some webcams on ARM arch
authorJason Wang <jason77.wang@gmail.com>
Fri, 3 Sep 2010 09:57:19 +0000 (06:57 -0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 29 Oct 2010 04:51:14 +0000 (21:51 -0700)
commita035671ad3092e51c5c1d92b39a2ef196b5ab83a
tree6fd0f8e9c9cd7abdadcb8a1aa573d3adec6e0a59
parentc1e962e493031fce0a7f15ded4fb16e94d35ac90
V4L/DVB: gspca - main: Fix a crash of some webcams on ARM arch

commit 882787ff8fdeb0be790547ee9b22b281095e95da upstream.

When plugging some webcams on ARM, the system crashes.
This is because we alloc buffer for an urb through usb_buffer_alloc,
the alloced buffer is already in DMA coherent region, so we should
set the flag of this urb to URB_NO_TRANSFER_DMA_MAP, otherwise when
we submit this urb, the hcd core will handle this address as an
non-DMA address and call dma_map_single/sg to map it. On arm
architecture, dma_map_single a DMA coherent address will be catched
by a BUG_ON().

Signed-off-by: Jason Wang <jason77.wang@gmail.com>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/media/video/gspca/gspca.c