From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.49 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796545818; b=JU81YT9AG8TSwRaiZ3qXjLOHAN5nJzX2CmPkr6lBOztASi7Sb+nSZlAxPegXk8hrZj1E lIzKO+ju09TQ0szZYFxA11ntplzUEolDs058Yu6s+NM3ip8OIze9ltJ61VP8WBzR8yHPo W24Tr58o8lfy34OCrundk3Uhtv2ECIyiUwbAY/HNM7VDSX3Nowkb/V11NgUCW6+7GyrlZ eVGwubR8Ec/lrKaCHKCfUw0iJEB56F/qwWzG0gjRRpbFfl56jmBZ6LXASvEQHBvSfRuOb Aux8jknbcDO/4LK9s3dLhk0tjbj69tkYkcswodh9YBgYPcBYecW/kWUwrp1exAT3D2Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796545818; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Gm-Gg:X-Received:Received:Date:From:To:Cc: Subject:Message-ID:In-Reply-To:References:MIME-Version:Content-Type: Content-Transfer-Encoding; bh=134ncTlD+3kebjdULMB5PfsLJugm7Ak/86HJd7QEt8k=; b=hHS+WucenurQngsbk1+2tJZr6F5ruZK37+BJsUbvLkKcLys1YYcKuwema3/Dn+e0FwyE trkN6wdJ5Ed+RbPYfJmFcRRIcAIWx1pLv6vNm9RCppZ0Un3SNHRvYGWPG3IJTVVa/mfU6 d7hTec1NHpJH2BqzQR3vq2qqSgtCUnuIq+9TT6IP8rymQvldDSqcunLHhCyub63MA3l+n 55bhpAXtIEyzUczQWd9kEYK0m47MdJeJXAlWdf/5gS5cMcEhuuhGGUEpvGXMmMecSDsQn 0jzZaCwpPIpNuCAHoMsvVgM0WiATlZIsrreAbAiLKUCskXaIdDOXSkIm19kv0pcvBIA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=DX6lFkD1; arc=none smtp.remote-ip=209.85.128.49 Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DFEBC606A31F for ; Sun, 6 Dec 2026 08:30:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org DFEBC606A31F Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=DX6lFkD1 Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-4bb702a7548so14973545e9.1 for ; Sun, 06 Dec 2026 00:30:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796545816; x=1797150616; darn=vger.kernel.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=134ncTlD+3kebjdULMB5PfsLJugm7Ak/86HJd7QEt8k=; b=DX6lFkD1PZJKF++9QgVx/ZAIH9fSdeVQ01K974JW0bbYXoDER60DnXpeo7OT40jYW+ RumPTKDCdwGnkBN0KwWV3FxGzB2ktzphK8iNHX4+eMwlcKlYXuoCZ1Paynd+/GBjzVGh L9MBDQTgGEAe0q/wpWBs0Bbw9P1tu2w2U9w0gAgZXaT3K44WvzzpRjqXdohy5BkEl2oY 5NdgWPa8GvNI0BKbkFgTmm+kM9LrEwAJjGGmWt0+gjZekw6t5H9Mxm8PuMZ72V3jUJj8 kFkpyATpO4elmEFHixv5rzhYgPgofbm5lMwFMPQKk2ppDp5/zT+o+Zc7E0FXGVjxZ5dk /new== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796545816; x=1797150616; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=134ncTlD+3kebjdULMB5PfsLJugm7Ak/86HJd7QEt8k=; b=qeNi1Au55U8lU7V6lMCLL8FyO8nVZ4NK+r1tWBOGe9t+nIT52M3yVA5+AITHyJhKkk 7M0Yw0aWjX37kEnAWhNqxxOfylAmG6KpjIBFXmHow9c5gh+cGK2QmVhDv1B02suLC5/Q OLUDiAj5BJgrrvzWusROKlpy9J/f2DNV9cl1R10wPaAbs3HrOVECvzQrMBCFKq3X+1x5 uoo5PlbjxIh2CWO9CYQlO91lkDQ2Sg3YQeTRui+KD2sqZjMoQGVEN2/DcNn5e9K546AZ JOtwWLFMFa75INKNBAS9whMdxYWh8ibRqlVmqDBsV7L6WdafoB0ify5nadoef8rl9OC3 wJCA== X-Gm-Message-State: APuU4Z+HyBuIuC/jOuhPRGkdpRAFXklR7xobnnLUNpql1N4ewnDx8Tun C4o1p+yMT/hi9od7oqNwINwUD7UrI3f6QUGg7n8EraOrI26UznmKMLyAAlSBN4AH X-Gm-Gg: AZFdTZeGtu4ywbxAoMYkUzMiu5K+Rf6kDGqP2v+FpA6soctS0htdD3PIx2P+wMw7HoG qKkqAxTS7+39Qnamc8csgwrhDgYSp7GNmO5rYNGdgq2dD4+g0m70rkHv0Zdnzr6VhLWGLTm1Pzn J4uwLy4OcLOJ+iPuDNgEEP2WaH/KYKtf0CfrMO9G5V7Rg+8iEBNsytuk1xett+Abb0rTZtJA/5m KDI4r6YAFcwn5VX5Qqvj7Hiw/AUedTkpZG93Gpcu9ULCRlEVCbwlWX5mWWEiTcnOmBw2PE+5KSA HoYIbsWSabCFdXuflrcdQpQdW0CibLSp7e/ht5xKCwQT961k6BMmWlDbJFExsD3MojJDe8nPLsQ 67gKQ1p8d9vyiVg3NduVjD6tlmKsCnai6sTkdVIXmWF7jZMxADjwcI/O2RtlXhQF4Yk9lRBb5gR LDMhvSROQLQlrrMGfUvn9mDQknQ5HffoXywbI1sat6VMKqpR6Y0j5yfd2j9qsP8hjleQeO2ky4C Ocxpg2V73gAwPxH+ja0v/4siN15jkkJWbUO1HtFCiUSehx/tVxkIsmGg8588BMc71Giq0W9xoIB vH64xqOTwDSkdIPPS9GsslePDWIu7xXlglCi X-Received: by 2002:a05:600c:3145:b0:4bb:7347:d5df with SMTP id 5b1f17b1804b1-4bbeb8cdd1amr153613615e9.13.1796545816243; Sun, 06 Dec 2026 00:30:16 -0800 (PST) Received: from foxbook (bfj60.neoplus.adsl.tpnet.pl. [83.28.47.60]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bbea2ac2afsm194028965e9.12.2026.12.06.00.30.15 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Sun, 06 Dec 2026 00:30:15 -0800 (PST) Date: Sun, 6 Dec 2026 09:30:16 +0100 From: Michal Pecio To: Mathias Nyman , Greg Kroah-Hartman , Nicolai Buchwitz Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] usb: xhci: Relax high-speed bulk max packet size rules Message-ID: <20261206093016.1f242dbc.michal.pecio@gmail.com> In-Reply-To: <20261028104329.3d1c8029.michal.pecio@gmail.com> References: <20261028104329.3d1c8029.michal.pecio@gmail.com> X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Wed, 28 Oct 2026 10:43:29 +0100, Michal Pecio wrote: > Nicolai reported multiple dodgy high-speed devices still being made > which declare out-of-spec bulk wMaxPacketSize and actually require > the host to use it for correct operation. Apparently, Windows copies > this field to the EP Context verbatim and other Linux HCDs like EHCI > and DWC2 do similar things for compatibility's sake. > > We are also aware of devices like astronomical cameras which use 1KB > to reduce protocol overhead, and audio devices with MIDI endpoints > that specify unusual MPS like 8 or 4 (the latter was full-speed) and > work with larger sizes just fine because they never do multi-packet > transfers where MPS really matters. > > I found that sensible (power of two, 8 - 512) MPS are usable on many > xHCI controllers from vendors like AMD, ASMedia, Fresco, NEC/Renesas, > and VIA. Nicolai also tested two Raspberry Pi SBCs and a modern Intel > machine running Windows 11 and 64B endpoints worked. > > OTOH, Etron rejects Configure Endpoint if MPS != 512. For such cases, > commit e4f47e3675e6 ("USB: xHCI: override bogus bulk wMaxPacketSize > values") sets HS bulk MPS to 512, which obviously breaks those dodgy > devices that perform multi-packet transfers with other size. > > Problematic devices known so far use power of two MPS of at least 64, > so try to recognize them with this heuristic. Non power of two or > small MPS seems to indicate a clueless device which treats bulk like > interrupt and specifies intended transfer size; we will use standard > MPS here to avoid trouble with potential other HCs like Etron. > > Reported-by: Nicolai Buchwitz > Closes: https://lore.kernel.org/linux-usb/20261020-fix-usbtmc-short-packets-v1-0-903f4d029193@tipi-net.de/ > Link: https://lore.kernel.org/linux-usb/93d5aeb4-f1c7-9342-7bc5-4b277b4ec55e@veikia.lt/ > Link: https://lore.kernel.org/alsa-devel/CAE-xCyPhrS6pgY0T9SG0TCubSi0CE2Yd5H=ttOzBmvgrR8fTPA@mail.gmail.com/ > Link: https://lore.kernel.org/linux-usb/348c50de-f922-8295-ef87-cf5cdea5c7f4@gmail.com/ > Signed-off-by: Michal Pecio Hi, Gentle ping about this one. I'm not a big fan of out-of-spec, but this seems to be widely accepted as necessary evil (we can also add NVIDIA Tegra K1 and Texas Instruments TUSB7340 to the tested list). Windows seems to take this for granted so much that it can't configure my DIY 64B maxpacket device on Etron - it looks like they don't make an exception for Etron, we will. The only in-spec alternative seems to be queuing a sequence of 64B TDs. This should work fine on OUT, but there seems to be no way to stop on short transfers for IN, besides queuing the TDs one by one from IRQ. Regards, Michal