mbox series

[GIT,PULL] PCI changes for v5.15

Message ID 20210907213943.GA822380@bjorn-Precision-5520 (mailing list archive)
State Not Applicable, archived
Delegated to: Bjorn Helgaas
Headers show
Series [GIT,PULL] PCI changes for v5.15 | expand

Pull-request

git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git tags/pci-v5.15-changes

Message

Bjorn Helgaas Sept. 7, 2021, 9:39 p.m. UTC
The following changes since commit e73f0f0ee7541171d89f2e2491130c7771ba58d3:

  Linux 5.14-rc1 (2021-07-11 15:07:40 -0700)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git tags/pci-v5.15-changes

for you to fetch changes up to 742a4c49a82a8fe1369e4ec2af4a9bf69123cb88:

  Merge branch 'remotes/lorenzo/pci/tools' (2021-09-02 14:56:52 -0500)

----------------------------------------------------------------

You should see a few conflicts:

  drivers/net/ethernet/broadcom/bnxt/bnxt.c
  drivers/net/ethernet/broadcom/bnx2.c
    Fallout from the VPD changes below.  These include both PCI core and
    driver changes, and the driver changes got merged via the net tree and
    then reverted so everything would be merged via the PCI tree.

  MAINTAINERS
    Should be trivial.

----------------------------------------------------------------

Enumeration:
  - Convert controller drivers to generic_handle_domain_irq() (Marc
    Zyngier)
  - Simplify VPD (Vital Product Data) access and search (Heiner Kallweit)
  - Update bnx2, bnx2x, bnxt, cxgb4, cxlflash, sfc, tg3 drivers to use
    simplified VPD interfaces (Heiner Kallweit)
  - Run Max Payload Size quirks before configuring MPS; work around ASMedia
    ASM1062 SATA MPS issue (Marek Behún)

Resource management:
  - Refactor pci_ioremap_bar() and pci_ioremap_wc_bar() (Krzysztof
    Wilczyński)
  - Optimize pci_resource_len() to reduce kernel size (Zhen Lei)

PCI device hotplug:
  - Fix a double unmap in ibmphp (Vishal Aslot)

PCIe port driver:
  - Enable Bandwidth Notification only if port supports it (Stuart Hayes)

Sysfs/proc/syscalls:
  - Add schedule point in proc_bus_pci_read() (Krzysztof Wilczyński)
  - Return ~0 data on pciconfig_read() CAP_SYS_ADMIN failure (Krzysztof
    Wilczyński)
  - Return "int" from pciconfig_read() syscall (Krzysztof Wilczyński)

Virtualization:
  - Extend "pci=noats" to also turn on Translation Blocking to protect
    against some DMA attacks (Alex Williamson)
  - Add sysfs mechanism to control the type of reset used between device
    assignments to VMs (Amey Narkhede)
  - Add support for ACPI _RST reset method (Shanker Donthineni)
  - Add ACS quirks for Cavium multi-function devices (George Cherian)
  - Add ACS quirks for NXP LX2xx0 and LX2xx2 platforms (Wasim Khan)
  - Allow HiSilicon AMBA devices that appear as fake PCI devices to use
    PASID and SVA (Zhangfei Gao)

Endpoint framework:
  - Add support for SR-IOV Endpoint devices (Kishon Vijay Abraham I)
  - Zero-initialize endpoint test tool parameters so we don't use random
    parameters (Shunyong Yang)

APM X-Gene PCIe controller driver:
  - Remove redundant dev_err() call in xgene_msi_probe() (ErKun Yang)

Broadcom iProc PCIe controller driver:
  - Don't fail devm_pci_alloc_host_bridge() on missing 'ranges' because
    it's optional on BCMA devices (Rob Herring)
  - Fix BCMA probe resource handling (Rob Herring)

Cadence PCIe driver:
  - Work around J7200 Link training electrical issue by increasing delays
    in LTSSM (Nadeem Athani)

Intel IXP4xx PCI controller driver:
  - Depend on ARCH_IXP4XX to avoid useless config questions (Geert
    Uytterhoeven)

Intel Keembay PCIe controller driver:
  - Add Intel Keem Bay PCIe controller (Srikanth Thokala)

Marvell Aardvark PCIe controller driver:
  - Work around config space completion handling issues (Evan Wang)
  - Increase timeout for config access completions (Pali Rohár)
  - Emulate CRS Software Visibility bit (Pali Rohár)
  - Configure resources from DT 'ranges' property to fix I/O space access
    (Pali Rohár)
  - Serialize INTx mask/unmask (Pali Rohár)

MediaTek PCIe controller driver:
  - Add MT7629 support in DT (Chuanjia Liu)
  - Fix an MSI issue (Chuanjia Liu)
  - Get syscon regmap ("mediatek,generic-pciecfg"), IRQ number ("pci_irq"),
    PCI domain ("linux,pci-domain") from DT properties if present (Chuanjia
    Liu)

Microsoft Hyper-V host bridge driver:
  - Add ARM64 support (Boqun Feng)
  - Support "Create Interrupt v3" message (Sunil Muthuswamy)

NVIDIA Tegra PCIe controller driver:
  - Use seq_puts(), move err_msg from stack to static, fix OF node leak
    (Christophe JAILLET)

NVIDIA Tegra194 PCIe driver:
  - Disable suspend when in Endpoint mode (Om Prakash Singh)
  - Fix MSI-X address programming error (Om Prakash Singh)
  - Disable interrupts during suspend to avoid spurious AER link down (Om
    Prakash Singh)

Renesas R-Car PCIe controller driver:
  - Work around hardware issue that prevents Link L1->L0 transition (Marek
    Vasut)
  - Fix runtime PM refcount leak (Dinghao Liu)

Rockchip DesignWare PCIe controller driver:
  - Add Rockchip RK356X host controller driver (Simon Xue)

TI J721E PCIe driver:
  - Add support for J7200 and AM64 (Kishon Vijay Abraham I)

Toshiba Visconti PCIe controller driver:
  - Add Toshiba Visconti PCIe host controller driver (Nobuhiro Iwamatsu)

Xilinx NWL PCIe controller driver:
  - Enable PCIe reference clock via CCF (Hyun Kwon)

Miscellaneous:
  - Convert sta2x11 from 'pci_' to 'dma_' API (Christophe JAILLET)
  - Fix pci_dev_str_match_path() alloc while atomic bug (used for kernel
    parameters that specify devices) (Dan Carpenter)
  - Remove pointless Precision Time Management warning when PTM is present
    but not enabled (Jakub Kicinski)
  - Remove surplus "break" statements (Krzysztof Wilczyński)

----------------------------------------------------------------
Alex Williamson (1):
      PCI/ACS: Enforce pci=noats with Transaction Blocking

Amey Narkhede (6):
      PCI: Cache PCIe Device Capabilities register
      PCI: Add pcie_reset_flr() with 'probe' argument
      PCI: Add array to track reset method ordering
      PCI: Remove reset_fn field from pci_dev
      PCI: Allow userspace to query and set device reset mechanism
      PCI: Change the type of probe argument in reset functions

Andy Shevchenko (1):
      PCI: Sync __pci_register_driver() stub for CONFIG_PCI=n

Arnd Bergmann (1):
      PCI: hv: Generify PCI probing

Bjorn Helgaas (35):
      PCI/VPD: Correct diagnostic for VPD read failure
      PCI/VPD: Check Resource Item Names against those valid for type
      PCI/VPD: Reject resource tags with invalid size
      PCI/VPD: Don't check Large Resource Item Names for validity
      PCI/VPD: Allow access to valid parts of VPD if some is invalid
      PCI: Make saved capability state private to core
      Merge branch 'pci/enumeration'
      Merge branch 'pci/hotplug'
      Merge branch 'pci/iommu'
      Merge branch 'pci/irq'
      Merge branch 'pci/portdrv'
      Merge branch 'pci/reset'
      Merge branch 'pci/resource'
      Merge branch 'pci/virtualization'
      Merge branch 'pci/vpd'
      Merge branch 'pci/misc'
      Merge branch 'pci/artpec6'
      Merge branch 'pci/dwc'
      Merge branch 'pci/rockchip-dwc'
      Merge branch 'pci/visconti'
      Merge branch 'remotes/lorenzo/pci/aardvark'
      Merge branch 'remotes/lorenzo/pci/cadence'
      Merge branch 'remotes/lorenzo/pci/hv'
      Merge branch 'remotes/lorenzo/pci/hyper-v'
      Merge branch 'remotes/lorenzo/pci/iproc'
      Merge branch 'remotes/lorenzo/pci/keembay'
      Merge branch 'remotes/lorenzo/pci/mediatek'
      Merge branch 'remotes/lorenzo/pci/rcar'
      Merge branch 'remotes/lorenzo/pci/tegra'
      Merge branch 'remotes/lorenzo/pci/tegra194'
      Merge branch 'remotes/lorenzo/pci/xgene'
      Merge branch 'remotes/lorenzo/pci/xilinx-nwl'
      Merge branch 'remotes/lorenzo/pci/endpoint'
      Merge branch 'remotes/lorenzo/pci/misc'
      Merge branch 'remotes/lorenzo/pci/tools'

Boqun Feng (7):
      PCI: Introduce domain_nr in pci_host_bridge
      PCI: Support populating MSI domains of root buses via bridges
      arm64: PCI: Restructure pcibios_root_bridge_prepare()
      arm64: PCI: Support root bridge preparation for Hyper-V
      PCI: hv: Set ->domain_nr of pci_host_bridge at probing time
      PCI: hv: Set up MSI domain at bridge probing time
      PCI: hv: Turn on the host bridge probing on ARM64

Christophe JAILLET (4):
      PCI: tegra: Fix OF node reference leak
      PCI: tegra: Use 'seq_puts' instead of 'seq_printf'
      PCI: tegra: make const array err_msg static
      x86/PCI: sta2x11: switch from 'pci_' to 'dma_' API

Chuanjia Liu (4):
      dt-bindings: PCI: mediatek: Update the Device tree bindings
      PCI: mediatek: Add new method to get shared pcie-cfg base address
      PCI: mediatek: Add new method to get irq number
      PCI: mediatek: Use PCI domain to handle ports detection

Dan Carpenter (1):
      PCI: Fix pci_dev_str_match_path() alloc while atomic bug

Dinghao Liu (1):
      PCI: rcar: Fix runtime PM imbalance in rcar_pcie_ep_probe()

ErKun Yang (1):
      PCI: xgene-msi: Remove redundant dev_err() call in xgene_msi_probe()

Evan Wang (1):
      PCI: aardvark: Fix checking for PIO status

Geert Uytterhoeven (1):
      PCI: controller: PCI_IXP4XX should depend on ARCH_IXP4XX

George Cherian (1):
      PCI: Add ACS quirks for Cavium multi-function devices

Heiner Kallweit (37):
      PCI/VPD: Treat initial 0xff as missing EEPROM
      PCI/VPD: Remove pci_vpd_size() old_size argument
      PCI/VPD: Make pci_vpd_wait() uninterruptible
      PCI/VPD: Remove struct pci_vpd.flag
      PCI/VPD: Reorder pci_read_vpd(), pci_write_vpd()
      PCI/VPD: Remove struct pci_vpd_ops
      PCI/VPD: Remove struct pci_vpd.valid member
      PCI/VPD: Embed struct pci_vpd in struct pci_dev
      PCI/VPD: Determine VPD size in pci_vpd_init()
      PCI/VPD: Treat invalid VPD like missing VPD capability
      PCI/VPD: Add pci_vpd_alloc()
      PCI/VPD: Add pci_vpd_find_ro_info_keyword()
      PCI/VPD: Add pci_vpd_check_csum()
      sfc: Read VPD with pci_vpd_alloc()
      sfc: Search VPD with pci_vpd_find_ro_info_keyword()
      tg3: Read VPD with pci_vpd_alloc()
      tg3: Validate VPD checksum with pci_vpd_check_csum()
      tg3: Search VPD with pci_vpd_find_ro_info_keyword()
      sfc: falcon: Read VPD with pci_vpd_alloc()
      sfc: falcon: Search VPD with pci_vpd_find_ro_info_keyword()
      bnx2: Search VPD with pci_vpd_find_ro_info_keyword()
      bnx2: Replace open-coded byte swapping with swab32s()
      bnx2x: Read VPD with pci_vpd_alloc()
      bnx2x: Search VPD with pci_vpd_find_ro_info_keyword()
      bnxt: Read VPD with pci_vpd_alloc()
      bnxt: Search VPD with pci_vpd_find_ro_info_keyword()
      cxgb4: Validate VPD checksum with pci_vpd_check_csum()
      cxgb4: Remove unused vpd_param member ec
      cxgb4: Search VPD with pci_vpd_find_ro_info_keyword()
      scsi: cxlflash: Search VPD with pci_vpd_find_ro_info_keyword()
      PCI/VPD: Stop exporting pci_vpd_find_tag()
      PCI/VPD: Stop exporting pci_vpd_find_info_keyword()
      PCI/VPD: Include post-processing in pci_vpd_find_tag()
      PCI/VPD: Add pci_vpd_find_id_string()
      cxgb4: Use pci_vpd_find_id_string() to find VPD ID string
      PCI/VPD: Clean up public VPD defines and inline functions
      PCI/VPD: Use unaligned access helpers

Hyun Kwon (1):
      PCI: xilinx-nwl: Enable the clock through CCF

Jakub Kicinski (1):
      PCI/PTM: Remove error message at boot

Jonathan Cameron (1):
      PCI: Correct the pci_iomap.h header guard #endif comment

Kishon Vijay Abraham I (12):
      dt-bindings: PCI: pci-ep: Add binding to specify virtual function
      PCI: endpoint: Add support to add virtual function in endpoint core
      PCI: endpoint: Add support to link a physical function to a virtual function
      PCI: endpoint: Add virtual function number in pci_epc ops
      PCI: cadence: Simplify code to get register base address for configuring BAR
      PCI: cadence: Add support to configure virtual functions
      misc: pci_endpoint_test: Populate sriov_configure ops to configure SR-IOV device
      Documentation: PCI: endpoint/pci-endpoint-cfs: Guide to use SR-IOV
      PCI: cadence: Use bitfield for *quirk_retrain_flag* instead of bool
      PCI: j721e: Add PCIe support for J7200
      PCI: j721e: Add PCIe support for AM64
      misc: pci_endpoint_test: Add deviceID for AM64 and J7200

Krzysztof Wilczyński (9):
      PCI: Refactor pci_ioremap_bar() and pci_ioremap_wc_bar()
      PCI: tegra: Remove unused struct tegra_pcie_bus
      PCI: Return ~0 data on pciconfig_read() CAP_SYS_ADMIN failure
      PCI: Return int from pciconfig_read() syscall
      x86/PCI: Add pci_numachip_init() declaration
      PCI: Add schedule point in proc_bus_pci_read()
      PCI: artpec6: Remove surplus break statement after return
      PCI: artpec6: Remove local code block from switch statement
      PCI: dwc: Remove surplus break statement after return

Marc Zyngier (1):
      PCI: Bulk conversion to generic_handle_domain_irq()

Marek Behún (2):
      PCI: Call Max Payload Size-related fixup quirks early
      PCI: Restrict ASMedia ASM1062 SATA Max Payload Size Supported

Marek Vasut (1):
      PCI: rcar: Add L1 link state fix into data abort hook

Michal Simek (1):
      dt-bindings: pci: xilinx-nwl: Document optional clock property

Nadeem Athani (1):
      PCI: cadence: Add quirk flag to set minimum delay in LTSSM Detect.Quiet state

Nobuhiro Iwamatsu (2):
      PCI: visconti: Add Toshiba Visconti PCIe host controller driver
      MAINTAINERS: Add entries for Toshiba Visconti PCIe controller

Om Prakash Singh (5):
      PCI: tegra194: Fix handling BME_CHGED event
      PCI: tegra194: Fix MSI-X programming
      PCI: tegra194: Disable interrupts before entering L2
      PCI: tegra194: Don't allow suspend when Tegra PCIe is in EP mode
      PCI: tegra194: Cleanup unused code

Pali Rohár (5):
      PCI: aardvark: Increase polling delay to 1.5s while waiting for PIO response
      PCI: pci-bridge-emul: Add PCIe Root Capabilities Register
      PCI: aardvark: Fix reporting CRS value
      PCI: aardvark: Configure PCIe resources from 'ranges' DT property
      PCI: aardvark: Fix masking and unmasking legacy INTx interrupts

Rob Herring (2):
      PCI: of: Don't fail devm_pci_alloc_host_bridge() on missing 'ranges'
      PCI: iproc: Fix BCMA probe resource handling

Shanker Donthineni (4):
      PCI: Add pci_set_acpi_fwnode() to set ACPI_COMPANION
      PCI: Use acpi_pci_power_manageable()
      PCI: Setup ACPI fwnode early and at the same time with OF
      PCI: Add support for ACPI _RST reset method

Shunyong Yang (1):
      tools: PCI: Zero-initialize param

Simon Xue (1):
      PCI: rockchip-dwc: Add Rockchip RK356X host controller driver

Srikanth Thokala (2):
      dt-bindings: PCI: Add Intel Keem Bay PCIe controller
      PCI: keembay: Add support for Intel Keem Bay

Stuart Hayes (1):
      PCI/portdrv: Enable Bandwidth Notification only if port supports it

Sunil Muthuswamy (1):
      PCI: hv: Support for create interrupt v3

Vishal Aslot (1):
      PCI: ibmphp: Fix double unmap of io_mem

Wasim Khan (1):
      PCI: Add ACS quirks for NXP LX2xx0 and LX2xx2 platforms

Zhangfei Gao (2):
      PCI: Allow PASID on fake PCIe devices without TLP prefixes
      PCI: Set dma-can-stall for HiSilicon chips

Zhen Lei (1):
      PCI: Optimize pci_resource_len() to reduce kernel size

 Documentation/ABI/testing/sysfs-bus-pci            |  17 +
 Documentation/PCI/endpoint/pci-endpoint-cfs.rst    |  12 +-
 .../bindings/pci/intel,keembay-pcie-ep.yaml        |  69 +++
 .../bindings/pci/intel,keembay-pcie.yaml           |  97 ++++
 .../devicetree/bindings/pci/mediatek-pcie-cfg.yaml |  39 ++
 .../devicetree/bindings/pci/mediatek-pcie.txt      | 208 +++++----
 Documentation/devicetree/bindings/pci/pci-ep.yaml  |   7 +
 .../devicetree/bindings/pci/xilinx-nwl-pcie.txt    |   1 +
 MAINTAINERS                                        |   9 +
 arch/arm64/kernel/pci.c                            |  31 +-
 arch/x86/pci/numachip.c                            |   1 +
 arch/x86/pci/sta2x11-fixup.c                       |   3 +-
 drivers/crypto/cavium/nitrox/nitrox_main.c         |   4 +-
 drivers/misc/pci_endpoint_test.c                   |   9 +
 drivers/net/ethernet/broadcom/bnx2.c               |  46 +-
 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h        |   1 -
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c   |  89 +---
 drivers/net/ethernet/broadcom/bnxt/bnxt.c          |  49 +-
 drivers/net/ethernet/broadcom/tg3.c                | 115 ++---
 drivers/net/ethernet/broadcom/tg3.h                |   1 -
 drivers/net/ethernet/cavium/liquidio/lio_vf_main.c |   2 +-
 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h         |   2 -
 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c         |  85 ++--
 drivers/net/ethernet/sfc/efx.c                     |  82 +---
 drivers/net/ethernet/sfc/falcon/efx.c              |  83 +---
 drivers/pci/ats.c                                  |   2 +-
 drivers/pci/controller/Kconfig                     |   1 +
 drivers/pci/controller/cadence/pci-j721e.c         |  61 ++-
 drivers/pci/controller/cadence/pcie-cadence-ep.c   | 200 ++++++---
 drivers/pci/controller/cadence/pcie-cadence-host.c |   3 +
 drivers/pci/controller/cadence/pcie-cadence.c      |  16 +
 drivers/pci/controller/cadence/pcie-cadence.h      |  29 +-
 drivers/pci/controller/dwc/Kconfig                 |  48 ++
 drivers/pci/controller/dwc/Makefile                |   3 +
 drivers/pci/controller/dwc/pci-dra7xx.c            |  16 +-
 drivers/pci/controller/dwc/pci-keystone.c          |  14 +-
 drivers/pci/controller/dwc/pcie-artpec6.c          |   7 +-
 drivers/pci/controller/dwc/pcie-designware-ep.c    |  36 +-
 drivers/pci/controller/dwc/pcie-designware-host.c  |   9 +-
 drivers/pci/controller/dwc/pcie-designware-plat.c  |   1 -
 drivers/pci/controller/dwc/pcie-dw-rockchip.c      | 279 ++++++++++++
 drivers/pci/controller/dwc/pcie-keembay.c          | 460 +++++++++++++++++++
 drivers/pci/controller/dwc/pcie-tegra194.c         |  54 ++-
 drivers/pci/controller/dwc/pcie-uniphier.c         |   8 +-
 drivers/pci/controller/dwc/pcie-visconti.c         | 332 ++++++++++++++
 .../pci/controller/mobiveil/pcie-mobiveil-host.c   |  15 +-
 drivers/pci/controller/pci-aardvark.c              | 334 +++++++++++++-
 drivers/pci/controller/pci-ftpci100.c              |   2 +-
 drivers/pci/controller/pci-hyperv.c                | 153 +++++--
 drivers/pci/controller/pci-tegra.c                 |  38 +-
 drivers/pci/controller/pci-xgene-msi.c             |  10 +-
 drivers/pci/controller/pcie-altera-msi.c           |  10 +-
 drivers/pci/controller/pcie-altera.c               |  10 +-
 drivers/pci/controller/pcie-brcmstb.c              |   9 +-
 drivers/pci/controller/pcie-iproc-bcma.c           |  18 +-
 drivers/pci/controller/pcie-iproc-msi.c            |   4 +-
 drivers/pci/controller/pcie-mediatek-gen3.c        |  13 +-
 drivers/pci/controller/pcie-mediatek.c             |  64 ++-
 drivers/pci/controller/pcie-microchip-host.c       |  18 +-
 drivers/pci/controller/pcie-rcar-ep.c              |  23 +-
 drivers/pci/controller/pcie-rcar-host.c            |  94 +++-
 drivers/pci/controller/pcie-rcar.h                 |   7 +
 drivers/pci/controller/pcie-rockchip-ep.c          |  18 +-
 drivers/pci/controller/pcie-rockchip-host.c        |   8 +-
 drivers/pci/controller/pcie-xilinx-cpm.c           |   4 +-
 drivers/pci/controller/pcie-xilinx-nwl.c           |  25 +-
 drivers/pci/controller/pcie-xilinx.c               |   9 +-
 drivers/pci/endpoint/functions/pci-epf-ntb.c       |  89 ++--
 drivers/pci/endpoint/functions/pci-epf-test.c      |  74 +--
 drivers/pci/endpoint/pci-ep-cfs.c                  |  24 +
 drivers/pci/endpoint/pci-epc-core.c                | 134 ++++--
 drivers/pci/endpoint/pci-epf-core.c                | 146 +++++-
 drivers/pci/hotplug/TODO                           |   3 -
 drivers/pci/hotplug/ibmphp_ebda.c                  |   5 +-
 drivers/pci/hotplug/pciehp.h                       |   2 +-
 drivers/pci/hotplug/pciehp_hpc.c                   |   2 +-
 drivers/pci/hotplug/pnv_php.c                      |   2 +-
 drivers/pci/of.c                                   |   2 +-
 drivers/pci/pci-acpi.c                             |  85 ++--
 drivers/pci/pci-bridge-emul.h                      |   2 +-
 drivers/pci/pci-sysfs.c                            |   3 +-
 drivers/pci/pci.c                                  | 331 ++++++++++----
 drivers/pci/pci.h                                  |  47 +-
 drivers/pci/pcie/aer.c                             |  12 +-
 drivers/pci/pcie/portdrv_core.c                    |   9 +-
 drivers/pci/pcie/ptm.c                             |   4 +-
 drivers/pci/probe.c                                |  29 +-
 drivers/pci/proc.c                                 |   1 +
 drivers/pci/quirks.c                               | 128 +++++-
 drivers/pci/remove.c                               |   1 -
 drivers/pci/syscall.c                              |   7 +-
 drivers/pci/vpd.c                                  | 500 +++++++++++----------
 drivers/scsi/cxlflash/main.c                       |  34 +-
 include/asm-generic/pci_iomap.h                    |   2 +-
 include/linux/pci-epc.h                            |  57 +--
 include/linux/pci-epf.h                            |  16 +-
 include/linux/pci.h                                | 165 +++----
 include/linux/pci_hotplug.h                        |   2 +-
 include/linux/pci_ids.h                            |   3 +-
 tools/pci/pcitest.c                                |   2 +-
 100 files changed, 3878 insertions(+), 1572 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/pci/intel,keembay-pcie-ep.yaml
 create mode 100644 Documentation/devicetree/bindings/pci/intel,keembay-pcie.yaml
 create mode 100644 Documentation/devicetree/bindings/pci/mediatek-pcie-cfg.yaml
 create mode 100644 drivers/pci/controller/dwc/pcie-dw-rockchip.c
 create mode 100644 drivers/pci/controller/dwc/pcie-keembay.c
 create mode 100644 drivers/pci/controller/dwc/pcie-visconti.c

Comments

Linus Torvalds Sept. 8, 2021, 2:08 a.m. UTC | #1
On Tue, Sep 7, 2021 at 2:39 PM Bjorn Helgaas <helgaas@kernel.org> wrote:
>
>   drivers/net/ethernet/broadcom/bnxt/bnxt.c
>   drivers/net/ethernet/broadcom/bnx2.c
>     Fallout from the VPD changes below.  These include both PCI core and
>     driver changes, and the driver changes got merged via the net tree and
>     then reverted so everything would be merged via the PCI tree.

Christ.

So the revert from the networking tree has basically _zero_ useful
information. It just says "revert".

David, that's not ok. The natural reaction to this situation is

  "ok, this commit was done both in the networking tree and the PCI
tree, but then the networking tree reverted it. So there must be
something wrong with it, and I should take the reverted state"

but Bjorn's comment implies that it was reverted in order to _avoid_
merge conflicts since it was also done in the PCI tree, which is pure
and utter garbage, because I end up with the merge conflict *ANYWAY*
due to the other changes, and now instead of going "ok, the PCI tree
had that same commit, all good", I have to go "ok, so the PCI tree had
the same commit, but it was reverted in the networking tree, so now I
have both sides making different changes and a very confusing merge".

Here's the thing. There's a couple of very simple and basic rules:

 (a) don't do stupid things. In particular, don't try to make my
merges easier by adding MORE crap on top of the known merge problem.

     This is not that different from "don't rebase merge conflicts
away". You're making things worse.

 (b) INDEPENDENTLY of that "don't do stupid things", the #1 rules for
_any_ commit is to give the damn reason for the commit.

     You can't just say "revert X" in a commit message. That's not a
reason. That doesn't explain ANYTHING at all.

So now I have to basically guess at what is going on.

Yes, yes, I can make fairly informed guesses from looking more
carefully at the code, looking at the *other* commit messages, and
doing something sensible. So my guesses aren't going to be about
tossing a coin. But please don't do these kinds of things!

Don't make my life "easier" by doing stupid things, and DO put a
reason for every single commit you do. Reverts aren't "oh, I'm just
turning back the clock, so no reason to say anything else".

          Linus
pr-tracker-bot@kernel.org Sept. 8, 2021, 2:25 a.m. UTC | #2
The pull request you sent on Tue, 7 Sep 2021 16:39:43 -0500:

> git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git tags/pci-v5.15-changes

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/ac08b1c68d1b1ed3cebb218fc3ea2c07484eb07d

Thank you!
Bjorn Helgaas Sept. 8, 2021, 2:26 a.m. UTC | #3
On Tue, Sep 07, 2021 at 07:08:42PM -0700, Linus Torvalds wrote:
> On Tue, Sep 7, 2021 at 2:39 PM Bjorn Helgaas <helgaas@kernel.org> wrote:
> >
> >   drivers/net/ethernet/broadcom/bnxt/bnxt.c
> >   drivers/net/ethernet/broadcom/bnx2.c
> >     Fallout from the VPD changes below.  These include both PCI core and
> >     driver changes, and the driver changes got merged via the net tree and
> >     then reverted so everything would be merged via the PCI tree.
> 
> Christ.
> 
> So the revert from the networking tree has basically _zero_ useful
> information. It just says "revert".

Sorry about that.  I intended to push my test merge in case you wanted
to see my resolution, but I forgot.  I just pushed it ("v5.15-merge"),
but I'm guessing you've already come up with the same resolution.

I was a little mystified about why there was a conflict at all, since
I expected those patches to apply cleanly on top of the revert, and I
should have investigated that more instead of just chalking it up to
my lack of git-fu.

Bjorn
Linus Torvalds Sept. 8, 2021, 2:52 a.m. UTC | #4
On Tue, Sep 7, 2021 at 7:26 PM Bjorn Helgaas <helgaas@kernel.org> wrote:
>
> I was a little mystified about why there was a conflict at all, since
> I expected those patches to apply cleanly on top of the revert, and I
> should have investigated that more instead of just chalking it up to
> my lack of git-fu.

It's because that wasn't the only change to that function.

So for example, the networking tree had that "bnx2: Search VPD with
pci_vpd_find_ro_info_keyword()" commit, and then reverted it.

Fine - that's a no-op, right? So then the fact that the PCI tree had
that change - and other changes - should just merge cleanly.

Except the networking tree *also* had "bnx2: Replace open-coded
version with swab32s()", and that wasn't reverted.

End result: the networkling tree and the PCI tree touched the exact
same code, and did it differently.  So - conflict.

And the bnxt.c case is similar, except there the networking tree _did_
revert the "other" commit too, but it seems to have actively done
something else as well. See how the networking tree actually has that
"This reverts commit 58a9b5d2621e725526a63847ae77b3a4c2c2bf93"
_twice_, because it did it wrong.

Anyway, because of that "revert twice", my tree actually had (before
your pull) that

        i = pci_vpd_find_tag(vpd_data, vpd_size, PCI_VPD_LRDT_RO_DATA);
        if (i < 0) {
                netdev_err(bp->dev, "VPD READ-Only not found\n");
                goto exit;
        }

code duplicated twice, so now the conflict was due to that.

And the thing is, the revert for some merge reason is always the wrong
thing to do, but it's doubly wrong when it's done badly.

I'd *much* rather see a few more conflicts, and then go "oh, tree X
and Y both did Z, but Y also did ABC". That's a very straightforward
conflict, and I can go "I'll take the Y side" because it's clearly and
unambiguously the "superset" of the changes.

The revert actually made things harder. Now neither branch had a
superset of changes, and the networking side in particular looked like
the original change had actually been in error, and should be reverted
entirely (and the PCI side had just missed the problem). See? It
actually technically looked like the networking tree did more, and
knew more.

A revert is additional work, and by default I assume that a revert was
done for a sane reason (ie "that commit was broken, so I'll revert
it").

In this case I had to take the hint from your pull request that it
wasn't that the commit was broken and thus reverted.

So the networking tree did two really horribly bad things: doing extra
work for a bad reason, and then not even *documenting* that bad
reason. Either of them is bad on its own. Together, they are really
really bad.

Anyway. I obviously _think_ my merge is all good (and it wasn't really
a complicated merge despite the annoyance), but considering the
confusion, it's always a good idea to double-check.

Because mistakes do happen. I'm pretty good at merges these days, but
they most definitely happen to me too.

            Linus