All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Revert "net: cx82310_eth: use common match macro"
@ 2015-03-18 22:01 Ondrej Zary
  2015-03-19  2:38 ` David Miller
  2015-03-19  8:21 ` Bjørn Mork
  0 siblings, 2 replies; 4+ messages in thread
From: Ondrej Zary @ 2015-03-18 22:01 UTC (permalink / raw)
  To: netdev; +Cc: Bjørn Mork, Kernel development list

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.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
---
 drivers/net/usb/cx82310_eth.c |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/net/usb/cx82310_eth.c b/drivers/net/usb/cx82310_eth.c
index 3eed708..fe48f4c 100644
--- a/drivers/net/usb/cx82310_eth.c
+++ b/drivers/net/usb/cx82310_eth.c
@@ -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
 	},
 	{ },
-- 
Ondrej Zary


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] Revert "net: cx82310_eth: use common match macro"
  2015-03-18 22:01 [PATCH] Revert "net: cx82310_eth: use common match macro" Ondrej Zary
@ 2015-03-19  2:38 ` David Miller
  2015-03-19  8:21 ` Bjørn Mork
  1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2015-03-19  2:38 UTC (permalink / raw)
  To: linux; +Cc: netdev, bjorn, linux-kernel

From: Ondrej Zary <linux@rainbow-software.org>
Date: Wed, 18 Mar 2015 23:01:01 +0100

> 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.
> 
> Signed-off-by: Ondrej Zary <linux@rainbow-software.org>

Applied, thank you.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Revert "net: cx82310_eth: use common match macro"
  2015-03-18 22:01 [PATCH] Revert "net: cx82310_eth: use common match macro" Ondrej Zary
  2015-03-19  2:38 ` David Miller
@ 2015-03-19  8:21 ` Bjørn Mork
  2015-03-19 16:27   ` David Miller
  1 sibling, 1 reply; 4+ messages in thread
From: Bjørn Mork @ 2015-03-19  8:21 UTC (permalink / raw)
  To: Ondrej Zary; +Cc: netdev, Kernel development list

Ondrej Zary <linux@rainbow-software.org> writes:

> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Revert "net: cx82310_eth: use common match macro"
  2015-03-19  8:21 ` Bjørn Mork
@ 2015-03-19 16:27   ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2015-03-19 16:27 UTC (permalink / raw)
  To: bjorn; +Cc: linux, netdev, linux-kernel

From: Bjørn Mork <bjorn@mork.no>
Date: Thu, 19 Mar 2015 09:21:30 +0100

> Ondrej Zary <linux@rainbow-software.org> writes:
> 
>> 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.

Queued up for -stable, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-03-19 16:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-18 22:01 [PATCH] Revert "net: cx82310_eth: use common match macro" Ondrej Zary
2015-03-19  2:38 ` David Miller
2015-03-19  8:21 ` Bjørn Mork
2015-03-19 16:27   ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.