i2c: tegra: remove warning dump if timeout happen in transfer
Laxman Dewangan
maintainerPATCH 1/1 i2c: tegra: remove warning dump if timeout happen in transfer
If timeout error occurs in the i2c transfer then it was dumping warning of call stack.
Remove the warning dump as there is may be possibility that some slave devices are busy and not responding the i2c communication.
---
The patch is generated based on discussion happen between Stephena and Wolfram on the patch:
i2c: add bcm2835 driver
resending patch as Wolfram's email id has been changed.
drivers/i2c/busses/i2c-tegra.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/i2c/busses/i2c-tegra.c +1 -1
@@ -587,7 +587,7 @@ static int tegra_i2c_xfer_msg(struct tegra_i2c_dev *i2c_dev, ret =wait_for_completion_timeout (&i2c_dev->msg_complete,TEGRA_I2C_TIMEOUT );tegra_i2c_mask_irq (i2c_dev, int_mask); -if (WARN_ON (ret ==0 )) { +if (ret ==0 ) {dev_err (i2c_dev->dev,"i2c transfer timed out\n" );tegra_i2c_init (i2c_dev);
Signature · 1 line
1.7.1.1
Quoted 22 lines · Laxman Dewangan
If timeout error occurs in the i2c transfer then it was dumping warning of call stack.
Remove the warning dump as there is may be possibility that some slave devices are busy and not responding the i2c communication.
Signed-off-by Laxman Dewangan <[email protected]>---
The patch is generated based on discussion happen between Stephena and Wolfram on the patch:
i2c: add bcm2835 driverresending patch as Wolfram's email id has been changed.
drivers/i2c/busses/i2c-tegra.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/i2c/busses/i2c-tegra.c +0
-0
drivers/i2c/busses/i2c-tegra.c static int tegra_i2c_xfer_msg(struct tegra_i2c_dev *i2c_dev, · line 590
Quoted 5 lines
drivers/i2c/busses/i2c-tegra.c +1
-1@@ -587,7 +587,7 @@ static int tegra_i2c_xfer_msg(struct tegra_i2c_dev *i2c_dev, ret =wait_for_completion_timeout (&i2c_dev->msg_complete,TEGRA_I2C_TIMEOUT );tegra_i2c_mask_irq (i2c_dev, int_mask); -if (WARN_ON (ret ==0 )) { +if (ret ==0 ) {
I think WARN_ON has a unlikely.
If you could do a profiling and have the unlikely.
BTW thats not an objection to the patch though.
Quoted 10 lines
drivers/i2c/busses/i2c-tegra.c +0
-1dev_err (i2c_dev->dev,"i2c transfer timed out\n" );tegra_i2c_init (i2c_dev); --1.7.1.1
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 26 lines · Shubhrajyoti Datta
Quoted 25 lines · Laxman Dewangan
If timeout error occurs in the i2c transfer then it was dumping warning of call stack.
Remove the warning dump as there is may be possibility that some slave devices are busy and not responding the i2c communication.
Signed-off-by Laxman Dewangan <[email protected]>---
The patch is generated based on discussion happen between Stephena and Wolfram on the patch:
i2c: add bcm2835 driverresending patch as Wolfram's email id has been changed.
drivers/i2c/busses/i2c-tegra.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/i2c/busses/i2c-tegra.c +0
-0@@ -587,7 +587,7 @@ static int tegra_i2c_xfer_msg(struct tegra_i2c_dev *i2c_dev, ret =wait_for_completion_timeout (&i2c_dev->msg_complete,TEGRA_I2C_TIMEOUT );tegra_i2c_mask_irq (i2c_dev, int_mask);
Quoted 8 lines
drivers/i2c/busses/i2c-tegra.c static int tegra_i2c_xfer_msg(struct tegra_i2c_dev *i2c_dev, · line 590
Quoted 2 lines
drivers/i2c/busses/i2c-tegra.c +1
-1-if (WARN_ON (ret ==0 )) { +if (ret ==0 ) {I think
WARN_ONhas a unlikely.If you could do a profiling and have the unlikely.
BTW thats not an objection to the patch though.
The thing is: Timeouts can be expected on an I2C bus. Devices can be busy, that's fine. So, no need for a WARN. I'm even thinking of asking to remove the dev_err here, or at least change it into dev_warn, but haven't made up my mind yet.
Regards,
Wolfram
Quoted 7 lines · Laxman Dewangan
If timeout error occurs in the i2c transfer then it was dumping warning of call stack.
Remove the warning dump as there is may be possibility that some slave devices are busy and not responding the i2c communication.
Signed-off-by Laxman Dewangan <[email protected]>
I'd like to have the patch extended. Currently, i2c-tegra is the only I2C user of BUG and BUG_ON. Could you maybe extend the patch to handle those situations more gracefully while we are at it? From a glimpse, these situations don't need a complete halt of the kernel?
Thanks,
Wolfram
Quoted 7 lines · Wolfram Sang
Quoted 6 lines · Laxman Dewangan
If timeout error occurs in the i2c transfer then it was dumping warning of call stack.
Remove the warning dump as there is may be possibility that some slave devices are busy and not responding the i2c communication.
Quoted 6 lines
Quoted 1 line
Signed-off-by Laxman Dewangan <[email protected]>I'd like to have the patch extended. Currently, i2c-tegra is the only I2C user of BUG and
BUG_ON. Could you maybe extend the patch to handle those situations more gracefully while we are at it? From a glimpse, these situations don't need a complete halt of the kernel?
While that's probably useful, surely that's a separate patch?
Quoted 8 lines · Stephen Warren
Quoted 7 lines · Wolfram Sang
Quoted 6 lines · Laxman Dewangan
If timeout error occurs in the i2c transfer then it was dumping warning of call stack.
Remove the warning dump as there is may be possibility that some slave devices are busy and not responding the i2c communication.
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
Signed-off-by Laxman Dewangan <[email protected]>I'd like to have the patch extended. Currently, i2c-tegra is the only I2C user of BUG and
BUG_ON. Could you maybe extend the patch to handle those situations more gracefully while we are at it? From a glimpse, these situations don't need a complete halt of the kernel?While that's probably useful, surely that's a separate patch?
Yes, can be argued. Patch applied to for-next, thanks!