freebsd-skq/sys/dev/pci
jhb 2750ce9b17 Various fixes for PCI _OSC handling so HotPlug works again.
- Rename the default implementation of 'pcib_request_feature' and add
  a pcib_request_feature() wrapper function (as is often done for
  new-bus APIs implemented via kobj) that accepts a single function.
  Previously the call to pcib_request_feature() ended up invoking the
  method on the great-great-grandparent of the bridge device instead
  of the grandparent.  For a bridge that was a direct child of pci0 on
  x86 this resulted in the method skipping over the Host-PCI bridge
  driver and being invoked against nexus0
- When invoking _OSC from a Host-PCI bridge driver, invoke
  device_get_softc() against the Host-PCI bridge device instead of the
  child bridge that is requesting HotPlug.  Using the wrong softc data
  resulted in garbage being passed for the ACPI handle causing the
  _OSC call to fail.
- While here, perform some other cleanups to _OSC handling in the ACPI
  Host-PCI bridge driver:
  - Don't invoke _OSC when requesting a control that has already been
    granted by the firmware.
  - Don't set the first word of the capability array before invoking
    _OSC.  This word is always set explicitly by acpi_EvaluateOSC()
    since it is UUID-independent.
  - Don't modify the set of granted controls unless _OSC doesn't exist
    (which is treated as always successful), or the _OSC method
    doesn't fail.
  - Don't require an _OSC status of 0 for success.  _OSC always
    returns the updated control mask even if it returns a non-zero
    status in the first word.
  - Whine if _OSC ever tries to revoke a previously-granted control.
    (It is not supposed to do that.)
- While here, add constants for the _OSC status word in acpivar.h
  (though currently unused).

Reported by:	adrian
Reviewed by:	imp
MFC after:	1 week
Tested on:	Lenovo x220
Differential Revision:	https://reviews.freebsd.org/D10520
2017-04-27 16:32:42 +00:00
..
fixup_pci.c
hostb_pci.c "Buses" is the preferred plural of "bus" 2017-01-15 17:54:01 +00:00
ignore_pci.c
isa_pci.c Remove more pc98 support. 2017-01-28 09:58:00 +00:00
pci_host_generic_fdt.c If ofw_bus_msimap fails don't try to use the invalid MSI/MSI-X parent node. 2017-03-16 17:49:37 +00:00
pci_host_generic_fdt.h To allow for an ACPI attachment to the generic PCIe driver split off the 2016-11-21 18:24:05 +00:00
pci_host_generic.c To allow for an ACPI attachment to the generic PCIe driver split off the 2016-11-21 18:24:05 +00:00
pci_host_generic.h To allow for an ACPI attachment to the generic PCIe driver split off the 2016-11-21 18:24:05 +00:00
pci_if.m Create pcib_request_feature. 2017-02-25 06:11:36 +00:00
pci_iov_if.m
pci_iov_private.h Save and restore SRIOV-related config registers. 2016-05-03 19:45:24 +00:00
pci_iov_schema.c Clean up repeated "All rights reserved" 2016-03-14 17:41:17 +00:00
pci_iov.c Permit the name of the /dev/iov entry to be set by the driver. 2016-08-03 17:09:12 +00:00
pci_iov.h Permit the name of the /dev/iov entry to be set by the driver. 2016-08-03 17:09:12 +00:00
pci_pci.c Various fixes for PCI _OSC handling so HotPlug works again. 2017-04-27 16:32:42 +00:00
pci_private.h "Buses" is the preferred plural of "bus" 2017-01-15 17:54:01 +00:00
pci_subr.c "Buses" is the preferred plural of "bus" 2017-01-15 17:54:01 +00:00
pci_user.c Reliably return PCI_GETCONF_LAST_DEVICE from PCIOCGETCONF. 2016-08-09 17:57:11 +00:00
pci.c alc: Add Killer E2500 support 2017-01-16 03:03:47 +00:00
pcib_if.m Create pcib_request_feature. 2017-02-25 06:11:36 +00:00
pcib_private.h Various fixes for PCI _OSC handling so HotPlug works again. 2017-04-27 16:32:42 +00:00
pcib_support.c Re-commit r299467 having fixed the build: 2016-05-16 09:15:50 +00:00
pcireg.h Add constants and descriptions for some new PCI class definitions 2017-03-13 07:45:15 +00:00
pcivar.h Reset PCI pass through devices via PCI-e FLR during VM start and end. 2016-09-06 21:15:35 +00:00
schema_private.h Clean up repeated "All rights reserved" 2016-03-14 17:41:17 +00:00
vga_pci.c Remove pc98 support completely. 2017-01-28 02:22:15 +00:00