linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ata: libahci: Only warn for AHCI_HFLAG_MULTI_MSI set when genuine custom irq handler implemented
@ 2019-02-18 17:43 John Garry
  2019-02-28 21:08 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: John Garry @ 2019-02-18 17:43 UTC (permalink / raw)
  To: axboe; +Cc: linuxarm, linux-ide, linux-kernel, 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:

[   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.

Signed-off-by: John Garry <john.garry@huawei.com>

diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c
index b5f57c69c487..692782dddc0f 100644
--- a/drivers/ata/libahci.c
+++ b/drivers/ata/libahci.c
@@ -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) {
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ata: libahci: Only warn for AHCI_HFLAG_MULTI_MSI set when genuine custom irq handler implemented
  2019-02-18 17:43 [PATCH] ata: libahci: Only warn for AHCI_HFLAG_MULTI_MSI set when genuine custom irq handler implemented John Garry
@ 2019-02-28 21:08 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2019-02-28 21:08 UTC (permalink / raw)
  To: John Garry; +Cc: linuxarm, linux-ide, linux-kernel

On 2/18/19 10:43 AM, John Garry wrote:
> 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.

Applied, thanks.

-- 
Jens Axboe

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-02-28 21:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-18 17:43 [PATCH] ata: libahci: Only warn for AHCI_HFLAG_MULTI_MSI set when genuine custom irq handler implemented John Garry
2019-02-28 21:08 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).