Message ID | cover.1739822462.git.gerickson@nuovations.com (mailing list archive) |
---|---|
Headers | show |
Series | Add QMI Device Service Request Rate-limit Option | expand |
Hi Grant, On 2/17/25 2:01 PM, Grant Erickson wrote: > Certain modems, among them the Quectel Wireless Solutions Co., > Ltd. (2c7c) BG96 CAT-M1/NB-IoT modem (0296), have a firmware issue > where they can lock up and hang (not responding to subsequent > commands) due to high QMI service request arrival rates. > > QMI service request rate limiting is achieved by: > > 1. Adding a new, optional options structure to qmi_qmux_device_new > that has its rate-limit "quirk" and minimum request period fields > set when the modem "RequestThrottleTimeUs" integer property is set. > > 2. Adding logic to the QMI driver that, when a minimum request period > is set, limits the QMI service request rate accordingly. > > (1) and (2) are used by the udevng and gobi plugins such that when the > modem vendor and model match 2c7c/0296, then the option to rate limit > QMI service requests is set to no more than one every 2,000 us. > > Grant Erickson (7): > qmi: Added enumeration for device quirk flags. > qmi: Added structure for device options. > qmi: Added device options parameter to 'qmi_qmux_device_new'. > qmi: Implement QMI service request rate limiting in 'can_write_data'. > qmi: Handle request rate limit option in 'qmi_qmux_device_new'. > udevng: Set the QMI minimum service request period for Quectel BG96 > modems. > gobi: Pass QMI qmux device options to 'qmi_qmux_device_new'. > > drivers/qmimodem/qmi.c | 51 +++++++++++++++++++++++++++++++++++++++++- > drivers/qmimodem/qmi.h | 40 ++++++++++++++++++++++++++++++++- > plugins/gobi.c | 22 +++++++++++++++++- > plugins/udevng.c | 14 ++++++++++++ > 4 files changed, 124 insertions(+), 3 deletions(-) > Alpine (musl) gcc debug ======================= Configure: PASS Build: FAIL drivers/qmimodem/qmi.c: In function 'can_write_data': drivers/qmimodem/qmi.c:701:1: error: unknown option after '#pragma GCC diagnostic' kind [-Werror=pragmas] 701 | _Pragma("GCC diagnostic ignored \"-Wconditional-uninitialized\"") | ^~~~~~~ drivers/qmimodem/qmi.c:701:1: note: did you mean '-Wno-uninitialized'? cc1: all warnings being treated as errors make[1]: *** [Makefile:4090: drivers/qmimodem/qmi.o] Error 1 make[1]: Target 'all-am' not remade because of errors. make: *** [Makefile:2405: all] Error 2 Fedora (glibc) clang debug+sanitizers ===================================== Configure: PASS Build: PASS Unit: PASS Distcheck: PASS Alpine (musl) gcc optimized =========================== Configure: PASS Build: FAIL drivers/qmimodem/qmi.c: In function 'can_write_data': drivers/qmimodem/qmi.c:701:1: error: unknown option after '#pragma GCC diagnostic' kind [-Werror=pragmas] 701 | _Pragma("GCC diagnostic ignored \"-Wconditional-uninitialized\"") | ^~~~~~~ drivers/qmimodem/qmi.c:701:1: note: did you mean '-Wno-uninitialized'? drivers/qmimodem/qmi.c:703:50: error: 'now' may be used uninitialized [-Werror=maybe-uninitialized] 703 | transport->last_req_sent_time_us = now; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~ drivers/qmimodem/qmi.c:669:18: note: 'now' was declared here 669 | uint64_t now; | ^~~ cc1: all warnings being treated as errors make[1]: *** [Makefile:4090: drivers/qmimodem/qmi.o] Error 1 make[1]: Target 'all-am' not remade because of errors. make: *** [Makefile:2405: all] Error 2 Regards, -Denis