diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-07 15:18:21 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-07 15:18:21 -0400 |
commit | 972d45fb43f0f0793fa275c4a22998106760cd61 (patch) | |
tree | f80ac6698044b179bf3fb9d686bd33083033ccb5 /drivers/infiniband/hw/amso1100 | |
parent | 5b6b54982258c330247957a8d877b9851ac69d53 (diff) | |
parent | 8d1cc86a6278687efbab7b8c294ab01efe4d4231 (diff) |
Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband
* 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband:
IPoIB: Convert to NAPI
IB: Return "maybe missed event" hint from ib_req_notify_cq()
IB: Add CQ comp_vector support
IB/ipath: Fix a race condition when generating ACKs
IB/ipath: Fix two more spin lock problems
IB/fmr_pool: Add prefix to all printks
IB/srp: Set proc_name
IB/srp: Add orig_dgid sysfs attribute to scsi_host
IPoIB/cm: Don't crash if remote side uses one QP for both directions
RDMA/cxgb3: Support for new abort logic
RDMA/cxgb3: Initialize cpu_idx field in cpl_close_listserv_req message
RDMA/cxgb3: Fail qp creation if the requested max_inline is too large
RDMA/cxgb3: Fix TERM codes
IPoIB/cm: Fix error handling in ipoib_cm_dev_open()
IB/ipath: Don't corrupt pending mmap list when unmapped objects are freed
IB/mthca: Work around kernel QP starvation
IB/ipath: Don't put QP in timeout queue if waiting to send
IB/ipath: Don't call spin_lock_irq() from interrupt context
Diffstat (limited to 'drivers/infiniband/hw/amso1100')
-rw-r--r-- | drivers/infiniband/hw/amso1100/c2.h | 2 | ||||
-rw-r--r-- | drivers/infiniband/hw/amso1100/c2_cq.c | 16 | ||||
-rw-r--r-- | drivers/infiniband/hw/amso1100/c2_provider.c | 3 |
3 files changed, 15 insertions, 6 deletions
diff --git a/drivers/infiniband/hw/amso1100/c2.h b/drivers/infiniband/hw/amso1100/c2.h index 04a9db5de881..fa58200217a1 100644 --- a/drivers/infiniband/hw/amso1100/c2.h +++ b/drivers/infiniband/hw/amso1100/c2.h | |||
@@ -519,7 +519,7 @@ extern void c2_free_cq(struct c2_dev *c2dev, struct c2_cq *cq); | |||
519 | extern void c2_cq_event(struct c2_dev *c2dev, u32 mq_index); | 519 | extern void c2_cq_event(struct c2_dev *c2dev, u32 mq_index); |
520 | extern void c2_cq_clean(struct c2_dev *c2dev, struct c2_qp *qp, u32 mq_index); | 520 | extern void c2_cq_clean(struct c2_dev *c2dev, struct c2_qp *qp, u32 mq_index); |
521 | extern int c2_poll_cq(struct ib_cq *ibcq, int num_entries, struct ib_wc *entry); | 521 | extern int c2_poll_cq(struct ib_cq *ibcq, int num_entries, struct ib_wc *entry); |
522 | extern int c2_arm_cq(struct ib_cq *ibcq, enum ib_cq_notify notify); | 522 | extern int c2_arm_cq(struct ib_cq *ibcq, enum ib_cq_notify_flags flags); |
523 | 523 | ||
524 | /* CM */ | 524 | /* CM */ |
525 | extern int c2_llp_connect(struct iw_cm_id *cm_id, | 525 | extern int c2_llp_connect(struct iw_cm_id *cm_id, |
diff --git a/drivers/infiniband/hw/amso1100/c2_cq.c b/drivers/infiniband/hw/amso1100/c2_cq.c index 5175c99ee586..d2b3366786d6 100644 --- a/drivers/infiniband/hw/amso1100/c2_cq.c +++ b/drivers/infiniband/hw/amso1100/c2_cq.c | |||
@@ -217,17 +217,19 @@ int c2_poll_cq(struct ib_cq *ibcq, int num_entries, struct ib_wc *entry) | |||
217 | return npolled; | 217 | return npolled; |
218 | } | 218 | } |
219 | 219 | ||
220 | int c2_arm_cq(struct ib_cq *ibcq, enum ib_cq_notify notify) | 220 | int c2_arm_cq(struct ib_cq *ibcq, enum ib_cq_notify_flags notify_flags) |
221 | { | 221 | { |
222 | struct c2_mq_shared __iomem *shared; | 222 | struct c2_mq_shared __iomem *shared; |
223 | struct c2_cq *cq; | 223 | struct c2_cq *cq; |
224 | unsigned long flags; | ||
225 | int ret = 0; | ||
224 | 226 | ||
225 | cq = to_c2cq(ibcq); | 227 | cq = to_c2cq(ibcq); |
226 | shared = cq->mq.peer; | 228 | shared = cq->mq.peer; |
227 | 229 | ||
228 | if (notify == IB_CQ_NEXT_COMP) | 230 | if ((notify_flags & IB_CQ_SOLICITED_MASK) == IB_CQ_NEXT_COMP) |
229 | writeb(C2_CQ_NOTIFICATION_TYPE_NEXT, &shared->notification_type); | 231 | writeb(C2_CQ_NOTIFICATION_TYPE_NEXT, &shared->notification_type); |
230 | else if (notify == IB_CQ_SOLICITED) | 232 | else if ((notify_flags & IB_CQ_SOLICITED_MASK) == IB_CQ_SOLICITED) |
231 | writeb(C2_CQ_NOTIFICATION_TYPE_NEXT_SE, &shared->notification_type); | 233 | writeb(C2_CQ_NOTIFICATION_TYPE_NEXT_SE, &shared->notification_type); |
232 | else | 234 | else |
233 | return -EINVAL; | 235 | return -EINVAL; |
@@ -241,7 +243,13 @@ int c2_arm_cq(struct ib_cq *ibcq, enum ib_cq_notify notify) | |||
241 | */ | 243 | */ |
242 | readb(&shared->armed); | 244 | readb(&shared->armed); |
243 | 245 | ||
244 | return 0; | 246 | if (notify_flags & IB_CQ_REPORT_MISSED_EVENTS) { |
247 | spin_lock_irqsave(&cq->lock, flags); | ||
248 | ret = !c2_mq_empty(&cq->mq); | ||
249 | spin_unlock_irqrestore(&cq->lock, flags); | ||
250 | } | ||
251 | |||
252 | return ret; | ||
245 | } | 253 | } |
246 | 254 | ||
247 | static void c2_free_cq_buf(struct c2_dev *c2dev, struct c2_mq *mq) | 255 | static void c2_free_cq_buf(struct c2_dev *c2dev, struct c2_mq *mq) |
diff --git a/drivers/infiniband/hw/amso1100/c2_provider.c b/drivers/infiniband/hw/amso1100/c2_provider.c index 607c09bf764c..109166223c09 100644 --- a/drivers/infiniband/hw/amso1100/c2_provider.c +++ b/drivers/infiniband/hw/amso1100/c2_provider.c | |||
@@ -290,7 +290,7 @@ static int c2_destroy_qp(struct ib_qp *ib_qp) | |||
290 | return 0; | 290 | return 0; |
291 | } | 291 | } |
292 | 292 | ||
293 | static struct ib_cq *c2_create_cq(struct ib_device *ibdev, int entries, | 293 | static struct ib_cq *c2_create_cq(struct ib_device *ibdev, int entries, int vector, |
294 | struct ib_ucontext *context, | 294 | struct ib_ucontext *context, |
295 | struct ib_udata *udata) | 295 | struct ib_udata *udata) |
296 | { | 296 | { |
@@ -795,6 +795,7 @@ int c2_register_device(struct c2_dev *dev) | |||
795 | memset(&dev->ibdev.node_guid, 0, sizeof(dev->ibdev.node_guid)); | 795 | memset(&dev->ibdev.node_guid, 0, sizeof(dev->ibdev.node_guid)); |
796 | memcpy(&dev->ibdev.node_guid, dev->pseudo_netdev->dev_addr, 6); | 796 | memcpy(&dev->ibdev.node_guid, dev->pseudo_netdev->dev_addr, 6); |
797 | dev->ibdev.phys_port_cnt = 1; | 797 | dev->ibdev.phys_port_cnt = 1; |
798 | dev->ibdev.num_comp_vectors = 1; | ||
798 | dev->ibdev.dma_device = &dev->pcidev->dev; | 799 | dev->ibdev.dma_device = &dev->pcidev->dev; |
799 | dev->ibdev.query_device = c2_query_device; | 800 | dev->ibdev.query_device = c2_query_device; |
800 | dev->ibdev.query_port = c2_query_port; | 801 | dev->ibdev.query_port = c2_query_port; |