Merge branch 'pci/misc'
- Mark expected switch fall-through (Mathieu Malaterre) - Use of_node_name_eq() for node name comparisons (Rob Herring) - Add ACS and pciehp quirks for HXT SD4800 (Shunyong Yang) - Consolidate Rohm Vendor ID definitions (Andy Shevchenko) - Use u32 (not __u32) for things not exposed to userspace (Logan Gunthorpe) - Fix locking semantics of bus and slot reset interfaces (Alex Williamson) - Update PCIEPORTBUS Kconfig help text (Hou Zhiqiang) * pci/misc: PCI: Update PCIEPORTBUS Kconfig help text PCI: Fix "try" semantics of bus and slot reset PCI: Clean up usage of __u32 type genirq/msi: Clean up usage of __u8/__u16 types PCI: Move Rohm Vendor ID to generic list PCI: pciehp: Add HXT quirk for Command Completed errata PCI: Add ACS quirk for HXT SD4800 PCI: Add HXT vendor ID PCI: Use of_node_name_eq() for node name comparisons PCI: Mark expected switch fall-through
This commit is contained in:
@@ -920,3 +920,5 @@ DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_QCOM, 0x0400,
|
||||
PCI_CLASS_BRIDGE_PCI, 8, quirk_cmd_compl);
|
||||
DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_QCOM, 0x0401,
|
||||
PCI_CLASS_BRIDGE_PCI, 8, quirk_cmd_compl);
|
||||
DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_HXT, 0x0401,
|
||||
PCI_CLASS_BRIDGE_PCI, 8, quirk_cmd_compl);
|
||||
|
@@ -113,7 +113,7 @@ struct device_node *of_pci_find_child_device(struct device_node *parent,
|
||||
* a fake root for all functions of a multi-function
|
||||
* device we go down them as well.
|
||||
*/
|
||||
if (!strcmp(node->name, "multifunc-device")) {
|
||||
if (of_node_name_eq(node, "multifunc-device")) {
|
||||
for_each_child_of_node(node, node2) {
|
||||
if (__of_pci_pci_compare(node2, devfn)) {
|
||||
of_node_put(node);
|
||||
|
@@ -100,7 +100,7 @@ static ssize_t new_id_store(struct device_driver *driver, const char *buf,
|
||||
{
|
||||
struct pci_driver *pdrv = to_pci_driver(driver);
|
||||
const struct pci_device_id *ids = pdrv->id_table;
|
||||
__u32 vendor, device, subvendor = PCI_ANY_ID,
|
||||
u32 vendor, device, subvendor = PCI_ANY_ID,
|
||||
subdevice = PCI_ANY_ID, class = 0, class_mask = 0;
|
||||
unsigned long driver_data = 0;
|
||||
int fields = 0;
|
||||
@@ -168,7 +168,7 @@ static ssize_t remove_id_store(struct device_driver *driver, const char *buf,
|
||||
{
|
||||
struct pci_dynid *dynid, *n;
|
||||
struct pci_driver *pdrv = to_pci_driver(driver);
|
||||
__u32 vendor, device, subvendor = PCI_ANY_ID,
|
||||
u32 vendor, device, subvendor = PCI_ANY_ID,
|
||||
subdevice = PCI_ANY_ID, class = 0, class_mask = 0;
|
||||
int fields = 0;
|
||||
size_t retval = -ENODEV;
|
||||
|
@@ -861,7 +861,7 @@ static int pci_raw_set_power_state(struct pci_dev *dev, pci_power_t state)
|
||||
if ((pmcsr & PCI_PM_CTRL_STATE_MASK) == PCI_D3hot
|
||||
&& !(pmcsr & PCI_PM_CTRL_NO_SOFT_RESET))
|
||||
need_restore = true;
|
||||
/* Fall-through: force to D0 */
|
||||
/* Fall-through - force to D0 */
|
||||
default:
|
||||
pmcsr = 0;
|
||||
break;
|
||||
@@ -2304,7 +2304,7 @@ static pci_power_t pci_target_state(struct pci_dev *dev, bool wakeup)
|
||||
case PCI_D2:
|
||||
if (pci_no_d1d2(dev))
|
||||
break;
|
||||
/* else: fall through */
|
||||
/* else, fall through */
|
||||
default:
|
||||
target_state = state;
|
||||
}
|
||||
@@ -5107,39 +5107,42 @@ unlock:
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Save and disable devices from the top of the tree down */
|
||||
static void pci_bus_save_and_disable(struct pci_bus *bus)
|
||||
/*
|
||||
* Save and disable devices from the top of the tree down while holding
|
||||
* the @dev mutex lock for the entire tree.
|
||||
*/
|
||||
static void pci_bus_save_and_disable_locked(struct pci_bus *bus)
|
||||
{
|
||||
struct pci_dev *dev;
|
||||
|
||||
list_for_each_entry(dev, &bus->devices, bus_list) {
|
||||
pci_dev_lock(dev);
|
||||
pci_dev_save_and_disable(dev);
|
||||
pci_dev_unlock(dev);
|
||||
if (dev->subordinate)
|
||||
pci_bus_save_and_disable(dev->subordinate);
|
||||
pci_bus_save_and_disable_locked(dev->subordinate);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Restore devices from top of the tree down - parent bridges need to be
|
||||
* restored before we can get to subordinate devices.
|
||||
* Restore devices from top of the tree down while holding @dev mutex lock
|
||||
* for the entire tree. Parent bridges need to be restored before we can
|
||||
* get to subordinate devices.
|
||||
*/
|
||||
static void pci_bus_restore(struct pci_bus *bus)
|
||||
static void pci_bus_restore_locked(struct pci_bus *bus)
|
||||
{
|
||||
struct pci_dev *dev;
|
||||
|
||||
list_for_each_entry(dev, &bus->devices, bus_list) {
|
||||
pci_dev_lock(dev);
|
||||
pci_dev_restore(dev);
|
||||
pci_dev_unlock(dev);
|
||||
if (dev->subordinate)
|
||||
pci_bus_restore(dev->subordinate);
|
||||
pci_bus_restore_locked(dev->subordinate);
|
||||
}
|
||||
}
|
||||
|
||||
/* Save and disable devices from the top of the tree down */
|
||||
static void pci_slot_save_and_disable(struct pci_slot *slot)
|
||||
/*
|
||||
* Save and disable devices from the top of the tree down while holding
|
||||
* the @dev mutex lock for the entire tree.
|
||||
*/
|
||||
static void pci_slot_save_and_disable_locked(struct pci_slot *slot)
|
||||
{
|
||||
struct pci_dev *dev;
|
||||
|
||||
@@ -5148,26 +5151,25 @@ static void pci_slot_save_and_disable(struct pci_slot *slot)
|
||||
continue;
|
||||
pci_dev_save_and_disable(dev);
|
||||
if (dev->subordinate)
|
||||
pci_bus_save_and_disable(dev->subordinate);
|
||||
pci_bus_save_and_disable_locked(dev->subordinate);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Restore devices from top of the tree down - parent bridges need to be
|
||||
* restored before we can get to subordinate devices.
|
||||
* Restore devices from top of the tree down while holding @dev mutex lock
|
||||
* for the entire tree. Parent bridges need to be restored before we can
|
||||
* get to subordinate devices.
|
||||
*/
|
||||
static void pci_slot_restore(struct pci_slot *slot)
|
||||
static void pci_slot_restore_locked(struct pci_slot *slot)
|
||||
{
|
||||
struct pci_dev *dev;
|
||||
|
||||
list_for_each_entry(dev, &slot->bus->devices, bus_list) {
|
||||
if (!dev->slot || dev->slot != slot)
|
||||
continue;
|
||||
pci_dev_lock(dev);
|
||||
pci_dev_restore(dev);
|
||||
pci_dev_unlock(dev);
|
||||
if (dev->subordinate)
|
||||
pci_bus_restore(dev->subordinate);
|
||||
pci_bus_restore_locked(dev->subordinate);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5226,17 +5228,15 @@ static int __pci_reset_slot(struct pci_slot *slot)
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
pci_slot_save_and_disable(slot);
|
||||
|
||||
if (pci_slot_trylock(slot)) {
|
||||
pci_slot_save_and_disable_locked(slot);
|
||||
might_sleep();
|
||||
rc = pci_reset_hotplug_slot(slot->hotplug, 0);
|
||||
pci_slot_restore_locked(slot);
|
||||
pci_slot_unlock(slot);
|
||||
} else
|
||||
rc = -EAGAIN;
|
||||
|
||||
pci_slot_restore(slot);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -5322,17 +5322,15 @@ static int __pci_reset_bus(struct pci_bus *bus)
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
pci_bus_save_and_disable(bus);
|
||||
|
||||
if (pci_bus_trylock(bus)) {
|
||||
pci_bus_save_and_disable_locked(bus);
|
||||
might_sleep();
|
||||
rc = pci_bridge_secondary_bus_reset(bus->self);
|
||||
pci_bus_restore_locked(bus);
|
||||
pci_bus_unlock(bus);
|
||||
} else
|
||||
rc = -EAGAIN;
|
||||
|
||||
pci_bus_restore(bus);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@@ -6,10 +6,9 @@ config PCIEPORTBUS
|
||||
bool "PCI Express Port Bus support"
|
||||
depends on PCI
|
||||
help
|
||||
This automatically enables PCI Express Port Bus support. Users can
|
||||
choose Native Hot-Plug support, Advanced Error Reporting support,
|
||||
Power Management Event support and Virtual Channel support to run
|
||||
on PCI Express Ports (Root or Switch).
|
||||
This enables PCI Express Port Bus support. Users can then enable
|
||||
support for Native Hot-Plug, Advanced Error Reporting, Power
|
||||
Management Events, and Downstream Port Containment.
|
||||
|
||||
#
|
||||
# Include service Kconfig here
|
||||
|
@@ -2138,7 +2138,7 @@ static void quirk_netmos(struct pci_dev *dev)
|
||||
if (dev->subsystem_vendor == PCI_VENDOR_ID_IBM &&
|
||||
dev->subsystem_device == 0x0299)
|
||||
return;
|
||||
/* else: fall through */
|
||||
/* else, fall through */
|
||||
case PCI_DEVICE_ID_NETMOS_9735:
|
||||
case PCI_DEVICE_ID_NETMOS_9745:
|
||||
case PCI_DEVICE_ID_NETMOS_9845:
|
||||
@@ -4519,6 +4519,8 @@ static const struct pci_dev_acs_enabled {
|
||||
/* QCOM QDF2xxx root ports */
|
||||
{ PCI_VENDOR_ID_QCOM, 0x0400, pci_quirk_qcom_rp_acs },
|
||||
{ PCI_VENDOR_ID_QCOM, 0x0401, pci_quirk_qcom_rp_acs },
|
||||
/* HXT SD4800 root ports. The ACS design is same as QCOM QDF2xxx */
|
||||
{ PCI_VENDOR_ID_HXT, 0x0401, pci_quirk_qcom_rp_acs },
|
||||
/* Intel PCH root ports */
|
||||
{ PCI_VENDOR_ID_INTEL, PCI_ANY_ID, pci_quirk_intel_pch_acs },
|
||||
{ PCI_VENDOR_ID_INTEL, PCI_ANY_ID, pci_quirk_intel_spt_pch_acs },
|
||||
|
Reference in New Issue
Block a user