[PATCH 01/14] udev: remove ENV{DEVTYPE}!="usb_device" rules

Dan Williams dcbw at redhat.com
Thu Jul 28 15:22:31 UTC 2016


On Thu, 2016-07-28 at 10:19 -0500, Dan Williams wrote:
> On Thu, 2016-07-28 at 00:13 +0200, Aleksander Morgado wrote:
> > 
> > They're actually a subcase of SUBSYSTEM!="usb", which we apply just
> > before.
> Actually I thought this was to ensure we match the entire USB device,
> not just a usb_interface.  Otherwise ID_MM_DEVICE_IGNORE=1 gets set
> for
> both the entire USB device and every single usb interface, which
> seems
> unnecessary.
> 
> The reason we did this originally was that we (or at least I) didn't
> want people blacklisting specific USB interfaces, since that just
> papers over problems that we should fix in MM itself (either by
> fixing
> the bug or adjusting MM logic to find the right port) or encourages
> behavior that leads to conflicts like blacklisting a status port so
> it
> can be used by some other program at the same time.

That all said, I guess it doesn't hurt since MM has specific code to
find the parent usb_device and check that for ID_MM_DEVICE_IGNORE.

Dan

> Dan
> 
> > 
> > ---
> >  src/77-mm-usb-device-blacklist.rules         | 1 -
> >  src/77-mm-usb-serial-adapters-greylist.rules | 1 -
> >  2 files changed, 2 deletions(-)
> > 
> > diff --git a/src/77-mm-usb-device-blacklist.rules b/src/77-mm-usb-
> > device-blacklist.rules
> > index 6e89649..1c4ea00 100644
> > --- a/src/77-mm-usb-device-blacklist.rules
> > +++ b/src/77-mm-usb-device-blacklist.rules
> > @@ -2,7 +2,6 @@
> >  
> >  ACTION!="add|change|move", GOTO="mm_usb_device_blacklist_end"
> >  SUBSYSTEM!="usb", GOTO="mm_usb_device_blacklist_end"
> > -ENV{DEVTYPE}!="usb_device",  GOTO="mm_usb_device_blacklist_end"
> >  
> >  # APC UPS devices
> >  ATTRS{idVendor}=="051d", ENV{ID_MM_DEVICE_IGNORE}="1"
> > diff --git a/src/77-mm-usb-serial-adapters-greylist.rules b/src/77-
> > mm-usb-serial-adapters-greylist.rules
> > index d11df52..c351fd2 100644
> > --- a/src/77-mm-usb-serial-adapters-greylist.rules
> > +++ b/src/77-mm-usb-serial-adapters-greylist.rules
> > @@ -2,7 +2,6 @@
> >  
> >  ACTION!="add|change|move",
> > GOTO="mm_usb_serial_adapters_greylist_end"
> >  SUBSYSTEM!="usb", GOTO="mm_usb_serial_adapters_greylist_end"
> > -ENV{DEVTYPE}!="usb_device",  GOTO="mm_usb_serial_adapters_greylist
> > _e
> > nd"
> >  
> >  # Belkin F5U183 Serial Adapter
> >  ATTRS{idVendor}=="050d", ATTRS{idProduct}=="0103",
> > ENV{ID_MM_DEVICE_MANUAL_SCAN_ONLY}="1"
> _______________________________________________
> ModemManager-devel mailing list
> ModemManager-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel


More information about the ModemManager-devel mailing list