Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix optoe's write_max when using native i2c driver #407

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

prgeor
Copy link
Contributor

@prgeor prgeor commented Jun 18, 2024

Optoe driver with write-max > 1 when using the i2c message buffer was allocating only 3(1+2) bytes which means while copying the user data for i2c adapters supporting the native i2c functions will overwrite the message buffer size. This will not happen for i2c adapters that does not support native i2c functions like pure SMBUS controller.

@prgeor
Copy link
Contributor Author

prgeor commented Jun 18, 2024

@bingwang-ms please include this fix in 202405

@prgeor
Copy link
Contributor Author

prgeor commented Jun 18, 2024

@StormLiangMS please include this fix in 202311

@prgeor
Copy link
Contributor Author

prgeor commented Jun 18, 2024

@lguohan please review/merge. thanks.

}

- dev_dbg(&client->dev, "dev_class: %d\n", optoe->dev_class);
+ dev_dbg(&client->dev, "dev_class: %d use_smbus=%d\n", optoe->dev_class, use_smbus);
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason to having use_smbus be logged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants