Re: [PATCH] gspca: do not resubmit URBs when streaming has stopped

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 26 Feb 2019, Hans Verkuil wrote:

When streaming is stopped all URBs are killed, but in fill_frame and in
bulk_irq this results in an attempt to resubmit the killed URB. That is
not what you want and causes spurious kernel messages.

So check if streaming has stopped before resubmitting.

Also check against gspca_dev->streaming rather than vb2_start_streaming_called()
since vb2_start_streaming_called() will return true when in stop_streaming,
but gspca_dev->streaming is set to false when stop_streaming is called.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xxxxxxxxx>
Fixes: 6992effe5344 ("gspca: Kill all URBs before releasing any of them")
---
Matti and 'softwarebugs', can you test this patch? It should fix the
spurious usb_submit_usb errors that appear in the kernel log.

Matti, I could not reproduce the hard system lockup. Can you test this
patch and see if that lockup still occurs?

I applied the patch on top of current git://linuxtv.org/media_tree.git
9fabe1d108ca4755a880de43f751f1c054f8894d and indeed the URB warnings are gone now.

However, the lockup still occurs.

It can occasionally take few tries to trigger and I've had less luck
reproducing it, for example, with 'mpv' than my own simple program
that basically just uses libv4l2 and libSDL2 to output the image on screen.

If you dare to run random code from some guy on the Internet,
I've made it available at https://tnsp.org/~ccr/nobackup/v4l-bug/
along with a video that demonstrates me demonstrating the problem.

I'll be hanging on IRC in case more help or testing is needed.

--
] ccr/TNSP ^ pWp  ::  ccr@xxxxxxxx  ::  https://tnsp.org/~ccr/
] https://tnsp.org/hg/ -- https://www.openhub.net/accounts/ccr
] PGP key: 7BED 62DE 898D D1A4 FC4A  F392 B705 E735 307B AAE3



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux