1. 09 4月, 2009 7 次提交
    • C
      RDMA/nes: Add support for new SFP+ PHY · 4303565d
      Chien Tung 提交于
      Add new register settings for new SFP+ PHY/firmware.
      Add new PHY to to nes_netdev_get/set_settings.
      Signed-off-by: NChien Tung <chien.tin.tung@intel.com>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      4303565d
    • C
      RDMA/nes: Add wide_ppm_offset parm for switch compatibility · a4849fc1
      Chien Tung 提交于
      We have observed unstable link with a new BNT switch.
      
      Add wide_ppm_offset parameter to allow the user to control the clock
      ppm offset on the CX4 interface for better compatibility.  Default is
      100ppm, setting it to 1 will increase it to 300ppm.  Change default
      SerDes1 reference clock to external source.
      Signed-off-by: NChien Tung <chien.tin.tung@intel.com>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      a4849fc1
    • C
      RDMA/nes: Fix SFP+ PHY initialization · 1b949324
      Chien Tung 提交于
      SFP+ PHY initialization has very long delays, incorrect settings for
      direct attach copper cables, and inconsistent link detection.
      
      Adjust delays to the minimum required by the PHY.  Worst case is now
      less than 4 seconds.  Add new register settings for direct attach
      cables.  Change link detection logic to use two new registers for more
      consistent link state detection.  Reorganize code to shorten line
      length.
      Signed-off-by: NChien Tung <chien.tin.tung@intel.com>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      1b949324
    • F
      RDMA/nes: Fix nes_nic_cm_xmit() error handling · 5962c2c8
      Faisal Latif 提交于
      We are getting crash or hung situation when we are running network
      cable pull tests during RDMA traffic.
      
      In schedule_nes_timer(), we return an error if nes_nic_cm_xmit()
      returns failure.  This is changed to success as skb is being put on
      the timer routines to be processed later.  In send_syn() case, we are
      indicating connect failure once from nes_connect() and the other when
      the rexmit retries expires.
      
      The other issue is skb->users which we are incrementing before calling
      nes_nic_cm_xmit() which calls dev_queue_xmit() but in case of failure
      we are decrementing the skb->users at the same time putting the skb on
      the rexmit path.  Even if dev_queue_xmit() fails, the skb->users is
      decremented already.  We are removing the decrement of skb->users in
      case of failure from both schedule_nes_timer() as well as from
      nes_cm_timer_tick().
      
      There is also extra check in nes_cm_timer_tick() for rexmit failure
      which does a break from the loop is removed.  This causes problem as
      the other nodes have their cm_node->ref_count incremented and are not
      processed.
      Signed-off-by: NFaisal Latif <faisal.latif@intel.com>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      5962c2c8
    • F
      RDMA/nes: Fix error handling issues · 79fc3d74
      Faisal Latif 提交于
      Fix issues found by static code analysis:
      
      (1) Check if cm_node was successfully created for loopback connection.
      
      (2) schedule_nes_timer() does not free up allocated memory after
          encountering an error.  There is a WARN_ON() for this condition.
      
      (3) there is a cm_node->freed flag which is set but not used.
      Reported-by: NDan Carpenter <error27@gmail.com>
      Signed-off-by: NFaisal Latif <faisal.latif@intel.com>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      79fc3d74
    • D
      RDMA/nes: Fix incorrect casts on 32-bit architectures · 7a5efb62
      Don Wood 提交于
      The were some incorrect casts to unsigned long that caused 64-bit values
      to be truncated on 32-bit architectures and made the driver pass invalid
      adresses and lengths to the hardware.  The problems were primarily seen
      with kernels with highmem configured but some could show up in
      non-highmem kernels, too.
      Signed-off-by: NDon Wood <donald.e.wood@intel.com>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      7a5efb62
    • Y
      RDMA/cma: Create cm id even when IB port is down · d2ca39f2
      Yossi Etigin 提交于
      When doing rdma_resolve_addr(), if the relevant IB port is down, the
      function fails and the cm_id is not bound to the correct device.
      Therefore, application does not have a device handle and cannot wait
      for the port to become active.  The function fails because the
      underlying IPoIB interface is not joined to the broadcast group and
      therefore the SA does not have a multicast record to take a Q_Key
      from.
      
      The fix is to use lazy Q_Key resolution - cma_set_qkey() will set
      id_priv->qkey if it was not set, and will be called just before the
      Q_Key is really required.
      Signed-off-by: NYossi Etigin <yosefe@voltaire.com>
      Acked-by: NSean Hefty <sean.hefty@intel.com>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      d2ca39f2
  2. 07 4月, 2009 2 次提交
  3. 02 4月, 2009 1 次提交
  4. 01 4月, 2009 1 次提交
  5. 30 3月, 2009 3 次提交
  6. 27 3月, 2009 1 次提交
  7. 25 3月, 2009 1 次提交
    • S
      RDMA/cxgb3: Enforce required firmware · d1fbe04e
      Steve Wise 提交于
      The cxgb3 NIC driver can handle more firmware versions than iw_cxgb3,
      and since commit 8207befa ("cxgb3: untie strict FW matching") cxgb3
      will load with firmware versions that iw_cxgb3 can't handle.  The FW
      major number indicates a specific interface between the FW and
      iw_cxgb3.  Thus if the major number of the running firmware does not
      match the required version compiled into iw_cxgb3, then iw_cxgb3 must
      not register that device.
      Signed-off-by: NSteve Wise <swise@opengridcomputing.com>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      d1fbe04e
  8. 22 3月, 2009 3 次提交
  9. 19 3月, 2009 1 次提交
  10. 14 3月, 2009 5 次提交
  11. 13 3月, 2009 1 次提交
    • F
      RDMA/nes: Don't allow userspace QPs to use STag zero · c12e56ef
      Faisal Latif 提交于
      STag zero is a special STag that allows consumers to access any bus
      address without registering memory.  The nes driver unfortunately
      allows STag zero to be used even with QPs created by unprivileged
      userspace consumers, which means that any process with direct verbs
      access to the nes device can read and write any memory accessible to
      the underlying PCI device (usually any memory in the system).  Such
      access is usually given for cluster software such as MPI to use, so
      this is a local privilege escalation bug on most systems running this
      driver.
      
      The driver was using STag zero to receive the last streaming mode
      data; to allow STag zero to be disabled for unprivileged QPs, the
      driver now registers a special MR for this data.
      
      Cc: <stable@kernel.org>
      Signed-off-by: NFaisal Latif <faisal.latif@intel.com>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c12e56ef
  12. 07 3月, 2009 8 次提交
  13. 05 3月, 2009 1 次提交
  14. 04 3月, 2009 2 次提交
    • J
      IB/sa_query: Fix AH leak due to update_sm_ah() race · 6b708b3d
      Jack Morgenstein 提交于
      Our testing uncovered a race condition in ib_sa_event():
      
      	spin_lock_irqsave(&port->ah_lock, flags);
      	if (port->sm_ah)
      		kref_put(&port->sm_ah->ref, free_sm_ah);
      	port->sm_ah = NULL;
      	spin_unlock_irqrestore(&port->ah_lock, flags);
      
      	schedule_work(&sa_dev->port[event->element.port_num -
      				    sa_dev->start_port].update_task);
      
      If two events occur back-to-back (e.g., client-reregister and LID
      change), both may pass the spinlock-protected code above before the
      scheduled work updates the port->sm_ah handle.  Then if the scheduled
      work ends up running twice, the second operation will then find a
      non-NULL port->sm_ah, and will simply overwrite it in update_sm_ah --
      resulting in an AH leak.
      Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      6b708b3d
    • R
      IB/mad: Fix ib_post_send_mad() returning 0 with no generate send comp · 4780c195
      Ralph Campbell 提交于
      If ib_post_send_mad() returns 0, the API guarantees that there will be
      a callback to send_buf->mad_agent->send_handler() so that the sender
      can call ib_free_send_mad().  Otherwise, the ib_mad_send_buf will be
      leaked and the mad_agent reference count will never go to zero and the
      IB device module cannot be unloaded.  The above can happen without
      this patch if process_mad() returns (IB_MAD_RESULT_SUCCESS |
      IB_MAD_RESULT_CONSUMED).
      
      If process_mad() returns IB_MAD_RESULT_SUCCESS and there is no agent
      registered to receive the mad being sent, handle_outgoing_dr_smp()
      returns zero which causes a MAD packet which is at the end of the
      directed route to be incorrectly sent on the wire but doesn't cause a
      hang since the HCA generates a send completion.
      Signed-off-by: NRalph Campbell <ralph.campbell@qlogic.com>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      4780c195
  15. 28 2月, 2009 3 次提交