netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oliver Neukum <oneukum@suse.de>
To: Ming Lei <tom.leiming@gmail.com>
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 12:21:37 +0200	[thread overview]
Message-ID: <201206201221.37211.oneukum@suse.de> (raw)
In-Reply-To: <CACVXFVMy6Hrqgw6rmAXv5YXD86sLF+FUPTRRcXKs40uwN6ioCg@mail.gmail.com>

Am Mittwoch, 20. Juni 2012, 12:15:25 schrieb Ming Lei:
> On Wed, Jun 20, 2012 at 4:58 PM, Oliver Neukum <oneukum@suse.de> wrote:
> > Am Mittwoch, 20. Juni 2012, 10:07:55 schrieb Ming Lei:
> >> BTW, maybe it is better to add below
> >>
> >>     usbnet_defer_kevent(dev, EVENT_STS_HALT);
> >>
> >> for -EPIPE returned from usb_urb_submit if it will be resent.
> >
> > Why? If it failed once it'll probably also fail the next time.
> 
> -EPIPE just means the endpoint is halted, either from usb_urb_submit
> or urb->status, so the HALT should be cleared in the situation.

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.

> > 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?

	Regards
		Oliver

  reply	other threads:[~2012-06-20 10:21 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 [this message]
2012-06-20 10:56                           ` Ming Lei

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=201206201221.37211.oneukum@suse.de \
    --to=oneukum@suse.de \
    --cc=davem@davemloft.net \
    --cc=huajun.li.lee@gmail.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    --cc=tom.leiming@gmail.com \
    /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).