From patchwork Mon Sep 18 13:10:52 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: 13389614 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9A3C2CD37B0 for ; Mon, 18 Sep 2023 13:19:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=EhGmyI5HF6chO7FGcfy0FWbO8oh55RS5SXVhW4kXIyM=; b=rS9aO/tEv/GY+U Bc6wSL2CNPrp4/ZU6Gox+MRdPO6BrDM5tu9Xx3Fnol8TDWQxqcKopGvA61jJl+9lbnhNhsOcVTUFj 7wPU1+4jXeviiA+hvAhRtNhX8mV5Xw/mft9iUWCjiQoIkPWZbxEOzSSTeCFvXXzJy7jxk3y0CLiBp BWkiZ3odfMCin4OxlwGOmrs2XJb/Rf6hFRg75uAS0b6B9/F2C8cORHouqcfOXmWykgZrzP+RWP3el mqa057xD7ItZh9ePDFNf2QINo9BIgaiMj3k9V7qfe5niFj1j2fsStpaAaH+MhaOtBgkiiVKYM+zEv i/PKUiKQ+uC9NRCj0qmw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qiE9P-00FWab-0S; Mon, 18 Sep 2023 13:18:55 +0000 Received: from mgamail.intel.com ([134.134.136.100]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qiE9K-00FWXt-2T; Mon, 18 Sep 2023 13:18:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695043130; x=1726579130; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=GntG1C/Of1kw8Cak4jvrKOjbZB9Dh17vQJmAQuf8VNA=; b=eL7u45zipEtku7/bGnBSatSBQ5a8u5ddZm98SipC4RNsAzG1FoH/oy/b xxjmVRgdiegzUv3BtAxZ0Vl6PHUFiy8A5ptOuUzUHgy0suKVB1sdLD7It rpWxL9sGPkyZ9ZA6WASs+9mPddL3bMkml6Fer2aMU45bJpQ8L0S4Qj3oQ AGAPwX/2F0bocIFZh6DIIePdSFCQKKlV85U3vrRFgUm93O6jDErwvy/W7 2ocB03i6vuKsTuyXDEsgB6dIDt1ctY5flYRyFDFYHVAQG6EVe7uOrTewF MjHQjLjWapm0oUkUX6zJrhVtxGL8JLMFqsVMWn3NCWWGCFnB0Kpgan/If A==; X-IronPort-AV: E=McAfee;i="6600,9927,10837"; a="446112782" X-IronPort-AV: E=Sophos;i="6.02,156,1688454000"; d="scan'208";a="446112782" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Sep 2023 06:11:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10837"; a="811341486" X-IronPort-AV: E=Sophos;i="6.02,156,1688454000"; d="scan'208";a="811341486" Received: from nprotaso-mobl1.ccr.corp.intel.com (HELO ijarvine-mobl2.ger.corp.intel.com) ([10.252.49.156]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Sep 2023 06:11:37 -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 , linux-kernel@vger.kernel.org, Bjorn Helgaas Cc: ath10k@lists.infradead.org, ath11k@lists.infradead.org, ath12k@lists.infradead.org, intel-wired-lan@lists.osuosl.org, linux-arm-kernel@lists.infradead.org, linux-bluetooth@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-rdma@vger.kernel.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, =?utf-8?q?Ilpo_J?= =?utf-8?q?=C3=A4rvinen?= Subject: [PATCH v2 02/13] PCI/ASPM: Improve pci_set_default_link_state() kerneldoc Date: Mon, 18 Sep 2023 16:10:52 +0300 Message-Id: <20230918131103.24119-3-ilpo.jarvinen@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230918131103.24119-1-ilpo.jarvinen@linux.intel.com> References: <20230918131103.24119-1-ilpo.jarvinen@linux.intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230918_061850_844902_1E9FE9F9 X-CRM114-Status: GOOD ( 12.63 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 fc909e20365f..860bc94974ec 100644 --- a/drivers/pci/pcie/aspm.c +++ b/drivers/pci/pcie/aspm.c @@ -1102,14 +1102,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 + * + * 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) {