diff options
| author | itohy <itohy@NetBSD.org> | 2005-09-24 11:50:25 +0000 |
|---|---|---|
| committer | itohy <itohy@NetBSD.org> | 2005-09-24 11:50:25 +0000 |
| commit | 33dbd0db13741644b493c94570f49b8a77bf8834 (patch) | |
| tree | 3b3d42e560143f118f779a9b0bc39f74b2709136 /sys/dev/usb | |
| parent | 0d776139dcb1b14e79bcaa30e0c56bd1dabd66ff (diff) | |
Use ukyopon port type (UKYOPON_PORT_*) for "portno" locator of ucom(4) driver,
so that user can fix the ucom unit number by config file.
ex. ucom0 at ukyopon? portno 1 # modem port
ucom1 at ukyopon? portno 2 # data transfer port
The description of the locator was added to the manual page by someone,
but it has been useless until now. :)
Diffstat (limited to 'sys/dev/usb')
| -rw-r--r-- | sys/dev/usb/ukyopon.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/sys/dev/usb/ukyopon.c b/sys/dev/usb/ukyopon.c index 278a51191c0..ce5ef83e509 100644 --- a/sys/dev/usb/ukyopon.c +++ b/sys/dev/usb/ukyopon.c @@ -1,4 +1,4 @@ -/* $NetBSD: ukyopon.c,v 1.1 2005/04/15 17:18:18 itohy Exp $ */ +/* $NetBSD: ukyopon.c,v 1.2 2005/09/24 11:50:25 itohy Exp $ */ /* * Copyright (c) 1998, 2005 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ukyopon.c,v 1.1 2005/04/15 17:18:18 itohy Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ukyopon.c,v 1.2 2005/09/24 11:50:25 itohy Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -85,7 +85,6 @@ struct ukyopon_softc { struct umodem_softc sc_umodem; /* ukyopon addition */ - enum ukyopon_port sc_porttype; }; #define UKYOPON_MODEM_IFACE_INDEX 0 @@ -134,10 +133,8 @@ USB_ATTACH(ukyopon) USB_ATTACH_START(ukyopon, sc, uaa); struct ucom_attach_args uca; - sc->sc_porttype = (uaa->ifaceno == UKYOPON_MODEM_IFACE_INDEX) ? + uca.portno = (uaa->ifaceno == UKYOPON_MODEM_IFACE_INDEX) ? UKYOPON_PORT_MODEM : UKYOPON_PORT_DATA; - - uca.portno = UCOM_UNK_PORTNO; uca.methods = &ukyopon_methods; uca.info = (uaa->ifaceno == UKYOPON_MODEM_IFACE_INDEX) ? "modem port" : "data transfer port"; @@ -162,7 +159,7 @@ ukyopon_ioctl(void *addr, int portno, u_long cmd, caddr_t data, int flag, USBDEVUNIT(*(device_ptr_t)sc->sc_umodem.sc_udev->bus->usbctl); arg_id->ui_address = sc->sc_umodem.sc_udev->address; arg_id->ui_model = UKYOPON_MODEL_UNKNOWN; - arg_id->ui_porttype = sc->sc_porttype; + arg_id->ui_porttype = portno; break; default: |
