Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.0/patches/2220095/?format=api
{ "id": 2220095, "url": "http://patchwork.ozlabs.org/api/1.0/patches/2220095/?format=api", "project": { "id": 28, "url": "http://patchwork.ozlabs.org/api/1.0/projects/28/?format=api", "name": "Linux PCI development", "link_name": "linux-pci", "list_id": "linux-pci.vger.kernel.org", "list_email": "linux-pci@vger.kernel.org", "web_url": null, "scm_url": null, "webscm_url": null }, "msgid": "<20260406104708.1218648-2-18255117159@163.com>", "date": "2026-04-06T10:47:06", "name": "[v5,1/3] PCI: Add public pcie_valid_speed() for shared validation", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "2669b45eea7dcbce7fc0ffadaf64e5cfcaa382ee", "submitter": { "id": 89937, "url": "http://patchwork.ozlabs.org/api/1.0/people/89937/?format=api", "name": "Hans Zhang", "email": "18255117159@163.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260406104708.1218648-2-18255117159@163.com/mbox/", "series": [ { "id": 498838, "url": "http://patchwork.ozlabs.org/api/1.0/series/498838/?format=api", "date": "2026-04-06T10:47:06", "name": "PCI: Refactor PCIe speed validation and conversion functions", "version": 5, "mbox": "http://patchwork.ozlabs.org/series/498838/mbox/" } ], "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2220095/checks/", "tags": {}, "headers": { "Return-Path": "\n <linux-pci+bounces-51943-incoming=patchwork.ozlabs.org@vger.kernel.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "linux-pci@vger.kernel.org" ], "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=163.com header.i=@163.com header.a=rsa-sha256\n header.s=s110527 header.b=joq/718F;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c15:e001:75::12fc:5321; helo=sin.lore.kernel.org;\n envelope-from=linux-pci+bounces-51943-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)", "smtp.subspace.kernel.org;\n\tdkim=pass (1024-bit key) header.d=163.com header.i=@163.com\n header.b=\"joq/718F\"", "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=220.197.31.5", "smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=163.com", "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=163.com" ], "Received": [ "from sin.lore.kernel.org (sin.lore.kernel.org\n [IPv6:2600:3c15:e001:75::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fq5dS0H6cz1xy1\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 06 Apr 2026 20:47:55 +1000 (AEST)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sin.lore.kernel.org (Postfix) with ESMTP id BAC12300461B\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 6 Apr 2026 10:47:53 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id DD76C3090D7;\n\tMon, 6 Apr 2026 10:47:49 +0000 (UTC)", "from m16.mail.163.com (m16.mail.163.com [220.197.31.5])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 4B96E288505;\n\tMon, 6 Apr 2026 10:47:47 +0000 (UTC)", "from Precision-7960.. (unknown [])\n\tby gzsmtp3 (Coremail) with SMTP id PigvCgDXX3Qwj9NpKHYUAA--.1246S3;\n\tMon, 06 Apr 2026 18:47:18 +0800 (CST)" ], "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1775472469; cv=none;\n b=UtDiTDUKvXUnP9qHYQmgO+qd2OCQQ7NssPzqnOhAQ8JeosqpDfNqgsXkvkCbh7wmGGfKEkWUkq15oPS6fM8knf/dqjbJeCjrgaAvb0rLa9GUeFDautA5s58GmEc+K6f0G2NeIOWPaKM8LnQINi29rOsButphkKu13OduFCmEUTE=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1775472469; c=relaxed/simple;\n\tbh=K5Y0PBLnucTW3zOL2uWce0Kl7pET+ylirq39OJDQdRY=;\n\th=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:\n\t MIME-Version;\n b=PU0EtFcUsoqw/HVPD/syGhjIlUjAoCWFNCgtej2mBEqPpGCntUQDLKNXKiLmgiLmqq11e3zft21CuFb1YTErBiXe27WNYLbtKtQ7Z+Ay6GmEDd+Z7KdnJYUndLDfj45F/Hw1VySPR03ucMS4ozE3j9Oby+r1OhJP2dAGMbGENQA=", "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=163.com;\n spf=pass smtp.mailfrom=163.com;\n dkim=pass (1024-bit key) header.d=163.com header.i=@163.com\n header.b=joq/718F; arc=none smtp.client-ip=220.197.31.5", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com;\n\ts=s110527; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=2A\n\tiyRk9VuZ8SjJ/3y8MHKB5yKl6vNqKwzPKLEYzjPaw=; b=joq/718FEvRJzjRIjH\n\twYBmvGwRIzVgdk9bh3UFTHXTFtianlsUit7ovRriYXX8CLPsFObGJYImsGkBXK4L\n\t4RB/S4pPBziWoIdkgcmkdrVwULbIAxQ3nxWHIliLSyLfM4725Xprp7+3KgULJE5X\n\tkb+PziVzR41+2lhFdKGhCkhg4=", "From": "Hans Zhang <18255117159@163.com>", "To": "bhelgaas@google.com,\n\tlpieralisi@kernel.org,\n\tkw@linux.com,\n\tkwilczynski@kernel.org,\n\tmani@kernel.org,\n\tilpo.jarvinen@linux.intel.com,\n\tjingoohan1@gmail.com", "Cc": "robh@kernel.org,\n\tlinux-pci@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org,\n\tHans Zhang <18255117159@163.com>", "Subject": "[PATCH v5 1/3] PCI: Add public pcie_valid_speed() for shared\n validation", "Date": "Mon, 6 Apr 2026 18:47:06 +0800", "Message-Id": "<20260406104708.1218648-2-18255117159@163.com>", "X-Mailer": "git-send-email 2.34.1", "In-Reply-To": "<20260406104708.1218648-1-18255117159@163.com>", "References": "<20260406104708.1218648-1-18255117159@163.com>", "Precedence": "bulk", "X-Mailing-List": "linux-pci@vger.kernel.org", "List-Id": "<linux-pci.vger.kernel.org>", "List-Subscribe": "<mailto:linux-pci+subscribe@vger.kernel.org>", "List-Unsubscribe": "<mailto:linux-pci+unsubscribe@vger.kernel.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-CM-TRANSID": "PigvCgDXX3Qwj9NpKHYUAA--.1246S3", "X-Coremail-Antispam": "1Uf129KBjvJXoW7urW5CF43uw45Xw15KF43trb_yoW8WrWxpa\n\tyDAFyYyF18Aa15XF4Dta18ZFy5uFZayrW0krW3u39xZF13A3s3Ja45tay8tryaqrWIvF1U\n\tJa1YyF18Ca1jyF7anT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2\n\t9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x0pRxnYrUUUUU=", "X-CM-SenderInfo": "rpryjkyvrrlimvzbiqqrwthudrp/xtbC7BZA42nTjzb6zgAA3u" }, "content": "Extract the PCIe speed validation logic from bwctrl.c's static\npcie_valid_speed() into a public static inline function in pci.h.\n\nThis allows consistent speed range checks (2.5GT/s to 64.0GT/s) across\nmultiple drivers and functions, avoiding duplicate code and ensuring\nvalidation consistency as per PCIe specifications.\n\nSigned-off-by: Hans Zhang <18255117159@163.com>\n---\n drivers/pci/pci.h | 5 +++++\n drivers/pci/pcie/bwctrl.c | 5 -----\n 2 files changed, 5 insertions(+), 5 deletions(-)", "diff": "diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h\nindex 4a14f88e543a..f0a082bfd6f1 100644\n--- a/drivers/pci/pci.h\n+++ b/drivers/pci/pci.h\n@@ -606,6 +606,11 @@ void pci_bus_put(struct pci_bus *bus);\n \t (speed) == PCIE_SPEED_2_5GT ? 2500*8/10 : \\\n \t 0)\n \n+static inline bool pcie_valid_speed(enum pci_bus_speed speed)\n+{\n+\treturn (speed >= PCIE_SPEED_2_5GT) && (speed <= PCIE_SPEED_64_0GT);\n+}\n+\n static inline int pcie_dev_speed_mbps(enum pci_bus_speed speed)\n {\n \tswitch (speed) {\ndiff --git a/drivers/pci/pcie/bwctrl.c b/drivers/pci/pcie/bwctrl.c\nindex c4c8d260bf96..ea82e326f164 100644\n--- a/drivers/pci/pcie/bwctrl.c\n+++ b/drivers/pci/pcie/bwctrl.c\n@@ -48,11 +48,6 @@ struct pcie_bwctrl_data {\n /* Prevent port removal during Link Speed changes. */\n static DECLARE_RWSEM(pcie_bwctrl_setspeed_rwsem);\n \n-static bool pcie_valid_speed(enum pci_bus_speed speed)\n-{\n-\treturn (speed >= PCIE_SPEED_2_5GT) && (speed <= PCIE_SPEED_64_0GT);\n-}\n-\n static u16 pci_bus_speed2lnkctl2(enum pci_bus_speed speed)\n {\n \tstatic const u8 speed_conv[] = {\n", "prefixes": [ "v5", "1/3" ] }