core: stop monitoring the 'usb' subsystem
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 This patch removes all monitoring of the 'usb' subsystem completely, which is anyway a valid subsystem but for which we shouldn't need any special handling. Right now, with newer kernels, we were using that monitoring exclusively to get notified of full USB device remove events, which is really not required as we already process the port removals one by one. We simplify the logic everywhere that attempted to match either the 'usb' or 'usbmisc' subsystems, and we no longer require the explicit checks for the port name being named 'cdc-wdm[0-9]*' in the code, as that is already taken care of by the ID_MM_CANDIDATE udev tag rule.
This commit is contained in:
@@ -68,7 +68,7 @@ create_modem (MMPlugin *self,
|
||||
G_MODULE_EXPORT MMPlugin *
|
||||
mm_plugin_create (void)
|
||||
{
|
||||
static const gchar *subsystems[] = { "tty", "net", "usb", NULL };
|
||||
static const gchar *subsystems[] = { "tty", "net", "usbmisc", NULL };
|
||||
static const guint16 vendor_ids[] = { 0x16d5, 0 };
|
||||
|
||||
return MM_PLUGIN (
|
||||
|
||||
@@ -67,7 +67,7 @@ create_modem (MMPlugin *self,
|
||||
G_MODULE_EXPORT MMPlugin *
|
||||
mm_plugin_create (void)
|
||||
{
|
||||
static const gchar *subsystems[] = { "tty", "net", "usb", NULL };
|
||||
static const gchar *subsystems[] = { "tty", "net", "usbmisc", NULL };
|
||||
static const guint16 vendor_ids[] = { 0x2020, 0 };
|
||||
|
||||
return MM_PLUGIN (
|
||||
|
||||
@@ -181,7 +181,7 @@ grab_port (MMPlugin *self,
|
||||
G_MODULE_EXPORT MMPlugin *
|
||||
mm_plugin_create (void)
|
||||
{
|
||||
static const gchar *subsystems[] = { "tty", "net", "usb", NULL };
|
||||
static const gchar *subsystems[] = { "tty", "net", "usbmisc", NULL };
|
||||
static const gchar *vendor_strings[] = { "cinterion", "siemens", NULL };
|
||||
static const guint16 vendor_ids[] = { 0x1e2d, 0x0681, 0 };
|
||||
static const MMAsyncMethod custom_init = {
|
||||
|
||||
@@ -491,7 +491,7 @@ grab_port (MMPlugin *self,
|
||||
G_MODULE_EXPORT MMPlugin *
|
||||
mm_plugin_create (void)
|
||||
{
|
||||
static const gchar *subsystems[] = { "tty", "net", "usb", NULL };
|
||||
static const gchar *subsystems[] = { "tty", "net", "usbmisc", NULL };
|
||||
static const guint16 vendors[] = { 0x413c, 0 };
|
||||
static const MMAsyncMethod custom_init = {
|
||||
.async = G_CALLBACK (dell_custom_init),
|
||||
|
||||
@@ -67,7 +67,7 @@ create_modem (MMPlugin *self,
|
||||
G_MODULE_EXPORT MMPlugin *
|
||||
mm_plugin_create (void)
|
||||
{
|
||||
static const gchar *subsystems[] = { "tty", "net", "usb", NULL };
|
||||
static const gchar *subsystems[] = { "tty", "net", "usbmisc", NULL };
|
||||
static const guint16 vendor_ids[] = { 0x2001, 0 };
|
||||
|
||||
return MM_PLUGIN (
|
||||
|
||||
@@ -101,7 +101,7 @@ create_modem (MMPlugin *self,
|
||||
G_MODULE_EXPORT MMPlugin *
|
||||
mm_plugin_create (void)
|
||||
{
|
||||
static const gchar *subsystems[] = { "tty", "net", "usb", NULL };
|
||||
static const gchar *subsystems[] = { "tty", "net", "usbmisc", NULL };
|
||||
static const guint16 vendor_ids[] = { 0x2cb7, 0 };
|
||||
static const gchar *drivers[] = { "cdc_mbim", "qmi_wwan", NULL };
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ create_modem (MMPlugin *self,
|
||||
G_MODULE_EXPORT MMPlugin *
|
||||
mm_plugin_create (void)
|
||||
{
|
||||
static const gchar *subsystems[] = { "tty", "net", "usb", NULL };
|
||||
static const gchar *subsystems[] = { "tty", "net", "usbmisc", NULL };
|
||||
static const guint16 vendors[] = { 0x0489, 0 };
|
||||
|
||||
return MM_PLUGIN (
|
||||
|
||||
@@ -91,7 +91,7 @@ create_modem (MMPlugin *self,
|
||||
G_MODULE_EXPORT MMPlugin *
|
||||
mm_plugin_create (void)
|
||||
{
|
||||
static const gchar *subsystems[] = { "tty", "net", "usb", NULL };
|
||||
static const gchar *subsystems[] = { "tty", "net", "usbmisc", NULL };
|
||||
|
||||
return MM_PLUGIN (
|
||||
g_object_new (MM_TYPE_PLUGIN_GENERIC,
|
||||
|
||||
@@ -82,7 +82,7 @@ create_modem (MMPlugin *self,
|
||||
G_MODULE_EXPORT MMPlugin *
|
||||
mm_plugin_create (void)
|
||||
{
|
||||
static const gchar *subsystems[] = { "tty", "net", "usb", NULL };
|
||||
static const gchar *subsystems[] = { "tty", "net", "usbmisc", NULL };
|
||||
static const guint16 vendor_ids[] = { 0x305a, 0 };
|
||||
static const gchar *drivers[] = { "qmi_wwan", "cdc_mbim", NULL };
|
||||
|
||||
|
||||
@@ -556,8 +556,7 @@ fallback_primary_cdcwdm (MMPlugin *self,
|
||||
if (!mm_port_probe_is_at (probe))
|
||||
continue;
|
||||
|
||||
if (g_str_has_prefix (mm_port_probe_get_port_subsys (probe), "usb") &&
|
||||
g_str_has_prefix (mm_port_probe_get_port_name (probe), "cdc-wdm")) {
|
||||
if (g_str_equal (mm_port_probe_get_port_subsys (probe), "usbmisc")) {
|
||||
mm_obj_dbg (self, "fallback port type hint applied to first cdc-wmd port found");
|
||||
g_object_set_data (G_OBJECT (probe), TAG_AT_PORT_FLAGS, GUINT_TO_POINTER (MM_PORT_SERIAL_AT_FLAG_PRIMARY));
|
||||
return 1;
|
||||
@@ -700,7 +699,7 @@ grab_port (MMPlugin *self,
|
||||
G_MODULE_EXPORT MMPlugin *
|
||||
mm_plugin_create (void)
|
||||
{
|
||||
static const gchar *subsystems[] = { "tty", "net", "usb", NULL };
|
||||
static const gchar *subsystems[] = { "tty", "net", "usbmisc", NULL };
|
||||
static const guint16 vendor_ids[] = { 0x12d1, 0 };
|
||||
static const MMAsyncMethod custom_init = {
|
||||
.async = G_CALLBACK (huawei_custom_init),
|
||||
|
||||
@@ -70,7 +70,7 @@ create_modem (MMPlugin *self,
|
||||
G_MODULE_EXPORT MMPlugin *
|
||||
mm_plugin_create (void)
|
||||
{
|
||||
static const gchar *subsystems[] = { "tty", "net", "usb", NULL };
|
||||
static const gchar *subsystems[] = { "tty", "net", "usbmisc", NULL };
|
||||
static const gchar *udev_tags[] = {
|
||||
"ID_MM_ERICSSON_MBM",
|
||||
NULL
|
||||
|
||||
@@ -76,7 +76,7 @@ create_modem (MMPlugin *self,
|
||||
G_MODULE_EXPORT MMPlugin *
|
||||
mm_plugin_create (void)
|
||||
{
|
||||
static const gchar *subsystems[] = { "tty", "net", "usb", NULL };
|
||||
static const gchar *subsystems[] = { "tty", "net", "usbmisc", NULL };
|
||||
static const guint16 vendors[] = { 0x1410, 0 };
|
||||
static const mm_uint16_pair forbidden_products[] = { { 0x1410, 0x9010 }, /* Novatel E362 */
|
||||
{ 0, 0 } };
|
||||
|
||||
@@ -130,7 +130,7 @@ grab_port (MMPlugin *self,
|
||||
G_MODULE_EXPORT MMPlugin *
|
||||
mm_plugin_create (void)
|
||||
{
|
||||
static const gchar *subsystems[] = { "tty", "net", "usb", NULL };
|
||||
static const gchar *subsystems[] = { "tty", "net", "usbmisc", NULL };
|
||||
static const guint16 vendor_ids[] = { 0x106c, 0 };
|
||||
|
||||
return MM_PLUGIN (
|
||||
|
||||
@@ -81,7 +81,7 @@ create_modem (MMPlugin *self,
|
||||
G_MODULE_EXPORT MMPlugin *
|
||||
mm_plugin_create (void)
|
||||
{
|
||||
static const gchar *subsystems[] = { "tty", "net", "usb", NULL };
|
||||
static const gchar *subsystems[] = { "tty", "net", "usbmisc", NULL };
|
||||
static const gchar *vendor_strings[] = { "quectel", NULL };
|
||||
static const guint16 vendor_ids[] = { 0x2c7c, 0 };
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ create_modem (MMPlugin *self,
|
||||
G_MODULE_EXPORT MMPlugin *
|
||||
mm_plugin_create (void)
|
||||
{
|
||||
static const gchar *subsystems[] = { "tty", "net", "usb", NULL };
|
||||
static const gchar *subsystems[] = { "tty", "net", "usbmisc", NULL };
|
||||
static const guint16 vendor_ids[] = { 0x1199, 0 };
|
||||
static const gchar *drivers[] = { "qmi_wwan", "cdc_mbim", NULL };
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ create_modem (MMPlugin *self,
|
||||
G_MODULE_EXPORT MMPlugin *
|
||||
mm_plugin_create (void)
|
||||
{
|
||||
static const gchar *subsystems[] = { "tty", "net", "usb", NULL };
|
||||
static const gchar *subsystems[] = { "tty", "net", "usbmisc", NULL };
|
||||
static const guint16 vendor_ids[] = { 0x1e0e, /* A-Link (for now) */
|
||||
0 };
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ create_modem (MMPlugin *self,
|
||||
G_MODULE_EXPORT MMPlugin *
|
||||
mm_plugin_create (void)
|
||||
{
|
||||
static const gchar *subsystems[] = { "tty", "net", "usb", NULL };
|
||||
static const gchar *subsystems[] = { "tty", "net", "usbmisc", NULL };
|
||||
/* Vendors: Telit */
|
||||
static const guint16 vendor_ids[] = { 0x1bc7, 0 };
|
||||
static const gchar *vendor_strings[] = { "telit", NULL };
|
||||
|
||||
@@ -67,7 +67,7 @@ create_modem (MMPlugin *self,
|
||||
G_MODULE_EXPORT MMPlugin *
|
||||
mm_plugin_create (void)
|
||||
{
|
||||
static const gchar *subsystems[] = { "tty", "net", "usb", NULL };
|
||||
static const gchar *subsystems[] = { "tty", "net", "usbmisc", NULL };
|
||||
static const guint16 vendor_ids[] = { 0x2357, 0 };
|
||||
|
||||
return MM_PLUGIN (
|
||||
|
||||
@@ -215,7 +215,7 @@ create_modem (MMPlugin *self,
|
||||
G_MODULE_EXPORT MMPlugin *
|
||||
mm_plugin_create (void)
|
||||
{
|
||||
static const gchar *subsystems[] = { "tty", "net", "usb", NULL };
|
||||
static const gchar *subsystems[] = { "tty", "net", "usbmisc", NULL };
|
||||
/* Vendors: TAMobile and Olivetti */
|
||||
static const guint16 vendor_ids[] = { 0x1bbb, 0x0b3c, 0 };
|
||||
/* Only handle X22X tagged devices here. */
|
||||
|
||||
@@ -144,7 +144,7 @@ grab_port (MMPlugin *self,
|
||||
G_MODULE_EXPORT MMPlugin *
|
||||
mm_plugin_create (void)
|
||||
{
|
||||
static const gchar *subsystems[] = { "tty", "net", "usb", NULL };
|
||||
static const gchar *subsystems[] = { "tty", "net", "usbmisc", NULL };
|
||||
static const guint16 vendor_ids[] = { 0x19d2, 0 };
|
||||
|
||||
return MM_PLUGIN (
|
||||
|
||||
Reference in New Issue
Block a user