From patchwork Mon Aug 7 01:37:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeuk Kim X-Patchwork-Id: 711486 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D96B1C001DE for ; Mon, 7 Aug 2023 01:37:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229548AbjHGBhg (ORCPT ); Sun, 6 Aug 2023 21:37:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229498AbjHGBhf (ORCPT ); Sun, 6 Aug 2023 21:37:35 -0400 Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E0A6171A for ; Sun, 6 Aug 2023 18:37:32 -0700 (PDT) Received: from epcas2p3.samsung.com (unknown [182.195.41.55]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20230807013728epoutp03006d30ff7a395832f5b2ac4c8d9c707f~49hlZBTUO2179721797epoutp03f for ; Mon, 7 Aug 2023 01:37:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20230807013728epoutp03006d30ff7a395832f5b2ac4c8d9c707f~49hlZBTUO2179721797epoutp03f DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1691372248; bh=eRp0hDxbLoDkI+EKmlyx1gM8DLMIflAnTWMEe1OnN5Q=; h=Subject:Reply-To:From:To:CC:Date:References:From; b=l033EONLee9a1ouTeBHQTTXg5u09htwLi+RDYh613BRNziBxMNGBqznhpsr44p22b 7Q2qeRPddsLCTDifpXwhyc3psSk4k448JxFuRWFpgEK0MJ9rt9sxmtuN07JHFA3CUa n0LeYM1/5zcq6EWMPmfqd+f5vvtLsFJUaFW/3g+w= Received: from epsnrtp1.localdomain (unknown [182.195.42.162]) by epcas2p2.samsung.com (KnoxPortal) with ESMTP id 20230807013728epcas2p2169ae6ebe391ebec62d5113e5f651204~49hkySrnI2090220902epcas2p2I; Mon, 7 Aug 2023 01:37:28 +0000 (GMT) Received: from epsmgec2p1-new.samsung.com (unknown [182.195.36.70]) by epsnrtp1.localdomain (Postfix) with ESMTP id 4RJzTM1mjLz4x9Py; Mon, 7 Aug 2023 01:37:27 +0000 (GMT) X-AuditID: b6c32a4d-853ff70000047356-d9-64d04ad72a4e Received: from epcas2p2.samsung.com ( [182.195.41.54]) by epsmgec2p1-new.samsung.com (Symantec Messaging Gateway) with SMTP id 0C.0E.29526.7DA40D46; Mon, 7 Aug 2023 10:37:27 +0900 (KST) Mime-Version: 1.0 Subject: [PATCH v2] scsi: ufs: ufs-pci: Add support for QEMU Reply-To: jeuk20.kim@samsung.com Sender: Jeuk Kim From: Jeuk Kim To: "jejb@linux.ibm.com" , "martin.petersen@oracle.com" , "adrian.hunter@intel.com" , "bvanassche@acm.org" , Jeuk Kim , "avri.altman@wdc.com" CC: "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" X-Priority: 3 X-Content-Kind-Code: NORMAL X-CPGS-Detection: blocking_info_exchange X-Drm-Type: N,general X-Msg-Generator: Mail X-Msg-Type: PERSONAL X-Reply-Demand: N Message-ID: <20230807013726epcms2p1c604cb8e98680aebebb7cc5ab2d580f5@epcms2p1> Date: Mon, 07 Aug 2023 10:37:26 +0900 X-CMS-MailID: 20230807013726epcms2p1c604cb8e98680aebebb7cc5ab2d580f5 X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P X-CPGSPASS: Y X-CPGSPASS: Y X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprFJsWRmVeSWpSXmKPExsWy7bCmme51rwspB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Tv1w4oPG5h5JljoPzi/58YZ 9gtsCtumveiyzbtW8+BqX8Fxh3hn9g2PNmuoLLLKWK3569yrF08e3DvezK4nzT2tQj39ll9s 2NR5uy6cbJe+7fPQRzGFvy6tYJWUEktxRqKhFnNRcSIAowBJcS0EAAA= DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20230807013726epcms2p1c604cb8e98680aebebb7cc5ab2d580f5 References: Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org To ensure that the pci based QEMU ufs device properly works with linux, register the device id (0x0013) and vendor id (0x1b36) of QEMU ufs device. QEMU UFS will enable testing of the UFS driver inside a virtual machine on systems without UFS host controller. It can also be used to preemptively implement and test new features before the real device is created. The new qemu ufs device can be found at https://lore.kernel.org/qemu-devel/20230727155239.GA979354@fedora Signed-off-by: Jeuk Kim Acked-by: Adrian Hunter --- Since v1: - Based on Adrian's comment, I modified the commit message to be more detailed. --- drivers/ufs/host/ufshcd-pci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/ufs/host/ufshcd-pci.c b/drivers/ufs/host/ufshcd-pci.c index cf3987773051..29d322931427 100644 --- a/drivers/ufs/host/ufshcd-pci.c +++ b/drivers/ufs/host/ufshcd-pci.c @@ -590,6 +590,7 @@ static const struct dev_pm_ops ufshcd_pci_pm_ops = { }; static const struct pci_device_id ufshcd_pci_tbl[] = { + { PCI_VENDOR_ID_REDHAT, 0x0013, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, { PCI_VENDOR_ID_SAMSUNG, 0xC00C, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, { PCI_VDEVICE(INTEL, 0x9DFA), (kernel_ulong_t)&ufs_intel_cnl_hba_vops }, { PCI_VDEVICE(INTEL, 0x4B41), (kernel_ulong_t)&ufs_intel_ehl_hba_vops },