SCSI fixes for 5.19-rc6
Subsystems (5)
James Bottomley
maintainerSix small and reasonably obvious fixes, all in drivers.
The patch is available here:
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git scsi-fixes
The short changelog is:
Bjorn Andersson (1):
scsi: ufs: core: Drop loglevel of WriteBoost message
Changyuan Lyu (2):
scsi: pm80xx: Set stopped phy's linkrate to Disabled
scsi: pm80xx: Fix 'Unknown' max/min linkrateMike Christie (1):
scsi: target: Fix WRITE_SAME No Data Buffer crash
Ming Lei (1):
scsi: megaraid: Clear READ queue map's nr_queues
Po-Wen Kao (1):
scsi: ufs: core: Fix missing clk change notification on host reset
And the diffstat:
drivers/scsi/megaraid/megaraid_sas_base.c | 3 +++ drivers/scsi/pm8001/pm8001_hwi.c | 19 +++---------------- drivers/scsi/pm8001/pm8001_init.c | 2 ++ drivers/scsi/pm8001/pm80xx_hwi.c | 6 +++++- drivers/target/target_core_file.c | 3 +++ drivers/target/target_core_iblock.c | 4 ++++ drivers/target/target_core_sbc.c | 6 ++++++ drivers/ufs/core/ufshcd.c | 4 ++-- 8 files changed, 28 insertions(+), 19 deletions(-)
With full diff below.
James
---
drivers/scsi/megaraid/megaraid_sas_base.c +3 -0
@@ -3195,6 +3195,9 @@ static int megasas_map_queues(struct Scsi_Host *shost) qoff += map->nr_queues; offset += map->nr_queues; +/* we never use READ queue, so can't cheat blk-mq */ + shost->tag_set.map[HCTX_TYPE_READ ].nr_queues =0 ; +/* Setup Poll hctx */ map = &shost->tag_set.map[HCTX_TYPE_POLL ]; map->nr_queues = instance->iopoll_q_count;
drivers/scsi/pm8001/pm8001_hwi.c +3 -16
@@ -3145,15 +3145,6 @@ void pm8001_bytes_dmaed(struct pm8001_hba_info *pm8001_ha, int i)if (!phy->phy_attached)return ; -if (sas_phy->phy) { -struct sas_phy *sphy = sas_phy->phy; - sphy->negotiated_linkrate = sas_phy->linkrate; - sphy->minimum_linkrate = phy->minimum_linkrate; - sphy->minimum_linkrate_hw =SAS_LINK_RATE_1_5_GBPS ; - sphy->maximum_linkrate = phy->maximum_linkrate; - sphy->maximum_linkrate_hw = phy->maximum_linkrate; - } -if (phy->phy_type &PORT_TYPE_SAS ) {struct sas_identify_frame *id; id = (struct sas_identify_frame *)phy->frame_rcvd;
@@ -3177,26 +3168,22 @@ void pm8001_get_lrate_mode(struct pm8001_phy *phy, u8 link_rate)switch (link_rate) {case PHY_SPEED_120 : phy->sas_phy.linkrate =SAS_LINK_RATE_12_0_GBPS ; - phy->sas_phy.phy->negotiated_linkrate =SAS_LINK_RATE_12_0_GBPS ;break ;case PHY_SPEED_60 : phy->sas_phy.linkrate =SAS_LINK_RATE_6_0_GBPS ; - phy->sas_phy.phy->negotiated_linkrate =SAS_LINK_RATE_6_0_GBPS ;break ;case PHY_SPEED_30 : phy->sas_phy.linkrate =SAS_LINK_RATE_3_0_GBPS ; - phy->sas_phy.phy->negotiated_linkrate =SAS_LINK_RATE_3_0_GBPS ;break ;case PHY_SPEED_15 : phy->sas_phy.linkrate =SAS_LINK_RATE_1_5_GBPS ; - phy->sas_phy.phy->negotiated_linkrate =SAS_LINK_RATE_1_5_GBPS ;break ; } sas_phy->negotiated_linkrate = phy->sas_phy.linkrate; - sas_phy->maximum_linkrate_hw =SAS_LINK_RATE_6_0_GBPS ; + sas_phy->maximum_linkrate_hw = phy->maximum_linkrate; sas_phy->minimum_linkrate_hw =SAS_LINK_RATE_1_5_GBPS ; - sas_phy->maximum_linkrate =SAS_LINK_RATE_6_0_GBPS ; - sas_phy->minimum_linkrate =SAS_LINK_RATE_1_5_GBPS ; + sas_phy->maximum_linkrate = phy->maximum_linkrate; + sas_phy->minimum_linkrate = phy->minimum_linkrate; }/**
drivers/scsi/pm8001/pm8001_init.c +2 -0
@@ -143,6 +143,8 @@ static void pm8001_phy_init(struct pm8001_hba_info *pm8001_ha, int phy_id)struct asd_sas_phy *sas_phy = &phy->sas_phy; phy->phy_state =PHY_LINK_DISABLE ; phy->pm8001_ha = pm8001_ha; + phy->minimum_linkrate =SAS_LINK_RATE_1_5_GBPS ; + phy->maximum_linkrate =SAS_LINK_RATE_6_0_GBPS ; sas_phy->enabled = (phy_id < pm8001_ha->chip->n_phy) ?1 :0 ; sas_phy->class =SAS ; sas_phy->iproto =SAS_PROTOCOL_ALL ;
drivers/scsi/pm8001/pm80xx_hwi.c +5 -1
@@ -3723,8 +3723,12 @@ static int mpi_phy_stop_resp(struct pm8001_hba_info *pm8001_ha, void *piomb)pm8001_dbg (pm8001_ha,MSG ,"phy:0x%x status:0x%x\n" , phyid, status);if (status ==PHY_STOP_SUCCESS || - status ==PHY_STOP_ERR_DEVICE_ATTACHED ) + status ==PHY_STOP_ERR_DEVICE_ATTACHED ) { phy->phy_state =PHY_LINK_DISABLE ; + phy->sas_phy.phy->negotiated_linkrate =SAS_PHY_DISABLED ; + phy->sas_phy.linkrate =SAS_PHY_DISABLED ; + } +return 0 ; }
drivers/target/target_core_file.c +3 -0
@@ -448,6 +448,9 @@ fd_execute_write_same(struct se_cmd *cmd)return TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE ; } +if (!cmd->t_data_nents) +return TCM_INVALID_CDB_FIELD ; +if (cmd->t_data_nents >1 || cmd->t_data_sg[0 ].length != cmd->se_dev->dev_attrib.block_size) { pr_err("WRITE_SAME: Illegal SGL t_data_nents: %u length: %u"
drivers/target/target_core_iblock.c +4 -0
@@ -494,6 +494,10 @@ iblock_execute_write_same(struct se_cmd *cmd) " backends not supported\n");return TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE ; } + +if (!cmd->t_data_nents) +return TCM_INVALID_CDB_FIELD ; + sg = &cmd->t_data_sg[0 ]; if (cmd->t_data_nents > 1 ||
drivers/target/target_core_sbc.c +6 -0
@@ -312,6 +312,12 @@ sbc_setup_write_same(struct se_cmd *cmd, unsigned char flags, struct sbc_ops *oppr_warn ("WRITE SAME with ANCHOR not supported\n" );return TCM_INVALID_CDB_FIELD ; } + +if (flags &0x01 ) { +pr_warn ("WRITE SAME with NDOB not supported\n" ); +return TCM_INVALID_CDB_FIELD ; + } +/* * Special case for WRITE_SAME w/ UNMAP=1 that ends up getting * translated into block discard requests within backend code.
drivers/ufs/core/ufshcd.c +2 -2
@@ -5738,7 +5738,7 @@ int ufshcd_wb_toggle(struct ufs_hba *hba, bool enable) } hba->dev_info.wb_enabled = enable; -dev_info (hba->dev,"%s Write Booster %s\n" , +dev_dbg (hba->dev,"%s Write Booster %s\n" , __func__, enable ?"enabled" :"disabled" );return ret;
@@ -7253,7 +7253,7 @@ static int ufshcd_host_reset_and_restore(struct ufs_hba *hba) hba->silence_err_logs = false;/* scale up clocks to max frequency before full reinitialization */ -ufshcd_set_clk_freq (hba, true); +ufshcd_scale_clks (hba, true); err =ufshcd_hba_enable (hba);
The pull request you sent on Sat, 16 Jul 2022 09:10:20 -0400:
The pull request you sent on Sat, 16 Jul 2022 09:10:20 -0400:
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/c5fe7a97f20c7f3070ac870144515c0fabc6b999
Thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/prtracker.html