SCSI fixes for 6.3-rc1
Subsystems (11)
James Bottomley
maintainer20 Fixes all in drivers except the one zone storage revalidation fix to sd. The megaraid_sas fixes are more on the level of a driver update (enabling crash dump and increasing lun number) but I thought you could let this slide on -rc1 and the next most extensive update is a load of fixes to mpi3mr.
The patch is available here:
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git scsi-fixes
The short changelog is:
Adrien Thierry (1):
scsi: ufs: core: Add soft dependency on governor_simpleondemand
Asutosh Das (2):
scsi: ufs: mcq: qcom: Clean the return path of ufs_qcom_mcq_config_resource()
scsi: ufs: mcq: qcom: Fix passing zero to PTR_ERR
Chandrakanth Patil (3):
scsi: megaraid_sas: Driver version update to 07.725.01.00-rc1
scsi: megaraid_sas: Add crash dump mode capability bit in MFI capabilities
scsi: megaraid_sas: Update max supported LD IDs to 240
Dan Carpenter (1):
scsi: ufs: ufs-qcom: Remove impossible check
Daniel Wagner (1):
scsi: qla2xxx: Add option to disable FC2 Target support
Jakob Koschel (1):
scsi: lpfc: Avoid usage of list iterator variable after loop
Justin Tee (1):
scsi: lpfc: Check kzalloc() in lpfc_sli4_cgn_params_read()
Kang Chen (1):
scsi: hisi_sas: Check devm_add_action() return value
Maurizio Lombardi (1):
scsi: target: iscsi: Fix an error message in iscsi_check_key()
Michael Kelley (1):
scsi: storvsc: Handle BlockSize change in Hyper-V VHD/VHDX file
Ranjan Kumar (6):
scsi: mpi3mr: Bad drive in topology results kernel crash
scsi: mpi3mr: NVMe command size greater than 8K fails
scsi: mpi3mr: Return proper values for failures in firmware init path
scsi: mpi3mr: Wait for diagnostic save during controller init
scsi: mpi3mr: Driver unload crashes host when enhanced logging is enabled
scsi: mpi3mr: ioctl timeout when disabling/enabling interrupt
Shin'ichiro Kawasaki (1):
scsi: sd: Fix wrong zone_write_granularity value during revalidate
And the diffstat:
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 3 +- drivers/scsi/lpfc/lpfc_init.c | 2 ++ drivers/scsi/lpfc/lpfc_sli.c | 12 +++----- drivers/scsi/megaraid/megaraid_sas.h | 12 +++++--- drivers/scsi/megaraid/megaraid_sas_fp.c | 2 +- drivers/scsi/megaraid/megaraid_sas_fusion.c | 3 ++ drivers/scsi/mpi3mr/mpi3mr.h | 3 ++ drivers/scsi/mpi3mr/mpi3mr_app.c | 4 +-- drivers/scsi/mpi3mr/mpi3mr_fw.c | 42 +++++++++++++++++++++++--- drivers/scsi/mpi3mr/mpi3mr_os.c | 1 + drivers/scsi/mpi3mr/mpi3mr_transport.c | 15 +++++---- drivers/scsi/qla2xxx/qla_gbl.h | 1 + drivers/scsi/qla2xxx/qla_init.c | 3 +- drivers/scsi/qla2xxx/qla_os.c | 10 +++++- drivers/scsi/sd.c | 7 ++++- drivers/scsi/sd_zbc.c | 8 ----- drivers/scsi/storvsc_drv.c | 16 ++++++++++ drivers/target/iscsi/iscsi_target_parameters.c | 12 +++++--- drivers/ufs/core/ufshcd.c | 1 + drivers/ufs/host/ufs-qcom.c | 10 +++--- 20 files changed, 117 insertions(+), 50 deletions(-)
With full diff below.
James
---
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c +1 -2
@@ -2495,8 +2495,7 @@ static int interrupt_preinit_v3_hw(struct hisi_hba *hisi_hba) hisi_hba->cq_nvecs = vectors -BASE_VECTORS_V3_HW ; shost->nr_hw_queues = hisi_hba->cq_nvecs; -devm_add_action (&pdev->dev, hisi_sas_v3_free_vectors, pdev); -return 0 ; +return devm_add_action (&pdev->dev, hisi_sas_v3_free_vectors, pdev); }static int interrupt_init_v3_hw (struct hisi_hba *hisi_hba)
drivers/scsi/lpfc/lpfc_init.c +2 -0
@@ -7291,6 +7291,8 @@ lpfc_sli4_cgn_params_read(struct lpfc_hba *phba)/* Find out if the FW has a new set of congestion parameters. */ len =sizeof (struct lpfc_cgn_param ); pdata =kzalloc (len,GFP_KERNEL ); +if (!pdata) +return -ENOMEM ; ret =lpfc_read_object (phba, (char *)LPFC_PORT_CFG_NAME , pdata, len);
drivers/scsi/lpfc/lpfc_sli.c +4 -8
@@ -21899,20 +21899,20 @@ lpfc_get_io_buf_from_private_pool(struct lpfc_hba *phba,static struct lpfc_io_buf *lpfc_get_io_buf_from_expedite_pool (struct lpfc_hba *phba) { -struct lpfc_io_buf *lpfc_ncmd; +struct lpfc_io_buf *lpfc_ncmd =NULL , *iter;struct lpfc_io_buf *lpfc_ncmd_next;unsigned long iflag;struct lpfc_epd_pool *epd_pool; epd_pool = &phba->epd_pool; - lpfc_ncmd =NULL ;spin_lock_irqsave (&epd_pool->lock, iflag);if (epd_pool->count >0 ) { -list_for_each_entry_safe (lpfc_ncmd, lpfc_ncmd_next, +list_for_each_entry_safe (iter, lpfc_ncmd_next, &epd_pool->list, list) { -list_del (&lpfc_ncmd->list); +list_del (&iter->list); epd_pool->count--; + lpfc_ncmd = iter;break ; } }
@@ -22109,10 +22109,6 @@ lpfc_read_object(struct lpfc_hba *phba, char *rdobject, uint32_t *datap,struct lpfc_dmabuf *pcmd;u32 rd_object_name[LPFC_MBX_OBJECT_NAME_LEN_DW ] = {0 }; -/* sanity check on queue memory */ -if (!datap) -return -ENODEV ; - mbox =mempool_alloc (phba->mbox_mem_pool,GFP_KERNEL );if (!mbox)return -ENOMEM ;
drivers/scsi/megaraid/megaraid_sas.h +8 -4
@@ -23,8 +23,8 @@/* * MegaRAID SAS Driver meta data */ -#define MEGASAS_VERSION "07.719.03.00-rc1" -#define MEGASAS_RELDATE "Sep 29, 2021" +#define MEGASAS_VERSION "07.725.01.00-rc1" +#define MEGASAS_RELDATE "Mar 2, 2023"#define MEGASAS_MSIX_NAME_LEN 32
@@ -1519,6 +1519,8 @@ struct megasas_ctrl_info {#define MEGASAS_MAX_LD_IDS (MEGASAS_MAX_LD_CHANNELS * \ MEGASAS_MAX_DEV_PER_CHANNEL) +#define MEGASAS_MAX_SUPPORTED_LD_IDS 240 +#define MEGASAS_MAX_SECTORS (2*1024)#define MEGASAS_MAX_SECTORS_IEEE (2*128)#define MEGASAS_DBG_LVL 1
@@ -1758,7 +1760,8 @@ union megasas_sgl_frame { typedef union _MFI_CAPABILITIES { struct { #if defined(__BIG_ENDIAN_BITFIELD) - u32 reserved:16; + u32 reserved:15; + u32 support_memdump:1; u32 support_fw_exposed_dev_list:1; u32 support_nvme_passthru:1; u32 support_64bit_mode:1;
@@ -1792,7 +1795,8 @@ typedef union _MFI_CAPABILITIES { u32 support_64bit_mode:1; u32 support_nvme_passthru:1; u32 support_fw_exposed_dev_list:1; - u32 reserved:16; + u32 support_memdump:1; + u32 reserved:15;#endif } mfi_capabilities;__le32 reg;
drivers/scsi/megaraid/megaraid_sas_fp.c +1 -1
@@ -358,7 +358,7 @@ u8 MR_ValidateMapInfo(struct megasas_instance *instance, u64 map_id) ld =MR_TargetIdToLdGet (i, drv_map);/* For non existing VDs, iterate to next VD*/ -if (ld >= (MAX_LOGICAL_DRIVES_EXT -1 )) +if (ld >=MEGASAS_MAX_SUPPORTED_LD_IDS )continue ; raid =MR_LdRaidGet (ld, drv_map);
drivers/scsi/megaraid/megaraid_sas_fusion.c +3 -0
@@ -1201,6 +1201,9 @@ megasas_ioc_init_fusion(struct megasas_instance *instance) drv_ops->mfi_capabilities.support_nvme_passthru =1 ; drv_ops->mfi_capabilities.support_fw_exposed_dev_list =1 ; +if (reset_devices) + drv_ops->mfi_capabilities.support_memdump =1 ; +if (instance->consistent_mask_64bit) drv_ops->mfi_capabilities.support_64bit_mode =1 ;
drivers/scsi/mpi3mr/mpi3mr.h +3 -0
@@ -902,6 +902,7 @@ struct scmd_priv {* @admin_reply_ephase:Admin reply queue expected phase * @admin_reply_base: Admin reply queue base virtual address * @admin_reply_dma: Admin reply queue base dma address +* @admin_reply_q_in_use: Queue is handled by poll/ISR * @ready_timeout: Controller ready timeout * @intr_info: Interrupt cookie pointer * @intr_info_count: Number of interrupt cookies
@@ -1055,6 +1056,7 @@ struct mpi3mr_ioc {u8 admin_reply_ephase;void *admin_reply_base;dma_addr_t admin_reply_dma; +atomic_t admin_reply_q_in_use;u32 ready_timeout;
@@ -1390,4 +1392,5 @@ void mpi3mr_add_event_wait_for_device_refresh(struct mpi3mr_ioc *mrioc);void mpi3mr_flush_drv_cmds (struct mpi3mr_ioc *mrioc);void mpi3mr_flush_cmds_for_unrecovered_controller (struct mpi3mr_ioc *mrioc);void mpi3mr_free_enclosure_list (struct mpi3mr_ioc *mrioc); +int mpi3mr_process_admin_reply_q (struct mpi3mr_ioc *mrioc);#endif /*MPI3MR_H_INCLUDED*/
drivers/scsi/mpi3mr/mpi3mr_app.c +2 -2
@@ -886,7 +886,7 @@ static int mpi3mr_build_nvme_prp(struct mpi3mr_ioc *mrioc,* each time through the loop. */ *prp_entry =cpu_to_le64 (dma_addr); -if (*prp1_entry & sgemod_mask) { +if (*prp_entry & sgemod_mask) {dprint_bsg_err (mrioc,"%s: PRP address collides with SGE modifier\n" , __func__);
@@ -895,7 +895,7 @@ static int mpi3mr_build_nvme_prp(struct mpi3mr_ioc *mrioc, *prp_entry &= ~sgemod_mask; *prp_entry |= sgemod_val; prp_entry++; - prp_entry_dma++; + prp_entry_dma += prp_size; }/*
drivers/scsi/mpi3mr/mpi3mr_fw.c +37 -5
121 lines not on this page · raw message
drivers/scsi/mpi3mr/mpi3mr_os.c +1 -0
@@ -3720,6 +3720,7 @@ int mpi3mr_issue_tm(struct mpi3mr_ioc *mrioc, u8 tm_type,mpi3mr_poll_pend_io_completions (mrioc);mpi3mr_ioc_enable_intr (mrioc);mpi3mr_poll_pend_io_completions (mrioc); +mpi3mr_process_admin_reply_q (mrioc); }switch (tm_type) {case MPI3_SCSITASKMGMT_TASKTYPE_TARGET_RESET :
drivers/scsi/mpi3mr/mpi3mr_transport.c +9 -6
@@ -1552,7 +1552,8 @@ static void mpi3mr_sas_port_remove(struct mpi3mr_ioc *mrioc, u64 sas_address,list_for_each_entry_safe (mr_sas_phy, next_phy, &mr_sas_port->phy_list, port_siblings) { -if ((mrioc->logging_level &MPI3_DEBUG_TRANSPORT_INFO )) +if ((!mrioc->stop_drv_processing) && + (mrioc->logging_level &MPI3_DEBUG_TRANSPORT_INFO )) dev_info(&mr_sas_port->port->dev, "remove: sas_address(0x%016llx), phy(%d)\n", (unsigned long long)
@@ -2357,15 +2358,16 @@ int mpi3mr_report_tgtdev_to_sas_transport(struct mpi3mr_ioc *mrioc, tgtdev->host_exposed =1 ;if (!mpi3mr_sas_port_add (mrioc, tgtdev->dev_handle, sas_address_parent, hba_port)) { - tgtdev->host_exposed =0 ; retval =-1 ; - }else if ((!tgtdev->starget)) { -if (!mrioc->is_driver_loading) + }else if ((!tgtdev->starget) && (!mrioc->is_driver_loading)) {mpi3mr_sas_port_remove (mrioc, sas_address, sas_address_parent, hba_port); - tgtdev->host_exposed =0 ; retval =-1 ; } +if (retval) { + tgtdev->dev_spec.sas_sata_inf.hba_port =NULL ; + tgtdev->host_exposed =0 ; + }return retval; }
@@ -2394,6 +2396,7 @@ void mpi3mr_remove_tgtdev_from_sas_transport(struct mpi3mr_ioc *mrioc,mpi3mr_sas_port_remove (mrioc, sas_address, sas_address_parent, hba_port); tgtdev->host_exposed =0 ; + tgtdev->dev_spec.sas_sata_inf.hba_port =NULL ; }/**
@@ -2450,7 +2453,7 @@ static u8 mpi3mr_get_port_id_by_rphy(struct mpi3mr_ioc *mrioc, struct sas_rphy * tgtdev =__mpi3mr_get_tgtdev_by_addr_and_rphy (mrioc, rphy->identify.sas_address, rphy); -if (tgtdev) { +if (tgtdev && tgtdev->dev_spec.sas_sata_inf.hba_port) { port_id = tgtdev->dev_spec.sas_sata_inf.hba_port->port_id;mpi3mr_tgtdev_put (tgtdev);
drivers/scsi/qla2xxx/qla_gbl.h +1 -0
@@ -192,6 +192,7 @@ extern int ql2xsecenable;extern int ql2xenforce_iocb_limit;extern int ql2xabts_wait_nvme;extern u32 ql2xnvme_queues; +extern int ql2xfc2target;extern int qla2x00_loop_reset (scsi_qla_host_t *);extern void qla2x00_abort_all_cmds (scsi_qla_host_t *,int );
drivers/scsi/qla2xxx/qla_init.c +2 -1
@@ -1840,7 +1840,8 @@ void qla2x00_handle_rscn(scsi_qla_host_t *vha, struct event_arg *ea)case RSCN_PORT_ADDR : fcport =qla2x00_find_fcport_by_nportid (vha, &ea->id,1 );if (fcport) { -if (fcport->flags &FCF_FCP2_DEVICE && +if (ql2xfc2target && + fcport->flags &FCF_FCP2_DEVICE &&atomic_read (&fcport->state) ==FCS_ONLINE ) { ql_dbg(ql_dbg_disc, vha, 0x2115, "Delaying session delete for FCP2 portid=%06x %8phC ",
drivers/scsi/qla2xxx/qla_os.c +9 -1
@@ -360,6 +360,13 @@ MODULE_PARM_DESC(ql2xnvme_queues,"1 - Minimum number of queues supported\n" "8 - Default value"); +int ql2xfc2target =1 ; +module_param (ql2xfc2target, int,0444 ); +MODULE_PARM_DESC (qla2xfc2target, +"Enables FC2 Target support. " +"0 - FC2 Target support is disabled. " +"1 - FC2 Target support is enabled (default)." ); +static struct scsi_transport_template *qla2xxx_transport_template =NULL ;struct scsi_transport_template *qla2xxx_transport_vport_template =NULL ;
@@ -4085,7 +4092,8 @@ qla2x00_mark_all_devices_lost(scsi_qla_host_t *vha) "Mark all dev lost\n");list_for_each_entry (fcport, &vha->vp_fcports, list) { -if (fcport->loop_id !=FC_NO_LOOP_ID && +if (ql2xfc2target && + fcport->loop_id !=FC_NO_LOOP_ID && (fcport->flags &FCF_FCP2_DEVICE ) && fcport->port_type ==FCT_TARGET && !qla2x00_reset_active (vha)) {
drivers/scsi/sd.c +6 -1
@@ -2988,8 +2988,13 @@ static void sd_read_block_characteristics(struct scsi_disk *sdkp) }if (sdkp->device->type ==TYPE_ZBC ) { -/* Host-managed */ +/* +* Host-managed: Per ZBC and ZAC specifications, writes in +* sequential write required zones of host-managed devices must +* be aligned to the device physical block size. +*/ disk_set_zoned (sdkp->disk,BLK_ZONED_HM ); +blk_queue_zone_write_granularity (q, sdkp->physical_block_size); }else { sdkp->zoned = zoned;if (sdkp->zoned ==1 ) {
drivers/scsi/sd_zbc.c +0 -8
@@ -965,14 +965,6 @@ int sd_zbc_read_zones(struct scsi_disk *sdkp, u8 buf[SD_BUF_SIZE])disk_set_max_active_zones (disk,0 ); nr_zones =round_up (sdkp->capacity, zone_blocks) >>ilog2 (zone_blocks); -/* -* Per ZBC and ZAC specifications, writes in sequential write required -* zones of host-managed devices must be aligned to the device physical -* block size. -*/ -if (blk_queue_zoned_model (q) ==BLK_ZONED_HM ) -blk_queue_zone_write_granularity (q, sdkp->physical_block_size); - sdkp->early_zone_info.nr_zones = nr_zones; sdkp->early_zone_info.zone_blocks = zone_blocks;
drivers/scsi/storvsc_drv.c +16 -0
@@ -987,6 +987,22 @@ static void storvsc_handle_error(struct vmscsi_request *vm_srb, goto do_work; } +/* +* Check for "Operating parameters have changed" +* due to Hyper-V changing the VHD/VHDX BlockSize +* when adding/removing a differencing disk. This +* causes discard_granularity to change, so do a +* rescan to pick up the new granularity. We don't +* want scsi_report_sense() to output a message +* that a sysadmin wouldn't know what to do with. +*/ +if ((asc ==0x3f ) && (ascq !=0x03 ) && + (ascq !=0x0e )) { + process_err_fn = storvsc_device_scan; +set_host_byte (scmnd,DID_REQUEUE ); + goto do_work; + } +/* * Otherwise, let upper layer deal with the * error when sense message is present
drivers/target/iscsi/iscsi_target_parameters.c +7 -5
@@ -1262,18 +1262,20 @@ static struct iscsi_param *iscsi_check_key(return param;if (!(param->phase & phase)) { -pr_err ("Key \"%s\" may not be negotiated during " , - param->name); +char *phase_name; +switch (phase) {case PHASE_SECURITY : -pr_debug ("Security phase.\n" ); + phase_name ="Security" ;break ;case PHASE_OPERATIONAL : -pr_debug ("Operational phase.\n" ); + phase_name ="Operational" ;break ;default : -pr_debug ("Unknown phase.\n" ); + phase_name ="Unknown" ; } +pr_err ("Key \"%s\" may not be negotiated during %s phase.\n" , + param->name, phase_name);return NULL ; }
drivers/ufs/core/ufshcd.c +1 -0
@@ -10512,4 +10512,5 @@ module_exit(ufshcd_core_exit);MODULE_AUTHOR ("Santosh Yaragnavi <[email protected]>" );MODULE_AUTHOR ("Vinayak Holikatti <[email protected]>" );MODULE_DESCRIPTION ("Generic UFS host controller driver Core" ); +MODULE_SOFTDEP ("pre: governor_simpleondemand" );MODULE_LICENSE ("GPL" );
drivers/ufs/host/ufs-qcom.c +4 -6
@@ -1177,7 +1177,7 @@ static int ufs_qcom_clk_scale_notify(struct ufs_hba *hba, err =ufs_qcom_clk_scale_down_post_change (hba); -if (err || !dev_req_params) { +if (err) {ufshcd_uic_hibern8_exit (hba);return err; }
@@ -1451,8 +1451,8 @@ static int ufs_qcom_mcq_config_resource(struct ufs_hba *hba)if (IS_ERR (res->base)) {dev_err (hba->dev,"Failed to map res %s, err=%d\n" , res->name, (int )PTR_ERR (res->base)); - res->base =NULL ; ret =PTR_ERR (res->base); + res->base =NULL ;return ret; } }
@@ -1466,7 +1466,7 @@ static int ufs_qcom_mcq_config_resource(struct ufs_hba *hba)/* Explicitly allocate MCQ resource from ufs_mem */ res_mcq =devm_kzalloc (hba->dev,sizeof (*res_mcq),GFP_KERNEL );if (!res_mcq) -return ret; +return -ENOMEM ; res_mcq->start = res_mem->start +MCQ_SQATTR_OFFSET (hba->mcq_capabilities);
@@ -1478,7 +1478,7 @@ static int ufs_qcom_mcq_config_resource(struct ufs_hba *hba)if (ret) {dev_err (hba->dev,"Failed to insert MCQ resource, err=%d\n" , ret); - goto insert_res_err; +return ret; } res->base =devm_ioremap_resource (hba->dev, res_mcq);
@@ -1495,8 +1495,6 @@ static int ufs_qcom_mcq_config_resource(struct ufs_hba *hba) ioremap_err: res->base =NULL ;remove_resource (res_mcq); -insert_res_err: -devm_kfree (hba->dev, res_mcq);return ret; }
The pull request you sent on Fri, 10 Mar 2023 17:12:32 -0500:
The pull request you sent on Fri, 10 Mar 2023 17:12:32 -0500:
Quoted 1 line
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.gitscsi-fixes
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/ef5f68cc1f829b492b19cd4df5af4454aa816b93
Thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/prtracker.html