All of lore.kernel.org
 help / color / mirror / Atom feed
From: Clemens Ladisch <clemens@ladisch.de>
To: Simon Richter <Simon.Richter@hogyros.de>
Cc: Nick Cheng <nick.cheng@areca.com.tw>, linux-kernel@vger.kernel.org
Subject: Re: PCI devices sharing IRQs
Date: Fri, 13 May 2011 10:07:27 +0200	[thread overview]
Message-ID: <4DCCE6BF.8030109@ladisch.de> (raw)
In-Reply-To: <20110512081756.GB2206@salmiakki.hogyros.de>

Simon Richter wrote:
> most of the PCI slots appear to map to the same IRQ, and I'm wondering
> if anything can be done about this.

The routing of PCI interrupts cannot be changed on any modern system.

PCI-Express devices are required to support message-signaled interrupts
(MSIs), which do not require separate hardware interrupt lines and are
never shared.  So throw away those cheap Intel chips and use the good
Realtek one instead.  ;-)

As for the RAID card, the arcmsr driver does not enable MSI.
I don't know if this an oversight in the driver or a hardware bug.
Please try the patch below.

(Nick, it looks as if there is an error path that doesn't free the
requested interrupt.)

> If there is anything I could try to change in order to give each card
> its own IRQ (especially pulling the RAID card and the Ethernet
> controller apart could possibly be worth something,

If these devices are on cards, you could try changing slots.

> as would handling IRQs on more than one core)

My AMD CPU automatically routes interrupts to an idle core ...


Regards,
Clemens

--8<---------------------------------------------------------------->8--
[SCSI] arcmsr: add MSI support

Try to enable MSI for Areca host adapters.  It might actually work.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>

--- a/drivers/scsi/arcmsr/arcmsr_hba.c
+++ b/drivers/scsi/arcmsr/arcmsr_hba.c
@@ -692,7 +692,10 @@ static int arcmsr_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 	if(error){
 		goto RAID_controller_stop;
 	}
+	pci_enable_msi(pdev);
-	error = request_irq(pdev->irq, arcmsr_do_interrupt, IRQF_SHARED, "arcmsr", acb);
+	error = request_irq(pdev->irq, arcmsr_do_interrupt,
+			    pci_dev_msi_enabled(pdev) ? 0 : IRQF_SHARED,
+			    "arcmsr", acb);
 	if(error){
 		goto scsi_host_remove;
 	}
@@ -711,7 +714,9 @@ static int arcmsr_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 		goto out_free_sysfs;
 	return 0;
 out_free_sysfs:
+	/* FIXME: free_irq */
 scsi_host_remove:
+	pci_disable_msi(pdev);
 	scsi_remove_host(host);
 RAID_controller_stop:
 	arcmsr_stop_adapter_bgrb(acb);
@@ -1050,6 +1055,7 @@ static void arcmsr_remove(struct pci_dev *pdev)
 		}
 	}
 	free_irq(pdev->irq, acb);
+	pci_disable_msi(pdev);
 	arcmsr_free_ccb_pool(acb);
 	arcmsr_free_hbb_mu(acb);
 	arcmsr_unmap_pciregion(acb);

      reply	other threads:[~2011-05-13  8:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-12  8:17 PCI devices sharing IRQs Simon Richter
2011-05-13  8:07 ` Clemens Ladisch [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DCCE6BF.8030109@ladisch.de \
    --to=clemens@ladisch.de \
    --cc=Simon.Richter@hogyros.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nick.cheng@areca.com.tw \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.