* [PATCH 1/2] NET: cdc-phonet, fix stop-queue handling
@ 2011-03-13 16:54 Jiri Slaby
2011-03-13 16:54 ` [PATCH 2/2] NET: cdc-phonet, handle empty phonet header Jiri Slaby
2011-03-14 7:39 ` [PATCH 1/2] NET: cdc-phonet, fix stop-queue handling Rémi Denis-Courmont
0 siblings, 2 replies; 6+ messages in thread
From: Jiri Slaby @ 2011-03-13 16:54 UTC (permalink / raw)
To: davem
Cc: jirislaby, netdev, gregkh, linux-usb, linux-kernel, Jiri Slaby,
Rémi Denis-Courmont
Currently there is a warning emitted by the cdc-phonet driver:
WARNING: at include/linux/netdevice.h:1557 usbpn_probe+0x3bb/0x3f0 [cdc_phonet]()
Modules linked in: ...
Pid: 5877, comm: insmod Not tainted 2.6.37.3-16-desktop #1
Call Trace:
[<ffffffff810059b9>] dump_trace+0x79/0x340
[<ffffffff81520fdc>] dump_stack+0x69/0x6f
[<ffffffff810580eb>] warn_slowpath_common+0x7b/0xc0
[<ffffffffa00254fb>] usbpn_probe+0x3bb/0x3f0 [cdc_phonet]
...
---[ end trace f5d3e02908603ab4 ]---
netif_stop_queue() cannot be called before register_netdev()
So remove netif_stop_queue from the probe funtction to avoid that.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Cc: David S. Miller <davem@davemloft.net>
---
drivers/net/usb/cdc-phonet.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/drivers/net/usb/cdc-phonet.c b/drivers/net/usb/cdc-phonet.c
index 109751b..4cf4e36 100644
--- a/drivers/net/usb/cdc-phonet.c
+++ b/drivers/net/usb/cdc-phonet.c
@@ -392,7 +392,6 @@ int usbpn_probe(struct usb_interface *intf, const struct usb_device_id *id)
pnd = netdev_priv(dev);
SET_NETDEV_DEV(dev, &intf->dev);
- netif_stop_queue(dev);
pnd->dev = dev;
pnd->usb = usb_get_dev(usbdev);
--
1.7.4.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] NET: cdc-phonet, handle empty phonet header
2011-03-13 16:54 [PATCH 1/2] NET: cdc-phonet, fix stop-queue handling Jiri Slaby
@ 2011-03-13 16:54 ` Jiri Slaby
[not found] ` <1300035271-8138-2-git-send-email-jslaby-AlSwsSmVLrQ@public.gmane.org>
2011-03-14 7:39 ` [PATCH 1/2] NET: cdc-phonet, fix stop-queue handling Rémi Denis-Courmont
1 sibling, 1 reply; 6+ messages in thread
From: Jiri Slaby @ 2011-03-13 16:54 UTC (permalink / raw)
To: davem
Cc: jirislaby, netdev, gregkh, linux-usb, linux-kernel, Jiri Slaby,
Rémi Denis-Courmont
Currently, for N 5800 XM I get:
cdc_phonet: probe of 1-6:1.10 failed with error -22
It's because phonet_header is empty. Extra altsetting looks like
there:
E 05 24 00 01 10 03 24 ab 05 24 06 0a 0b 04 24 fd .$....$..$....$.
E 00 .
I don't see the header used anywhere so just check if the phonet
descriptor is there, not the structure itself.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Cc: David S. Miller <davem@davemloft.net>
---
drivers/net/usb/cdc-phonet.c | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/net/usb/cdc-phonet.c b/drivers/net/usb/cdc-phonet.c
index 4cf4e36..f967913 100644
--- a/drivers/net/usb/cdc-phonet.c
+++ b/drivers/net/usb/cdc-phonet.c
@@ -328,13 +328,13 @@ int usbpn_probe(struct usb_interface *intf, const struct usb_device_id *id)
{
static const char ifname[] = "usbpn%d";
const struct usb_cdc_union_desc *union_header = NULL;
- const struct usb_cdc_header_desc *phonet_header = NULL;
const struct usb_host_interface *data_desc;
struct usb_interface *data_intf;
struct usb_device *usbdev = interface_to_usbdev(intf);
struct net_device *dev;
struct usbpn_dev *pnd;
u8 *data;
+ int phonet = 0;
int len, err;
data = intf->altsetting->extra;
@@ -355,10 +355,7 @@ int usbpn_probe(struct usb_interface *intf, const struct usb_device_id *id)
(struct usb_cdc_union_desc *)data;
break;
case 0xAB:
- if (phonet_header || dlen < 5)
- break;
- phonet_header =
- (struct usb_cdc_header_desc *)data;
+ phonet = 1;
break;
}
}
@@ -366,7 +363,7 @@ int usbpn_probe(struct usb_interface *intf, const struct usb_device_id *id)
len -= dlen;
}
- if (!union_header || !phonet_header)
+ if (!union_header || !phonet)
return -EINVAL;
data_intf = usb_ifnum_to_if(usbdev, union_header->bSlaveInterface0);
--
1.7.4.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] NET: cdc-phonet, fix stop-queue handling
2011-03-13 16:54 [PATCH 1/2] NET: cdc-phonet, fix stop-queue handling Jiri Slaby
2011-03-13 16:54 ` [PATCH 2/2] NET: cdc-phonet, handle empty phonet header Jiri Slaby
@ 2011-03-14 7:39 ` Rémi Denis-Courmont
2011-03-14 22:23 ` David Miller
1 sibling, 1 reply; 6+ messages in thread
From: Rémi Denis-Courmont @ 2011-03-14 7:39 UTC (permalink / raw)
To: ext Jiri Slaby; +Cc: davem, jirislaby, netdev, gregkh, linux-usb, linux-kernel
On Sunday 13 March 2011 18:54:30 ext Jiri Slaby, you wrote:
> Currently there is a warning emitted by the cdc-phonet driver:
> WARNING: at include/linux/netdevice.h:1557 usbpn_probe+0x3bb/0x3f0
> [cdc_phonet]() Modules linked in: ...
> Pid: 5877, comm: insmod Not tainted 2.6.37.3-16-desktop #1
> Call Trace:
> [<ffffffff810059b9>] dump_trace+0x79/0x340
> [<ffffffff81520fdc>] dump_stack+0x69/0x6f
> [<ffffffff810580eb>] warn_slowpath_common+0x7b/0xc0
> [<ffffffffa00254fb>] usbpn_probe+0x3bb/0x3f0 [cdc_phonet]
> ...
> ---[ end trace f5d3e02908603ab4 ]---
> netif_stop_queue() cannot be called before register_netdev()
>
> So remove netif_stop_queue from the probe funtction to avoid that.
>
> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
> Cc: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
> Cc: David S. Miller <davem@davemloft.net>
Acked-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
--
Rémi Denis-Courmont
http://www.remlab.net/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] NET: cdc-phonet, handle empty phonet header
[not found] ` <1300035271-8138-2-git-send-email-jslaby-AlSwsSmVLrQ@public.gmane.org>
@ 2011-03-14 7:49 ` Rémi Denis-Courmont
2011-03-14 22:24 ` David Miller
0 siblings, 1 reply; 6+ messages in thread
From: Rémi Denis-Courmont @ 2011-03-14 7:49 UTC (permalink / raw)
To: ext Jiri Slaby
Cc: davem-fT/PcQaiUtIeIZ0/mPfg9Q, jirislaby-Re5JQEeQqe8AvxtiuMwx3w,
netdev-u79uwXL29TY76Z2rM5mHXA, gregkh-l3A5Bk7waGM,
linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
On Sunday 13 March 2011 18:54:31 ext Jiri Slaby, you wrote:
> Currently, for N 5800 XM I get:
> cdc_phonet: probe of 1-6:1.10 failed with error -22
>
> It's because phonet_header is empty. Extra altsetting looks like
> there:
> E 05 24 00 01 10 03 24 ab 05 24 06 0a 0b 04 24 fd .$....$..$....$.
> E 00 .
>
> I don't see the header used anywhere so just check if the phonet
> descriptor is there, not the structure itself.
>
> Signed-off-by: Jiri Slaby <jslaby-AlSwsSmVLrQ@public.gmane.org>
> Cc: Rémi Denis-Courmont <remi.denis-courmont-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
> Cc: David S. Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
Acked-by: Rémi Denis-Courmont <remi.denis-courmont-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
--
Rémi Denis-Courmont
http://www.remlab.net/
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] NET: cdc-phonet, fix stop-queue handling
2011-03-14 7:39 ` [PATCH 1/2] NET: cdc-phonet, fix stop-queue handling Rémi Denis-Courmont
@ 2011-03-14 22:23 ` David Miller
0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2011-03-14 22:23 UTC (permalink / raw)
To: remi.denis-courmont
Cc: jslaby, jirislaby, netdev, gregkh, linux-usb, linux-kernel
From: "Rémi Denis-Courmont" <remi.denis-courmont@nokia.com>
Date: Mon, 14 Mar 2011 09:39:56 +0200
> On Sunday 13 March 2011 18:54:30 ext Jiri Slaby, you wrote:
>> Currently there is a warning emitted by the cdc-phonet driver:
>> WARNING: at include/linux/netdevice.h:1557 usbpn_probe+0x3bb/0x3f0
>> [cdc_phonet]() Modules linked in: ...
>> Pid: 5877, comm: insmod Not tainted 2.6.37.3-16-desktop #1
>> Call Trace:
>> [<ffffffff810059b9>] dump_trace+0x79/0x340
>> [<ffffffff81520fdc>] dump_stack+0x69/0x6f
>> [<ffffffff810580eb>] warn_slowpath_common+0x7b/0xc0
>> [<ffffffffa00254fb>] usbpn_probe+0x3bb/0x3f0 [cdc_phonet]
>> ...
>> ---[ end trace f5d3e02908603ab4 ]---
>> netif_stop_queue() cannot be called before register_netdev()
>>
>> So remove netif_stop_queue from the probe funtction to avoid that.
>>
>> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
>> Cc: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
>> Cc: David S. Miller <davem@davemloft.net>
>
> Acked-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Applied.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] NET: cdc-phonet, handle empty phonet header
2011-03-14 7:49 ` Rémi Denis-Courmont
@ 2011-03-14 22:24 ` David Miller
0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2011-03-14 22:24 UTC (permalink / raw)
To: remi.denis-courmont
Cc: jslaby, jirislaby, netdev, gregkh, linux-usb, linux-kernel
From: "Rémi Denis-Courmont" <remi.denis-courmont@nokia.com>
Date: Mon, 14 Mar 2011 09:49:04 +0200
> On Sunday 13 March 2011 18:54:31 ext Jiri Slaby, you wrote:
>> Currently, for N 5800 XM I get:
>> cdc_phonet: probe of 1-6:1.10 failed with error -22
>>
>> It's because phonet_header is empty. Extra altsetting looks like
>> there:
>> E 05 24 00 01 10 03 24 ab 05 24 06 0a 0b 04 24 fd .$....$..$....$.
>> E 00 .
>>
>> I don't see the header used anywhere so just check if the phonet
>> descriptor is there, not the structure itself.
>>
>> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
>> Cc: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
>> Cc: David S. Miller <davem@davemloft.net>
>
> Acked-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Also applied, thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-03-14 22:24 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-13 16:54 [PATCH 1/2] NET: cdc-phonet, fix stop-queue handling Jiri Slaby
2011-03-13 16:54 ` [PATCH 2/2] NET: cdc-phonet, handle empty phonet header Jiri Slaby
[not found] ` <1300035271-8138-2-git-send-email-jslaby-AlSwsSmVLrQ@public.gmane.org>
2011-03-14 7:49 ` Rémi Denis-Courmont
2011-03-14 22:24 ` David Miller
2011-03-14 7:39 ` [PATCH 1/2] NET: cdc-phonet, fix stop-queue handling Rémi Denis-Courmont
2011-03-14 22:23 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).