Re: [PATCH] staging: iio: light: isl29018: use regmap for register access

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

 



On Wed, Apr 18, 2012 at 11:49:41AM +0530, Laxman Dewangan wrote:

> yes, the caching is done before actual transfer and it can make
> cache dirty in case of transfer failure.
> I am not sure what should be correct handling here: make cache dirty
> or revert the value to original one?
> But using the regmap will provide the common behavior across the
> driver and all driver will have same behavior rather than handling
> on differently across driver.
> So if there is any other policy for this, it will be same for all driver.

I'd mark the cache as dirty I guess, though you'll then need to arrange
to resync it at some point (presumably after you've taken recovery
action) so that won't be enough by itself.  Or reset the device and
bring it back up manually if you think that might work.

regmap doesn't make much effort here since if physical I/O has started
failing you've generally lost the plot completely, 90% of the time it's
not going to be possible to reover the situation at all and if you can
then there's a couple of different strategies that might work and which
one is appropriate is going to depend on the device.  I'll do a patch to
flag the cache as dirty since I can't see how it'd make the situation
any worse but the driver will still need to do something to handle this
situation for that to take any effect.

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux