From patchwork Thu Feb 21 00:33:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 10822969 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3558213B5 for ; Thu, 21 Feb 2019 00:33:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 22B9F2FCA8 for ; Thu, 21 Feb 2019 00:33:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 160FA2FCB1; Thu, 21 Feb 2019 00:33:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8EE9B2FCA8 for ; Thu, 21 Feb 2019 00:33:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=GdCRtD2laOzn8UzqvF/F0pvExysSlSlsd/ifahyhqJc=; b=ZrBaccfWpDLJ/1 lNddv8clt14sM0NYRU4SyyAHq4MXJ4Cc7owDM/+To0z/XFaoa15wvUy5shKOPReZzVuOQ4fzh50tf oO78JjvyadBoPNDevHsq2NPFRYSYJn1cDP5assL+iHr/tHlj6wILi58a2HqmF9JbJmRFH7zOiEUC1 Bo7hdVV4MwZeZLcpgMQiG3lOSZL1XcaERHverMpH+8DDA4eKyuk6Rxlqr1tnz9MwkkYtiOkHZ64Lu AGAbUuPQA/Jp3fbsn4ECXDiYjkNkd26ghAK6waGCscQVQt239gal6+Fc6cYUc1H0Y8W2Nq5P4V8ax MiqSgYWwzGtq0olLs1bQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gwcIq-0000bR-CE; Thu, 21 Feb 2019 00:33:28 +0000 Received: from esa5.hgst.iphmx.com ([216.71.153.144]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gwcIn-0000b1-MI for linux-riscv@lists.infradead.org; Thu, 21 Feb 2019 00:33:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1550709206; x=1582245206; h=from:to:cc:subject:date:message-id: content-transfer-encoding:mime-version; bh=oScnSknFb7fUqMAU3m0bZhVOyMiIJmmC/98wkj6WLT8=; b=D4aUNIpsxR8Bstx5+/Kzf2xgXByF4TS/vdyRCwHUnZyDIQUmkUa1XQbN oqfNRUWdMINy0XaxxdEgHcJTIIl2+BuRqK8vYwRVdtXeeughFfTmUU8ML q2jcHkRFs+V2AcGyWZSA2vTx3dWMc1CtL++eX1gJy0PyYtS5bFuyli7DZ rAkCuH2/E4y/TI4rdbg0ZVmU1D8CjEDQnSMRx3b4DZuIn/E2QuEeJCM25 MevE3RQFobSuV96OKUX/uuE5crh5hV6kJ7RF7WGKtutD6fW3pPi12uRMt 5a7iwCMdX6u6w5u9UzuNbJ92drSzwj7W3uKm+1vOj4v3NK8LssUARLAFB w==; X-IronPort-AV: E=Sophos;i="5.58,392,1544457600"; d="scan'208";a="103071170" Received: from mail-co1nam04lp2054.outbound.protection.outlook.com (HELO NAM04-CO1-obe.outbound.protection.outlook.com) ([104.47.45.54]) by ob1.hgst.iphmx.com with ESMTP; 21 Feb 2019 08:33:05 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector1-wdc-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=inH8ZBdiHV7w3+xZ0pr9OeAdu3PfuQspDl0mVP41LaQ=; b=Px6hOeyO/KAKqOhtDQcLfQAMcrqsuX1c8+rl3wHbeweVJOYPVIWXyUz0CsuHbv91PCSs6vsuHZnmV9HaPH8Q2xWlmPLBBRd0Pl5G4n5ZZ0mk0j76+9rhq8jNCq+0Vsa9fiX6lnL9VFrEOMuPZfectvxfYMD3SS+M0eV6y2xG4fY= Received: from CY4PR04MB0392.namprd04.prod.outlook.com (10.173.190.148) by CY4PR04MB0918.namprd04.prod.outlook.com (10.171.247.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1622.19; Thu, 21 Feb 2019 00:33:03 +0000 Received: from CY4PR04MB0392.namprd04.prod.outlook.com ([fe80::2057:d590:6918:b286]) by CY4PR04MB0392.namprd04.prod.outlook.com ([fe80::2057:d590:6918:b286%10]) with mapi id 15.20.1643.014; Thu, 21 Feb 2019 00:33:03 +0000 From: Alistair Francis To: "kraxel@redhat.com" , "virtualization@lists.linux-foundation.org" Subject: [PATCH] drm/bochs: Fix the ID mismatch error Thread-Topic: [PATCH] drm/bochs: Fix the ID mismatch error Thread-Index: AQHUyX0BfIJUREpsZE+VI2mcVzWCIA== Date: Thu, 21 Feb 2019 00:33:03 +0000 Message-ID: <20190221003231.31625-1-alistair.francis@wdc.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.20.1 x-clientproxiedby: BYAPR07CA0047.namprd07.prod.outlook.com (2603:10b6:a03:60::24) To CY4PR04MB0392.namprd04.prod.outlook.com (2603:10b6:903:b5::20) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alistair.Francis@wdc.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [199.255.44.250] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 833432c9-8478-4e4e-00d1-08d69794239f x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600110)(711020)(4605104)(4618075)(2017052603328)(7153060)(7193020); SRVR:CY4PR04MB0918; x-ms-traffictypediagnostic: CY4PR04MB0918: wdcipoutbound: EOP-TRUE x-microsoft-exchange-diagnostics: =?iso-8859-1?Q?1; CY4PR04MB0918; 23:+mEdHVPbDgK4oTrmaqM3z/hEe0ddHLuhn7lIp/R?= =?iso-8859-1?q?6I+UFEd6DtPd9a8?= =?iso-8859-1?q?5CQRrVce+gya09fgEBji3Ym5KNJpqbxOYYAIoYBSzXvFY/G22bvgtsVy40CK?= =?iso-8859-1?q?JgZKRS/BEQWO9tYnRzZiCywcTG2VXb2Y+bW6ATRDQg6I+3Oo7qUOJWJ5Svsr?= =?iso-8859-1?q?QaEVVZ5ZmtPr6QK5swhom10rsIBXq72YZB2EzX/9eX6x8xigPJ3UxHVd9aAi?= =?iso-8859-1?q?l+IgScv9zEzv0HuHL83KwrWqsF9ZgD1IZG1GNVGfXJbLKeAkcctdFJktwjZE?= =?iso-8859-1?q?9SbmgghsJUeMSaYwSDALIGFWaIiJpKAhMtc05mWK8TWYpmHtyrircQ3O2bvY?= =?iso-8859-1?q?jGr/mtHidXLWuQAneJ98OvC+RCZaGXOhGQ5NAs1DVcZdZ4ESrNEYxevJ7k3c?= =?iso-8859-1?q?JblJ9twCrE9YPnb40StrgFtXZGfet5ZYdyygf+ACXOJW3SVpsM4Arl5Kmt4P?= =?iso-8859-1?q?33soZGV9Nk7P1Cd+9aPYyDrAWZSQlc1Oq7Eg0tSAcEu/yev+V6/Q/w+SLkti?= =?iso-8859-1?q?c3AgGm6VuJG19tzj4n+i8ls8u1zda+xPYq/JzTmuEheYMGMgaNPKEheLqPuA?= =?iso-8859-1?q?6zxignRsOLvvnRHa90181X8ccMeWd2BTCEVQvOML58TBAFQMp081HLv/MKN2?= =?iso-8859-1?q?eXK2X5N7Ho9Skr4IboflzqAVoaAum+nGmaxkK3fYzsJJxkMebeg/wnf1ELvL?= =?iso-8859-1?q?b8MEf6y5pw3gALYRPc5zsAqJm1PLZGWFUf8HIQ26s1NzuegIrsiyzLoWIjsA?= =?iso-8859-1?q?yBcKsbD/F3DxbqHCMtDkxq4OVdOoXoFkxF0dOhX+InLy0vRjecj6yA+BP7of?= =?iso-8859-1?q?oapys5Y73oHrB+kL2rDwLs2v2pH6jF8Xrqkz3UvOeFIpYSvV5zSqt34QE+Ef?= =?iso-8859-1?q?KQj7YndjiTqBo52/gR8XcSMSQcRBjs1GI2HvIwR7H3um6ehKn4B3RBh0phPz?= =?iso-8859-1?q?Rv3gQ58VeBKEd7mH503L56g/n8L/3EevGjni5JOHcpj0edPThQfVBu6S8/dv?= =?iso-8859-1?q?ARZngtr+rbIP6WXRfMyRsywJYFMDU+tiN5R5qOoO7FtSEb0LorMEEp4ra+Is?= =?iso-8859-1?q?RL3OksdtKuHuG3wibNiDMdZQu6t/gbQCdCAd+bQdvUYTeAWKKMWDjLnIrlHq?= =?iso-8859-1?q?j9mD46h4xh3azqRCfU1mlGQQOKbVSua/PDyNHoMflcwuXg/HYm2DEMqVTE/L?= =?iso-8859-1?q?LPEFu6iWSgz7BVGacWGvoq37hMJeDtgtLU4rr5p+I3HQwgPrzXruSIkilXWE?= =?iso-8859-1?q?Skqyk=3D?= x-microsoft-antispam-prvs: x-forefront-prvs: 09555FB1AD x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(376002)(346002)(366004)(136003)(39860400002)(396003)(199004)(189003)(6506007)(386003)(7736002)(4326008)(25786009)(5024004)(81166006)(4744005)(305945005)(81156014)(2501003)(50226002)(102836004)(186003)(106356001)(8936002)(26005)(256004)(105586002)(66066001)(1076003)(97736004)(8676002)(68736007)(2616005)(99286004)(478600001)(476003)(44832011)(71190400001)(36756003)(72206003)(71200400001)(486006)(5660300002)(6116002)(2906002)(110136005)(6436002)(3846002)(52116002)(6512007)(53936002)(86362001)(316002)(54906003)(6486002)(14454004); DIR:OUT; SFP:1102; SCL:1; SRVR:CY4PR04MB0918; H:CY4PR04MB0392.namprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: fcDWkahwKuaHtg5vhLyV5ONGrMvixLLNZkOqidv9GxLFW2OW0sXEgTE5Xp42I0CTfM7qoOmk8B8mX53Qf3EMmxKnI25PtUmSIG4VbOUjy+OLsTxVZAgjxi/OM+lP8T2Nvh5TOJYBh29IRmlNrGPgdza4hwxkCIzKE4TSmTxBEfoRadcA7Qa/o2eM4YEeZBg91YHht6AP9pcmLBhgrofy+1oNVKpk3KY1FNJvKB1cQwwAuYmlbZUQsbuvV2Lnf0UrFdXCw+c8YHgiEnGo/ukpUFLiND0m8HC5UJPsXgha3fJ8v+AJURMbhGSPt9/g6C0g8baqY59xHBPewVWgeSguAzp0kPazitTLuALM8yMn40/P8NydsAkVyALEilcmIz2Ic2F4/+XgnDH9Vi8msCoicEnjaXhx+InLmbnjsW07sR8= MIME-Version: 1.0 X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-Network-Message-Id: 833432c9-8478-4e4e-00d1-08d69794239f X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Feb 2019 00:33:02.4748 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR04MB0918 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190220_163325_855301_85F3C6B2 X-CRM114-Status: GOOD ( 12.31 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "david.abdurachmanov@gmail.com" , "linux-kernel@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , Alistair Francis , "alistair23@gmail.com" , "linux-riscv@lists.infradead.org" Sender: "linux-riscv" Errors-To: linux-riscv-bounces+patchwork-linux-riscv=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP When running RISC-V QEMU with the Bochs device attached via PCIe the probe of the Bochs device fails with: [drm:bochs_hw_init] *ERROR* ID mismatch This was introduced by this commit: 7780eb9ce8 bochs: convert to drm_dev_register To fix the error we ensure that pci_enable_device() is called before bochs_load(). Signed-off-by: Alistair Francis Reported-by: David Abdurachmanov --- drivers/gpu/drm/bochs/bochs_drv.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/bochs/bochs_drv.c b/drivers/gpu/drm/bochs/bochs_drv.c index f3dd66ae990a..aa35007262cd 100644 --- a/drivers/gpu/drm/bochs/bochs_drv.c +++ b/drivers/gpu/drm/bochs/bochs_drv.c @@ -154,6 +154,10 @@ static int bochs_pci_probe(struct pci_dev *pdev, if (IS_ERR(dev)) return PTR_ERR(dev); + ret = pci_enable_device(pdev); + if (ret) + goto err_free_dev; + dev->pdev = pdev; pci_set_drvdata(pdev, dev);