All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH #upstream] ahci/sata_vsc: drop intx manipulation on msi enable
@ 2009-01-23  2:31 Tejun Heo
  2009-02-01  1:32 ` Tejun Heo
  2009-02-17  0:10 ` Jeff Garzik
  0 siblings, 2 replies; 3+ messages in thread
From: Tejun Heo @ 2009-01-23  2:31 UTC (permalink / raw)
  To: Jeff Garzik, IDE/ATA development list, Mark Lord

There's no need to turn off intx explicitly on msi enable.  This is
automatically handled by pci.  Drop it.

Note that, in sata_vsc's case, it was completely redundant; however,
for ahci, it might be needed on machines if the BIOS turns intx off
during boot.  However, there's no evidence of such behavior for ahci
and the only such case seems to be ICH5 PATA according to ata_piix.
Also, given the way ahci operates, it's highly unlikely BIOS ever
disables IRQ for the controller.  However, as this change has slight
possibility of introducing failure, please schedule it for #upstream.

Signed-off-by: Tejun Heo <tj@kernel.org>
---
There are similar places in sata_sis and sata_uli.  I have no idea
whether they're there because they're needed or just copied over from
other drivers.  Eh...

Thanks.

 drivers/ata/ahci.c     |    4 ++--
 drivers/ata/sata_vsc.c |    3 +--
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 7f701cb..18fac60 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -2616,8 +2616,8 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 	if (board_id == board_ahci_sb700 && pdev->revision >= 0x40)
 		hpriv->flags &= ~AHCI_HFLAG_IGN_SERR_INTERNAL;
 
-	if ((hpriv->flags & AHCI_HFLAG_NO_MSI) || pci_enable_msi(pdev))
-		pci_intx(pdev, 1);
+	if (!(hpriv->flags & AHCI_HFLAG_NO_MSI))
+		pci_enable_msi(pdev);
 
 	/* save initial config */
 	ahci_save_initial_config(pdev, hpriv);
diff --git a/drivers/ata/sata_vsc.c b/drivers/ata/sata_vsc.c
index c57cdff..398328a 100644
--- a/drivers/ata/sata_vsc.c
+++ b/drivers/ata/sata_vsc.c
@@ -411,8 +411,7 @@ static int __devinit vsc_sata_init_one(struct pci_dev *pdev,
 	if (cls == 0x00)
 		pci_write_config_byte(pdev, PCI_CACHE_LINE_SIZE, 0x80);
 
-	if (pci_enable_msi(pdev) == 0)
-		pci_intx(pdev, 0);
+	pci_enable_msi(pdev);
 
 	/*
 	 * Config offset 0x98 is "Extended Control and Status Register 0"

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

* Re: [PATCH #upstream] ahci/sata_vsc: drop intx manipulation on msi enable
  2009-01-23  2:31 [PATCH #upstream] ahci/sata_vsc: drop intx manipulation on msi enable Tejun Heo
@ 2009-02-01  1:32 ` Tejun Heo
  2009-02-17  0:10 ` Jeff Garzik
  1 sibling, 0 replies; 3+ messages in thread
From: Tejun Heo @ 2009-02-01  1:32 UTC (permalink / raw)
  To: Jeff Garzik, IDE/ATA development list, Mark Lord

Tejun Heo wrote:
> There's no need to turn off intx explicitly on msi enable.  This is
> automatically handled by pci.  Drop it.
> 
> Note that, in sata_vsc's case, it was completely redundant; however,
> for ahci, it might be needed on machines if the BIOS turns intx off
> during boot.  However, there's no evidence of such behavior for ahci
> and the only such case seems to be ICH5 PATA according to ata_piix.
> Also, given the way ahci operates, it's highly unlikely BIOS ever
> disables IRQ for the controller.  However, as this change has slight
> possibility of introducing failure, please schedule it for #upstream.
> 
> Signed-off-by: Tejun Heo <tj@kernel.org>

Ping.

-- 
tejun

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

* Re: [PATCH #upstream] ahci/sata_vsc: drop intx manipulation on msi enable
  2009-01-23  2:31 [PATCH #upstream] ahci/sata_vsc: drop intx manipulation on msi enable Tejun Heo
  2009-02-01  1:32 ` Tejun Heo
@ 2009-02-17  0:10 ` Jeff Garzik
  1 sibling, 0 replies; 3+ messages in thread
From: Jeff Garzik @ 2009-02-17  0:10 UTC (permalink / raw)
  To: Tejun Heo; +Cc: IDE/ATA development list, Mark Lord

Tejun Heo wrote:
> There's no need to turn off intx explicitly on msi enable.  This is
> automatically handled by pci.  Drop it.
> 
> Note that, in sata_vsc's case, it was completely redundant; however,
> for ahci, it might be needed on machines if the BIOS turns intx off
> during boot.  However, there's no evidence of such behavior for ahci
> and the only such case seems to be ICH5 PATA according to ata_piix.
> Also, given the way ahci operates, it's highly unlikely BIOS ever
> disables IRQ for the controller.  However, as this change has slight
> possibility of introducing failure, please schedule it for #upstream.
> 
> Signed-off-by: Tejun Heo <tj@kernel.org>
> ---
> There are similar places in sata_sis and sata_uli.  I have no idea
> whether they're there because they're needed or just copied over from
> other drivers.  Eh...

Most of them were just copied, IIRC.

as for this patch:  applied the ahci portion.

For sata_vsc, ISTR there being a hardware-specific reason why the 
MSI+INTX manipulation was done in that fashion.  Needs a bit of 
research, or at least, real world testing results for the MSI and !MSI 
cases...

	Jeff




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

end of thread, other threads:[~2009-02-17  0:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-23  2:31 [PATCH #upstream] ahci/sata_vsc: drop intx manipulation on msi enable Tejun Heo
2009-02-01  1:32 ` Tejun Heo
2009-02-17  0:10 ` Jeff Garzik

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.