mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 01:04:41 +01:00
pci-v7.0-fixes-2
-----BEGIN PGP SIGNATURE----- iQJIBAABCgAyFiEEgMe7l+5h9hnxdsnuWYigwDrT+vwFAmmh9ZEUHGJoZWxnYWFz QGdvb2dsZS5jb20ACgkQWYigwDrT+vzh5RAAnapJg4KrABnDmsxyk2wFi0KTP1pA O0OUkdaAfpFsreGG9nUpRrrkG8QvMLB8sxoJ0PlFdL4kljp8gN56dTXhhSZuT9UA FZtoJgZWV+kjw8fk9vxnqc/yOzD8knXbF9AILTKRUDCUiEmWsVjcvEq5sDV7hpx/ DRuLtbWH8cY5vKXl7DS1HpORal73X3yCMZ1kRofJ+8CYOWdNotJp3jDss9M61bIw inhDy2iOR6UuxAjfRujT2B/sDWzdZ9jTENahb5PB66lWxbSfHXfnItlhcXUu/ojK ap2oIf/ResUjbtlQZQ2BYtouNilwI9hB23PdyYX/rDcCsvoUeJrYhMIam3G1zfYC xDg7jI7JEctB7hndC/yDE6iN9BJaY+nWrK7dCkL1zstawagT3CLcWq/j3XvYuLSo t1Bp1tTuYW8WFoeSHkPuazpVgm+sM5hHP08TNY/ErZ3nIlEajsQH4/yW+8WTtaYv uUuW+W6ATMVe/K38qBpAqkbAjaQ5m0zFSEsTjQyhssU+Atpqd/pJtmC8FoWZZ4DL uR+o1QT94RFJFiB91m1tbH7n2ReYIl1VvW5z27d4WVCZE1PkBnQo3EU4uUvzGmHK 1qLOGZiq4LEEG0E3KdeoZh6tqmjPsNk/ZJf/wcb02RkrvscpEymMvuvBLQk07U28 nHTEYfryFYzIq1w= =8d7b -----END PGP SIGNATURE----- Merge tag 'pci-v7.0-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci Pull pci fixes from Bjorn Helgaas: - Update MAINTAINERS email address (Shawn Guo) - Refresh cached Endpoint driver MSI Message Address to fix a v7.0 regression when kernel changes the address after firmware has configured it (Niklas Cassel) - Flush Endpoint MSI-X writes so they complete before the outbound ATU entry is unmapped (Niklas Cassel) - Correct the PCI_CAP_EXP_ENDPOINT_SIZEOF_V2 value, which broke VMM use of PCI capabilities (Bjorn Helgaas) * tag 'pci-v7.0-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci: PCI: Correct PCI_CAP_EXP_ENDPOINT_SIZEOF_V2 value PCI: dwc: ep: Flush MSI-X write before unmapping its ATU entry PCI: dwc: ep: Refresh MSI Message Address cache on change MAINTAINERS: Update Shawn Guo's address for HiSilicon PCIe controller driver
This commit is contained in:
commit
1c63df24be
3 changed files with 18 additions and 11 deletions
|
|
@ -20507,7 +20507,7 @@ F: Documentation/devicetree/bindings/pci/hisilicon,kirin-pcie.yaml
|
|||
F: drivers/pci/controller/dwc/pcie-kirin.c
|
||||
|
||||
PCIE DRIVER FOR HISILICON STB
|
||||
M: Shawn Guo <shawn.guo@linaro.org>
|
||||
M: Shawn Guo <shawnguo@kernel.org>
|
||||
L: linux-pci@vger.kernel.org
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/pci/hisilicon-histb-pcie.txt
|
||||
|
|
|
|||
|
|
@ -905,6 +905,19 @@ int dw_pcie_ep_raise_msi_irq(struct dw_pcie_ep *ep, u8 func_no,
|
|||
* supported, so we avoid reprogramming the region on every MSI,
|
||||
* specifically unmapping immediately after writel().
|
||||
*/
|
||||
if (ep->msi_iatu_mapped && (ep->msi_msg_addr != msg_addr ||
|
||||
ep->msi_map_size != map_size)) {
|
||||
/*
|
||||
* The host changed the MSI target address or the required
|
||||
* mapping size changed. Reprogramming the iATU when there are
|
||||
* operations in flight is unsafe on this controller. However,
|
||||
* there is no unified way to check if we have operations in
|
||||
* flight, thus we don't know if we should WARN() or not.
|
||||
*/
|
||||
dw_pcie_ep_unmap_addr(epc, func_no, 0, ep->msi_mem_phys);
|
||||
ep->msi_iatu_mapped = false;
|
||||
}
|
||||
|
||||
if (!ep->msi_iatu_mapped) {
|
||||
ret = dw_pcie_ep_map_addr(epc, func_no, 0,
|
||||
ep->msi_mem_phys, msg_addr,
|
||||
|
|
@ -915,15 +928,6 @@ int dw_pcie_ep_raise_msi_irq(struct dw_pcie_ep *ep, u8 func_no,
|
|||
ep->msi_iatu_mapped = true;
|
||||
ep->msi_msg_addr = msg_addr;
|
||||
ep->msi_map_size = map_size;
|
||||
} else if (WARN_ON_ONCE(ep->msi_msg_addr != msg_addr ||
|
||||
ep->msi_map_size != map_size)) {
|
||||
/*
|
||||
* The host changed the MSI target address or the required
|
||||
* mapping size changed. Reprogramming the iATU at runtime is
|
||||
* unsafe on this controller, so bail out instead of trying to
|
||||
* update the existing region.
|
||||
*/
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
writel(msg_data | (interrupt_num - 1), ep->msi_mem + offset);
|
||||
|
|
@ -1010,6 +1014,9 @@ int dw_pcie_ep_raise_msix_irq(struct dw_pcie_ep *ep, u8 func_no,
|
|||
|
||||
writel(msg_data, ep->msi_mem + offset);
|
||||
|
||||
/* flush posted write before unmap */
|
||||
readl(ep->msi_mem + offset);
|
||||
|
||||
dw_pcie_ep_unmap_addr(epc, func_no, 0, ep->msi_mem_phys);
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -712,7 +712,7 @@
|
|||
#define PCI_EXP_LNKCTL2_HASD 0x0020 /* HW Autonomous Speed Disable */
|
||||
#define PCI_EXP_LNKSTA2 0x32 /* Link Status 2 */
|
||||
#define PCI_EXP_LNKSTA2_FLIT 0x0400 /* Flit Mode Status */
|
||||
#define PCI_CAP_EXP_ENDPOINT_SIZEOF_V2 0x32 /* end of v2 EPs w/ link */
|
||||
#define PCI_CAP_EXP_ENDPOINT_SIZEOF_V2 0x34 /* end of v2 EPs w/ link */
|
||||
#define PCI_EXP_SLTCAP2 0x34 /* Slot Capabilities 2 */
|
||||
#define PCI_EXP_SLTCAP2_IBPD 0x00000001 /* In-band PD Disable Supported */
|
||||
#define PCI_EXP_SLTCTL2 0x38 /* Slot Control 2 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue