From patchwork Thu Feb 28 13:06:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcelo Henrique Cerri X-Patchwork-Id: 1049444 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 449CVb1vPSz9s2R; Fri, 1 Mar 2019 00:06:31 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1gzLOK-0002E5-TT; Thu, 28 Feb 2019 13:06:24 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.86_2) (envelope-from ) id 1gzLOA-0002B6-3s for kernel-team@lists.ubuntu.com; Thu, 28 Feb 2019 13:06:14 +0000 Received: from mail-qk1-f200.google.com ([209.85.222.200]) by youngberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1gzLO9-0003Bb-Nn for kernel-team@lists.ubuntu.com; Thu, 28 Feb 2019 13:06:13 +0000 Received: by mail-qk1-f200.google.com with SMTP id b6so15906957qkg.4 for ; Thu, 28 Feb 2019 05:06:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=5vBaYqtYve82WIm2y8hoFhhq19iutvxsJGiSdur3LXo=; b=K9LxmEBPPEysSo5JhEt5arEbksVw++VTl5oL468gOlsj2ipvr6jqs421bY87E4NNbC FurulJ2g5upIs62tJ06zJvR2M6rIlcVnf0gzeskzgqYdSTlL3DTjHxSWC063gbSqitaG sR0xxUmRnHvWljY3ycTwx5sYuRc8nf+m/Tx/qeL/waVzjccGCCt1qD/SXESeG6hUPl6x oB+tdhVZDo8IPhBZ4yJit6YTpaMw6rZPar++Rm9pcdEZvMuQf7h2HLcX+ebVeJhtiMVQ iXB6EDOUO2Tkxyb9jYfnkkfMjx1BWzXU4VA2WaGCPvytnXCvI0qoXRSMjBbGCSqtBCLI DFTQ== X-Gm-Message-State: AHQUAuYO07JjfJtoZVRYTX2KxE/HlB4HmtdWKybwCxdUQA7yD5FTUebY RpLD5pWAIFSTunDz6ok2CKHKwAz3IMf3qn9hyS4UzOOr2yxL6eTluW2wX77aE4MFjaQyHRiF3z5 eSHiigy1E8OZdTbVTVd+J9VctkJHWq6ngijkxJW9s X-Received: by 2002:a37:4b49:: with SMTP id y70mr6295692qka.134.1551359172368; Thu, 28 Feb 2019 05:06:12 -0800 (PST) X-Google-Smtp-Source: AHgI3IbiEg2DoRoH7TuvWODVo++JUtmHtFwwMnTHGw615vXMgv00hfQV24k1HgMu2woAEEuX9eRulg== X-Received: by 2002:a37:4b49:: with SMTP id y70mr6295670qka.134.1551359171954; Thu, 28 Feb 2019 05:06:11 -0800 (PST) Received: from gallifrey.lan ([2804:14c:4e3:4a76:8437:8a5d:504f:a207]) by smtp.gmail.com with ESMTPSA id q2sm9545526qtn.47.2019.02.28.05.06.10 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Feb 2019 05:06:10 -0800 (PST) From: Marcelo Henrique Cerri To: kernel-team@lists.ubuntu.com Subject: [c/azure][PATCH] UBUNTU: SAUCE: pci-hyperv: Use only 16 bit integer for PCI domain Date: Thu, 28 Feb 2019 10:06:07 -0300 Message-Id: <20190228130607.19118-1-marcelo.cerri@canonical.com> X-Mailer: git-send-email 2.17.1 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Haiyang Zhang 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 Signed-off-by: Marcelo Henrique Cerri Acked-by: Stefan Bader Acked-by: Kleber Sacilotto de Souza --- 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;