hisi_sas: Expose hw queues for v2 hw and remove unused code
Subsystems (2)
cover hisi_sas: Expose hw queues for v2 hw and remove unused code
Patch "scsi: hisi_sas: Expose HW queues for v2 hw" was not merged for v5.11, so resending for v5.12.
Unused module param auto_affine_msi_experimental for v3 hw is also removed in the other patch.
John Garry (2):
scsi: hisi_sas: Remove auto_affine_msi_experimental module_param
scsi: hisi_sas: Expose HW queues for v2 hw
drivers/scsi/hisi_sas/hisi_sas.h | 4 ++ drivers/scsi/hisi_sas/hisi_sas_main.c | 11 +++++ drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 66 +++++++++++++++++++++----- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 5 -- 4 files changed, 68 insertions(+), 18 deletions(-)
Signature · 1 line
2.26.2
PATCH 1/2 scsi: hisi_sas: Remove auto_affine_msi_experimental module_param
Now that the driver always uses managed interrupts, delete auto_affine_msi_experimental module param.
--- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 5 ----- 1 file changed, 5 deletions(-)
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c +0 -5
@@ -517,11 +517,6 @@ static int prot_mask;module_param (prot_mask, int,0 );MODULE_PARM_DESC (prot_mask," host protection capabilities mask, def=0x0 " ); -static bool auto_affine_msi_experimental; -module_param (auto_affine_msi_experimental, bool,0444 ); -MODULE_PARM_DESC (auto_affine_msi_experimental,"Enable auto-affinity of MSI IRQs as experimental:\n" -"default is off" ); -static void debugfs_work_handler_v3_hw (struct work_struct *work);static u32 hisi_sas_read32 (struct hisi_hba *hisi_hba,u32 off)
Signature · 1 line
2.26.2
PATCH 2/2 scsi: hisi_sas: Expose HW queues for v2 hw
In reply to John GarryAs a performance enhancement, make the completion queue interrupts managed.
In addition, in commit bf0beec0607d ("blk-mq: drain I/O when all CPUs in a hctx are offline"), CPU hotplug for MQ devices using managed interrupts is made safe. So expose HW queues to blk-mq to take advantage of this.
Flag Scsi_host.host_tagset is also set to ensure that the HBA is not sent more commands than it can handle. However the driver still does not use request tag for IPTT as there are many HW bugs means that special rules apply for IPTT allocation.
--- drivers/scsi/hisi_sas/hisi_sas.h | 4 ++ drivers/scsi/hisi_sas/hisi_sas_main.c | 11 +++++ drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 66 +++++++++++++++++++++----- 3 files changed, 68 insertions(+), 13 deletions(-)
drivers/scsi/hisi_sas/hisi_sas.h +4 -0
@@ -14,6 +14,7 @@#include <linux/debugfs.h> #include <linux/dmapool.h> #include <linux/iopoll.h> +#include <linux/irq.h> #include <linux/lcm.h> #include <linux/libata.h> #include <linux/mfd/syscon.h>
@@ -294,6 +295,7 @@ enum {struct hisi_sas_hw {int (*hw_init)(struct hisi_hba *hisi_hba); +int (*interrupt_preinit)(struct hisi_hba *hisi_hba);void (*setup_itct)(struct hisi_hba *hisi_hba,struct hisi_sas_device *device); int (*slot_index_alloc)(struct hisi_hba *hisi_hba,
@@ -393,6 +395,8 @@ struct hisi_hba {u32 refclk_frequency_mhz;u8 sas_addr[SAS_ADDR_SIZE ]; +int *irq_map;/* v2 hw */ +int n_phy;spinlock_t lock;struct semaphore sem;
drivers/scsi/hisi_sas/hisi_sas_main.c +11 -0
@@ -2628,6 +2628,13 @@ static struct Scsi_Host *hisi_sas_shost_alloc(struct platform_device *pdev,return NULL ; } +static int hisi_sas_interrupt_preinit (struct hisi_hba *hisi_hba) +{ +if (hisi_hba->hw->interrupt_preinit) +return hisi_hba->hw->interrupt_preinit (hisi_hba); +return 0 ; +} +int hisi_sas_probe (struct platform_device *pdev,const struct hisi_sas_hw *hw) {
@@ -2685,6 +2692,10 @@ int hisi_sas_probe(struct platform_device *pdev, sha->sas_port[i] = &hisi_hba->port[i].sas_port; } + rc =hisi_sas_interrupt_preinit (hisi_hba); +if (rc) + goto err_out_ha; + rc =scsi_add_host (shost, &pdev->dev);if (rc) goto err_out_ha;
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c +53 -13
127 lines not on this page · raw message
Signature · 1 line
2.26.2
John,
Quoted 2 lines
Patch "scsi:
hisi_sas: Expose HW queues for v2 hw" was not merged for v5.11, so resending for v5.12.
Any changes to it? 5.11/postmerge is sitting in my fixes branch.
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering
On 06/01/2021 04:18, Martin K. Petersen wrote:
Hi Martin,
Quoted 4 lines
Quoted 3 lines
Patch "scsi:
hisi_sas: Expose HW queues for v2 hw" was not merged for v5.11, so resending for v5.12.Any changes to it? 5.11/postmerge is sitting in my fixes branch.
No change. I just did not see that patch in Linus' master branch or your git, so assumed that I would just need to resend for 5.12. And now I see it in 5.11/postmerge
Thanks,
John
Martin K. Petersen
AppliedQuoted 11 lines · John Garry
Patch "scsi:
hisi_sas: Expose HW queues for v2 hw" was not merged for v5.11, so resending for v5.12.Unused module param
auto_affine_msi_experimentalfor v3 hw is also removed in the other patch.John Garry (2):
scsi:hisi_sas: Removeauto_affine_msi_experimentalmodule_param
scsi:hisi_sas: Expose HW queues for v2 hw[...]
Applied to 5.12/scsi-queue, thanks!
[1/2] scsi: hisi_sas: Remove auto_affine_msi_experimental module_param
https://git.kernel.org/mkp/scsi/c/3997e0fdd587
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering