Commit 511a083b authored by Bart Van Assche's avatar Bart Van Assche Committed by Martin K. Petersen

scsi: ufs: Remove hba->cmd_queue

The previous patch removed all code that uses hba->cmd_queue. Hence also
remove hba->cmd_queue itself.

Link: https://lore.kernel.org/r/20211203231950.193369-11-bvanassche@acm.orgSuggested-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
Tested-by: default avatarBean Huo <beanhuo@micron.com>
Reviewed-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
Reviewed-by: default avatarBean Huo <beanhuo@micron.com>
Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 945c3cca
...@@ -9331,7 +9331,6 @@ void ufshcd_remove(struct ufs_hba *hba) ...@@ -9331,7 +9331,6 @@ void ufshcd_remove(struct ufs_hba *hba)
ufs_sysfs_remove_nodes(hba->dev); ufs_sysfs_remove_nodes(hba->dev);
blk_cleanup_queue(hba->tmf_queue); blk_cleanup_queue(hba->tmf_queue);
blk_mq_free_tag_set(&hba->tmf_tag_set); blk_mq_free_tag_set(&hba->tmf_tag_set);
blk_cleanup_queue(hba->cmd_queue);
scsi_remove_host(hba->host); scsi_remove_host(hba->host);
/* disable interrupts */ /* disable interrupts */
ufshcd_disable_intr(hba, hba->intr_mask); ufshcd_disable_intr(hba, hba->intr_mask);
...@@ -9551,12 +9550,6 @@ int ufshcd_init(struct ufs_hba *hba, void __iomem *mmio_base, unsigned int irq) ...@@ -9551,12 +9550,6 @@ int ufshcd_init(struct ufs_hba *hba, void __iomem *mmio_base, unsigned int irq)
goto out_disable; goto out_disable;
} }
hba->cmd_queue = blk_mq_init_queue(&hba->host->tag_set);
if (IS_ERR(hba->cmd_queue)) {
err = PTR_ERR(hba->cmd_queue);
goto out_remove_scsi_host;
}
hba->tmf_tag_set = (struct blk_mq_tag_set) { hba->tmf_tag_set = (struct blk_mq_tag_set) {
.nr_hw_queues = 1, .nr_hw_queues = 1,
.queue_depth = hba->nutmrs, .queue_depth = hba->nutmrs,
...@@ -9565,7 +9558,7 @@ int ufshcd_init(struct ufs_hba *hba, void __iomem *mmio_base, unsigned int irq) ...@@ -9565,7 +9558,7 @@ int ufshcd_init(struct ufs_hba *hba, void __iomem *mmio_base, unsigned int irq)
}; };
err = blk_mq_alloc_tag_set(&hba->tmf_tag_set); err = blk_mq_alloc_tag_set(&hba->tmf_tag_set);
if (err < 0) if (err < 0)
goto free_cmd_queue; goto out_remove_scsi_host;
hba->tmf_queue = blk_mq_init_queue(&hba->tmf_tag_set); hba->tmf_queue = blk_mq_init_queue(&hba->tmf_tag_set);
if (IS_ERR(hba->tmf_queue)) { if (IS_ERR(hba->tmf_queue)) {
err = PTR_ERR(hba->tmf_queue); err = PTR_ERR(hba->tmf_queue);
...@@ -9634,8 +9627,6 @@ int ufshcd_init(struct ufs_hba *hba, void __iomem *mmio_base, unsigned int irq) ...@@ -9634,8 +9627,6 @@ int ufshcd_init(struct ufs_hba *hba, void __iomem *mmio_base, unsigned int irq)
blk_cleanup_queue(hba->tmf_queue); blk_cleanup_queue(hba->tmf_queue);
free_tmf_tag_set: free_tmf_tag_set:
blk_mq_free_tag_set(&hba->tmf_tag_set); blk_mq_free_tag_set(&hba->tmf_tag_set);
free_cmd_queue:
blk_cleanup_queue(hba->cmd_queue);
out_remove_scsi_host: out_remove_scsi_host:
scsi_remove_host(hba->host); scsi_remove_host(hba->host);
out_disable: out_disable:
......
...@@ -738,7 +738,6 @@ struct ufs_hba_monitor { ...@@ -738,7 +738,6 @@ struct ufs_hba_monitor {
* @host: Scsi_Host instance of the driver * @host: Scsi_Host instance of the driver
* @dev: device handle * @dev: device handle
* @lrb: local reference block * @lrb: local reference block
* @cmd_queue: Used to allocate command tags from hba->host->tag_set.
* @outstanding_tasks: Bits representing outstanding task requests * @outstanding_tasks: Bits representing outstanding task requests
* @outstanding_lock: Protects @outstanding_reqs. * @outstanding_lock: Protects @outstanding_reqs.
* @outstanding_reqs: Bits representing outstanding transfer requests * @outstanding_reqs: Bits representing outstanding transfer requests
...@@ -804,7 +803,6 @@ struct ufs_hba { ...@@ -804,7 +803,6 @@ struct ufs_hba {
struct Scsi_Host *host; struct Scsi_Host *host;
struct device *dev; struct device *dev;
struct request_queue *cmd_queue;
/* /*
* This field is to keep a reference to "scsi_device" corresponding to * This field is to keep a reference to "scsi_device" corresponding to
* "UFS device" W-LU. * "UFS device" W-LU.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment