Re: [PATCH 15/18] cxl: Move identify and partition query from pci probe to port probe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 06 Feb 2023 13:51:37 -0700
Dave Jiang <dave.jiang@xxxxxxxxx> wrote:

> Move the enumeration of device capacity to cxl_port_probe() from
> cxl_pci_probe(). The size and capacity information should be read
> after cxl_await_media_ready() so the data is valid.
> 
> Signed-off-by: Dave Jiang <dave.jiang@xxxxxxxxx>
Fix?

> ---
>  drivers/cxl/pci.c  |    8 --------
>  drivers/cxl/port.c |    8 ++++++++
>  2 files changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/cxl/pci.c b/drivers/cxl/pci.c
> index 258004f34281..e35ed250214e 100644
> --- a/drivers/cxl/pci.c
> +++ b/drivers/cxl/pci.c
> @@ -484,14 +484,6 @@ static int cxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
>  	if (rc)
>  		return rc;
>  
> -	rc = cxl_dev_state_identify(cxlds);
> -	if (rc)
> -		return rc;
> -
> -	rc = cxl_mem_create_range_info(cxlds);
> -	if (rc)
> -		return rc;
> -
>  	cxlmd = devm_cxl_add_memdev(cxlds);
>  	if (IS_ERR(cxlmd))
>  		return PTR_ERR(cxlmd);
> diff --git a/drivers/cxl/port.c b/drivers/cxl/port.c
> index 03380c18fc52..b7a4a1be2945 100644
> --- a/drivers/cxl/port.c
> +++ b/drivers/cxl/port.c
> @@ -127,6 +127,14 @@ static int cxl_port_probe(struct device *dev)
>  			if (rc)
>  				dev_dbg(dev, "Failed to do QoS calculations\n");
>  		}
> +
> +		rc = cxl_dev_state_identify(cxlds);
> +		if (rc)
> +			return rc;
> +
> +		rc = cxl_mem_create_range_info(cxlds);
> +		if (rc)
> +			return rc;
>  	}
>  
>  	rc = devm_cxl_enumerate_decoders(cxlhdm);
> 
> 




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]
  Powered by Linux