[PATCH] i2c: Fix NACK detection in i2c-pasemi

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 24, 2007 at 11:39:34PM +0200, Jean Delvare wrote:
> Hi Olof,
> 
> > +	/* Got NACK? */
> > +	if (status & SMSTA_MTN)
> > +		return -ENODEV;
> 
> What does the SMSTA_MTN bit mean exactly? If it is raised by any NACK,
> then it doesn't necessarily mean "no device". It can also mean that the
> slave didn't like the transaction for any reason. In this case -ENODEV
> is too specific and you should instead return -ENXIO or maybe -EINVAL.
> 
> It's up to i2c-core to convert the error code to -ENODEV if it happens
> during device probing.

Yes, it could be raised by any NACK. Want me to respin and resend or
are you OK with editing before committing?


Thanks for your feedback,

-Olof




[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux