mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-21 19:51:45 +00:00
fix lm93_read_block which was retrying even on success.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2788 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
89508412a2
commit
b92d85efbc
2 files changed
+6
-2
No files matched your search
@@ -45,10 +45,12 @@ ask CVS about it:
|
|||||||
Adds a couple log messages for failed transactions (David
|
Adds a couple log messages for failed transactions (David
|
||||||
Knierim)
|
Knierim)
|
||||||
Fix compilation breaking C99-ism (Axel Thimm)
|
Fix compilation breaking C99-ism (Axel Thimm)
|
||||||
|
Fix block read retries
|
||||||
Module pc87360: Support secondary Super-I/O address
|
Module pc87360: Support secondary Super-I/O address
|
||||||
Module smsc47m1: Add support for 47M15x and 47M192 (fans only)
|
Module smsc47m1: Add support for 47M15x and 47M192 (fans only)
|
||||||
Library: Add lm63 support
|
Library: Add lm63 support
|
||||||
Add lpc47b397 support
|
Add lpc47b397 support
|
||||||
|
Programs *.init: Rename lockfile to match file name
|
||||||
Programs i2cset, isaset: Written byte/word can be masked
|
Programs i2cset, isaset: Written byte/word can be masked
|
||||||
Program decode-vaio.pl: Find eeproms on non-0 i2c bus too
|
Program decode-vaio.pl: Find eeproms on non-0 i2c bus too
|
||||||
Program mkpatch: Include i2c-amd756-s4882
|
Program mkpatch: Include i2c-amd756-s4882
|
||||||
|
|||||||
+4
-2
@@ -444,13 +444,15 @@ static u8 lm93_block_buffer[I2C_SMBUS_BLOCK_MAX];
|
|||||||
*/
|
*/
|
||||||
static void lm93_read_block(struct i2c_client *client, u8 fbn, u8 *values)
|
static void lm93_read_block(struct i2c_client *client, u8 fbn, u8 *values)
|
||||||
{
|
{
|
||||||
int i, result;
|
int i, result=0;
|
||||||
|
|
||||||
for (i = 1; i <= MAX_RETRIES; i++) {
|
for (i = 1; i <= MAX_RETRIES; i++) {
|
||||||
result = i2c_smbus_read_block_data(client,
|
result = i2c_smbus_read_block_data(client,
|
||||||
lm93_block_read_cmds[fbn].cmd, lm93_block_buffer);
|
lm93_block_read_cmds[fbn].cmd, lm93_block_buffer);
|
||||||
|
|
||||||
if (result != lm93_block_read_cmds[fbn].len) {
|
if (result == lm93_block_read_cmds[fbn].len) {
|
||||||
|
break;
|
||||||
|
} else {
|
||||||
printk(KERN_WARNING "lm93.o: block read data failed, "
|
printk(KERN_WARNING "lm93.o: block read data failed, "
|
||||||
"command 0x%02x.\n",
|
"command 0x%02x.\n",
|
||||||
lm93_block_read_cmds[fbn].cmd);
|
lm93_block_read_cmds[fbn].cmd);
|
||||||
|
|||||||
Reference in new issue
Block a user