1. 29 4月, 2008 1 次提交
    • A
      IB: expand ib_umem_get() prototype · cb9fbc5c
      Arthur Kepner 提交于
      Add a new parameter, dmasync, to the ib_umem_get() prototype.  Use dmasync = 1
      when mapping user-allocated CQs with ib_umem_get().
      Signed-off-by: NArthur Kepner <akepner@sgi.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
      Cc: Jes Sorensen <jes@sgi.com>
      Cc: Randy Dunlap <randy.dunlap@oracle.com>
      Cc: Roland Dreier <rdreier@cisco.com>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: David Miller <davem@davemloft.net>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Grant Grundler <grundler@parisc-linux.org>
      Cc: Michael Ellerman <michael@ellerman.id.au>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      cb9fbc5c
  2. 20 4月, 2008 1 次提交
  3. 19 4月, 2008 1 次提交
  4. 17 4月, 2008 8 次提交
    • J
      IB/mthca: Update module version and release date · 940801b2
      Jack Morgenstein 提交于
      The ib_mthca driver has been stable for a while, so bump the version
      number to 1.0 to indicate this.
      Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      940801b2
    • D
      IB/mthca: Update QP state if query QP succeeds · 5121df3a
      Dotan Barak 提交于
      If the QP was moved to another state (such as SQE) by the hardware,
      then after this change the user won't have to set the IBV_QP_CUR_STATE
      mask in order to execute modify QP in order to recover from this state.
      Signed-off-by: NDotan Barak <dotanb@dev.mellanox.co.il>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      5121df3a
    • R
      IB/core: Add support for "send with invalidate" work requests · 0f39cf3d
      Roland Dreier 提交于
      Add a new IB_WR_SEND_WITH_INV send opcode that can be used to mark a
      "send with invalidate" work request as defined in the iWARP verbs and
      the InfiniBand base memory management extensions.  Also put "imm_data"
      and a new "invalidate_rkey" member in a new "ex" union in struct
      ib_send_wr. The invalidate_rkey member can be used to pass in an
      R_Key/STag to be invalidated.  Add this new union to struct
      ib_uverbs_send_wr.  Add code to copy the invalidate_rkey field in
      ib_uverbs_post_send().
      
      Fix up low-level drivers to deal with the change to struct ib_send_wr,
      and just remove the imm_data initialization from net/sunrpc/xprtrdma/,
      since that code never does any send with immediate operations.
      
      Also, move the existing IB_DEVICE_SEND_W_INV flag to a new bit, since
      the iWARP drivers currently in the tree set the bit.  The amso1100
      driver at least will silently fail to honor the IB_SEND_INVALIDATE bit
      if passed in as part of userspace send requests (since it does not
      implement kernel bypass work request queueing).  Remove the flag from
      all existing drivers that set it until we know which ones are OK.
      
      The values chosen for the new flag is not consecutive to avoid clashing
      with flags defined in the XRC patches, which are not merged yet but
      which are already in use and are likely to be merged soon.
      
      This resurrects a patch sent long ago by Mikkel Hagen <mhagen@iol.unh.edu>.
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      0f39cf3d
    • E
      IB/core: Add creation flags to struct ib_qp_init_attr · b846f25a
      Eli Cohen 提交于
      Add a create_flags member to struct ib_qp_init_attr that will allow a
      kernel verbs consumer to create a pass special flags when creating a QP.
      Add a flag value for telling low-level drivers that a QP will be used
      for IPoIB UD LSO.  The create_flags member will also be useful for XRC
      and ehca low-latency QP support.
      
      Since no create_flags handling is implemented yet, add code to all
      low-level drivers to return -EINVAL if create_flags is non-zero.
      Signed-off-by: NEli Cohen <eli@mellanox.co.il>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      b846f25a
    • R
      IB/mthca: Avoid integer overflow when allocating huge ICM table · c263ff65
      Roland Dreier 提交于
      In mthca_alloc_icm_table(), the number of entries to allocate for the
      table->icm array is computed by calculating obj_size * nobj and then
      dividing by MTHCA_TABLE_CHUNK_SIZE.  If nobj is really large, then
      obj_size * nobj may overflow and the division may get the wrong value
      (even a negative value).  Fix this by calculating the number of
      objects per chunk and then dividing nobj by this value instead.
      
      This patch allows crazy configurations such as loading ib_mthca with
      the module parameter num_mtt=33554432 to work properly.
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      c263ff65
    • 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
    • R
      IB/mthca: Formatting cleanups · b3999393
      Roland Dreier 提交于
      Fix a few whitespace and other coding style problems.
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      b3999393
  5. 20 2月, 2008 1 次提交
  6. 13 2月, 2008 2 次提交
  7. 05 2月, 2008 6 次提交
  8. 26 1月, 2008 2 次提交
  9. 24 10月, 2007 1 次提交
  10. 23 10月, 2007 1 次提交
  11. 16 10月, 2007 1 次提交
    • R
      IB/mthca: Avoid alignment traps when writing doorbells · ab8403c4
      Roland Dreier 提交于
      Architectures such as ia64 see alignment traps when doing a 64-bit 
      read from __be32 doorbell[2] arrays to do doorbell writes in 
      mthca_write64().  Fix this by just passing the two halves of the 
      doorbell value into mthca_write64().  This actually improves the 
      generated code by allowing the compiler to see what's going on better.
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      ab8403c4
  12. 11 10月, 2007 1 次提交
  13. 10 10月, 2007 4 次提交
  14. 21 7月, 2007 1 次提交
  15. 19 7月, 2007 4 次提交
    • R
      IB/mthca: Simplify use of size0 in work request posting · 43509d1f
      Roland Dreier 提交于
          
      Current code sets size0 to 0 at the start of work request posting
      functions and then handles size0 == 0 specially within the loop over
      work requests.  Change this so size0 is set along with f0 the first
      time through the loop (when nreq == 0).  This makes the code easier to
      understand by making it clearer that f0 and size0 are always
      initialized if nreq != 0 without having to know that size0 == 0
      implies nreq == 0.
      
      Also annotate size0 with uninitialized_var() so that this doesn't
      introduce a new compiler warning.
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      43509d1f
    • R
      IB/mthca: Factor out setting WQE UD segment entries · e535c699
      Roland Dreier 提交于
          
      Factor code to set UD entries out of the work request posting
      functions into inline functions set_tavor_ud_seg() and
      set_arbel_ud_seg().  This doesn't change the generated code in any
      significant way, and makes the source easier on the eyes.
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      e535c699
    • R
      IB/mthca: Factor out setting WQE remote address and atomic segment entries · 400ddc11
      Roland Dreier 提交于
          
      Factor code to set remote address and atomic segment entries out of the
      work request posting functions into inline functions set_raddr_seg()
      and set_atomic_seg().  This doesn't change the generated code in any
      significant way, and makes the source easier on the eyes.
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      400ddc11
    • R
      IB/mthca: Factor out setting WQE data segment entries · 80885456
      Roland Dreier 提交于
      Factor code to set data segment entries out of the work request
      posting functions into inline functions mthca_set_data_seg() and
      mthca_set_data_seg_inval().  This makes the code more readable and
      also allows the compiler to do a better job -- on x86_64:
      
      add/remove: 0/0 grow/shrink: 0/6 up/down: 0/-69 (-69)
      function                                     old     new   delta
      mthca_arbel_post_srq_recv                    373     369      -4
      mthca_arbel_post_receive                     570     562      -8
      mthca_tavor_post_srq_recv                    520     508     -12
      mthca_tavor_post_send                       1344    1330     -14
      mthca_arbel_post_send                       1481    1467     -14
      mthca_tavor_post_receive                     792     775     -17
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      80885456
  16. 18 7月, 2007 4 次提交
    • R
      IB/mthca: Use uninitialized_var() for f0 · 6d7d080e
      Roland Dreier 提交于
      Commit 9db48926 ("drivers/infiniband/hw/mthca/mthca_qp: kill uninit'd
      var warning") added "= 0" to the declarations of f0 to shut up gcc
      warnings.  However, there's no point in making the code bigger by
      initializing f0 to a random value just to get rid of a warning;
      setting f0 to 0 is no safer than just using uninitialized_var(), which
      documents the situation better and gives smaller code too.  For example, 
      on x86_64:
      
      add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-16 (-16)
      function                                     old     new   delta
      mthca_tavor_post_send                       1352    1344      -8
      mthca_arbel_post_send                       1489    1481      -8
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      6d7d080e
    • 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
    • J
      drivers/infiniband/hw/mthca/mthca_qp: kill uninit'd var warning · 9db48926
      Jeff Garzik 提交于
      drivers/infiniband/hw/mthca/mthca_qp.c: In function
        ‘mthca_tavor_post_send’:
      drivers/infiniband/hw/mthca/mthca_qp.c:1594: warning: ‘f0’ may be used
        uninitialized in this function
      drivers/infiniband/hw/mthca/mthca_qp.c: In function
        ‘mthca_arbel_post_send’:
      drivers/infiniband/hw/mthca/mthca_qp.c:1949: warning: ‘f0’ may be used
        uninitialized in this function
      
      Initializing 'f0' is not strictly necessary in either case, AFAICS.
      
      I was considering use of uninitialized_var(), but looking at the
      complex flow of control in each function, I feel it is wiser and
      safer to simply zero the var and be certain of ourselves.
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      9db48926
  17. 11 7月, 2007 1 次提交