-
Notifications
You must be signed in to change notification settings - Fork 3.2k
e6000sw: Add support for MV88E6190X switch variant #1408
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
Conversation
c82471c to
4e7ba71
Compare
5e19f53 to
7ea66cb
Compare
7ea66cb to
8aece39
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
d359a43 to
812efad
Compare
0ef3d9c to
475d528
Compare
8a68b7c to
ae6652e
Compare
| 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), |
There was a problem hiding this comment.
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.
|
rylish's comments need to be addressed. |
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]>
b2b9d57 to
20b9633
Compare
This adds the minimum support required to probe/attach the 88E6190X. I've tested this against an AT&T ATT-150 OCP device (Silicom i3000) with local changes to export MDIO via ixge(4). Hints are required to probe/attach/configure the switch on amd64, but with the mentioned diffs, it does work. Thanks to Stas Alekseev <[email protected]> for the pull request and Stas / Jason Hensler <[email protected]> for chasing down information about the chipset, linux stuff and AT&T OCP hardware information. PR: kern/281211 Pull Request: freebsd#1408 Differential Revision: https://reviews.freebsd.org/D50044
This adds the minimum support required to probe/attach the 88E6190X. I've tested this against an AT&T ATT-150 OCP device (Silicom i3000) with local changes to export MDIO via ixge(4). Hints are required to probe/attach/configure the switch on amd64, but with the mentioned diffs, it does work. Thanks to Stas Alekseev <[email protected]> for the pull request and Stas / Jason Hensler <[email protected]> for chasing down information about the chipset, linux stuff and AT&T OCP hardware information. PR: kern/281211 Pull Request: freebsd#1408 Differential Revision: https://reviews.freebsd.org/D50044 Reviewed by: imp
This adds the minimum support required to probe/attach the 88E6190X. I've tested this against an AT&T ATT-150 OCP device (Silicom i3000) with local changes to export MDIO via ixge(4). Hints are required to probe/attach/configure the switch on amd64, but with the mentioned diffs, it does work. Thanks to Stas Alekseev <[email protected]> for the pull request and Stas / Jason Hensler <[email protected]> for chasing down information about the chipset, linux stuff and AT&T OCP hardware information. PR: kern/281211 Pull Request: freebsd#1408 Differential Revision: https://reviews.freebsd.org/D50044
|
hi! This has been landed in -HEAD now, thanks! |
| if (is_6190 !=0 && is_6190x != 0) | ||
| if (bootverbose) | ||
| device_printf(dev, "Cannot configure conflicting variants\n"); | ||
| return (ENXIO); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given the lack of curly braces amounts to an unconditional return (ENXIO) I don't see how this could possibly have been tested.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The committed change has braces though
|
There are clear style issues in this patch (lacking space around |
| phandle_t switch_node; | ||
| #else | ||
| int is_6190; | ||
| int is_6190x; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, for is_6190 the code assumes one of the two properties is present (otherwise this is left uninitialised). That's a bit dodgy, but for is_6190x you definitely can't assume that otherwise you will break existing hints that predate the existence of is_6190x.
Thanks! |
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