1. 05 12月, 2009 1 次提交
    • K
      PCI: portdrv: cleanup service irqs initialization · dc535178
      Kenji Kaneshige 提交于
      This patch cleans up the service irqs initialization as follows:
      
       - Remove 'irq_mode' field in pcie_port_data and related definitions,
         which is not needed because we can get the same information from
         'is_msix', 'is_msi' and 'pin' fields in struct pci_dev.
      
       - Change the name of 'vectors' argument of assign_interrupt_mode() to
         'irqs' because it holds irq numbers actually. People might confuse
         it with CPU vector or MSI/MSI-X vector.
      
       - Change function name assign_interrupt_mode() to init_service_irqs()
         becasuse we no longer have 'irq_mode' data structure, and new name
         is more straightforward (IMO).
      Signed-off-by: NKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      dc535178
  2. 21 3月, 2009 1 次提交
  3. 20 3月, 2009 5 次提交
    • R
      PCI/PCIe portdrv: Fix allocation of interrupts · b43d4513
      Rafael J. Wysocki 提交于
      If MSI-X interrupt mode is used by the PCI Express port driver, too
      many vectors are allocated and it is not ensured that the right
      vectors will be used for the right services.  Namely, the PCI Express
      specification states that both PCI Express native PME and PCI Express
      hotplug will always use the same MSI or MSI-X message for signalling
      interrupts, which implies that the same vector will be used by both
      of them.  Also, the VC service does not use interrupts at all.
      Moreover, is not clear which of the vectors allocated by
      pci_enable_msix() in the current code will be used for PME and
      hotplug and which of them will be used for AER if all of these
      services are configured.
      
      For these reasons, rework the allocation of interrupts for PCI
      Express ports so that if MSI-X are enabled, the right vectors will be
      used for the right purposes.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Reviewed-by: NHidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      b43d4513
    • R
      PCI: PCIe portdrv: Remove struct pcie_port_service_id · 22106368
      Rafael J. Wysocki 提交于
      The PCI Express port driver uses 'struct pcie_port_service_id' for
      matching port service devices and drivers, but this structure
      contains fields that duplicate information from the port device
      itself (vendor, device, subvendor, subdevice) and fields that are not
      used by any existing port service driver (class, class_mask,
      drvier_data).  Also, both existing port service drivers (AER and
      PCIe HP) don't even use the vendor and device fields for device
      matching.  Therefore 'struct pcie_port_service_id' can be removed
      altogether and the only useful members of it (port_type, service) can
      be introduced directly into the port service device and port service
      driver structures.  That simplifies the code quite a bit and reduces
      its size.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      22106368
    • R
      PCI: PCIe portdrv: Simplily probe callback of service drivers · 0516c8bc
      Rafael J. Wysocki 提交于
      The second argument of the ->probe() callback in
      struct pcie_port_service_driver is unnecessary and never used.
      Remove it.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      0516c8bc
    • R
      PCI: PCIe portdrv: Aviod using service devices with wrong interrupts · 90e9cd50
      Rafael J. Wysocki 提交于
      The PCI Express port driver should not attempt to register service
      devices that require the ability to generate interrupts if generating
      interrupts is not possible.  Namely, if the port has no interrupt pin
      configured and we cannot set up MSI or MSI-X for it, there is no way
      it can generate interrupts and in such a case the port services that
      rely on interrupts (PME, PCIe HP, AER) should not be enabled for it.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      90e9cd50
    • R
      PCI: PCIe portdrv: Use driver data to simplify code · 1bf83e55
      Rafael J. Wysocki 提交于
      PCI Express port driver extension, as defined by struct
      pcie_port_device_ext in portdrv.h, is allocated and initialized, but
      never used (it also is never freed).  Extend it to hold the PCI Express
      port type as well as the port interrupt mode, change its name and use it
      to simplify the code in portdrv_core.c .
      
      Additionally, remove the redundant interrupt_mode member of struct
      pcie_device defined in include/linux/pcieport_if.h .
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      1bf83e55
  4. 27 9月, 2006 1 次提交
    • Z
      PCI-Express AER implemetation: AER core and aerdriver · 6c2b374d
      Zhang, Yanmin 提交于
      Patch 3 implements the core part of PCI-Express AER and aerdrv
      port service driver.
      
      When a root port service device is probed, the aerdrv will call
      request_irq to register irq handler for AER error interrupt.
      
      When a device sends an PCI-Express error message to the root port,
      the root port will trigger an interrupt, by either MSI or IO-APIC,
      then kernel would run the irq handler. The handler collects root
      error status register and schedules a work. The work will call
      the core part to process the error based on its type
      (Correctable/non-fatal/fatal).
      
      As for Correctable errors, the patch chooses to just clear the correctable
      error status register of the device.
      
      As for the non-fatal error, the patch follows generic PCI error handler
      rules to call the error callback functions of the endpoint's driver. If
      the device is a bridge, the patch chooses to broadcast the error to
      downstream devices.
      
      As for the fatal error, the patch resets the pci-express link and
      follows generic PCI error handler rules to call the error callback
      functions of the endpoint's driver. If the device is a bridge, the patch
      chooses to broadcast the error to downstream devices.
      Signed-off-by: NZhang Yanmin <yanmin.zhang@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      6c2b374d
  5. 17 4月, 2005 2 次提交