From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=192.198.163.16 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796308999; b=viFyJL0IxTKBdyYG7rjp00bB7sP0sQo/V5gKeD4xMiijp04qlkfd4KAQEubOPS/6hKs5 WBC1iohE6rqLIUf0WsnFZZDGNJj9BBsGVszCMhOmIEkniDYo53IZQT4AlsDv5DEFBL0zr 5mMSLXBBtV+NSt3oneioG+Y+2DcbltmFIJv1P50IoECcD2BmmWGK19zz0qLR2ORPJkNVM VAymSUulyVIn87F2HcpwQgFaaG1K/y8JLO19MIvPf33ni85vyuipWXhB1tdQUE9KGluiM vAhSSTRrSs3POUffuZVAuzkMnLu4agX1We/6bGBvMLpqGUHsvNfsrfk285+luNcVTfA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796308999; h=DMARC-Filter:DKIM-Signature:X-CSE-ConnectionGUID:X-CSE-MsgGUID: X-IronPort-AV:X-IronPort-AV:Received:X-CSE-ConnectionGUID: X-CSE-MsgGUID:X-ExtLoop1:X-IronPort-AV:Received:Received:From:To:Cc: Subject:Date:Message-ID:X-Mailer:MIME-Version: Content-Transfer-Encoding; bh=Z2zgNP6G17ap/d0jB7uTEcz8rXoYOT6uOIvZa+ywLNA=; b=lRcclFiJ4R79pF2Jj7I6RO+4eD/0DCagzBOHjzay/7nxtv3njlr55G12wpNgrTYI2OAI Ye8LZePAaKUUdQU6iUW/Wrbe4l9OTVDz4PARVpErl4tH8ZpUYdGxr2/cGwZ9udvIZDmqE 9vkyAVTRt7EMGQUt87SWgj7TeXlHoVgJZLqk1w3qCBLpLtK3v+H3tS4gRdh890hH9xKP7 eYp6pRe572seX4c8Ja+q1a9u1rtJ1GNsSSoKCmb9MLiOaF9++0acdl6spPKOP/pqYn7wA qfg/+hMjbgu6BeCfS9Su72KnokEB02Sz0AyKyeLD3C7Fu/8+osg9KkR98p9W038780g== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=XAkOld3r; arc=none smtp.remote-ip=192.198.163.16 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.16]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AB144606A33E for ; Thu, 3 Dec 2026 14:43:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org AB144606A33E Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=XAkOld3r DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796308999; x=1827844999; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=Z2zgNP6G17ap/d0jB7uTEcz8rXoYOT6uOIvZa+ywLNA=; b=XAkOld3rhMSgnR+trnWW0XaoacQZESx6YQUlosLrp0tgmZ4YCPDwIlm9 Sw1qkMfRmqF20MmMTa/IX//nlIC8X6Bl3YrHUvgJcS8YsYPIovJUuxgLl dNK5Ei2jP1YI5crjjmTWroVmAnrJ1meaVZH55Xfd44OS47CHLiadWigo2 yzc9s3m+Xahu8kLJu/7AXKi6VNLeW5y4Zg4pAL5gMSsHTnPXcjDfh5LHn f+upeUiMRdFY4+T5dqTUrypSvpqM7235NUBXn9WVrCeudAdzTK17rhdMy VJM+75OV9X5OjPb+zNcecZNshiRkQyYpUMMPx1VBnsiYB1RKOm6Vjvnfm A==; X-CSE-ConnectionGUID: Nuz02ZfhSbmu127ypzeIQQ== X-CSE-MsgGUID: dDQl73IDQ/e0+r/GLVWMdw== X-IronPort-AV: E=McAfee;i="6800,10657,11984"; a="5276250" X-IronPort-AV: E=Sophos;i="6.29,248,1794902400"; d="scan'208";a="5276250" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa110.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2026 06:43:14 -0800 X-CSE-ConnectionGUID: 6Ej6IdYzR7+hCOXMvdZpXw== X-CSE-MsgGUID: m/KcJYj2RgOxSz/B4FwSDQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.29,248,1794902400"; d="scan'208";a="13659652" Received: from black.igk.intel.com ([10.91.253.5]) by orviesa005.jf.intel.com with ESMTP; 03 Dec 2026 06:43:14 -0800 Received: by black.igk.intel.com (Postfix, from userid 1058) id B619398; Thu, 03 Dec 2026 15:43:12 +0100 (CET) From: Niklas Neronin To: mathias.nyman@linux.intel.com Cc: linux-usb@vger.kernel.org, Niklas Neronin Subject: [PATCH v3 00/12] usb: xhci: rework xHCI Port macros Date: Thu, 3 Dec 2026 15:42:32 +0100 Message-ID: <20261203144244.1680587-1-niklas.neronin@linux.intel.com> X-Mailer: git-send-email 2.50.1 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-Transfer-Encoding: 8bit This series cleans up the xHCI port register macros in xhci-port.h: PORTSC, PORTPMSC, PORTLI and PORTHLPMC. Many fields are defined as pre-shifted values, together with helper macros that mask, shift and compare them. This series defines each field with GENMASK()/BIT(), uses plain field values, and accesses the fields with FIELD_GET(), FIELD_PREP() and FIELD_MODIFY(). Register comments are aligned with the xHCI specification, and the PORTSC field macros are renamed to the spec abbreviations. This is part 1 of the port register cleanup. v3 changes: * Dropped the second half of the original patch series. The remaining patches are relatively small reworks. The second half will be submitted separately. * Updated all commit messages. Niklas Neronin (12): usb: xhci: use BIT() for single bit port register flags usb: xhci: rework Port Speed macros usb: xhci: rework Port Link State macros usb: xhci: rework Port Indicator Control macro usb: xhci: rework USB3 PORTPMSC macros usb: xhci: rework USB2 PORTPMSC macros usb: xhci: rework USB3 PORTLI macros usb: xhci: rework USB2 PORTLI macros usb: xhci: document USB3 PORTHLPMC register layout usb: xhci: rework USB2 PORTHLPMC macros usb: xhci: update port register bitfield comments for consistency usb: xhci: rename PORTSC field macros to xHCI spec abbreviations drivers/usb/dwc3/host.c | 2 +- drivers/usb/early/xhci-dbc.c | 4 +- drivers/usb/host/xhci-debugfs.c | 23 +-- drivers/usb/host/xhci-hub.c | 225 ++++++++++++------------ drivers/usb/host/xhci-pci.c | 4 +- drivers/usb/host/xhci-port.h | 293 ++++++++++++++++++-------------- drivers/usb/host/xhci-ring.c | 25 ++- drivers/usb/host/xhci-tegra.c | 23 +-- drivers/usb/host/xhci.c | 24 +-- drivers/usb/host/xhci.h | 65 ++++--- 10 files changed, 370 insertions(+), 318 deletions(-) -- 2.50.1