mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 18:09:56 +00:00
scsi: hisi_sas: Directly call register snapshot instead of using workqueue
Currently, register information dump is performed via workqueue, regardless of the trigger mode (automatic or manual). There is a delay in dumping register through workqueue, the exact register information at trigger time cannot be obtained. Call register snapshot directly instead of through a workqueue. Signed-off-by: Yihang Li <liyihang9@huawei.com> Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com> Link: https://lore.kernel.org/r/1694571327-78697-3-git-send-email-chenxiang66@hisilicon.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
committed by
Martin K. Petersen
parent
6de426f927
commit
2ff07b5c6f
@@ -451,7 +451,6 @@ struct hisi_hba {
|
|||||||
const struct hisi_sas_hw *hw; /* Low level hw interface */
|
const struct hisi_sas_hw *hw; /* Low level hw interface */
|
||||||
unsigned long sata_dev_bitmap[BITS_TO_LONGS(HISI_SAS_MAX_DEVICES)];
|
unsigned long sata_dev_bitmap[BITS_TO_LONGS(HISI_SAS_MAX_DEVICES)];
|
||||||
struct work_struct rst_work;
|
struct work_struct rst_work;
|
||||||
struct work_struct debugfs_work;
|
|
||||||
u32 phy_state;
|
u32 phy_state;
|
||||||
u32 intr_coal_ticks; /* Time of interrupt coalesce in us */
|
u32 intr_coal_ticks; /* Time of interrupt coalesce in us */
|
||||||
u32 intr_coal_count; /* Interrupt count to coalesce */
|
u32 intr_coal_count; /* Interrupt count to coalesce */
|
||||||
|
|||||||
@@ -1958,8 +1958,11 @@ static bool hisi_sas_internal_abort_timeout(struct sas_task *task,
|
|||||||
struct hisi_hba *hisi_hba = dev_to_hisi_hba(device);
|
struct hisi_hba *hisi_hba = dev_to_hisi_hba(device);
|
||||||
struct hisi_sas_internal_abort_data *timeout = data;
|
struct hisi_sas_internal_abort_data *timeout = data;
|
||||||
|
|
||||||
if (hisi_sas_debugfs_enable && hisi_hba->debugfs_itct[0].itct)
|
if (hisi_sas_debugfs_enable && hisi_hba->debugfs_itct[0].itct) {
|
||||||
queue_work(hisi_hba->wq, &hisi_hba->debugfs_work);
|
down(&hisi_hba->sem);
|
||||||
|
hisi_hba->hw->debugfs_snapshot_regs(hisi_hba);
|
||||||
|
up(&hisi_hba->sem);
|
||||||
|
}
|
||||||
|
|
||||||
if (task->task_state_flags & SAS_TASK_STATE_DONE) {
|
if (task->task_state_flags & SAS_TASK_STATE_DONE) {
|
||||||
pr_err("Internal abort: timeout %016llx\n",
|
pr_err("Internal abort: timeout %016llx\n",
|
||||||
|
|||||||
@@ -558,7 +558,6 @@ static int experimental_iopoll_q_cnt;
|
|||||||
module_param(experimental_iopoll_q_cnt, int, 0444);
|
module_param(experimental_iopoll_q_cnt, int, 0444);
|
||||||
MODULE_PARM_DESC(experimental_iopoll_q_cnt, "number of queues to be used as poll mode, def=0");
|
MODULE_PARM_DESC(experimental_iopoll_q_cnt, "number of queues to be used as poll mode, def=0");
|
||||||
|
|
||||||
static void debugfs_work_handler_v3_hw(struct work_struct *work);
|
|
||||||
static void debugfs_snapshot_regs_v3_hw(struct hisi_hba *hisi_hba);
|
static void debugfs_snapshot_regs_v3_hw(struct hisi_hba *hisi_hba);
|
||||||
|
|
||||||
static u32 hisi_sas_read32(struct hisi_hba *hisi_hba, u32 off)
|
static u32 hisi_sas_read32(struct hisi_hba *hisi_hba, u32 off)
|
||||||
@@ -3388,7 +3387,6 @@ hisi_sas_shost_alloc_pci(struct pci_dev *pdev)
|
|||||||
hisi_hba = shost_priv(shost);
|
hisi_hba = shost_priv(shost);
|
||||||
|
|
||||||
INIT_WORK(&hisi_hba->rst_work, hisi_sas_rst_work_handler);
|
INIT_WORK(&hisi_hba->rst_work, hisi_sas_rst_work_handler);
|
||||||
INIT_WORK(&hisi_hba->debugfs_work, debugfs_work_handler_v3_hw);
|
|
||||||
hisi_hba->hw = &hisi_sas_v3_hw;
|
hisi_hba->hw = &hisi_sas_v3_hw;
|
||||||
hisi_hba->pci_dev = pdev;
|
hisi_hba->pci_dev = pdev;
|
||||||
hisi_hba->dev = dev;
|
hisi_hba->dev = dev;
|
||||||
@@ -3910,7 +3908,9 @@ static ssize_t debugfs_trigger_dump_v3_hw_write(struct file *file,
|
|||||||
if (buf[0] != '1')
|
if (buf[0] != '1')
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
|
||||||
queue_work(hisi_hba->wq, &hisi_hba->debugfs_work);
|
down(&hisi_hba->sem);
|
||||||
|
debugfs_snapshot_regs_v3_hw(hisi_hba);
|
||||||
|
up(&hisi_hba->sem);
|
||||||
|
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
@@ -4661,14 +4661,6 @@ static void debugfs_fifo_init_v3_hw(struct hisi_hba *hisi_hba)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void debugfs_work_handler_v3_hw(struct work_struct *work)
|
|
||||||
{
|
|
||||||
struct hisi_hba *hisi_hba =
|
|
||||||
container_of(work, struct hisi_hba, debugfs_work);
|
|
||||||
|
|
||||||
debugfs_snapshot_regs_v3_hw(hisi_hba);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void debugfs_release_v3_hw(struct hisi_hba *hisi_hba, int dump_index)
|
static void debugfs_release_v3_hw(struct hisi_hba *hisi_hba, int dump_index)
|
||||||
{
|
{
|
||||||
struct device *dev = hisi_hba->dev;
|
struct device *dev = hisi_hba->dev;
|
||||||
|
|||||||
Reference in New Issue
Block a user