* [PATCH] gspca-core: Fix buffers staying in queued state after a stream_off
@ 2012-05-23 8:12 Hans de Goede
0 siblings, 0 replies; 3+ messages in thread
From: Hans de Goede @ 2012-05-23 8:12 UTC (permalink / raw)
To: Linux Media Mailing List; +Cc: Jean-Francois Moine, Hans de Goede, stable
This fixes a regression introduced by commit f7059ea and should be
backported to all supported stable kernels which have this commit.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Antonio Ospite <ospite@studenti.unina.it>
CC: stable@kernel.org
---
drivers/media/video/gspca/gspca.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c
index 137166d..31721ea 100644
--- a/drivers/media/video/gspca/gspca.c
+++ b/drivers/media/video/gspca/gspca.c
@@ -1653,7 +1653,7 @@ static int vidioc_streamoff(struct file *file, void *priv,
enum v4l2_buf_type buf_type)
{
struct gspca_dev *gspca_dev = video_drvdata(file);
- int ret;
+ int i, ret;
if (buf_type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
return -EINVAL;
@@ -1678,6 +1678,8 @@ static int vidioc_streamoff(struct file *file, void *priv,
wake_up_interruptible(&gspca_dev->wq);
/* empty the transfer queues */
+ for (i = 0; i < gspca_dev->nframes; i++)
+ gspca_dev->frame[i].v4l2_buf.flags &= ~BUF_ALL_FLAGS;
atomic_set(&gspca_dev->fr_q, 0);
atomic_set(&gspca_dev->fr_i, 0);
gspca_dev->fr_o = 0;
--
1.7.10
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] gspca-core: Fix buffers staying in queued state after a stream_off
@ 2012-05-23 8:20 Hans de Goede
2012-05-23 8:21 ` Hans de Goede
0 siblings, 1 reply; 3+ messages in thread
From: Hans de Goede @ 2012-05-23 8:20 UTC (permalink / raw)
To: Linux Media Mailing List; +Cc: Jean-Francois Moine, Hans de Goede, stable
This fixes a regression introduced by commit f7059ea and should be
backported to all supported stable kernels which have this commit.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Antonio Ospite <ospite@studenti.unina.it>
CC: stable@vger.kernel.org
---
drivers/media/video/gspca/gspca.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c
index 137166d..31721ea 100644
--- a/drivers/media/video/gspca/gspca.c
+++ b/drivers/media/video/gspca/gspca.c
@@ -1653,7 +1653,7 @@ static int vidioc_streamoff(struct file *file, void *priv,
enum v4l2_buf_type buf_type)
{
struct gspca_dev *gspca_dev = video_drvdata(file);
- int ret;
+ int i, ret;
if (buf_type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
return -EINVAL;
@@ -1678,6 +1678,8 @@ static int vidioc_streamoff(struct file *file, void *priv,
wake_up_interruptible(&gspca_dev->wq);
/* empty the transfer queues */
+ for (i = 0; i < gspca_dev->nframes; i++)
+ gspca_dev->frame[i].v4l2_buf.flags &= ~BUF_ALL_FLAGS;
atomic_set(&gspca_dev->fr_q, 0);
atomic_set(&gspca_dev->fr_i, 0);
gspca_dev->fr_o = 0;
--
1.7.10
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] gspca-core: Fix buffers staying in queued state after a stream_off
2012-05-23 8:20 [PATCH] gspca-core: Fix buffers staying in queued state after a stream_off Hans de Goede
@ 2012-05-23 8:21 ` Hans de Goede
0 siblings, 0 replies; 3+ messages in thread
From: Hans de Goede @ 2012-05-23 8:21 UTC (permalink / raw)
To: Linux Media Mailing List; +Cc: Jean-Francois Moine
sorry for the spam, I had to resend it because I got the stable
email address wrong.
On 05/23/2012 10:20 AM, Hans de Goede wrote:
> This fixes a regression introduced by commit f7059ea and should be
> backported to all supported stable kernels which have this commit.
>
> Signed-off-by: Hans de Goede<hdegoede@redhat.com>
> Tested-by: Antonio Ospite<ospite@studenti.unina.it>
> CC: stable@vger.kernel.org
> ---
> drivers/media/video/gspca/gspca.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c
> index 137166d..31721ea 100644
> --- a/drivers/media/video/gspca/gspca.c
> +++ b/drivers/media/video/gspca/gspca.c
> @@ -1653,7 +1653,7 @@ static int vidioc_streamoff(struct file *file, void *priv,
> enum v4l2_buf_type buf_type)
> {
> struct gspca_dev *gspca_dev = video_drvdata(file);
> - int ret;
> + int i, ret;
>
> if (buf_type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
> return -EINVAL;
> @@ -1678,6 +1678,8 @@ static int vidioc_streamoff(struct file *file, void *priv,
> wake_up_interruptible(&gspca_dev->wq);
>
> /* empty the transfer queues */
> + for (i = 0; i< gspca_dev->nframes; i++)
> + gspca_dev->frame[i].v4l2_buf.flags&= ~BUF_ALL_FLAGS;
> atomic_set(&gspca_dev->fr_q, 0);
> atomic_set(&gspca_dev->fr_i, 0);
> gspca_dev->fr_o = 0;
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-05-23 8:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-23 8:20 [PATCH] gspca-core: Fix buffers staying in queued state after a stream_off Hans de Goede
2012-05-23 8:21 ` Hans de Goede
-- strict thread matches above, loose matches on Subject: below --
2012-05-23 8:12 Hans de Goede
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).