From patchwork Mon Jun 4 03:06:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jeffery X-Patchwork-Id: 924807 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40zfws2lb8z9rxs for ; Mon, 4 Jun 2018 13:06:53 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=aj.id.au Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=aj.id.au header.i=@aj.id.au header.b="ppwIyqwI"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="i611k+eP"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 40zfws10DHzF0fX for ; Mon, 4 Jun 2018 13:06:53 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=aj.id.au Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=aj.id.au header.i=@aj.id.au header.b="ppwIyqwI"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="i611k+eP"; dkim-atps=neutral X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=aj.id.au (client-ip=66.111.4.25; helo=out1-smtp.messagingengine.com; envelope-from=andrew@aj.id.au; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=aj.id.au Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=aj.id.au header.i=@aj.id.au header.b="ppwIyqwI"; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="i611k+eP"; dkim-atps=neutral Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 40zfwl6WyPzDrp0 for ; Mon, 4 Jun 2018 13:06:47 +1000 (AEST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 4CBA0211B7; Sun, 3 Jun 2018 23:06:45 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Sun, 03 Jun 2018 23:06:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aj.id.au; h=cc :date:from:message-id:subject:to:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=xhzM8pgl0IV4gpufEeXwaQYuYZbsAFpUbO2wCOvs2 X4=; b=ppwIyqwI05DbtXivu0TOqEFaEl4jsbJNdGGtzV9lqWJsmay50BSRRp+mp E51WjpV6nRCwsEsaDkQ7ZdPfAJRj28HUalpnpU1eThSTsbKP1ur6R7ejURMLIG6M 4p3glsS9HvkwdkyFBMGjQ3S4H1iILGMRN15VlpzOjS1zyZtSytZ+PLyPemBatW+x 5UVQUyX3YCauKbmfHR5P1VdwJhXr4tp1FgfgOa28u3YIpdbM/G+JrS+nGFBA79nW vOkQnC8PcaBzZQcFn31bN8Zomozc9vHCqfhZlb7Vkr/8Ze7lYmGP/nf2dxoP8sL2 QzK6AZJwCP9opCNfanbmqFK+z6A2Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:message-id:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=xhzM8pgl0IV4gpufE eXwaQYuYZbsAFpUbO2wCOvs2X4=; b=i611k+ePtODicTPUkDuAkQFch++vCjM+O yp+q3JJr2FdUuUnE7LZWHuIVhkY/MZ0MwMuA/okr59MXnWS+TJ+MEUpBpAkw+cVl D9Dbx4c/LyHgOBW6YEbIJAjSqIuAf6f6K1v/SSaR6CPgcQ/p09Z73hbvMoY4VnFF iTegh0qQaArPnyYGBuXHBFhvG8orZURVTFZVvx6Ji2biq9jBmOMKglGHP8NLqYTf uxu098wtNDHnt6aLDUBtyNOvwgBXT23qOReX3+6J2BCLKyN8cDsKPTkvEOVOb6E3 6bTRhxllEBH+VE4K/fyf0k9bbYCrbEOiefByI0KKwFA9G+PUQVA7g== X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Sender: Received: from dave.aj.id.au (unknown [118.211.115.117]) by mail.messagingengine.com (Postfix) with ESMTPA id BBE3710255; Sun, 3 Jun 2018 23:06:43 -0400 (EDT) From: Andrew Jeffery To: skiboot@lists.ozlabs.org Date: Mon, 4 Jun 2018 12:36:03 +0930 Message-Id: <20180604030603.32124-1-andrew@aj.id.au> X-Mailer: git-send-email 2.17.0 Subject: [Skiboot] [PATCH] pci: Fix PCI_DEVICE_ID() X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Jeffery MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" The vendor ID is 16 bits not 8. This error leaves the top of the vendor ID in the bottom bits of the device ID, which resulted in e.g. a failure to run the PCI quirk for the AST VGA device. Fixes: 2b841bf0ef1b ("core/pci: Use cached vendor/device IDs in quirks") Signed-off-by: Andrew Jeffery --- include/pci.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/pci.h b/include/pci.h index 6141159f2fcc..253dbd8b1e9a 100644 --- a/include/pci.h +++ b/include/pci.h @@ -76,7 +76,7 @@ struct pci_device { uint32_t vdid; uint32_t sub_vdid; #define PCI_VENDOR_ID(x) ((x) & 0xFFFF) -#define PCI_DEVICE_ID(x) ((x) >> 8) +#define PCI_DEVICE_ID(x) ((x) >> 16) uint32_t class; uint64_t cap_list; struct {