Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge patch series "Call scsi_host_busy() after the SCSI host has been added"

Bart Van Assche <bvanassche@acm.org> says:

Hi Martin,

The UFS driver is the only SCSI driver I know of that may call
scsi_host_busy() before the SCSI host has been added. This patch series
modifies the UFS driver such that scsi_host_busy() is only called after the
SCSI host has been added. Additionally, commit a0b7780602b1 ("scsi: core: Fix
a regression triggered by scsi_host_busy()") is reverted because all
scsi_host_busy() calls now happen after the corresponding SCSI host has been
added.

Please consider this patch series for the next merge window.

Thanks,

Bart.

Link: https://patch.msgid.link/20260109205104.496478-1-bvanassche@acm.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

+6 -5
+2 -3
drivers/scsi/hosts.c
··· 626 626 { 627 627 int cnt = 0; 628 628 629 - if (shost->tag_set.ops) 630 - blk_mq_tagset_busy_iter(&shost->tag_set, 631 - scsi_host_check_in_flight, &cnt); 629 + blk_mq_tagset_busy_iter(&shost->tag_set, 630 + scsi_host_check_in_flight, &cnt); 632 631 return cnt; 633 632 } 634 633 EXPORT_SYMBOL(scsi_host_busy);
+4 -2
drivers/ufs/core/ufshcd.c
··· 283 283 284 284 static bool ufshcd_is_ufs_dev_busy(struct ufs_hba *hba) 285 285 { 286 - return scsi_host_busy(hba->host) || ufshcd_has_pending_tasks(hba); 286 + return (hba->scsi_host_added && scsi_host_busy(hba->host)) || 287 + ufshcd_has_pending_tasks(hba); 287 288 } 288 289 289 290 static const struct ufs_dev_quirk ufs_fixups[] = { ··· 679 678 680 679 dev_err(hba->dev, "UFS Host state=%d\n", hba->ufshcd_state); 681 680 dev_err(hba->dev, "%d outstanding reqs, tasks=0x%lx\n", 682 - scsi_host_busy(hba->host), hba->outstanding_tasks); 681 + hba->scsi_host_added ? scsi_host_busy(hba->host) : 0, 682 + hba->outstanding_tasks); 683 683 dev_err(hba->dev, "saved_err=0x%x, saved_uic_err=0x%x\n", 684 684 hba->saved_err, hba->saved_uic_err); 685 685 dev_err(hba->dev, "Device power mode=%d, UIC link state=%d\n",