port-serial: do not call config_fd on wwan qcdm port

wwan qcdm port is not a serial port, calling config_fd on it
will always fail, i.e.:
ModemManager[124587]: <debug> [1619584182.125262] [wwan0p1QCDM/probe] probing QCDM...
ModemManager[124587]: <debug> [1619584182.125398] [wwan0p1QCDM/qcdm] opening serial port...
ModemManager[124587]: <debug> [1619584182.151759] [wwan0p1QCDM/qcdm] failed to configure serial device
ModemManager[124587]: <warn>  [1619584182.151836] [wwan0p1QCDM/qcdm] failed to open serial device
ModemManager[124587]: <warn>  [1619584182.170152] [plugin-manager] task 1,wwan0p1QCDM: error when checking support with plugin 'generic': (wwan/wwan0p1QCDM) Failed to open QCDM port: Failed to open QCDM port: -2
This commit is contained in:
Ivan Mikhanchuk
2021-06-11 17:22:04 -07:00
committed by Ivan Mikhanchuk
parent 611d598836
commit 4b4ce6c445
+2 -1
View File
@@ -1231,7 +1231,8 @@ mm_port_serial_open (MMPortSerial *self, GError **error)
}
g_warn_if_fail (MM_PORT_SERIAL_GET_CLASS (self)->config_fd);
if (self->priv->fd >= 0 && !MM_PORT_SERIAL_GET_CLASS (self)->config_fd (self, self->priv->fd, error)) {
if (self->priv->fd >= 0 && mm_port_get_subsys (MM_PORT (self)) != MM_PORT_SUBSYS_WWAN &&
!MM_PORT_SERIAL_GET_CLASS (self)->config_fd (self, self->priv->fd, error)) {
mm_obj_dbg (self, "failed to configure serial device");
goto error;
}