From patchwork Fri Jun 2 11:47:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ilpo_J=C3=A4rvinen?= X-Patchwork-Id: 102512 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp969550vqr; Fri, 2 Jun 2023 04:57:32 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7ehuuPX4z/0mah0VgUumtNYG0xcc82RnezeTOJkWZOYYUZav8ZQXkACK3cRiFEZ20OLybB X-Received: by 2002:a17:903:249:b0:1af:a2a4:8379 with SMTP id j9-20020a170903024900b001afa2a48379mr1468030plh.17.1685707052442; Fri, 02 Jun 2023 04:57:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685707052; cv=none; d=google.com; s=arc-20160816; b=pV1pXhnXiyZIth0jEcgSRi4pttzAn6ATiW5oNFA+3OaS9rU168Xno5XKhTMBZxiRc5 d3XOXex98l/B/l0ktuFQfgnPhui41V1ZSm/HzC1w0e4CmNJ/MYvLWpjr6DucweKQ4Wds 7JwZxBbmoiOK6wjz/0H4WSIrA8NZCM/ceIaJjoTM/I+/wgjAbNRAvdA4+mgXPpy7rP+w 851NJPKqccfFsRV4VX+HLOcynkAwG2xAt+QwE/U+spTUf7RVZh/ouopZHSo+7tmCy0wf w0fs/zVr1tDOvH947i8wu46MA+YorF88Z5CEUvySOTZiK8KryQLYJeUMfd+Kio70mUss EF+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=6m8xHyEGGA88+lDtKUiqyWPtDh/0RscvNA7OWO0+YS0=; b=a6UUdbtGCv5LKTq+CXkxzdc8uzfp4G7YLV42/P0Ikx2QNVXUyf3okb23L1zb68Yepg tC+Rw8ZRsSEN5JpbYbPOf4Aye/U1DJZDv7Dbaylb7zhxQsw21SmK5qHj6tvIQD1iskOv XKmEFhmPjCUl6tkUMkRJg5E59K8nX9m/39O90O8tQoVtfOORvTouQD0yf/rLlqW+vNfP 7xNT5WpLqlzaPrdjg9Bx0mQtpJfqNpimhdFc0desaxXEwY2L6UAHeUoMrsnr8tpmDg3i jOjNMNZ7tIR4eN3/Wq3u3Svrs/b+LjdtW61iU/IkrTRJu7bC+jm7YqCDftQXJp0ct2Ek v5zA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=DgcC+AbP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e23-20020a170902ed9700b001b04c773ce2si753723plj.541.2023.06.02.04.57.17; Fri, 02 Jun 2023 04:57:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=DgcC+AbP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235231AbjFBLtI (ORCPT + 99 others); Fri, 2 Jun 2023 07:49:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37180 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235184AbjFBLtB (ORCPT ); Fri, 2 Jun 2023 07:49:01 -0400 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9236F10C4; Fri, 2 Jun 2023 04:48:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1685706511; x=1717242511; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=wuhMVA9R70dv8zCl7j+RyC0Woig16drv2hvDBVun3EM=; b=DgcC+AbPeVQgxvi1LkAlD+MrTdAIzshgbqVGX7aFN2aqv3DrgPCjEKnS M6D67aevqPUVi/4whyqDxL1u65kOfFZzxFUo2a57AjTzE5pkaDEbmkRJl xco3Mvyg3gu0XcCQfiQn9S3mWOfzmkYHJrSnWva+Mn/9acx/9XEaNfj88 dmSYf/0VRwkd3tx5H8mKkggf+BRenPR2o7OKX68/dev4n8h1IRsotwB7U dmDh8seUY6sqxZNidcxl3Ib3evxKqQrrrJaEDn5QEghDLF+JZuhbmrbtV 8j5gDlkAApxmge748cAvI2JCdLmqvrkB1NvflJiwGZmn5ewJSh3yKNcv6 g==; X-IronPort-AV: E=McAfee;i="6600,9927,10728"; a="358279642" X-IronPort-AV: E=Sophos;i="6.00,212,1681196400"; d="scan'208";a="358279642" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jun 2023 04:48:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10728"; a="707819423" X-IronPort-AV: E=Sophos;i="6.00,212,1681196400"; d="scan'208";a="707819423" Received: from rspatil-mobl3.gar.corp.intel.com (HELO ijarvine-MOBL2.ger.corp.intel.com) ([10.251.208.112]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jun 2023 04:48:15 -0700 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= To: linux-pci@vger.kernel.org, Bjorn Helgaas , Lorenzo Pieralisi , Rob Herring , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Lukas Wunner , "Rafael J . Wysocki" , Heiner Kallweit , Emmanuel Grumbach , Bjorn Helgaas , linux-kernel@vger.kernel.org Cc: =?utf-8?q?Ilpo_J=C3=A4rvinen?= Subject: [RFC PATCH v1 03/13] PCI/ASPM: Improve pci_set_default_link_state() kerneldoc Date: Fri, 2 Jun 2023 14:47:40 +0300 Message-Id: <20230602114751.19671-4-ilpo.jarvinen@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230602114751.19671-1-ilpo.jarvinen@linux.intel.com> References: <20230602114751.19671-1-ilpo.jarvinen@linux.intel.com> MIME-Version: 1.0 X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767591957953328931?= X-GMAIL-MSGID: =?utf-8?q?1767591957953328931?= Improve pci_set_default_link_state() documentation: - Note the link state may get changed if the default policy is in use - Better follow kerneldoc formatting guidelines (separate description block and return entries) Signed-off-by: Ilpo Järvinen --- drivers/pci/pcie/aspm.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c index 9fa8ab6eb7a4..33ee2b563a39 100644 --- a/drivers/pci/pcie/aspm.c +++ b/drivers/pci/pcie/aspm.c @@ -1157,14 +1157,18 @@ int pci_disable_link_state(struct pci_dev *pdev, int state) EXPORT_SYMBOL(pci_disable_link_state); /** - * pci_set_default_link_state - Clear and set the default device link state so - * that the link may be allowed to enter the specified states. Note that if the - * BIOS didn't grant ASPM control to the OS, this does nothing because we can't - * touch the LNKCTL register. Also note that this does not enable states - * disabled by pci_disable_link_state(). Return 0 or a negative errno. - * + * pci_set_default_link_state - Set the default device link state * @pdev: PCI device * @state: Mask of ASPM link states to enable + * + * Clear and set the default device link state so that the link may be + * allowed to enter the specified states. If the default policy is in use, + * the link state may also be updated to reflect the new default link state. + * Note that if the BIOS didn't grant ASPM control to the OS, this does + * nothing because we can't touch the LNKCTL register. Also note that this + * does not enable states disabled by pci_disable_link_state(). + * + * Return: 0 or a negative errno. */ int pci_set_default_link_state(struct pci_dev *pdev, int state) {