linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Roger Whittaker <Roger.Whittaker@suse.com>,
	Takashi Iwai <tiwai@suse.com>,
	Alan Stern <stern@rowland.harvard.edu>,
	linux-usb@vger.kernel.org
Subject: Re: Certain cameras no longer working with uvcvideo on recent (openSUSE) kernels
Date: Wed, 1 Jan 2020 19:47:00 +0100	[thread overview]
Message-ID: <20200101184700.GA3190507@kroah.com> (raw)
In-Reply-To: <20200101183559.GA15498@pendragon.ideasonboard.com>

On Wed, Jan 01, 2020 at 08:35:59PM +0200, Laurent Pinchart wrote:
> Hi Roger,
> 
> (CCin'g Alan Stern and linux-usb)
> 
> On Wed, Jan 01, 2020 at 05:52:27PM +0000, Roger Whittaker wrote:
> > On Wed, Jan 01, 2020 at 07:24:49PM +0200, Laurent Pinchart wrote:
> > 
> > > The last message is worse. Could you send me the output of lsusb -v (you
> > > can restrict it to the camera with -d), if possible running as root, for
> > > both the working and non-working kernels ?
> > 
> > Thanks very much for your reply.
> > 
> > The lsusb outputs are attached - they are in fact identical to each
> > other.
> > 
> > Also attached, the dmesg lines when replugging the camera on both
> > kernels.
> 
> Thank you for the information.
> 
> I had missed the following message:
> 
> [  470.351700] usb 1-1.4.3.1: config 1 interface 2 altsetting 0 endpoint 0x82 has wMaxPacketSize 0, skipping
> 
> This seems to be the culprit, and it points to the USB core. One
> interface is ignored due to its wMaxPacketSize value, and the uvcvideo
> driver then fails to find it.
> 
> The wMaxPacketSize check was added in
> 
> commit d482c7bb0541d19dea8bff437a9f3c5563b5b2d2
> Author: Alan Stern <stern@rowland.harvard.edu>
> Date:   Mon Oct 28 10:52:35 2019 -0400
> 
>     USB: Skip endpoints with 0 maxpacket length
> 
>     Endpoints with a maxpacket length of 0 are probably useless.  They
>     can't transfer any data, and it's not at all unlikely that an HCD will
>     crash or hang when trying to handle an URB for such an endpoint.
> 
>     Currently the USB core does not check for endpoints having a maxpacket
>     value of 0.  This patch adds a check, printing a warning and skipping
>     over any endpoints it catches.
> 
>     Now, the USB spec does not rule out endpoints having maxpacket = 0.
>     But since they wouldn't have any practical use, there doesn't seem to
>     be any good reason for us to accept them.
> 
>     Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
> 
>     Link: https://lore.kernel.org/r/Pine.LNX.4.44L0.1910281050420.1485-100000@iolanthe.rowland.org
>     Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> 
> The commit was merged in v5.4 and backported to v5.3.11 in
> 47aaab6377204cdbcd16f52a23c584f994fd0d15.
> 
> For reference for Alan and linux-usb, the issue being discussed is
> described in https://bugzilla.suse.com/show_bug.cgi?id=1159811. The
> above commit seems to cause a regression with several cameras. I've
> attached to this e-mail the lsusb output provided by Roger.

How can a device work with an endpoint of 0 length?

What does the driver expect to do with those endpoints?  Does it expect
it to be present but just ignore it?

thanks,

greg k-h

  reply	other threads:[~2020-01-01 18:47 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 [this message]
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
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=20200101184700.GA3190507@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=Roger.Whittaker@suse.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    --cc=tiwai@suse.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).