aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ehca/ipz_pt_fn.h
diff options
context:
space:
mode:
authorHoang-Nam Nguyen <hnguyen@linux.vnet.ibm.com>2007-02-15 17:06:33 +0100
committerRoland Dreier <rolandd@cisco.com>2007-02-16 13:57:34 -0800
commit78d8d5f9ef8d6179e92b94481cfdfc45d396992f (patch)
tree55ee3cecd4c0d59f418b59870cec2ac33b1b70e7 /drivers/infiniband/hw/ehca/ipz_pt_fn.h
parentIPoIB: Only allow root to change between datagram and connected mode (diff)
downloadlinux-dev-78d8d5f9ef8d6179e92b94481cfdfc45d396992f.tar.xz
linux-dev-78d8d5f9ef8d6179e92b94481cfdfc45d396992f.zip
IB/ehca: Rework irq handler
Rework ehca interrupt handling to avoid/reduce missed irq events. Signed-off-by: Hoang-Nam Nguyen <hnguyen@de.ibm.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to '')
-rw-r--r--drivers/infiniband/hw/ehca/ipz_pt_fn.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/ehca/ipz_pt_fn.h b/drivers/infiniband/hw/ehca/ipz_pt_fn.h
index dc3bda2634b7..8199c45768a3 100644
--- a/drivers/infiniband/hw/ehca/ipz_pt_fn.h
+++ b/drivers/infiniband/hw/ehca/ipz_pt_fn.h
@@ -79,7 +79,7 @@ static inline void *ipz_qeit_calc(struct ipz_queue *queue, u64 q_offset)
if (q_offset >= queue->queue_length)
return NULL;
current_page = (queue->queue_pages)[q_offset >> EHCA_PAGESHIFT];
- return &current_page->entries[q_offset & (EHCA_PAGESIZE - 1)];
+ return &current_page->entries[q_offset & (EHCA_PAGESIZE - 1)];
}
/*
@@ -247,6 +247,15 @@ static inline void *ipz_eqit_eq_get_inc_valid(struct ipz_queue *queue)
return ret;
}
+static inline void *ipz_eqit_eq_peek_valid(struct ipz_queue *queue)
+{
+ void *ret = ipz_qeit_get(queue);
+ u32 qe = *(u8 *) ret;
+ if ((qe >> 7) != (queue->toggle_state & 1))
+ return NULL;
+ return ret;
+}
+
/* returns address (GX) of first queue entry */
static inline u64 ipz_qpt_get_firstpage(struct ipz_qpt *qpt)
{