linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Takashi Iwai <tiwai@suse.de>, Johan Hovold <johan@kernel.org>,
	Greg KH <gregkh@linuxfoundation.org>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Roger Whittaker <Roger.Whittaker@suse.com>,
	Takashi Iwai <tiwai@suse.com>,
	linux-usb@vger.kernel.org
Subject: Re: Certain cameras no longer working with uvcvideo on recent (openSUSE) kernels
Date: Thu, 2 Jan 2020 16:32:41 +0100	[thread overview]
Message-ID: <20200102153241.GA4683@localhost> (raw)
In-Reply-To: <Pine.LNX.4.44L0.2001021003130.1546-100000@iolanthe.rowland.org>

On Thu, Jan 02, 2020 at 10:06:33AM -0500, Alan Stern wrote:
> On Thu, 2 Jan 2020, Takashi Iwai wrote:
> > On Thu, 02 Jan 2020 12:20:45 +0100, Johan Hovold wrote:

> > > Note that we also have this little gem in the ftdi usb-serial driver
> > > (since 2009) overriding a zero max packet size for devices with broken
> > > descriptors:
> > > 
> > > 	895f28badce9 ("USB: ftdi_sio: fix hi-speed device packet size calculation")
> > > 
> > > Note sure how common those are but they will no longer work after the
> > > new sanity check in core. I guess we could add quirks for them (to core)
> > > in case we get any reports, but perhaps reverting the check should be
> > > considered.
> > 
> > FWIW, Roger confirmed that reverting the commit d482c7bb0541 does
> > indeed fix the issue (with the latest 5.4.y kernel).
> 
> All right.  Suppose instead of reverting that commit, I change the code
> so that it only logs a warning when it finds an endpoint descriptor
> with maxpacket = 0 (and it skips the warning for isochronous endpoints
> in altsetting 0).  At the same time, we can add a check to
> usb_submit_urb() to refuse URBs if the endpoint's maxpacket is 0.
> 
> Sounds good?

Sounds good to me.

Just make sure not to add a WARN() in usb_submit_urb() so that we end up
having to add maxpacket checks to every USB driver when syzbot starts
hitting this (only driver's doing maxpacket divisions or similar should
need that).

Johan

  reply	other threads:[~2020-01-02 15:32 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 [this message]
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=20200102153241.GA4683@localhost \
    --to=johan@kernel.org \
    --cc=Roger.Whittaker@suse.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    --cc=tiwai@suse.com \
    --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 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).