Lines Matching refs:bufnr
203 static inline int get_buf_states(struct qdio_q *q, unsigned int bufnr, in get_buf_states() argument
211 return qdio_do_eqbs(q, state, bufnr, count, auto_ack); in get_buf_states()
214 __state = q->slsb.val[bufnr]; in get_buf_states()
224 bufnr = next_buf(bufnr); in get_buf_states()
228 q->slsb.val[bufnr] == SLSB_P_OUTPUT_PENDING && in get_buf_states()
233 if (q->slsb.val[bufnr] != __state) in get_buf_states()
242 static inline int get_buf_state(struct qdio_q *q, unsigned int bufnr, in get_buf_state() argument
245 return get_buf_states(q, bufnr, state, 1, auto_ack, 0); in get_buf_state()
249 static inline int set_buf_states(struct qdio_q *q, int bufnr, in set_buf_states() argument
255 return qdio_do_sqbs(q, state, bufnr, count); in set_buf_states()
261 WRITE_ONCE(q->slsb.val[bufnr], state); in set_buf_states()
262 bufnr = next_buf(bufnr); in set_buf_states()
271 static inline int set_buf_state(struct qdio_q *q, int bufnr, in set_buf_state() argument
274 return set_buf_states(q, bufnr, state, 1); in set_buf_state()
393 int debug_get_buf_state(struct qdio_q *q, unsigned int bufnr, in debug_get_buf_state() argument
398 return get_buf_state(q, bufnr, state, 0); in debug_get_buf_state()
535 int bufnr) in qdio_aob_for_buffer() argument
539 if (!q->aobs[bufnr]) { in qdio_aob_for_buffer()
541 q->aobs[bufnr] = aob; in qdio_aob_for_buffer()
543 if (q->aobs[bufnr]) { in qdio_aob_for_buffer()
544 q->aobs[bufnr]->user1 = (u64) q->sbal_state[bufnr].user; in qdio_aob_for_buffer()
545 phys_aob = virt_to_phys(q->aobs[bufnr]); in qdio_aob_for_buffer()
549 q->sbal_state[bufnr].flags = 0; in qdio_aob_for_buffer()
1405 int bufnr, int count) in handle_inbound() argument
1412 overlap = min_t(int, count - sub_buf(q->u.in.batch_start, bufnr), in handle_inbound()
1419 count = set_buf_states(q, bufnr, SLSB_CU_INPUT_EMPTY, count); in handle_inbound()
1436 unsigned int bufnr, unsigned int count) in handle_outbound() argument
1444 count = set_buf_states(q, bufnr, SLSB_CU_OUTPUT_PRIMED, count); in handle_outbound()
1460 phys_aob = qdio_aob_for_buffer(&q->u.out, bufnr); in handle_outbound()
1466 get_buf_state(q, prev_buf(bufnr), &state, 0) > 0 && in handle_outbound()
1498 int q_nr, unsigned int bufnr, unsigned int count) in do_QDIO() argument
1502 if (bufnr >= QDIO_MAX_BUFFERS_PER_Q || count > QDIO_MAX_BUFFERS_PER_Q) in do_QDIO()
1509 "do%02x b:%02x c:%02x", callflags, bufnr, count); in do_QDIO()
1517 callflags, bufnr, count); in do_QDIO()
1520 callflags, bufnr, count); in do_QDIO()
1570 static int __qdio_inspect_queue(struct qdio_q *q, unsigned int *bufnr, in __qdio_inspect_queue() argument
1581 *bufnr = start; in __qdio_inspect_queue()
1592 unsigned int *bufnr, unsigned int *error) in qdio_inspect_queue() argument
1604 return __qdio_inspect_queue(q, bufnr, error); in qdio_inspect_queue()
1620 int qdio_get_next_buffers(struct ccw_device *cdev, int nr, int *bufnr, in qdio_get_next_buffers() argument
1643 return __qdio_inspect_queue(q, bufnr, error); in qdio_get_next_buffers()