diff options
Diffstat (limited to 'drivers/i2c/busses/i2c-pasemi.c')
-rw-r--r-- | drivers/i2c/busses/i2c-pasemi.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-pasemi.c b/drivers/i2c/busses/i2c-pasemi.c index 58e32714afb5..ca18e0be4901 100644 --- a/drivers/i2c/busses/i2c-pasemi.c +++ b/drivers/i2c/busses/i2c-pasemi.c | |||
@@ -51,6 +51,7 @@ struct pasemi_smbus { | |||
51 | #define MRXFIFO_DATA_M 0x000000ff | 51 | #define MRXFIFO_DATA_M 0x000000ff |
52 | 52 | ||
53 | #define SMSTA_XEN 0x08000000 | 53 | #define SMSTA_XEN 0x08000000 |
54 | #define SMSTA_MTN 0x00200000 | ||
54 | 55 | ||
55 | #define CTL_MRR 0x00000400 | 56 | #define CTL_MRR 0x00000400 |
56 | #define CTL_MTR 0x00000200 | 57 | #define CTL_MTR 0x00000200 |
@@ -98,6 +99,10 @@ static unsigned int pasemi_smb_waitready(struct pasemi_smbus *smbus) | |||
98 | status = reg_read(smbus, REG_SMSTA); | 99 | status = reg_read(smbus, REG_SMSTA); |
99 | } | 100 | } |
100 | 101 | ||
102 | /* Got NACK? */ | ||
103 | if (status & SMSTA_MTN) | ||
104 | return -ENXIO; | ||
105 | |||
101 | if (timeout < 0) { | 106 | if (timeout < 0) { |
102 | dev_warn(&smbus->dev->dev, "Timeout, status 0x%08x\n", status); | 107 | dev_warn(&smbus->dev->dev, "Timeout, status 0x%08x\n", status); |
103 | reg_write(smbus, REG_SMSTA, status); | 108 | reg_write(smbus, REG_SMSTA, status); |
@@ -364,7 +369,7 @@ static int __devinit pasemi_smb_probe(struct pci_dev *dev, | |||
364 | smbus->adapter.algo = &smbus_algorithm; | 369 | smbus->adapter.algo = &smbus_algorithm; |
365 | smbus->adapter.algo_data = smbus; | 370 | smbus->adapter.algo_data = smbus; |
366 | 371 | ||
367 | /* set up the driverfs linkage to our parent device */ | 372 | /* set up the sysfs linkage to our parent device */ |
368 | smbus->adapter.dev.parent = &dev->dev; | 373 | smbus->adapter.dev.parent = &dev->dev; |
369 | 374 | ||
370 | reg_write(smbus, REG_CTL, (CTL_MTR | CTL_MRR | | 375 | reg_write(smbus, REG_CTL, (CTL_MTR | CTL_MRR | |