Skip to content

Commit c291c9c

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: "Two small fixes, the drivers one in ufs simply delays running a work queue and the generic one in zoned storage switches to a more correct API that tries the standard buddy allocator first (for small allocations); this fixes an allocation problem with small allocations seen under memory pressure" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: ufs: core: Start the RTC update work later scsi: sd_zbc: Use kvzalloc() to allocate REPORT ZONES buffer
2 parents 952a33d + 54c814c commit c291c9c

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

drivers/scsi/sd_zbc.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,7 @@ static void *sd_zbc_alloc_report_buffer(struct scsi_disk *sdkp,
188188
bufsize = min_t(size_t, bufsize, queue_max_segments(q) << PAGE_SHIFT);
189189

190190
while (bufsize >= SECTOR_SIZE) {
191-
buf = __vmalloc(bufsize,
192-
GFP_KERNEL | __GFP_ZERO | __GFP_NORETRY);
191+
buf = kvzalloc(bufsize, GFP_KERNEL | __GFP_NORETRY);
193192
if (buf) {
194193
*buflen = bufsize;
195194
return buf;

drivers/ufs/core/ufshcd.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8636,6 +8636,14 @@ static int ufshcd_add_lus(struct ufs_hba *hba)
86368636
ufshcd_init_clk_scaling_sysfs(hba);
86378637
}
86388638

8639+
/*
8640+
* The RTC update code accesses the hba->ufs_device_wlun->sdev_gendev
8641+
* pointer and hence must only be started after the WLUN pointer has
8642+
* been initialized by ufshcd_scsi_add_wlus().
8643+
*/
8644+
schedule_delayed_work(&hba->ufs_rtc_update_work,
8645+
msecs_to_jiffies(UFS_RTC_UPDATE_INTERVAL_MS));
8646+
86398647
ufs_bsg_probe(hba);
86408648
scsi_scan_host(hba->host);
86418649

@@ -8795,8 +8803,6 @@ static int ufshcd_device_init(struct ufs_hba *hba, bool init_dev_params)
87958803
ufshcd_force_reset_auto_bkops(hba);
87968804

87978805
ufshcd_set_timestamp_attr(hba);
8798-
schedule_delayed_work(&hba->ufs_rtc_update_work,
8799-
msecs_to_jiffies(UFS_RTC_UPDATE_INTERVAL_MS));
88008806

88018807
/* Gear up to HS gear if supported */
88028808
if (hba->max_pwr_info.is_valid) {

0 commit comments

Comments
 (0)