Module Name: src Committed By: skrll Date: Sat Apr 16 13:22:00 UTC 2016
Modified Files: src/sys/dev/usb [nick-nhusb]: moscom.c u3g.c uark.c ubsa.c uchcom.c ucom.c ucomvar.h uftdi.c ugensa.c uhmodem.c uipaq.c ukyopon.c umcs.c umct.c umodem.c umodem_common.c uplcom.c usbdi.c uslsa.c uvisor.c uvscom.c Log Message: Prefix ucom_attach_args struct members with ucaa_ and rename variables for consistency. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.8.14.6 -r1.8.14.7 src/sys/dev/usb/moscom.c cvs rdiff -u -r1.31.2.10 -r1.31.2.11 src/sys/dev/usb/u3g.c cvs rdiff -u -r1.6.14.4 -r1.6.14.5 src/sys/dev/usb/uark.c cvs rdiff -u -r1.30.16.6 -r1.30.16.7 src/sys/dev/usb/ubsa.c cvs rdiff -u -r1.13.6.7 -r1.13.6.8 src/sys/dev/usb/uchcom.c cvs rdiff -u -r1.108.2.12 -r1.108.2.13 src/sys/dev/usb/ucom.c cvs rdiff -u -r1.20.24.3 -r1.20.24.4 src/sys/dev/usb/ucomvar.h cvs rdiff -u -r1.59.6.8 -r1.59.6.9 src/sys/dev/usb/uftdi.c cvs rdiff -u -r1.31.6.6 -r1.31.6.7 src/sys/dev/usb/ugensa.c cvs rdiff -u -r1.13.24.7 -r1.13.24.8 src/sys/dev/usb/uhmodem.c cvs rdiff -u -r1.19.14.6 -r1.19.14.7 src/sys/dev/usb/uipaq.c cvs rdiff -u -r1.16.16.5 -r1.16.16.6 src/sys/dev/usb/ukyopon.c cvs rdiff -u -r1.8.2.5 -r1.8.2.6 src/sys/dev/usb/umcs.c cvs rdiff -u -r1.32.24.10 -r1.32.24.11 src/sys/dev/usb/umct.c cvs rdiff -u -r1.66.4.5 -r1.66.4.6 src/sys/dev/usb/umodem.c cvs rdiff -u -r1.22.38.5 -r1.22.38.6 src/sys/dev/usb/umodem_common.c cvs rdiff -u -r1.74.4.10 -r1.74.4.11 src/sys/dev/usb/uplcom.c cvs rdiff -u -r1.162.2.45 -r1.162.2.46 src/sys/dev/usb/usbdi.c cvs rdiff -u -r1.19.6.3 -r1.19.6.4 src/sys/dev/usb/uslsa.c cvs rdiff -u -r1.45.24.6 -r1.45.24.7 src/sys/dev/usb/uvisor.c cvs rdiff -u -r1.28.16.6 -r1.28.16.7 src/sys/dev/usb/uvscom.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/usb/moscom.c diff -u src/sys/dev/usb/moscom.c:1.8.14.6 src/sys/dev/usb/moscom.c:1.8.14.7 --- src/sys/dev/usb/moscom.c:1.8.14.6 Sat Mar 21 11:33:37 2015 +++ src/sys/dev/usb/moscom.c Sat Apr 16 13:22:00 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: moscom.c,v 1.8.14.6 2015/03/21 11:33:37 skrll Exp $ */ +/* $NetBSD: moscom.c,v 1.8.14.7 2016/04/16 13:22:00 skrll Exp $ */ /* $OpenBSD: moscom.c,v 1.11 2007/10/11 18:33:14 deraadt Exp $ */ /* @@ -18,7 +18,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: moscom.c,v 1.8.14.6 2015/03/21 11:33:37 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: moscom.c,v 1.8.14.7 2016/04/16 13:22:00 skrll Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -197,7 +197,7 @@ moscom_attach(device_t parent, device_t struct moscom_softc *sc = device_private(self); struct usb_attach_arg *uaa = aux; struct usbd_device *dev = uaa->uaa_device; - struct ucom_attach_args uca; + struct ucom_attach_args ucaa; usb_interface_descriptor_t *id; usb_endpoint_descriptor_t *ed; char *devinfop; @@ -213,7 +213,7 @@ moscom_attach(device_t parent, device_t sc->sc_dev = self; - memset(&uca, 0, sizeof(uca)); + memset(&ucaa, 0, sizeof(ucaa)); sc->sc_udev = uaa->uaa_device; if (usbd_set_config_index(sc->sc_udev, MOSCOM_CONFIG_NO, 1) != 0) { @@ -233,7 +233,7 @@ moscom_attach(device_t parent, device_t id = usbd_get_interface_descriptor(sc->sc_iface); - uca.bulkin = uca.bulkout = -1; + ucaa.ucaa_bulkin = ucaa.ucaa_bulkout = -1; for (i = 0; i < id->bNumEndpoints; i++) { ed = usbd_interface2endpoint_descriptor(sc->sc_iface, i); if (ed == NULL) { @@ -245,32 +245,32 @@ moscom_attach(device_t parent, device_t if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN && UE_GET_XFERTYPE(ed->bmAttributes) == UE_BULK) - uca.bulkin = ed->bEndpointAddress; + ucaa.ucaa_bulkin = ed->bEndpointAddress; else if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_OUT && UE_GET_XFERTYPE(ed->bmAttributes) == UE_BULK) - uca.bulkout = ed->bEndpointAddress; + ucaa.ucaa_bulkout = ed->bEndpointAddress; } - if (uca.bulkin == -1 || uca.bulkout == -1) { + if (ucaa.ucaa_bulkin == -1 || ucaa.ucaa_bulkout == -1) { aprint_error_dev(self, "missing endpoint\n"); sc->sc_dying = 1; return; } - uca.ibufsize = MOSCOMBUFSZ; - uca.obufsize = MOSCOMBUFSZ; - uca.ibufsizepad = MOSCOMBUFSZ; - uca.opkthdrlen = 0; - uca.device = sc->sc_udev; - uca.iface = sc->sc_iface; - uca.methods = &moscom_methods; - uca.arg = sc; - uca.info = NULL; + ucaa.ucaa_ibufsize = MOSCOMBUFSZ; + ucaa.ucaa_obufsize = MOSCOMBUFSZ; + ucaa.ucaa_ibufsizepad = MOSCOMBUFSZ; + ucaa.ucaa_opkthdrlen = 0; + ucaa.ucaa_device = sc->sc_udev; + ucaa.ucaa_iface = sc->sc_iface; + ucaa.ucaa_methods = &moscom_methods; + ucaa.ucaa_arg = sc; + ucaa.ucaa_info = NULL; usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev, sc->sc_dev); - sc->sc_subdev = config_found_sm_loc(self, "ucombus", NULL, &uca, + sc->sc_subdev = config_found_sm_loc(self, "ucombus", NULL, &ucaa, ucomprint, ucomsubmatch); return; Index: src/sys/dev/usb/u3g.c diff -u src/sys/dev/usb/u3g.c:1.31.2.10 src/sys/dev/usb/u3g.c:1.31.2.11 --- src/sys/dev/usb/u3g.c:1.31.2.10 Tue Oct 6 21:32:15 2015 +++ src/sys/dev/usb/u3g.c Sat Apr 16 13:22:00 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: u3g.c,v 1.31.2.10 2015/10/06 21:32:15 skrll Exp $ */ +/* $NetBSD: u3g.c,v 1.31.2.11 2016/04/16 13:22:00 skrll Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -50,7 +50,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: u3g.c,v 1.31.2.10 2015/10/06 21:32:15 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: u3g.c,v 1.31.2.11 2016/04/16 13:22:00 skrll Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -728,7 +728,7 @@ u3g_attach(device_t parent, device_t sel struct usbd_interface *iface; usb_interface_descriptor_t *id; usb_endpoint_descriptor_t *ed; - struct ucom_attach_args uca; + struct ucom_attach_args ucaa; usbd_status error; int n, intr_address, intr_size; @@ -748,17 +748,17 @@ u3g_attach(device_t parent, device_t sel id = usbd_get_interface_descriptor(iface); - uca.info = "3G Modem"; - uca.ibufsize = U3G_BUFF_SIZE; - uca.obufsize = U3G_BUFF_SIZE; - uca.ibufsizepad = U3G_BUFF_SIZE; - uca.opkthdrlen = 0; - uca.device = dev; - uca.iface = iface; - uca.methods = &u3g_methods; - uca.arg = sc; - uca.portno = -1; - uca.bulkin = uca.bulkout = -1; + ucaa.ucaa_info = "3G Modem"; + ucaa.ucaa_ibufsize = U3G_BUFF_SIZE; + ucaa.ucaa_obufsize = U3G_BUFF_SIZE; + ucaa.ucaa_ibufsizepad = U3G_BUFF_SIZE; + ucaa.ucaa_opkthdrlen = 0; + ucaa.ucaa_device = dev; + ucaa.ucaa_iface = iface; + ucaa.ucaa_methods = &u3g_methods; + ucaa.ucaa_arg = sc; + ucaa.ucaa_portno = -1; + ucaa.ucaa_bulkin = ucaa.ucaa_bulkout = -1; sc->sc_ifaceno = uiaa->uiaa_ifaceno; @@ -781,29 +781,29 @@ u3g_attach(device_t parent, device_t sel } else if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN && UE_GET_XFERTYPE(ed->bmAttributes) == UE_BULK) { - uca.bulkin = ed->bEndpointAddress; + ucaa.ucaa_bulkin = ed->bEndpointAddress; } else if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_OUT && UE_GET_XFERTYPE(ed->bmAttributes) == UE_BULK) { - uca.bulkout = ed->bEndpointAddress; + ucaa.ucaa_bulkout = ed->bEndpointAddress; } - if (uca.bulkin != -1 && uca.bulkout != -1) { + if (ucaa.ucaa_bulkin != -1 && ucaa.ucaa_bulkout != -1) { struct u3g_com *com; if (sc->sc_ncom == __arraycount(sc->sc_com)) { aprint_error_dev(self, "Need to configure " "more than %zu ttys", sc->sc_ncom); continue; } - uca.portno = sc->sc_ncom++; - com = &sc->sc_com[uca.portno]; + ucaa.ucaa_portno = sc->sc_ncom++; + com = &sc->sc_com[ucaa.ucaa_portno]; com->c_outpins = 0; com->c_msr = UMSR_DSR | UMSR_CTS | UMSR_DCD; com->c_open = false; com->c_purging = false; com->c_dev = config_found_sm_loc(self, "ucombus", - NULL, &uca, ucomprint, ucomsubmatch); - uca.bulkin = -1; - uca.bulkout = -1; + NULL, &ucaa, ucomprint, ucomsubmatch); + ucaa.ucaa_bulkin = -1; + ucaa.ucaa_bulkout = -1; } } Index: src/sys/dev/usb/uark.c diff -u src/sys/dev/usb/uark.c:1.6.14.4 src/sys/dev/usb/uark.c:1.6.14.5 --- src/sys/dev/usb/uark.c:1.6.14.4 Mon Sep 28 16:24:19 2015 +++ src/sys/dev/usb/uark.c Sat Apr 16 13:22:00 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: uark.c,v 1.6.14.4 2015/09/28 16:24:19 skrll Exp $ */ +/* $NetBSD: uark.c,v 1.6.14.5 2016/04/16 13:22:00 skrll Exp $ */ /* $OpenBSD: uark.c,v 1.13 2009/10/13 19:33:17 pirofti Exp $ */ /* @@ -99,7 +99,7 @@ int uark_activate(device_t, extern struct cfdriver uark_cd; CFATTACH_DECL_NEW(uark, sizeof(struct uark_softc), uark_match, uark_attach, uark_detach, uark_activate); -int +int uark_match(device_t parent, cfdata_t match, void *aux) { struct usb_attach_arg *uaa = aux; @@ -108,20 +108,20 @@ uark_match(device_t parent, cfdata_t mat UMATCH_VENDOR_PRODUCT : UMATCH_NONE; } -void +void uark_attach(device_t parent, device_t self, void *aux) { struct uark_softc *sc = device_private(self); struct usb_attach_arg *uaa = aux; struct usbd_device *dev = uaa->uaa_device; char *devinfop; - struct ucom_attach_args uca; + struct ucom_attach_args ucaa; usb_interface_descriptor_t *id; usb_endpoint_descriptor_t *ed; usbd_status error; int i; - memset(&uca, 0, sizeof(uca)); + memset(&ucaa, 0, sizeof(ucaa)); sc->sc_dev = self; devinfop = usbd_devinfo_alloc(dev, 0); @@ -149,7 +149,7 @@ uark_attach(device_t parent, device_t se id = usbd_get_interface_descriptor(sc->sc_iface); - uca.bulkin = uca.bulkout = -1; + ucaa.ucaa_bulkin = ucaa.ucaa_bulkout = -1; for (i = 0; i < id->bNumEndpoints; i++) { ed = usbd_interface2endpoint_descriptor(sc->sc_iface, i); if (ed == NULL) { @@ -161,32 +161,32 @@ uark_attach(device_t parent, device_t se if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN && UE_GET_XFERTYPE(ed->bmAttributes) == UE_BULK) - uca.bulkin = ed->bEndpointAddress; + ucaa.ucaa_bulkin = ed->bEndpointAddress; else if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_OUT && UE_GET_XFERTYPE(ed->bmAttributes) == UE_BULK) - uca.bulkout = ed->bEndpointAddress; + ucaa.ucaa_bulkout = ed->bEndpointAddress; } - if (uca.bulkin == -1 || uca.bulkout == -1) { + if (ucaa.ucaa_bulkin == -1 || ucaa.ucaa_bulkout == -1) { aprint_error_dev(self, "missing endpoint\n"); sc->sc_dying = 1; return; } - uca.ibufsize = UARKBUFSZ; - uca.obufsize = UARKBUFSZ; - uca.ibufsizepad = UARKBUFSZ; - uca.opkthdrlen = 0; - uca.device = sc->sc_udev; - uca.iface = sc->sc_iface; - uca.methods = &uark_methods; - uca.arg = sc; - uca.info = NULL; + ucaa.ucaa_ibufsize = UARKBUFSZ; + ucaa.ucaa_obufsize = UARKBUFSZ; + ucaa.ucaa_ibufsizepad = UARKBUFSZ; + ucaa.ucaa_opkthdrlen = 0; + ucaa.ucaa_device = sc->sc_udev; + ucaa.ucaa_iface = sc->sc_iface; + ucaa.ucaa_methods = &uark_methods; + ucaa.ucaa_arg = sc; + ucaa.ucaa_info = NULL; usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev, sc->sc_dev); - - sc->sc_subdev = config_found_sm_loc(self, "ucombus", NULL, &uca, + + sc->sc_subdev = config_found_sm_loc(self, "ucombus", NULL, &ucaa, ucomprint, ucomsubmatch); return; @@ -318,7 +318,7 @@ void uark_get_status(void *vsc, int portno, u_char *lsr, u_char *msr) { struct uark_softc *sc = vsc; - + if (msr != NULL) *msr = sc->sc_msr; if (lsr != NULL) Index: src/sys/dev/usb/ubsa.c diff -u src/sys/dev/usb/ubsa.c:1.30.16.6 src/sys/dev/usb/ubsa.c:1.30.16.7 --- src/sys/dev/usb/ubsa.c:1.30.16.6 Mon Dec 28 08:28:11 2015 +++ src/sys/dev/usb/ubsa.c Sat Apr 16 13:22:00 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: ubsa.c,v 1.30.16.6 2015/12/28 08:28:11 skrll Exp $ */ +/* $NetBSD: ubsa.c,v 1.30.16.7 2016/04/16 13:22:00 skrll Exp $ */ /*- * Copyright (c) 2002, Alexander Kabaev <kan.FreeBSD.org>. * All rights reserved. @@ -54,7 +54,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ubsa.c,v 1.30.16.6 2015/12/28 08:28:11 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ubsa.c,v 1.30.16.7 2016/04/16 13:22:00 skrll Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -156,7 +156,7 @@ ubsa_attach(device_t parent, device_t se usb_endpoint_descriptor_t *ed; char *devinfop; usbd_status err; - struct ucom_attach_args uca; + struct ucom_attach_args ucaa; int i; sc->sc_dev = self; @@ -232,7 +232,7 @@ ubsa_attach(device_t parent, device_t se sc->sc_iface_number[0] = id->bInterfaceNumber; /* initialize endpoints */ - uca.bulkin = uca.bulkout = -1; + ucaa.ucaa_bulkin = ucaa.ucaa_bulkout = -1; for (i = 0; i < id->bNumEndpoints; i++) { ed = usbd_interface2endpoint_descriptor(sc->sc_iface[0], i); @@ -248,12 +248,12 @@ ubsa_attach(device_t parent, device_t se sc->sc_isize = UGETW(ed->wMaxPacketSize); } else if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN && UE_GET_XFERTYPE(ed->bmAttributes) == UE_BULK) { - uca.bulkin = ed->bEndpointAddress; - uca.ibufsize = UGETW(ed->wMaxPacketSize); + ucaa.ucaa_bulkin = ed->bEndpointAddress; + ucaa.ucaa_ibufsize = UGETW(ed->wMaxPacketSize); } else if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_OUT && UE_GET_XFERTYPE(ed->bmAttributes) == UE_BULK) { - uca.bulkout = ed->bEndpointAddress; - uca.obufsize = UGETW(ed->wMaxPacketSize); + ucaa.ucaa_bulkout = ed->bEndpointAddress; + ucaa.ucaa_obufsize = UGETW(ed->wMaxPacketSize); } } /* end of Endpoint loop */ @@ -263,30 +263,30 @@ ubsa_attach(device_t parent, device_t se goto error; } - if (uca.bulkin == -1) { + if (ucaa.ucaa_bulkin == -1) { aprint_error_dev(self, "Could not find data bulk in\n"); sc->sc_dying = 1; goto error; } - if (uca.bulkout == -1) { + if (ucaa.ucaa_bulkout == -1) { aprint_error_dev(self, "Could not find data bulk out\n"); sc->sc_dying = 1; goto error; } - uca.portno = 0; + ucaa.ucaa_portno = 0; /* bulkin, bulkout set above */ - uca.ibufsizepad = uca.ibufsize; - uca.opkthdrlen = 0; - uca.device = dev; - uca.iface = sc->sc_iface[0]; - uca.methods = &ubsa_methods; - uca.arg = sc; - uca.info = NULL; + ucaa.ucaa_ibufsizepad = ucaa.ucaa_ibufsize; + ucaa.ucaa_opkthdrlen = 0; + ucaa.ucaa_device = dev; + ucaa.ucaa_iface = sc->sc_iface[0]; + ucaa.ucaa_methods = &ubsa_methods; + ucaa.ucaa_arg = sc; + ucaa.ucaa_info = NULL; DPRINTF(("ubsa: int#=%d, in = 0x%x, out = 0x%x, intr = 0x%x\n", - i, uca.bulkin, uca.bulkout, sc->sc_intr_number)); - sc->sc_subdevs[0] = config_found_sm_loc(self, "ucombus", NULL, &uca, + i, ucaa.ucaa_bulkin, ucaa.ucaa_bulkout, sc->sc_intr_number)); + sc->sc_subdevs[0] = config_found_sm_loc(self, "ucombus", NULL, &ucaa, ucomprint, ucomsubmatch); usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev, Index: src/sys/dev/usb/uchcom.c diff -u src/sys/dev/usb/uchcom.c:1.13.6.7 src/sys/dev/usb/uchcom.c:1.13.6.8 --- src/sys/dev/usb/uchcom.c:1.13.6.7 Sun Mar 20 09:15:07 2016 +++ src/sys/dev/usb/uchcom.c Sat Apr 16 13:22:00 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: uchcom.c,v 1.13.6.7 2016/03/20 09:15:07 skrll Exp $ */ +/* $NetBSD: uchcom.c,v 1.13.6.8 2016/04/16 13:22:00 skrll Exp $ */ /* * Copyright (c) 2007 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uchcom.c,v 1.13.6.7 2016/03/20 09:15:07 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uchcom.c,v 1.13.6.8 2016/04/16 13:22:00 skrll Exp $"); /* * driver for WinChipHead CH341/340, the worst USB-serial chip in the world. @@ -243,7 +243,7 @@ uchcom_attach(device_t parent, device_t struct usbd_device *dev = uaa->uaa_device; char *devinfop; struct uchcom_endpoints endpoints; - struct ucom_attach_args uca; + struct ucom_attach_args ucaa; aprint_naive("\n"); aprint_normal("\n"); @@ -282,23 +282,23 @@ uchcom_attach(device_t parent, device_t sc->sc_intr_size = endpoints.ep_intr_size; /* setup ucom layer */ - uca.portno = UCOM_UNK_PORTNO; - uca.bulkin = endpoints.ep_bulkin; - uca.bulkout = endpoints.ep_bulkout; - uca.ibufsize = UCHCOMIBUFSIZE; - uca.obufsize = UCHCOMOBUFSIZE; - uca.ibufsizepad = UCHCOMIBUFSIZE; - uca.opkthdrlen = 0; - uca.device = dev; - uca.iface = sc->sc_iface; - uca.methods = &uchcom_methods; - uca.arg = sc; - uca.info = NULL; + ucaa.ucaa_portno = UCOM_UNK_PORTNO; + ucaa.ucaa_bulkin = endpoints.ep_bulkin; + ucaa.ucaa_bulkout = endpoints.ep_bulkout; + ucaa.ucaa_ibufsize = UCHCOMIBUFSIZE; + ucaa.ucaa_obufsize = UCHCOMOBUFSIZE; + ucaa.ucaa_ibufsizepad = UCHCOMIBUFSIZE; + ucaa.ucaa_opkthdrlen = 0; + ucaa.ucaa_device = dev; + ucaa.ucaa_iface = sc->sc_iface; + ucaa.ucaa_methods = &uchcom_methods; + ucaa.ucaa_arg = sc; + ucaa.ucaa_info = NULL; usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev, sc->sc_dev); - sc->sc_subdev = config_found_sm_loc(self, "ucombus", NULL, &uca, + sc->sc_subdev = config_found_sm_loc(self, "ucombus", NULL, &ucaa, ucomprint, ucomsubmatch); return; Index: src/sys/dev/usb/ucom.c diff -u src/sys/dev/usb/ucom.c:1.108.2.12 src/sys/dev/usb/ucom.c:1.108.2.13 --- src/sys/dev/usb/ucom.c:1.108.2.12 Sat Feb 6 07:59:26 2016 +++ src/sys/dev/usb/ucom.c Sat Apr 16 13:22:00 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: ucom.c,v 1.108.2.12 2016/02/06 07:59:26 skrll Exp $ */ +/* $NetBSD: ucom.c,v 1.108.2.13 2016/04/16 13:22:00 skrll Exp $ */ /* * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ucom.c,v 1.108.2.12 2016/02/06 07:59:26 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ucom.c,v 1.108.2.13 2016/04/16 13:22:00 skrll Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -251,29 +251,30 @@ void ucom_attach(device_t parent, device_t self, void *aux) { struct ucom_softc *sc = device_private(self); - struct ucom_attach_args *uca = aux; + struct ucom_attach_args *ucaa = aux; struct tty *tp; UCOMHIST_FUNC(); UCOMHIST_CALLED(); - if (uca->info != NULL) - aprint_normal(": %s", uca->info); + if (ucaa->ucaa_info != NULL) + aprint_normal(": %s", ucaa->ucaa_info); aprint_normal("\n"); - prop_dictionary_set_int32(device_properties(self), "port", uca->portno); + prop_dictionary_set_int32(device_properties(self), "port", + ucaa->ucaa_portno); sc->sc_dev = self; - sc->sc_udev = uca->device; - sc->sc_iface = uca->iface; - sc->sc_bulkout_no = uca->bulkout; - sc->sc_bulkin_no = uca->bulkin; - sc->sc_ibufsize = uca->ibufsize; - sc->sc_ibufsizepad = uca->ibufsizepad; - sc->sc_obufsize = uca->obufsize; - sc->sc_opkthdrlen = uca->opkthdrlen; - sc->sc_methods = uca->methods; - sc->sc_parent = uca->arg; - sc->sc_portno = uca->portno; + sc->sc_udev = ucaa->ucaa_device; + sc->sc_iface = ucaa->ucaa_iface; + sc->sc_bulkout_no = ucaa->ucaa_bulkout; + sc->sc_bulkin_no = ucaa->ucaa_bulkin; + sc->sc_ibufsize = ucaa->ucaa_ibufsize; + sc->sc_ibufsizepad = ucaa->ucaa_ibufsizepad; + sc->sc_obufsize = ucaa->ucaa_obufsize; + sc->sc_opkthdrlen = ucaa->ucaa_opkthdrlen; + sc->sc_methods = ucaa->ucaa_methods; + sc->sc_parent = ucaa->ucaa_arg; + sc->sc_portno = ucaa->ucaa_portno; sc->sc_lsr = 0; sc->sc_msr = 0; @@ -1493,12 +1494,12 @@ ucom_cleanup(struct ucom_softc *sc) int ucomprint(void *aux, const char *pnp) { - struct ucom_attach_args *uca = aux; + struct ucom_attach_args *ucaa = aux; if (pnp) aprint_normal("ucom at %s", pnp); - if (uca->portno != UCOM_UNK_PORTNO) - aprint_normal(" portno %d", uca->portno); + if (ucaa->ucaa_portno != UCOM_UNK_PORTNO) + aprint_normal(" portno %d", ucaa->ucaa_portno); return UNCONF; } @@ -1506,11 +1507,11 @@ int ucomsubmatch(device_t parent, cfdata_t cf, const int *ldesc, void *aux) { - struct ucom_attach_args *uca = aux; + struct ucom_attach_args *ucaa = aux; - if (uca->portno != UCOM_UNK_PORTNO && + if (ucaa->ucaa_portno != UCOM_UNK_PORTNO && cf->cf_loc[UCOMBUSCF_PORTNO] != UCOMBUSCF_PORTNO_DEFAULT && - cf->cf_loc[UCOMBUSCF_PORTNO] != uca->portno) + cf->cf_loc[UCOMBUSCF_PORTNO] != ucaa->ucaa_portno) return 0; return config_match(parent, cf, aux); } Index: src/sys/dev/usb/ucomvar.h diff -u src/sys/dev/usb/ucomvar.h:1.20.24.3 src/sys/dev/usb/ucomvar.h:1.20.24.4 --- src/sys/dev/usb/ucomvar.h:1.20.24.3 Thu Mar 19 17:26:43 2015 +++ src/sys/dev/usb/ucomvar.h Sat Apr 16 13:22:00 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: ucomvar.h,v 1.20.24.3 2015/03/19 17:26:43 skrll Exp $ */ +/* $NetBSD: ucomvar.h,v 1.20.24.4 2016/04/16 13:22:00 skrll Exp $ */ /* * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -90,18 +90,18 @@ struct ucom_methods { #define UMSR_DCTS 0x01 /* CTS has changed state */ struct ucom_attach_args { - int portno; - int bulkin; - int bulkout; - u_int ibufsize; - u_int ibufsizepad; - u_int obufsize; - u_int opkthdrlen; - const char *info; /* attach message */ - struct usbd_device *device; - struct usbd_interface *iface; - const struct ucom_methods *methods; - void *arg; + int ucaa_portno; + int ucaa_bulkin; + int ucaa_bulkout; + u_int ucaa_ibufsize; + u_int ucaa_ibufsizepad; + u_int ucaa_obufsize; + u_int ucaa_opkthdrlen; + const char *ucaa_info; /* attach message */ + struct usbd_device *ucaa_device; + struct usbd_interface *ucaa_iface; + const struct ucom_methods *ucaa_methods; + void *ucaa_arg; }; int ucomprint(void *, const char *); Index: src/sys/dev/usb/uftdi.c diff -u src/sys/dev/usb/uftdi.c:1.59.6.8 src/sys/dev/usb/uftdi.c:1.59.6.9 --- src/sys/dev/usb/uftdi.c:1.59.6.8 Mon Apr 6 15:18:13 2015 +++ src/sys/dev/usb/uftdi.c Sat Apr 16 13:22:00 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: uftdi.c,v 1.59.6.8 2015/04/06 15:18:13 skrll Exp $ */ +/* $NetBSD: uftdi.c,v 1.59.6.9 2016/04/16 13:22:00 skrll Exp $ */ /* * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uftdi.c,v 1.59.6.8 2015/04/06 15:18:13 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uftdi.c,v 1.59.6.9 2016/04/16 13:22:00 skrll Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -207,7 +207,7 @@ uftdi_attach(device_t parent, device_t s const char *devname = device_xname(self); int i,idx; usbd_status err; - struct ucom_attach_args uca; + struct ucom_attach_args ucaa; DPRINTFN(10,("\nuftdi_attach: sc=%p\n", sc)); @@ -267,8 +267,8 @@ uftdi_attach(device_t parent, device_t s sc->sc_iface[idx] = iface; - uca.bulkin = uca.bulkout = -1; - uca.ibufsize = uca.obufsize = 0; + ucaa.ucaa_bulkin = ucaa.ucaa_bulkout = -1; + ucaa.ucaa_ibufsize = ucaa.ucaa_obufsize = 0; for (i = 0; i < id->bNumEndpoints; i++) { int addr, dir, attr; ed = usbd_interface2endpoint_descriptor(iface, i); @@ -283,56 +283,56 @@ uftdi_attach(device_t parent, device_t s dir = UE_GET_DIR(ed->bEndpointAddress); attr = ed->bmAttributes & UE_XFERTYPE; if (dir == UE_DIR_IN && attr == UE_BULK) { - uca.bulkin = addr; - uca.ibufsize = UGETW(ed->wMaxPacketSize); - if (uca.ibufsize >= UFTDI_MAX_IBUFSIZE) - uca.ibufsize = UFTDI_MAX_IBUFSIZE; + ucaa.ucaa_bulkin = addr; + ucaa.ucaa_ibufsize = UGETW(ed->wMaxPacketSize); + if (ucaa.ucaa_ibufsize >= UFTDI_MAX_IBUFSIZE) + ucaa.ucaa_ibufsize = UFTDI_MAX_IBUFSIZE; } else if (dir == UE_DIR_OUT && attr == UE_BULK) { - uca.bulkout = addr; - uca.obufsize = UGETW(ed->wMaxPacketSize) + ucaa.ucaa_bulkout = addr; + ucaa.ucaa_obufsize = UGETW(ed->wMaxPacketSize) - sc->sc_hdrlen; - if (uca.obufsize >= UFTDI_MAX_OBUFSIZE) - uca.obufsize = UFTDI_MAX_OBUFSIZE; + if (ucaa.ucaa_obufsize >= UFTDI_MAX_OBUFSIZE) + ucaa.ucaa_obufsize = UFTDI_MAX_OBUFSIZE; /* Limit length if we have a 6-bit header. */ if ((sc->sc_hdrlen > 0) && - (uca.obufsize > UFTDIOBUFSIZE)) - uca.obufsize = UFTDIOBUFSIZE; + (ucaa.ucaa_obufsize > UFTDIOBUFSIZE)) + ucaa.ucaa_obufsize = UFTDIOBUFSIZE; } else { aprint_error_dev(self, "unexpected endpoint\n"); goto bad; } } - if (uca.bulkin == -1) { + if (ucaa.ucaa_bulkin == -1) { aprint_error_dev(self, "Could not find data bulk in\n"); goto bad; } - if (uca.bulkout == -1) { + if (ucaa.ucaa_bulkout == -1) { aprint_error_dev(self, "Could not find data bulk out\n"); goto bad; } - uca.portno = FTDI_PIT_SIOA + idx; - /* bulkin, bulkout set above */ - if (uca.ibufsize == 0) - uca.ibufsize = UFTDIIBUFSIZE; - uca.ibufsizepad = uca.ibufsize; - if (uca.obufsize == 0) - uca.obufsize = UFTDIOBUFSIZE - sc->sc_hdrlen; - uca.opkthdrlen = sc->sc_hdrlen; - uca.device = dev; - uca.iface = iface; - uca.methods = &uftdi_methods; - uca.arg = sc; - uca.info = NULL; + ucaa.ucaa_portno = FTDI_PIT_SIOA + idx; + /* ucaa_bulkin, ucaa_bulkout set above */ + if (ucaa.ucaa_ibufsize == 0) + ucaa.ucaa_ibufsize = UFTDIIBUFSIZE; + ucaa.ucaa_ibufsizepad = ucaa.ucaa_ibufsize; + if (ucaa.ucaa_obufsize == 0) + ucaa.ucaa_obufsize = UFTDIOBUFSIZE - sc->sc_hdrlen; + ucaa.ucaa_opkthdrlen = sc->sc_hdrlen; + ucaa.ucaa_device = dev; + ucaa.ucaa_iface = iface; + ucaa.ucaa_methods = &uftdi_methods; + ucaa.ucaa_arg = sc; + ucaa.ucaa_info = NULL; DPRINTF(("uftdi: in=0x%x out=0x%x isize=0x%x osize=0x%x\n", - uca.bulkin, uca.bulkout, - uca.ibufsize, uca.obufsize)); + ucaa.ucaa_bulkin, ucaa.ucaa_bulkout, + ucaa.ucaa_ibufsize, ucaa.ucaa_obufsize)); sc->sc_subdev[idx] = config_found_sm_loc(self, "ucombus", NULL, - &uca, ucomprint, ucomsubmatch); + &ucaa, ucomprint, ucomsubmatch); } usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev, Index: src/sys/dev/usb/ugensa.c diff -u src/sys/dev/usb/ugensa.c:1.31.6.6 src/sys/dev/usb/ugensa.c:1.31.6.7 --- src/sys/dev/usb/ugensa.c:1.31.6.6 Sat Mar 21 11:33:37 2015 +++ src/sys/dev/usb/ugensa.c Sat Apr 16 13:22:00 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: ugensa.c,v 1.31.6.6 2015/03/21 11:33:37 skrll Exp $ */ +/* $NetBSD: ugensa.c,v 1.31.6.7 2016/04/16 13:22:00 skrll Exp $ */ /* * Copyright (c) 2004, 2005 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ugensa.c,v 1.31.6.6 2015/03/21 11:33:37 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ugensa.c,v 1.31.6.7 2016/04/16 13:22:00 skrll Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -146,7 +146,7 @@ ugensa_attach(device_t parent, device_t char *devinfop; const char *devname = device_xname(self); usbd_status err; - struct ucom_attach_args uca; + struct ucom_attach_args ucaa; int i; DPRINTFN(10,("\nugensa_attach: sc=%p\n", sc)); @@ -184,21 +184,21 @@ ugensa_attach(device_t parent, device_t sc->sc_udev = dev; sc->sc_iface = iface; - uca.info = "Generic Serial Device"; - uca.ibufsize = UGENSA_BUFSIZE; - uca.obufsize = UGENSA_BUFSIZE; - uca.ibufsizepad = UGENSA_BUFSIZE; - uca.portno = UCOM_UNK_PORTNO; - uca.opkthdrlen = 0; - uca.device = dev; - uca.iface = iface; - uca.methods = &ugensa_methods; - uca.arg = sc; + ucaa.ucaa_info = "Generic Serial Device"; + ucaa.ucaa_ibufsize = UGENSA_BUFSIZE; + ucaa.ucaa_obufsize = UGENSA_BUFSIZE; + ucaa.ucaa_ibufsizepad = UGENSA_BUFSIZE; + ucaa.ucaa_portno = UCOM_UNK_PORTNO; + ucaa.ucaa_opkthdrlen = 0; + ucaa.ucaa_device = dev; + ucaa.ucaa_iface = iface; + ucaa.ucaa_methods = &ugensa_methods; + ucaa.ucaa_arg = sc; usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev, sc->sc_dev); - uca.bulkin = uca.bulkout = -1; + ucaa.ucaa_bulkin = ucaa.ucaa_bulkout = -1; for (i = 0; i < id->bNumEndpoints; i++) { int addr, dir, attr; @@ -214,30 +214,31 @@ ugensa_attach(device_t parent, device_t dir = UE_GET_DIR(ed->bEndpointAddress); attr = ed->bmAttributes & UE_XFERTYPE; if (attr == UE_BULK) { - if (uca.bulkin == -1 && dir == UE_DIR_IN) { + if (ucaa.ucaa_bulkin == -1 && dir == UE_DIR_IN) { DPRINTF(("%s: Bulk in %d\n", devname, i)); - uca.bulkin = addr; + ucaa.ucaa_bulkin = addr; continue; } - if (uca.bulkout == -1 && dir == UE_DIR_OUT) { + if (ucaa.ucaa_bulkout == -1 && dir == UE_DIR_OUT) { DPRINTF(("%s: Bulk out %d\n", devname, i)); - uca.bulkout = addr; + ucaa.ucaa_bulkout = addr; continue; } } aprint_error_dev(self, "unexpected endpoint\n"); } - if (uca.bulkin == -1) { + if (ucaa.ucaa_bulkin == -1) { aprint_error_dev(self, "Could not find data bulk in\n"); goto bad; } - if (uca.bulkout == -1) { + if (ucaa.ucaa_bulkout == -1) { aprint_error_dev(self, "Could not find data bulk out\n"); goto bad; } - DPRINTF(("ugensa: in=0x%x out=0x%x\n", uca.bulkin, uca.bulkout)); - sc->sc_subdev = config_found_sm_loc(self, "ucombus", NULL, &uca, + DPRINTF(("ugensa: in=0x%x out=0x%x\n", ucaa.ucaa_bulkin, + ucaa.ucaa_bulkout)); + sc->sc_subdev = config_found_sm_loc(self, "ucombus", NULL, &ucaa, ucomprint, ucomsubmatch); if (!pmf_device_register(self, NULL, NULL)) Index: src/sys/dev/usb/uhmodem.c diff -u src/sys/dev/usb/uhmodem.c:1.13.24.7 src/sys/dev/usb/uhmodem.c:1.13.24.8 --- src/sys/dev/usb/uhmodem.c:1.13.24.7 Sat Mar 21 11:33:37 2015 +++ src/sys/dev/usb/uhmodem.c Sat Apr 16 13:22:00 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: uhmodem.c,v 1.13.24.7 2015/03/21 11:33:37 skrll Exp $ */ +/* $NetBSD: uhmodem.c,v 1.13.24.8 2016/04/16 13:22:00 skrll Exp $ */ /* * Copyright (c) 2008 Yojiro UO <y...@nui.org>. @@ -71,7 +71,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uhmodem.c,v 1.13.24.7 2015/03/21 11:33:37 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uhmodem.c,v 1.13.24.8 2016/04/16 13:22:00 skrll Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -198,7 +198,7 @@ uhmodem_attach(device_t parent, device_t usb_endpoint_descriptor_t *ed; char *devinfop; usbd_status err; - struct ucom_attach_args uca; + struct ucom_attach_args ucaa; int i; int j; char comname[16]; @@ -283,7 +283,7 @@ uhmodem_attach(device_t parent, device_t sc->sc_ubsa.sc_iface_number[i] = id->bInterfaceNumber; /* initialize endpoints */ - uca.bulkin = uca.bulkout = -1; + ucaa.ucaa_bulkin = ucaa.ucaa_bulkout = -1; for (j = 0; j < id->bNumEndpoints; j++) { ed = usbd_interface2endpoint_descriptor( @@ -301,10 +301,10 @@ uhmodem_attach(device_t parent, device_t sc->sc_ubsa.sc_isize = UGETW(ed->wMaxPacketSize); } else if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN && UE_GET_XFERTYPE(ed->bmAttributes) == UE_BULK) { - uca.bulkin = ed->bEndpointAddress; + ucaa.ucaa_bulkin = ed->bEndpointAddress; } else if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_OUT && UE_GET_XFERTYPE(ed->bmAttributes) == UE_BULK) { - uca.bulkout = ed->bEndpointAddress; + ucaa.ucaa_bulkout = ed->bEndpointAddress; } } /* end of Endpoint loop */ @@ -318,14 +318,14 @@ uhmodem_attach(device_t parent, device_t } else break; } - if (uca.bulkin == -1) { + if (ucaa.ucaa_bulkin == -1) { aprint_error_dev(self, "Could not find data bulk in\n"); sc->sc_ubsa.sc_dying = 1; goto error; } - if (uca.bulkout == -1) { + if (ucaa.ucaa_bulkout == -1) { aprint_error_dev(self, "Could not find data bulk out\n"); sc->sc_ubsa.sc_dying = 1; @@ -347,21 +347,22 @@ uhmodem_attach(device_t parent, device_t break; } - uca.portno = i; - /* bulkin, bulkout set above */ - uca.ibufsize = UHMODEMIBUFSIZE; - uca.obufsize = UHMODEMOBUFSIZE; - uca.ibufsizepad = UHMODEMIBUFSIZE; - uca.opkthdrlen = 0; - uca.device = dev; - uca.iface = sc->sc_ubsa.sc_iface[i]; - uca.methods = &uhmodem_methods; - uca.arg = &sc->sc_ubsa; - uca.info = comname; + ucaa.ucaa_portno = i; + /* ucaa_bulkin, ucaa_bulkout set above */ + ucaa.ucaa_ibufsize = UHMODEMIBUFSIZE; + ucaa.ucaa_obufsize = UHMODEMOBUFSIZE; + ucaa.ucaa_ibufsizepad = UHMODEMIBUFSIZE; + ucaa.ucaa_opkthdrlen = 0; + ucaa.ucaa_device = dev; + ucaa.ucaa_iface = sc->sc_ubsa.sc_iface[i]; + ucaa.ucaa_methods = &uhmodem_methods; + ucaa.ucaa_arg = &sc->sc_ubsa; + ucaa.ucaa_info = comname; DPRINTF(("uhmodem: int#=%d, in = 0x%x, out = 0x%x, intr = 0x%x\n", - i, uca.bulkin, uca.bulkout, sc->sc_ubsa.sc_intr_number)); + i, ucaa.ucaa_bulkin, ucaa.ucaa_bulkout, + sc->sc_ubsa.sc_intr_number)); sc->sc_ubsa.sc_subdevs[i] = config_found_sm_loc(self, "ucombus", NULL, - &uca, ucomprint, ucomsubmatch); + &ucaa, ucomprint, ucomsubmatch); /* issue endpoint halt to each interface */ err = uhmodem_endpointhalt(&sc->sc_ubsa, i); Index: src/sys/dev/usb/uipaq.c diff -u src/sys/dev/usb/uipaq.c:1.19.14.6 src/sys/dev/usb/uipaq.c:1.19.14.7 --- src/sys/dev/usb/uipaq.c:1.19.14.6 Sat Mar 21 11:33:37 2015 +++ src/sys/dev/usb/uipaq.c Sat Apr 16 13:22:00 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: uipaq.c,v 1.19.14.6 2015/03/21 11:33:37 skrll Exp $ */ +/* $NetBSD: uipaq.c,v 1.19.14.7 2016/04/16 13:22:00 skrll Exp $ */ /* $OpenBSD: uipaq.c,v 1.1 2005/06/17 23:50:33 deraadt Exp $ */ /* @@ -42,7 +42,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uipaq.c,v 1.19.14.6 2015/03/21 11:33:37 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uipaq.c,v 1.19.14.7 2016/04/16 13:22:00 skrll Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -161,7 +161,7 @@ uipaq_attach(device_t parent, device_t s const char *devname = device_xname(self); int i; usbd_status err; - struct ucom_attach_args uca; + struct ucom_attach_args ucaa; DPRINTFN(10,("\nuipaq_attach: sc=%p\n", sc)); @@ -196,16 +196,16 @@ uipaq_attach(device_t parent, device_t s sc->sc_udev = dev; sc->sc_iface = iface; - uca.ibufsize = UIPAQIBUFSIZE; - uca.obufsize = UIPAQOBUFSIZE; - uca.ibufsizepad = UIPAQIBUFSIZE; - uca.opkthdrlen = 0; - uca.device = dev; - uca.iface = iface; - uca.methods = &uipaq_methods; - uca.arg = sc; - uca.portno = UCOM_UNK_PORTNO; - uca.info = "Generic"; + ucaa.ucaa_ibufsize = UIPAQIBUFSIZE; + ucaa.ucaa_obufsize = UIPAQOBUFSIZE; + ucaa.ucaa_ibufsizepad = UIPAQIBUFSIZE; + ucaa.ucaa_opkthdrlen = 0; + ucaa.ucaa_device = dev; + ucaa.ucaa_iface = iface; + ucaa.ucaa_methods = &uipaq_methods; + ucaa.ucaa_arg = sc; + ucaa.ucaa_portno = UCOM_UNK_PORTNO; + ucaa.ucaa_info = "Generic"; /* err = uipaq_init(sc); if (err) { @@ -217,7 +217,7 @@ uipaq_attach(device_t parent, device_t s usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev, sc->sc_dev); - uca.bulkin = uca.bulkout = -1; + ucaa.ucaa_bulkin = ucaa.ucaa_bulkout = -1; for (i=0; i<id->bNumEndpoints; i++) { ed = usbd_interface2endpoint_descriptor(iface, i); if (ed == NULL) { @@ -227,19 +227,19 @@ uipaq_attach(device_t parent, device_t s } if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN && (ed->bmAttributes & UE_XFERTYPE) == UE_BULK) { - uca.bulkin = ed->bEndpointAddress; + ucaa.ucaa_bulkin = ed->bEndpointAddress; } else if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_OUT && (ed->bmAttributes & UE_XFERTYPE) == UE_BULK) { - uca.bulkout = ed->bEndpointAddress; + ucaa.ucaa_bulkout = ed->bEndpointAddress; } } - if (uca.bulkin == -1 || uca.bulkout == -1) { + if (ucaa.ucaa_bulkin == -1 || ucaa.ucaa_bulkout == -1) { aprint_error_dev(self, "no proper endpoints found (%d,%d) \n", - uca.bulkin, uca.bulkout); + ucaa.ucaa_bulkin, ucaa.ucaa_bulkout); return; } - sc->sc_subdev = config_found_sm_loc(self, "ucombus", NULL, &uca, + sc->sc_subdev = config_found_sm_loc(self, "ucombus", NULL, &ucaa, ucomprint, ucomsubmatch); return; Index: src/sys/dev/usb/ukyopon.c diff -u src/sys/dev/usb/ukyopon.c:1.16.16.5 src/sys/dev/usb/ukyopon.c:1.16.16.6 --- src/sys/dev/usb/ukyopon.c:1.16.16.5 Tue Sep 29 11:38:29 2015 +++ src/sys/dev/usb/ukyopon.c Sat Apr 16 13:22:00 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: ukyopon.c,v 1.16.16.5 2015/09/29 11:38:29 skrll Exp $ */ +/* $NetBSD: ukyopon.c,v 1.16.16.6 2016/04/16 13:22:00 skrll Exp $ */ /* * Copyright (c) 1998, 2005 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ukyopon.c,v 1.16.16.5 2015/09/29 11:38:29 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ukyopon.c,v 1.16.16.6 2016/04/16 13:22:00 skrll Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -122,15 +122,15 @@ ukyopon_attach(device_t parent, device_t { struct ukyopon_softc *sc = device_private(self); struct usbif_attach_arg *uiaa = aux; - struct ucom_attach_args uca; + struct ucom_attach_args ucaa; - uca.portno = (uiaa->uiaa_ifaceno == UKYOPON_MODEM_IFACE_INDEX) ? + ucaa.ucaa_portno = (uiaa->uiaa_ifaceno == UKYOPON_MODEM_IFACE_INDEX) ? UKYOPON_PORT_MODEM : UKYOPON_PORT_DATA; - uca.methods = &ukyopon_methods; - uca.info = (uiaa->uiaa_ifaceno == UKYOPON_MODEM_IFACE_INDEX) ? + ucaa.ucaa_methods = &ukyopon_methods; + ucaa.ucaa_info = (uiaa->uiaa_ifaceno == UKYOPON_MODEM_IFACE_INDEX) ? "modem port" : "data transfer port"; - if (umodem_common_attach(self, &sc->sc_umodem, uiaa, &uca)) + if (umodem_common_attach(self, &sc->sc_umodem, uiaa, &ucaa)) return; return; } Index: src/sys/dev/usb/umcs.c diff -u src/sys/dev/usb/umcs.c:1.8.2.5 src/sys/dev/usb/umcs.c:1.8.2.6 --- src/sys/dev/usb/umcs.c:1.8.2.5 Tue Sep 29 11:38:29 2015 +++ src/sys/dev/usb/umcs.c Sat Apr 16 13:22:00 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: umcs.c,v 1.8.2.5 2015/09/29 11:38:29 skrll Exp $ */ +/* $NetBSD: umcs.c,v 1.8.2.6 2016/04/16 13:22:00 skrll Exp $ */ /* $FreeBSD: head/sys/dev/usb/serial/umcs.c 260559 2014-01-12 11:44:28Z hselasky $ */ /*- @@ -41,7 +41,7 @@ * */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: umcs.c,v 1.8.2.5 2015/09/29 11:38:29 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: umcs.c,v 1.8.2.6 2016/04/16 13:22:00 skrll Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -187,7 +187,7 @@ umcs7840_attach(device_t parent, device_ usb_interface_descriptor_t *id; usb_endpoint_descriptor_t *ed; char *devinfop; - struct ucom_attach_args uca; + struct ucom_attach_args ucaa; int error, i, intr_addr; uint8_t data; @@ -285,18 +285,18 @@ umcs7840_attach(device_t parent, device_ usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev, sc->sc_dev); - memset(&uca, 0, sizeof(uca)); - uca.ibufsize = 256; - uca.obufsize = 256; - uca.ibufsizepad = 256; - uca.opkthdrlen = 0; - uca.device = sc->sc_udev; - uca.iface = sc->sc_iface; - uca.methods = &umcs7840_methods; - uca.arg = sc; + memset(&ucaa, 0, sizeof(ucaa)); + ucaa.ucaa_ibufsize = 256; + ucaa.ucaa_obufsize = 256; + ucaa.ucaa_ibufsizepad = 256; + ucaa.ucaa_opkthdrlen = 0; + ucaa.ucaa_device = sc->sc_udev; + ucaa.ucaa_iface = sc->sc_iface; + ucaa.ucaa_methods = &umcs7840_methods; + ucaa.ucaa_arg = sc; for (i = 0; i < sc->sc_numports; i++) { - uca.bulkin = uca.bulkout = -1; + ucaa.ucaa_bulkin = ucaa.ucaa_bulkout = -1; /* * On four port cards, endpoints are 0/1 for first, @@ -313,7 +313,7 @@ umcs7840_attach(device_t parent, device_ "no bulk in endpoint found for %d\n", i); return; } - uca.bulkin = ed->bEndpointAddress; + ucaa.ucaa_bulkin = ed->bEndpointAddress; ed = usbd_interface2endpoint_descriptor(sc->sc_iface, phyport*2 + 1); @@ -322,14 +322,14 @@ umcs7840_attach(device_t parent, device_ "no bulk out endpoint found for %d\n", i); return; } - uca.bulkout = ed->bEndpointAddress; - uca.portno = i; + ucaa.ucaa_bulkout = ed->bEndpointAddress; + ucaa.ucaa_portno = i; DPRINTF(("port %d physical port %d bulk-in %d bulk-out %d\n", - i, phyport, uca.bulkin, uca.bulkout)); + i, phyport, ucaa.ucaa_bulkin, ucaa.ucaa_bulkout)); sc->sc_ports[i].sc_port_phys = phyport; sc->sc_ports[i].sc_port_ucom = - config_found_sm_loc(self, "ucombus", NULL, &uca, + config_found_sm_loc(self, "ucombus", NULL, &ucaa, ucomprint, ucomsubmatch); } } Index: src/sys/dev/usb/umct.c diff -u src/sys/dev/usb/umct.c:1.32.24.10 src/sys/dev/usb/umct.c:1.32.24.11 --- src/sys/dev/usb/umct.c:1.32.24.10 Sun Dec 27 12:09:59 2015 +++ src/sys/dev/usb/umct.c Sat Apr 16 13:22:00 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: umct.c,v 1.32.24.10 2015/12/27 12:09:59 skrll Exp $ */ +/* $NetBSD: umct.c,v 1.32.24.11 2016/04/16 13:22:00 skrll Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. * All rights reserved. @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: umct.c,v 1.32.24.10 2015/12/27 12:09:59 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: umct.c,v 1.32.24.11 2016/04/16 13:22:00 skrll Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -177,7 +177,7 @@ umct_attach(device_t parent, device_t se char *devinfop; usbd_status err; int i; - struct ucom_attach_args uca; + struct ucom_attach_args ucaa; sc->sc_dev = self; @@ -194,7 +194,7 @@ umct_attach(device_t parent, device_t se DPRINTF(("\n\numct attach: sc=%p\n", sc)); /* initialize endpoints */ - uca.bulkin = uca.bulkout = -1; + ucaa.ucaa_bulkin = ucaa.ucaa_bulkout = -1; sc->sc_intr_number = -1; sc->sc_intr_pipe = NULL; @@ -249,10 +249,10 @@ umct_attach(device_t parent, device_t se if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN && UE_GET_XFERTYPE(ed->bmAttributes) == UE_INTERRUPT && UGETW(ed->wMaxPacketSize) != 0x2) { - uca.bulkin = ed->bEndpointAddress; + ucaa.ucaa_bulkin = ed->bEndpointAddress; } else if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_OUT && UE_GET_XFERTYPE(ed->bmAttributes) == UE_BULK) { - uca.bulkout = ed->bEndpointAddress; + ucaa.ucaa_bulkout = ed->bEndpointAddress; } else if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN && UE_GET_XFERTYPE(ed->bmAttributes) == UE_INTERRUPT) { sc->sc_intr_number = ed->bEndpointAddress; @@ -260,13 +260,13 @@ umct_attach(device_t parent, device_t se } } - if (uca.bulkin == -1) { + if (ucaa.ucaa_bulkin == -1) { aprint_error_dev(self, "Could not find data bulk in\n"); sc->sc_dying = 1; return; } - if (uca.bulkout == -1) { + if (ucaa.ucaa_bulkout == -1) { aprint_error_dev(self, "Could not find data bulk out\n"); sc->sc_dying = 1; return; @@ -279,20 +279,20 @@ umct_attach(device_t parent, device_t se } sc->sc_dtr = sc->sc_rts = 0; - uca.portno = UCOM_UNK_PORTNO; - /* bulkin, bulkout set above */ - uca.ibufsize = UMCTIBUFSIZE; + ucaa.ucaa_portno = UCOM_UNK_PORTNO; + /* ucaa_bulkin, ucaa_bulkout set above */ + ucaa.ucaa_ibufsize = UMCTIBUFSIZE; if (sc->sc_product == USB_PRODUCT_MCT_SITECOM_USB232) - uca.obufsize = 16; /* device is broken */ + ucaa.ucaa_obufsize = 16; /* device is broken */ else - uca.obufsize = UMCTOBUFSIZE; - uca.ibufsizepad = UMCTIBUFSIZE; - uca.opkthdrlen = 0; - uca.device = dev; - uca.iface = sc->sc_iface; - uca.methods = &umct_methods; - uca.arg = sc; - uca.info = NULL; + ucaa.ucaa_obufsize = UMCTOBUFSIZE; + ucaa.ucaa_ibufsizepad = UMCTIBUFSIZE; + ucaa.ucaa_opkthdrlen = 0; + ucaa.ucaa_device = dev; + ucaa.ucaa_iface = sc->sc_iface; + ucaa.ucaa_methods = &umct_methods; + ucaa.ucaa_arg = sc; + ucaa.ucaa_info = NULL; umct_init(sc); @@ -300,8 +300,8 @@ umct_attach(device_t parent, device_t se sc->sc_dev); DPRINTF(("umct: in=0x%x out=0x%x intr=0x%x\n", - uca.bulkin, uca.bulkout, sc->sc_intr_number )); - sc->sc_subdev = config_found_sm_loc(self, "ucombus", NULL, &uca, + ucaa.ucaa_bulkin, ucaa.ucaa_bulkout, sc->sc_intr_number )); + sc->sc_subdev = config_found_sm_loc(self, "ucombus", NULL, &ucaa, ucomprint, ucomsubmatch); return; Index: src/sys/dev/usb/umodem.c diff -u src/sys/dev/usb/umodem.c:1.66.4.5 src/sys/dev/usb/umodem.c:1.66.4.6 --- src/sys/dev/usb/umodem.c:1.66.4.5 Tue Sep 22 12:06:01 2015 +++ src/sys/dev/usb/umodem.c Sat Apr 16 13:22:00 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: umodem.c,v 1.66.4.5 2015/09/22 12:06:01 skrll Exp $ */ +/* $NetBSD: umodem.c,v 1.66.4.6 2016/04/16 13:22:00 skrll Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -44,7 +44,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: umodem.c,v 1.66.4.5 2015/09/22 12:06:01 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: umodem.c,v 1.66.4.6 2016/04/16 13:22:00 skrll Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -115,16 +115,16 @@ umodem_attach(device_t parent, device_t { struct umodem_softc *sc = device_private(self); struct usbif_attach_arg *uiaa = aux; - struct ucom_attach_args uca; + struct ucom_attach_args ucaa; - uca.portno = UCOM_UNK_PORTNO; - uca.methods = &umodem_methods; - uca.info = NULL; + ucaa.ucaa_portno = UCOM_UNK_PORTNO; + ucaa.ucaa_methods = &umodem_methods; + ucaa.ucaa_info = NULL; if (!pmf_device_register(self, NULL, NULL)) aprint_error_dev(self, "couldn't establish power handler"); - if (umodem_common_attach(self, sc, uiaa, &uca)) + if (umodem_common_attach(self, sc, uiaa, &ucaa)) return; return; } Index: src/sys/dev/usb/umodem_common.c diff -u src/sys/dev/usb/umodem_common.c:1.22.38.5 src/sys/dev/usb/umodem_common.c:1.22.38.6 --- src/sys/dev/usb/umodem_common.c:1.22.38.5 Sat Mar 21 11:33:37 2015 +++ src/sys/dev/usb/umodem_common.c Sat Apr 16 13:22:00 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: umodem_common.c,v 1.22.38.5 2015/03/21 11:33:37 skrll Exp $ */ +/* $NetBSD: umodem_common.c,v 1.22.38.6 2016/04/16 13:22:00 skrll Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -44,7 +44,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: umodem_common.c,v 1.22.38.5 2015/03/21 11:33:37 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: umodem_common.c,v 1.22.38.6 2016/04/16 13:22:00 skrll Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -103,7 +103,7 @@ Static void umodem_intr(struct usbd_xfer int umodem_common_attach(device_t self, struct umodem_softc *sc, - struct usbif_attach_arg *uiaa, struct ucom_attach_args *uca) + struct usbif_attach_arg *uiaa, struct ucom_attach_args *ucaa) { struct usbd_device *dev = uiaa->uiaa_device; usb_interface_descriptor_t *id; @@ -161,7 +161,7 @@ umodem_common_attach(device_t self, stru * Find the bulk endpoints. * Iterate over all endpoints in the data interface and take note. */ - uca->bulkin = uca->bulkout = -1; + ucaa->ucaa_bulkin = ucaa->ucaa_bulkout = -1; id = usbd_get_interface_descriptor(sc->sc_data_iface); for (i = 0; i < id->bNumEndpoints; i++) { @@ -173,18 +173,18 @@ umodem_common_attach(device_t self, stru } if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN && (ed->bmAttributes & UE_XFERTYPE) == UE_BULK) { - uca->bulkin = ed->bEndpointAddress; + ucaa->ucaa_bulkin = ed->bEndpointAddress; } else if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_OUT && (ed->bmAttributes & UE_XFERTYPE) == UE_BULK) { - uca->bulkout = ed->bEndpointAddress; + ucaa->ucaa_bulkout = ed->bEndpointAddress; } } - if (uca->bulkin == -1) { + if (ucaa->ucaa_bulkin == -1) { aprint_error_dev(self, "Could not find data bulk in\n"); goto bad; } - if (uca->bulkout == -1) { + if (ucaa->ucaa_bulkout == -1) { aprint_error_dev(self, "Could not find data bulk out\n"); goto bad; } @@ -234,20 +234,20 @@ umodem_common_attach(device_t self, stru sc->sc_dtr = -1; - /* bulkin, bulkout set above */ - uca->ibufsize = UMODEMIBUFSIZE; - uca->obufsize = UMODEMOBUFSIZE; - uca->ibufsizepad = UMODEMIBUFSIZE; - uca->opkthdrlen = 0; - uca->device = sc->sc_udev; - uca->iface = sc->sc_data_iface; - uca->arg = sc; + /* ucaa_bulkin, ucaa_bulkout set above */ + ucaa->ucaa_ibufsize = UMODEMIBUFSIZE; + ucaa->ucaa_obufsize = UMODEMOBUFSIZE; + ucaa->ucaa_ibufsizepad = UMODEMIBUFSIZE; + ucaa->ucaa_opkthdrlen = 0; + ucaa->ucaa_device = sc->sc_udev; + ucaa->ucaa_iface = sc->sc_data_iface; + ucaa->ucaa_arg = sc; usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev, sc->sc_dev); DPRINTF(("umodem_common_attach: sc=%p\n", sc)); - sc->sc_subdev = config_found_sm_loc(self, "ucombus", NULL, uca, + sc->sc_subdev = config_found_sm_loc(self, "ucombus", NULL, ucaa, ucomprint, ucomsubmatch); return 0; Index: src/sys/dev/usb/uplcom.c diff -u src/sys/dev/usb/uplcom.c:1.74.4.10 src/sys/dev/usb/uplcom.c:1.74.4.11 --- src/sys/dev/usb/uplcom.c:1.74.4.10 Sun Dec 27 12:09:59 2015 +++ src/sys/dev/usb/uplcom.c Sat Apr 16 13:22:00 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: uplcom.c,v 1.74.4.10 2015/12/27 12:09:59 skrll Exp $ */ +/* $NetBSD: uplcom.c,v 1.74.4.11 2016/04/16 13:22:00 skrll Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. * All rights reserved. @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uplcom.c,v 1.74.4.10 2015/12/27 12:09:59 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uplcom.c,v 1.74.4.11 2016/04/16 13:22:00 skrll Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -228,7 +228,7 @@ uplcom_attach(device_t parent, device_t const char *devname = device_xname(self); usbd_status err; int i; - struct ucom_attach_args uca; + struct ucom_attach_args ucaa; sc->sc_dev = self; @@ -244,7 +244,7 @@ uplcom_attach(device_t parent, device_t DPRINTF(("\n\nuplcom attach: sc=%p\n", sc)); /* initialize endpoints */ - uca.bulkin = uca.bulkout = -1; + ucaa.ucaa_bulkin = ucaa.ucaa_bulkout = -1; sc->sc_intr_number = -1; sc->sc_intr_pipe = NULL; @@ -370,37 +370,37 @@ uplcom_attach(device_t parent, device_t if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN && UE_GET_XFERTYPE(ed->bmAttributes) == UE_BULK) { - uca.bulkin = ed->bEndpointAddress; + ucaa.ucaa_bulkin = ed->bEndpointAddress; } else if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_OUT && UE_GET_XFERTYPE(ed->bmAttributes) == UE_BULK) { - uca.bulkout = ed->bEndpointAddress; + ucaa.ucaa_bulkout = ed->bEndpointAddress; } } - if (uca.bulkin == -1) { + if (ucaa.ucaa_bulkin == -1) { aprint_error_dev(self, "Could not find data bulk in\n"); sc->sc_dying = 1; return; } - if (uca.bulkout == -1) { + if (ucaa.ucaa_bulkout == -1) { aprint_error_dev(self, "Could not find data bulk out\n"); sc->sc_dying = 1; return; } sc->sc_dtr = sc->sc_rts = -1; - uca.portno = UCOM_UNK_PORTNO; - /* bulkin, bulkout set above */ - uca.ibufsize = UPLCOMIBUFSIZE; - uca.obufsize = UPLCOMOBUFSIZE; - uca.ibufsizepad = UPLCOMIBUFSIZE; - uca.opkthdrlen = 0; - uca.device = dev; - uca.iface = sc->sc_iface; - uca.methods = &uplcom_methods; - uca.arg = sc; - uca.info = NULL; + ucaa.ucaa_portno = UCOM_UNK_PORTNO; + /* ucaa_bulkin, ucaa_bulkout set above */ + ucaa.ucaa_ibufsize = UPLCOMIBUFSIZE; + ucaa.ucaa_obufsize = UPLCOMOBUFSIZE; + ucaa.ucaa_ibufsizepad = UPLCOMIBUFSIZE; + ucaa.ucaa_opkthdrlen = 0; + ucaa.ucaa_device = dev; + ucaa.ucaa_iface = sc->sc_iface; + ucaa.ucaa_methods = &uplcom_methods; + ucaa.ucaa_arg = sc; + ucaa.ucaa_info = NULL; err = uplcom_reset(sc); @@ -414,8 +414,8 @@ uplcom_attach(device_t parent, device_t sc->sc_dev); DPRINTF(("uplcom: in=0x%x out=0x%x intr=0x%x\n", - uca.bulkin, uca.bulkout, sc->sc_intr_number )); - sc->sc_subdev = config_found_sm_loc(self, "ucombus", NULL, &uca, + ucaa.ucaa_bulkin, ucaa.ucaa_bulkout, sc->sc_intr_number )); + sc->sc_subdev = config_found_sm_loc(self, "ucombus", NULL, &ucaa, ucomprint, ucomsubmatch); if (!pmf_device_register(self, NULL, NULL)) Index: src/sys/dev/usb/usbdi.c diff -u src/sys/dev/usb/usbdi.c:1.162.2.45 src/sys/dev/usb/usbdi.c:1.162.2.46 --- src/sys/dev/usb/usbdi.c:1.162.2.45 Fri Mar 25 08:32:57 2016 +++ src/sys/dev/usb/usbdi.c Sat Apr 16 13:22:00 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: usbdi.c,v 1.162.2.45 2016/03/25 08:32:57 skrll Exp $ */ +/* $NetBSD: usbdi.c,v 1.162.2.46 2016/04/16 13:22:00 skrll Exp $ */ /* * Copyright (c) 1998, 2012, 2015 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.162.2.45 2016/03/25 08:32:57 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.162.2.46 2016/04/16 13:22:00 skrll Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -540,7 +540,8 @@ usbd_create_xfer(struct usbd_pipe *pipe, return 0; } -void usbd_destroy_xfer(struct usbd_xfer *xfer) +void +usbd_destroy_xfer(struct usbd_xfer *xfer) { if (xfer->ux_methods->upm_fini) { Index: src/sys/dev/usb/uslsa.c diff -u src/sys/dev/usb/uslsa.c:1.19.6.3 src/sys/dev/usb/uslsa.c:1.19.6.4 --- src/sys/dev/usb/uslsa.c:1.19.6.3 Sat Mar 21 11:33:37 2015 +++ src/sys/dev/usb/uslsa.c Sat Apr 16 13:22:00 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: uslsa.c,v 1.19.6.3 2015/03/21 11:33:37 skrll Exp $ */ +/* $NetBSD: uslsa.c,v 1.19.6.4 2016/04/16 13:22:00 skrll Exp $ */ /* from ugensa.c */ @@ -58,7 +58,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uslsa.c,v 1.19.6.3 2015/03/21 11:33:37 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uslsa.c,v 1.19.6.4 2016/04/16 13:22:00 skrll Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -171,7 +171,7 @@ uslsa_attach(device_t parent, device_t s const usb_interface_descriptor_t *id; const usb_endpoint_descriptor_t *ed; char *devinfop; - struct ucom_attach_args uca; + struct ucom_attach_args ucaa; int i; sc = device_private(self); @@ -191,21 +191,21 @@ uslsa_attach(device_t parent, device_t s sc->sc_ifnum = id->bInterfaceNumber; - uca.info = "Silicon Labs CP210x"; - uca.portno = UCOM_UNK_PORTNO; - uca.ibufsize = USLSA_BUFSIZE; - uca.obufsize = USLSA_BUFSIZE; - uca.ibufsizepad = USLSA_BUFSIZE; - uca.opkthdrlen = 0; - uca.device = sc->sc_udev; - uca.iface = sc->sc_iface; - uca.methods = &uslsa_methods; - uca.arg = sc; + ucaa.ucaa_info = "Silicon Labs CP210x"; + ucaa.ucaa_portno = UCOM_UNK_PORTNO; + ucaa.ucaa_ibufsize = USLSA_BUFSIZE; + ucaa.ucaa_obufsize = USLSA_BUFSIZE; + ucaa.ucaa_ibufsizepad = USLSA_BUFSIZE; + ucaa.ucaa_opkthdrlen = 0; + ucaa.ucaa_device = sc->sc_udev; + ucaa.ucaa_iface = sc->sc_iface; + ucaa.ucaa_methods = &uslsa_methods; + ucaa.ucaa_arg = sc; usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev, sc->sc_dev); - uca.bulkin = uca.bulkout = -1; + ucaa.ucaa_bulkin = ucaa.ucaa_bulkout = -1; for (i = 0; i < id->bNumEndpoints; i++) { int addr, dir, attr; @@ -220,22 +220,22 @@ uslsa_attach(device_t parent, device_t s dir = UE_GET_DIR(ed->bEndpointAddress); attr = ed->bmAttributes & UE_XFERTYPE; if (dir == UE_DIR_IN && attr == UE_BULK) { - uca.bulkin = addr; + ucaa.ucaa_bulkin = addr; } else if (dir == UE_DIR_OUT && attr == UE_BULK) { - uca.bulkout = addr; + ucaa.ucaa_bulkout = addr; } else { aprint_error_dev(self, "unexpected endpoint\n"); } } aprint_debug_dev(sc->sc_dev, "EPs: in=%#x out=%#x\n", - uca.bulkin, uca.bulkout); - if ((uca.bulkin == -1) || (uca.bulkout == -1)) { + ucaa.ucaa_bulkin, ucaa.ucaa_bulkout); + if ((ucaa.ucaa_bulkin == -1) || (ucaa.ucaa_bulkout == -1)) { aprint_error_dev(self, "could not find endpoints\n"); sc->sc_dying = true; return; } - sc->sc_subdev = config_found_sm_loc(self, "ucombus", NULL, &uca, + sc->sc_subdev = config_found_sm_loc(self, "ucombus", NULL, &ucaa, ucomprint, ucomsubmatch); return; Index: src/sys/dev/usb/uvisor.c diff -u src/sys/dev/usb/uvisor.c:1.45.24.6 src/sys/dev/usb/uvisor.c:1.45.24.7 --- src/sys/dev/usb/uvisor.c:1.45.24.6 Tue Sep 29 11:38:29 2015 +++ src/sys/dev/usb/uvisor.c Sat Apr 16 13:22:00 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: uvisor.c,v 1.45.24.6 2015/09/29 11:38:29 skrll Exp $ */ +/* $NetBSD: uvisor.c,v 1.45.24.7 2016/04/16 13:22:00 skrll Exp $ */ /* * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uvisor.c,v 1.45.24.6 2015/09/29 11:38:29 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvisor.c,v 1.45.24.7 2016/04/16 13:22:00 skrll Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -225,7 +225,7 @@ uvisor_attach(device_t parent, device_t const char *devname = device_xname(self); int i, j, hasin, hasout, port; usbd_status err; - struct ucom_attach_args uca; + struct ucom_attach_args ucaa; DPRINTFN(10,("\nuvisor_attach: sc=%p\n", sc)); @@ -266,14 +266,14 @@ uvisor_attach(device_t parent, device_t sc->sc_udev = dev; sc->sc_iface = iface; - uca.ibufsize = UVISORIBUFSIZE; - uca.obufsize = UVISOROBUFSIZE; - uca.ibufsizepad = UVISORIBUFSIZE; - uca.opkthdrlen = 0; - uca.device = dev; - uca.iface = iface; - uca.methods = &uvisor_methods; - uca.arg = sc; + ucaa.ucaa_ibufsize = UVISORIBUFSIZE; + ucaa.ucaa_obufsize = UVISOROBUFSIZE; + ucaa.ucaa_ibufsizepad = UVISORIBUFSIZE; + ucaa.ucaa_opkthdrlen = 0; + ucaa.ucaa_device = dev; + ucaa.ucaa_iface = iface; + ucaa.ucaa_methods = &uvisor_methods; + ucaa.ucaa_arg = sc; err = uvisor_init(sc, &coninfo, &palmconinfo); if (err) { @@ -293,25 +293,25 @@ uvisor_attach(device_t parent, device_t for (i = 0; i < sc->sc_numcon; ++i) { switch (coninfo.connections[i].port_function_id) { case UVISOR_FUNCTION_GENERIC: - uca.info = "Generic"; + ucaa.ucaa_info = "Generic"; break; case UVISOR_FUNCTION_DEBUGGER: - uca.info = "Debugger"; + ucaa.ucaa_info = "Debugger"; break; case UVISOR_FUNCTION_HOTSYNC: - uca.info = "HotSync"; + ucaa.ucaa_info = "HotSync"; break; case UVISOR_FUNCTION_REMOTE_FILE_SYS: - uca.info = "Remote File System"; + ucaa.ucaa_info = "Remote File System"; break; default: - uca.info = "unknown"; + ucaa.ucaa_info = "unknown"; break; } port = coninfo.connections[i].port; - uca.portno = port; - uca.bulkin = port | UE_DIR_IN; - uca.bulkout = port | UE_DIR_OUT; + ucaa.ucaa_portno = port; + ucaa.ucaa_bulkin = port | UE_DIR_IN; + ucaa.ucaa_bulkout = port | UE_DIR_OUT; /* Verify that endpoints exist. */ hasin = 0; hasout = 0; @@ -330,7 +330,7 @@ uvisor_attach(device_t parent, device_t } if (hasin == 1 && hasout == 1) sc->sc_subdevs[i] = config_found_sm_loc(self, - "ucombus", NULL, &uca, + "ucombus", NULL, &ucaa, ucomprint, ucomsubmatch); else aprint_error_dev(self, @@ -348,21 +348,21 @@ uvisor_attach(device_t parent, device_t /* * XXX this should copy out 4-char string from the * XXX port_function_id, but where would the string go? - * XXX uca.info is a const char *, not an array. + * XXX ucaa.ucaa_info is a const char *, not an array. */ - uca.info = "sync"; - uca.portno = i; + ucaa.ucaa_info = "sync"; + ucaa.ucaa_portno = i; if (palmconinfo.endpoint_numbers_different) { port = palmconinfo.connections[i].end_point_info; - uca.bulkin = (port >> 4) | UE_DIR_IN; - uca.bulkout = (port & 0xf) | UE_DIR_OUT; + ucaa.ucaa_bulkin = (port >> 4) | UE_DIR_IN; + ucaa.ucaa_bulkout = (port & 0xf) | UE_DIR_OUT; } else { port = palmconinfo.connections[i].port; - uca.bulkin = port | UE_DIR_IN; - uca.bulkout = port | UE_DIR_OUT; + ucaa.ucaa_bulkin = port | UE_DIR_IN; + ucaa.ucaa_bulkout = port | UE_DIR_OUT; } sc->sc_subdevs[i] = config_found_sm_loc(self, "ucombus", - NULL, &uca, ucomprint, ucomsubmatch); + NULL, &ucaa, ucomprint, ucomsubmatch); } Index: src/sys/dev/usb/uvscom.c diff -u src/sys/dev/usb/uvscom.c:1.28.16.6 src/sys/dev/usb/uvscom.c:1.28.16.7 --- src/sys/dev/usb/uvscom.c:1.28.16.6 Sat Mar 21 11:33:37 2015 +++ src/sys/dev/usb/uvscom.c Sat Apr 16 13:22:00 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: uvscom.c,v 1.28.16.6 2015/03/21 11:33:37 skrll Exp $ */ +/* $NetBSD: uvscom.c,v 1.28.16.7 2016/04/16 13:22:00 skrll Exp $ */ /*- * Copyright (c) 2001-2002, Shunsuke Akiyama <akiy...@jp.freebsd.org>. * All rights reserved. @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uvscom.c,v 1.28.16.6 2015/03/21 11:33:37 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvscom.c,v 1.28.16.7 2016/04/16 13:22:00 skrll Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -239,7 +239,7 @@ uvscom_attach(device_t parent, device_t char *devinfop; usbd_status err; int i; - struct ucom_attach_args uca; + struct ucom_attach_args ucaa; aprint_naive("\n"); aprint_normal("\n"); @@ -254,7 +254,7 @@ uvscom_attach(device_t parent, device_t DPRINTF(("uvscom attach: sc = %p\n", sc)); /* initialize endpoints */ - uca.bulkin = uca.bulkout = -1; + ucaa.ucaa_bulkin = ucaa.ucaa_bulkout = -1; sc->sc_intr_number = -1; sc->sc_intr_pipe = NULL; @@ -302,10 +302,10 @@ uvscom_attach(device_t parent, device_t if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN && UE_GET_XFERTYPE(ed->bmAttributes) == UE_BULK) { - uca.bulkin = ed->bEndpointAddress; + ucaa.ucaa_bulkin = ed->bEndpointAddress; } else if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_OUT && UE_GET_XFERTYPE(ed->bmAttributes) == UE_BULK) { - uca.bulkout = ed->bEndpointAddress; + ucaa.ucaa_bulkout = ed->bEndpointAddress; } else if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN && UE_GET_XFERTYPE(ed->bmAttributes) == UE_INTERRUPT) { sc->sc_intr_number = ed->bEndpointAddress; @@ -313,12 +313,12 @@ uvscom_attach(device_t parent, device_t } } - if (uca.bulkin == -1) { + if (ucaa.ucaa_bulkin == -1) { aprint_error_dev(self, "Could not find data bulk in\n"); sc->sc_dying = 1; return; } - if (uca.bulkout == -1) { + if (ucaa.ucaa_bulkout == -1) { aprint_error_dev(self, "Could not find data bulk out\n"); sc->sc_dying = 1; return; @@ -332,17 +332,17 @@ uvscom_attach(device_t parent, device_t sc->sc_dtr = sc->sc_rts = 0; sc->sc_lcr = UVSCOM_LINE_INIT; - uca.portno = UCOM_UNK_PORTNO; - /* bulkin, bulkout set above */ - uca.ibufsize = UVSCOMIBUFSIZE; - uca.obufsize = UVSCOMOBUFSIZE; - uca.ibufsizepad = UVSCOMIBUFSIZE; - uca.opkthdrlen = 0; - uca.device = dev; - uca.iface = sc->sc_iface; - uca.methods = &uvscom_methods; - uca.arg = sc; - uca.info = NULL; + ucaa.ucaa_portno = UCOM_UNK_PORTNO; + /* ucaa_bulkin, ucaa_bulkout set above */ + ucaa.ucaa_ibufsize = UVSCOMIBUFSIZE; + ucaa.ucaa_obufsize = UVSCOMOBUFSIZE; + ucaa.ucaa_ibufsizepad = UVSCOMIBUFSIZE; + ucaa.ucaa_opkthdrlen = 0; + ucaa.ucaa_device = dev; + ucaa.ucaa_iface = sc->sc_iface; + ucaa.ucaa_methods = &uvscom_methods; + ucaa.ucaa_arg = sc; + ucaa.ucaa_info = NULL; err = uvscom_reset(sc); @@ -353,14 +353,14 @@ uvscom_attach(device_t parent, device_t } DPRINTF(("uvscom: in = 0x%x out = 0x%x intr = 0x%x\n", - uca.bulkin, uca.bulkout, sc->sc_intr_number)); + ucaa.ucaa_bulkin, ucaa.ucaa_bulkout, sc->sc_intr_number)); usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev, sc->sc_dev); DPRINTF(("uplcom: in=0x%x out=0x%x intr=0x%x\n", - uca.bulkin, uca.bulkout, sc->sc_intr_number )); - sc->sc_subdev = config_found_sm_loc(self, "ucombus", NULL, &uca, + ucaa.ucaa_bulkin, ucaa.ucaa_bulkout, sc->sc_intr_number )); + sc->sc_subdev = config_found_sm_loc(self, "ucombus", NULL, &ucaa, ucomprint, ucomsubmatch); return;