Make the Ricochet modems work through the USB interface.

Tested by:	jim
Obtained from:	NetBSD
This commit is contained in:
Nick Hibma 2000-11-01 17:35:57 +00:00
parent 6cc33af8f1
commit 03eb1a83f8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=68184
3 changed files with 25 additions and 20 deletions

View File

@ -229,9 +229,7 @@ USB_ATTACH(umodem)
usb_endpoint_descriptor_t *ed;
usb_cdc_cm_descriptor_t *cmd;
char devinfo[1024];
#if 0
usbd_status err;
#endif
int data_ifaceno;
int i;
struct tty *tp;
@ -312,15 +310,17 @@ USB_ATTACH(umodem)
goto bad;
}
#if 0
if (sc->sc_cm_cap & USB_CDC_CM_OVER_DATA) {
err = umodem_set_comm_feature(sc, UCDC_ABSTRACT_STATE,
UCDC_DATA_MULTIPLEXED);
if (err)
goto bad;
if (usbd_get_quirks(sc->sc_udev)->uq_flags & UQ_ASSUME_CM_OVER_DATA) {
sc->sc_cm_over_data = 1;
} else {
if (sc->sc_cm_cap & USB_CDC_CM_OVER_DATA) {
err = umodem_set_comm_feature(sc, UCDC_ABSTRACT_STATE,
UCDC_DATA_MULTIPLEXED);
if (err)
goto bad;
sc->sc_cm_over_data = 1;
}
}
#endif
#if defined(__NetBSD__) || defined(__OpenBSD__)
sc->sc_tty = tp = ttymalloc();

View File

@ -1,4 +1,4 @@
/* $NetBSD: usb_quirks.c,v 1.26 2000/04/27 15:26:50 augustss Exp $ */
/* $NetBSD: usb_quirks.c,v 1.30 2000/10/24 03:59:16 explorer Exp $ */
/* $FreeBSD$ */
/*
@ -64,19 +64,22 @@ Static struct usbd_quirk_entry {
{ USB_VENDOR_PERACOM, USB_PRODUCT_PERACOM_SERIAL1, 0x101, { UQ_NO_STRINGS }},
{ USB_VENDOR_WACOM, USB_PRODUCT_WACOM_CT0405U, 0x101, { UQ_NO_STRINGS }},
{ USB_VENDOR_DALLAS, USB_PRODUCT_DALLAS_J6502, 0x0a2, { UQ_BAD_ADC }},
{ USB_VENDOR_DALLAS, USB_PRODUCT_DALLAS_J6502, 0x0a2, { UQ_NO_XU }},
{ USB_VENDOR_ALTEC, USB_PRODUCT_ALTEC_ADA70, 0x103, { UQ_BAD_ADC }},
{ USB_VENDOR_ALTEC, USB_PRODUCT_ALTEC_ASC495, 0x000, { UQ_BAD_AUDIO }},
{ USB_VENDOR_QTRONIX, USB_PRODUCT_QTRONIX_980N, 0x110, { UQ_SPUR_BUT_UP }},
{ USB_VENDOR_ALCOR2, USB_PRODUCT_ALCOR2_KBD_HUB, 0x001, { UQ_SPUR_BUT_UP }},
{ USB_VENDOR_MCT, USB_PRODUCT_MCT_HUB0100, 0x102, { UQ_BUS_POWERED }},
{ USB_VENDOR_MCT, USB_PRODUCT_MCT_USB232, 0x102, { UQ_BUS_POWERED }},
{ USB_VENDOR_METRICOM, USB_PRODUCT_METRICOM_RICOCHET_GS,
0x100, { UQ_ASSUME_CM_OVER_DATA | UQ_NO_STRINGS }},
{ 0, 0, 0, { 0 } }
};
struct usbd_quirks usbd_no_quirk = { 0 };
struct usbd_quirks *
usbd_find_quirk(d)
usb_device_descriptor_t *d;
usbd_find_quirk(usb_device_descriptor_t *d)
{
struct usbd_quirk_entry *t;

View File

@ -40,14 +40,16 @@
struct usbd_quirks {
u_int32_t uq_flags; /* Device problems: */
#define UQ_NO_SET_PROTO 0x01 /* cannot handle SET PROTOCOL. */
#define UQ_SWAP_UNICODE 0x02 /* has some Unicode strings swapped. */
#define UQ_MS_REVZ 0x04 /* mouse has Z-axis reversed */
#define UQ_NO_STRINGS 0x08 /* string descriptors are broken. */
#define UQ_BAD_ADC 0x10 /* bad audio spec version number. */
#define UQ_BUS_POWERED 0x20 /* device is bus powered, despite claim */
#define UQ_BAD_AUDIO 0x40 /* device claims audio class, but isn't */
#define UQ_SPUR_BUT_UP 0x80 /* spurious mouse button up events */
#define UQ_NO_SET_PROTO 0x0001 /* cannot handle SET PROTOCOL. */
#define UQ_SWAP_UNICODE 0x0002 /* has some Unicode strings swapped. */
#define UQ_MS_REVZ 0x0004 /* mouse has Z-axis reversed */
#define UQ_NO_STRINGS 0x0008 /* string descriptors are broken. */
#define UQ_BAD_ADC 0x0010 /* bad audio spec version number. */
#define UQ_BUS_POWERED 0x0020 /* device is bus powered, despite claim */
#define UQ_BAD_AUDIO 0x0040 /* device claims audio class, but isn't */
#define UQ_SPUR_BUT_UP 0x0080 /* spurious mouse button up events */
#define UQ_NO_XU 0x0100 /* audio device has broken extension unit */
#define UQ_ASSUME_CM_OVER_DATA 0x0200 /* modem device breaks on cm over data */
};
extern struct usbd_quirks usbd_no_quirk;