port: rename subsystem from 'usb' to 'usbmisc'
Back in Linux < 3.6 days, the cdc-wdm ports exposed by the QMI driver were flagged as owned by the 'usb' subsystem. That changed in 3.6 when the subsystem was renamed to 'usbmisc': https://mail.gnome.org/archives/networkmanager-list/2012-June/msg00125.html So, rename the port subsystem type enumn to 'usbmisc'.
This commit is contained in:
@@ -176,7 +176,7 @@ mm_broadband_modem_huawei_get_at_port_list (MMBroadbandModemHuawei *self)
|
||||
|
||||
/* Additional cdc-wdm ports used for dialing */
|
||||
cdc_wdm_at_ports = mm_base_modem_find_ports (MM_BASE_MODEM (self),
|
||||
MM_PORT_SUBSYS_USB,
|
||||
MM_PORT_SUBSYS_USBMISC,
|
||||
MM_PORT_TYPE_AT,
|
||||
NULL);
|
||||
|
||||
@@ -2200,7 +2200,7 @@ peek_port_at_for_data (MMBroadbandModemHuawei *self,
|
||||
|
||||
/* Find the CDC-WDM port on the same USB interface as the given net port */
|
||||
cdc_wdm_at_ports = mm_base_modem_find_ports (MM_BASE_MODEM (self),
|
||||
MM_PORT_SUBSYS_USB,
|
||||
MM_PORT_SUBSYS_USBMISC,
|
||||
MM_PORT_TYPE_AT,
|
||||
NULL);
|
||||
for (l = cdc_wdm_at_ports; l && !found; l = g_list_next (l)) {
|
||||
|
@@ -314,7 +314,7 @@ mm_base_modem_grab_port (MMBaseModem *self,
|
||||
|
||||
/* Non-serial AT port */
|
||||
if (!port && ptype == MM_PORT_TYPE_AT) {
|
||||
port = MM_PORT (mm_port_serial_at_new (name, MM_PORT_SUBSYS_USB));
|
||||
port = MM_PORT (mm_port_serial_at_new (name, MM_PORT_SUBSYS_USBMISC));
|
||||
|
||||
/* Set common response parser */
|
||||
mm_port_serial_at_set_response_parser (MM_PORT_SERIAL_AT (port),
|
||||
|
@@ -291,7 +291,7 @@ peek_port_mbim_for_data (MMBroadbandModemMbim *self,
|
||||
|
||||
/* Find the CDC-WDM port on the same USB interface as the given net port */
|
||||
cdc_wdm_mbim_ports = mm_base_modem_find_ports (MM_BASE_MODEM (self),
|
||||
MM_PORT_SUBSYS_USB,
|
||||
MM_PORT_SUBSYS_USBMISC,
|
||||
MM_PORT_TYPE_MBIM,
|
||||
NULL);
|
||||
|
||||
|
@@ -262,7 +262,7 @@ peek_port_qmi_for_data (MMBroadbandModemQmi *self,
|
||||
|
||||
/* Find the CDC-WDM port on the same USB interface as the given net port */
|
||||
cdc_wdm_qmi_ports = mm_base_modem_find_ports (MM_BASE_MODEM (self),
|
||||
MM_PORT_SUBSYS_USB,
|
||||
MM_PORT_SUBSYS_USBMISC,
|
||||
MM_PORT_TYPE_QMI,
|
||||
NULL);
|
||||
for (l = cdc_wdm_qmi_ports; l && !found; l = g_list_next (l)) {
|
||||
|
@@ -593,7 +593,7 @@ mm_port_mbim_new (const gchar *name)
|
||||
{
|
||||
return MM_PORT_MBIM (g_object_new (MM_TYPE_PORT_MBIM,
|
||||
MM_PORT_DEVICE, name,
|
||||
MM_PORT_SUBSYS, MM_PORT_SUBSYS_USB,
|
||||
MM_PORT_SUBSYS, MM_PORT_SUBSYS_USBMISC,
|
||||
MM_PORT_TYPE, MM_PORT_TYPE_MBIM,
|
||||
NULL));
|
||||
}
|
||||
|
@@ -1270,7 +1270,7 @@ serial_open_at (MMPortProbe *self)
|
||||
MMPortSubsys subsys = MM_PORT_SUBSYS_TTY;
|
||||
|
||||
if (g_str_has_prefix (mm_kernel_device_get_subsystem (self->priv->port), "usb"))
|
||||
subsys = MM_PORT_SUBSYS_USB;
|
||||
subsys = MM_PORT_SUBSYS_USBMISC;
|
||||
|
||||
ctx->serial = MM_PORT_SERIAL (mm_port_serial_at_new (mm_kernel_device_get_name (self->priv->port), subsys));
|
||||
if (!ctx->serial) {
|
||||
|
@@ -792,7 +792,7 @@ mm_port_qmi_new (const gchar *name)
|
||||
{
|
||||
return MM_PORT_QMI (g_object_new (MM_TYPE_PORT_QMI,
|
||||
MM_PORT_DEVICE, name,
|
||||
MM_PORT_SUBSYS, MM_PORT_SUBSYS_USB,
|
||||
MM_PORT_SUBSYS, MM_PORT_SUBSYS_USBMISC,
|
||||
MM_PORT_TYPE, MM_PORT_TYPE_QMI,
|
||||
NULL));
|
||||
}
|
||||
|
@@ -533,7 +533,7 @@ mm_port_serial_at_new (const char *name,
|
||||
MMPortSubsys subsys)
|
||||
{
|
||||
g_return_val_if_fail (subsys == MM_PORT_SUBSYS_TTY ||
|
||||
subsys == MM_PORT_SUBSYS_USB ||
|
||||
subsys == MM_PORT_SUBSYS_USBMISC ||
|
||||
subsys == MM_PORT_SUBSYS_UNIX, NULL);
|
||||
|
||||
return MM_PORT_SERIAL_AT (g_object_new (MM_TYPE_PORT_SERIAL_AT,
|
||||
|
@@ -26,7 +26,7 @@ typedef enum { /*< underscore_name=mm_port_subsys >*/
|
||||
MM_PORT_SUBSYS_UNKNOWN = 0x0,
|
||||
MM_PORT_SUBSYS_TTY,
|
||||
MM_PORT_SUBSYS_NET,
|
||||
MM_PORT_SUBSYS_USB,
|
||||
MM_PORT_SUBSYS_USBMISC,
|
||||
MM_PORT_SUBSYS_UNIX,
|
||||
|
||||
MM_PORT_SUBSYS_LAST = MM_PORT_SUBSYS_UNIX /*< skip >*/
|
||||
|
Reference in New Issue
Block a user