diff mbox

[SRU,Xenial,Yakkety,Zesty,Artful,1/1] UBUNTU: SAUCE: pci-hyperv: Use only 16 bit integer for PCI domain

Message ID aeca9abb3b588c711eadf885232bdd287f7adc7c.1492710874.git.joseph.salisbury@canonical.com
State New
Headers show

Commit Message

Joseph Salisbury April 24, 2017, 11:38 p.m. UTC
From: Haiyang Zhang <haiyangz@microsoft.com>

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

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Joseph Salisbury <joseph.salisbury@canonical.com>

---
 drivers/pci/host/pci-hyperv.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Kleber Sacilotto de Souza April 25, 2017, 9:44 a.m. UTC | #1

Seth Forshee April 25, 2017, 12:16 p.m. UTC | #2
On Mon, Apr 24, 2017 at 07:38:08PM -0400, Joseph Salisbury wrote:
> From: Haiyang Zhang <haiyangz@microsoft.com>
> 
> BugLink: http://bugs.launchpad.net/bugs/1684971
> 
> Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
> Signed-off-by: Joseph Salisbury <joseph.salisbury@canonical.com>

Applied to artful master-next.
Kleber Sacilotto de Souza April 25, 2017, 2:51 p.m. UTC | #3

Kleber Sacilotto de Souza April 27, 2017, 9:19 a.m. UTC | #4

diff mbox

Patch

diff --git a/drivers/pci/host/pci-hyperv.c b/drivers/pci/host/pci-hyperv.c
index ada9856..5dcc0aef 100644
--- a/drivers/pci/host/pci-hyperv.c
+++ b/drivers/pci/host/pci-hyperv.c
@@ -1326,9 +1326,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;