uca.bulkin_no, uca.bulkout_no, sc->sc_intr_number));
uca.bulkin, uca.bulkout, sc->sc_intr_number));
USB_ATTACH(ubsa){	USB_ATTACH_START(ubsa, sc, uaa);	usbd_device_handle dev = uaa->device;	usb_config_descriptor_t *cdesc;	usb_interface_descriptor_t *id;	usb_endpoint_descriptor_t *ed;	char devinfo[1024];	const char *devname = USBDEVNAME(sc->sc_dev);	usbd_status err;	struct ucom_attach_args uca;	int i;        usbd_devinfo(dev, 0, devinfo, sizeof devinfo);        USB_ATTACH_SETUP;        printf("%s: %s\n", devname, devinfo);        sc->sc_udev = dev;	/*	 * initialize rts, dtr variables to something	 * different from boolean 0, 1	 */	sc->sc_dtr = -1;	sc->sc_rts = -1;	DPRINTF(("ubsa attach: sc = %p\n", sc));	/* initialize endpoints */	uca.bulkin = uca.bulkout = -1;	sc->sc_intr_number = -1;	sc->sc_intr_pipe = NULL;	/* Move the device into the configured state. */	err = usbd_set_config_index(dev, UBSA_CONFIG_INDEX, 1);	if (err) {		printf("%s: failed to set configuration: %s\n",		    devname, usbd_errstr(err));		sc->sc_dying = 1;		goto error;	}	/* get the config descriptor */	cdesc = usbd_get_config_descriptor(sc->sc_udev);	if (cdesc == NULL) {		printf("%s: failed to get configuration descriptor\n",		    devname);		sc->sc_dying = 1;		goto error;	}	/* get the first interface */	err = usbd_device2interface_handle(dev, UBSA_IFACE_INDEX,	    &sc->sc_iface);	if (err) {		printf("%s: failed to get interface: %s\n",			devname, usbd_errstr(err));		sc->sc_dying = 1;		goto error;	}	/* Find the endpoints */	id = usbd_get_interface_descriptor(sc->sc_iface);	sc->sc_iface_number = id->bInterfaceNumber;	for (i = 0; i < id->bNumEndpoints; i++) {		ed = usbd_interface2endpoint_descriptor(sc->sc_iface, i);		if (ed == NULL) {			printf("%s: no endpoint descriptor for %d\n",			    USBDEVNAME(sc->sc_dev), i);			sc->sc_dying = 1;			goto error;		}		if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN &&		    UE_GET_XFERTYPE(ed->bmAttributes) == UE_INTERRUPT) {			sc->sc_intr_number = ed->bEndpointAddress;			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);		} 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);		}	}	if (sc->sc_intr_number == -1) {		printf("%s: Could not find interrupt in\n", devname);		sc->sc_dying = 1;		goto error;	}	/* keep interface for interrupt */	sc->sc_intr_iface = sc->sc_iface;	if (uca.bulkin == -1) {		printf("%s: Could not find data bulk in\n", devname);		sc->sc_dying = 1;		goto error;	}	if (uca.bulkout == -1) {		printf("%s: Could not find data bulk out\n", devname);		sc->sc_dying = 1;		goto error;	}	uca.portno = UCOM_UNK_PORTNO;	/* bulkin, bulkout set above */	uca.ibufsizepad = uca.ibufsize;	uca.opkthdrlen = 0;	uca.device = dev;	uca.iface = sc->sc_iface;	uca.methods = &ubsa_methods;	uca.arg = sc;	uca.info = NULL;	usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev,			   USBDEV(sc->sc_dev));	DPRINTF(("ubsa: in = 0x%x, out = 0x%x, intr = 0x%x\n",	    uca.bulkin_no, uca.bulkout_no, sc->sc_intr_number));	sc->sc_subdev = config_found_sm(self, &uca, ucomprint, ucomsubmatch);	USB_ATTACH_SUCCESS_RETURN;error:	USB_ATTACH_ERROR_RETURN;}