From 683b543a3b6522ff72b9a883e05db911ba758158 Mon Sep 17 00:00:00 2001 From: Caleb Connolly Date: Sun, 29 Aug 2021 17:52:21 +0100 Subject: [PATCH] msm-modem-uim-selection: Don't wait for SIM (MR 2470) The delay to wait for the SIM card to show up appears to be unneeded on our modems, remove it so that we don't delay boot by 10 seconds if your device doesn't have a SIM card installed. [ci:skip-build] already built successfully in CI --- modem/msm-modem/APKBUILD | 6 +++--- modem/msm-modem/msm-modem-uim-selection.initd | 16 ---------------- 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/modem/msm-modem/APKBUILD b/modem/msm-modem/APKBUILD index de82c6deb..a74e676b2 100644 --- a/modem/msm-modem/APKBUILD +++ b/modem/msm-modem/APKBUILD @@ -1,6 +1,6 @@ pkgname=msm-modem -pkgver=4 -pkgrel=1 +pkgver=5 +pkgrel=0 pkgdesc="Common support for Qualcomm MSM modems" url="https://postmarketos.org/" arch="armhf armv7 aarch64" @@ -46,7 +46,7 @@ downstream() { sha512sums=" 3172f8c409f552f13d1da29f14ab6c79072cd6da4acab151a1a0ea1858a416974456852609f14fe29cf97a6a45e60b99d0a57ddcde751da243ee5ac6fa8b672c msm-modem-downstream.initd -28668a53eb5854d89ae509d0187092610dfe26c4f5b30b9424240c320095fd40742974bf8daa18aa2759ffb4a3d1fff74b2ed063018082ff5dc5cbc45d52d8ab msm-modem-uim-selection.initd +9ce373d668a4324ef4d2f465b2524e45b46dc2b93a718ec6bd0c681a99a6506c707083dc9295f30a704526f7b2c508af8bef873fd2ef7ee4638f573677ac79e4 msm-modem-uim-selection.initd 11437625988fcf57aa0b70f11496c458d4516de16391c2869ae975362f282d21d3af521a41dea00312797d20d52be5112dbf0041986bfb40f3b9fa5948d2c695 udev-rpmsg.rules 2a511c2e249d0ec5a52f04ffe1ef3d29cf3c4813143b103e54879ff89176ea45b1a5ffe21cb7dc2f1cdd84c3102ba45ef9926ed37e00b1ae12a36d01de35ea5a udev-downstream.rules " diff --git a/modem/msm-modem/msm-modem-uim-selection.initd b/modem/msm-modem/msm-modem-uim-selection.initd index ca801604b..07df67c15 100644 --- a/modem/msm-modem/msm-modem-uim-selection.initd +++ b/modem/msm-modem/msm-modem-uim-selection.initd @@ -58,22 +58,6 @@ start() { QMI_CARDS=$($QMICLI_MODEM --uim-get-card-status) - # Fail if all slots are empty but wait a bit for the sim to appear. - count=0 - while ! printf "%s" "$QMI_CARDS" | grep -Fq "Card state: 'present'" && [ "$count" -lt "11" ] - do - sleep 1 - count=$((count+1)) - QMI_CARDS=$($QMICLI_MODEM --uim-get-card-status) - done - - if [ "$count" -gt "10" ] - then - eend 4 'No sim present.' - return 4 - fi - veinfo "Waited $count seconds for modem to come up" - # Clear the selected application in case the modem is in a bugged state if ! printf "%s" "$QMI_CARDS" | grep -Fq "Primary GW: session doesn't exist" then