1. 08 Oct, 2014 15 commits
  2. 07 Oct, 2014 5 commits
  3. 03 Oct, 2014 6 commits
  4. 02 Oct, 2014 8 commits
  5. 01 Oct, 2014 1 commit
  6. 30 Sep, 2014 5 commits
    • Gavin Shan's avatar
      powerpc/powernv: Override dma_get_required_mask() · fe7e85c6
      Gavin Shan authored
      The dma_get_required_mask() function is used by some drivers to
      query the platform about what DMA mask is needed to cover all of
      memory. This is a bit of a strange semantic when we have to choose
      between IOMMU translation or bypass, but essentially what it means
      is "what DMA mask will give best performances".
      
      Currently, our IOMMU backend always returns a 32-bit mask here, we
      don't do anything special to it when we have bypass available. This
      causes some drivers to choose a 32-bit mask, thus losing the ability
      to use the bypass window, thinking this is more efficient. The problem
      was reported from the driver of following device:
      
      0004:03:00.0 0107: 1000:0087 (rev 05)
      0004:03:00.0 Serial Attached SCSI controller: LSI Logic / Symbios \
                   Logic SAS2308 PCI-Express Fusion-MPT SAS-2 (rev 05)
      
      This patch adds an override of that function in order to, instead,
      return a 64-bit mask whenever a bypass window is available in order
      for drivers to prefer this configuration.
      Reported-by: default avatarMurali N. Iyer <mniyer@us.ibm.com>
      Suggested-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: default avatarGavin Shan <gwshan@linux.vnet.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      fe7e85c6
    • Gavin Shan's avatar
      powerpc/powernv: Fetch frozen PE on top level · 372fb80d
      Gavin Shan authored
      It should have been part of commit 1ad7a72c ("powerpc/eeh: Report
      frozen parent PE prior to child PE"). There are 2 ways to report
      EEH errors: proactively polling because of 0xFF's returned from
      PCI config or IO read, or interrupt driven event. We missed to
      report and handle parent frozen PE prior to child frozen PE for
      the later case on PowerNV platform.
      Signed-off-by: default avatarGavin Shan <gwshan@linux.vnet.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      372fb80d
    • Gavin Shan's avatar
      powerpc/eeh: Dump PCI config space for all child devices · f2e0be5e
      Gavin Shan authored
      The PEs can be organized as nested. Current implementation doesn't
      dump PCI config space for subordinate devices of child PEs. However,
      the frozen PE could be caused by those subordinate devices of its
      child PEs.
      
      The patch dumps PCI config space for all subordinate devices of the
      problematic PE.
      Signed-off-by: default avatarGavin Shan <gwshan@linux.vnet.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      f2e0be5e
    • Gavin Shan's avatar
      powerpc/eeh: Emulate EEH recovery for VFIO devices · 5cfb20b9
      Gavin Shan authored
      When enabling EEH functionality on passed through devices (PE)
      with VFIO, the devices in the PE would be removed permanently
      from guest side. In that case, the PE remains frozen state.
      When returning PE to host, or restarting the guest again, we
      had mechanism unfreezing the PE by clearing PESTA/B frozen
      bits. However, that's not enough for some adapters, which are
      indicated as following "lspci" shows. Those adapters require
      hot reset on the parent bus to bring their firmware back to
      workable state. Otherwise, those adaptrs won't be operative
      and the host (for returning case) or the guest will fail to
      load the drivers for those adapters without exception.
      
      0000:01:00.0 Ethernet controller: Emulex Corporation OneConnect \
                   10Gb NIC (be3) (rev 02)
      0000:01:00.0 0200: 19a2:0710 (rev 02)
      0001:03:00.0 Ethernet controller: Emulex Corporation OneConnect \
                   NIC (Lancer) (rev 10)
      0001:03:00.0 0200: 10df:e220 (rev 10)
      
      The patch adds mechanism to emulate EEH recovery (for hot reset
      on parent PCI bus) on 3 gates to fix the issue: open/release one
      adapter of the PE, enable EEH functionality on one adapter of the
      PE.
      Reported-by: default avatarMurilo Fossa Vicentini <muvic@br.ibm.com>
      Signed-off-by: default avatarGavin Shan <gwshan@linux.vnet.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      5cfb20b9
    • Gavin Shan's avatar
      powerpc/eeh: Tag reset state for user owned PE · 93e8b36d
      Gavin Shan authored
      PE would be owned by userland, which probably request PE reset
      done in host side. During the reset, we should drop the PCI
      config accesses to the PE with help of flag EEH_PE_RESET.
      Signed-off-by: default avatarGavin Shan <gwshan@linux.vnet.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      93e8b36d