From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com [209.85.208.176]) (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 3EFFB391840 for ; Thu, 23 Apr 2026 09:06:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776935216; cv=none; b=khtLQECOdCJR9kWb7FINC8mw7FZ/ttYSvXtBYlBMpucRP4K1Bm3ykA2l8Ub15OzkxKYsoSzdsUfuNM0AMpjSZ0Aom8cYL6cFzQ+yUS2M28hLPl6VR63db8Xm7UU7ZrvRvzu3A8TJypvItL0KtJktUNOuUKHE4LpYFAEU3voOeog= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776935216; c=relaxed/simple; bh=ekBPy6xnya2iJzaxncPdTe/UgC/zfxmBeyK3mGiBHAI=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=GpJ7LXHhAA2qxqbYpkYtJCfltJE6X/tGxM4uG48Ktr4V7/9I23YbjfgfPT9H1iPEahFKzhdCvo7faYib8izl2GZCFxT88IzxSZs4WutZKSwo7G7/bsN5DC7RD2rU8oALc3oFWaXBCgsGsN8VdpoLEDhEFJHmbiYpLiFU60ygyuU= 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=ncAOlOfo; arc=none smtp.client-ip=209.85.208.176 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="ncAOlOfo" Received: by mail-lj1-f176.google.com with SMTP id 38308e7fff4ca-38be5e86918so73857831fa.3 for ; Thu, 23 Apr 2026 02:06:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1776935212; x=1777540012; 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=PZEJokfOZmv1qCJyESOa1O3xCJORWT+u8SCkhe3TFhk=; b=ncAOlOfopIymhadmvLeWmG93rkBGW913wWclMBPgZYGm8q4VacOomDIfpQWRmbmF3x RD/ukd7E+qeZwYYtpgfwojcX3NQhvVbKNE+LiM4Gxn7tCMsjS2UPTTloKii/maLxvGg5 cpFrQL6SQaPtJfsu8dhyzsJ7h+gXO8SIMH0aba5HbD/nv0p3B+BZpDSAZQYLcByEGdKm MK8VrpHJD29KXn2w9K6XLecSWhmEsTAIrESCKpkEX9HgGb35r/qNwb1zDCXNuta+kZH4 5dzXTt3bMoDANTAP2osuhgJS6M/VKcOsGEzeaWHLTPFCOPG0Lxyh8CDqDnb7X0/+6YnD tlkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776935212; x=1777540012; 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=PZEJokfOZmv1qCJyESOa1O3xCJORWT+u8SCkhe3TFhk=; b=dBkQ+FKrhFBFVVSkP3xOqHUamntD966NdHXB4/5m3II3IoGZ/staxjA9R1qksOA/Cz gE82fJXeB9iWySoDDxt3t6YnXlFPG98xRjXcwTA4/lWsn/43tD30FwMDlXII4cutkngU LLcL/o3DiC5Utkq0Y9g4X0b8dK8LQiLJ8X8GuvyeHJbAAo0LGOluMdu8DLRZMIj1DQ5k 537svijW4NXrt8RugiO2iF2jx+O6EDWDy/7wTvPKLrvOGOWi1Tl30g0BPYnetu+cUih4 Yh91Zt2/8DbHaVRAvlmIBDGFQ2xUJVnjvy6zeL/Xf7ixXzDtaUUmRp7Bd0wRUk7tu5rW dQzA== X-Forwarded-Encrypted: i=1; AFNElJ8SfUzKlUBy/nEaT4l9TxH3DzTqkkQfnhaw+nTjlPk2uvZS+KpbLCXT9m7an7y40ZPHQJzXlNF1WwvLJps=@vger.kernel.org X-Gm-Message-State: AOJu0YxKFgSnS48+sQRxudE6GcXNtivRwUc3hvW0G5g0nxEdCSplCzn9 VCqhnxlS+rMfoOR4oCktbTFsU7rBsycV1DQs6xgsiQlcWXJDW2J7pvle X-Gm-Gg: AeBDievLYsxeCrcywp8nHeeqxDW5yhpONWjyN2MqYtmaG9qXnkmay6GZ3y3Tu2aPOqL Jt6/+5aOwM42NNERswHQH7Z7GO9F8kqAWN6HKZKql5CbJI5v5GsN2fgTfAXD6fUOPZCY+4Y7iHs nX9zIe8DaiFwFkTXH09F+YpvzKGDLcLiUg5S6jca9PNnp2xkBz4SnMiQH5ab8GdJpPX3OPAg7KJ ymgvI2TLb1NfOOkF87hqV4/i1S801b+8iEEdbKnoGx541Y2W+KQ6LT33LOMVWojnNVpIT5bpTM+ F3JMNtkYA8NrQNmYGdPYYN3s2zHFjjF3l1wcH6hDqsNWiMv1FAcyJrtaXR1BAQh0Ifh/mocEvkP 8/C2jUqN2eZLWAqcsvLMDCq6/ajIaWK9EEJMZvC+O+CW+iE46Ki9IU/Gm2RfO6Hhx8fx16uv+9z UvuBpBaodMzrT6khYwbB5/Mu95X/miWosXZfEsKRRVXeE= X-Received: by 2002:a05:651c:41dc:b0:38e:85a3:fdf5 with SMTP id 38308e7fff4ca-38ec7aa49c7mr82018051fa.18.1776935212249; Thu, 23 Apr 2026 02:06:52 -0700 (PDT) Received: from foxbook (bfh75.neoplus.adsl.tpnet.pl. [83.28.45.75]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-38ecb4f5125sm40606501fa.8.2026.04.23.02.06.51 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Thu, 23 Apr 2026 02:06:51 -0700 (PDT) Date: Thu, 23 Apr 2026 11:06:48 +0200 From: Michal Pecio To: "Xuetao (kirin)" Cc: Greg KH , Alan Stern , , , , Subject: [PATCH 1/2] usb: core: Fix root hub descriptor wBytesPerInterval Message-ID: <20260423110648.158ec861.michal.pecio@gmail.com> In-Reply-To: <20260423110517.664745da.michal.pecio@gmail.com> References: <20260402021400.28853-1-xuetao09@huawei.com> <2026040241-purveyor-bakery-a9f1@gregkh> <74f1bb0d-24c3-44be-9583-0585863cdae3@rowland.harvard.edu> <2026040221-reclusive-garland-6281@gregkh> <00ad170a-2546-4d7a-8f8b-af6d46e09a73@huawei.com> <20260423110517.664745da.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 Per USB3 9.6.7, it's "the total number of bytes this endpoint will transfer every service interval". There seems to be no good reason to have wBytesPerInterval < wMaxPacketSize - either one is too low or the other too high. Here, wBytesPerInterval is too low for hubs with more than 15 ports and xHCI spec allows such root hubs. This is inconsequential for emulated root hubs, but we may want to override and log suspiciously low wBytesPerInterval in descriptors, so fix this to prevent nuisance warnings. Signed-off-by: Michal Pecio --- drivers/usb/core/hcd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index 89221f1ce769..fc8130f94ca5 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c @@ -339,7 +339,8 @@ static const u8 ss_rh_config_descriptor[] = { /* Companion */ 0x00, /* __u8 ss_bMaxBurst; allows 1 TX between ACKs */ 0x00, /* __u8 ss_bmAttributes; 1 packet per service interval */ - 0x02, 0x00 /* __le16 ss_wBytesPerInterval; 15 bits for max 15 ports */ + /* __le16 ss_wBytesPerInterval; same as wMaxPacketSize */ + (USB_MAXCHILDREN + 1 + 7) / 8, 0x00, }; /* authorized_default behaviour: -- 2.48.1