SCSI fixes for 6.5-rc7
Subsystems (5)
James Bottomley
maintainerThree small driver fixes and one larger unused function set removal in the raid class (so no external impact).
The patch is available here:
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git scsi-fixes
The short changelog is:
Bao D. Nguyen (1):
scsi: ufs: mcq: Fix the search/wrap around logic
Neil Armstrong (1):
scsi: ufs: ufs-qcom: Clear qunipro_g4_sel for HW major version > 5
Zhu Wang (2):
scsi: snic: Fix double free in snic_tgt_create()
scsi: core: raid_class: Remove raid_component_add()
And the diffstat:
drivers/scsi/raid_class.c | 48 ------------------------------------------- drivers/scsi/snic/snic_disc.c | 3 +-- drivers/ufs/core/ufs-mcq.c | 6 ++++-- drivers/ufs/host/ufs-qcom.c | 2 +- include/linux/raid_class.h | 4 ---- 5 files changed, 6 insertions(+), 57 deletions(-)
j
With full diff below.
James
---
drivers/scsi/raid_class.c +0 -48
@@ -209,54 +209,6 @@ raid_attr_ro_state(level);raid_attr_ro_fn (resync);raid_attr_ro_state_fn (state); -static void raid_component_release (struct device *dev) -{ -struct raid_component *rc = - container_of(dev, struct raid_component, dev); -dev_printk (KERN_ERR , rc->dev.parent,"COMPONENT RELEASE\n" ); -put_device (rc->dev.parent); -kfree (rc); -} - -int raid_component_add (struct raid_template *r,struct device *raid_dev, -struct device *component_dev) -{ -struct device *cdev = -attribute_container_find_class_device (&r->raid_attrs.ac, - raid_dev); -struct raid_component *rc; -struct raid_data *rd =dev_get_drvdata (cdev); -int err; - - rc =kzalloc (sizeof (*rc),GFP_KERNEL ); -if (!rc) -return -ENOMEM ; - -INIT_LIST_HEAD (&rc->node); -device_initialize (&rc->dev); - rc->dev.release = raid_component_release; - rc->dev.parent =get_device (component_dev); - rc->num = rd->component_count++; - -dev_set_name (&rc->dev,"component-%d" , rc->num); -list_add_tail (&rc->node, &rd->component_list); - rc->dev.class = &raid_class.class; - err =device_add (&rc->dev); -if (err) - goto err_out; - -return 0 ; - -err_out: -put_device (&rc->dev); -list_del (&rc->node); - rd->component_count--; -put_device (component_dev); -kfree (rc); -return err; -} -EXPORT_SYMBOL (raid_component_add); -struct raid_template *raid_class_attach (struct raid_function_template *ft) {
drivers/scsi/snic/snic_disc.c +1 -2
@@ -303,12 +303,11 @@ snic_tgt_create(struct snic *snic, struct snic_tgt_id *tgtid)"Snic Tgt: device_add, with err = %d\n" , ret); -put_device (&tgt->dev);put_device (&snic->shost->shost_gendev);spin_lock_irqsave (snic->shost->host_lock, flags);list_del (&tgt->list);spin_unlock_irqrestore (snic->shost->host_lock, flags); -kfree (tgt); +put_device (&tgt->dev); tgt =NULL ;return tgt;
drivers/ufs/core/ufs-mcq.c +4 -2
@@ -580,7 +580,6 @@ static bool ufshcd_mcq_sqe_search(struct ufs_hba *hba, {struct ufshcd_lrb *lrbp = &hba->lrb[task_tag];struct utp_transfer_req_desc *utrd; -u32 mask = hwq->max_entries -1 ;__le64 cmd_desc_base_addr;bool ret = false;u64 addr, match;
@@ -608,7 +607,10 @@ static bool ufshcd_mcq_sqe_search(struct ufs_hba *hba, ret = true; goto out; } - sq_head_slot = (sq_head_slot +1 ) & mask; + + sq_head_slot++; +if (sq_head_slot == hwq->max_entries) + sq_head_slot =0 ; } out:
drivers/ufs/host/ufs-qcom.c +1 -1
@@ -321,7 +321,7 @@ static void ufs_qcom_select_unipro_mode(struct ufs_qcom_host *host)ufs_qcom_cap_qunipro (host) ?QUNIPRO_SEL :0 , REG_UFS_CFG1); -if (host->hw_ver.major ==0x05 ) +if (host->hw_ver.major >=0x05 )ufshcd_rmwl (host->hba,QUNIPRO_G4_SEL ,0 ,REG_UFS_CFG0 );/* make sure above configuration is applied before we return */
include/linux/raid_class.h +0 -4
@@ -77,7 +77,3 @@ DEFINE_RAID_ATTRIBUTE(enum raid_state, state)struct raid_template *raid_class_attach (struct raid_function_template *);void raid_class_release (struct raid_template *); - -int __must_check raid_component_add (struct raid_template *,struct device *, -struct device *); -
Quoted 2 lines · James Bottomley
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.gitscsi-fixes
Hmm. For some reason the pr-tracker-bot is not tracking.
So here's a manual, non-robot, "has been merged" message.
Konstantin, is everything ok in robot-land?
Linus
The pull request you sent on Sun, 27 Aug 2023 08:01:03 +0100:
The pull request you sent on Sun, 27 Aug 2023 08:01:03 +0100:
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/85eb043618bb17124050197d71c453d4a1f556e5
Thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/prtracker.html