Skip to contentSkip to conversation

ata: libahci: Only warn for AHCI_HFLAG_MULTI_MSI set when genuine custom irq handler implemented

PATCH Applied John Garry 2 participants 2 messages Feb 18, 2019 – Feb 28, 2019 libata

lore
Share & tools
lore

John Garry

author
#0 lore raw

PATCH 1/1 ata: libahci: Only warn for AHCI_HFLAG_MULTI_MSI set when genuine custom irq handler implemented

For an AHCI controller with AHCI_HFLAG_MULTI_MSI flag set, we may get the following log, regardless of whether a custom irq handler was implemented or not:

[   14.700238] ahci 0000:74:03.0: both AHCI_HFLAG_MULTI_MSI flag set and custom irq handler implemented

This is because we can set hpriv->irq_handler to ahci_single_level_irq_intr() if not already set, in ahci_init_one()->ahci_pci_save_initial_config()->ahci_save_initial_config().

Stop having this warn being misleading by adding a check for hpriv->irq_handler != ahci_single_level_irq_intr.

drivers/ata/libahci.c +2 -1
index b5f57c69c487..692782dddc0f 100644
@@ -2599,7 +2599,8 @@ int ahci_host_activate(struct ata_host *host, struct scsi_host_template *sht)
 	int rc;
 
 	if (hpriv->flags & AHCI_HFLAG_MULTI_MSI) {
-		if (hpriv->irq_handler)
+		if (hpriv->irq_handler &&
+		    hpriv->irq_handler != ahci_single_level_irq_intr)
 			dev_warn(host->dev,
 			         "both AHCI_HFLAG_MULTI_MSI flag set and custom irq handler implemented\n");
 		if (!hpriv->get_irq_vector) {
Signature · 1 line
2.17.1
Applied
#1 lore raw
Quoted 4 lines · John Garry

For an AHCI controller with AHCI_HFLAG_MULTI_MSI flag set, we may get the following log, regardless of whether a custom irq handler was implemented or not:

Quoted 8 lines
[   14.700238] ahci 0000:74:03.0: both AHCI_HFLAG_MULTI_MSI flag set and custom irq handler implemented

This is because we can set hpriv->irq_handler to ahci_single_level_irq_intr() if not already set, in ahci_init_one()->ahci_pci_save_initial_config()->ahci_save_initial_config().

Stop having this warn being misleading by adding a check for hpriv->irq_handler != ahci_single_level_irq_intr.

Applied, thanks.

Signature · 1 line
Jens Axboe