Skip to content

Conversation

tal-co
Copy link
Contributor

@tal-co tal-co commented Mar 9, 2025

No description provided.

tal-co added 2 commits March 9, 2025 15:08
For upstream purposes and to have more robust code, a common
cfg lock function shall be created. The function shall invoke
the asic port's specific function.

Signed-off-by: Tal Cohen <tal5.cohen@intel.com>
Replace the port's cfg lock from port specific into port's
common code. This change is further to the common cfg lock
function change.

Signed-off-by: Tal Cohen <tal5.cohen@intel.com>
@@ -1171,6 +1171,8 @@ struct hbl_cn_port {
struct mutex control_lock;
/* protects the counters from concurrent reading */
struct mutex cnt_lock;
/* Serializes the port configuration */

Choose a reason for hiding this comment

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

Why comment is here and not in the documentation for the struct above?

Comment on lines 4762 to +4764
mutex_destroy(&cn_port->cnt_lock);
mutex_destroy(&cn_port->control_lock);
mutex_destroy(&cn_port->cfg_lock);

Choose a reason for hiding this comment

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

Suggested change
mutex_destroy(&cn_port->cnt_lock);
mutex_destroy(&cn_port->control_lock);
mutex_destroy(&cn_port->cfg_lock);
mutex_destroy(&cn_port->cfg_lock);
mutex_destroy(&cn_port->cnt_lock);
mutex_destroy(&cn_port->control_lock);

@@ -332,8 +332,6 @@ struct gaudi2_cn_port {
struct delayed_work eq_work;
struct delayed_work qp_sanity_work;
struct workqueue_struct *qp_sanity_wq;
/* Serializes the port configuration */
struct mutex cfg_lock;

Choose a reason for hiding this comment

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

Please also delete the documetnation of this field above

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