[Pkg-electronics-devel] Bug#994476: libserialport-0.1.1 fix on recent kernels
Esteve Varela
esteve.varela at gmail.com
Thu Sep 16 12:12:32 BST 2021
Package: libserialport0
Version: 0.1.1-4
Upstream bug report: https://sigrok.org/bugzilla/show_bug.cgi?id=1687
Upstream fix to apply:
https://sigrok.org/gitweb/?p=libserialport.git;a=commitdiff;h=6f9b03e597ea7200eb616a4e410add3dd1690cb1
Rationale:
This issue makes the library inoperable on any recent kernel, even the
current linux LTS version 5.10.46-4. Any program that opens a serial
port using sp_open() will fail. If LIBSERIALPORT_DEBUG is set in the
environment, the following relevant messages will appear:
sp: sp_open(0x55f7f28596b0, 0x3) called.
sp: Opening port /dev/ttyACM0.
sp: get_config(0x55f7f28596b0, 0x7ffc8c7459e0, 0x7ffc8c7459b0) called.
sp: Getting configuration for port /dev/ttyACM0.
sp: get_flow(3, 0x7ffc8c7459e0) called.
sp: Getting advanced flow control.
sp: sp_last_error_message() called.
sp: sp_last_error_message returning Inappropriate ioctl for device.
sp: get_flow returning SP_ERR_FAIL: Getting termiox failed:
Inappropriate ioctl for device.
sp: sp_free_error_message(Inappropriate ioctl for device) called.
sp: sp_free_error_message returning.
sp: get_config returning SP_ERR_FAIL.
sp: sp_close(0x55f7f28596b0) called.
sp: Closing port /dev/ttyACM0.
sp: sp_close returning SP_OK.
sp: sp_open returning SP_ERR_FAIL.
Kernel patch causing the change:
https://www.spinics.net/lists/linux-serial/msg41926.html
Lines causing the bug:
https://sigrok.org/gitweb/?p=libserialport.git;a=blob;f=serialport.c;h=e6097eeda975f914ec7b960f72c9e2df546e8281;hb=HEAD#l1774
More information about the Pkg-electronics-devel
mailing list