#include <bus/u4b/quirk/usb_quirk.h>

#include <bus/u4b/serial/usb_serial.h>

#ifdef USB_DEBUG
static int umodem_debug = 0;

static SYSCTL_NODE(_hw_usb, OID_AUTO, umodem, CTLFLAG_RW, 0, "USB umodem");
SYSCTL_INT(_hw_usb_umodem, OID_AUTO, debug, CTLFLAG_RW,
    &umodem_debug, 0, "Debug level");
#endif

static const STRUCT_USB_HOST_ID umodem_devs[] = {
	/* Generic Modem class match */
	{USB_IFACE_CLASS(UICLASS_CDC),
		USB_IFACE_SUBCLASS(UISUBCLASS_ABSTRACT_CONTROL_MODEL),
		USB_IFACE_PROTOCOL(UIPROTO_CDC_AT)},
	/* Huawei Modem class match */
	{USB_IFACE_CLASS(UICLASS_CDC),
		USB_IFACE_SUBCLASS(UISUBCLASS_ABSTRACT_CONTROL_MODEL),
		USB_IFACE_PROTOCOL(0xFF)},
	/* Kyocera AH-K3001V */
	{USB_VPI(USB_VENDOR_KYOCERA, USB_PRODUCT_KYOCERA_AHK3001V, 1)},
	{USB_VPI(USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_MC5720, 1)},
	{USB_VPI(USB_VENDOR_CURITEL, USB_PRODUCT_CURITEL_PC5740, 1)},
};

/*
 * As speeds for umodem deivces increase, these numbers will need to
 * be increased. They should be good for G3 speeds and below.
 *
Exemple #2
0
	    IPHETH_USBINTF_CLASS, IPHETH_USBINTF_SUBCLASS,
	    IPHETH_USBINTF_PROTO)},
	{IPHETH_ID(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_IPHONE_4,
	    IPHETH_USBINTF_CLASS, IPHETH_USBINTF_SUBCLASS,
	    IPHETH_USBINTF_PROTO)},
	{IPHETH_ID(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_IPHONE_4S,
	    IPHETH_USBINTF_CLASS, IPHETH_USBINTF_SUBCLASS,
	    IPHETH_USBINTF_PROTO)},
	{IPHETH_ID(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_IPHONE_5,
	    IPHETH_USBINTF_CLASS, IPHETH_USBINTF_SUBCLASS,
	    IPHETH_USBINTF_PROTO)},
#else
	/* product agnostic interface match */
	{USB_VENDOR(USB_VENDOR_APPLE),
	 USB_IFACE_CLASS(IPHETH_USBINTF_CLASS),
	 USB_IFACE_SUBCLASS(IPHETH_USBINTF_SUBCLASS),
	 USB_IFACE_PROTOCOL(IPHETH_USBINTF_PROTO)},
#endif
};

DRIVER_MODULE(ipheth, uhub, ipheth_driver, ipheth_devclass, NULL, 0);
MODULE_VERSION(ipheth, 1);
MODULE_DEPEND(ipheth, uether, 1, 1, 1);
MODULE_DEPEND(ipheth, usb, 1, 1, 1);
MODULE_DEPEND(ipheth, ether, 1, 1, 1);
USB_PNP_HOST_INFO(ipheth_devs);

static const struct usb_ether_methods ipheth_ue_methods = {
	.ue_attach_post = ipheth_attach_post,
	.ue_start = ipheth_start,
	.ue_init = ipheth_init,
Exemple #3
0
		*(int *)addr = 0;	/* XXX: we only support reportid 0? */
		break;

	default:
		error = EINVAL;
		break;
	}
	return (error);
}

static const STRUCT_USB_HOST_ID uhid_devs[] = {
	/* generic HID class */
	{USB_IFACE_CLASS(UICLASS_HID),},
	/* the Xbox 360 gamepad doesn't use the HID class */
	{USB_IFACE_CLASS(UICLASS_VENDOR),
	 USB_IFACE_SUBCLASS(UISUBCLASS_XBOX360_CONTROLLER),
	 USB_IFACE_PROTOCOL(UIPROTO_XBOX360_GAMEPAD),},
};

static int
uhid_probe(device_t dev)
{
	struct usb_attach_arg *uaa = device_get_ivars(dev);
	int error;

	DPRINTFN(11, "\n");

	if (uaa->usb_mode != USB_MODE_HOST)
		return (ENXIO);

	error = usbd_lookup_id_by_uaa(uhid_devs, sizeof(uhid_devs), uaa);
Exemple #4
0
	{ USB_VPI(0x0489, 0xe056, 0), USB_DEV_BCD_LTEQ(1) },

	/* Atheros AR5BBU12 with sflash firmware */
	{ USB_VPI(0x0489, 0xe02c, 0), USB_DEV_BCD_LTEQ(1) },

	/* Atheros AR5BBU12 with sflash firmware */
	{ USB_VPI(0x0489, 0xe03c, 0), USB_DEV_BCD_LTEQ(1) },
	{ USB_VPI(0x0489, 0xe036, 0), USB_DEV_BCD_LTEQ(1) },
};

/* List of supported bluetooth devices */
static const STRUCT_USB_HOST_ID ubt_devs[] =
{
	/* Generic Bluetooth class devices */
	{ USB_IFACE_CLASS(UDCLASS_WIRELESS),
	  USB_IFACE_SUBCLASS(UDSUBCLASS_RF),
	  USB_IFACE_PROTOCOL(UDPROTO_BLUETOOTH) },

	/* AVM USB Bluetooth-Adapter BlueFritz! v2.0 */
	{ USB_VPI(USB_VENDOR_AVM, 0x3800, 0) },

	/* Broadcom USB dongles, mostly BCM20702 and BCM20702A0 */
	{ USB_VENDOR(USB_VENDOR_BROADCOM),
	  USB_IFACE_CLASS(UICLASS_VENDOR),
	  USB_IFACE_SUBCLASS(UDSUBCLASS_RF),
	  USB_IFACE_PROTOCOL(UDPROTO_BLUETOOTH) },

	/* Apple-specific (Broadcom) devices */
	{ USB_VENDOR(USB_VENDOR_APPLE),
	  USB_IFACE_CLASS(UICLASS_VENDOR),
	  USB_IFACE_SUBCLASS(UDSUBCLASS_RF),
Exemple #5
0
	{USB_VPI(USB_VENDOR_ACERLABS, USB_PRODUCT_ACERLABS_M5632, CDCE_FLAG_NO_UNION)},
	{USB_VPI(USB_VENDOR_AMBIT, USB_PRODUCT_AMBIT_NTL_250, CDCE_FLAG_NO_UNION)},
	{USB_VPI(USB_VENDOR_COMPAQ, USB_PRODUCT_COMPAQ_IPAQLINUX, CDCE_FLAG_NO_UNION)},
	{USB_VPI(USB_VENDOR_GMATE, USB_PRODUCT_GMATE_YP3X00, CDCE_FLAG_NO_UNION)},
	{USB_VPI(USB_VENDOR_MOTOROLA2, USB_PRODUCT_MOTOROLA2_USBLAN, CDCE_FLAG_ZAURUS | CDCE_FLAG_NO_UNION)},
	{USB_VPI(USB_VENDOR_MOTOROLA2, USB_PRODUCT_MOTOROLA2_USBLAN2, CDCE_FLAG_ZAURUS | CDCE_FLAG_NO_UNION)},
	{USB_VPI(USB_VENDOR_NETCHIP, USB_PRODUCT_NETCHIP_ETHERNETGADGET, CDCE_FLAG_NO_UNION)},
	{USB_VPI(USB_VENDOR_PROLIFIC, USB_PRODUCT_PROLIFIC_PL2501, CDCE_FLAG_NO_UNION)},
	{USB_VPI(USB_VENDOR_SHARP, USB_PRODUCT_SHARP_SL5500, CDCE_FLAG_ZAURUS)},
	{USB_VPI(USB_VENDOR_SHARP, USB_PRODUCT_SHARP_SL5600, CDCE_FLAG_ZAURUS | CDCE_FLAG_NO_UNION)},
	{USB_VPI(USB_VENDOR_SHARP, USB_PRODUCT_SHARP_SLA300, CDCE_FLAG_ZAURUS | CDCE_FLAG_NO_UNION)},
	{USB_VPI(USB_VENDOR_SHARP, USB_PRODUCT_SHARP_SLC700, CDCE_FLAG_ZAURUS | CDCE_FLAG_NO_UNION)},
	{USB_VPI(USB_VENDOR_SHARP, USB_PRODUCT_SHARP_SLC750, CDCE_FLAG_ZAURUS | CDCE_FLAG_NO_UNION)},

	{USB_VENDOR(USB_VENDOR_HUAWEI), USB_IFACE_CLASS(UICLASS_VENDOR),
		USB_IFACE_SUBCLASS(0x02), USB_IFACE_PROTOCOL(0x16),
		USB_DRIVER_INFO(0)},
	{USB_VENDOR(USB_VENDOR_HUAWEI), USB_IFACE_CLASS(UICLASS_VENDOR),
		USB_IFACE_SUBCLASS(0x02), USB_IFACE_PROTOCOL(0x46),
		USB_DRIVER_INFO(0)},
	{USB_VENDOR(USB_VENDOR_HUAWEI), USB_IFACE_CLASS(UICLASS_VENDOR),
		USB_IFACE_SUBCLASS(0x02), USB_IFACE_PROTOCOL(0x76),
		USB_DRIVER_INFO(0)},
};

static const STRUCT_USB_DUAL_ID cdce_dual_devs[] = {
	{USB_IF_CSI(UICLASS_CDC, UISUBCLASS_ETHERNET_NETWORKING_CONTROL_MODEL, 0)},
	{USB_IF_CSI(UICLASS_CDC, UISUBCLASS_MOBILE_DIRECT_LINE_MODEL, 0)},
	{USB_IF_CSI(UICLASS_CDC, UISUBCLASS_NETWORK_CONTROL_MODEL, 0)},
};