-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
rpi kernel missing usb struct adapter item pm_usage_cnt #3125
Comments
I will happily back port a fix patch - do you have the commit hash for the fix? If not, I'm sure I can find it. |
It was originally in the code, then reported as a duplicate and removed because of a bug.... |
It looks as though the reason pm_usage_cnt is in the 4.20 kernel is that the commit removing it wasn't back-ported. The patch was introduced in 5.1, then because it is a bug fix it got back-ported to 4.19 which is a Long Term Stable kernel. Reverting that patch is not a viable option long term (and would reintroduce the bug), so I think the 3rd party code needs another strategy. |
Thank you very much for your time. I agree 100%, I do have the source code for this and modified it to use ->dev.power.usage_count, instead of ->pm_usage_cnt, and seems to work just fine, compiles and runs well on the Pi 3B+. Take care, and thanks |
Please let me know if this is the wrong place to post this, but I have tracked it to a change that was made in the kernel that causes this anomaly.
In the linux kernel version 4.19.41 the item pm_usage_cnt was removed from the usb struct adapter. It was considered a duplicate counter. Unfortunately, there are several packages that rely on this item. And some of these cannot be changed. In the main linux kernel it was added back in version 4.20.
One of the 3rd party source packages I am using requires it to know if it is safe to "put" the interface or not.
For the Raspberry Pi 3 B+, I can go back a version in the kernel and use that as a work around for now until the raspberry pi kernel is brought up to the core of 4.20 (which has the pm_usage_cnt added back in)
However, for the Pi 4, this is not an option. A Pi 4 compatible kernel does not include this change yet.
On the Pi 4
uname -a
Linux raspberrypi 4.19.58-v7l+ #1245 armv71 GNU/Linux
OS and Version
Raspberry Pi reference 2019-07-10
If this is the wrong forum, please let me know where to post this, and, if you need anymore info, please let me know.
Thanks
John
The text was updated successfully, but these errors were encountered: