From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 427333AC0D0 for ; Mon, 18 May 2026 05:31:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779082303; cv=none; b=nbvhbj1JTX+KMqJ9/I6xHbtPREGIFbIX1UyzqflDEydraXSYm5xmGKh5udNgesBKbgA26VAZSxkDl78TOr+XKWsdDVtyY0InNL9Zmz7aj2gBJ0ernOQfKL5Ln9BQ0l0ZQYrbnzWvxBv0km8pUuaOZPAogt9XeIXvL5sUzfjoGac= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779082303; c=relaxed/simple; bh=EVprCTB8Kh8bPUFs6AGSUyf6j4PF0yXwGYHY9k2BzlA=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=SxdobhhwSseqVLjZXBBCdS4TitHSq9rXR9wFNbMiT0gUEw2Jk8hsH5zLellgyzszN4NeYbCV2VuzY5dAWOW8yqoJDamsjpCPhc2EHNgAqwI6j43dNFs5+LUGRDxFRHY9yv3YLl1DP3DaK5LgvjwI07BRUKoAlP/BODTFTEhlA7M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=HT7ydulv; arc=none smtp.client-ip=209.85.128.52 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.b="HT7ydulv" Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-48d102471a4so13284975e9.2 for ; Sun, 17 May 2026 22:31:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779082285; x=1779687085; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=19WBiTVxxkWr23n+/H1N3imVfxB1B+HxV4kPuwWDblM=; b=HT7ydulvFSvnxJwi3u4PuzOzwRmaw+Yt1K+Bi1S/8PI7zz6a5uzaehs4W+Us3wwOiP xPMtqPJW/vZrujA1u9eR5ZKSw0dsrn15/XgtYL8Pwv/w2c3JDMkHVHPN1LbzoMYKhR1Q 1DgV7JcYMebPg1BKYjDXsF9WY3Yd4vgZ5M0HDck9fWYEiQ7H9macDEohVvBW3LnmOl9m bLEgmIWqugAiHnWwOJiY8d/rXX7h2q1WvZxnZOx0DpZmRjQk+zp+F4adqtk6Ukiurz9Y AWTklxh3VBVe65XdlpbfH06vF2xTH/Xc5Ku8gXQvUieLbpuvTk7Vlh7k2L0JyOHZmoNM QYjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779082285; x=1779687085; h=content-transfer-encoding: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; bh=19WBiTVxxkWr23n+/H1N3imVfxB1B+HxV4kPuwWDblM=; b=sM/L5FKCENtaeGbRWsU58j+9zCLODgS4p3DB2bjQJETkPEoK5PfPcgZHrZ/PMERHQZ LkhdvGucKm9tL1RbPiauKYY4OZBqzT/9ESd3R45fXPUWwsE1yX78BbdBbMTIl+oZezYw d4xy1Cqzew87E2VL43IH5mrg8AcTaRonux0I1n9K4i3eKD0SWCRJxv9OYbFoJ+2sI2Xd n5WH9A9ZabWIGqmotG8fIkN/S+XSWLTOWVwgfbRBn0f5d8fd1ZSYlbCZBPUUVI1cCiLF N2Zxj9X2IcP/YVCMnVsUDiMs829RODTUkLllh3SeucJ5jg3X+KGhKqZT0U9A0jwSMl4W Clng== X-Forwarded-Encrypted: i=1; AFNElJ/toZSx1QeSde+XUusED0n+p4JvlTttGi5e8RcK1In21IFVHCImFYTrOIYNhtELZjDo7k53B7QfZi5xZc4=@vger.kernel.org X-Gm-Message-State: AOJu0YzJX6iWXt2ER79d82hCuNFDCtV4eP3xAVX8DtTme2orSS0mnTLk VFxdppYFtUl+yldRY71DNlfJNTo3NmPjlv6OhTjah8mjdxHdWlspvdDp X-Gm-Gg: Acq92OEujW1hX7JjCYFd9LeZ5VRfdU9/mKFvEUXpKC1w89I4BSpGvsywVN6V4RnWRlj AhTtFbrI4QB2RyjEsKb1a/dquxiPnqGyeJwxz6JkUu7OZiHn/+Y4eQyJUqBXvv2qzqP8d1JRRk7 eEsBoETDXOu/64i1OqZxRbFiXfu1H0ZW0UBB6V28NAu3f+6GlITPMLvgG9U8rFkC4I6q0tPhy05 iYcEZN9QYCxu5pVrxPgN7BQwiTrIg14Tr2McHlWt3/6yQRcBAVTKVsnlUjlmzy0aV1kcbz1wfep Or5t7p6EaWJn1qExvGlP7WBKzvelvgRRI8ee+bGv4mZlOdi9S2oGkMbdigLv4U7yrzPkzl0c+8/ QePyLoJt3JTiDUO+Y6ef+8zPGWTQT4CuMnH8lqS0UAZz//oh9pag19YjANs7wKErQCRw+IqklDF 9i4N/i9DcbGF2jKch1wzDVf3BvcPxKR97FLWxTPs6LUoQ= X-Received: by 2002:a05:600c:a11c:b0:47e:e2eb:bc22 with SMTP id 5b1f17b1804b1-48fe5fd536amr151451185e9.5.1779082284739; Sun, 17 May 2026 22:31:24 -0700 (PDT) Received: from foxbook (bfk48.neoplus.adsl.tpnet.pl. [83.28.48.48]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48feaa2c96csm76033455e9.2.2026.05.17.22.31.23 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Sun, 17 May 2026 22:31:24 -0700 (PDT) Date: Mon, 18 May 2026 07:31:21 +0200 From: Michal Pecio To: Greg KH , Alan Stern , Mathias Nyman Cc: "Xuetao (kirin)" , , , Subject: [PATCH v3 1/3] usb: core: Fix SuperSpeed root hub wMaxPacketSize Message-ID: <20260518073121.7bc1da0f.michal.pecio@gmail.com> In-Reply-To: <20260518073026.5580bb79.michal.pecio@gmail.com> References: <20260518073026.5580bb79.michal.pecio@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit There is no good reason to have wBytesPerInterval < wMaxPacketSize - either one is too low or the other too high, and we may want to warn about such descriptors. Start with cleaning up our own root hubs. USB 3.2 section 10.15.1 sets wMaxPacketSize and wBytesPerInterval of SuperSpeed hub status endpoints at 2 bytes, so reduce wMaxPacketSize from its former value of 4, which was derived from USB 2.0 spec and the kernel's USB_MAXCHILDREN limit. They don't apply because USB 3.2 10.15.2.1 specifies SuperSpeed hubs to have up to 15 ports. Suggested-by: Mathias Nyman Signed-off-by: Michal Pecio --- drivers/usb/core/hcd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index 89221f1ce769..b181b43a35dc 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c @@ -328,9 +328,7 @@ static const u8 ss_rh_config_descriptor[] = { USB_DT_ENDPOINT, /* __u8 ep_bDescriptorType; Endpoint */ 0x81, /* __u8 ep_bEndpointAddress; IN Endpoint 1 */ 0x03, /* __u8 ep_bmAttributes; Interrupt */ - /* __le16 ep_wMaxPacketSize; 1 + (MAX_ROOT_PORTS / 8) - * see hub.c:hub_configure() for details. */ - (USB_MAXCHILDREN + 1 + 7) / 8, 0x00, + 0x02, 0x00, /* __le16 ep_wMaxPacketSize; 2 bytes per USB3 10.15.1 */ 0x0c, /* __u8 ep_bInterval; (256ms -- usb 2.0 spec) */ /* one SuperSpeed endpoint companion descriptor */ -- 2.48.1