Skip to content

Commit 5c2fe8d

Browse files
committed
Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull SCSI fixes from James Bottomley: "The one core change is a re-roll of the tag allocation fix from the last pull request that uses the correct goto to unroll all the allocations. The remianing fixes are all small ones in drivers" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: hisi_sas: Fix NULL pointer exception during user_scan() scsi: qla2xxx: Completely fix fcport double free scsi: ufs: core: Fix SError in ufshcd_rtc_work() during UFS suspend scsi: core: Fix error handling for scsi_alloc_sdev()
2 parents d9bf296 + 8ddc0c2 commit 5c2fe8d

5 files changed

Lines changed: 5 additions & 11 deletions

File tree

drivers/scsi/hisi_sas/hisi_sas_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2578,7 +2578,7 @@ int hisi_sas_probe(struct platform_device *pdev,
25782578
shost->transportt = hisi_sas_stt;
25792579
shost->max_id = HISI_SAS_MAX_DEVICES;
25802580
shost->max_lun = ~0;
2581-
shost->max_channel = 1;
2581+
shost->max_channel = 0;
25822582
shost->max_cmd_len = HISI_SAS_MAX_CDB_LEN;
25832583
if (hisi_hba->hw->slot_index_alloc) {
25842584
shost->can_queue = HISI_SAS_MAX_COMMANDS;

drivers/scsi/hisi_sas/hisi_sas_v3_hw.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4993,7 +4993,7 @@ hisi_sas_v3_probe(struct pci_dev *pdev, const struct pci_device_id *id)
49934993
shost->transportt = hisi_sas_stt;
49944994
shost->max_id = HISI_SAS_MAX_DEVICES;
49954995
shost->max_lun = ~0;
4996-
shost->max_channel = 1;
4996+
shost->max_channel = 0;
49974997
shost->max_cmd_len = HISI_SAS_MAX_CDB_LEN;
49984998
shost->can_queue = HISI_SAS_UNRESERVED_IPTT;
49994999
shost->cmd_per_lun = HISI_SAS_UNRESERVED_IPTT;

drivers/scsi/qla2xxx/qla_iocb.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2751,7 +2751,6 @@ qla24xx_els_dcmd_iocb(scsi_qla_host_t *vha, int els_opcode,
27512751
if (!elsio->u.els_logo.els_logo_pyld) {
27522752
/* ref: INIT */
27532753
kref_put(&sp->cmd_kref, qla2x00_sp_release);
2754-
qla2x00_free_fcport(fcport);
27552754
return QLA_FUNCTION_FAILED;
27562755
}
27572756

@@ -2776,7 +2775,6 @@ qla24xx_els_dcmd_iocb(scsi_qla_host_t *vha, int els_opcode,
27762775
if (rval != QLA_SUCCESS) {
27772776
/* ref: INIT */
27782777
kref_put(&sp->cmd_kref, qla2x00_sp_release);
2779-
qla2x00_free_fcport(fcport);
27802778
return QLA_FUNCTION_FAILED;
27812779
}
27822780

drivers/scsi/scsi_scan.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -360,12 +360,8 @@ static struct scsi_device *scsi_alloc_sdev(struct scsi_target *starget,
360360
* default device queue depth to figure out sbitmap shift
361361
* since we use this queue depth most of times.
362362
*/
363-
if (scsi_realloc_sdev_budget_map(sdev, depth)) {
364-
kref_put(&sdev->host->tagset_refcnt, scsi_mq_free_tags);
365-
put_device(&starget->dev);
366-
kfree(sdev);
367-
goto out;
368-
}
363+
if (scsi_realloc_sdev_budget_map(sdev, depth))
364+
goto out_device_destroy;
369365

370366
scsi_change_queue_depth(sdev, depth);
371367

drivers/ufs/core/ufshcd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10066,6 +10066,7 @@ static int __ufshcd_wl_suspend(struct ufs_hba *hba, enum ufs_pm_op pm_op)
1006610066
}
1006710067

1006810068
flush_work(&hba->eeh_work);
10069+
cancel_delayed_work_sync(&hba->ufs_rtc_update_work);
1006910070

1007010071
ret = ufshcd_vops_suspend(hba, pm_op, PRE_CHANGE);
1007110072
if (ret)
@@ -10120,7 +10121,6 @@ static int __ufshcd_wl_suspend(struct ufs_hba *hba, enum ufs_pm_op pm_op)
1012010121
if (ret)
1012110122
goto set_link_active;
1012210123

10123-
cancel_delayed_work_sync(&hba->ufs_rtc_update_work);
1012410124
goto out;
1012510125

1012610126
set_link_active:

0 commit comments

Comments
 (0)