1. 24 2月, 2012 1 次提交
    • M
      PCI: Add pcie_hp=nomsi to disable MSI/MSI-X for pciehp driver · 7570a333
      MUNEDA Takahiro 提交于
      Add a parameter to avoid using MSI/MSI-X for PCIe native hotplug; it's
      known to be buggy on some platforms.
      
      In my environment, while shutting down, following stack trace is shown
      sometimes.
      
        irq 16: nobody cared (try booting with the "irqpoll" option)
        Pid: 1081, comm: reboot Not tainted 3.2.0 #1
        Call Trace:
         <IRQ>  [<ffffffff810cec1d>] __report_bad_irq+0x3d/0xe0
         [<ffffffff810cee1c>] note_interrupt+0x15c/0x210
         [<ffffffff810cc485>] handle_irq_event_percpu+0xb5/0x210
         [<ffffffff810cc621>] handle_irq_event+0x41/0x70
         [<ffffffff810cf675>] handle_fasteoi_irq+0x55/0xc0
         [<ffffffff81015356>] handle_irq+0x46/0xb0
         [<ffffffff814fbe9d>] do_IRQ+0x5d/0xe0
         [<ffffffff814f146e>] common_interrupt+0x6e/0x6e
         [<ffffffff8106b040>] ? __do_softirq+0x60/0x210
         [<ffffffff8108aeb1>] ? hrtimer_interrupt+0x151/0x240
         [<ffffffff814fb5ec>] call_softirq+0x1c/0x30
         [<ffffffff810152d5>] do_softirq+0x65/0xa0
         [<ffffffff8106ae9d>] irq_exit+0xbd/0xe0
         [<ffffffff814fbf8e>] smp_apic_timer_interrupt+0x6e/0x99
         [<ffffffff814f9e5e>] apic_timer_interrupt+0x6e/0x80
         <EOI>  [<ffffffff814f0fb1>] ? _raw_spin_unlock_irqrestore+0x11/0x20
         [<ffffffff812629fc>] pci_bus_write_config_word+0x6c/0x80
         [<ffffffff81266fc2>] pci_intx+0x52/0xa0
         [<ffffffff8127de3d>] pci_intx_for_msi+0x1d/0x30
        [<ffffffff8127e4fb>] pci_msi_shutdown+0x7b/0x110
         [<ffffffff81269d34>] pci_device_shutdown+0x34/0x50
         [<ffffffff81326c4f>] device_shutdown+0x2f/0x140
         [<ffffffff8107b981>] kernel_restart_prepare+0x31/0x40
         [<ffffffff8107b9e6>] kernel_restart+0x16/0x60
         [<ffffffff8107bbfd>] sys_reboot+0x1ad/0x220
         [<ffffffff814f4b90>] ? do_page_fault+0x1e0/0x460
         [<ffffffff811942d0>] ? __sync_filesystem+0x90/0x90
         [<ffffffff8105c9aa>] ? __cond_resched+0x2a/0x40
         [<ffffffff814ef090>] ? _cond_resched+0x30/0x40
         [<ffffffff81169e17>] ? iterate_supers+0xb7/0xd0
         [<ffffffff814f9382>] system_call_fastpath+0x16/0x1b
        handlers:
        [<ffffffff8138a0f0>] usb_hcd_irq
        [<ffffffff8138a0f0>] usb_hcd_irq
        [<ffffffff8138a0f0>] usb_hcd_irq
        Disabling IRQ #16
      
      An un-wanted interrupt is generated when PCI driver switches from
      MSI/MSI-X to INTx while shutting down the device.  The interrupt does
      not happen if MSI/MSI-X is not used on the device.
      I confirmed that this problem does not happen if pcie_hp=nomsi was
      specified and hotplug operation worked fine as usual.
      
      v2: Automatically disable MSI/MSI-X against following device:
          PCI bridge: Integrated Device Technology, Inc. Device 807f (rev 02)
      v3: Based on the review comment, combile the if statements.
      v4: Removed module parameter.
          Move some code to build pciehp as a module.
          Move device specific code to driver/pci/quirks.c.
      v5: Drop a device specific code until getting a vendor statement.
      Reviewed-by: NKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
      Signed-off-by: NMUNEDA Takahiro <muneda.takahiro@jp.fujitsu.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      7570a333
  2. 15 1月, 2011 1 次提交
  3. 24 12月, 2010 1 次提交
    • R
      PCI/PCIe: Clear Root PME Status bits early during system resume · fe31e697
      Rafael J. Wysocki 提交于
      I noticed that PCI Express PMEs don't work on my Toshiba Portege R500
      after the system has been woken up from a sleep state by a PME
      (through Wake-on-LAN).  After some investigation it turned out that
      the BIOS didn't clear the Root PME Status bit in the root port that
      received the wakeup PME and since the Requester ID was also set in
      the port's Root Status register, any subsequent PMEs didn't trigger
      interrupts.
      
      This problem can be avoided by clearing the Root PME Status bits in
      all PCI Express root ports during early resume.  For this purpose,
      add an early resume routine to the PCIe port driver and make this
      driver be always registered, even if pci_ports_disable is set (in
      which case the driver's only function is to provide the early
      resume callback).
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      fe31e697
  4. 25 8月, 2010 2 次提交
    • R
      PCI: PCIe: Ask BIOS for control of all native services at once · 28eb5f27
      Rafael J. Wysocki 提交于
      After commit 852972ac (ACPI: Disable
      ASPM if the platform won't provide _OSC control for PCIe) control of
      the PCIe Capability Structure is unconditionally requested by
      acpi_pci_root_add(), which in principle may cause problems to
      happen in two ways.  First, the BIOS may refuse to give control of
      the PCIe Capability Structure if it is not asked for any of the
      _OSC features depending on it at the same time.  Second, the BIOS may
      assume that control of the _OSC features depending on the PCIe
      Capability Structure will be requested in the future and may behave
      incorrectly if that doesn't happen.  For this reason, control of
      the PCIe Capability Structure should always be requested along with
      control of any other _OSC features that may depend on it (ie. PCIe
      native PME, PCIe native hot-plug, PCIe AER).
      
      Rework the PCIe port driver so that (1) it checks which native PCIe
      port services can be enabled, according to the BIOS, and (2) it
      requests control of all these services simultaneously.  In
      particular, this causes pcie_portdrv_probe() to fail if the BIOS
      refuses to grant control of the PCIe Capability Structure, which
      means that no native PCIe port services can be enabled for the PCIe
      Root Complex the given port belongs to.  If that happens, ASPM is
      disabled to avoid problems with mishandling it by the part of the
      PCIe hierarchy for which control of the PCIe Capability Structure
      has not been received.
      
      Make it possible to override this behavior using 'pcie_ports=native'
      (use the PCIe native services regardless of the BIOS response to the
      control request), or 'pcie_ports=compat' (do not use the PCIe native
      services at all).
      
      Accordingly, rework the existing PCIe port service drivers so that
      they don't request control of the services directly.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      28eb5f27
    • R
      PCI: PCIe: Introduce commad line switch for disabling port services · 79dd9182
      Rafael J. Wysocki 提交于
      Introduce kernel command line switch pcie_ports= allowing one to
      disable all of the native PCIe port services, so that PCIe ports
      are treated like PCI-to-PCI bridges.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      79dd9182
  5. 23 2月, 2010 1 次提交
    • R
      PCI PM: Make it possible to force using INTx for PCIe PME signaling · c39fae14
      Rafael J. Wysocki 提交于
      Apparently, some machines may have problems with PCI run-time power
      management if MSIs are used for the native PCIe PME signaling.  In
      particular, on the MSI Wind U-100 PCIe PME interrupts are not
      generated by a PCIe root port after a resume from suspend to RAM, if
      the system wake-up was triggered by a PME from the device attached to
      this port.  [It doesn't help to free the interrupt on suspend and
      request it back on resume, even if that is done along with disabling
      the MSI and re-enabling it, respectively.]  However, if INTx
      interrupts are used for this purpose on the same machine, everything
      works just fine.
      
      For this reason, add a kernel command line switch allowing one to
      request that MSIs be not used for the native PCIe PME signaling,
      introduce a DMI table allowing us to blacklist machines that need
      this switch to be set by default and put the MSI Wind U-100 into this
      table.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      c39fae14
  6. 05 12月, 2009 2 次提交
  7. 21 3月, 2009 1 次提交
  8. 20 3月, 2009 3 次提交
    • 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: 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
  9. 21 10月, 2008 1 次提交
  10. 19 10月, 2006 1 次提交
  11. 27 9月, 2006 1 次提交
  12. 24 3月, 2006 1 次提交
  13. 02 7月, 2005 1 次提交
  14. 17 4月, 2005 2 次提交