Merge tag 'rdma-for-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 22 May 2012 00:54:55 +0000 (17:54 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 22 May 2012 00:54:55 +0000 (17:54 -0700)
Pull InfiniBand/RDMA changes from Roland Dreier:
 - Add ocrdma hardware driver for Emulex IB-over-Ethernet adapters
 - Add generic and mlx4 support for "raw" QPs: allow suitably privileged
   applications to send and receive arbitrary packets directly to/from
   the hardware
 - Add "doorbell drop" handling to the cxgb4 driver
 - A fairly large batch of qib hardware driver changes
 - A few fixes for lockdep-detected issues
 - A few other miscellaneous fixes and cleanups

Fix up trivial conflict in drivers/net/ethernet/emulex/benet/be.h.

* tag 'rdma-for-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: (53 commits)
  RDMA/cxgb4: Include vmalloc.h for vmalloc and vfree
  IB/mlx4: Fix mlx4_ib_add() error flow
  IB/core: Fix IB_SA_COMP_MASK macro
  IB/iser: Fix error flow in iser ep connection establishment
  IB/mlx4: Increase the number of vectors (EQs) available for ULPs
  RDMA/cxgb4: Add query_qp support
  RDMA/cxgb4: Remove kfifo usage
  RDMA/cxgb4: Use vmalloc() for debugfs QP dump
  RDMA/cxgb4: DB Drop Recovery for RDMA and LLD queues
  RDMA/cxgb4: Disable interrupts in c4iw_ev_dispatch()
  RDMA/cxgb4: Add DB Overflow Avoidance
  RDMA/cxgb4: Add debugfs RDMA memory stats
  cxgb4: DB Drop Recovery for RDMA and LLD queues
  cxgb4: Common platform specific changes for DB Drop Recovery
  cxgb4: Detect DB FULL events and notify RDMA ULD
  RDMA/cxgb4: Drop peer_abort when no endpoint found
  RDMA/cxgb4: Always wake up waiters in c4iw_peer_abort_intr()
  mlx4_core: Change bitmap allocator to work in round-robin fashion
  RDMA/nes: Don't call event handler if pointer is NULL
  RDMA/nes: Fix for the ORD value of the connecting peer
  ...

1  2 
MAINTAINERS
drivers/infiniband/core/cma.c
drivers/net/ethernet/emulex/benet/be.h
drivers/net/ethernet/emulex/benet/be_cmds.c
drivers/net/ethernet/emulex/benet/be_cmds.h
drivers/net/ethernet/emulex/benet/be_hw.h
drivers/net/ethernet/emulex/benet/be_main.c
drivers/net/ethernet/mellanox/mlx4/fw.c
drivers/net/ethernet/mellanox/mlx4/main.c
include/linux/mlx4/device.h
include/linux/mlx4/qp.h

diff --cc MAINTAINERS
Simple merge
Simple merge
index ff4eb8fe25d575135126cef526c4f0fff1d6123d,7bb2e97af8986e900e81c48e8fe1eb51cdba8a14..c5c4c0e83bd16303f893c7a2cf76569ec1b60006
@@@ -32,8 -32,9 +32,9 @@@
  #include <linux/u64_stats_sync.h>
  
  #include "be_hw.h"
+ #include "be_roce.h"
  
 -#define DRV_VER                       "4.2.116u"
 +#define DRV_VER                       "4.2.220u"
  #define DRV_NAME              "be2net"
  #define BE_NAME                       "ServerEngines BladeEngine2 10Gbps NIC"
  #define BE3_NAME              "ServerEngines BladeEngine3 10Gbps NIC"
@@@ -404,7 -379,22 +406,18 @@@ struct be_adapter 
        u32 rx_fc;              /* Rx flow control */
        u32 tx_fc;              /* Tx flow control */
        bool stats_cmd_sent;
 -      int link_speed;
 -      u8 port_type;
 -      u8 transceiver;
 -      u8 autoneg;
        u8 generation;          /* BladeEngine ASIC generation */
+       u32 if_type;
+       struct {
+               u8 __iomem *base;       /* Door Bell */
+               u32 size;
+               u32 total_size;
+               u64 io_addr;
+       } roce_db;
+       u32 num_msix_roce_vec;
+       struct ocrdma_dev *ocrdma_dev;
+       struct list_head entry;
        u32 flash_status;
        struct completion flash_compl;
  
@@@ -603,7 -606,17 +626,19 @@@ extern void be_link_status_update(struc
  extern void be_parse_stats(struct be_adapter *adapter);
  extern int be_load_fw(struct be_adapter *adapter, u8 *func);
  extern bool be_is_wol_supported(struct be_adapter *adapter);
 +extern bool be_pause_supported(struct be_adapter *adapter);
 +extern u32 be_get_fw_log_level(struct be_adapter *adapter);
  
+ /*
+  * internal function to initialize-cleanup roce device.
+  */
+ extern void be_roce_dev_add(struct be_adapter *);
+ extern void be_roce_dev_remove(struct be_adapter *);
+ /*
+  * internal function to open-close roce device during ifup-ifdown.
+  */
+ extern void be_roce_dev_open(struct be_adapter *);
+ extern void be_roce_dev_close(struct be_adapter *);
  #endif                                /* BE_H */
index b24623cce07b0f507e54147606dd3f5103035fb2,1c7c7d06a0b772160982f15f713004dcb86ef657..8d06ea381741cca9178534c843838452872d1cf3
        mutex_unlock(&adapter->mbox_lock);
        pci_free_consistent(adapter->pdev, cmd.size, cmd.va, cmd.dma);
        return status;
 +
 +}
 +int be_cmd_get_ext_fat_capabilites(struct be_adapter *adapter,
 +                                 struct be_dma_mem *cmd)
 +{
 +      struct be_mcc_wrb *wrb;
 +      struct be_cmd_req_get_ext_fat_caps *req;
 +      int status;
 +
 +      if (mutex_lock_interruptible(&adapter->mbox_lock))
 +              return -1;
 +
 +      wrb = wrb_from_mbox(adapter);
 +      if (!wrb) {
 +              status = -EBUSY;
 +              goto err;
 +      }
 +
 +      req = cmd->va;
 +      be_wrb_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON,
 +                             OPCODE_COMMON_GET_EXT_FAT_CAPABILITES,
 +                             cmd->size, wrb, cmd);
 +      req->parameter_type = cpu_to_le32(1);
 +
 +      status = be_mbox_notify_wait(adapter);
 +err:
 +      mutex_unlock(&adapter->mbox_lock);
 +      return status;
 +}
 +
 +int be_cmd_set_ext_fat_capabilites(struct be_adapter *adapter,
 +                                 struct be_dma_mem *cmd,
 +                                 struct be_fat_conf_params *configs)
 +{
 +      struct be_mcc_wrb *wrb;
 +      struct be_cmd_req_set_ext_fat_caps *req;
 +      int status;
 +
 +      spin_lock_bh(&adapter->mcc_lock);
 +
 +      wrb = wrb_from_mccq(adapter);
 +      if (!wrb) {
 +              status = -EBUSY;
 +              goto err;
 +      }
 +
 +      req = cmd->va;
 +      memcpy(&req->set_params, configs, sizeof(struct be_fat_conf_params));
 +      be_wrb_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON,
 +                             OPCODE_COMMON_SET_EXT_FAT_CAPABILITES,
 +                             cmd->size, wrb, cmd);
 +
 +      status = be_mcc_notify_wait(adapter);
 +err:
 +      spin_unlock_bh(&adapter->mcc_lock);
 +      return status;
  }
+ int be_roce_mcc_cmd(void *netdev_handle, void *wrb_payload,
+                       int wrb_payload_size, u16 *cmd_status, u16 *ext_status)
+ {
+       struct be_adapter *adapter = netdev_priv(netdev_handle);
+       struct be_mcc_wrb *wrb;
+       struct be_cmd_req_hdr *hdr = (struct be_cmd_req_hdr *) wrb_payload;
+       struct be_cmd_req_hdr *req;
+       struct be_cmd_resp_hdr *resp;
+       int status;
+       spin_lock_bh(&adapter->mcc_lock);
+       wrb = wrb_from_mccq(adapter);
+       if (!wrb) {
+               status = -EBUSY;
+               goto err;
+       }
+       req = embedded_payload(wrb);
+       resp = embedded_payload(wrb);
+       be_wrb_cmd_hdr_prepare(req, hdr->subsystem,
+                              hdr->opcode, wrb_payload_size, wrb, NULL);
+       memcpy(req, wrb_payload, wrb_payload_size);
+       be_dws_cpu_to_le(req, wrb_payload_size);
+       status = be_mcc_notify_wait(adapter);
+       if (cmd_status)
+               *cmd_status = (status & 0xffff);
+       if (ext_status)
+               *ext_status = 0;
+       memcpy(wrb_payload, resp, sizeof(*resp) + resp->response_length);
+       be_dws_le_to_cpu(wrb_payload, sizeof(*resp) + resp->response_length);
+ err:
+       spin_unlock_bh(&adapter->mcc_lock);
+       return status;
+ }
+ EXPORT_SYMBOL(be_roce_mcc_cmd);
Simple merge
Simple merge