Ejemplo n.º 1
0
static int
usbser_keyspan_attach(dev_info_t *dip, ddi_attach_cmd_t cmd)
{
	int	rval;

	/*
	 * Once the device is plugged, we need set its cfg. And need download
	 * firmware for some of them.
	 */
	rval = keyspan_pre_attach(dip, cmd, usbser_keyspan_statep);

	/*
	 * After the cfg is set, and the firmware is downloaded,
	 * do the real attach.
	 */
	if (rval == DDI_ECONTEXT) {

		return (usbser_attach(dip, cmd, usbser_keyspan_statep,
		    &ds_ops));
	} else {

		return (rval);
	}
}
Ejemplo n.º 2
0
static int
usbser_pl2303_attach(dev_info_t *dip, ddi_attach_cmd_t cmd)
{
	return (usbser_attach(dip, cmd, usbser_pl2303_statep, &pl2303_ds_ops));
}