On 4/20/21 7:28 PM, Patrick Wildt wrote:
Am Mon, Apr 19, 2021 at 10:25:39AM +0200 schrieb Tilo Stritzky:
On 10/04/21 22:56 Tilo Stritzky wrote:
umb interfaces advertise themselves as generic devices.
Network makes a lot more sense, I think.
tested on amd64.
Having seen no response on this one, I'ld like to expand a little
further.
This value defines how a device is identified in hotplug events,
eventually showing up in userland as argv to /etc/hotplug/attach.
It doesn't seem to be used by the kernel itself.
Currently umb(4) mobile broadband interfaces identify as ``generic''.
This is not exactly wrong, but there is a ``network interface'' class
which is a much tighter match. All other USB network interfaces set
it to DV_IFNET.
The change lets me group umb related stuff together with other
hotplugged network devices in /etc/hotplug/attach.
Alas, this might break some existing hotplugd setups.
tilo
That does indeed make sense. umb(4) is some kind of a network device,
and especially in hotplug I think it makes a lot more sense there as
well. So, I'm in favour.
Objections? ok?
ok gerhard@
Index: if_umb.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/if_umb.c,v
retrieving revision 1.43
diff -u -p -r1.43 if_umb.c
--- if_umb.c 1 Apr 2021 08:39:52 -0000 1.43
+++ if_umb.c 10 Apr 2021 20:14:59 -0000
@@ -212,7 +212,7 @@ uint8_t umb_uuid_qmi_mbim[] = MBIM_UUI
uint32_t umb_session_id = 0;
struct cfdriver umb_cd = {
- NULL, "umb", DV_DULL
+ NULL, "umb", DV_IFNET
};
const struct cfattach umb_ca = {
umb0 at uhub0 port 1 configuration 1 interface 0 "MediaTek Inc Product" rev
2.00/3.00 addr 2
umsm0 at uhub0 port 1 configuration 1 interface 2 "MediaTek Inc Product" rev
2.00/3.00 addr 2
ucom0 at umsm0
umsm1 at uhub0 port 1 configuration 1 interface 3 "MediaTek Inc Product" rev
2.00/3.00 addr 2
ucom1 at umsm1
umsm2 at uhub0 port 1 configuration 1 interface 4 "MediaTek Inc Product" rev
2.00/3.00 addr 2
ucom2 at umsm2
umsm3 at uhub0 port 1 configuration 1 interface 5 "MediaTek Inc Product" rev
2.00/3.00 addr 2
ucom3 at umsm3
umass0 at uhub0 port 1 configuration 1 interface 6 "MediaTek Inc Product" rev
2.00/3.00 addr 2
umass0: using SCSI over Bulk-Only
scsibus2 at umass0: 2 targets, initiator 0
sd1 at scsibus2 targ 1 lun 0: <MEDIATEK, FLASH DISK, 6225> removable