Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions libcxgb4/src/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ unsigned long c4iw_page_mask;
int ma_wr;
int t5_en_wc = 1;

SLIST_HEAD(devices_struct, c4iw_dev) devices;
static LIST_HEAD(devices);

static struct ibv_context_ops c4iw_ctx_ops = {
.query_device = c4iw_query_device,
Expand Down Expand Up @@ -367,7 +367,7 @@ void dump_state()
int i;

fprintf(stderr, "STALL DETECTED:\n");
SLIST_FOREACH(dev, &devices, list) {
list_for_each(&devices, dev, list) {
//pthread_spin_lock(&dev->lock);
fprintf(stderr, "Device %s\n", dev->ibv_dev.name);
for (i=0; i < dev->max_cq; i++) {
Expand Down Expand Up @@ -473,11 +473,12 @@ static struct ibv_device *cxgb4_driver_init(const char *uverbs_sys_path,

pthread_spin_init(&dev->lock, PTHREAD_PROCESS_PRIVATE);
dev->ibv_dev.ops = c4iw_dev_ops;
dev->chip_version = CHELSIO_PCI_ID_CHIP_VERSION(hca_table[i].device);
dev->chip_version = CHELSIO_CHIP_VERSION(hca_table[i].device >> 8);
dev->abi_version = abi_version;
list_node_init(&dev->list);

PDBG("%s device claimed\n", __FUNCTION__);
SLIST_INSERT_HEAD(&devices, dev, list);
list_add_tail(&devices, &dev->list);
#ifdef STALL_DETECTION
{
char *c = getenv("CXGB4_STALL_TIMEOUT");
Expand Down
4 changes: 2 additions & 2 deletions libcxgb4/src/libcxgb4.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#include <sys/time.h>
#include <infiniband/driver.h>
#include <infiniband/arch.h>
#include "queue.h"
#include <ccan/list.h>
#include "t4.h"

extern unsigned long c4iw_page_size;
Expand All @@ -60,7 +60,7 @@ struct c4iw_dev {
int max_cq;
struct c4iw_cq **cqid2ptr;
pthread_spinlock_t lock;
SLIST_ENTRY(c4iw_dev) list;
struct list_node list;
int abi_version;
};

Expand Down
4 changes: 2 additions & 2 deletions libcxgb4/src/qp.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,10 @@ static int build_rdma_send(struct t4_sq *sq, union t4_wr *wqe,
return -EINVAL;
if (wr->send_flags & IBV_SEND_SOLICITED)
wqe->send.sendop_pkd = cpu_to_be32(
V_FW_RI_SEND_WR_SENDOP(FW_RI_SEND_WITH_SE));
FW_RI_SEND_WR_SENDOP_V(FW_RI_SEND_WITH_SE));
else
wqe->send.sendop_pkd = cpu_to_be32(
V_FW_RI_SEND_WR_SENDOP(FW_RI_SEND));
FW_RI_SEND_WR_SENDOP_V(FW_RI_SEND));
wqe->send.stag_inv = 0;
wqe->send.r3 = 0;
wqe->send.r4 = 0;
Expand Down
Loading