From: "Dean A." <dean@sensoray.com>
To: linux-media@vger.kernel.org, mchehab@infradead.org,
video4linux-list@redhat.com
Subject: patch: s2255drv: fix race condition on set mode
Date: Mon, 20 Apr 2009 15:07:44 -0700 (PDT) [thread overview]
Message-ID: <tkrat.21210659c895a1d2@sensoray.com> (raw)
From: Dean Anderson <dean@sensoray.com>
set_modeready flag must be set before command sent to USB in
s2255_write_config.
Signed-off-by: Dean Anderson <dean@sensoray.com>
--- v4l-dvb-74b7f650670a/linux/drivers/media/video/s2255drv.c.orig 2009-04-20 14:33:04.000000000 -0700
+++ v4l-dvb-74b7f650670a/linux/drivers/media/video/s2255drv.c 2009-04-20 14:58:22.000000000 -0700
@@ -1238,6 +1238,7 @@ static int s2255_set_mode(struct s2255_d
buffer[1] = (u32) chn_rev;
buffer[2] = CMD_SET_MODE;
memcpy(&buffer[3], &dev->mode[chn], sizeof(struct s2255_mode));
+ dev->setmode_ready[chn] = 0;
res = s2255_write_config(dev->udev, (unsigned char *)buffer, 512);
if (debug)
dump_verify_mode(dev, mode);
@@ -1246,7 +1247,6 @@ static int s2255_set_mode(struct s2255_d
/* wait at least 3 frames before continuing */
if (mode->restart) {
- dev->setmode_ready[chn] = 0;
wait_event_timeout(dev->wait_setmode[chn],
(dev->setmode_ready[chn] != 0),
msecs_to_jiffies(S2255_SETMODE_TIMEOUT));
reply other threads:[~2009-04-20 22:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tkrat.21210659c895a1d2@sensoray.com \
--to=dean@sensoray.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@infradead.org \
--cc=video4linux-list@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.