From fe18e42f10505693f345497be6af97175a38c712 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 11 Jul 2012 15:04:05 -0700 Subject: [PATCH] 3.4-stable patches added patches: gspca-core-fix-buffers-staying-in-queued-state-after-a-stream_off.patch --- ...g-in-queued-state-after-a-stream_off.patch | 48 +++++++++++++++++++ queue-3.4/series | 1 + 2 files changed, 49 insertions(+) create mode 100644 queue-3.4/gspca-core-fix-buffers-staying-in-queued-state-after-a-stream_off.patch diff --git a/queue-3.4/gspca-core-fix-buffers-staying-in-queued-state-after-a-stream_off.patch b/queue-3.4/gspca-core-fix-buffers-staying-in-queued-state-after-a-stream_off.patch new file mode 100644 index 00000000000..84aee723a9e --- /dev/null +++ b/queue-3.4/gspca-core-fix-buffers-staying-in-queued-state-after-a-stream_off.patch @@ -0,0 +1,48 @@ +From ospite@studenti.unina.it Wed Jul 11 14:59:27 2012 +From: Antonio Ospite +Date: Thu, 5 Jul 2012 10:23:17 +0200 +Subject: gspca-core: Fix buffers staying in queued state after a stream_off +To: stable@vger.kernel.org +Cc: Hans de Goede , Antonio Ospite , Mauro Carvalho Chehab +Message-ID: <1341476597-7180-1-git-send-email-ospite@studenti.unina.it> + + +From: Hans de Goede + +commit af05ef01e9cde84620c6855a8d8ab9c8a1db9009 upstream. + +[Backport to linux-stable by Antonio Ospite ] + +This fixes a regression introduced by commit f7059ea and should be +backported to all supported stable kernels which have this commit. + +Signed-off-by: Antonio Ospite +Signed-off-by: Hans de Goede +Tested-by: Antonio Ospite +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/media/video/gspca/gspca.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/drivers/media/video/gspca/gspca.c ++++ b/drivers/media/video/gspca/gspca.c +@@ -1723,7 +1723,7 @@ static int vidioc_streamoff(struct file + enum v4l2_buf_type buf_type) + { + struct gspca_dev *gspca_dev = priv; +- int ret; ++ int i, ret; + + if (buf_type != V4L2_BUF_TYPE_VIDEO_CAPTURE) + return -EINVAL; +@@ -1754,6 +1754,8 @@ static int vidioc_streamoff(struct file + 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; diff --git a/queue-3.4/series b/queue-3.4/series index 7c1b8381548..16488161d5d 100644 --- a/queue-3.4/series +++ b/queue-3.4/series @@ -162,3 +162,4 @@ mac80211-fix-queues-stuck-issue-with-ht-bandwidth-change.patch iwlwifi-remove-log_event-debugfs-file-debugging-is-disabled.patch tracing-change-cpu-ring-buffer-state-from-tracing_cpumask.patch mwifiex-fix-wrong-return-values-in-add_virtual_intf-error-cases.patch +gspca-core-fix-buffers-staying-in-queued-state-after-a-stream_off.patch -- 2.47.3