Bug 2060490 - kernels newer than 5.15.11-200.fc35 cause libgpiod to issue "Unknown error 517"
Summary: kernels newer than 5.15.11-200.fc35 cause libgpiod to issue "Unknown error 517"
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 35
Hardware: aarch64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: ARMTracker
TreeView+ depends on / blocked
 
Reported: 2022-03-03 15:42 UTC by John Florian
Modified: 2023-04-17 20:51 UTC (History)
26 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-06-30 08:57:12 UTC
Type: Bug
Embargoed:
bcotton: fedora_prioritized_bug-
trailtotale: needinfo-


Attachments (Terms of Use)
journalctl -b --no-hostname -k (from 5.17.0-0.rc6.109.fc37.aarch64) (42.49 KB, text/plain)
2022-03-03 15:42 UTC, John Florian
no flags Details

Description John Florian 2022-03-03 15:42:25 UTC
Created attachment 1864021 [details]
journalctl -b --no-hostname -k (from 5.17.0-0.rc6.109.fc37.aarch64)

1. Please describe the problem:

libgpiod raises "Unknown error 517" for all attempts to manipulate GPIO pin states

2. What is the Version-Release number of the kernel:

Problem exists in kernel-5.15.12-200.fc35.aarch64 and later.  kernel-5.15.11-200.fc35.aarch64 and earlier work as expected.


3. Did it work previously in Fedora? If so, what kernel version did the issue
   *first* appear?  Old kernels are available for download at
   https://koji.fedoraproject.org/koji/packageinfo?packageID=8 :

Yes; see above.

4. Can you reproduce this issue? If so, please provide the steps to reproduce
   the issue below:

Yes, consistently.  Install an affected kernel (and libgpiod-utils) on a Raspberry Pi 4 and then:

# gpioset gpiochip0 22=1
gpioset: error setting the GPIO line values: Unknown error 517


5. Does this problem occur with the latest Rawhide kernel? To install the
   Rawhide kernel, run ``sudo dnf install fedora-repos-rawhide`` followed by
   ``sudo dnf update --enablerepo=rawhide kernel``:

Yes (using 5.17.0-0.rc6.109.fc37.aarch64)

6. Are you running any modules that not shipped with directly Fedora's kernel?:

None, everything is from fedora repos.

7. Please attach the kernel logs. You can get the complete kernel log
   for a boot with ``journalctl --no-hostname -k > dmesg.txt``. If the
   issue occurred on a previous boot, use the journalctl ``-b`` flag.

I didn't see anything notable, but it's attached nonetheless.

Comment 1 Justin M. Forbes 2022-03-03 17:56:50 UTC
https://lists.fedoraproject.org/archives/list/arm@lists.fedoraproject.org/thread/D5A7YLVSPXXOXGTNETIULVD4VW25EK5U/ might have some relevant information for you.

Comment 2 John Florian 2022-03-03 18:54:44 UTC
Thanks Justin, I hadn't stumbled onto that and it does look similar.  Also when creating this ticket I noticed #2047329 which also may be related.

Comment 3 Luna Jernberg 2022-04-06 14:47:56 UTC
<bcotton_, mattdm, jforbes> proposed #agreed BZ 2060490 is rejected as a Prioritized Bug as it appears to largely be an issue in upstream firmware

But the ARM and Kernel team, will work at it as they have time

Comment 4 Peter Robinson 2022-04-06 15:10:03 UTC
Can you try with a F-36 nightly image to see if it has the same issue please?

There's been changes between firmware <-> DT and <-> kernel that could cause this that should now be fixed but there's bits across the release that would need to be updated and I've not been updating RPi firmware on stable releases of late as they've tended to regress more than they fix.

Are you using DT overlays and the HAT configuration as per the wiki or just vanilla kernel DTs?

https://fedoraproject.org/w/index.php?title=Architectures/ARM/Raspberry_Pi/HATs#General_configuration

Comment 5 Peter Robinson 2022-06-30 08:57:12 UTC
So this is now known to work in Fedora 36/stable. Make sure you run rpi-uboot-update to ensure you have the latest stable versions of boot firmware.


Note You need to log in before you can comment on or make changes to this bug.