-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
meta-lxatac-bsp: lxatac-net-switch-hacks: increase prio for SPI irq t…
…hread When the system is under high load some SPI transfers with the ethernet switch will time out before they are handled. Increase the priority of the kernel thread that handles the SPI transfer to work around the issue. It does not make a lot of sense for a SPI transfer, that is 100% under the hosts control (it does not and can not wait for the device for example) to time out in the first place. This means we are only fighting symptoms here, which is why this change is also marked as a hack. Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
- Loading branch information
Showing
3 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
meta-lxatac-bsp/recipes-core/lxatac-net-switch-hacks/files/60-spi-device.rules
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
SUBSYSTEM=="platform", DRIVER=="spi_stm32", TAG+="systemd" |
11 changes: 11 additions & 0 deletions
11
meta-lxatac-bsp/recipes-core/lxatac-net-switch-hacks/files/spi-irq-prio-44009000.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[Unit] | ||
Description=Increase kernel thread priority for the SPI bus to prevent timeouts | ||
Requires=sys-devices-platform-soc-5c007000.bus-44009000.spi.device | ||
After=sys-devices-platform-soc-5c007000.bus-44009000.spi.device | ||
|
||
[Service] | ||
Type=oneshot | ||
ExecStart=/usr/bin/sh -c "chrt --pid 55 `pgrep irq/[0-9]+-44009000`" | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters