Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb Add WayTech USB to Serial device to quirks routi...



details:   https://anonhg.NetBSD.org/src/rev/95219c26ca08
branches:  trunk
changeset: 958145:95219c26ca08
user:      jym <jym%NetBSD.org@localhost>
date:      Sat Dec 26 22:15:37 2020 +0000

description:
Add WayTech USB to Serial device to quirks routines, in order to prevent
uhid(4) from attaching and leave it to ugen(4) so libusb can query it.

It is used by some UPS peripherals for their management, especially the
ones from Infosec and Megatec.

Tested with Infosec E3 UPS through ups-nut-usb and `blazer_usb' driver
using the following configuration (ups.conf):

        [infosec]
                driver = blazer_usb
                port = auto
                vendorid = 0665
                productid = 5161

Make sure the associated /dev/ugenXXX is accessible to `nut' user if you
use ups-nut.

diffstat:

 sys/dev/usb/usb_quirks.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r 490750951ee0 -r 95219c26ca08 sys/dev/usb/usb_quirks.c
--- a/sys/dev/usb/usb_quirks.c  Sat Dec 26 22:11:20 2020 +0000
+++ b/sys/dev/usb/usb_quirks.c  Sat Dec 26 22:15:37 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: usb_quirks.c,v 1.95 2020/03/14 03:01:36 christos Exp $ */
+/*     $NetBSD: usb_quirks.c,v 1.96 2020/12/26 22:15:37 jym Exp $      */
 /*     $FreeBSD: src/sys/dev/usb/usb_quirks.c,v 1.30 2003/01/02 04:15:55 imp Exp $     */
 
 /*
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: usb_quirks.c,v 1.95 2020/03/14 03:01:36 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usb_quirks.c,v 1.96 2020/12/26 22:15:37 jym Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -206,6 +206,8 @@
        { UQ_HID_IGNORE, NULL }},
  { USB_VENDOR_XRITE,           ANY,                                    ANY,
        { UQ_HID_IGNORE, NULL }},
+ { USB_VENDOR_WAYTECH,         USB_PRODUCT_WAYTECH_USB2SERIAL,         ANY,
+       { UQ_HID_IGNORE, NULL }},
  { USB_VENDOR_KYE,             USB_PRODUCT_KYE_NICHE,                  0x100,
        { UQ_NO_SET_PROTO, NULL }},
  { USB_VENDOR_INSIDEOUT,       USB_PRODUCT_INSIDEOUT_EDGEPORT4,        0x094,



Home | Main Index | Thread Index | Old Index