[20191130.84][Mellanox]Adding mlsxw debug patch#290
Closed
dgsudharsan wants to merge 1 commit intosonic-net:tag_20191130.84from
Closed
[20191130.84][Mellanox]Adding mlsxw debug patch#290dgsudharsan wants to merge 1 commit intosonic-net:tag_20191130.84from
dgsudharsan wants to merge 1 commit intosonic-net:tag_20191130.84from
Conversation
paulmenzel
suggested changes
Aug 10, 2022
Contributor
paulmenzel
left a comment
There was a problem hiding this comment.
Thank you for the patch.
- Please use imperative mood in the commit message and merge/pull request summary
- Please add the description also to the commit message.
- As you say backport, where is the patch from? I couldn’t find it in Linus’ Linux branch, and it’s tagged DBG although the commit message suggests, the patch is not just for debugging.
| MLXSW_I2C_WRITE_MSG(client, prep_cmd_buf, MLXSW_I2C_PREP_SIZE); | ||
| - int err; | ||
| + unsigned long end; | ||
| + int i, err; |
Comment on lines
+61
to
+68
| + i = 0; | ||
| + do { | ||
| + /* Prepare Command Interface Register for transaction */ | ||
| + err = i2c_transfer(client->adapter, &prep_cmd, 1); | ||
| + if (err == 1) | ||
| + break; | ||
| + cond_resched(); | ||
| + } while ((time_before(jiffies, end)) || (i++ < MLXSW_I2C_RETRY)); |
Contributor
There was a problem hiding this comment.
Why not make it a for loop?
| Subject: [PATCH backport 4.9 net 1/1] DBG: mlxsw: i2c: Add retries for | ||
| transaction for setting control buffer | ||
|
|
||
| Currently I2C transaction used to prepare control register for sending |
| be re-tried until success or until both 5000 milliseconds time-out | ||
| window and retries counter 5 are expired. | ||
|
|
||
| In I2C tracing those transactions fulures looks like: |
dal00
pushed a commit
to kamelnetworks/sonic-linux-kernel
that referenced
this pull request
Jul 20, 2025
[202411] Fix 202411 pipeline
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adding a debug patch to retry i2c transactions on failure.
Currently I2C transaction used to prepare control register for sending transaction to ASIC and setting "go" bit in this register are not re-tried. Add retries in case these transactions are replied with NACK.The purpose of this patch is for debugging I2C transaction failures found on some MSFT SN2700 systems.In case one of two kinds of transactions is failed, transaction is to
be re-tried until success or until both 5000 milliseconds time-out
window and retries counter 5 are expired.