netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ming Lei <tom.leiming@gmail.com>
To: Oliver Neukum <oneukum@suse.de>
Cc: Huajun Li <huajun.li.lee@gmail.com>,
	David Miller <davem@davemloft.net>,
	stern@rowland.harvard.edu, linux-usb@vger.kernel.org,
	netdev@vger.kernel.org
Subject: Re: [PATCH] usbnet: Activate halt interrupt endpoint before re-submit URB
Date: Wed, 20 Jun 2012 18:56:23 +0800	[thread overview]
Message-ID: <CACVXFVOJzctAs-giOmC-0J5LfLsp1YSwrcRK4UEyPAejFc05rg@mail.gmail.com> (raw)
In-Reply-To: <201206201221.37211.oneukum@suse.de>

On Wed, Jun 20, 2012 at 6:21 PM, Oliver Neukum <oneukum@suse.de> wrote:

> It probably was halted and cleared. However that you cleared
> a halt doesn't mean that the reason for stalling went away.
> So you must cope with an endpoint being halted again right after
> it was cleared.

I only suggested we should handle -EPIPE for usb_submit_urb
on interrupt endpoint, maybe it is the 1st handling, at least it is
per USB spec.

Also from implementation of usb gadget device, generally
ClearFeature(HALT) is to clear the some halt related flag of
endpoint hardware.

Looks the reasons of interrupt endpoint stalling is invisible
for usbnet driver, so it is not easy to handle the situation
you described(halted and cleared repeatedly).

>
>> > In that case we'd need to do something more intrusive
>> > like resetting the device, but that cannot be done well
>> > in the generic usbnet part.
>>
>> IMO, resetting is not needed for -EPIPE, but may be needed for
>> -EPROTO failure.
>
> We don't need it for a single failure, but what else would we do
> if we keep getting -EPIPE?

Suppose the case will happen, what is the appropriate actions
usbnet should take on the failure? I am not sure RESET can deal
with it.

Also is it a actual failure case or only a theory case?

Thanks,
-- 
Ming Lei

      reply	other threads:[~2012-06-20 10:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-13 12:50 [PATCH] usbnet: Activate halt interrupt endpoint before re-submit URB Huajun Li
2012-06-17 23:30 ` David Miller
     [not found]   ` <20120617.163017.1067800063889498786.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2012-06-18  7:23     ` Oliver Neukum
     [not found]       ` <201206180923.36091.oneukum-l3A5Bk7waGM@public.gmane.org>
2012-06-18 16:25         ` Huajun Li
     [not found]           ` <CA+v9cxZG6b1O7kOQpeTELtv0vHzqy-8NH84boMpim0BM+tp1eQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-06-18 16:51             ` Oliver Neukum
     [not found]               ` <201206181851.49765.oneukum-l3A5Bk7waGM@public.gmane.org>
2012-06-19 15:50                 ` Ming Lei
2012-06-20  8:00             ` Oliver Neukum
     [not found]               ` <201206201000.21845.oneukum-l3A5Bk7waGM@public.gmane.org>
2012-06-20  8:07                 ` Ming Lei
2012-06-20  8:58                   ` Oliver Neukum
     [not found]                     ` <201206201058.55519.oneukum-l3A5Bk7waGM@public.gmane.org>
2012-06-20 10:15                       ` Ming Lei
2012-06-20 10:21                         ` Oliver Neukum
2012-06-20 10:56                           ` Ming Lei [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CACVXFVOJzctAs-giOmC-0J5LfLsp1YSwrcRK4UEyPAejFc05rg@mail.gmail.com \
    --to=tom.leiming@gmail.com \
    --cc=davem@davemloft.net \
    --cc=huajun.li.lee@gmail.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=oneukum@suse.de \
    --cc=stern@rowland.harvard.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).