From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5EE52C33C8C for ; Mon, 6 Jan 2020 19:13:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 30B092072E for ; Mon, 6 Jan 2020 19:13:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=kroah.com header.i=@kroah.com header.b="dk0dJcL3"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="OlBfkODD" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726760AbgAFTNC (ORCPT ); Mon, 6 Jan 2020 14:13:02 -0500 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:40339 "EHLO wout3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726683AbgAFTNC (ORCPT ); Mon, 6 Jan 2020 14:13:02 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 466605EC; Mon, 6 Jan 2020 14:13:01 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Mon, 06 Jan 2020 14:13:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm2; bh=N7FOi0xO7UoaUaiaxDe/pM4LSbg 0AHzDiD7DL1qw2EY=; b=dk0dJcL3s3f4t5WHbtzVBUy/y8DvgczXeRR4tFeFjCy k0xnlnqqAMrYnThKYJ17y0hK1G1mJxB5tU8qu4JC590Je2OQzVXQDj/oGXAo/1uG 3U3ummxlvBCClp+AO8U91rdwpDXwbIA1dsm5BBs6PJIfg6zTP1tzmNCf+OuLijVj eEVQJaD7fv/NXQknspW8j0cTx7hfcf8wyQL5xUSaC846YLUIcZLv7RhFnz4McK9y I0rd94o3oxaoulSO4HwGpsTsdZJcfgRjVY05nLGOcPO+XxW89YfaeLgkXxW0dWgA VClX9JKpBbGaMs5aUqEN25Y0d8HFIZt/7HoXmoycsDA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=N7FOi0 xO7UoaUaiaxDe/pM4LSbg0AHzDiD7DL1qw2EY=; b=OlBfkODD2ZgKKswfKpjlGL er6YU4Zk2o6PkaQC00opWBnceUwQecuur0tEAlWl/cXQt56vi+2yw2pRb+APS1jl rF7PyTAEONezJFEKuLuTMXgBKegAnWJ8ySHqv/OJAzWMP+KLA7bt0z81zoKObOdm 0xYnZw20q2zXukX9ZHaYgLP4DgtZaVo5s1sRJE1i09GyldSvhi2soCUgQUB5h1uH Qm7wIY7MEyhxfQXs1gzR6qHPqi6yjhsC+ZdGqVawSFWw/MGxPrAAy5UAnsZb8x4i kC1PjsUwKltppZNXtnDkfK6Mgi7z1FJhA7Tv5q+ClVfRxOI/sh8gadNWScj7AVTQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrvdehtddguddvfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvuffkfhggtggujgesthdtredttddtvdenucfhrhhomhepifhrvghg ucfmjfcuoehgrhgvgheskhhrohgrhhdrtghomheqnecuffhomhgrihhnpehmrghrtgdrih hnfhhonecukfhppeekfedrkeeirdekledruddtjeenucfrrghrrghmpehmrghilhhfrhho mhepghhrvghgsehkrhhorghhrdgtohhmnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) by mail.messagingengine.com (Postfix) with ESMTPA id 1BD5280064; Mon, 6 Jan 2020 14:13:00 -0500 (EST) Date: Mon, 6 Jan 2020 20:12:58 +0100 From: Greg KH To: Alan Stern Cc: Johan Hovold , Roger Whittaker , Laurent Pinchart , Takashi Iwai , USB list Subject: Re: [PATCH] USB: Fix: Don't skip endpoint descriptors with maxpacket=0 Message-ID: <20200106191258.GA714484@kroah.com> References: <20200106160315.GA30908@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org On Mon, Jan 06, 2020 at 11:17:12AM -0500, Alan Stern wrote: > On Mon, 6 Jan 2020, Johan Hovold wrote: > > > 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 > > > Fixes: d482c7bb0541 ("USB: Skip endpoints with 0 maxpacket length") > > > Signed-off-by: Alan Stern > > > CC: Laurent Pinchart > > > Link: https://marc.info/?l=linux-usb&m=157790377329882&w=2 > > > > Acked-by: Johan Hovold > > > > We also need > > > > Cc: stable > > > > as d482c7bb0541 ("USB: Skip endpoints with 0 maxpacket length") ended up > > being (auto- ?) selected for stable. > > Absolutely -- I had intended to add that CC: but it slipped my mind > when the email was being prepared. I'll catch this when it hits Linus's tree. thanks, greg k-h