diff options
author | Xiang Chen <chenxiang66@hisilicon.com> | 2023-03-07 14:09:15 +0800 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2023-03-09 21:50:02 -0500 |
commit | 0c2fb1701155062b842cdff69475482029fa8b14 (patch) | |
tree | 943ba3e4a56fb4cd706a252556c1a5b20305e411 /drivers/scsi/hisi_sas | |
parent | b711ef5e176bf47c10c0d24e21c1486b5331d33f (diff) | |
download | linux-0c2fb1701155062b842cdff69475482029fa8b14.tar.gz linux-0c2fb1701155062b842cdff69475482029fa8b14.tar.bz2 linux-0c2fb1701155062b842cdff69475482029fa8b14.zip |
scsi: hisi_sas: Add device attribute experimental_iopoll_q_cnt for v3 hw
Add device attribute experimental_iopoll_q_cnt to indicate how many iopoll
queues are used for v3 hw.
Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>
Link: https://lore.kernel.org/r/1678169355-76215-5-git-send-email-chenxiang66@hisilicon.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/hisi_sas')
-rw-r--r-- | drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c index 1f6c02632c6a..8d0e2dd6207a 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c +++ b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c @@ -2855,6 +2855,18 @@ static ssize_t intr_coal_count_v3_hw_store(struct device *dev, } static DEVICE_ATTR_RW(intr_coal_count_v3_hw); +static ssize_t iopoll_q_cnt_v3_hw_show(struct device *dev, + struct device_attribute + *attr, char *buf) +{ + struct Scsi_Host *shost = class_to_shost(dev); + struct hisi_hba *hisi_hba = shost_priv(shost); + + return scnprintf(buf, PAGE_SIZE, "%u\n", + hisi_hba->iopoll_q_cnt); +} +static DEVICE_ATTR_RO(iopoll_q_cnt_v3_hw); + static int slave_configure_v3_hw(struct scsi_device *sdev) { struct Scsi_Host *shost = dev_to_shost(&sdev->sdev_gendev); @@ -2884,6 +2896,7 @@ static struct attribute *host_v3_hw_attrs[] = { &dev_attr_intr_conv_v3_hw.attr, &dev_attr_intr_coal_ticks_v3_hw.attr, &dev_attr_intr_coal_count_v3_hw.attr, + &dev_attr_iopoll_q_cnt_v3_hw.attr, NULL }; |