From: Jean Delvare Date: Sun, 6 Dec 2009 16:06:27 +0000 (+0100) Subject: i2c-i801: Retry on lost arbitration X-Git-Tag: v2.6.33-rc1~385^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7e2193a8f942a80eef4ae87e3850615450966d0a;p=platform%2Fupstream%2Fkernel-adaptation-pc.git i2c-i801: Retry on lost arbitration The Intel 82801 is sometimes used on systems with a BMC connected. The BMC can access the SMBus, resulting in lost arbitration for the 82801. We should let i2c-core retry transactions for us in this case. Signed-off-by: Jean Delvare --- diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c index 55edcfe..df6ab553 100644 --- a/drivers/i2c/busses/i2c-i801.c +++ b/drivers/i2c/busses/i2c-i801.c @@ -767,6 +767,9 @@ static int __devinit i801_probe(struct pci_dev *dev, const struct pci_device_id /* set up the sysfs linkage to our parent device */ i801_adapter.dev.parent = &dev->dev; + /* Retry up to 3 times on lost arbitration */ + i801_adapter.retries = 3; + snprintf(i801_adapter.name, sizeof(i801_adapter.name), "SMBus I801 adapter at %04lx", i801_smba); err = i2c_add_adapter(&i801_adapter);