-
Notifications
You must be signed in to change notification settings - Fork 55
add minor version to info command #349
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
add minor version to info command #349
Conversation
d91971e to
f6567a5
Compare
f6567a5 to
fa98033
Compare
1a0ca93 to
086a770
Compare
|
@lsgunth I refactored my code to use sysfs to access the device_version attribute, which contains the same version data as what is returned from reading the gas. I think this is a better solution to my understanding, although in the current state would only work on linux platform? Would the other platforms then rely on gas read? |
lib/platform/platform.c
Outdated
| * @param[in] dev Switchtec device handle | ||
| * @param[in] res Int to put the version in | ||
| */ | ||
| int switchtec_get_minor_version(struct switchtec_dev *dev, int *res) |
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.
This makes so much more sense, thanks.
However, my one thought is that maybe the new interface should just get the whole version in one way or another. Seems weird to have a function that only returns the minor portion. Why not return the whole version? So we don't need to change things if we ever have the need to get more than the minor portion?
086a770 to
1e10916
Compare
lsgunth
left a comment
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.
This looks good to me, thanks.
The one thing I'm unclear on is whether the op implemented is only for Linux? Am I missing the gasop implementation?
|
I can create a gas op version of the command as well. Using gasop_get_device_id as an example this command is gasop for all platforms besides linux. Something like this? |
|
Yes, that sounds correct. |
lsgunth
left a comment
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.
Looks good to me, thanks!
9c4173b to
ecdbbd7
Compare
ecdbbd7 to
cb2eab2
Compare
cb2eab2 to
d7163ea
Compare
Add the minor version number to the info command through reading the sysfs device version attribute in linux, all other platforms use gas_read of device_version in sys_info register. Info adding the resulting device version coverted to minor ver and added to HW revision section of the print device info cmd.
d7163ea to
2b5bfeb
Compare
Added the minor version number to the info command through reading the GAS address for Firmware Version. Add additional version info to the HW Revision section.