[c/azure][PATCH] UBUNTU: SAUCE: pci-hyperv: Use only 16 bit integer for PCI domain

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[c/azure][PATCH] UBUNTU: SAUCE: pci-hyperv: Use only 16 bit integer for PCI domain

Marcelo Henrique Cerri
From: Haiyang Zhang <[hidden email]>

BugLink: http://bugs.launchpad.net/bugs/1684971

This patch uses the lower 16 bits of the serial number as PCI
domain, otherwise some drivers may not be able to handle it.

Signed-off-by: Haiyang Zhang <[hidden email]>
Signed-off-by: Marcelo Henrique Cerri <[hidden email]>
---
 drivers/pci/controller/pci-hyperv.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/pci/controller/pci-hyperv.c b/drivers/pci/controller/pci-hyperv.c
index 003b355c2627..cf6ef9b1b3f3 100644
--- a/drivers/pci/controller/pci-hyperv.c
+++ b/drivers/pci/controller/pci-hyperv.c
@@ -1618,9 +1618,11 @@ static struct hv_pci_dev *new_pcichild_device(struct hv_pcibus_device *hbus,
  * 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;
+ 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.17.1


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK/Cmnt: [c/azure][PATCH] UBUNTU: SAUCE: pci-hyperv: Use only 16 bit integer for PCI domain

Stefan Bader-2
On 28.02.19 14:06, Marcelo Henrique Cerri wrote:
> From: Haiyang Zhang <[hidden email]>
>
> BugLink: http://bugs.launchpad.net/bugs/1684971
>
> This patch uses the lower 16 bits of the serial number as PCI
> domain, otherwise some drivers may not be able to handle it.
>
> Signed-off-by: Haiyang Zhang <[hidden email]>
> Signed-off-by: Marcelo Henrique Cerri <[hidden email]>
Acked-by: Stefan Bader <[hidden email]>
> ---

Really should go upstream or at least into unstable to make sure its not lost
again. Looks like it had to repeatedly be applied again.

-Stefan

>  drivers/pci/controller/pci-hyperv.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/pci/controller/pci-hyperv.c b/drivers/pci/controller/pci-hyperv.c
> index 003b355c2627..cf6ef9b1b3f3 100644
> --- a/drivers/pci/controller/pci-hyperv.c
> +++ b/drivers/pci/controller/pci-hyperv.c
> @@ -1618,9 +1618,11 @@ static struct hv_pci_dev *new_pcichild_device(struct hv_pcibus_device *hbus,
>   * 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;
> + hbus->sysdata.domain = desc->ser & 0xFFFF;
>   list_add_tail(&hpdev->list_entry, &hbus->children);
>   spin_unlock_irqrestore(&hbus->device_list_lock, flags);
>   return hpdev;
>


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: ACK/Cmnt: [c/azure][PATCH] UBUNTU: SAUCE: pci-hyperv: Use only 16 bit integer for PCI domain

Joshua R. Poulson
It had to be reapplied after a different change from stable caused
problems. Longer term solution will go upstream.

On Thu, Feb 28, 2019 at 5:22 AM Stefan Bader <[hidden email]> wrote:

>
> On 28.02.19 14:06, Marcelo Henrique Cerri wrote:
> > From: Haiyang Zhang <[hidden email]>
> >
> > BugLink: http://bugs.launchpad.net/bugs/1684971
> >
> > This patch uses the lower 16 bits of the serial number as PCI
> > domain, otherwise some drivers may not be able to handle it.
> >
> > Signed-off-by: Haiyang Zhang <[hidden email]>
> > Signed-off-by: Marcelo Henrique Cerri <[hidden email]>
> Acked-by: Stefan Bader <[hidden email]>
> > ---
>
> Really should go upstream or at least into unstable to make sure its not lost
> again. Looks like it had to repeatedly be applied again.
>
> -Stefan
>
> >  drivers/pci/controller/pci-hyperv.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/pci/controller/pci-hyperv.c b/drivers/pci/controller/pci-hyperv.c
> > index 003b355c2627..cf6ef9b1b3f3 100644
> > --- a/drivers/pci/controller/pci-hyperv.c
> > +++ b/drivers/pci/controller/pci-hyperv.c
> > @@ -1618,9 +1618,11 @@ static struct hv_pci_dev *new_pcichild_device(struct hv_pcibus_device *hbus,
> >        * 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;
> > +             hbus->sysdata.domain = desc->ser & 0xFFFF;
> >       list_add_tail(&hpdev->list_entry, &hbus->children);
> >       spin_unlock_irqrestore(&hbus->device_list_lock, flags);
> >       return hpdev;
> >
>
>
> --
> kernel-team mailing list
> [hidden email]
> https://lists.ubuntu.com/mailman/listinfo/kernel-team

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK: [c/azure][PATCH] UBUNTU: SAUCE: pci-hyperv: Use only 16 bit integer for PCI domain

Kleber Souza
In reply to this post by Marcelo Henrique Cerri
On 2/28/19 2:06 PM, Marcelo Henrique Cerri wrote:
> From: Haiyang Zhang <[hidden email]>
>
> BugLink: http://bugs.launchpad.net/bugs/1684971
>
> This patch uses the lower 16 bits of the serial number as PCI
> domain, otherwise some drivers may not be able to handle it.
>
> Signed-off-by: Haiyang Zhang <[hidden email]>
> Signed-off-by: Marcelo Henrique Cerri <[hidden email]>


Acked-by: Kleber Sacilotto de Souza <[hidden email]>


> ---
>  drivers/pci/controller/pci-hyperv.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/pci/controller/pci-hyperv.c b/drivers/pci/controller/pci-hyperv.c
> index 003b355c2627..cf6ef9b1b3f3 100644
> --- a/drivers/pci/controller/pci-hyperv.c
> +++ b/drivers/pci/controller/pci-hyperv.c
> @@ -1618,9 +1618,11 @@ static struct hv_pci_dev *new_pcichild_device(struct hv_pcibus_device *hbus,
>   * 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;
> + hbus->sysdata.domain = desc->ser & 0xFFFF;
>   list_add_tail(&hpdev->list_entry, &hbus->children);
>   spin_unlock_irqrestore(&hbus->device_list_lock, flags);
>   return hpdev;



--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

APPLIED: [c/azure][PATCH] UBUNTU: SAUCE: pci-hyperv: Use only 16 bit integer for PCI domain

Marcelo Henrique Cerri
In reply to this post by Marcelo Henrique Cerri
--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team

signature.asc (499 bytes) Download Attachment