On Monday 19 May 2008 11:10:49 Andy Green wrote:
> | Regarding my suspend/resume issue:
> | - Your addition of "suspend" to the i2c s3c driver has a possible NULL
> | dereference but we don't hit that.
>
> Don't be shy, where is it?
It is attached to this mail. We don't hit that though.
> | - It is hanging in __reg_write even before the _xfer of the i2c s3c is
> | getting called (which means i2c_transfer is not called) which can't be...
>
> How would we know that _xfer is called? Maybe the notification is
> asynchronous somehow, when we panic it is never issued then even though
> it happened.
__reg_write of the pcf driver, which should end in a call to i2c_transfer,
which should use the master_transfer of our s3c i2c code. i2c_transfer is not
called. So I'm either oopsing somewhere before or... deadlock/sleep. Sorry I
didn't progress on this tonight.
>
> | might be a timing issue?
>
> Wah, lovely some horrible race somewhere no doubt (like the others that
> were found in this area).
yupp. Fun :)
diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c
index 5ac8309..bd69127 100644
--- a/drivers/i2c/busses/i2c-s3c2410.c
+++ b/drivers/i2c/busses/i2c-s3c2410.c
@@ -919,10 +919,10 @@ static int s3c24xx_i2c_resume(struct platform_device *dev)
{
struct s3c24xx_i2c *i2c = platform_get_drvdata(dev);
- if (i2c != NULL)
+ if (i2c != NULL) {
s3c24xx_i2c_init(i2c);
-
- i2c->suspended--;
+ i2c->suspended--;
+ }
return 0;
}