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

e6000sw: Add support for MV88E6190X switch variant #1408

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

Conversation

salekseev
Copy link

@salekseev salekseev commented Sep 3, 2024

This commit adds support for MV88E6190X switch variant that is similar to MV88E6190 in its configuration.

It also adds is6190x hint support for enabling on amd64 platform without device tree support.

PR: 281211

@salekseev salekseev force-pushed the e6000sw_support_6190x branch 6 times, most recently from 5e19f53 to 7ea66cb Compare September 4, 2024 14:20
Copy link
Author

@salekseev salekseev left a comment

Choose a reason for hiding this comment

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

@rilysh do you think this is the best approach to check for multiple device hints being set and to initialize variables if set?

@salekseev salekseev force-pushed the e6000sw_support_6190x branch 2 times, most recently from d359a43 to 812efad Compare September 5, 2024 12:53
@salekseev salekseev force-pushed the e6000sw_support_6190x branch 2 times, most recently from 0ef3d9c to 475d528 Compare September 7, 2024 23:42
This commit adds support for MV88E6190X switch variant that is similar
to MV88E6190 in its configuration.

It also adds is6190x hint support for enabling on amd64 platform without
device tree support.

PR: 281211

Signed-off-by: Stas Alekseev <[email protected]>
Comment on lines +263 to +265
if (resource_int_value(device_get_name(sc->dev),
device_get_unit(sc->dev), "is6190x", &is_6190x) != 0)
return;
Copy link
Author

@salekseev salekseev Sep 13, 2024

Choose a reason for hiding this comment

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

This should avoid the following error: error: misleading indentation; statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation]

@@ -260,8 +260,9 @@ e6000sw_probe(device_t dev)
*/
resource_int_value(device_get_name(sc->dev),
device_get_unit(sc->dev), "is8190", &is_6190);
resource_int_value(device_get_name(sc->dev),
device_get_unit(sc->dev), "is6190x", &is_6190x);
if (resource_int_value(device_get_name(sc->dev),
Copy link
Contributor

@rilysh rilysh Sep 18, 2024

Choose a reason for hiding this comment

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

If "is6190" is available, but "is6190x" isn't, it will just stop the execution (according to resource_int_value() function, source: https://github.com/freebsd/freebsd-src/blob/abed32f91d01d91faa709622e3279e9baec37272/sys/kern/subr_hints.c#L338). I'm not exactly sure if MV88E6190 and MV88E6190X are related to each other (without one either one can't work).

Also, return isn't returning any meaningful values, and the function expects an integer.

@bsdimp bsdimp self-assigned this Oct 4, 2024
@bsdimp
Copy link
Member

bsdimp commented Oct 4, 2024

rylish's comments need to be addressed.

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