diff options
| -rw-r--r-- | MAINTAINERS | 10 | ||||
| -rw-r--r-- | drivers/Kconfig | 2 | ||||
| -rw-r--r-- | drivers/Makefile | 1 | ||||
| -rw-r--r-- | drivers/nvme/host/fc.c | 18 | ||||
| -rw-r--r-- | drivers/scsi/Kconfig | 1 | ||||
| -rw-r--r-- | drivers/scsi/Makefile | 1 | ||||
| -rw-r--r-- | drivers/scsi/esas2r/esas2r_flash.c | 2 | ||||
| -rw-r--r-- | drivers/scsi/isci/request.c | 2 | ||||
| -rw-r--r-- | drivers/scsi/lpfc/Makefile | 2 | ||||
| -rw-r--r-- | drivers/scsi/lpfc/lpfc_crtn.h | 3 | ||||
| -rw-r--r-- | drivers/scsi/lpfc/lpfc_hw.h | 22 | ||||
| -rw-r--r-- | drivers/scsi/lpfc/lpfc_ids.h | 30 | ||||
| -rw-r--r-- | drivers/scsi/lpfc/lpfc_init.c | 89 | ||||
| -rw-r--r-- | drivers/scsi/lpfc/lpfc_nvme.c | 45 | ||||
| -rw-r--r-- | drivers/scsi/lpfc/lpfc_scsi.c | 263 | ||||
| -rw-r--r-- | drivers/scsi/lpfc/lpfc_vmid.c | 288 | ||||
| -rw-r--r-- | drivers/scsi/mpi3mr/mpi3mr.h | 2 | ||||
| -rw-r--r-- | drivers/scsi/mpi3mr/mpi3mr_app.c | 50 | ||||
| -rw-r--r-- | drivers/scsi/myrb.c | 11 | ||||
| -rw-r--r-- | drivers/scsi/pmcraid.c | 2 | ||||
| -rw-r--r-- | drivers/scsi/qedf/qedf_io.c | 2 | ||||
| -rw-r--r-- | drivers/scsi/qla1280.c | 3 | ||||
| -rw-r--r-- | drivers/scsi/qla2xxx/qla_mid.c | 2 | ||||
| -rw-r--r-- | drivers/scsi/qla2xxx/qla_target.c | 7 | ||||
| -rw-r--r-- | drivers/scsi/scsi_lib.c | 2 | ||||
| -rw-r--r-- | drivers/scsi/scsi_sysfs.c | 1 | ||||
| -rw-r--r-- | drivers/scsi/sd.c | 5 | ||||
| -rw-r--r-- | drivers/scsi/sd.h | 4 | ||||
| -rw-r--r-- | drivers/scsi/sd_zbc.c | 26 | ||||
| -rw-r--r-- | drivers/scsi/smartpqi/smartpqi.h | 2 | ||||
| -rw-r--r-- | drivers/scsi/storvsc_drv.c | 2 | ||||
| -rw-r--r-- | drivers/ufs/Kconfig | 30 | ||||
| -rw-r--r-- | drivers/ufs/Makefile | 5 | ||||
| -rw-r--r-- | drivers/ufs/core/Kconfig | 60 | ||||
| -rw-r--r-- | drivers/ufs/core/Makefile | 10 | ||||
| -rw-r--r-- | drivers/ufs/core/ufs-debugfs.c (renamed from drivers/scsi/ufs/ufs-debugfs.c) | 2 | ||||
| -rw-r--r-- | drivers/ufs/core/ufs-debugfs.h (renamed from drivers/scsi/ufs/ufs-debugfs.h) | 0 | ||||
| -rw-r--r-- | drivers/ufs/core/ufs-fault-injection.c (renamed from drivers/scsi/ufs/ufs-fault-injection.c) | 0 | ||||
| -rw-r--r-- | drivers/ufs/core/ufs-fault-injection.h (renamed from drivers/scsi/ufs/ufs-fault-injection.h) | 0 | ||||
| -rw-r--r-- | drivers/ufs/core/ufs-hwmon.c (renamed from drivers/scsi/ufs/ufs-hwmon.c) | 2 | ||||
| -rw-r--r-- | drivers/ufs/core/ufs-sysfs.c (renamed from drivers/scsi/ufs/ufs-sysfs.c) | 2 | ||||
| -rw-r--r-- | drivers/ufs/core/ufs-sysfs.h (renamed from drivers/scsi/ufs/ufs-sysfs.h) | 0 | ||||
| -rw-r--r-- | drivers/ufs/core/ufs_bsg.c (renamed from drivers/scsi/ufs/ufs_bsg.c) | 2 | ||||
| -rw-r--r-- | drivers/ufs/core/ufs_bsg.h (renamed from drivers/scsi/ufs/ufs_bsg.h) | 0 | ||||
| -rw-r--r-- | drivers/ufs/core/ufshcd-crypto.c (renamed from drivers/scsi/ufs/ufshcd-crypto.c) | 2 | ||||
| -rw-r--r-- | drivers/ufs/core/ufshcd-crypto.h (renamed from drivers/scsi/ufs/ufshcd-crypto.h) | 4 | ||||
| -rw-r--r-- | drivers/ufs/core/ufshcd-priv.h (renamed from drivers/scsi/ufs/ufshcd-priv.h) | 2 | ||||
| -rw-r--r-- | drivers/ufs/core/ufshcd.c (renamed from drivers/scsi/ufs/ufshcd.c) | 9 | ||||
| -rw-r--r-- | drivers/ufs/core/ufshpb.c (renamed from drivers/scsi/ufs/ufshpb.c) | 2 | ||||
| -rw-r--r-- | drivers/ufs/core/ufshpb.h (renamed from drivers/scsi/ufs/ufshpb.h) | 0 | ||||
| -rw-r--r-- | drivers/ufs/host/Kconfig (renamed from drivers/scsi/ufs/Kconfig) | 75 | ||||
| -rw-r--r-- | drivers/ufs/host/Makefile (renamed from drivers/scsi/ufs/Makefile) | 12 | ||||
| -rw-r--r-- | drivers/ufs/host/cdns-pltfrm.c (renamed from drivers/scsi/ufs/cdns-pltfrm.c) | 0 | ||||
| -rw-r--r-- | drivers/ufs/host/tc-dwc-g210-pci.c (renamed from drivers/scsi/ufs/tc-dwc-g210-pci.c) | 2 | ||||
| -rw-r--r-- | drivers/ufs/host/tc-dwc-g210-pltfrm.c (renamed from drivers/scsi/ufs/tc-dwc-g210-pltfrm.c) | 0 | ||||
| -rw-r--r-- | drivers/ufs/host/tc-dwc-g210.c (renamed from drivers/scsi/ufs/tc-dwc-g210.c) | 4 | ||||
| -rw-r--r-- | drivers/ufs/host/tc-dwc-g210.h (renamed from drivers/scsi/ufs/tc-dwc-g210.h) | 0 | ||||
| -rw-r--r-- | drivers/ufs/host/ti-j721e-ufs.c (renamed from drivers/scsi/ufs/ti-j721e-ufs.c) | 0 | ||||
| -rw-r--r-- | drivers/ufs/host/ufs-exynos.c (renamed from drivers/scsi/ufs/ufs-exynos.c) | 6 | ||||
| -rw-r--r-- | drivers/ufs/host/ufs-exynos.h (renamed from drivers/scsi/ufs/ufs-exynos.h) | 0 | ||||
| -rw-r--r-- | drivers/ufs/host/ufs-hisi.c (renamed from drivers/scsi/ufs/ufs-hisi.c) | 8 | ||||
| -rw-r--r-- | drivers/ufs/host/ufs-hisi.h (renamed from drivers/scsi/ufs/ufs-hisi.h) | 0 | ||||
| -rw-r--r-- | drivers/ufs/host/ufs-mediatek-trace.h (renamed from drivers/scsi/ufs/ufs-mediatek-trace.h) | 2 | ||||
| -rw-r--r-- | drivers/ufs/host/ufs-mediatek.c (renamed from drivers/scsi/ufs/ufs-mediatek.c) | 6 | ||||
| -rw-r--r-- | drivers/ufs/host/ufs-mediatek.h (renamed from drivers/scsi/ufs/ufs-mediatek.h) | 0 | ||||
| -rw-r--r-- | drivers/ufs/host/ufs-qcom-ice.c (renamed from drivers/scsi/ufs/ufs-qcom-ice.c) | 0 | ||||
| -rw-r--r-- | drivers/ufs/host/ufs-qcom.c (renamed from drivers/scsi/ufs/ufs-qcom.c) | 8 | ||||
| -rw-r--r-- | drivers/ufs/host/ufs-qcom.h (renamed from drivers/scsi/ufs/ufs-qcom.h) | 2 | ||||
| -rw-r--r-- | drivers/ufs/host/ufshcd-dwc.c (renamed from drivers/scsi/ufs/ufshcd-dwc.c) | 4 | ||||
| -rw-r--r-- | drivers/ufs/host/ufshcd-dwc.h (renamed from drivers/scsi/ufs/ufshcd-dwc.h) | 2 | ||||
| -rw-r--r-- | drivers/ufs/host/ufshcd-pci.c (renamed from drivers/scsi/ufs/ufshcd-pci.c) | 2 | ||||
| -rw-r--r-- | drivers/ufs/host/ufshcd-pltfrm.c (renamed from drivers/scsi/ufs/ufshcd-pltfrm.c) | 4 | ||||
| -rw-r--r-- | drivers/ufs/host/ufshcd-pltfrm.h (renamed from drivers/scsi/ufs/ufshcd-pltfrm.h) | 2 | ||||
| -rw-r--r-- | drivers/ufs/host/ufshci-dwc.h (renamed from drivers/scsi/ufs/ufshci-dwc.h) | 0 | ||||
| -rw-r--r-- | include/linux/nvme-fc-driver.h | 14 | ||||
| -rw-r--r-- | include/ufs/ufs.h (renamed from drivers/scsi/ufs/ufs.h) | 0 | ||||
| -rw-r--r-- | include/ufs/ufs_quirks.h (renamed from drivers/scsi/ufs/ufs_quirks.h) | 0 | ||||
| -rw-r--r-- | include/ufs/ufshcd.h (renamed from drivers/scsi/ufs/ufshcd.h) | 8 | ||||
| -rw-r--r-- | include/ufs/ufshci.h (renamed from drivers/scsi/ufs/ufshci.h) | 0 | ||||
| -rw-r--r-- | include/ufs/unipro.h (renamed from drivers/scsi/ufs/unipro.h) | 0 |
80 files changed, 728 insertions, 465 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index 20bdf22601c3..b54288db77aa 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2565,7 +2565,7 @@ F: drivers/pci/controller/dwc/pcie-qcom.c F: drivers/phy/qualcomm/ F: drivers/power/*/msm* F: drivers/reset/reset-qcom-* -F: drivers/scsi/ufs/ufs-qcom* +F: drivers/ufs/host/ufs-qcom* F: drivers/spi/spi-geni-qcom.c F: drivers/spi/spi-qcom-qspi.c F: drivers/spi/spi-qup.c @@ -17755,6 +17755,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git T: git git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git F: Documentation/devicetree/bindings/scsi/ F: drivers/scsi/ +F: drivers/ufs/ F: include/scsi/ SCSI TAPE DRIVER @@ -20414,24 +20415,25 @@ F: include/uapi/linux/cdrom.h UNIVERSAL FLASH STORAGE HOST CONTROLLER DRIVER R: Alim Akhtar <alim.akhtar@samsung.com> R: Avri Altman <avri.altman@wdc.com> +R: Bart Van Assche <bvanassche@acm.org> L: linux-scsi@vger.kernel.org S: Supported F: Documentation/devicetree/bindings/ufs/ F: Documentation/scsi/ufs.rst -F: drivers/scsi/ufs/ +F: drivers/ufs/core/ UNIVERSAL FLASH STORAGE HOST CONTROLLER DRIVER DWC HOOKS M: Pedro Sousa <pedrom.sousa@synopsys.com> L: linux-scsi@vger.kernel.org S: Supported -F: drivers/scsi/ufs/*dwc* +F: drivers/ufs/host/*dwc* UNIVERSAL FLASH STORAGE HOST CONTROLLER DRIVER MEDIATEK HOOKS M: Stanley Chu <stanley.chu@mediatek.com> L: linux-scsi@vger.kernel.org L: linux-mediatek@lists.infradead.org (moderated for non-subscribers) S: Maintained -F: drivers/scsi/ufs/ufs-mediatek* +F: drivers/ufs/host/ufs-mediatek* UNSORTED BLOCK IMAGES (UBI) M: Richard Weinberger <richard@nod.at> diff --git a/drivers/Kconfig b/drivers/Kconfig index 38af943294ca..b6a172d32a7d 100644 --- a/drivers/Kconfig +++ b/drivers/Kconfig @@ -107,6 +107,8 @@ source "drivers/usb/Kconfig" source "drivers/mmc/Kconfig" +source "drivers/ufs/Kconfig" + source "drivers/memstick/Kconfig" source "drivers/leds/Kconfig" diff --git a/drivers/Makefile b/drivers/Makefile index 091627d60991..9a30842b22c5 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -128,6 +128,7 @@ obj-$(CONFIG_PM_OPP) += opp/ obj-$(CONFIG_CPU_FREQ) += cpufreq/ obj-$(CONFIG_CPU_IDLE) += cpuidle/ obj-y += mmc/ +obj-y += ufs/ obj-$(CONFIG_MEMSTICK) += memstick/ obj-$(CONFIG_NEW_LEDS) += leds/ obj-$(CONFIG_INFINIBAND) += infiniband/ diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c index 7ae72c7a211b..3c778bb0c294 100644 --- a/drivers/nvme/host/fc.c +++ b/drivers/nvme/host/fc.c @@ -1899,6 +1899,24 @@ nvme_fc_ctrl_ioerr_work(struct work_struct *work) nvme_fc_error_recovery(ctrl, "transport detected io error"); } +/* + * nvme_fc_io_getuuid - Routine called to get the appid field + * associated with request by the lldd + * @req:IO request from nvme fc to driver + * Returns: UUID if there is an appid associated with VM or + * NULL if the user/libvirt has not set the appid to VM + */ +char *nvme_fc_io_getuuid(struct nvmefc_fcp_req *req) +{ + struct nvme_fc_fcp_op *op = fcp_req_to_fcp_op(req); + struct request *rq = op->rq; + + if (!IS_ENABLED(CONFIG_BLK_CGROUP_FC_APPID) || !rq->bio) + return NULL; + return blkcg_get_fc_appid(rq->bio); +} +EXPORT_SYMBOL_GPL(nvme_fc_io_getuuid); + static void nvme_fc_fcpio_done(struct nvmefc_fcp_req *req) { diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig index 6e3a04107bb6..a9fe5152addd 100644 --- a/drivers/scsi/Kconfig +++ b/drivers/scsi/Kconfig @@ -500,7 +500,6 @@ source "drivers/scsi/megaraid/Kconfig.megaraid" source "drivers/scsi/mpt3sas/Kconfig" source "drivers/scsi/mpi3mr/Kconfig" source "drivers/scsi/smartpqi/Kconfig" -source "drivers/scsi/ufs/Kconfig" config SCSI_HPTIOP tristate "HighPoint RocketRAID 3xxx/4xxx Controller support" diff --git a/drivers/scsi/Makefile b/drivers/scsi/Makefile index 19814c26c908..2ad3bc052531 100644 --- a/drivers/scsi/Makefile +++ b/drivers/scsi/Makefile @@ -101,7 +101,6 @@ obj-$(CONFIG_MEGARAID_NEWGEN) += megaraid/ obj-$(CONFIG_MEGARAID_SAS) += megaraid/ obj-$(CONFIG_SCSI_MPT3SAS) += mpt3sas/ obj-$(CONFIG_SCSI_MPI3MR) += mpi3mr/ -obj-$(CONFIG_SCSI_UFSHCD) += ufs/ obj-$(CONFIG_SCSI_ACARD) += atp870u.o obj-$(CONFIG_SCSI_SUNESP) += esp_scsi.o sun_esp.o obj-$(CONFIG_SCSI_INITIO) += initio.o diff --git a/drivers/scsi/esas2r/esas2r_flash.c b/drivers/scsi/esas2r/esas2r_flash.c index 429d64299fe9..f910e2553fbb 100644 --- a/drivers/scsi/esas2r/esas2r_flash.c +++ b/drivers/scsi/esas2r/esas2r_flash.c @@ -232,7 +232,7 @@ static bool load_image(struct esas2r_adapter *a, struct esas2r_request *rq) */ rq->req_stat = RS_PENDING; if (test_bit(AF_DEGRADED_MODE, &a->flags)) - /* not suppported for now */; + /* not supported for now */; else build_flash_msg(a, rq); diff --git a/drivers/scsi/isci/request.c b/drivers/scsi/isci/request.c index ac17e3a35d2c..6370cdbfba08 100644 --- a/drivers/scsi/isci/request.c +++ b/drivers/scsi/isci/request.c @@ -2182,7 +2182,7 @@ static enum sci_status atapi_data_tc_completion_handler(struct isci_request *ire case (SCU_TASK_DONE_UNEXP_FIS << SCU_COMPLETION_TL_STATUS_SHIFT): { u16 len = sci_req_tx_bytes(ireq); - /* likely non-error data underrrun, workaround missing + /* likely non-error data underrun, workaround missing * d2h frame from the controller */ if (d2h->fis_type != FIS_REGD2H) { diff --git a/drivers/scsi/lpfc/Makefile b/drivers/scsi/lpfc/Makefile index 092a971d066b..bbd1faf41e80 100644 --- a/drivers/scsi/lpfc/Makefile +++ b/drivers/scsi/lpfc/Makefile @@ -33,4 +33,4 @@ obj-$(CONFIG_SCSI_LPFC) := lpfc.o lpfc-objs := lpfc_mem.o lpfc_sli.o lpfc_ct.o lpfc_els.o \ lpfc_hbadisc.o lpfc_init.o lpfc_mbox.o lpfc_nportdisc.o \ lpfc_scsi.o lpfc_attr.o lpfc_vport.o lpfc_debugfs.o lpfc_bsg.o \ - lpfc_nvme.o lpfc_nvmet.o + lpfc_nvme.o lpfc_nvmet.o lpfc_vmid.o diff --git a/drivers/scsi/lpfc/lpfc_crtn.h b/drivers/scsi/lpfc/lpfc_crtn.h index b0775be31d5c..b1be0dd0337a 100644 --- a/drivers/scsi/lpfc/lpfc_crtn.h +++ b/drivers/scsi/lpfc/lpfc_crtn.h @@ -671,6 +671,9 @@ int lpfc_vmid_cmd(struct lpfc_vport *vport, int lpfc_vmid_hash_fn(const char *vmid, int len); struct lpfc_vmid *lpfc_get_vmid_from_hashtable(struct lpfc_vport *vport, uint32_t hash, uint8_t *buf); +int lpfc_vmid_get_appid(struct lpfc_vport *vport, char *uuid, + enum dma_data_direction iodir, + union lpfc_vmid_io_tag *tag); void lpfc_vmid_vport_cleanup(struct lpfc_vport *vport); int lpfc_issue_els_qfpa(struct lpfc_vport *vport); diff --git a/drivers/scsi/lpfc/lpfc_hw.h b/drivers/scsi/lpfc/lpfc_hw.h index 748c53219986..7b8cf678abb5 100644 --- a/drivers/scsi/lpfc/lpfc_hw.h +++ b/drivers/scsi/lpfc/lpfc_hw.h @@ -1736,6 +1736,28 @@ struct lpfc_fdmi_reg_portattr { #define PCI_DEVICE_ID_TOMCAT 0x0714 #define PCI_DEVICE_ID_SKYHAWK 0x0724 #define PCI_DEVICE_ID_SKYHAWK_VF 0x072c +#define PCI_VENDOR_ID_ATTO 0x117c +#define PCI_DEVICE_ID_CLRY_16XE 0x0064 +#define PCI_DEVICE_ID_CLRY_161E 0x0063 +#define PCI_DEVICE_ID_CLRY_162E 0x0064 +#define PCI_DEVICE_ID_CLRY_164E 0x0065 +#define PCI_DEVICE_ID_CLRY_16XP 0x0094 +#define PCI_DEVICE_ID_CLRY_161P 0x00a0 +#define PCI_DEVICE_ID_CLRY_162P 0x0094 +#define PCI_DEVICE_ID_CLRY_164P 0x00a1 +#define PCI_DEVICE_ID_CLRY_32XE 0x0094 +#define PCI_DEVICE_ID_CLRY_321E 0x00a2 +#define PCI_DEVICE_ID_CLRY_322E 0x00a3 +#define PCI_DEVICE_ID_CLRY_324E 0x00ac +#define PCI_DEVICE_ID_CLRY_32XP 0x00bb +#define PCI_DEVICE_ID_CLRY_321P 0x00bc +#define PCI_DEVICE_ID_CLRY_322P 0x00bd +#define PCI_DEVICE_ID_CLRY_324P 0x00be +#define PCI_DEVICE_ID_TLFC_2 0x0064 +#define PCI_DEVICE_ID_TLFC_2XX2 0x4064 +#define PCI_DEVICE_ID_TLFC_3 0x0094 +#define PCI_DEVICE_ID_TLFC_3162 0x40a6 +#define PCI_DEVICE_ID_TLFC_3322 0x40a7 #define JEDEC_ID_ADDRESS 0x0080001c #define FIREFLY_JEDEC_ID 0x1ACC diff --git a/drivers/scsi/lpfc/lpfc_ids.h b/drivers/scsi/lpfc/lpfc_ids.h index 6a90e6e53d09..a1b9be245560 100644 --- a/drivers/scsi/lpfc/lpfc_ids.h +++ b/drivers/scsi/lpfc/lpfc_ids.h @@ -124,5 +124,35 @@ const struct pci_device_id lpfc_id_table[] = { PCI_ANY_ID, PCI_ANY_ID, }, {PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_SKYHAWK_VF, PCI_ANY_ID, PCI_ANY_ID, }, + {PCI_VENDOR_ID_ATTO, PCI_DEVICE_ID_CLRY_16XE, + PCI_VENDOR_ID_ATTO, PCI_DEVICE_ID_CLRY_161E, }, + {PCI_VENDOR_ID_ATTO, PCI_DEVICE_ID_CLRY_16XE, + PCI_VENDOR_ID_ATTO, PCI_DEVICE_ID_CLRY_162E, }, + {PCI_VENDOR_ID_ATTO, PCI_DEVICE_ID_CLRY_16XE, + PCI_VENDOR_ID_ATTO, PCI_DEVICE_ID_CLRY_164E, }, + {PCI_VENDOR_ID_ATTO, PCI_DEVICE_ID_CLRY_16XP, + PCI_VENDOR_ID_ATTO, PCI_DEVICE_ID_CLRY_161P, }, + {PCI_VENDOR_ID_ATTO, PCI_DEVICE_ID_CLRY_16XP, + PCI_VENDOR_ID_ATTO, PCI_DEVICE_ID_CLRY_162P, }, + {PCI_VENDOR_ID_ATTO, PCI_DEVICE_ID_CLRY_16XP, + PCI_VENDOR_ID_ATTO, PCI_DEVICE_ID_CLRY_164P, }, + {PCI_VENDOR_ID_ATTO, PCI_DEVICE_ID_CLRY_32XE, + PCI_VENDOR_ID_ATTO, PCI_DEVICE_ID_CLRY_321E, }, + {PCI_VENDOR_ID_ATTO, PCI_DEVICE_ID_CLRY_32XE, + PCI_VENDOR_ID_ATTO, PCI_DEVICE_ID_CLRY_322E, }, + {PCI_VENDOR_ID_ATTO, PCI_DEVICE_ID_CLRY_32XE, + PCI_VENDOR_ID_ATTO, PCI_DEVICE_ID_CLRY_324E, }, + {PCI_VENDOR_ID_ATTO, PCI_DEVICE_ID_CLRY_32XP, + PCI_VENDOR_ID_ATTO, PCI_DEVICE_ID_CLRY_321P, }, + {PCI_VENDOR_ID_ATTO, PCI_DEVICE_ID_CLRY_32XP, + PCI_VENDOR_ID_ATTO, PCI_DEVICE_ID_CLRY_322P, }, + {PCI_VENDOR_ID_ATTO, PCI_DEVICE_ID_CLRY_32XP, + PCI_VENDOR_ID_ATTO, PCI_DEVICE_ID_CLRY_324P, }, + {PCI_VENDOR_ID_ATTO, PCI_DEVICE_ID_TLFC_2, + PCI_VENDOR_ID_ATTO, PCI_DEVICE_ID_TLFC_2XX2, }, + {PCI_VENDOR_ID_ATTO, PCI_DEVICE_ID_TLFC_3, + PCI_VENDOR_ID_ATTO, PCI_DEVICE_ID_TLFC_3162, }, + {PCI_VENDOR_ID_ATTO, PCI_DEVICE_ID_TLFC_3, + PCI_VENDOR_ID_ATTO, PCI_DEVICE_ID_TLFC_3322, }, { 0 } }; diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 2bffaa681fcc..93b94c64518d 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -2415,6 +2415,90 @@ lpfc_parse_vpd(struct lpfc_hba *phba, uint8_t *vpd, int len) } /** + * lpfc_get_atto_model_desc - Retrieve ATTO HBA device model name and description + * @phba: pointer to lpfc hba data structure. + * @mdp: pointer to the data structure to hold the derived model name. + * @descp: pointer to the data structure to hold the derived description. + * + * This routine retrieves HBA's description based on its registered PCI device + * ID. The @descp passed into this function points to an array of 256 chars. It + * shall be returned with the model name, maximum speed, and the host bus type. + * The @mdp passed into this function points to an array of 80 chars. When the + * function returns, the @mdp will be filled with the model name. + **/ +static void +lpfc_get_atto_model_desc(struct lpfc_hba *phba, uint8_t *mdp, uint8_t *descp) +{ + uint16_t sub_dev_id = phba->pcidev->subsystem_device; + char *model = "<Unknown>"; + int tbolt = 0; + + switch (sub_dev_id) { + case PCI_DEVICE_ID_CLRY_161E: + model = "161E"; + break; + case PCI_DEVICE_ID_CLRY_162E: + model = "162E"; + break; + case PCI_DEVICE_ID_CLRY_164E: + model = "164E"; + break; + case PCI_DEVICE_ID_CLRY_161P: + model = "161P"; + break; + case PCI_DEVICE_ID_CLRY_162P: + model = "162P"; + break; + case PCI_DEVICE_ID_CLRY_164P: + model = "164P"; + break; + case PCI_DEVICE_ID_CLRY_321E: + model = "321E"; + break; + case PCI_DEVICE_ID_CLRY_322E: + model = "322E"; + break; + case PCI_DEVICE_ID_CLRY_324E: + model = "324E"; + break; + case PCI_DEVICE_ID_CLRY_321P: + model = "321P"; + break; + case PCI_DEVICE_ID_CLRY_322P: + model = "322P"; + break; + case PCI_DEVICE_ID_CLRY_324P: + model = "324P"; + break; + case PCI_DEVICE_ID_TLFC_2XX2: + model = "2XX2"; + tbolt = 1; + break; + case PCI_DEVICE_ID_TLFC_3162: + model = "3162"; + tbolt = 1; + break; + case PCI_DEVICE_ID_TLFC_3322: + model = "3322"; + tbolt = 1; + break; + default: + model = "Unknown"; + break; + } + + if (mdp && mdp[0] == '\0') + snprintf(mdp, 79, "%s", model); + + if (descp && descp[0] == '\0') + snprintf(descp, 255, + "ATTO %s%s, Fibre Channel Adapter Initiator, Port %s", + (tbolt) ? "ThunderLink FC " : "Celerity FC-", + model, + phba->Port); +} + +/** * lpfc_get_hba_model_desc - Retrieve HBA device model name and description * @phba: pointer to lpfc hba data structure. * @mdp: pointer to the data structure to hold the derived model name. @@ -2444,6 +2528,11 @@ lpfc_get_hba_model_desc(struct lpfc_hba *phba, uint8_t *mdp, uint8_t *descp) && descp && descp[0] != '\0') return; + if (phba->pcidev->vendor == PCI_VENDOR_ID_ATTO) { + lpfc_get_atto_model_desc(phba, mdp, descp); + return; + } + if (phba->lmt & LMT_64Gb) max_speed = 64; else if (phba->lmt & LMT_32Gb) diff --git a/drivers/scsi/lpfc/lpfc_nvme.c b/drivers/scsi/lpfc/lpfc_nvme.c index 5385f4de5523..335e90633933 100644 --- a/drivers/scsi/lpfc/lpfc_nvme.c +++ b/drivers/scsi/lpfc/lpfc_nvme.c @@ -1279,6 +1279,19 @@ lpfc_nvme_prep_io_cmd(struct lpfc_vport *vport, /* Words 13 14 15 are for PBDE support */ + /* add the VMID tags as per switch response */ + if (unlikely(lpfc_ncmd->cur_iocbq.cmd_flag & LPFC_IO_VMID)) { + if (phba->pport->vmid_priority_tagging) { + bf_set(wqe_ccpe, &wqe->fcp_iwrite.wqe_com, 1); + bf_set(wqe_ccp, &wqe->fcp_iwrite.wqe_com, + lpfc_ncmd->cur_iocbq.vmid_tag.cs_ctl_vmid); + } else { + bf_set(wqe_appid, &wqe->fcp_iwrite.wqe_com, 1); + bf_set(wqe_wqes, &wqe->fcp_iwrite.wqe_com, 1); + wqe->words[31] = lpfc_ncmd->cur_iocbq.vmid_tag.app_id; + } + } + pwqeq->vport = vport; return 0; } @@ -1504,6 +1517,11 @@ lpfc_nvme_fcp_io_submit(struct nvme_fc_local_port *pnvme_lport, struct lpfc_nvme_fcpreq_priv *freqpriv; struct nvme_common_command *sqe; uint64_t start = 0; +#if (IS_ENABLED(CONFIG_NVME_FC)) + u8 *uuid = NULL; + int err; + enum dma_data_direction iodir; +#endif /* Validate pointers. LLDD fault handling with transport does * have timing r |
