From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.45 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796545818; b=SMCTHCaegVqjskPXQzJoA2sHN7loAjxg39m1R9kIrzITF2WU2tvIHKnAO1ZPj8EYcYIS WcSomDzNmWmxs9eeczlf7pDEWNRSBRI9qWdzeBbMCvArGSf6b+KeqIxBLHJqJVqpJInbd AXs6lFNEC6kSkQrawU28SzrILiTanPAvyC/EgJTp/7+plEzCz+G2gLgapEgJa+xOLyWUT 0M5LNKTdPdkzP0ZkJ5SQd9eFldo+KEO6/uoZ/R9TeONqvC82yDjrc3wlrdK03WSukkD0O UMmSVky6ySzf07pAN50HfkTdgssYy1B8STTpni77CV87d7PaKz9ipUE0/pygiizRq0g== 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-Forwarded-Encrypted: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=Q+MlaS669fRHMYzzvYnI2tr9N+3wClhBAsECn8Ju9wcrd/LnaiDc3Sx+3I5GdLBlT1im 0WOLQVgynfrS3G0SbTkQChNW8W1idRLRrJ5KINhWWjWsfhQEfEnkL6qUCwt7GJVY0WHxu 4OCN3NihJ9/GJYGBtI3UMUO6zRIQm8rYCHioR5MnK/APjLn8BTiT9km9iR4MIQ7AEKKV4 Z5waJ4wd5jcQLU1qvbYlBZOY02vTCYYWrn6lRc+qWkcpYuWbTot3PYdgGRdbBv+A8rXqu mtR7BgkPQy3pG2o+PHZxrgv1Sf/yDW82Freuw7sXNCiWoOiocs41oZlnvGJhUfgn4hA== 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.45 Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (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 00930606A321 for ; Sun, 6 Dec 2026 08:30:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 00930606A321 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-f45.google.com with SMTP id 5b1f17b1804b1-4bb70074ab2so17665325e9.0 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=DZcHSCcjFA82G73dzxg+DGoLcqxKvZYbK5yBE8kgEoHZcfqQxAsrwG6GWvKVs0mfeH Ca8WW6TXr/QEmMp0mhZbHNxB+YRWTTMS/AGVL4h9CC9c4lso/slqka5vTg8qsiynZeOJ oSxdOyyXhspG3Px3x3HC0liN+KOn5dVoEfVvosUsGdnox7P/R4Z8mdnCLOs2d7QdsRes QwbTabgKOMyBLMHNetvWdeKGdCEHo8StI4dqO8zmWzaby/cd5t6SrLcH0Zo9bPEpfdHI bLlM8SpZLArRjLWAKPTbOJFB7y4opE5jMNPE9l9L3oR9aaPaIFjR/2a6LAliG1qd9Wsp U4Gg== X-Forwarded-Encrypted: i=1; AL+hErFXfYlbLKQ1UXFPbFS5wAGV+yn0I4Ti7UENjM/6fuqBGhs0UT2EB/vaO9UNJwqiyauGT4i/Au7k5WZlHls=@vger.kernel.org X-Gm-Message-State: APuU4Z/sqUhL//LjZpEeizwXuQQR/StS7Zayw83ORcqfQvgPLUOxe3Ff nwCphJpTsAjmU5YrxQ2zTvvBfpJJBumi/vshNlgpIr54oFLlV0OcTOSN X-Gm-Gg: AZFdTZc+gn2ARrLREjOaAab1cw+itBWCAOrs+YFWACMO0TY9PW3biIuWu0abNNGoAqf HZTFQ9Sa/zZ/Zc1S4H/8n9hXOrAnZXLwXibbpsFaDswDikPTDvXdCk/QwriDYcBnv45elVQEXCf 2SiJEn0wRbtoDennCrMTNO4dakYH52Qtold8UDN9ipWZ6tERFzgu24/0EBuJc61+3h0CXPQVTDc 1qMh7vEwn+2KguUpc3D7wnH7S+FCrFpIIw5vcdHGD+BPRm1Ybl9L3GbsqmiS5Fmg7CC2D5KiaVf 7AhI6z+qcQmu23cRMWGaVi0vmErzPMUwT3Sl+PCb59y+GFC4r2NXBT/bHkmgYupdX6y9iDN0LMA QQg1+fD5kO8nTrazjaZlf5pHIMfk38xOxhkJjQvX61v5LTtktzN3ZTBfvBJ8s7UYmQ7QoWD1Q7y PVQ2gRgB98XJBTWQq8a+v1Ep4OLFPhNPeFTWC1rSAR0yZXQ6ka0IxuR4uOrENlDLJOFnUGms/6m vnL3DbHjnhaA+27AaOZSyRF8ZfWM2jVymTiezIMsclV0fWqieCggtQHWPQ1rSI2kSrUtWB2C5M/ wadF7ceubwlUUefMiWGSA2eeslLoe85pNhEN 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-kernel@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