diff mbox series

[bionic:linux-azure-4.15,1/5] Revert "Revert "PCI: hv: Make sure the bus domain is really unique""

Message ID 20200426204229.119093-2-marcelo.cerri@canonical.com
State New
Headers show
Series [bionic:linux-azure-4.15,1/5] Revert "Revert "PCI: hv: Make sure the bus domain is really unique"" | expand

Commit Message

Marcelo Henrique Cerri April 26, 2020, 8:42 p.m. UTC
BugLink: https://bugs.launchpad.net/bugs/1867220

This reverts commit f784c428da66621df751e6856be17f85e8b19b0e.

Signed-off-by: Marcelo Henrique Cerri <marcelo.cerri@canonical.com>
---
 drivers/pci/host/pci-hyperv.c | 13 -------------
 1 file changed, 13 deletions(-)

Comments

Thadeu Lima de Souza Cascardo April 27, 2020, 5:50 p.m. UTC | #1
On Sun, Apr 26, 2020 at 05:42:25PM -0300, Marcelo Henrique Cerri wrote:
> BugLink: https://bugs.launchpad.net/bugs/1867220
> 
> This reverts commit f784c428da66621df751e6856be17f85e8b19b0e.
> 
> Signed-off-by: Marcelo Henrique Cerri <marcelo.cerri@canonical.com>

What about regression potentials, especially LP: #1816106 ("4.15.0-1037 does
not see all PCI devices on GPU VMs")? Was it tested against this at all?

Cascardo.

> ---
>  drivers/pci/host/pci-hyperv.c | 13 -------------
>  1 file changed, 13 deletions(-)
> 
> diff --git a/drivers/pci/host/pci-hyperv.c b/drivers/pci/host/pci-hyperv.c
> index 59b5a07019bc..f14eb17972b6 100644
> --- a/drivers/pci/host/pci-hyperv.c
> +++ b/drivers/pci/host/pci-hyperv.c
> @@ -1657,19 +1657,6 @@ static struct hv_pci_dev *new_pcichild_device(struct hv_pcibus_device *hbus,
>  	get_pcichild(hpdev, hv_pcidev_ref_childlist);
>  	spin_lock_irqsave(&hbus->device_list_lock, flags);
>  
> -	/*
> -	 * When a device is being added to the bus, we set the PCI domain
> -	 * number to be the device serial number, which is non-zero and
> -	 * unique on the same VM.  The serial numbers start with 1, and
> -	 * increase by 1 for each device.  So device names including this
> -	 * can have shorter names than based on the bus instance UUID.
> -	 * Only the first device serial number is used for domain, so the
> -	 * domain number will not change after the first device is added.
> -	 * The lower 16 bits of the serial number is used, otherwise some
> -	 * drivers may not be able to handle it.
> -	 */
> -	if (list_empty(&hbus->children))
> -		hbus->sysdata.domain = desc->ser & 0xFFFF;
>  	list_add_tail(&hpdev->list_entry, &hbus->children);
>  	spin_unlock_irqrestore(&hbus->device_list_lock, flags);
>  	return hpdev;
> -- 
> 2.25.1
> 
> 
> -- 
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
diff mbox series

Patch

diff --git a/drivers/pci/host/pci-hyperv.c b/drivers/pci/host/pci-hyperv.c
index 59b5a07019bc..f14eb17972b6 100644
--- a/drivers/pci/host/pci-hyperv.c
+++ b/drivers/pci/host/pci-hyperv.c
@@ -1657,19 +1657,6 @@  static struct hv_pci_dev *new_pcichild_device(struct hv_pcibus_device *hbus,
 	get_pcichild(hpdev, hv_pcidev_ref_childlist);
 	spin_lock_irqsave(&hbus->device_list_lock, flags);
 
-	/*
-	 * When a device is being added to the bus, we set the PCI domain
-	 * number to be the device serial number, which is non-zero and
-	 * unique on the same VM.  The serial numbers start with 1, and
-	 * increase by 1 for each device.  So device names including this
-	 * can have shorter names than based on the bus instance UUID.
-	 * Only the first device serial number is used for domain, so the
-	 * domain number will not change after the first device is added.
-	 * The lower 16 bits of the serial number is used, otherwise some
-	 * drivers may not be able to handle it.
-	 */
-	if (list_empty(&hbus->children))
-		hbus->sysdata.domain = desc->ser & 0xFFFF;
 	list_add_tail(&hpdev->list_entry, &hbus->children);
 	spin_unlock_irqrestore(&hbus->device_list_lock, flags);
 	return hpdev;