i2c: mv64xxx: Fix transfer error code
PATCH 1/1 i2c: mv64xxx: Fix transfer error code
The driver returns -ENODEV as error code if it did not get an ACK from the device. Per Documentation/i2c/fault-codes, it should return -ENXIO.
--- drivers/i2c/busses/i2c-mv64xxx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/busses/i2c-mv64xxx.c +1 -1
@@ -227,7 +227,7 @@ mv64xxx_i2c_fsm(struct mv64xxx_i2c_data *drv_data, u32 status)/* Doesn't seem to be a device at other end */ drv_data->action =MV64XXX_I2C_ACTION_SEND_STOP ; drv_data->state =MV64XXX_I2C_STATE_IDLE ; - drv_data->rc = -ENODEV ; + drv_data->rc = -ENXIO ;break ;default :
Signature · 1 line
1.7.9.7
A message that is not in the archive (sent off-list or not yet received): 1371678832-26889-1-git-send-email-linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org
Quoted 5 lines · Guenter Roeck
The driver returns
-ENODEVas error code if it did not get an ACK from the device. PerDocumentation/i2c/fault-codes, it should return-ENXIO.Signed-off-by Guenter Roeck <[email protected]>
Thanks, have you checked the other error codes as well while you were there?
Quoted 20 lines
--- drivers/i2c/busses/i2c-mv64xxx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/i2c/busses/i2c-mv64xxx.c +1
-1@@ -227,7 +227,7 @@ mv64xxx_i2c_fsm(struct mv64xxx_i2c_data *drv_data, u32 status)/* Doesn't seem to be a device at other end */ drv_data->action =MV64XXX_I2C_ACTION_SEND_STOP ; drv_data->state =MV64XXX_I2C_STATE_IDLE ; - drv_data->rc = -ENODEV ; + drv_data->rc = -ENXIO ;break ;default :Signature · 1 line
1.7.9.7
Quoted 10 lines · Wolfram Sang
Quoted 5 lines · Guenter Roeck
The driver returns
-ENODEVas error code if it did not get an ACK from the device. PerDocumentation/i2c/fault-codes, it should return-ENXIO.Signed-off-by Guenter Roeck <[email protected]>Thanks, have you checked the other error codes as well while you were there?
No; this is one that was discovered while testing a driver connected to the controller. I'll check the others and let you know if I find any other problems.
Thanks,
Guenter
Quoted 20 lines
Quoted 20 lines
--- drivers/i2c/busses/i2c-mv64xxx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/i2c/busses/i2c-mv64xxx.c +1
-1@@ -227,7 +227,7 @@ mv64xxx_i2c_fsm(struct mv64xxx_i2c_data *drv_data, u32 status)/* Doesn't seem to be a device at other end */ drv_data->action =MV64XXX_I2C_ACTION_SEND_STOP ; drv_data->state =MV64XXX_I2C_STATE_IDLE ; - drv_data->rc = -ENODEV ; + drv_data->rc = -ENXIO ;break ;default :Signature · 1 line
1.7.9.7
Quoted 10 lines · Wolfram Sang
Quoted 5 lines · Guenter Roeck
The driver returns
-ENODEVas error code if it did not get an ACK from the device. PerDocumentation/i2c/fault-codes, it should return-ENXIO.Signed-off-by Guenter Roeck <[email protected]>Thanks, have you checked the other error codes as well while you were there?
Other error codes are ok as far as I can see.
Guenter
Quoted 20 lines
Quoted 20 lines
--- drivers/i2c/busses/i2c-mv64xxx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/i2c/busses/i2c-mv64xxx.c +1
-1@@ -227,7 +227,7 @@ mv64xxx_i2c_fsm(struct mv64xxx_i2c_data *drv_data, u32 status)/* Doesn't seem to be a device at other end */ drv_data->action =MV64XXX_I2C_ACTION_SEND_STOP ; drv_data->state =MV64XXX_I2C_STATE_IDLE ; - drv_data->rc = -ENODEV ; + drv_data->rc = -ENXIO ;break ;default :Signature · 1 line
1.7.9.7
A message that is not in the archive (sent off-list or not yet received): [email protected]
Wolfram Sang
AppliedQuoted 6 lines · Guenter Roeck
Quoted 5 lines · Wolfram Sang
Quoted 4 lines · Guenter Roeck
The driver returns
-ENODEVas error code if it did not get an ACK from the device. PerDocumentation/i2c/fault-codes, it should return-ENXIO.
Quoted 6 lines
Quoted 5 lines
Quoted 1 line
Signed-off-by Guenter Roeck <[email protected]>Thanks, have you checked the other error codes as well while you were there?
Other error codes are ok as far as I can see.
Applied to for-next, thanks for double checking!