All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Greg KH <greg@kroah.com>,
	Roger Whittaker <Roger.Whittaker@suse.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Takashi Iwai <tiwai@suse.de>, Johan Hovold <johan@kernel.org>,
	USB list <linux-usb@vger.kernel.org>
Subject: Re: [PATCH] USB: Fix: Don't skip endpoint descriptors with maxpacket=0
Date: Mon, 6 Jan 2020 17:03:15 +0100	[thread overview]
Message-ID: <20200106160315.GA30908@localhost> (raw)
In-Reply-To: <Pine.LNX.4.44L0.2001061040270.1514-100000@iolanthe.rowland.org>

On Mon, Jan 06, 2020 at 10:43:42AM -0500, Alan Stern wrote:
> It turns out that even though endpoints with a maxpacket length of 0
> aren't useful for data transfer, the descriptors do serve other
> purposes.  In particular, skipping them will also skip over other
> class-specific descriptors for classes such as UVC.  This unexpected
> side effect has caused some UVC cameras to stop working.
> 
> In addition, the USB spec requires that when isochronous endpoint
> descriptors are present in an interface's altsetting 0 (which is true
> on some devices), the maxpacket size _must_ be set to 0.  Warning
> about such things seems like a bad idea.
> 
> This patch updates an earlier commit which would log a warning and
> skip these endpoint descriptors.  Now we only log a warning, and we
> don't even do that for isochronous endpoints in altsetting 0.
> 
> We don't need to worry about preventing endpoints with maxpacket = 0
> from ever being used for data transfers; usb_submit_urb() already
> checks for this.
> 
> Reported-and-tested-by: Roger Whittaker <Roger.Whittaker@suse.com>
> Fixes: d482c7bb0541 ("USB: Skip endpoints with 0 maxpacket length")
> Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
> CC: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Link: https://marc.info/?l=linux-usb&m=157790377329882&w=2

Acked-by: Johan Hovold <johan@kernel.org>

We also need

Cc: stable <stable@vger.kernel.org>

as d482c7bb0541 ("USB: Skip endpoints with 0 maxpacket length") ended up
being (auto- ?) selected for stable.

Johan

  reply	other threads:[~2020-01-06 16:03 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200101144709.GA8389@suse.com>
     [not found] ` <20200101172449.GF6226@pendragon.ideasonboard.com>
     [not found]   ` <20200101175220.GA18140@suse.com>
2020-01-01 18:35     ` Certain cameras no longer working with uvcvideo on recent (openSUSE) kernels Laurent Pinchart
2020-01-01 18:47       ` Greg KH
2020-01-01 20:09         ` Alan Stern
2020-01-02 11:20           ` Johan Hovold
2020-01-02 13:11             ` Takashi Iwai
2020-01-02 15:06               ` Alan Stern
2020-01-02 15:32                 ` Johan Hovold
2020-01-02 18:24                   ` Alan Stern
2020-01-02 16:38                 ` Laurent Pinchart
2020-01-02 16:57                   ` Roger Whittaker
2020-01-02 17:03                     ` Laurent Pinchart
2020-01-02 17:49                       ` Alan Stern
2020-01-02 21:51                         ` Roger Whittaker
2020-01-02 23:11                         ` Laurent Pinchart
2020-01-03 15:13                           ` Alan Stern
2020-01-04 18:22                             ` Laurent Pinchart
2020-01-05 12:28                               ` Roger Whittaker
2020-01-06 15:43                                 ` [PATCH] USB: Fix: Don't skip endpoint descriptors with maxpacket=0 Alan Stern
2020-01-06 16:03                                   ` Johan Hovold [this message]
2020-01-06 16:17                                     ` Alan Stern
2020-01-06 19:12                                       ` Greg KH
2020-01-06 16:13                                   ` Laurent Pinchart
2020-01-06 16:21                                     ` Alan Stern

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=20200106160315.GA30908@localhost \
    --to=johan@kernel.org \
    --cc=Roger.Whittaker@suse.com \
    --cc=greg@kroah.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    --cc=tiwai@suse.de \
    /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 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.