Skip to contentSkip to conversation

Revert "net: cx82310_eth: use common match macro"

PATCH Applied Ondrej Zary 3 participants 4 messages Mar 18, 2015 – Mar 19, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Revert "net: cx82310_eth: use common match macro"

This reverts commit 11ad714b98f6d9ca0067568442afe3e70eb94845 because it breaks cx82310_eth.

The custom USB_DEVICE_CLASS macro matches
bDeviceClass, bDeviceSubClass and bDeviceProtocol
but the common USB_DEVICE_AND_INTERFACE_INFO matches bInterfaceClass, bInterfaceSubClass and bInterfaceProtocol instead, which are not specified.

---
 drivers/net/usb/cx82310_eth.c |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
drivers/net/usb/cx82310_eth.c +10 -1
index 3eed708..fe48f4c 100644
@@ -300,9 +300,18 @@ static const struct driver_info	cx82310_info = {
 	.tx_fixup	= cx82310_tx_fixup,
 };
 
+#define USB_DEVICE_CLASS(vend, prod, cl, sc, pr) \
+	.match_flags = USB_DEVICE_ID_MATCH_DEVICE | \
+		       USB_DEVICE_ID_MATCH_DEV_INFO, \
+	.idVendor = (vend), \
+	.idProduct = (prod), \
+	.bDeviceClass = (cl), \
+	.bDeviceSubClass = (sc), \
+	.bDeviceProtocol = (pr)
+
 static const struct usb_device_id products[] = {
 	{
-		USB_DEVICE_AND_INTERFACE_INFO(0x0572, 0xcb01, 0xff, 0, 0),
+		USB_DEVICE_CLASS(0x0572, 0xcb01, 0xff, 0, 0),
 		.driver_info = (unsigned long) &cx82310_info
 	},
 	{ },
Signature · 1 line
Ondrej Zary
maintainer Applied
#1 lore raw

From: Ondrej Zary <[email protected]>
Date: Wed, 18 Mar 2015 23:01:01 +0100

Quoted 10 lines

This reverts commit 11ad714b98f6d9ca0067568442afe3e70eb94845 because it breaks cx82310_eth.

The custom USB_DEVICE_CLASS macro matches
bDeviceClass, bDeviceSubClass and bDeviceProtocol
but the common USB_DEVICE_AND_INTERFACE_INFO matches bInterfaceClass, bInterfaceSubClass and bInterfaceProtocol instead, which are not specified.

Applied, thank you.

#2 lore raw
In reply to Ondrej Zary
Quoted 8 lines · Ondrej Zary

This reverts commit 11ad714b98f6d9ca0067568442afe3e70eb94845 because it breaks cx82310_eth.

The custom USB_DEVICE_CLASS macro matches
bDeviceClass, bDeviceSubClass and bDeviceProtocol
but the common USB_DEVICE_AND_INTERFACE_INFO matches bInterfaceClass, bInterfaceSubClass and bInterfaceProtocol instead, which are not specified.

Ouch. What ever made me do that? Thanks a lot for fixing it!

This bug was introduced as long ago as v3.7, so the fix should go into every currently maintained stable branch since that.

Bjørn

maintainer Applied
#3 lore raw

From: Bjørn Mork <[email protected]>
Date: Thu, 19 Mar 2015 09:21:30 +0100

Quoted 11 lines
Quoted 8 lines · Ondrej Zary

This reverts commit 11ad714b98f6d9ca0067568442afe3e70eb94845 because it breaks cx82310_eth.

The custom USB_DEVICE_CLASS macro matches
bDeviceClass, bDeviceSubClass and bDeviceProtocol
but the common USB_DEVICE_AND_INTERFACE_INFO matches bInterfaceClass, bInterfaceSubClass and bInterfaceProtocol instead, which are not specified.

Quoted 4 lines

Ouch. What ever made me do that? Thanks a lot for fixing it!

This bug was introduced as long ago as v3.7, so the fix should go into every currently maintained stable branch since that.

Queued up for -stable, thanks.