Skip to content

[20191130.84][Mellanox]Adding mlsxw debug patch#290

Closed
dgsudharsan wants to merge 1 commit intosonic-net:tag_20191130.84from
dgsudharsan:dbg_tag_201911
Closed

[20191130.84][Mellanox]Adding mlsxw debug patch#290
dgsudharsan wants to merge 1 commit intosonic-net:tag_20191130.84from
dgsudharsan:dbg_tag_201911

Conversation

@dgsudharsan
Copy link
Copy Markdown
Collaborator

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.

@dgsudharsan dgsudharsan changed the title [201911][Mellanox]Adding mlsxw debug patch [20191130.84][Mellanox]Adding mlsxw debug patch Aug 10, 2022
Copy link
Copy Markdown
Contributor

@paulmenzel paulmenzel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the patch.

  1. Please use imperative mood in the commit message and merge/pull request summary
  2. Please add the description also to the commit message.
  3. 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;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unsigned int i;

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));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

transactions?

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:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

failures

dal00 pushed a commit to kamelnetworks/sonic-linux-kernel that referenced this pull request Jul 20, 2025
[202411] Fix 202411 pipeline
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants