From: Greg KH <greg@kroah.com>
To: khali@linux-fr.org, rddunlap@osdl.org, dst@bostream.nu,
andrei@arhont.com, icampbell@arcom.com,
rbultje@ronald.bitfreak.net, kraxel@bytesex.org
Cc: linux-kernel@vger.kernel.org, stable@kernel.org
Subject: [05/11] Fix i2c messsage flags in video drivers
Date: Thu, 10 Mar 2005 15:08:35 -0800 [thread overview]
Message-ID: <20050310230835.GF22112@kroah.com> (raw)
In-Reply-To: <20050310230519.GA22112@kroah.com>
-stable review patch. If anyone has any objections, please let us know.
------------------
While working on the saa7110 driver I found a problem with the way
various video drivers (found on Zoran-based boards) prepare i2c messages
to be used by i2c_transfer. The drivers improperly copy the i2c client
flags as the message flags, while both sets are mostly unrelated. The
net effect in this case is to trigger an I2C block read instead of the
expected I2C block write. The fix is simply not to pass any flag,
because none are needed.
I think this patch qualifies hands down as a "critical bug fix" to be
included in whatever bug-fix-only trees exist these days. As far as I
can see, all Zoran-based boards are broken in 2.6.11 without this patch.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Chris Wright <chrisw@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
diff -u -rN linux-2.6.11-bk3/drivers/media/video.orig/adv7170.c linux-2.6.11-bk3/drivers/media/video/adv7170.c
--- linux-2.6.11-bk3/drivers/media/video.orig/adv7170.c Tue Mar 8 10:27:14 2005
+++ linux-2.6.11-bk3/drivers/media/video/adv7170.c Tue Mar 8 12:19:04 2005
@@ -130,7 +130,7 @@
u8 block_data[32];
msg.addr = client->addr;
- msg.flags = client->flags;
+ msg.flags = 0;
while (len >= 2) {
msg.buf = (char *) block_data;
msg.len = 0;
diff -u -rN linux-2.6.11-bk3/drivers/media/video.orig/adv7175.c linux-2.6.11-bk3/drivers/media/video/adv7175.c
--- linux-2.6.11-bk3/drivers/media/video.orig/adv7175.c Tue Mar 8 10:27:14 2005
+++ linux-2.6.11-bk3/drivers/media/video/adv7175.c Tue Mar 8 12:18:57 2005
@@ -126,7 +126,7 @@
u8 block_data[32];
msg.addr = client->addr;
- msg.flags = client->flags;
+ msg.flags = 0;
while (len >= 2) {
msg.buf = (char *) block_data;
msg.len = 0;
diff -u -rN linux-2.6.11-bk3/drivers/media/video.orig/bt819.c linux-2.6.11-bk3/drivers/media/video/bt819.c
--- linux-2.6.11-bk3/drivers/media/video.orig/bt819.c Tue Mar 8 10:27:15 2005
+++ linux-2.6.11-bk3/drivers/media/video/bt819.c Tue Mar 8 12:18:51 2005
@@ -146,7 +146,7 @@
u8 block_data[32];
msg.addr = client->addr;
- msg.flags = client->flags;
+ msg.flags = 0;
while (len >= 2) {
msg.buf = (char *) block_data;
msg.len = 0;
diff -u -rN linux-2.6.11-bk3/drivers/media/video.orig/saa7114.c linux-2.6.11-bk3/drivers/media/video/saa7114.c
--- linux-2.6.11-bk3/drivers/media/video.orig/saa7114.c Tue Mar 8 10:27:15 2005
+++ linux-2.6.11-bk3/drivers/media/video/saa7114.c Tue Mar 8 12:18:20 2005
@@ -163,7 +163,7 @@
u8 block_data[32];
msg.addr = client->addr;
- msg.flags = client->flags;
+ msg.flags = 0;
while (len >= 2) {
msg.buf = (char *) block_data;
msg.len = 0;
diff -u -rN linux-2.6.11-bk3/drivers/media/video.orig/saa7185.c linux-2.6.11-bk3/drivers/media/video/saa7185.c
--- linux-2.6.11-bk3/drivers/media/video.orig/saa7185.c Tue Mar 8 10:27:15 2005
+++ linux-2.6.11-bk3/drivers/media/video/saa7185.c Tue Mar 8 12:18:12 2005
@@ -118,7 +118,7 @@
u8 block_data[32];
msg.addr = client->addr;
- msg.flags = client->flags;
+ msg.flags = 0;
while (len >= 2) {
msg.buf = (char *) block_data;
msg.len = 0;
--
Jean Delvare
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2005-03-10 23:16 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-10 23:05 [00/11] -stable review Greg KH
2005-03-10 23:07 ` [01/11] fix amd64 2.6.11 oops on modprobe (saa7110) Greg KH
2005-03-11 1:37 ` Josh Boyer
2005-03-11 7:57 ` Greg KH
2005-03-11 9:13 ` Jean Delvare
2005-03-11 16:39 ` [stable] " Chris Wright
2005-03-10 23:08 ` [02/11] cramfs: small stat(2) fix Greg KH
2005-03-10 23:08 ` [03/11] drm missing memset can crash X server Greg KH
2005-03-10 23:08 ` [04/11] ppc32: Compilation fixes for Ebony, Luan and Ocotea Greg KH
2005-03-10 23:08 ` Greg KH [this message]
2005-03-10 23:08 ` [06/11] [TCP]: Put back tcp_timer_bug_msg[] symbol export Greg KH
2005-03-10 23:20 ` Christoph Hellwig
2005-03-10 23:47 ` David S. Miller
2005-03-10 23:08 ` [07/11] ppc32: trivial fix for e500 oprofile build Greg KH
2005-03-10 23:09 ` [08/11] PCI-E: fix hotplug double free Greg KH
2005-03-10 23:09 ` [09/11] r8169: receive descriptor length fix Greg KH
2005-03-10 23:09 ` [10/11] sis900 kernel oops fix Greg KH
2005-03-10 23:09 ` [11/11] [VIA RHINE] older chips oops on shutdown Greg KH
2005-03-10 23:15 ` [stable] [00/11] -stable review Chris Wright
2005-03-10 23:18 ` Greg KH
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=20050310230835.GF22112@kroah.com \
--to=greg@kroah.com \
--cc=andrei@arhont.com \
--cc=dst@bostream.nu \
--cc=icampbell@arcom.com \
--cc=khali@linux-fr.org \
--cc=kraxel@bytesex.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rbultje@ronald.bitfreak.net \
--cc=rddunlap@osdl.org \
--cc=stable@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox