Exemple #1
0
	if (!dev) {
		dev_err(&intf->dev, "Disconnect (nodata)\n");
		return;
	}

	for (i = 0; i < GS_MAX_INTF; i++)
		if (dev->canch[i])
			gs_destroy_candev(dev->canch[i]);

	usb_kill_anchored_urbs(&dev->rx_submitted);
	kfree(dev);
}

static const struct usb_device_id gs_usb_table[] = {
	{ USB_DEVICE_INTERFACE_NUMBER(USB_GSUSB_1_VENDOR_ID,
				      USB_GSUSB_1_PRODUCT_ID, 0) },
	{ USB_DEVICE_INTERFACE_NUMBER(USB_CANDLELIGHT_VENDOR_ID,
				      USB_CANDLELIGHT_PRODUCT_ID, 0) },
	{} /* Terminating entry */
};

MODULE_DEVICE_TABLE(usb, gs_usb_table);

static struct usb_driver gs_usb_driver = {
	.name       = "gs_usb",
	.probe      = gs_usb_probe,
	.disconnect = gs_usb_disconnect,
	.id_table   = gs_usb_table,
};

module_usb_driver(gs_usb_driver);
Exemple #2
0
	.data          = 0,
};

static struct driver_info rmnet_usb_info = {
	.description   = "RmNET net device",
	.flags         = FLAG_SEND_ZLP,
	.bind          = rmnet_usb_bind,
	.tx_fixup      = rmnet_usb_tx_fixup,
	.rx_fixup      = rmnet_usb_rx_fixup,
	.rx_complete   = rmnet_usb_rx_complete,
	.manage_power  = rmnet_usb_manage_power,
	.data          = 1,
};

static const struct usb_device_id vidpids[] = {
	{ USB_DEVICE_INTERFACE_NUMBER(0x05c6, 0x9034, 4),
	.driver_info = (unsigned long)&rmnet_info,
	},
	{ USB_DEVICE_INTERFACE_NUMBER(0x05c6, 0x9034, 5),
	.driver_info = (unsigned long)&rmnet_info,
	},
	{ USB_DEVICE_INTERFACE_NUMBER(0x05c6, 0x9034, 6),
	.driver_info = (unsigned long)&rmnet_info,
	},
	{ USB_DEVICE_INTERFACE_NUMBER(0x05c6, 0x9034, 7),
	.driver_info = (unsigned long)&rmnet_info,
	},
	{ USB_DEVICE_INTERFACE_NUMBER(0x05c6, 0x9048, 5),
	.driver_info = (unsigned long)&rmnet_info,
	},
	{ USB_DEVICE_INTERFACE_NUMBER(0x05c6, 0x9048, 6),
// ASUS_BSP+++ Wenli "tty device for AT command"
#ifndef DISABLE_ASUS_DUN
	if (dev->id == DUN_DATA_ID) {
		s_is_bridge_init = false;
		pr_info("%s: gdun disconnect\n", __func__);
	}
#endif
// ASUS_BSP--- Wenli "tty device for AT command"
	usb_put_dev(dev->udev);

	clear_bit(CLAIMED, &dev->flags);
}

/*driver info stores data/ctrl bridge name used to match bridge xport name*/
static const struct usb_device_id bridge_ids[] = {
	{ USB_DEVICE_INTERFACE_NUMBER(0x5c6, 0x9001, 2),
	.driver_info = (unsigned long)serial_hsic_bridge_names,
	},
	{ USB_DEVICE_INTERFACE_NUMBER(0x5c6, 0x9001, 3),
	.driver_info = (unsigned long)rmnet_hsic_bridge_names,
	},
	{ USB_DEVICE_INTERFACE_NUMBER(0x5c6, 0x9034, 2),
	.driver_info = (unsigned long)serial_hsic_bridge_names,
	},
	{ USB_DEVICE_INTERFACE_NUMBER(0x5c6, 0x9034, 3),
	.driver_info = (unsigned long)rmnet_hsic_bridge_names,
	},
	{ USB_DEVICE_INTERFACE_NUMBER(0x5c6, 0x9048, 3),
	.driver_info = (unsigned long)serial_hsic_bridge_names,
	},
	{ USB_DEVICE_INTERFACE_NUMBER(0x5c6, 0x9048, 4),
Exemple #4
0
	{USB_DEVICE(0x1199, 0x68a8)},	/* Sierra Wireless QDL */
	{USB_DEVICE(0x1199, 0x68a9)},	/* Sierra Wireless Modem */
	{USB_DEVICE(0x1199, 0x9010)},	/* Sierra Wireless Gobi 3000 QDL */
	{USB_DEVICE(0x1199, 0x9012)},	/* Sierra Wireless Gobi 3000 QDL */
	{USB_DEVICE(0x1199, 0x9013)},	/* Sierra Wireless Gobi 3000 Modem device (MC8355) */
	{USB_DEVICE(0x1199, 0x9014)},	/* Sierra Wireless Gobi 3000 QDL */
	{USB_DEVICE(0x1199, 0x9015)},	/* Sierra Wireless Gobi 3000 Modem device */
	{USB_DEVICE(0x1199, 0x9018)},	/* Sierra Wireless Gobi 3000 QDL */
	{USB_DEVICE(0x1199, 0x9019)},	/* Sierra Wireless Gobi 3000 Modem device */
	{USB_DEVICE(0x1199, 0x901b)},	/* Sierra Wireless MC7770 */
	{USB_DEVICE(0x12D1, 0x14F0)},	/* Sony Gobi 3000 QDL */
	{USB_DEVICE(0x12D1, 0x14F1)},	/* Sony Gobi 3000 Composite */
	{USB_DEVICE(0x0AF0, 0x8120)},	/* Option GTM681W */

	/* non Gobi Qualcomm serial devices */
	{USB_DEVICE_INTERFACE_NUMBER(0x0f3d, 0x68a2, 0)},	/* Sierra Wireless MC7700 Device Management */
	{USB_DEVICE_INTERFACE_NUMBER(0x0f3d, 0x68a2, 2)},	/* Sierra Wireless MC7700 NMEA */
	{USB_DEVICE_INTERFACE_NUMBER(0x0f3d, 0x68a2, 3)},	/* Sierra Wireless MC7700 Modem */
	{USB_DEVICE_INTERFACE_NUMBER(0x114f, 0x68a2, 0)},	/* Sierra Wireless MC7750 Device Management */
	{USB_DEVICE_INTERFACE_NUMBER(0x114f, 0x68a2, 2)},	/* Sierra Wireless MC7750 NMEA */
	{USB_DEVICE_INTERFACE_NUMBER(0x114f, 0x68a2, 3)},	/* Sierra Wireless MC7750 Modem */
	{USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x68a2, 0)},	/* Sierra Wireless MC7710 Device Management */
	{USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x68a2, 2)},	/* Sierra Wireless MC7710 NMEA */
	{USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x68a2, 3)},	/* Sierra Wireless MC7710 Modem */
	{USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x901c, 0)},	/* Sierra Wireless EM7700 Device Management */
	{USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x901c, 2)},	/* Sierra Wireless EM7700 NMEA */
	{USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x901c, 3)},	/* Sierra Wireless EM7700 Modem */
	{USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x9051, 0)},	/* Netgear AirCard 340U Device Management */
	{USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x9051, 2)},	/* Netgear AirCard 340U NMEA */
	{USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x9051, 3)},	/* Netgear AirCard 340U Modem */
Exemple #5
0
    {USB_DEVICE(0x1199, 0x68a8)},	/* Sierra Wireless QDL */
    {USB_DEVICE(0x1199, 0x68a9)},	/* Sierra Wireless Modem */
    {USB_DEVICE(0x1199, 0x9010)},	/* Sierra Wireless Gobi 3000 QDL */
    {USB_DEVICE(0x1199, 0x9012)},	/* Sierra Wireless Gobi 3000 QDL */
    {USB_DEVICE(0x1199, 0x9013)},	/* Sierra Wireless Gobi 3000 Modem device (MC8355) */
    {USB_DEVICE(0x1199, 0x9014)},	/* Sierra Wireless Gobi 3000 QDL */
    {USB_DEVICE(0x1199, 0x9015)},	/* Sierra Wireless Gobi 3000 Modem device */
    {USB_DEVICE(0x1199, 0x9018)},	/* Sierra Wireless Gobi 3000 QDL */
    {USB_DEVICE(0x1199, 0x9019)},	/* Sierra Wireless Gobi 3000 Modem device */
    {USB_DEVICE(0x1199, 0x901b)},	/* Sierra Wireless MC7770 */
    {USB_DEVICE(0x12D1, 0x14F0)},	/* Sony Gobi 3000 QDL */
    {USB_DEVICE(0x12D1, 0x14F1)},	/* Sony Gobi 3000 Composite */
    {USB_DEVICE(0x0AF0, 0x8120)},	/* Option GTM681W */

    /* non Gobi Qualcomm serial devices */
    {USB_DEVICE_INTERFACE_NUMBER(0x0f3d, 0x68a2, 0)},	/* Sierra Wireless MC7700 Device Management */
    {USB_DEVICE_INTERFACE_NUMBER(0x0f3d, 0x68a2, 2)},	/* Sierra Wireless MC7700 NMEA */
    {USB_DEVICE_INTERFACE_NUMBER(0x0f3d, 0x68a2, 3)},	/* Sierra Wireless MC7700 Modem */
    {USB_DEVICE_INTERFACE_NUMBER(0x114f, 0x68a2, 0)},	/* Sierra Wireless MC7750 Device Management */
    {USB_DEVICE_INTERFACE_NUMBER(0x114f, 0x68a2, 2)},	/* Sierra Wireless MC7750 NMEA */
    {USB_DEVICE_INTERFACE_NUMBER(0x114f, 0x68a2, 3)},	/* Sierra Wireless MC7750 Modem */
    {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x68a2, 0)},	/* Sierra Wireless MC7710 Device Management */
    {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x68a2, 2)},	/* Sierra Wireless MC7710 NMEA */
    {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x68a2, 3)},	/* Sierra Wireless MC7710 Modem */
    {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x68c0, 0)},	/* Sierra Wireless MC73xx Device Management */
    {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x68c0, 2)},	/* Sierra Wireless MC73xx NMEA */
    {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x68c0, 3)},	/* Sierra Wireless MC73xx Modem */
    {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x901c, 0)},	/* Sierra Wireless EM7700 Device Management */
    {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x901c, 2)},	/* Sierra Wireless EM7700 NMEA */
    {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x901c, 3)},	/* Sierra Wireless EM7700 Modem */
    {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x901f, 0)},	/* Sierra Wireless EM7355 Device Management */
	mutex_destroy(&dev->open_mutex);
	mutex_destroy(&dev->read_mutex);
	mutex_destroy(&dev->write_mutex);
	usb_free_urb(dev->writeurb);
	kfree(dev->out_ctlreq);
	usb_free_urb(dev->readurb);
	kfree(dev->in_ctlreq);
	kfree(dev->intbuf);
	usb_free_urb(dev->inturb);
	usb_put_dev(dev->udev);
	kfree(dev);
	__ipc_bridge_dev = NULL;
}

static const struct usb_device_id ipc_bridge_ids[] = {
	{ USB_DEVICE_INTERFACE_NUMBER(0x5c6, 0x908A, 7) },
	{ USB_DEVICE_INTERFACE_NUMBER(0x5c6, 0x908E, 9) },
	{ USB_DEVICE_INTERFACE_NUMBER(0x5c6, 0x909D, 5) },
	{ USB_DEVICE_INTERFACE_NUMBER(0x5c6, 0x909E, 7) },
	{ USB_DEVICE_INTERFACE_NUMBER(0x5c6, 0x90A0, 7) },
	{ USB_DEVICE_INTERFACE_NUMBER(0x5c6, 0x90A4, 9) },

	{} /* terminating entry */
};
MODULE_DEVICE_TABLE(usb, ipc_bridge_ids);

static struct usb_driver ipc_bridge_driver = {
	.name = "ipc_bridge",
	.probe = ipc_bridge_probe,
	.disconnect = ipc_bridge_disconnect,
	.suspend = ipc_bridge_suspend,
static int debug;
module_param(debug, int, S_IRUGO | S_IWUSR);

struct csvt_ctrl_dev {
	struct mutex		dev_lock;

	/* input control lines (DSR, CTS, CD, RI) */
	unsigned int		cbits_tolocal;

	/* output control lines (DTR, RTS) */
	unsigned int		cbits_tomdm;
};

static const struct usb_device_id id_table[] = {
	{ USB_DEVICE_INTERFACE_NUMBER(0x05c6 , 0x904c, 4)},
	{ USB_DEVICE_INTERFACE_NUMBER(0x05c6 , 0x9075, 4)},
	{ USB_DEVICE_INTERFACE_NUMBER(0x05c6 , 0x908A, 4)},
	{ USB_DEVICE_INTERFACE_NUMBER(0x05c6 , 0x908E, 6)},
	{ USB_DEVICE_INTERFACE_NUMBER(0x05c6 , 0x909C, 4)},
	{ USB_DEVICE_INTERFACE_NUMBER(0x05c6 , 0x909D, 4)},
	{ USB_DEVICE_INTERFACE_NUMBER(0x05c6 , 0x909E, 6)},
	{ USB_DEVICE_INTERFACE_NUMBER(0x05c6 , 0x909F, 4)},
	{ USB_DEVICE_INTERFACE_NUMBER(0x05c6 , 0x90A0, 4)},
	{ USB_DEVICE_INTERFACE_NUMBER(0x05c6 , 0x90A4, 6)},

	{}, /* terminating entry */
};
MODULE_DEVICE_TABLE(usb, id_table);

static int csvt_probe(struct usb_serial *serial, const struct usb_device_id *id)