Option N.V. is the real vendor, Vodafone just sells the UMTS cards.
Add support for Globetrotter Fusion Quad Lite cards.
This commit is contained in:
parent
83a47fa604
commit
cf2092aa79
|
@ -1,4 +1,4 @@
|
|||
.\" $NetBSD: ubsa.4,v 1.4 2004/09/16 09:44:46 wiz Exp $
|
||||
.\" $NetBSD: ubsa.4,v 1.5 2007/02/10 07:44:00 mlelstv Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 2001 The NetBSD Foundation, Inc.
|
||||
.\" All rights reserved.
|
||||
|
@ -54,12 +54,16 @@ driver supports the following adapters:
|
|||
.It e-Tek Labs Kwik232
|
||||
.It GoHubs GoCOM232
|
||||
.It Peracom single port serial adapter
|
||||
.It Option N.V. Mobile Connect 3G datacard
|
||||
.It Option N.V. GlobeTrotter Fusion Quad Lite UMTS/GPRS
|
||||
.It Option N.V. GlobeTrotter Fusion Quad Lite 3D
|
||||
.El
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Nm
|
||||
driver provides support for the USB-to-RS-232 Bridge chip used by a variety of
|
||||
serial adapters from Belkin and other vendors.
|
||||
serial adapters from Belkin and other vendors. The bridge is also embedded
|
||||
into several UMTS/GPRS cards.
|
||||
.Pp
|
||||
The device is accessed through the
|
||||
.Xr ucom 4
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ubsa.c,v 1.16 2006/11/16 01:33:26 christos Exp $ */
|
||||
/* $NetBSD: ubsa.c,v 1.17 2007/02/10 07:44:00 mlelstv Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 2002, Alexander Kabaev <kan.FreeBSD.org>.
|
||||
* All rights reserved.
|
||||
|
@ -61,7 +61,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ubsa.c,v 1.16 2006/11/16 01:33:26 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ubsa.c,v 1.17 2007/02/10 07:44:00 mlelstv Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -128,6 +128,8 @@ SYSCTL_INT(_hw_usb_ubsa, OID_AUTO, debug, CTLFLAG_RW,
|
|||
#define UBSA_SET_BREAK 0x0C
|
||||
#define UBSA_SET_FLOW_CTRL 0x10
|
||||
|
||||
#define UBSA_QUADUMTS_SET_PIN 0x22
|
||||
|
||||
#define UBSA_PARITY_NONE 0x00
|
||||
#define UBSA_PARITY_EVEN 0x01
|
||||
#define UBSA_PARITY_ODD 0x02
|
||||
|
@ -187,6 +189,7 @@ struct ubsa_softc {
|
|||
device_ptr_t sc_subdev; /* ucom device */
|
||||
|
||||
u_char sc_dying; /* disconnecting */
|
||||
u_char sc_quadumts;
|
||||
|
||||
};
|
||||
|
||||
|
@ -201,7 +204,9 @@ Static void ubsa_close(void *, int);
|
|||
Static void ubsa_break(struct ubsa_softc *sc, int onoff);
|
||||
Static int ubsa_request(struct ubsa_softc *, u_int8_t, u_int16_t);
|
||||
Static void ubsa_dtr(struct ubsa_softc *, int);
|
||||
Static void ubsa_quadumts_dtr(struct ubsa_softc *, int);
|
||||
Static void ubsa_rts(struct ubsa_softc *, int);
|
||||
Static void ubsa_quadumts_rts(struct ubsa_softc *, int);
|
||||
Static void ubsa_baudrate(struct ubsa_softc *, speed_t);
|
||||
Static void ubsa_parity(struct ubsa_softc *, tcflag_t);
|
||||
Static void ubsa_databits(struct ubsa_softc *, tcflag_t);
|
||||
|
@ -230,8 +235,10 @@ Static const struct usb_devno ubsa_devs[] = {
|
|||
{ USB_VENDOR_GOHUBS, USB_PRODUCT_GOHUBS_GOCOM232 },
|
||||
/* Peracom */
|
||||
{ USB_VENDOR_PERACOM, USB_PRODUCT_PERACOM_SERIAL1 },
|
||||
/* Vodafone */
|
||||
{ USB_VENDOR_VODAFONE, USB_PRODUCT_VODAFONE_MC3G },
|
||||
/* Option N.V. */
|
||||
{ USB_VENDOR_OPTIONNV, USB_PRODUCT_OPTIONNV_MC3G },
|
||||
{ USB_VENDOR_OPTIONNV, USB_PRODUCT_OPTIONNV_QUADUMTS2 },
|
||||
{ USB_VENDOR_OPTIONNV, USB_PRODUCT_OPTIONNV_QUADUMTS },
|
||||
};
|
||||
#define ubsa_lookup(v, p) usb_lookup(ubsa_devs, v, p)
|
||||
|
||||
|
@ -275,6 +282,20 @@ USB_ATTACH(ubsa)
|
|||
sc->sc_dtr = -1;
|
||||
sc->sc_rts = -1;
|
||||
|
||||
/*
|
||||
* Quad UMTS cards use different requests to
|
||||
* control com settings and only some.
|
||||
*/
|
||||
sc->sc_quadumts = 0;
|
||||
if (uaa->vendor == USB_VENDOR_OPTIONNV) {
|
||||
switch (uaa->product) {
|
||||
case USB_PRODUCT_OPTIONNV_QUADUMTS:
|
||||
case USB_PRODUCT_OPTIONNV_QUADUMTS2:
|
||||
sc->sc_quadumts = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DPRINTF(("ubsa attach: sc = %p\n", sc));
|
||||
|
||||
/* initialize endpoints */
|
||||
|
@ -435,7 +456,11 @@ ubsa_request(struct ubsa_softc *sc, u_int8_t request, u_int16_t value)
|
|||
usb_device_request_t req;
|
||||
usbd_status err;
|
||||
|
||||
req.bmRequestType = UT_WRITE_VENDOR_DEVICE;
|
||||
if (sc->sc_quadumts)
|
||||
req.bmRequestType = UT_WRITE_CLASS_INTERFACE;
|
||||
else
|
||||
req.bmRequestType = UT_WRITE_VENDOR_DEVICE;
|
||||
|
||||
req.bRequest = request;
|
||||
USETW(req.wValue, value);
|
||||
USETW(req.wIndex, sc->sc_iface_number);
|
||||
|
@ -475,9 +500,34 @@ ubsa_rts(struct ubsa_softc *sc, int onoff)
|
|||
}
|
||||
|
||||
Static void
|
||||
ubsa_break(struct ubsa_softc *sc, int onoff)
|
||||
ubsa_quadumts_dtr(struct ubsa_softc *sc, int onoff)
|
||||
{
|
||||
|
||||
DPRINTF(("ubsa_dtr: onoff = %d\n", onoff));
|
||||
|
||||
if (sc->sc_dtr == onoff)
|
||||
return;
|
||||
sc->sc_dtr = onoff;
|
||||
|
||||
ubsa_request(sc, UBSA_QUADUMTS_SET_PIN, (sc->sc_rts ? 2 : 0)+(sc->sc_dtr ? 1 : 0));
|
||||
}
|
||||
|
||||
Static void
|
||||
ubsa_quadumts_rts(struct ubsa_softc *sc, int onoff)
|
||||
{
|
||||
|
||||
DPRINTF(("ubsa_rts: onoff = %d\n", onoff));
|
||||
|
||||
if (sc->sc_rts == onoff)
|
||||
return;
|
||||
sc->sc_rts = onoff;
|
||||
|
||||
ubsa_request(sc, UBSA_QUADUMTS_SET_PIN, (sc->sc_rts ? 2 : 0)+(sc->sc_dtr ? 1 : 0));
|
||||
}
|
||||
|
||||
Static void
|
||||
ubsa_break(struct ubsa_softc *sc, int onoff)
|
||||
{
|
||||
DPRINTF(("ubsa_rts: onoff = %d\n", onoff));
|
||||
|
||||
ubsa_request(sc, UBSA_SET_BREAK, onoff ? 1 : 0);
|
||||
|
@ -491,13 +541,20 @@ ubsa_set(void *addr, int portno, int reg, int onoff)
|
|||
sc = addr;
|
||||
switch (reg) {
|
||||
case UCOM_SET_DTR:
|
||||
ubsa_dtr(sc, onoff);
|
||||
if (sc->sc_quadumts)
|
||||
ubsa_quadumts_dtr(sc, onoff);
|
||||
else
|
||||
ubsa_dtr(sc, onoff);
|
||||
break;
|
||||
case UCOM_SET_RTS:
|
||||
ubsa_rts(sc, onoff);
|
||||
if (sc->sc_quadumts)
|
||||
ubsa_quadumts_rts(sc, onoff);
|
||||
else
|
||||
ubsa_rts(sc, onoff);
|
||||
break;
|
||||
case UCOM_SET_BREAK:
|
||||
ubsa_break(sc, onoff);
|
||||
if (!sc->sc_quadumts)
|
||||
ubsa_break(sc, onoff);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -615,11 +672,13 @@ ubsa_param(void *addr, int portno, struct termios *ti)
|
|||
|
||||
DPRINTF(("ubsa_param: sc = %p\n", sc));
|
||||
|
||||
ubsa_baudrate(sc, ti->c_ospeed);
|
||||
ubsa_parity(sc, ti->c_cflag);
|
||||
ubsa_databits(sc, ti->c_cflag);
|
||||
ubsa_stopbits(sc, ti->c_cflag);
|
||||
ubsa_flow(sc, ti->c_cflag, ti->c_iflag);
|
||||
if (!sc->sc_quadumts) {
|
||||
ubsa_baudrate(sc, ti->c_ospeed);
|
||||
ubsa_parity(sc, ti->c_cflag);
|
||||
ubsa_databits(sc, ti->c_cflag);
|
||||
ubsa_stopbits(sc, ti->c_cflag);
|
||||
ubsa_flow(sc, ti->c_cflag, ti->c_iflag);
|
||||
}
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
$NetBSD: usbdevs,v 1.457 2007/02/07 10:30:19 is Exp $
|
||||
$NetBSD: usbdevs,v 1.458 2007/02/10 07:44:00 mlelstv Exp $
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998-2004 The NetBSD Foundation, Inc.
|
||||
|
@ -369,7 +369,7 @@ vendor GREENHOUSE 0x0a6b GREENHOUSE
|
|||
vendor GEOCAST 0x0a79 Geocast Network Systems
|
||||
vendor ZYDAS 0x0ace Zydas Technology Corporation
|
||||
vendor NEODIO 0x0aec Neodio
|
||||
vendor VODAFONE 0x0af0 Vodafone
|
||||
vendor OPTIONNV 0x0af0 Option N.V:
|
||||
vendor ASUSTEK 0x0b05 ASUSTeK Computer
|
||||
vendor TODOS 0x0b0c Todos Data System
|
||||
vendor SIIG2 0x0b39 SIIG
|
||||
|
@ -2026,8 +2026,10 @@ product VISIONEER 8600 0x0331 OneTouch 8600
|
|||
/* Vivitar products */
|
||||
product VIVITAR DSC350 0x0003 DSC350 Camera
|
||||
|
||||
/* Vodafone products */
|
||||
product VODAFONE MC3G 0x5000 Mobile Connect 3G datacard
|
||||
/* Option N.V. products */
|
||||
product OPTIONNV MC3G 0x5000 Mobile Connect 3G datacard
|
||||
product OPTIONNV QUADUMTS2 0x6000 GlobeTrotter Fusion Quad Lite UMTS/GPRS
|
||||
product OPTIONNV QUADUMTS 0x6300 GlobeTrotter Fusion Quad Lite 3D
|
||||
|
||||
/* VTech products */
|
||||
product VTECH RT2570 0x3012 RT2570
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: usbdevs.h,v 1.459 2007/02/07 10:31:11 is Exp $ */
|
||||
/* $NetBSD: usbdevs.h,v 1.460 2007/02/10 07:44:00 mlelstv Exp $ */
|
||||
|
||||
/*
|
||||
* THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
|
@ -376,7 +376,7 @@
|
|||
#define USB_VENDOR_GEOCAST 0x0a79 /* Geocast Network Systems */
|
||||
#define USB_VENDOR_ZYDAS 0x0ace /* Zydas Technology Corporation */
|
||||
#define USB_VENDOR_NEODIO 0x0aec /* Neodio */
|
||||
#define USB_VENDOR_VODAFONE 0x0af0 /* Vodafone */
|
||||
#define USB_VENDOR_OPTIONNV 0x0af0 /* Option N.V: */
|
||||
#define USB_VENDOR_ASUSTEK 0x0b05 /* ASUSTeK Computer */
|
||||
#define USB_VENDOR_TODOS 0x0b0c /* Todos Data System */
|
||||
#define USB_VENDOR_SIIG2 0x0b39 /* SIIG */
|
||||
|
@ -2033,8 +2033,10 @@
|
|||
/* Vivitar products */
|
||||
#define USB_PRODUCT_VIVITAR_DSC350 0x0003 /* DSC350 Camera */
|
||||
|
||||
/* Vodafone products */
|
||||
#define USB_PRODUCT_VODAFONE_MC3G 0x5000 /* Mobile Connect 3G datacard */
|
||||
/* Option N.V. products */
|
||||
#define USB_PRODUCT_OPTIONNV_MC3G 0x5000 /* Mobile Connect 3G datacard */
|
||||
#define USB_PRODUCT_OPTIONNV_QUADUMTS2 0x6000 /* GlobeTrotter Fusion Quad Lite UMTS/GPRS */
|
||||
#define USB_PRODUCT_OPTIONNV_QUADUMTS 0x6300 /* GlobeTrotter Fusion Quad Lite 3D */
|
||||
|
||||
/* VTech products */
|
||||
#define USB_PRODUCT_VTECH_RT2570 0x3012 /* RT2570 */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: usbdevs_data.h,v 1.460 2007/02/07 10:31:11 is Exp $ */
|
||||
/* $NetBSD: usbdevs_data.h,v 1.461 2007/02/10 07:44:00 mlelstv Exp $ */
|
||||
|
||||
/*
|
||||
* THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
|
@ -1278,8 +1278,8 @@ const struct usb_vendor usb_vendors[] = {
|
|||
"Neodio",
|
||||
},
|
||||
{
|
||||
USB_VENDOR_VODAFONE,
|
||||
"Vodafone",
|
||||
USB_VENDOR_OPTIONNV,
|
||||
"Option N.V:",
|
||||
},
|
||||
{
|
||||
USB_VENDOR_ASUSTEK,
|
||||
|
@ -5654,9 +5654,17 @@ const struct usb_product usb_products[] = {
|
|||
"DSC350 Camera",
|
||||
},
|
||||
{
|
||||
USB_VENDOR_VODAFONE, USB_PRODUCT_VODAFONE_MC3G,
|
||||
USB_VENDOR_OPTIONNV, USB_PRODUCT_OPTIONNV_MC3G,
|
||||
"Mobile Connect 3G datacard",
|
||||
},
|
||||
{
|
||||
USB_VENDOR_OPTIONNV, USB_PRODUCT_OPTIONNV_QUADUMTS2,
|
||||
"GlobeTrotter Fusion Quad Lite UMTS/GPRS",
|
||||
},
|
||||
{
|
||||
USB_VENDOR_OPTIONNV, USB_PRODUCT_OPTIONNV_QUADUMTS,
|
||||
"GlobeTrotter Fusion Quad Lite 3D",
|
||||
},
|
||||
{
|
||||
USB_VENDOR_VTECH, USB_PRODUCT_VTECH_RT2570,
|
||||
"RT2570",
|
||||
|
@ -5806,4 +5814,4 @@ const struct usb_product usb_products[] = {
|
|||
"Scorpion-980N keyboard",
|
||||
},
|
||||
};
|
||||
const int usb_nproducts = 1028;
|
||||
const int usb_nproducts = 1030;
|
||||
|
|
Loading…
Reference in New Issue