s390/qdio: clean up AOB handling
I've stumbled over this too many times now... AOBs are only ever used on Output Queues. So in qdio_kick_handler(), move the call to their handler into the Output-only path, and get rid of the convoluted contains_aobs() helper. No functional change. While at it, also remove 1. the unused sbal_state->aob field. For processing an async completion, upper-layer drivers get their AOB pointer from the CQ buffer. 2. an unused EXPORT for qdio_allocate_aob(). External users would have no way of passing an allocated AOB back into qdio.ko anyways... Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:

committed by
Martin Schwidefsky

vanhempi
4e62d45885
commit
ccc413f621
@@ -595,19 +595,11 @@ static inline int qdio_inbound_q_done(struct qdio_q *q)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int contains_aobs(struct qdio_q *q)
|
||||
{
|
||||
return !q->is_input_q && q->u.out.use_cq;
|
||||
}
|
||||
|
||||
static inline void qdio_handle_aobs(struct qdio_q *q, int start, int count)
|
||||
{
|
||||
unsigned char state = 0;
|
||||
int j, b = start;
|
||||
|
||||
if (!contains_aobs(q))
|
||||
return;
|
||||
|
||||
for (j = 0; j < count; ++j) {
|
||||
get_buf_state(q, b, &state, 0);
|
||||
if (state == SLSB_P_OUTPUT_PENDING) {
|
||||
@@ -618,8 +610,6 @@ static inline void qdio_handle_aobs(struct qdio_q *q, int start, int count)
|
||||
q->u.out.sbal_state[b].flags |=
|
||||
QDIO_OUTBUF_STATE_FLAG_PENDING;
|
||||
q->u.out.aobs[b] = NULL;
|
||||
} else if (state == SLSB_P_OUTPUT_EMPTY) {
|
||||
q->u.out.sbal_state[b].aob = NULL;
|
||||
}
|
||||
b = next_buf(b);
|
||||
}
|
||||
@@ -638,7 +628,6 @@ static inline unsigned long qdio_aob_for_buffer(struct qdio_output_q *q,
|
||||
q->aobs[bufnr] = aob;
|
||||
}
|
||||
if (q->aobs[bufnr]) {
|
||||
q->sbal_state[bufnr].aob = q->aobs[bufnr];
|
||||
q->aobs[bufnr]->user1 = (u64) q->sbal_state[bufnr].user;
|
||||
phys_aob = virt_to_phys(q->aobs[bufnr]);
|
||||
WARN_ON_ONCE(phys_aob & 0xFF);
|
||||
@@ -666,10 +655,10 @@ static void qdio_kick_handler(struct qdio_q *q)
|
||||
qperf_inc(q, outbound_handler);
|
||||
DBF_DEV_EVENT(DBF_INFO, q->irq_ptr, "koh: s:%02x c:%02x",
|
||||
start, count);
|
||||
if (q->u.out.use_cq)
|
||||
qdio_handle_aobs(q, start, count);
|
||||
}
|
||||
|
||||
qdio_handle_aobs(q, start, count);
|
||||
|
||||
q->handler(q->irq_ptr->cdev, q->qdio_error, q->nr, start, count,
|
||||
q->irq_ptr->int_parm);
|
||||
|
||||
|
Viittaa uudesa ongelmassa
Block a user