diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-02-15 16:20:18 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-02-15 16:20:18 -0500 |
commit | 56012808f4d5606e401539f663d92009d964425b (patch) | |
tree | f3736a97725647393a2db7c95462d857115197ca /drivers/pci | |
parent | a814290e17ae314bd614476cffc6119846eca27e (diff) | |
parent | b2a731aa5cbca7e0252da75e16de7ae5feb1313a (diff) |
Merge branch 'for-rmk' of git://git.marvell.com/orion into devel-stable
Conflicts:
arch/arm/Makefile
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/pcie/aer/aer_inject.c | 12 | ||||
-rw-r--r-- | drivers/pci/probe.c | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/drivers/pci/pcie/aer/aer_inject.c b/drivers/pci/pcie/aer/aer_inject.c index 8c30a9544d61..223052b73563 100644 --- a/drivers/pci/pcie/aer/aer_inject.c +++ b/drivers/pci/pcie/aer/aer_inject.c | |||
@@ -321,7 +321,7 @@ static int aer_inject(struct aer_error_inj *einj) | |||
321 | unsigned long flags; | 321 | unsigned long flags; |
322 | unsigned int devfn = PCI_DEVFN(einj->dev, einj->fn); | 322 | unsigned int devfn = PCI_DEVFN(einj->dev, einj->fn); |
323 | int pos_cap_err, rp_pos_cap_err; | 323 | int pos_cap_err, rp_pos_cap_err; |
324 | u32 sever, mask; | 324 | u32 sever, cor_mask, uncor_mask; |
325 | int ret = 0; | 325 | int ret = 0; |
326 | 326 | ||
327 | dev = pci_get_domain_bus_and_slot((int)einj->domain, einj->bus, devfn); | 327 | dev = pci_get_domain_bus_and_slot((int)einj->domain, einj->bus, devfn); |
@@ -339,6 +339,9 @@ static int aer_inject(struct aer_error_inj *einj) | |||
339 | goto out_put; | 339 | goto out_put; |
340 | } | 340 | } |
341 | pci_read_config_dword(dev, pos_cap_err + PCI_ERR_UNCOR_SEVER, &sever); | 341 | pci_read_config_dword(dev, pos_cap_err + PCI_ERR_UNCOR_SEVER, &sever); |
342 | pci_read_config_dword(dev, pos_cap_err + PCI_ERR_COR_MASK, &cor_mask); | ||
343 | pci_read_config_dword(dev, pos_cap_err + PCI_ERR_UNCOR_MASK, | ||
344 | &uncor_mask); | ||
342 | 345 | ||
343 | rp_pos_cap_err = pci_find_ext_capability(rpdev, PCI_EXT_CAP_ID_ERR); | 346 | rp_pos_cap_err = pci_find_ext_capability(rpdev, PCI_EXT_CAP_ID_ERR); |
344 | if (!rp_pos_cap_err) { | 347 | if (!rp_pos_cap_err) { |
@@ -374,17 +377,14 @@ static int aer_inject(struct aer_error_inj *einj) | |||
374 | err->header_log2 = einj->header_log2; | 377 | err->header_log2 = einj->header_log2; |
375 | err->header_log3 = einj->header_log3; | 378 | err->header_log3 = einj->header_log3; |
376 | 379 | ||
377 | pci_read_config_dword(dev, pos_cap_err + PCI_ERR_COR_MASK, &mask); | 380 | if (einj->cor_status && !(einj->cor_status & ~cor_mask)) { |
378 | if (einj->cor_status && !(einj->cor_status & ~mask)) { | ||
379 | ret = -EINVAL; | 381 | ret = -EINVAL; |
380 | printk(KERN_WARNING "The correctable error(s) is masked " | 382 | printk(KERN_WARNING "The correctable error(s) is masked " |
381 | "by device\n"); | 383 | "by device\n"); |
382 | spin_unlock_irqrestore(&inject_lock, flags); | 384 | spin_unlock_irqrestore(&inject_lock, flags); |
383 | goto out_put; | 385 | goto out_put; |
384 | } | 386 | } |
385 | 387 | if (einj->uncor_status && !(einj->uncor_status & ~uncor_mask)) { | |
386 | pci_read_config_dword(dev, pos_cap_err + PCI_ERR_UNCOR_MASK, &mask); | ||
387 | if (einj->uncor_status && !(einj->uncor_status & ~mask)) { | ||
388 | ret = -EINVAL; | 388 | ret = -EINVAL; |
389 | printk(KERN_WARNING "The uncorrectable error(s) is masked " | 389 | printk(KERN_WARNING "The uncorrectable error(s) is masked " |
390 | "by device\n"); | 390 | "by device\n"); |
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 98ffb2de22e9..446e4a94d7d3 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c | |||
@@ -681,7 +681,7 @@ static void pci_read_irq(struct pci_dev *dev) | |||
681 | dev->irq = irq; | 681 | dev->irq = irq; |
682 | } | 682 | } |
683 | 683 | ||
684 | static void set_pcie_port_type(struct pci_dev *pdev) | 684 | void set_pcie_port_type(struct pci_dev *pdev) |
685 | { | 685 | { |
686 | int pos; | 686 | int pos; |
687 | u16 reg16; | 687 | u16 reg16; |
@@ -695,7 +695,7 @@ static void set_pcie_port_type(struct pci_dev *pdev) | |||
695 | pdev->pcie_type = (reg16 & PCI_EXP_FLAGS_TYPE) >> 4; | 695 | pdev->pcie_type = (reg16 & PCI_EXP_FLAGS_TYPE) >> 4; |
696 | } | 696 | } |
697 | 697 | ||
698 | static void set_pcie_hotplug_bridge(struct pci_dev *pdev) | 698 | void set_pcie_hotplug_bridge(struct pci_dev *pdev) |
699 | { | 699 | { |
700 | int pos; | 700 | int pos; |
701 | u16 reg16; | 701 | u16 reg16; |