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 support for D-Link DWM-157 3G USB modem



details:   https://anonhg.NetBSD.org/src/rev/5bebe542e99f
branches:  trunk
changeset: 969308:5bebe542e99f
user:      manu <manu%NetBSD.org@localhost>
date:      Sat Feb 15 02:14:02 2020 +0000

description:
Add support for D-Link DWM-157 3G USB modem

diffstat:

 sys/dev/usb/u3g.c         |   8 ++++++--
 sys/dev/usb/umodeswitch.c |  15 +++++++++++++--
 2 files changed, 19 insertions(+), 4 deletions(-)

diffs (65 lines):

diff -r 2f1d7f9307e7 -r 5bebe542e99f sys/dev/usb/u3g.c
--- a/sys/dev/usb/u3g.c Sat Feb 15 02:10:45 2020 +0000
+++ b/sys/dev/usb/u3g.c Sat Feb 15 02:14:02 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: u3g.c,v 1.39 2020/02/08 07:53:23 maxv Exp $    */
+/*     $NetBSD: u3g.c,v 1.40 2020/02/15 02:14:02 manu Exp $    */
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -50,7 +50,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: u3g.c,v 1.39 2020/02/08 07:53:23 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: u3g.c,v 1.40 2020/02/15 02:14:02 manu Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -255,6 +255,10 @@
        /* 4G Systems */
        { USB_VENDOR_LONGCHEER, USB_PRODUCT_LONGCHEER_XSSTICK_P14 },
        { USB_VENDOR_LONGCHEER, USB_PRODUCT_LONGCHEER_XSSTICK_W14 },
+
+       /* DLink */
+       { USB_VENDOR_DLINK, USB_PRODUCT_DLINK_DWM157 },
+       { USB_VENDOR_DLINK, USB_PRODUCT_DLINK_DWM157E },
 };
 
 /*
diff -r 2f1d7f9307e7 -r 5bebe542e99f sys/dev/usb/umodeswitch.c
--- a/sys/dev/usb/umodeswitch.c Sat Feb 15 02:10:45 2020 +0000
+++ b/sys/dev/usb/umodeswitch.c Sat Feb 15 02:14:02 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: umodeswitch.c,v 1.4 2018/07/24 08:15:57 msaitoh Exp $  */
+/*     $NetBSD: umodeswitch.c,v 1.5 2020/02/15 02:14:02 manu Exp $     */
 
 /*-
  * Copyright (c) 2009, 2017 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
 
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: umodeswitch.c,v 1.4 2018/07/24 08:15:57 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: umodeswitch.c,v 1.5 2020/02/15 02:14:02 manu Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -436,6 +436,17 @@
                        return u3g_4gsystems_reinit(uaa->uaa_device);
                break;
 
+       case USB_VENDOR_DLINK:
+               switch (uaa->uaa_product) {
+               case USB_PRODUCT_DLINK_DWM157E_CD:
+               case USB_PRODUCT_DLINK_DWM157_CD:
+                       (void)u3g_bulk_ata_eject(uaa->uaa_device);
+                       (void)u3g_bulk_scsi_eject(uaa->uaa_device);
+                       return UMATCH_HIGHEST;
+               default:
+                       break;
+               }
+
        default:
                break;
        }



Home | Main Index | Thread Index | Old Index