lkml.org 
[lkml]   [2009]   [Jan]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/8] PCI PCIe portdrv: Remove root ports MSI quirk
Date
From: Rafael J. Wysocki <rjw@sisk.pl>

The PCI Express port driver contains a quirk that prevents root
ports from using MSI, but there is no explanation for it and the
PCI Express specification clearly allows root ports to use MSI.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
drivers/pci/pcie/portdrv_core.c | 28 ----------------------------
1 file changed, 28 deletions(-)

Index: linux-2.6/drivers/pci/pcie/portdrv_core.c
===================================================================
--- linux-2.6.orig/drivers/pci/pcie/portdrv_core.c
+++ linux-2.6/drivers/pci/pcie/portdrv_core.c
@@ -17,8 +17,6 @@

#include "portdrv.h"

-extern int pcie_mch_quirk; /* MSI-quirk Indicator */
-
/**
* release_pcie_device - free PCI Express port service device structure
* @dev: Port service device to release
@@ -31,28 +29,6 @@ static void release_pcie_device(struct d
kfree(to_pcie_device(dev));
}

-static int is_msi_quirked(struct pci_dev *dev)
-{
- int port_type, quirk = 0;
- u16 reg16;
-
- pci_read_config_word(dev,
- pci_find_capability(dev, PCI_CAP_ID_EXP) +
- PCIE_CAPABILITIES_REG, &reg16);
- port_type = (reg16 >> 4) & PORT_TYPE_MASK;
- switch(port_type) {
- case PCIE_RC_PORT:
- if (pcie_mch_quirk == 1)
- quirk = 1;
- break;
- case PCIE_SW_UPSTREAM_PORT:
- case PCIE_SW_DOWNSTREAM_PORT:
- default:
- break;
- }
- return quirk;
-}
-
/**
* assign_interrupt_mode - choose interrupt mode for PCI Express port services
* (INTx, MSI-X, MSI) and set up vectors
@@ -73,10 +49,6 @@ static int assign_interrupt_mode(struct
nvec++;
vectors[i] = dev->irq;
}
-
- /* Check MSI quirk */
- if (is_msi_quirked(dev))
- return interrupt_mode;

/* Select MSI-X over MSI if supported */
pos = pci_find_capability(dev, PCI_CAP_ID_MSIX);


\
 
 \ /
  Last update: 2009-01-05 00:05    [W:0.190 / U:4.812 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site