Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 157405
b: refs/heads/master
c: 60f2b65
h: refs/heads/master
i:
  157403: 3c142bf
v: v3
  • Loading branch information
Roland Dreier committed Sep 6, 2009
1 parent 57481a5 commit d4f6c33
Show file tree
Hide file tree
Showing 63 changed files with 597 additions and 1,246 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 45c448a1c0bed9c7eab6064493a7c5d94defcafd
refs/heads/master: 60f2b652f54aa4ac4127a538abad05235fb9c469
12 changes: 6 additions & 6 deletions trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ F: drivers/hwmon/ams/
AMSO1100 RNIC DRIVER
M: Tom Tucker <tom@opengridcomputing.com>
M: Steve Wise <swise@opengridcomputing.com>
L: linux-rdma@vger.kernel.org
L: general@lists.openfabrics.org
S: Maintained
F: drivers/infiniband/hw/amso1100/

Expand Down Expand Up @@ -1494,7 +1494,7 @@ F: drivers/net/cxgb3/

CXGB3 IWARP RNIC DRIVER (IW_CXGB3)
M: Steve Wise <swise@chelsio.com>
L: linux-rdma@vger.kernel.org
L: general@lists.openfabrics.org
W: http://www.openfabrics.org
S: Supported
F: drivers/infiniband/hw/cxgb3/
Expand Down Expand Up @@ -1868,7 +1868,7 @@ F: fs/efs/
EHCA (IBM GX bus InfiniBand adapter) DRIVER
M: Hoang-Nam Nguyen <hnguyen@de.ibm.com>
M: Christoph Raisch <raisch@de.ibm.com>
L: linux-rdma@vger.kernel.org
L: general@lists.openfabrics.org
S: Supported
F: drivers/infiniband/hw/ehca/

Expand Down Expand Up @@ -2552,7 +2552,7 @@ INFINIBAND SUBSYSTEM
M: Roland Dreier <rolandd@cisco.com>
M: Sean Hefty <sean.hefty@intel.com>
M: Hal Rosenstock <hal.rosenstock@gmail.com>
L: linux-rdma@vger.kernel.org
L: general@lists.openfabrics.org (moderated for non-subscribers)
W: http://www.openib.org/
T: git git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband.git
S: Supported
Expand Down Expand Up @@ -2729,7 +2729,7 @@ F: drivers/net/ipg.c

IPATH DRIVER
M: Ralph Campbell <infinipath@qlogic.com>
L: linux-rdma@vger.kernel.org
L: general@lists.openfabrics.org
T: git git://git.qlogic.com/ipath-linux-2.6
S: Supported
F: drivers/infiniband/hw/ipath/
Expand Down Expand Up @@ -3485,7 +3485,7 @@ F: drivers/scsi/NCR_D700.*
NETEFFECT IWARP RNIC DRIVER (IW_NES)
M: Faisal Latif <faisal.latif@intel.com>
M: Chien Tung <chien.tin.tung@intel.com>
L: linux-rdma@vger.kernel.org
L: general@lists.openfabrics.org
W: http://www.neteffect.com
S: Supported
F: drivers/infiniband/hw/nes/
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/infiniband/core/iwcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,6 @@ static void destroy_cm_id(struct iw_cm_id *cm_id)
* In either case, must tell the provider to reject.
*/
cm_id_priv->state = IW_CM_STATE_DESTROYING;
cm_id->device->iwcm->reject(cm_id, NULL, 0);
break;
case IW_CM_STATE_CONN_SENT:
case IW_CM_STATE_DESTROYING:
Expand Down
6 changes: 5 additions & 1 deletion trunk/drivers/infiniband/core/mad.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ static struct list_head ib_mad_port_list;
static u32 ib_mad_client_id = 0;

/* Port list lock */
static DEFINE_SPINLOCK(ib_mad_port_list_lock);
static spinlock_t ib_mad_port_list_lock;


/* Forward declarations */
static int method_in_use(struct ib_mad_mgmt_method_table **method,
Expand Down Expand Up @@ -2983,6 +2984,8 @@ static int __init ib_mad_init_module(void)
{
int ret;

spin_lock_init(&ib_mad_port_list_lock);

ib_mad_cache = kmem_cache_create("ib_mad",
sizeof(struct ib_mad_private),
0,
Expand Down Expand Up @@ -3018,3 +3021,4 @@ static void __exit ib_mad_cleanup_module(void)

module_init(ib_mad_init_module);
module_exit(ib_mad_cleanup_module);

10 changes: 1 addition & 9 deletions trunk/drivers/infiniband/core/multicast.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@ struct mcast_group {
struct ib_sa_query *query;
int query_id;
u16 pkey_index;
u8 leave_state;
int retries;
};

struct mcast_member {
Expand Down Expand Up @@ -352,7 +350,6 @@ static int send_leave(struct mcast_group *group, u8 leave_state)

rec = group->rec;
rec.join_state = leave_state;
group->leave_state = leave_state;

ret = ib_sa_mcmember_rec_query(&sa_client, port->dev->device,
port->port_num, IB_SA_METHOD_DELETE, &rec,
Expand Down Expand Up @@ -545,11 +542,7 @@ static void leave_handler(int status, struct ib_sa_mcmember_rec *rec,
{
struct mcast_group *group = context;

if (status && group->retries > 0 &&
!send_leave(group, group->leave_state))
group->retries--;
else
mcast_work_handler(&group->work);
mcast_work_handler(&group->work);
}

static struct mcast_group *acquire_group(struct mcast_port *port,
Expand All @@ -572,7 +565,6 @@ static struct mcast_group *acquire_group(struct mcast_port *port,
if (!group)
return NULL;

group->retries = 3;
group->port = port;
group->rec.mgid = *mgid;
group->pkey_index = MCAST_INVALID_PKEY_INDEX;
Expand Down
7 changes: 5 additions & 2 deletions trunk/drivers/infiniband/core/sa_query.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,10 @@ static struct ib_client sa_client = {
.remove = ib_sa_remove_one
};

static DEFINE_SPINLOCK(idr_lock);
static spinlock_t idr_lock;
static DEFINE_IDR(query_idr);

static DEFINE_SPINLOCK(tid_lock);
static spinlock_t tid_lock;
static u32 tid;

#define PATH_REC_FIELD(field) \
Expand Down Expand Up @@ -1077,6 +1077,9 @@ static int __init ib_sa_init(void)
{
int ret;

spin_lock_init(&idr_lock);
spin_lock_init(&tid_lock);

get_random_bytes(&tid, sizeof tid);

ret = ib_register_client(&sa_client);
Expand Down
8 changes: 8 additions & 0 deletions trunk/drivers/infiniband/core/smi.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ enum smi_action smi_handle_dr_smp_send(struct ib_smp *smp,
hop_cnt = smp->hop_cnt;

/* See section 14.2.2.2, Vol 1 IB spec */
/* C14-6 -- valid hop_cnt values are from 0 to 63 */
if (hop_cnt >= IB_SMP_MAX_PATH_HOPS)
return IB_SMI_DISCARD;

if (!ib_get_smp_direction(smp)) {
/* C14-9:1 */
if (hop_cnt && hop_ptr == 0) {
Expand Down Expand Up @@ -133,6 +137,10 @@ enum smi_action smi_handle_dr_smp_recv(struct ib_smp *smp, u8 node_type,
hop_cnt = smp->hop_cnt;

/* See section 14.2.2.2, Vol 1 IB spec */
/* C14-6 -- valid hop_cnt values are from 0 to 63 */
if (hop_cnt >= IB_SMP_MAX_PATH_HOPS)
return IB_SMI_DISCARD;

if (!ib_get_smp_direction(smp)) {
/* C14-9:1 -- sender should have incremented hop_ptr */
if (hop_cnt && hop_ptr == 0)
Expand Down
10 changes: 5 additions & 5 deletions trunk/drivers/infiniband/core/uverbs_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ DEFINE_IDR(ib_uverbs_cq_idr);
DEFINE_IDR(ib_uverbs_qp_idr);
DEFINE_IDR(ib_uverbs_srq_idr);

static DEFINE_SPINLOCK(map_lock);
static spinlock_t map_lock;
static struct ib_uverbs_device *dev_table[IB_UVERBS_MAX_DEVICES];
static DECLARE_BITMAP(dev_map, IB_UVERBS_MAX_DEVICES);

Expand Down Expand Up @@ -584,16 +584,14 @@ static ssize_t ib_uverbs_write(struct file *filp, const char __user *buf,

if (hdr.command < 0 ||
hdr.command >= ARRAY_SIZE(uverbs_cmd_table) ||
!uverbs_cmd_table[hdr.command])
!uverbs_cmd_table[hdr.command] ||
!(file->device->ib_dev->uverbs_cmd_mask & (1ull << hdr.command)))
return -EINVAL;

if (!file->ucontext &&
hdr.command != IB_USER_VERBS_CMD_GET_CONTEXT)
return -EINVAL;

if (!(file->device->ib_dev->uverbs_cmd_mask & (1ull << hdr.command)))
return -ENOSYS;

return uverbs_cmd_table[hdr.command](file, buf + sizeof hdr,
hdr.in_words * 4, hdr.out_words * 4);
}
Expand Down Expand Up @@ -838,6 +836,8 @@ static int __init ib_uverbs_init(void)
{
int ret;

spin_lock_init(&map_lock);

ret = register_chrdev_region(IB_UVERBS_BASE_DEV, IB_UVERBS_MAX_DEVICES,
"infiniband_verbs");
if (ret) {
Expand Down
6 changes: 5 additions & 1 deletion trunk/drivers/infiniband/hw/amso1100/c2.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,11 @@ MODULE_DEVICE_TABLE(pci, c2_pci_table);

static void c2_print_macaddr(struct net_device *netdev)
{
pr_debug("%s: MAC %pM, IRQ %u\n", netdev->name, netdev->dev_addr, netdev->irq);
pr_debug("%s: MAC %02X:%02X:%02X:%02X:%02X:%02X, "
"IRQ %u\n", netdev->name,
netdev->dev_addr[0], netdev->dev_addr[1], netdev->dev_addr[2],
netdev->dev_addr[3], netdev->dev_addr[4], netdev->dev_addr[5],
netdev->irq);
}

static void c2_set_rxbufsize(struct c2_port *c2_port)
Expand Down
24 changes: 9 additions & 15 deletions trunk/drivers/infiniband/hw/amso1100/c2_provider.c
Original file line number Diff line number Diff line change
Expand Up @@ -780,11 +780,11 @@ int c2_register_device(struct c2_dev *dev)
/* Register pseudo network device */
dev->pseudo_netdev = c2_pseudo_netdev_init(dev);
if (!dev->pseudo_netdev)
goto out;
goto out3;

ret = register_netdev(dev->pseudo_netdev);
if (ret)
goto out_free_netdev;
goto out2;

pr_debug("%s:%u\n", __func__, __LINE__);
strlcpy(dev->ibdev.name, "amso%d", IB_DEVICE_NAME_MAX);
Expand Down Expand Up @@ -851,10 +851,6 @@ int c2_register_device(struct c2_dev *dev)
dev->ibdev.post_recv = c2_post_receive;

dev->ibdev.iwcm = kmalloc(sizeof(*dev->ibdev.iwcm), GFP_KERNEL);
if (dev->ibdev.iwcm == NULL) {
ret = -ENOMEM;
goto out_unregister_netdev;
}
dev->ibdev.iwcm->add_ref = c2_add_ref;
dev->ibdev.iwcm->rem_ref = c2_rem_ref;
dev->ibdev.iwcm->get_qp = c2_get_qp;
Expand All @@ -866,25 +862,23 @@ int c2_register_device(struct c2_dev *dev)

ret = ib_register_device(&dev->ibdev);
if (ret)
goto out_free_iwcm;
goto out1;

for (i = 0; i < ARRAY_SIZE(c2_dev_attributes); ++i) {
ret = device_create_file(&dev->ibdev.dev,
c2_dev_attributes[i]);
if (ret)
goto out_unregister_ibdev;
goto out0;
}
goto out;
goto out3;

out_unregister_ibdev:
out0:
ib_unregister_device(&dev->ibdev);
out_free_iwcm:
kfree(dev->ibdev.iwcm);
out_unregister_netdev:
out1:
unregister_netdev(dev->pseudo_netdev);
out_free_netdev:
out2:
free_netdev(dev->pseudo_netdev);
out:
out3:
pr_debug("%s:%u ret=%d\n", __func__, __LINE__, ret);
return ret;
}
Expand Down
5 changes: 1 addition & 4 deletions trunk/drivers/infiniband/hw/cxgb3/cxio_hal.c
Original file line number Diff line number Diff line change
Expand Up @@ -852,9 +852,7 @@ int cxio_rdma_init(struct cxio_rdev *rdev_p, struct t3_rdma_init_attr *attr)
wqe->qpcaps = attr->qpcaps;
wqe->ulpdu_size = cpu_to_be16(attr->tcp_emss);
wqe->rqe_count = cpu_to_be16(attr->rqe_count);
wqe->flags_rtr_type = cpu_to_be16(attr->flags |
V_RTR_TYPE(attr->rtr_type) |
V_CHAN(attr->chan));
wqe->flags_rtr_type = cpu_to_be16(attr->flags|V_RTR_TYPE(attr->rtr_type));
wqe->ord = cpu_to_be32(attr->ord);
wqe->ird = cpu_to_be32(attr->ird);
wqe->qp_dma_addr = cpu_to_be64(attr->qp_dma_addr);
Expand Down Expand Up @@ -1034,7 +1032,6 @@ int cxio_rdev_open(struct cxio_rdev *rdev_p)
err2:
cxio_hal_destroy_ctrl_qp(rdev_p);
err1:
rdev_p->t3cdev_p->ulp = NULL;
list_del(&rdev_p->entry);
return err;
}
Expand Down
6 changes: 0 additions & 6 deletions trunk/drivers/infiniband/hw/cxgb3/cxio_wr.h
Original file line number Diff line number Diff line change
Expand Up @@ -327,11 +327,6 @@ enum rdma_init_rtr_types {
#define V_RTR_TYPE(x) ((x) << S_RTR_TYPE)
#define G_RTR_TYPE(x) ((((x) >> S_RTR_TYPE)) & M_RTR_TYPE)

#define S_CHAN 4
#define M_CHAN 0x3
#define V_CHAN(x) ((x) << S_CHAN)
#define G_CHAN(x) ((((x) >> S_CHAN)) & M_CHAN)

struct t3_rdma_init_attr {
u32 tid;
u32 qpid;
Expand All @@ -351,7 +346,6 @@ struct t3_rdma_init_attr {
u16 flags;
u16 rqe_count;
u32 irs;
u32 chan;
};

struct t3_rdma_init_wr {
Expand Down
37 changes: 12 additions & 25 deletions trunk/drivers/infiniband/hw/cxgb3/iwch.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ cxgb3_cpl_handler_func t3c_handlers[NUM_CPL_CMDS];

static void open_rnic_dev(struct t3cdev *);
static void close_rnic_dev(struct t3cdev *);
static void iwch_event_handler(struct t3cdev *, u32, u32);
static void iwch_err_handler(struct t3cdev *, u32, u32);

struct cxgb3_client t3c_client = {
.name = "iw_cxgb3",
.add = open_rnic_dev,
.remove = close_rnic_dev,
.handlers = t3c_handlers,
.redirect = iwch_ep_redirect,
.event_handler = iwch_event_handler
.err_handler = iwch_err_handler
};

static LIST_HEAD(dev_list);
Expand Down Expand Up @@ -105,9 +105,11 @@ static void rnic_init(struct iwch_dev *rnicp)
static void open_rnic_dev(struct t3cdev *tdev)
{
struct iwch_dev *rnicp;
static int vers_printed;

PDBG("%s t3cdev %p\n", __func__, tdev);
printk_once(KERN_INFO MOD "Chelsio T3 RDMA Driver - version %s\n",
if (!vers_printed++)
printk(KERN_INFO MOD "Chelsio T3 RDMA Driver - version %s\n",
DRV_VERSION);
rnicp = (struct iwch_dev *)ib_alloc_device(sizeof(*rnicp));
if (!rnicp) {
Expand Down Expand Up @@ -160,36 +162,21 @@ static void close_rnic_dev(struct t3cdev *tdev)
mutex_unlock(&dev_mutex);
}

static void iwch_event_handler(struct t3cdev *tdev, u32 evt, u32 port_id)
static void iwch_err_handler(struct t3cdev *tdev, u32 status, u32 error)
{
struct cxio_rdev *rdev = tdev->ulp;
struct iwch_dev *rnicp;
struct iwch_dev *rnicp = rdev_to_iwch_dev(rdev);
struct ib_event event;
u32 portnum = port_id + 1;

if (!rdev)
return;
rnicp = rdev_to_iwch_dev(rdev);
switch (evt) {
case OFFLOAD_STATUS_DOWN: {
if (status == OFFLOAD_STATUS_DOWN) {
rdev->flags = CXIO_ERROR_FATAL;

event.device = &rnicp->ibdev;
event.event = IB_EVENT_DEVICE_FATAL;
break;
}
case OFFLOAD_PORT_DOWN: {
event.event = IB_EVENT_PORT_ERR;
break;
}
case OFFLOAD_PORT_UP: {
event.event = IB_EVENT_PORT_ACTIVE;
break;
}
event.element.port_num = 0;
ib_dispatch_event(&event);
}

event.device = &rnicp->ibdev;
event.element.port_num = portnum;
ib_dispatch_event(&event);

return;
}

Expand Down
Loading

0 comments on commit d4f6c33

Please sign in to comment.