1. 18 12月, 2013 3 次提交
  2. 15 11月, 2013 1 次提交
  3. 08 11月, 2013 1 次提交
  4. 06 11月, 2013 2 次提交
    • B
      PCI: Drop warning about drivers that don't use pci_set_master() · fbeeb822
      Bjorn Helgaas 提交于
      f41f064c ("PCI: Workaround missing pci_set_master in pci drivers") made
      pci_enable_bridge() turn on bus mastering if the driver hadn't done so
      already.  It also added a warning in this case.  But there's no reason to
      warn about it unless it's actually a problem to enable bus mastering here.
      
      This patch drops the warning because I'm not aware of any such problem.
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      CC: Paul Bolle <pebolle@tiscali.nl>
      fbeeb822
    • Y
      PCI: Workaround missing pci_set_master in pci drivers · cf3e1feb
      Yinghai Lu 提交于
      Ben Herrenschmidt found that commit 928bea96 ("PCI: Delay enabling
      bridges until they're needed") breaks PCI in some powerpc environments.
      
      The reason is that the PCIe port driver will call pci_enable_device() on
      the bridge, so the device is enabled, but skips pci_set_master because
      pcie_port_auto and no acpi on powerpc.
      
      Because of that, pci_enable_bridge() later on (called as a result of the
      child device driver doing pci_enable_device) will see the bridge as
      already enabled and will not call pci_set_master() on it.
      
      Fixed by add checking in pci_enable_bridge, and call pci_set_master
      if driver skip that.
      
      That will make the code more robot and wade off problem for missing
      pci_set_master in drivers.
      Reported-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      cf3e1feb
  5. 30 10月, 2013 1 次提交
  6. 29 9月, 2013 1 次提交
    • Y
      PCI: Workaround missing pci_set_master in pci drivers · f41f064c
      Yinghai Lu 提交于
      Ben Herrenschmidt found that commit 928bea96 ("PCI: Delay enabling
      bridges until they're needed") breaks PCI in some powerpc environments.
      
      The reason is that the PCIe port driver will call pci_enable_device() on
      the bridge, so the device is enabled, but skips pci_set_master because
      pcie_port_auto and no acpi on powerpc.
      
      Because of that, pci_enable_bridge() later on (called as a result of the
      child device driver doing pci_enable_device) will see the bridge as
      already enabled and will not call pci_set_master() on it.
      
      Fixed by add checking in pci_enable_bridge, and call pci_set_master
      if driver skip that.
      
      That will make the code more robot and wade off problem for missing
      pci_set_master in drivers.
      Reported-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f41f064c
  7. 26 9月, 2013 1 次提交
  8. 25 9月, 2013 1 次提交
  9. 28 8月, 2013 1 次提交
  10. 23 8月, 2013 2 次提交
  11. 16 8月, 2013 1 次提交
  12. 15 8月, 2013 5 次提交
    • A
      PCI: Tune secondary bus reset timing · de0c548c
      Alex Williamson 提交于
      The PCI spec indicates that with stable power, reset needs to be
      asserted for a minimum of 1ms (Trst).  We should be able to assume
      stable power for a Hot Reset, but we add another millisecond as
      a fudge factor to make sure the reset is seen on the bus for at least
      a full 1ms.
      
      After reset is de-asserted we must wait for devices to complete
      initialization.  The specs refer to this as "recovery time" (Trhfa).
      For PCI this is 2^25 clock cycles or 2^26 for PCI-X.  For minimum
      bus speeds, both of those come to 1s.  PCIe "softens" this
      requirement with the Configuration Request Retry Status (CRS)
      completion status.  Theoretically we could use CRS to shorten the
      wait time.  We don't make use of that here, using a fixed 1s delay
      to allow devices to re-initialize.
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      de0c548c
    • A
      PCI: Wake-up devices before saving config space for reset · a6cbaade
      Alex Williamson 提交于
      Devices come out of reset in D0.  Restoring a device to a different
      post-reset state takes more smarts than our simple config space
      restore, which can leave devices in an inconsistent state.  For
      example, if a device is reset in D3, but the restore doesn't
      successfully return the device to D3, then the actual state of the
      device and dev->current_state are contradictory.  Put everything
      in D0 going into the reset, then we don't need to do anything
      special on the way out.
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      a6cbaade
    • A
      PCI: Add pci_reset_slot() and pci_reset_bus() · 090a3c53
      Alex Williamson 提交于
      Sometimes pci_reset_function() is not sufficient.  We have cases where
      devices do not support any kind of reset, but there might be multiple
      functions on the bus preventing pci_reset_function() from doing a
      secondary bus reset.  We also have cases where a device will advertise
      that it supports a PM reset, but really does nothing on D3hot->D0
      (graphics cards are notorious for this).  These devices often also
      have more than one function, so even blacklisting PM reset for them
      wouldn't allow a secondary bus reset through pci_reset_function().
      
      If a driver supports multiple devices it should have the ability to
      induce a bus reset when it needs to.  This patch provides that ability
      through pci_reset_slot() and pci_reset_bus().  It's the caller's
      responsibility when using these interfaces to understand that all of
      the devices in or below the slot (or on or below the bus) will be
      reset and therefore should be under control of the caller.  PCI state
      of all the affected devices is saved and restored around these resets,
      but internal state of all of the affected devices is reset (which
      should be the intention).
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      090a3c53
    • A
      PCI: Split out pci_dev lock/unlock and save/restore · 77cb985a
      Alex Williamson 提交于
      Only cosmetic code changes to existing paths.  Expand the comment in
      the new pci_dev_save_and_disable() function since there's a lot
      hidden in that Command register write.
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      77cb985a
    • A
      PCI: Add slot reset option to pci_dev_reset() · 608c3881
      Alex Williamson 提交于
      If the hotplug controller provides a way to reset a slot, use that
      before a direct parent bus reset.  Like the bus reset option, this is
      only available when a single pci_dev occupies the slot.
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      608c3881
  13. 13 8月, 2013 1 次提交
  14. 10 8月, 2013 1 次提交
  15. 02 8月, 2013 1 次提交
  16. 31 7月, 2013 1 次提交
  17. 26 7月, 2013 3 次提交
  18. 27 6月, 2013 1 次提交
  19. 19 6月, 2013 1 次提交
  20. 05 6月, 2013 1 次提交
  21. 29 5月, 2013 1 次提交
  22. 16 4月, 2013 2 次提交
  23. 13 4月, 2013 1 次提交
  24. 28 2月, 2013 1 次提交
    • S
      hlist: drop the node parameter from iterators · b67bfe0d
      Sasha Levin 提交于
      I'm not sure why, but the hlist for each entry iterators were conceived
      
              list_for_each_entry(pos, head, member)
      
      The hlist ones were greedy and wanted an extra parameter:
      
              hlist_for_each_entry(tpos, pos, head, member)
      
      Why did they need an extra pos parameter? I'm not quite sure. Not only
      they don't really need it, it also prevents the iterator from looking
      exactly like the list iterator, which is unfortunate.
      
      Besides the semantic patch, there was some manual work required:
      
       - Fix up the actual hlist iterators in linux/list.h
       - Fix up the declaration of other iterators based on the hlist ones.
       - A very small amount of places were using the 'node' parameter, this
       was modified to use 'obj->member' instead.
       - Coccinelle didn't handle the hlist_for_each_entry_safe iterator
       properly, so those had to be fixed up manually.
      
      The semantic patch which is mostly the work of Peter Senna Tschudin is here:
      
      @@
      iterator name hlist_for_each_entry, hlist_for_each_entry_continue, hlist_for_each_entry_from, hlist_for_each_entry_rcu, hlist_for_each_entry_rcu_bh, hlist_for_each_entry_continue_rcu_bh, for_each_busy_worker, ax25_uid_for_each, ax25_for_each, inet_bind_bucket_for_each, sctp_for_each_hentry, sk_for_each, sk_for_each_rcu, sk_for_each_from, sk_for_each_safe, sk_for_each_bound, hlist_for_each_entry_safe, hlist_for_each_entry_continue_rcu, nr_neigh_for_each, nr_neigh_for_each_safe, nr_node_for_each, nr_node_for_each_safe, for_each_gfn_indirect_valid_sp, for_each_gfn_sp, for_each_host;
      
      type T;
      expression a,c,d,e;
      identifier b;
      statement S;
      @@
      
      -T b;
          <+... when != b
      (
      hlist_for_each_entry(a,
      - b,
      c, d) S
      |
      hlist_for_each_entry_continue(a,
      - b,
      c) S
      |
      hlist_for_each_entry_from(a,
      - b,
      c) S
      |
      hlist_for_each_entry_rcu(a,
      - b,
      c, d) S
      |
      hlist_for_each_entry_rcu_bh(a,
      - b,
      c, d) S
      |
      hlist_for_each_entry_continue_rcu_bh(a,
      - b,
      c) S
      |
      for_each_busy_worker(a, c,
      - b,
      d) S
      |
      ax25_uid_for_each(a,
      - b,
      c) S
      |
      ax25_for_each(a,
      - b,
      c) S
      |
      inet_bind_bucket_for_each(a,
      - b,
      c) S
      |
      sctp_for_each_hentry(a,
      - b,
      c) S
      |
      sk_for_each(a,
      - b,
      c) S
      |
      sk_for_each_rcu(a,
      - b,
      c) S
      |
      sk_for_each_from
      -(a, b)
      +(a)
      S
      + sk_for_each_from(a) S
      |
      sk_for_each_safe(a,
      - b,
      c, d) S
      |
      sk_for_each_bound(a,
      - b,
      c) S
      |
      hlist_for_each_entry_safe(a,
      - b,
      c, d, e) S
      |
      hlist_for_each_entry_continue_rcu(a,
      - b,
      c) S
      |
      nr_neigh_for_each(a,
      - b,
      c) S
      |
      nr_neigh_for_each_safe(a,
      - b,
      c, d) S
      |
      nr_node_for_each(a,
      - b,
      c) S
      |
      nr_node_for_each_safe(a,
      - b,
      c, d) S
      |
      - for_each_gfn_sp(a, c, d, b) S
      + for_each_gfn_sp(a, c, d) S
      |
      - for_each_gfn_indirect_valid_sp(a, c, d, b) S
      + for_each_gfn_indirect_valid_sp(a, c, d) S
      |
      for_each_host(a,
      - b,
      c) S
      |
      for_each_host_safe(a,
      - b,
      c, d) S
      |
      for_each_mesh_entry(a,
      - b,
      c, d) S
      )
          ...+>
      
      [akpm@linux-foundation.org: drop bogus change from net/ipv4/raw.c]
      [akpm@linux-foundation.org: drop bogus hunk from net/ipv6/raw.c]
      [akpm@linux-foundation.org: checkpatch fixes]
      [akpm@linux-foundation.org: fix warnings]
      [akpm@linux-foudnation.org: redo intrusive kvm changes]
      Tested-by: NPeter Senna Tschudin <peter.senna@gmail.com>
      Acked-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Signed-off-by: NSasha Levin <sasha.levin@oracle.com>
      Cc: Wu Fengguang <fengguang.wu@intel.com>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: Gleb Natapov <gleb@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b67bfe0d
  25. 12 2月, 2013 2 次提交
  26. 26 1月, 2013 1 次提交
  27. 25 1月, 2013 2 次提交