1. 06 9月, 2009 1 次提交
    • J
      IB/mthca: Don't allow userspace open while recovering from catastrophic error · d8410647
      Jack Morgenstein 提交于
      Userspace apps are supposed to release all ib device resources if they
      receive a fatal async event (IBV_EVENT_DEVICE_FATAL).  However, the
      app has no way of knowing when the device has come back up, except to
      repeatedly attempt ibv_open_device() until it succeeds.
      
      However, currently there is no protection against the open succeeding
      while the device is in being removed following the fatal event.  In
      this case, the open will succeed, but as a result the device waits in
      the middle of its removal until the new app releases its resources --
      and the new app will not do so, since the open succeeded at a point
      following the fatal event generation.
      
      This patch adds an "active" flag to the device. The active flag is set
      to false (in the fatal event flow) before the "fatal" event is
      generated, so any subsequent ibv_dev_open() call to the device will
      fail until the device comes back up, thus preventing the above
      deadlock.
      Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      d8410647
  2. 28 5月, 2009 1 次提交
  3. 07 4月, 2009 2 次提交
  4. 30 9月, 2008 1 次提交
    • R
      IB/mthca: Use pci_request_regions() · 208dde28
      Roland Dreier 提交于
      Back in prehistoric (pre-git!) days, the kernel's MSI-X support did
      request_mem_region() on a device's MSI-X tables, which meant that a
      driver that enabled MSI-X couldn't use pci_request_regions() (since
      that would clash with the PCI layer's MSI-X request).
      
      However, that was removed (by me!) years ago, so mthca can just use
      pci_request_regions() and pci_release_regions() instead of its own
      much more complicated code that avoids requesting the MSI-X tables.
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      208dde28
  5. 15 7月, 2008 1 次提交
  6. 17 5月, 2008 1 次提交
    • R
      IB/mthca: Fix max_sge value returned by query_device · 12103dca
      Roland Dreier 提交于
      The mthca driver returns the maximum number of scatter/gather entries
      returned by the firmware as the max_sge value when device properties
      are queried.  However, the firmware also reports a limit on the
      maximum descriptor size allowed, and because mthca takes into account
      the worst case send request overhead when checking whether to allow a
      QP to be created, the largest number of scatter/gather entries that
      can be used with mthca may be limited by the maximum descriptor size
      rather than just by the actual s/g entry limit.
      
      This means that applications cannot actually create QPs with
      max_send_sge equal to the limit returned by ib_query_device().  Fix
      this by checking if the maximum descriptor size imposes a lower limit
      and if so returning that lower limit.
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      12103dca
  7. 17 4月, 2008 2 次提交
    • R
      IB/mthca: Avoid integer overflow when dealing with profile size · 19773539
      Roland Dreier 提交于
      mthca_make_profile() returns the size in bytes of the HCA context
      layout it creates, or a negative value if an error occurs.  However,
      the return value is declared as u64 and the memfree initialization
      path casts this value to int to test if it is negative.  This makes it
      think incorrectly than an error has occurred if the context size
      happens to be bigger than 2GB, since this turns into a negative int.
      
      Fix this by having mthca_make_profile() return an s64 and testing
      for an error by checking whether this 64-bit value itself is negative.
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      19773539
    • E
      IB/mthca: Add IPoIB checksum offload support · 680b575f
      Eli Cohen 提交于
      Arbel and Sinai devices support checksum generation and verification
      of TCP and UDP packets for UD IPoIB messages.  This patch checks if
      the HCA supports this and sets the IB_DEVICE_UD_IP_CSUM capability
      flag if it does.  It implements support for handling the IB_SEND_IP_CSUM
      send flag and setting the csum_ok field in receive work completions.
      Signed-off-by: NEli Cohen <eli@mellnaox.co.il>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      680b575f
  8. 05 2月, 2008 2 次提交
  9. 26 1月, 2008 2 次提交
  10. 10 10月, 2007 2 次提交
  11. 18 7月, 2007 2 次提交
    • R
      IB/mthca: Fix printk format used for firmware version in warning · e4daf738
      Roland Dreier 提交于
      When warning about out-of-date firmware, current mthca code messes up
      the formatting of the version if the subminor doesn't have three
      digits.  It doesn't fill the field with 0s so we end up with:
      
          ib_mthca 0000:0b:00.0: HCA FW version 1.1.  0 is old (1.2.  0 is current).
      
      Change the format from "%3d" to "%03d" to get the right thing printed.
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      e4daf738
    • R
      IB/mthca: Schedule MSI support for removal · f6be6fbe
      Roland Dreier 提交于
      The mthca driver supports both MSI and MSI-X.  However, MSI-X works with
      all hardware that the driver handles, and provides a superset of what
      MSI does, so there's no point in having code for both.  Schedule MSI
      support for removal in 2008 to give anyone who actually needs MSI and
      who can't use MSI time to speak up.
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      f6be6fbe
  12. 19 5月, 2007 1 次提交
  13. 19 4月, 2007 1 次提交
  14. 13 2月, 2007 2 次提交
  15. 16 12月, 2006 2 次提交
  16. 30 11月, 2006 1 次提交
    • R
      IB/mthca: Fix section mismatches · f4f3d0f0
      Roland Dreier 提交于
      Commit b3b30f5e ("IB/mthca: Recover from catastrophic errors")
      introduced some section mismatch breakage, because the error recovery
      code tears down and reinitializes the device, which calls into lots of
      code originally marked __devinit and __devexit from regular .text.
      
      Fix this by getting rid of these now-incorrect section markers.
      
      Reported by Randy Dunlap <randy.dunlap@oracle.com>.
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      f4f3d0f0
  17. 23 9月, 2006 1 次提交
  18. 24 8月, 2006 1 次提交
  19. 01 7月, 2006 1 次提交
  20. 28 6月, 2006 1 次提交
  21. 13 4月, 2006 1 次提交
    • J
      IB/mthca: Fix max_srq_sge returned by ib_query_device for Tavor devices · 59fef3b1
      Jack Morgenstein 提交于
      The driver allocates SRQ WQEs size with a power of 2 size both for
      Tavor and for memfree. For Tavor, however, the hardware only requires
      the WQE size to be a multiple of 16, not a power of 2, and the max
      number of scatter-gather allowed is reported accordingly by the
      firmware (and this is the value currently returned by
      ib_query_device() and ibv_query_device()).
      
      If the max number of scatter/gather entries reported by the FW is used
      when creating an SRQ, the creation will fail for Tavor, since the
      required WQE size will be increased to the next power of 2, which
      turns out to be larger than the device permitted max WQE size (which
      is not a power of 2).
      
      This patch reduces the reported SRQ max wqe size so that it can be used
      successfully in creating an SRQ on Tavor HCAs.
      Signed-off-by: NJack Morgenstein <jackm@mellanox.co.il>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      59fef3b1
  22. 11 4月, 2006 2 次提交
    • M
      IB/mthca: Disable tuning PCI read burst size · abf45dbb
      Michael S. Tsirkin 提交于
      The PCI spec recommends against drivers playing with a device's PCI
      read burst size, and says that systems software should configure it.
      And we actually have users that report that changing it from the
      default set by BIOS hurts performance and/or stability for them.  On
      the other hand, the Mellanox Programmer's Reference Manual recommends
      turning it up all the way to the maximum value.  Some tests conducted
      here in the lab do not show performance improvement from this tuning,
      but this might be just me.
      
      As a work-around, make this tuning an option, off by default (safe
      value), with an eye towards removing it completely one day if no one
      complains.
      Signed-off-by: NMichael S. Tsirkin <mst@mellanox.co.il>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      abf45dbb
    • J
      IB: simplify static rate encoding · bf6a9e31
      Jack Morgenstein 提交于
      Push translation of static rate to HCA format into low-level drivers,
      where it belongs.  For static rate encoding, use encoding of rate
      field from IB standard PathRecord, with addition of value 0, for
      backwards compatibility with current usage.  The changes are:
      
       - Add enum ib_rate to midlayer includes.
       - Get rid of static rate translation in IPoIB; just use static rate
         directly from Path and MulticastGroup records.
       - Update mthca driver to translate absolute static rate into the
         format used by hardware.  This also fixes mthca's static rate
         handling for HCAs that are capable of 4X DDR.
      Signed-off-by: NJack Morgenstein <jackm@mellanox.co.il>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      bf6a9e31
  23. 03 4月, 2006 1 次提交
    • R
      IB/mthca: Always build debugging code unless CONFIG_EMBEDDED=y · 227c939b
      Roland Dreier 提交于
      Change the mthca debugging trace output code so that it can enabled
      and disabled at runtime with the debug_level module parameter in
      sysfs.  Also, don't allow CONFIG_INFINIBAND_MTHCA_DEBUG to be disabled
      unless CONFIG_EMBEDDED is selected.  We want users (and especially
      distros) to have this turned on unless they really need to save space,
      because by the time we want debugging output, it's usually too late to
      rebuild a kernel.
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      227c939b
  24. 21 3月, 2006 2 次提交
  25. 31 1月, 2006 1 次提交
  26. 06 1月, 2006 1 次提交
  27. 11 11月, 2005 2 次提交
  28. 05 11月, 2005 1 次提交
  29. 03 11月, 2005 1 次提交