diff mbox series

PCI: endpoint: Improve reference in pci_epc_bar_size_to_rebar_cap() comment

Message ID 20250219171454.2903059-2-cassel@kernel.org (mailing list archive)
State Accepted
Delegated to: Manivannan Sadhasivam
Headers show
Series PCI: endpoint: Improve reference in pci_epc_bar_size_to_rebar_cap() comment | expand

Commit Message

Niklas Cassel Feb. 19, 2025, 5:14 p.m. UTC
Improve the reference pci_epc_bar_size_to_rebar_cap() comment to include
a specific PCIe spec version, and a specific section in that PCIe spec.

Suggested-by: Bjorn Helgaas <helgaas@kernel.org>
Signed-off-by: Niklas Cassel <cassel@kernel.org>
---
Feel free to squash with original commit.

 drivers/pci/endpoint/pci-epc-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Manivannan Sadhasivam Feb. 19, 2025, 5:25 p.m. UTC | #1
On Wed, Feb 19, 2025 at 06:14:55PM +0100, Niklas Cassel wrote:
> Improve the reference pci_epc_bar_size_to_rebar_cap() comment to include
> a specific PCIe spec version, and a specific section in that PCIe spec.
> 
> Suggested-by: Bjorn Helgaas <helgaas@kernel.org>
> Signed-off-by: Niklas Cassel <cassel@kernel.org>
> ---
> Feel free to squash with original commit.

Done, thanks!

- Mani

> 
>  drivers/pci/endpoint/pci-epc-core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/endpoint/pci-epc-core.c b/drivers/pci/endpoint/pci-epc-core.c
> index 5d6aef956b13..88cb426d3aec 100644
> --- a/drivers/pci/endpoint/pci-epc-core.c
> +++ b/drivers/pci/endpoint/pci-epc-core.c
> @@ -649,7 +649,7 @@ EXPORT_SYMBOL_GPL(pci_epc_set_bar);
>  int pci_epc_bar_size_to_rebar_cap(size_t size, u32 *cap)
>  {
>  	/*
> -	 * According to PCIe base spec, min size for a resizable BAR is 1 MB,
> +	 * As per PCIe r6.0, sec 7.8.6.2, min size for a resizable BAR is 1 MB,
>  	 * thus disallow a requested BAR size smaller than 1 MB.
>  	 * Disallow a requested BAR size larger than 128 TB.
>  	 */
> -- 
> 2.48.1
>
diff mbox series

Patch

diff --git a/drivers/pci/endpoint/pci-epc-core.c b/drivers/pci/endpoint/pci-epc-core.c
index 5d6aef956b13..88cb426d3aec 100644
--- a/drivers/pci/endpoint/pci-epc-core.c
+++ b/drivers/pci/endpoint/pci-epc-core.c
@@ -649,7 +649,7 @@  EXPORT_SYMBOL_GPL(pci_epc_set_bar);
 int pci_epc_bar_size_to_rebar_cap(size_t size, u32 *cap)
 {
 	/*
-	 * According to PCIe base spec, min size for a resizable BAR is 1 MB,
+	 * As per PCIe r6.0, sec 7.8.6.2, min size for a resizable BAR is 1 MB,
 	 * thus disallow a requested BAR size smaller than 1 MB.
 	 * Disallow a requested BAR size larger than 128 TB.
 	 */