Skip to content

Commit d7d58a7

Browse files
Andi ShytiAndi Shyti
authored andcommitted
i2c: iproc: When there's an error treat it as an error
If the xfer fails, it indicates a real error. Log it with an error message instead of a debug message to reflect its severity. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Andi Shyti <[email protected]>
1 parent 23c0794 commit d7d58a7

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

drivers/i2c/busses/i2c-bcm-iproc.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -728,31 +728,31 @@ static int bcm_iproc_i2c_check_status(struct bcm_iproc_i2c_dev *iproc_i2c,
728728
return 0;
729729

730730
case M_CMD_STATUS_LOST_ARB:
731-
dev_dbg(iproc_i2c->device, "lost bus arbitration\n");
731+
dev_err(iproc_i2c->device, "lost bus arbitration\n");
732732
return -EAGAIN;
733733

734734
case M_CMD_STATUS_NACK_ADDR:
735-
dev_dbg(iproc_i2c->device, "NAK addr:0x%02x\n", msg->addr);
735+
dev_err(iproc_i2c->device, "NAK addr:0x%02x\n", msg->addr);
736736
return -ENXIO;
737737

738738
case M_CMD_STATUS_NACK_DATA:
739-
dev_dbg(iproc_i2c->device, "NAK data\n");
739+
dev_err(iproc_i2c->device, "NAK data\n");
740740
return -ENXIO;
741741

742742
case M_CMD_STATUS_TIMEOUT:
743-
dev_dbg(iproc_i2c->device, "bus timeout\n");
743+
dev_err(iproc_i2c->device, "bus timeout\n");
744744
return -ETIMEDOUT;
745745

746746
case M_CMD_STATUS_FIFO_UNDERRUN:
747-
dev_dbg(iproc_i2c->device, "FIFO under-run\n");
747+
dev_err(iproc_i2c->device, "FIFO under-run\n");
748748
return -ENXIO;
749749

750750
case M_CMD_STATUS_RX_FIFO_FULL:
751-
dev_dbg(iproc_i2c->device, "RX FIFO full\n");
751+
dev_err(iproc_i2c->device, "RX FIFO full\n");
752752
return -ETIMEDOUT;
753753

754754
default:
755-
dev_dbg(iproc_i2c->device, "unknown error code=%d\n", val);
755+
dev_err(iproc_i2c->device, "unknown error code=%d\n", val);
756756

757757
/* re-initialize i2c for recovery */
758758
bcm_iproc_i2c_enable_disable(iproc_i2c, false);
@@ -964,7 +964,7 @@ static int bcm_iproc_i2c_xfer(struct i2c_adapter *adapter,
964964

965965
ret = bcm_iproc_i2c_xfer_internal(iproc_i2c, msgs, process_call);
966966
if (ret) {
967-
dev_dbg(iproc_i2c->device, "xfer failed\n");
967+
dev_err(iproc_i2c->device, "xfer failed\n");
968968
return ret;
969969
}
970970

0 commit comments

Comments
 (0)