Skip to contentSkip to conversation

i2c: mv64xxx: Fix transfer error code

PATCH Applied Guenter Roeck 2 participants 5 messages Jun 19, 2013 – Jun 25, 2013 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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
index 1a3abd6..6972032 100644
@@ -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

#2 lore raw
Quoted 5 lines · Guenter Roeck

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.

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
index 1a3abd6..6972032 100644
@@ -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
#3 lore raw
Quoted 10 lines · Wolfram Sang
Quoted 5 lines · Guenter Roeck

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.

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
index 1a3abd6..6972032 100644
@@ -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
#4 lore raw
In reply to Wolfram Sang
Quoted 10 lines · Wolfram Sang
Quoted 5 lines · Guenter Roeck

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.

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
index 1a3abd6..6972032 100644
@@ -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]

Applied
#6 lore raw
Quoted 6 lines · Guenter Roeck
Quoted 5 lines · Wolfram Sang
Quoted 4 lines · Guenter Roeck

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.

Quoted 6 lines
Quoted 5 lines
Quoted 1 line

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!