Merge 3.14-rc5 into driver-core-next
We want the fixes in here.
This commit is contained in:
@@ -60,14 +60,6 @@
|
||||
#define PCIE_DEBUG_CTRL 0x1a60
|
||||
#define PCIE_DEBUG_SOFT_RESET BIT(20)
|
||||
|
||||
/*
|
||||
* This product ID is registered by Marvell, and used when the Marvell
|
||||
* SoC is not the root complex, but an endpoint on the PCIe bus. It is
|
||||
* therefore safe to re-use this PCI ID for our emulated PCI-to-PCI
|
||||
* bridge.
|
||||
*/
|
||||
#define MARVELL_EMULATED_PCI_PCI_BRIDGE_ID 0x7846
|
||||
|
||||
/* PCI configuration space of a PCI-to-PCI bridge */
|
||||
struct mvebu_sw_pci_bridge {
|
||||
u16 vendor;
|
||||
@@ -388,7 +380,8 @@ static void mvebu_sw_pci_bridge_init(struct mvebu_pcie_port *port)
|
||||
|
||||
bridge->class = PCI_CLASS_BRIDGE_PCI;
|
||||
bridge->vendor = PCI_VENDOR_ID_MARVELL;
|
||||
bridge->device = MARVELL_EMULATED_PCI_PCI_BRIDGE_ID;
|
||||
bridge->device = mvebu_readl(port, PCIE_DEV_ID_OFF) >> 16;
|
||||
bridge->revision = mvebu_readl(port, PCIE_DEV_REV_OFF) & 0xff;
|
||||
bridge->header_type = PCI_HEADER_TYPE_BRIDGE;
|
||||
bridge->cache_line_size = 0x10;
|
||||
|
||||
|
@@ -545,9 +545,15 @@ static int populate_msi_sysfs(struct pci_dev *pdev)
|
||||
return -ENOMEM;
|
||||
list_for_each_entry(entry, &pdev->msi_list, list) {
|
||||
char *name = kmalloc(20, GFP_KERNEL);
|
||||
msi_dev_attr = kzalloc(sizeof(*msi_dev_attr), GFP_KERNEL);
|
||||
if (!msi_dev_attr)
|
||||
if (!name)
|
||||
goto error_attrs;
|
||||
|
||||
msi_dev_attr = kzalloc(sizeof(*msi_dev_attr), GFP_KERNEL);
|
||||
if (!msi_dev_attr) {
|
||||
kfree(name);
|
||||
goto error_attrs;
|
||||
}
|
||||
|
||||
sprintf(name, "%d", entry->irq);
|
||||
sysfs_attr_init(&msi_dev_attr->attr);
|
||||
msi_dev_attr->attr.name = name;
|
||||
@@ -589,6 +595,7 @@ error_attrs:
|
||||
++count;
|
||||
msi_attr = msi_attrs[count];
|
||||
}
|
||||
kfree(msi_attrs);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -959,7 +966,6 @@ EXPORT_SYMBOL(pci_disable_msi);
|
||||
/**
|
||||
* pci_msix_vec_count - return the number of device's MSI-X table entries
|
||||
* @dev: pointer to the pci_dev data structure of MSI-X device function
|
||||
|
||||
* This function returns the number of device's MSI-X table entries and
|
||||
* therefore the number of MSI-X vectors device is capable of sending.
|
||||
* It returns a negative errno if the device is not capable of sending MSI-X
|
||||
|
@@ -1181,6 +1181,8 @@ EXPORT_SYMBOL_GPL(pci_load_and_free_saved_state);
|
||||
static int do_pci_enable_device(struct pci_dev *dev, int bars)
|
||||
{
|
||||
int err;
|
||||
u16 cmd;
|
||||
u8 pin;
|
||||
|
||||
err = pci_set_power_state(dev, PCI_D0);
|
||||
if (err < 0 && err != -EIO)
|
||||
@@ -1190,6 +1192,14 @@ static int do_pci_enable_device(struct pci_dev *dev, int bars)
|
||||
return err;
|
||||
pci_fixup_device(pci_fixup_enable, dev);
|
||||
|
||||
pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin);
|
||||
if (pin) {
|
||||
pci_read_config_word(dev, PCI_COMMAND, &cmd);
|
||||
if (cmd & PCI_COMMAND_INTX_DISABLE)
|
||||
pci_write_config_word(dev, PCI_COMMAND,
|
||||
cmd & ~PCI_COMMAND_INTX_DISABLE);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user