From: Denis Kenzior <denkenz@gmail.com>
To: ofono@lists.linux.dev
Cc: Denis Kenzior <denkenz@gmail.com>,
Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
Subject: [PATCH 2/2] udevng: Fix detection of USB attached tty devices
Date: Thu, 30 May 2024 10:25:03 -0500 [thread overview]
Message-ID: <20240530152513.279243-2-denkenz@gmail.com> (raw)
In-Reply-To: <20240530152513.279243-1-denkenz@gmail.com>
devices on the USB bus, that are part of the tty subsystem were not
forwarded to check_usb_device.
Fixes: cdd58360140a ("udevng: Add mhi subsystem detection")
Reported-By: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
---
plugins/udevng.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/plugins/udevng.c b/plugins/udevng.c
index 07c87eb8aa08..87969461ac5b 100644
--- a/plugins/udevng.c
+++ b/plugins/udevng.c
@@ -2510,17 +2510,16 @@ static void check_device(struct udev_device *device)
const char *subsystem = udev_device_get_subsystem(device);
const char *bus = udev_device_get_property_value(device, "ID_BUS");
- if (l_streq0(subsystem, "net")) {
- /* Handle USB-connected network devices in check_usb_device */
- if (l_streq0(bus, "usb"))
- check_usb_device(device);
- else
- check_net_device(device);
-
+ /* Handle USB-connected devices in check_usb_device */
+ if (l_streq0(bus, "usb")) {
+ check_usb_device(device);
return;
}
- if (l_streq0(subsystem, "usb") || l_streq0(subsystem, "usbmisc"))
+ /* Check the rest based on the subsystem */
+ if (l_streq0(subsystem, "net"))
+ check_net_device(device);
+ else if (l_streq0(subsystem, "usbmisc"))
check_usb_device(device);
else if (l_streq0(subsystem, "pci"))
check_pci_device(device);
--
2.45.0
next prev parent reply other threads:[~2024-05-30 15:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-30 15:25 [PATCH 1/2] udevng: Don't crash for non-QMI devices Denis Kenzior
2024-05-30 15:25 ` Denis Kenzior [this message]
2024-05-31 6:09 ` [PATCH 2/2] udevng: Fix detection of USB attached tty devices Ivaylo Dimitrov
2024-05-31 15:52 ` Denis Kenzior
2024-05-31 17:27 ` Ivaylo Dimitrov
2024-05-31 19:30 ` [PATCH 1/2] udevng: Don't crash for non-QMI devices patchwork-bot+ofono
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240530152513.279243-2-denkenz@gmail.com \
--to=denkenz@gmail.com \
--cc=ivo.g.dimitrov.75@gmail.com \
--cc=ofono@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.