Add umodem device.

This commit is contained in:
augustss 1999-08-16 22:27:08 +00:00
parent 03946f957a
commit db574ba708
18 changed files with 232 additions and 48 deletions

View File

@ -1,4 +1,4 @@
.\" $NetBSD: hardware,v 1.51 1999/07/13 16:53:14 kleink Exp $
.\" $NetBSD: hardware,v 1.52 1999/08/16 22:27:08 augustss Exp $
.Nx \*V
runs on ISA (AT-Bus), EISA, PCI, and VL-bus systems
with 386-family processors, with or without math coprocessors. It
@ -218,6 +218,7 @@ Supported devices include:
Keyboards using the boot protocol [*] [+]
Mice [*] [+]
Printers [*] [+]
Modems using Abstract Control Model [*] [+]
Generic support for HID devices [*] [+]
PCMCIA Controllers:
ISA, PCI, and ISA Plug\*&Play attachments for:

View File

@ -1,4 +1,4 @@
# $NetBSD: mi,v 1.154 1999/08/01 18:22:54 augustss Exp $
# $NetBSD: mi,v 1.155 1999/08/16 22:27:10 augustss Exp $
./usr/share/info/am-utils.info
./usr/share/info/awk.info
./usr/share/info/bfd.info
@ -485,6 +485,7 @@
./usr/share/man/cat4/uk.0
./usr/share/man/cat4/ukbd.0
./usr/share/man/cat4/ulpt.0
./usr/share/man/cat4/umodem.0
./usr/share/man/cat4/ums.0
./usr/share/man/cat4/unix.0
./usr/share/man/cat4/usb.0
@ -1624,6 +1625,7 @@
./usr/share/man/man4/uk.4
./usr/share/man/man4/ukbd.4
./usr/share/man/man4/ulpt.4
./usr/share/man/man4/umodem.4
./usr/share/man/man4/ums.4
./usr/share/man/man4/unix.4
./usr/share/man/man4/usb.4

View File

@ -1,5 +1,5 @@
#!/bin/sh -
# $NetBSD: MAKEDEV,v 1.43 1999/07/29 19:24:37 augustss Exp $
# $NetBSD: MAKEDEV,v 1.44 1999/08/16 22:27:10 augustss Exp $
#
# Copyright (c) 1990 The Regents of the University of California.
# All rights reserved.
@ -136,6 +136,7 @@ usbs)
sh $0 usb0 usb1
sh $0 uhid0 uhid1 uhid2 uhid3
sh $0 ulpt0 ulpt1
sh $0 umodem0 umodem1
;;
std)
@ -183,6 +184,20 @@ ulpt*)
chmod 600 $ulpt
;;
umodem*)
unit=${i#umodem}
umodem=umodem$unit
udmodem=udmodem$unit
ucmodem=ucmodem$unit
major=57
rm -f $umodem $udmodem $ucmodem
mknod $umodem c $major $(($unit + $dialin ))
mknod $udmodem c $major $(($unit + $dialout ))
mknod $ucmodem c $major $(($unit + $callunit))
chown uucp.wheel $umodem $udmodem $ucmodem
chmod 600 $umodem $udmodem $ucmodem
;;
ugen*)
unit=${i#ugen}
ugen=ugen$unit

View File

@ -1,6 +1,6 @@
#!/bin/sh -
#
# $NetBSD: MAKEDEV,v 1.34 1999/07/29 19:24:38 augustss Exp $
# $NetBSD: MAKEDEV,v 1.35 1999/08/16 22:27:11 augustss Exp $
#
# Copyright (c) 1990 The Regents of the University of California.
# All rights reserved.
@ -133,6 +133,7 @@ usbs)
sh $0 usb0 usb1
sh $0 uhid0 uhid1 uhid2 uhid3
sh $0 ulpt0 ulpt1
sh $0 umodem0 umodem1
;;
std)
@ -497,6 +498,20 @@ ulpt*)
chmod 600 $ulpt
;;
umodem*)
unit=${i#umodem}
umodem=umodem$unit
udmodem=udmodem$unit
ucmodem=ucmodem$unit
major=74
rm -f $umodem $udmodem $ucmodem
mknod $umodem c $major $(($unit + $dialin ))
mknod $udmodem c $major $(($unit + $dialout ))
mknod $ucmodem c $major $(($unit + $callunit))
chown uucp.wheel $umodem $udmodem $ucmodem
chmod 600 $umodem $udmodem $ucmodem
;;
ugen*)
unit=${i#ugen}
ugen=ugen$unit

View File

@ -1,6 +1,6 @@
#!/bin/sh -
#
# $NetBSD: MAKEDEV,v 1.89 1999/07/29 19:24:39 augustss Exp $
# $NetBSD: MAKEDEV,v 1.90 1999/08/16 22:27:11 augustss Exp $
#
# Copyright (c) 1990 The Regents of the University of California.
# All rights reserved.
@ -100,6 +100,7 @@
dialin=0
dialout=524288 # high bit of the minor number
callunit=262144
PATH=/sbin:/usr/sbin:/bin:/usr/bin
umask 77
@ -157,7 +158,8 @@ ramdisk)
usbs)
sh $0 usb0 usb1
sh $0 uhid0 uhid1 uhid2 uhid3
sh $0 ulpt0 ulpt1
sh $0 ulpt0 ulpt1
sh $0 umodem0 umodem1
;;
std)
@ -209,6 +211,20 @@ ulpt*)
chmod 600 $ulpt
;;
umodem*)
unit=${i#umodem}
umodem=umodem$unit
udmodem=udmodem$unit
ucmodem=ucmodem$unit
major=66
rm -f $umodem $udmodem $ucmodem
mknod $umodem c $major $(($unit + $dialin ))
mknod $udmodem c $major $(($unit + $dialout ))
mknod $ucmodem c $major $(($unit + $callunit))
chown uucp.wheel $umodem $udmodem $ucmodem
chmod 600 $umodem $udmodem $ucmodem
;;
ugen*)
unit=${i#ugen}
ugen=ugen$unit

View File

@ -1,6 +1,6 @@
#!/bin/sh -
#
# $NetBSD: MAKEDEV,v 1.12 1999/07/29 19:24:39 augustss Exp $
# $NetBSD: MAKEDEV,v 1.13 1999/08/16 22:27:11 augustss Exp $
#
# Copyright (c) 1990 The Regents of the University of California.
# All rights reserved.
@ -410,6 +410,7 @@ usbs)
sh $0 usb0 usb1
sh $0 uhid0 uhid1 uhid2 uhid3
sh $0 ulpt0 ulpt1
sh $0 umodem0 umodem1
;;
usb*)
@ -442,6 +443,20 @@ ulpt*)
chmod 600 $ulpt
;;
umodem*)
unit=${i#umodem}
umodem=umodem$unit
udmodem=udmodem$unit
ucmodem=ucmodem$unit
major=44
rm -f $umodem $udmodem $ucmodem
mknod $umodem c $major $(($unit + $dialin ))
mknod $udmodem c $major $(($unit + $dialout ))
mknod $ucmodem c $major $(($unit + $callunit))
chown uucp.wheel $umodem $udmodem $ucmodem
chmod 600 $umodem $udmodem $ucmodem
;;
ugen*)
unit=${i#ugen}
ugen=ugen$unit

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.96 1999/08/01 18:21:16 augustss Exp $
# $NetBSD: Makefile,v 1.97 1999/08/16 22:27:12 augustss Exp $
# @(#)Makefile 8.1 (Berkeley) 6/18/93
MAN= ahb.4 ahc.4 aria.4 atalk.4 audio.4 bha.4 bpf.4 ccd.4 cd.4 ch.4 \
@ -14,7 +14,7 @@ MAN= ahb.4 ahc.4 aria.4 atalk.4 audio.4 bha.4 bpf.4 ccd.4 cd.4 ch.4 \
ym.4 zstty.4
# USB devices
MAN+= uaudio.4 ugen.4 uhid.4 ukbd.4 ulpt.4 ums.4 usb.4
MAN+= uaudio.4 ugen.4 uhid.4 ukbd.4 ulpt.4 umodem.4 ums.4 usb.4
# machine-independent buses
MAN+= eisa.4 isa.4 isapnp.4 pci.4 pcmcia.4

77
share/man/man4/umodem.4 Normal file
View File

@ -0,0 +1,77 @@
.\" $NetBSD: umodem.4,v 1.1 1999/08/16 22:27:12 augustss Exp $
.\"
.\" Copyright (c) 1999 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" This code is derived from software contributed to The NetBSD Foundation
.\" by Lennart Augustsson.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by the NetBSD
.\" Foundation, Inc. and its contributors.
.\" 4. Neither the name of The NetBSD Foundation nor the names of its
.\" contributors may be used to endorse or promote products derived
.\" from this software without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd August 16, 1999
.Dt UMODEM 4
.Os
.Sh NAME
.Nm umodem
.Nd USB modem support
.Sh SYNOPSIS
.Cd "umodem* at uhub?"
.Pp
.Sh DESCRIPTION
The
.Nm
driver provides support for USB modems in the Communication
Device Class using the Abstract Control Model.
These modems are basically standard serial line modems, but they are
accessed via USB instead. They support a regular AT command set.
The commands can either be multiplxed with the data stream
or handled through separate pipes. In the latter case the AT
commands have to be given on device separate from the data device.
.Pp
The
.Nm
driver shows a behaviour like a
.Xr tty 4 .
This means that normal programs such as
.Xr tip 1
or
.Xr pppd 8
can be used to access the modem.
.Sh BUGS
Only modems with multiplexed commands and data are supported
at the moment.
.Sh SEE ALSO
.Xr tty 4 ,
.Xr usb 4
.Sh HISTORY
The
.Nm
driver
appeared in
.Nx 1.5 .

View File

@ -1,4 +1,4 @@
/* $NetBSD: conf.c,v 1.40 1999/07/29 19:14:35 augustss Exp $ */
/* $NetBSD: conf.c,v 1.41 1999/08/16 22:27:12 augustss Exp $ */
/*-
* Copyright (c) 1991 The Regents of the University of California.
@ -37,7 +37,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: conf.c,v 1.40 1999/07/29 19:14:35 augustss Exp $");
__KERNEL_RCSID(0, "$NetBSD: conf.c,v 1.41 1999/08/16 22:27:12 augustss Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -190,6 +190,8 @@ cdev_decl(uhid);
cdev_decl(ugen);
#include "ulpt.h"
cdev_decl(ulpt);
#include "umodem.h"
cdev_decl(umodem);
#ifdef __I4B_IS_INTEGRATED
/* open, close, ioctl */
@ -316,6 +318,7 @@ struct cdevsw cdevsw[] =
cdev_notdef(), /* 55 */
#endif
cdev_mouse_init(NWSMUX, wsmux), /* 56: ws multiplexor */
cdev_tty_init(NUMODEM, umodem), /* 57: USB modem */
};
int nchrdev = sizeof (cdevsw) / sizeof (cdevsw[0]);
@ -415,6 +418,7 @@ static int chrtoblktbl[] = {
/* 54 */ NODEV,
/* 55 */ NODEV,
/* 56 */ NODEV,
/* 57 */ NODEV,
};
/*

View File

@ -1,4 +1,4 @@
# $NetBSD: ALPHA,v 1.99 1999/08/07 07:40:40 thorpej Exp $
# $NetBSD: ALPHA,v 1.100 1999/08/16 22:27:13 augustss Exp $
#
# Alpha kernel with all the options you'd want, and more.
@ -306,27 +306,29 @@ cd* at atapibus? drive ? # ATAPI CD-ROM devices
# Floppy drives
fd* at fdc? drive ?
# USB bus support
usb* at uhci?
usb* at ohci?
# USB Hubs
uhub* at usb?
uhub* at uhub? port ? configuration ? interface ?
# USB hubs
uhub* at usb?
uhub* at uhub? port ?
# USB Mice
ums* at uhub? port ? configuration ? interface ?
wsmouse* at ums?
# USB mice
ums* at uhub? port ?
wsmouse* at ums?
# USB keyboards
ukbd* at uhub? port ?
wskbd* at ukbd? console ?
# USB Keyboards
ukbd* at uhub? port ? configuration ? interface ?
wskbd* at ukbd? console ?
# USB Generic HID devices
uhid* at uhub? port ?
uhid* at uhub? port ? configuration ? interface ?
# USB Printers
ulpt* at uhub? port ?
# USB Printer
ulpt* at uhub? port ? configuration ? interface ?
# USB Modem
umodem* at uhub? port ? configuration ?
# USB Generic driver
ugen* at uhub? port ?
# Workstation Console attachments
#wsdisplay* at cfb?

View File

@ -1,4 +1,4 @@
# $NetBSD: GENERIC,v 1.126 1999/08/07 07:40:40 thorpej Exp $
# $NetBSD: GENERIC,v 1.127 1999/08/16 22:27:13 augustss Exp $
#
# Generic Alpha kernel. Enough to get booted, etc., but not much more.
@ -292,23 +292,29 @@ fd* at fdc? drive ?
usb* at uhci?
usb* at ohci?
# USB hubs
# USB Hubs
uhub* at usb?
uhub* at uhub? port ?
uhub* at uhub? port ? configuration ? interface ?
# USB mice
ums* at uhub? port ?
wsmouse* at ums? mux 0
# USB Mice
ums* at uhub? port ? configuration ? interface ?
wsmouse* at ums? mux 0
# USB Keyboards
ukbd* at uhub? port ?
ukbd* at uhub? port ? configuration ? interface ?
wskbd* at ukbd? console ? mux 1
# USB Generic HID devices
uhid* at uhub? port ?
uhid* at uhub? port ? configuration ? interface ?
# USB Printers
ulpt* at uhub? port ?
# USB Printer
ulpt* at uhub? port ? configuration ? interface ?
# USB Modem
umodem* at uhub? port ? configuration ?
# USB Generic driver
ugen* at uhub? port ?
# Workstation Console attachments
#wsdisplay* at cfb?

View File

@ -1,4 +1,4 @@
/* $NetBSD: conf.c,v 1.39 1999/07/29 19:14:36 augustss Exp $ */
/* $NetBSD: conf.c,v 1.40 1999/08/16 22:27:13 augustss Exp $ */
/*
* Copyright (c) 1994-1998 Mark Brinicombe.
@ -183,6 +183,7 @@ int nblkdev = sizeof(bdevsw) / sizeof(bdevsw[0]);
#include "ugen.h"
#include "ugen.h"
#include "ulpt.h"
#include "umodem.h"
#include "vcoda.h" /* coda file system */
#include "wsdisplay.h"
#include "wskbd.h"
@ -284,6 +285,7 @@ struct cdevsw cdevsw[] = {
cdev_disk_init(NRAID,raid), /* 71: RAIDframe disk driver */
cdev_ugen_init(NUGEN,ugen), /* 72: USB generic driver */
cdev_mouse_init(NWSMUX,wsmux), /* 73: ws multiplexor */
cdev_tty_init(NUMODEM,umodem), /* 74: USB modem */
};
int nchrdev = sizeof(cdevsw) / sizeof(cdevsw[0]);
@ -399,6 +401,7 @@ static int chrtoblktbl[] = {
/* 71 */ 71,
/* 72 */ NODEV,
/* 73 */ NODEV,
/* 74 */ NODEV,
};
/*

View File

@ -1,4 +1,4 @@
# $NetBSD: CATS,v 1.12 1999/07/29 10:37:14 augustss Exp $
# $NetBSD: CATS,v 1.13 1999/08/16 22:27:14 augustss Exp $
#
# CATS -- CHALTECH CATS Development kernel
#
@ -260,8 +260,11 @@ uhid* at uhub? port ? configuration ? interface ?
# USB Printer
ulpt* at uhub? port ? configuration ? interface ?
# USB Modem
umodem* at uhub? port ? configuration ?
# USB Generic driver
ugen* at uhub? port ? configuration ? interface ?
ugen* at uhub? port ?
# Audio Devices

View File

@ -1,4 +1,4 @@
# $NetBSD: GENERIC,v 1.253 1999/08/14 21:20:45 augustss Exp $
# $NetBSD: GENERIC,v 1.254 1999/08/16 22:27:14 augustss Exp $
#
# GENERIC -- everything that's currently supported
#
@ -526,6 +526,9 @@ uhid* at uhub? port ? configuration ? interface ?
# USB Printer
ulpt* at uhub? port ? configuration ? interface ?
# USB Modem
umodem* at uhub? port ? configuration ?
# USB Generic driver
ugen* at uhub? port ?

View File

@ -1,4 +1,4 @@
/* $NetBSD: conf.c,v 1.114 1999/07/29 19:14:36 augustss Exp $ */
/* $NetBSD: conf.c,v 1.115 1999/08/16 22:27:14 augustss Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -203,6 +203,8 @@ cdev_decl(uhid);
cdev_decl(ugen);
#include "ulpt.h"
cdev_decl(ulpt);
#include "umodem.h"
cdev_decl(umodem);
#include "vcoda.h"
cdev_decl(vc_nb_);
@ -357,6 +359,7 @@ struct cdevsw cdevsw[] =
cdev_esh_init(NESH, esh_fp), /* 63: HIPPI (esh) raw device */
cdev_ugen_init(NUGEN,ugen), /* 64: USB generic driver */
cdev_mouse_init(NWSMUX, wsmux), /* 65: ws multiplexor */
cdev_tty_init(NUMODEM,umodem), /* 66: USB modem */
};
int nchrdev = sizeof(cdevsw) / sizeof(cdevsw[0]);
@ -464,6 +467,7 @@ static int chrtoblktbl[] = {
/* 63 */ NODEV,
/* 64 */ NODEV,
/* 65 */ NODEV,
/* 66 */ NODEV,
};
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: pms.c,v 1.43 1999/05/06 09:10:51 drochner Exp $ */
/* $NetBSD: pms.c,v 1.44 1999/08/16 22:27:15 augustss Exp $ */
/*-
* Copyright (c) 1994, 1997 Charles M. Hannum.
@ -580,7 +580,8 @@ pmsioctl(dev, cmd, addr, flag, p)
#define PS2LBUTMASK 0x01
#define PS2RBUTMASK 0x02
#define PS2MBUTMASK 0x04
#define PS2BUTMASK 0x0f
void
opmsinput(arg, data)
void *arg;
@ -601,7 +602,17 @@ opmsinput(arg, data)
switch (state) {
case 0:
buttons = data;
/* Re-enable if mouse is disconnected and reconnected. */
if (buttons == 0xaa) {
pms_dev_cmd(PMS_DEV_ENABLE);
break;
}
/* For GlidePoint tapping feature. treat as LBUTTON */
if ((buttons & PS2BUTMASK) == 0)
buttons |= PS2LBUTMASK;
buttons = data;
if ((buttons & 0xc0) == 0)
++state;
break;

View File

@ -1,4 +1,4 @@
# $NetBSD: GENERIC,v 1.33 1999/08/05 00:31:01 tsubai Exp $
# $NetBSD: GENERIC,v 1.34 1999/08/16 22:27:15 augustss Exp $
#
# POWERMAC config file
#
@ -190,6 +190,9 @@ uhid* at uhub? port ? configuration ? interface ?
# USB Printer
ulpt* at uhub? port ? configuration ? interface ?
# USB Modem
umodem* at uhub? port ? configuration ?
# USB Generic driver
ugen* at uhub? port ? configuration ? interface ?

View File

@ -1,4 +1,4 @@
/* $NetBSD: conf.c,v 1.14 1999/07/29 19:14:37 augustss Exp $ */
/* $NetBSD: conf.c,v 1.15 1999/08/16 22:27:15 augustss Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@ -141,6 +141,8 @@ cdev_decl(uhid);
cdev_decl(ugen);
#include "ulpt.h"
cdev_decl(ulpt);
#include "umodem.h"
cdev_decl(umodem);
struct cdevsw cdevsw[] = {
cdev_cn_init(1,cn), /* 0: virtual console */
@ -187,6 +189,7 @@ struct cdevsw cdevsw[] = {
cdev_lpt_init(NULPT,ulpt), /* 41: USB printer */
cdev_ugen_init(NUGEN,ugen), /* 42: USB generic driver */
cdev_mouse_init(NWSMUX,wsmux), /* 43: ws multiplexor */
cdev_tty_init(NUMODEM,umodem), /* 44: USB modem */
};
int nchrdev = sizeof cdevsw / sizeof cdevsw[0];
@ -265,6 +268,7 @@ static int chrtoblktbl[] = {
/* 41 */ NODEV,
/* 42 */ NODEV,
/* 43 */ NODEV,
/* 44 */ NODEV,
};
/*