From 663802c7e7d92bbcdadcbc8537385fc23d109e95 Mon Sep 17 00:00:00 2001 From: Antti Palosaari Date: Mon, 7 Jan 2013 16:29:13 -0300 Subject: [PATCH] --- yaml --- r: 366671 b: refs/heads/master c: e8c7aab50ddcb84f164422b5c8e0042a6fec6649 h: refs/heads/master i: 366669: b5e4f0112f23464244180757349fda5a717ef9c8 366667: d802c3cab53b8a360f1161bb9aa1946fd4df6312 366663: f427186109d2d77019fb2f076b4fcc48039808d3 366655: b218d3833dfd995e11ec566bf3ced6205afbd095 v: v3 --- [refs] | 2 +- trunk/drivers/media/usb/dvb-usb-v2/af9015.c | 40 ++++++++++++++++++++- 2 files changed, 40 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index f0777ff097a2..15218ece5f17 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0d94d6a04b503bed97911d80963ff8e63deee60e +refs/heads/master: e8c7aab50ddcb84f164422b5c8e0042a6fec6649 diff --git a/trunk/drivers/media/usb/dvb-usb-v2/af9015.c b/trunk/drivers/media/usb/dvb-usb-v2/af9015.c index 2fa7c6ee5a70..d556042cf312 100644 --- a/trunk/drivers/media/usb/dvb-usb-v2/af9015.c +++ b/trunk/drivers/media/usb/dvb-usb-v2/af9015.c @@ -1320,6 +1320,43 @@ static int af9015_get_rc_config(struct dvb_usb_device *d, struct dvb_usb_rc *rc) #define af9015_get_rc_config NULL #endif +static int af9015_probe(struct usb_interface *intf, + const struct usb_device_id *id) +{ + struct usb_device *udev = interface_to_usbdev(intf); + char manufacturer[sizeof("ITE Technologies, Inc.")]; + + memset(manufacturer, 0, sizeof(manufacturer)); + usb_string(udev, udev->descriptor.iManufacturer, + manufacturer, sizeof(manufacturer)); + /* + * There is two devices having same ID but different chipset. One uses + * AF9015 and the other IT9135 chipset. Only difference seen on lsusb + * is iManufacturer string. + * + * idVendor 0x0ccd TerraTec Electronic GmbH + * idProduct 0x0099 + * bcdDevice 2.00 + * iManufacturer 1 Afatech + * iProduct 2 DVB-T 2 + * + * idVendor 0x0ccd TerraTec Electronic GmbH + * idProduct 0x0099 + * bcdDevice 2.00 + * iManufacturer 1 ITE Technologies, Inc. + * iProduct 2 DVB-T TV Stick + */ + if ((le16_to_cpu(udev->descriptor.idVendor) == USB_VID_TERRATEC) && + (le16_to_cpu(udev->descriptor.idProduct) == 0x0099)) { + if (!strcmp("ITE Technologies, Inc.", manufacturer)) { + dev_dbg(&udev->dev, "%s: rejecting device\n", __func__); + return -ENODEV; + } + } + + return dvb_usbv2_probe(intf, id); +} + /* interface 0 is used by DVB-T receiver and interface 1 is for remote controller (HID) */ static struct dvb_usb_device_properties af9015_props = { @@ -1428,6 +1465,7 @@ static const struct usb_device_id af9015_id_table[] = { &af9015_props, "AverMedia AVerTV Volar M (A815Mac)", NULL) }, { DVB_USB_DEVICE(USB_VID_TERRATEC, USB_PID_TERRATEC_CINERGY_T_STICK_RC, &af9015_props, "TerraTec Cinergy T Stick RC", RC_MAP_TERRATEC_SLIM_2) }, + /* XXX: that same ID [0ccd:0099] is used by af9035 driver too */ { DVB_USB_DEVICE(USB_VID_TERRATEC, USB_PID_TERRATEC_CINERGY_T_STICK_DUAL_RC, &af9015_props, "TerraTec Cinergy T Stick Dual RC", RC_MAP_TERRATEC_SLIM) }, { DVB_USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_A850T, @@ -1444,7 +1482,7 @@ MODULE_DEVICE_TABLE(usb, af9015_id_table); static struct usb_driver af9015_usb_driver = { .name = KBUILD_MODNAME, .id_table = af9015_id_table, - .probe = dvb_usbv2_probe, + .probe = af9015_probe, .disconnect = dvb_usbv2_disconnect, .suspend = dvb_usbv2_suspend, .resume = dvb_usbv2_resume,