scsi: ufs: ufs-pci: Add support for QEMU
authorJeuk Kim <jeuk20.kim@samsung.com>
Mon, 7 Aug 2023 01:37:26 +0000 (10:37 +0900)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 8 Aug 2023 02:39:00 +0000 (22:39 -0400)
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 <jeuk20.kim@samsung.com>
Link: https://lore.kernel.org/r/20230807013726epcms2p1c604cb8e98680aebebb7cc5ab2d580f5@epcms2p1
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/ufs/host/ufshcd-pci.c

index 95df8105265ab2b35b3c876097907d6ff8b61c19..248a49e5e7f3570fd2e4d15add6805b062607efc 100644 (file)
@@ -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 },