From: Martin K. Petersen Date: Thu, 11 Jul 2024 02:23:30 +0000 (-0400) Subject: Merge branch '6.10/scsi-fixes' into 6.11/scsi-staging X-Git-Tag: v6.11-rc1~112^2~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5e9a522b0779fa67928b7726374e60461e8aa5c5;p=thirdparty%2Fkernel%2Flinux.git Merge branch '6.10/scsi-fixes' into 6.11/scsi-staging Pull in my fixes branch to resolve an mpi3mr merge conflict reported by sfr. Signed-off-by: Martin K. Petersen --- 5e9a522b0779fa67928b7726374e60461e8aa5c5 diff --cc drivers/scsi/mpi3mr/mpi3mr_transport.c index 27865ee896d75,82aa4e418c5a8..ccd23def2e0cf --- a/drivers/scsi/mpi3mr/mpi3mr_transport.c +++ b/drivers/scsi/mpi3mr/mpi3mr_transport.c @@@ -1377,8 -1363,8 +1377,8 @@@ static struct mpi3mr_sas_port *mpi3mr_s (mr_sas_node->phy[i].hba_port != hba_port)) continue; - if (i > sizeof(mr_sas_port->phy_mask) * 8) { + if (i >= sizeof(mr_sas_port->phy_mask) * 8) { - ioc_warn(mrioc, "skipping port %u, max allowed value is %lu\n", + ioc_warn(mrioc, "skipping port %u, max allowed value is %zu\n", i, sizeof(mr_sas_port->phy_mask) * 8); goto out_fail; } diff --cc drivers/ufs/core/ufs-mcq.c index 4bcae410c2681,c532416aec229..a4593ba3af61f --- a/drivers/ufs/core/ufs-mcq.c +++ b/drivers/ufs/core/ufs-mcq.c @@@ -111,25 -111,11 +111,24 @@@ EXPORT_SYMBOL_GPL(ufshcd_mcq_config_mac struct ufs_hw_queue *ufshcd_mcq_req_to_hwq(struct ufs_hba *hba, struct request *req) { - u32 utag = blk_mq_unique_tag(req); - u32 hwq = blk_mq_unique_tag_to_hwq(utag); + struct blk_mq_hw_ctx *hctx = READ_ONCE(req->mq_hctx); - return &hba->uhq[hwq]; + return hctx ? &hba->uhq[hctx->queue_num] : NULL; } +/** + * ufshcd_mcq_queue_cfg_addr - get an start address of the MCQ Queue Config + * Registers. + * @hba: per adapter instance + * + * Return: Start address of MCQ Queue Config Registers in HCI + */ +unsigned int ufshcd_mcq_queue_cfg_addr(struct ufs_hba *hba) +{ + return FIELD_GET(QCFGPTR, hba->mcq_capabilities) * 0x200; +} +EXPORT_SYMBOL_GPL(ufshcd_mcq_queue_cfg_addr); + /** * ufshcd_mcq_decide_queue_depth - decide the queue depth * @hba: per adapter instance