-.\" $OpenBSD: uslcom.4,v 1.15 2019/04/26 06:02:10 remi Exp $
+.\" $OpenBSD: uslcom.4,v 1.16 2021/12/13 13:57:48 visa Exp $
.\"
.\" Copyright (c) 2006 Jonathan Gray <jsg@openbsd.org>
.\"
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: April 26 2019 $
+.Dd $Mdocdate: December 13 2021 $
.Dt USLCOM 4
.Os
.Sh NAME
.Sh DESCRIPTION
The
.Nm
-driver supports Silicon Laboratories CP2101/CP2102/CP2103/CP2104/CP2105
+driver supports Silicon Laboratories CP2101/CP2102/CP2103/CP2104/CP2105/CP2108
based serial adapters.
.Pp
The CP2101/CP2102/CP2103 devices only support a variety of baud rates
up to 921600.
-CP2104 and CP2105 devices support any baud rate up to 2 Mbps.
+CP2104, CP2105 and CP2108 devices support any baud rate up to 2 Mbps.
.Pp
The following devices should work with the
.Nm
-/* $OpenBSD: uslcom.c,v 1.42 2020/01/05 00:54:13 jsg Exp $ */
+/* $OpenBSD: uslcom.c,v 1.43 2021/12/13 13:57:48 visa Exp $ */
/*
* Copyright (c) 2006 Jonathan Gray <jsg@openbsd.org>
#define DPRINTF(x) DPRINTFN(0, x)
#define USLCOMBUFSZ 256
-#define USLCOM_IFACE_NO 0
#define USLCOM_SET_DATA_BITS(x) (x << 8)
struct ucom_attach_args uca;
usb_interface_descriptor_t *id;
usb_endpoint_descriptor_t *ed;
- usbd_status error;
int i;
bzero(&uca, sizeof(uca));
sc->sc_udev = uaa->device;
-
- /* get the first interface handle */
- error = usbd_device2interface_handle(sc->sc_udev, USLCOM_IFACE_NO,
- &sc->sc_iface);
- if (error != 0) {
- printf("%s: could not get interface handle\n",
- sc->sc_dev.dv_xname);
- usbd_deactivate(sc->sc_udev);
- return;
- }
+ sc->sc_iface = uaa->iface;
id = usbd_get_interface_descriptor(sc->sc_iface);
return;
}
+ uca.portno = id->bInterfaceNumber;
uca.ibufsize = USLCOMBUFSZ;
uca.obufsize = USLCOMBUFSZ;
uca.ibufsizepad = USLCOMBUFSZ;