Skip to content

Commit 2d8775e

Browse files
committed
xpadneo, installer: Get rid of ERTM work-around by requiring kernel 5.12
Link: #198 Signed-off-by: Kai Krakow <kai@kaishome.de>
1 parent ceb8a15 commit 2d8775e

File tree

4 files changed

+10
-23
lines changed

4 files changed

+10
-23
lines changed

hid-xpadneo/dkms.conf.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ DEST_MODULE_LOCATION[0]="/kernel/drivers/hid"
1010
MAKE[0]="make -C '${kernel_source_dir}' M='${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build/src' VERSION='${PACKAGE_VERSION}' modules"
1111
CLEAN="make -C '${kernel_source_dir}' M='${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build/src' clean"
1212

13-
BUILD_EXCLUSIVE_KERNEL_MIN="4.18.0"
13+
BUILD_EXCLUSIVE_KERNEL_MIN="5.12.0"
1414
BUILD_EXCLUSIVE_CONFIG="CONFIG_HID CONFIG_INPUT_FF_MEMLESS CONFIG_POWER_SUPPLY"
1515

1616
AUTOINSTALL="yes"

hid-xpadneo/dkms.post_install

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,8 @@
11
#!/bin/sh
22

3-
#TODO Remove ERTM after kernel patch is deployed in the wild
3+
# DKMS now defaults to kernel 5.12 minimum, remove ERTM override
44
ERTM_OVERRIDE="/etc/modprobe.d/99-xpadneo-bluetooth.conf"
5-
DISABLE_ERTM="/sys/module/bluetooth/parameters/disable_ertm"
6-
7-
if [ "$(uname -r | awk -F. '{ printf "%03d%03d",$1,$2 }')" -ge 005012 ]; then
8-
echo "Not disabling ERTM, kernel version doesn't require it..."
9-
elif [ "$(readlink "${ERTM_OVERRIDE}" 2>/dev/null)" = "/dev/null" ]; then
10-
echo "Not disabling ERTM, local override in place..."
11-
elif [ -L "${ERTM_OVERRIDE}" ]; then
12-
echo >&2 "WARNING: '${ERTM_OVERRIDE}' is an arbitrary symlink, this is not supported."
13-
echo >&2 "Skipping ERTM fixup, you're expected to manage the options on your own..."
14-
else
15-
echo "Disabling ERTM permanently (requires reboot)..."
16-
echo "options bluetooth disable_ertm=y" >"${ERTM_OVERRIDE}"
17-
echo "HINT: If you want to prevent this in the future, run 'ln -snf /dev/null ${ERTM_OVERRIDE}'."
18-
19-
if [ -w "${DISABLE_ERTM}" ]; then
20-
echo "Disabling ERTM instantly..."
21-
echo "Y" >"${DISABLE_ERTM}"
22-
fi
23-
fi
5+
[ -L "${ERTM_OVERRIDE}" ] || { echo "Forcing removal of ERTM override..."; rm -f "${ERTM_OVERRIDE}"; }
246

257
echo "Installing modalias database..."
268
install -D -m 0644 -t /etc/modprobe.d etc-modprobe.d/xpadneo.conf

hid-xpadneo/dkms.post_remove

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
#!/bin/sh
22

3-
#TODO Remove ERTM after kernel patch is deployed in the wild
3+
# DKMS now defaults to kernel 5.12 minimum, remove ERTM override
44
ERTM_OVERRIDE="/etc/modprobe.d/99-xpadneo-bluetooth.conf"
5-
65
[ -L "${ERTM_OVERRIDE}" ] || { echo "Uninstalling ERTM override..."; rm -f "${ERTM_OVERRIDE}"; }
76

87
echo "Uninstalling modalias database..."

install.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ if [[ ! -d /sys/devices/virtual/misc/uhid ]]; then
1212

1313
fi
1414

15+
if [ "$(uname -r | awk -F. '{ printf "%03d%03d",$1,$2 }')" -ge 005012 ]; then
16+
17+
>&2 echo "WARNING: kernel 5.12 or lower will not be supported due to known ERTM issues"
18+
19+
fi
20+
1521
echo "* deploying DKMS package"
1622
make "${MAKE_OPTS[@]}" VERSION="${VERSION}" install || maybe_already_installed
1723

0 commit comments

Comments
 (0)