From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796309437; b=LAjNOgXe74rqWqXH1eLGE2yyz1jQoynCAwvvMIDakNsQo5KFe5WZO6lzXhck3zsmaW+q vBxdoq/1t/vJRyA4MI4OHGOFraD2U8tTLORsxhblnQAjbQoAxQFKPFc9lmDgxm5vNuFND kYErjiaNboHs62RcA75la7DcqNNyo/QLubG7so2za2eNdcfDEZrjrotsXMza2PkxTp0QR 4Bq8M4iupRrcLr/2QlYHZYy2LFxtjlGG1bFEO1c/qLov9jdDcn2wEtqDK7dLAxZnJHreC HGMQVZAzm9jxffvl+ARG2mWKjX9Y6lfbUsJUWQNTvk+fcd4m39defvm45RzxTrf5C3Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796309437; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=W1ZEP0ndmVw7pq5H0DgsbojFq99kK8Ap9r9noPkcxas=; b=ei0wTQRjADzMGkzlr160mK4MynJP1tFyBpU4+1+EM92V69fb3jHWZedmDuS1cEyqucjv gXxfGgms6RyXpIVqkUtFtyBEjei2YZZwNEp0HOIxoLF+fEfSPst/LdodFYbs6gtHcc3H8 uxVRXKBWVW0iocz56nqWldme7YnQpBAAGNWEBLDdYynSLuyKgjndtCwNUCo1jmWdP2UEQ cc1NEPLjiXGvYJ1YP5mHs6C4FI9xKZLE44IX7r+BoObiXePcdKSMam2cXs/Qwkq+GSReo OnggJIfOpQFABfeJOOeFI4hacXCC3lCUOkVugFy00wengljxkqg3RX5hMpwyeZBxrXw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=KgjPyMFz; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6797A606A322 for ; Thu, 3 Dec 2026 14:50:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=KgjPyMFz Received: by smtp.kernel.org (Postfix) with ESMTPSA id D6B061F000C1; Thu, 3 Dec 2026 14:50:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796309437; bh=W1ZEP0ndmVw7pq5H0DgsbojFq99kK8Ap9r9noPkcxas=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=KgjPyMFzVnjdYyeey+7C+4jB5n+qgAMJ5kTtQJSSgVmoUwyUGxeY93NQJtz/RJnp+ Il+sc+OF6b61JF/mZKhRJf9IR2ve4qSN0x2XVafFvsNipfG+UduNTmSSEFOyCBypHs ayoZzVROaf6BtzagUJbFIJTGBnFYdgSzatoWQFhTBK3LqdQmdtubtTtkbdyqqNnlqp bRCS7lE2iJj5sguntQn/9JsPmA2hrGPAL39tm+rLg/ycI/ky0WfsjYOaOPGw77jD2r a7swiwk/PvBnd167zBkBCwA2ockPbL0+lGtyajDJlHEd0oHxJ74tVUhLr6KBOHFPr0 BZ696PzzHukYQ== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v3 05/12] usb: xhci: rework USB3 PORTPMSC macros Reply-To: sashiko-reviews@lists.linux.dev To: "Niklas Neronin" Cc: linux-usb@vger.kernel.org In-Reply-To: <20261203144244.1680587-6-niklas.neronin@linux.intel.com> References: <20261203144244.1680587-1-niklas.neronin@linux.intel.com> <20261203144244.1680587-6-niklas.neronin@linux.intel.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Thu, 03 Dec 2026 14:50:36 +0000 X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Low] usb: xhci: PORTPMSC comments omit reserved values claimed in commit message -- commit 566b043ef88e37f2c0ec0cdfe002e8e9bd68833e Author: Niklas Neronin usb: xhci: rework USB3 PORTPMSC macros This commit replaces PORT_U1_TIMEOUT() and PORT_U2_TIMEOUT() with GENMASK() masks and FIELD_MODIFY(), and updates the USB3 PORTPMSC register comments in xhci-port.h. > - document the valid, reserved and infinite U1/U2 Timeout values [ ... ] > diff --git a/drivers/usb/host/xhci-port.h b/drivers/usb/host/xhci-port.h > index 40e403a46b20e..fc87d4cacfbe5 100644 > --- a/drivers/usb/host/xhci-port.h > +++ b/drivers/usb/host/xhci-port.h > @@ -116,16 +116,19 @@ > /* We mark duplicate entries with -1 */ > #define DUPLICATE_ENTRY ((u8)(-1)) > =20 > -/* Port Power Management Status and Control - port_power_base bitmasks */ > -/* Inactivity timer value for transitions into U1, in microseconds. > - * Timeout can be up to 127us. 0xFF means an infinite timeout. > +/* USB3 Port Power Management Status and Control (PORTPMSC) 5.4.9.1 */ > +/* > + * bits 7:0 - U1 Timeout, inactivity timer value for transitions into U1. > + * Timeout can be 0 to 127us, in 1us increments and 0xff is infinite tim= eout. > + */ > +#define PORT_U1_TIMEOUT_MASK GENMASK(7, 0) > +/* > + * bits 15:8 - U2 Timeout, inactivity timer value for transitions into U= 2. > + * Timeout can be 0 to 65024us, in 256us increments and 0xff is infinite= timeout. > */ > -#define PORT_U1_TIMEOUT(p) ((p) & 0xff) > -#define PORT_U1_TIMEOUT_MASK 0xff > -/* Inactivity timer value for transitions into U2 */ > -#define PORT_U2_TIMEOUT(p) (((p) & 0xff) << 8) > -#define PORT_U2_TIMEOUT_MASK (0xff << 8) > -/* Bits 24:31 for port testing */ > +#define PORT_U2_TIMEOUT_MASK GENMASK(15, 8) [Severity: Low] The commit message says the comments document the reserved U1/U2 Timeout values, but neither comment mentions reserved values. In xHCI 5.4.9.1, values 0x80 to 0xfe are reserved for U1 Timeout, while U2 Timeout has no reserved encodings since 0x00 through 0xfe cover 0 to 65024us. Should the U1 Timeout comment note that 0x80 to 0xfe are reserved, or should the commit message be updated to match the comments? --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261203144244.1680= 587-1-niklas.neronin@linux.intel.com?part=3D5