From patchwork Tue Nov 24 13:26:44 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Matias_Bj=C3=B8rling?= X-Patchwork-Id: 7690851 Return-Path: X-Original-To: patchwork-linux-block@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id CF826BF90C for ; Tue, 24 Nov 2015 13:28:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0CADD206F6 for ; Tue, 24 Nov 2015 13:28:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2D51F206FA for ; Tue, 24 Nov 2015 13:28:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753821AbbKXN1L (ORCPT ); Tue, 24 Nov 2015 08:27:11 -0500 Received: from mail-wm0-f48.google.com ([74.125.82.48]:34902 "EHLO mail-wm0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753480AbbKXN1H (ORCPT ); Tue, 24 Nov 2015 08:27:07 -0500 Received: by wmuu63 with SMTP id u63so96351212wmu.0 for ; Tue, 24 Nov 2015 05:27:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bjorling.me; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=LS2XJYf1wmZi6FEx3O1t0sp21o+HHKUPPn5/Q9H3ylU=; b=yVbt/xalafsXU7kU+H41+497SD8PeUVHAn4noz+ERXcCivsYsNSwqQR2bh60tVh9Ei PTRiXrxByi50HXR1VT2wiakNM2FfNlX2TTslfali3haZrVI/S4EVFG2fmIXni9iQgkMS d1By/YCGUIGjYQf7umkLakafFVdAvfuOQWrS8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=LS2XJYf1wmZi6FEx3O1t0sp21o+HHKUPPn5/Q9H3ylU=; b=hIUjgJLTxUjSg0OGD+6UGL9xVkaZKP4bljur4xDnTEuYs5IYY8+JpIs8hwXfOdbzTN 9vbJw+DE+d4MUM8AGaKKXMGhaxqZqPTDV3irZyTVrrDyQWp+KINDxUz/S0IdUcjFCZYU wOHCIwwf9/wnwN8+tz8IoPigKquDjFTkd/3DBMc1uZGhQ2M2MRgZ88cV0OB7oZae/Jv8 N2CKAm1W62RPa+Iov7Zp2dtMYrqZOd3iyrPcy1vEJamDoBx618AzF48G+oSm8x1vez0D c19B+hjTK4y0/ik8pNe7xhiUeXAO/FXS0FgnDuMMlZxpKrfgAYJHa1EvOuvHkrBlBylF scJg== X-Gm-Message-State: ALoCoQmmgawrMfdX7+xhJavZIFbFnGR7Wwtf+1bKW+K0Yo3vZ0kW1onjNmX7ls7i8zHYhdltZ+Np X-Received: by 10.194.87.39 with SMTP id u7mr37157307wjz.11.1448371626128; Tue, 24 Nov 2015 05:27:06 -0800 (PST) Received: from localhost.localdomain (6164198-cl69.boa.fiberby.dk. [193.106.164.198]) by smtp.gmail.com with ESMTPSA id w67sm18215045wmw.17.2015.11.24.05.27.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 24 Nov 2015 05:27:05 -0800 (PST) From: =?UTF-8?q?Matias=20Bj=C3=B8rling?= To: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, axboe@fb.com Cc: hch@infradead.org, keith.busch@intel.com, sudipm.mukherjee@gmail.com, ww.tao0320@gmail.com, =?UTF-8?q?Matias=20Bj=C3=B8rling?= Subject: [PATCH 1/5] lightnvm: change vendor and dev id for qemu Date: Tue, 24 Nov 2015 14:26:44 +0100 Message-Id: <1448371608-18053-2-git-send-email-m@bjorling.me> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1448371608-18053-1-git-send-email-m@bjorling.me> References: <1448371608-18053-1-git-send-email-m@bjorling.me> MIME-Version: 1.0 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The QEMU NVMe simulator uses the intel vendor, qemu device id, and the first vendor specific byte to identify a lightnvm compatible nvme instance. Instead of using the Intel NVMe QEMU instance vendor and device id, let's use a preallocated from CNEX Labs instead. This lets us uniquely identify a QEMU lightnvm device without breaking other vendor specific work in the qemu device driver. Reported-by: Christoph Hellwig Signed-off-by: Matias Bjørling --- drivers/nvme/host/lightnvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nvme/host/lightnvm.c b/drivers/nvme/host/lightnvm.c index 9202d1a..0789265 100644 --- a/drivers/nvme/host/lightnvm.c +++ b/drivers/nvme/host/lightnvm.c @@ -577,7 +577,7 @@ int nvme_nvm_ns_supported(struct nvme_ns *ns, struct nvme_id_ns *id) struct pci_dev *pdev = to_pci_dev(dev->dev); /* QEMU NVMe simulator - PCI ID + Vendor specific bit */ - if (pdev->vendor == PCI_VENDOR_ID_INTEL && pdev->device == 0x5845 && + if (pdev->vendor == 0x1d1d && pdev->device == 0x1f1f && id->vs[0] == 0x1) return 1;