Random input/output errors with /dev/cdc-wdm* in kernel 4.9.7
Kasper Holtze
kasper at holtze.dk
Thu Feb 2 12:11:51 UTC 2017
Hello,
After upgrading Linux from 4.4.8 to 4.9.7, I'm seeing some strange
issues connecting to my modems. The modem is Sierra MC7304, in QMI mode.
As it happened after upgrading the kernel, I'm not sure if it is
directly related to libqmi.. Could be the qmi_wwan driver?
I see the issues with both qmicli and my custom software.
libqmi is version 1.16.2.
Usually it works fine when the system is first booted, or the modems are
reset. After a while, I'm getting i/o errors reading from /dev/cdc-wdm*:
Sometimes it just hangs, most of the times I get this message:
Qmi-WARNING **: Error reading from istream: Error reading from file
descriptor: Input/output error
I have enabled debugging in debugfs, and get this in the syslog:
[ 5664.134111] wdm_open: qmi_wwan 1-1.3:1.8: draining queued data
[ 5664.134778] wdm_in_callback: qmi_wwan 1-1.3:1.8: nonzero urb status
received: -EPIPE
[ 5664.136365] wdm_int_callback: qmi_wwan 1-1.3:1.8:
NOTIFY_RESPONSE_AVAILABLE received: index 8 len 0
[ 5664.136390] wdm_int_callback: qmi_wwan 1-1.3:1.8: submit response URB 0
[ 5664.136903] wdm_in_callback: qmi_wwan 1-1.3:1.8: nonzero urb status
received: -EPIPE
[ 5664.137551] wdm_release: qmi_wwan 1-1.3:1.8: wdm_release: cleanup
and this:
# grep wdm /sys/kernel/debug/dynamic_debug/control
drivers/usb/class/cdc-wdm.c:1093 [cdc_wdm]wdm_suspend =pf
"wdm%d_suspend\012"
drivers/usb/class/cdc-wdm.c:697 [cdc_wdm]wdm_open =pf "draining queued
data\012"
drivers/usb/class/cdc-wdm.c:460 [cdc_wdm]wdm_write =pf "Tx URB has been
submitted index=%d\012"
drivers/usb/class/cdc-wdm.c:1083 [cdc_wdm]wdm_disconnect =pf "%d open
files - postponing cleanup\012"
drivers/usb/class/cdc-wdm.c:726 [cdc_wdm]wdm_release =pf "wdm_release:
cleanup\012"
drivers/usb/class/cdc-wdm.c:734 [cdc_wdm]wdm_release =pf "cdc_wdm %s:
device gone - cleaning up\012"
drivers/usb/class/cdc-wdm.c:288 [cdc_wdm]wdm_int_callback =pf
"NOTIFY_RESPONSE_AVAILABLE received: index %d len %d\012"
drivers/usb/class/cdc-wdm.c:295 [cdc_wdm]wdm_int_callback =pf
"NOTIFY_NETWORK_CONNECTION %s network\012"
drivers/usb/class/cdc-wdm.c:299 [cdc_wdm]wdm_int_callback =pf
"SPEED_CHANGE received (len %u)\012"
drivers/usb/class/cdc-wdm.c:317 [cdc_wdm]wdm_int_callback =pf "submit
response URB %d\012"
drivers/usb/class/cdc-wdm.c:1143 [cdc_wdm]wdm_resume =pf "wdm%d_resume\012"
drivers/usb/class/cdc-wdm.c:576 [cdc_wdm]wdm_read =pf "zero length -
clearing WDM_READ\012"
drivers/usb/class/cdc-wdm.c:174 [cdc_wdm]wdm_in_callback =pf "nonzero
urb status received: -ENOENT\012"
drivers/usb/class/cdc-wdm.c:178 [cdc_wdm]wdm_in_callback =pf "nonzero
urb status received: -ECONNRESET\012"
drivers/usb/class/cdc-wdm.c:182 [cdc_wdm]wdm_in_callback =pf "nonzero
urb status received: -ESHUTDOWN\012"
drivers/usb/class/cdc-wdm.c:186 [cdc_wdm]wdm_in_callback =pf "nonzero
urb status received: -EPIPE\012"
drivers/usb/class/cdc-wdm.c:227 [cdc_wdm]wdm_in_callback =pf "got %d
bytes without notification\012"
If I try accessing /dev/cdc-wdm* directly, I get the same input/output
error (I know it doesn't make sense to cat the file, but just to show it..):
root at imx6qsabresd:~# cat /dev/cdc-wdm0
cat: read error: Input/output error
I have two modems and see the same issue. I can't really find the
pattern, it seems that calling multiple commands quickly can trigger it.
Sometimes I can wait a few minutes, then I can send a command again,
other times I have to reset the modem.
I tried opening the device with QMI_DEVICE_OPEN_FLAGS_SYNC, and get this
(not sure if it's related):
(process:17861): Qmi-CRITICAL **: __qmi_message_ctl_sync_response_parse:
assertion 'qmi_message_get_message_id (message) == QMI_MESSAGE_CTL_SYNC'
failed
(process:17861): GLib-GIO-CRITICAL **: g_simple_async_result_take_error:
assertion 'error != NULL' failed
(process:17861): Qmi-CRITICAL **: qmi_message_ctl_sync_output_ref:
assertion 'self != NULL' failed
(process:17861): GLib-GIO-CRITICAL **: g_simple_async_result_take_error:
assertion 'error != NULL' failed
Any clues?
Thanks!
Kasper
More information about the libqmi-devel
mailing list