Re: 2.6.11-rc5, rivafb i2c oops, bogus error handling

Started by Olaf Hering on Feb 27, 2005 · 4 messages from 2 authors · Last reply Mar 1, 2005

open the first message on its own page

Message details and related content
 On Wed, Feb 23, Linus Torvalds wrote:
This time it's really supposed to be a quickie, so people who can, please 
check it out, and we'll make the real 2.6.11 asap.
Here is another one, probably not new.
Is riva_get_EDID_i2c a bit too optimistic by not having a $i2cadapter_ok
member in riva_par->riva_i2c_chan? It calls riva_probe_i2c_connector
even if riva_create_i2c_busses fails to register all 3 busses.


 
Feb 27 00:32:51 vdr kernel:     ACPI-0367: *** Warning: Unable to derive IRQ 
for device 0000:01:00.0 
Feb 27 00:32:51 vdr kernel: ACPI: PCI interrupt 0000:01:00.0[A]: no GSI - 
using IRQ 11 
Feb 27 00:32:51 vdr kernel: rivafb: nVidia device/chipset 10DE0029 
Feb 27 00:32:51 vdr kernel: rivafb: RIVA MTRR set to ON 
Feb 27 00:32:51 vdr kernel: i2c-algo-bit.o: (0) scl=60, sda=1 
Feb 27 00:32:51 vdr kernel: i2c-algo-bit.o: (1) scl=53, sda=0 
Feb 27 00:32:51 vdr kernel: i2c-algo-bit.o: (2) scl=63, sda=1 
Feb 27 00:32:51 vdr kernel: i2c-algo-bit.o: (3) scl=59, sda=1 
Feb 27 00:32:51 vdr kernel: i2c-algo-bit.o: SCL stuck high! 
Feb 27 00:32:51 vdr kernel: rivafb 0000:01:00.0: Failed to register I2C bus 
BUS1. 
Feb 27 00:32:51 vdr kernel: i2c-algo-bit.o: (0) scl=30, sda=1 
Feb 27 00:32:51 vdr kernel: i2c-algo-bit.o: (1) scl=23, sda=0 
Feb 27 00:32:51 vdr kernel: i2c-algo-bit.o: (2) scl=31, sda=1 
Feb 27 00:32:51 vdr kernel: i2c-algo-bit.o: (3) scl=59, sda=1 
Feb 27 00:32:51 vdr kernel: i2c-algo-bit.o: SCL stuck high! 
Feb 27 00:32:51 vdr kernel: rivafb 0000:01:00.0: Failed to register I2C bus 
BUS2. 
Feb 27 00:32:51 vdr kernel: i2c-algo-bit.o: (0) scl=0, sda=0 
Feb 27 00:32:51 vdr kernel: i2c-algo-bit.o: BUS3 seems to be busy. 
Feb 27 00:32:51 vdr kernel: rivafb 0000:01:00.0: Failed to register I2C bus 
BUS3. 
Feb 27 00:32:51 vdr kernel: Unable to handle kernel NULL pointer dereference 
at virtual address 00000024 
Feb 27 00:32:51 vdr kernel:  printing eip: 
Feb 27 00:32:51 vdr kernel: d09bcafc 
Feb 27 00:32:51 vdr kernel: *pde = 00000000 
Feb 27 00:32:51 vdr kernel: Oops: 0000 [#1] 
Feb 27 00:32:51 vdr kernel: Modules linked in: usbhid evdev joydev sg st 
sd_mod sr_mod scsi_mod rivafb i2c_algo_bit vgastate dvb_ttpci dvb_core 

59 more lines

Re: [Linux-fbdev-devel] Re: 2.6.11-rc5, rivafb i2c oops, bogus error handling

Message details and related content
On Monday 28 February 2005 04:32, Olaf Hering wrote:
 On Wed, Feb 23, Linus Torvalds wrote:
quoted
This time it's really supposed to be a quickie, so people who can, please
check it out, and we'll make the real 2.6.11 asap.
Here is another one, probably not new.
Is riva_get_EDID_i2c a bit too optimistic by not having a $i2cadapter_ok
member in riva_par->riva_i2c_chan? It calls riva_probe_i2c_connector
even if riva_create_i2c_busses fails to register all 3 busses.
Thanks,

Can you try this?

Fixed error handling in rivafb-i2c.c if bus registration fails.

Signed-off-by: Antonino Daplas <redacted>
---

 rivafb-i2c.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff -Nru a/drivers/video/riva/rivafb-i2c.c b/drivers/video/riva/rivafb-i2c.c
--- a/drivers/video/riva/rivafb-i2c.c	2005-01-13 03:57:12 +08:00
+++ b/drivers/video/riva/rivafb-i2c.c	2005-02-28 08:22:06 +08:00
@@ -120,8 +120,12 @@
 	rc = i2c_bit_add_bus(&chan->adapter);
 	if (rc == 0)
 		dev_dbg(&chan->par->pdev->dev, "I2C bus %s registered.\n", name);
-	else
-		dev_warn(&chan->par->pdev->dev, "Failed to register I2C bus %s.\n", name);
+	else {
+		dev_warn(&chan->par->pdev->dev,
+			 "Failed to register I2C bus %s.\n", name);
+		chan->par = NULL;
+	}
+
 	return rc;
 }
 
@@ -171,6 +175,9 @@
 		},
 	};
 	u8 *buf;
+
+	if (!chan->par)
+		return NULL;
 
 	buf = kmalloc(EDID_LENGTH, GFP_KERNEL);
 	if (!buf) {




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

Re: [Linux-fbdev-devel] Re: 2.6.11-rc5, rivafb i2c oops, bogus error handling

Message details and related content
 On Mon, Feb 28, Antonino A. Daplas wrote:
On Monday 28 February 2005 04:32, Olaf Hering wrote:
quoted
 On Wed, Feb 23, Linus Torvalds wrote:
quoted
This time it's really supposed to be a quickie, so people who can, please
check it out, and we'll make the real 2.6.11 asap.
Here is another one, probably not new.
Is riva_get_EDID_i2c a bit too optimistic by not having a $i2cadapter_ok
member in riva_par->riva_i2c_chan? It calls riva_probe_i2c_connector
even if riva_create_i2c_busses fails to register all 3 busses.
Thanks,

Can you try this?

Fixed error handling in rivafb-i2c.c if bus registration fails.
I havent heard back from the reporter, yet.

Re: [Linux-fbdev-devel] Re: 2.6.11-rc5, rivafb i2c oops, bogus error handling

Message details and related content
 On Mon, Feb 28, Antonino A. Daplas wrote:
On Monday 28 February 2005 04:32, Olaf Hering wrote:
quoted
 On Wed, Feb 23, Linus Torvalds wrote:
quoted
This time it's really supposed to be a quickie, so people who can, please
check it out, and we'll make the real 2.6.11 asap.
Here is another one, probably not new.
Is riva_get_EDID_i2c a bit too optimistic by not having a $i2cadapter_ok
member in riva_par->riva_i2c_chan? It calls riva_probe_i2c_connector
even if riva_create_i2c_busses fails to register all 3 busses.
Side note:

[off-list ref]: connect to
    lists.surfsouth.com[216.128.200.12]: Connection timed out

Is this one supposed to work? perhaps the MAINTAINERS entry needs an
update.
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help