Lines Matching refs:irq_ptr
135 nr += q->irq_ptr->nr_input_qs; in qdio_do_eqbs()
137 ccq = do_eqbs(q->irq_ptr->sch_token, state, nr, &tmp_start, &tmp_count, in qdio_do_eqbs()
144 DBF_DEV_EVENT(DBF_WARN, q->irq_ptr, "EQBS again:%2d", ccq); in qdio_do_eqbs()
150 DBF_DEV_EVENT(DBF_WARN, q->irq_ptr, "EQBS part:%02x", in qdio_do_eqbs()
157 q->handler(q->irq_ptr->cdev, QDIO_ERROR_GET_BUF_STATE, in qdio_do_eqbs()
158 q->nr, q->first_to_kick, count, q->irq_ptr->int_parm); in qdio_do_eqbs()
186 nr += q->irq_ptr->nr_input_qs; in qdio_do_sqbs()
188 ccq = do_sqbs(q->irq_ptr->sch_token, state, nr, &tmp_start, &tmp_count); in qdio_do_sqbs()
196 DBF_DEV_EVENT(DBF_INFO, q->irq_ptr, "SQBS again:%2d", ccq); in qdio_do_sqbs()
203 q->handler(q->irq_ptr->cdev, QDIO_ERROR_SET_BUF_STATE, in qdio_do_sqbs()
204 q->nr, q->first_to_kick, count, q->irq_ptr->int_parm); in qdio_do_sqbs()
273 static void qdio_init_buf_states(struct qdio_irq *irq_ptr) in qdio_init_buf_states() argument
278 for_each_input_queue(irq_ptr, q, i) in qdio_init_buf_states()
281 for_each_output_queue(irq_ptr, q, i) in qdio_init_buf_states()
289 unsigned long schid = *((u32 *) &q->irq_ptr->schid); in qdio_siga_sync()
293 DBF_DEV_EVENT(DBF_INFO, q->irq_ptr, "siga-s:%1d", q->nr); in qdio_siga_sync()
297 schid = q->irq_ptr->sch_token; in qdio_siga_sync()
318 unsigned long schid = *((u32 *) &q->irq_ptr->schid); in qdio_siga_output()
332 schid = q->irq_ptr->sch_token; in qdio_siga_output()
350 DBF_DEV_EVENT(DBF_WARN, q->irq_ptr, in qdio_siga_output()
352 DBF_DEV_EVENT(DBF_WARN, q->irq_ptr, "count:%u", retries); in qdio_siga_output()
359 unsigned long schid = *((u32 *) &q->irq_ptr->schid); in qdio_siga_input()
363 DBF_DEV_EVENT(DBF_INFO, q->irq_ptr, "siga-r:%1d", q->nr); in qdio_siga_input()
367 schid = q->irq_ptr->sch_token; in qdio_siga_input()
438 DBF_DEV_EVENT(DBF_INFO, q->irq_ptr, "OUTFULL FTC:%02x", in process_buffer_error()
462 DBF_DEV_EVENT(DBF_INFO, q->irq_ptr, "in prim: %02x", count); in inbound_primed()
534 if (q->irq_ptr->perf_stat_enabled) in get_inbound_buffer_frontier()
541 if (q->irq_ptr->perf_stat_enabled) in get_inbound_buffer_frontier()
547 if (q->irq_ptr->perf_stat_enabled) in get_inbound_buffer_frontier()
549 DBF_DEV_EVENT(DBF_INFO, q->irq_ptr, "in nop"); in get_inbound_buffer_frontier()
566 if (!is_thinint_irq(q->irq_ptr) && MACHINE_IS_LPAR) in qdio_inbound_q_moved()
588 if (is_thinint_irq(q->irq_ptr)) in qdio_inbound_q_done()
600 DBF_DEV_EVENT(DBF_INFO, q->irq_ptr, "in done:%02x", in qdio_inbound_q_done()
667 if (unlikely(q->irq_ptr->state != QDIO_IRQ_STATE_ACTIVE)) in qdio_kick_handler()
674 DBF_DEV_EVENT(DBF_INFO, q->irq_ptr, "kih s:%02x c:%02x", start, count); in qdio_kick_handler()
677 DBF_DEV_EVENT(DBF_INFO, q->irq_ptr, "koh: s:%02x c:%02x", in qdio_kick_handler()
683 q->handler(q->irq_ptr->cdev, q->qdio_error, q->nr, start, count, in qdio_kick_handler()
684 q->irq_ptr->int_parm); in qdio_kick_handler()
693 if (likely(q->irq_ptr->state == QDIO_IRQ_STATE_ACTIVE)) { in qdio_tasklet_schedule()
763 DBF_DEV_EVENT(DBF_INFO, q->irq_ptr, in get_outbound_buffer_frontier()
768 if (q->irq_ptr->perf_stat_enabled) in get_outbound_buffer_frontier()
776 if (q->irq_ptr->perf_stat_enabled) in get_outbound_buffer_frontier()
781 if (q->irq_ptr->perf_stat_enabled) in get_outbound_buffer_frontier()
783 DBF_DEV_EVENT(DBF_INFO, q->irq_ptr, "out primed:%1d", in get_outbound_buffer_frontier()
811 DBF_DEV_EVENT(DBF_INFO, q->irq_ptr, "out moved:%1d", q->nr); in qdio_outbound_q_moved()
825 DBF_DEV_EVENT(DBF_INFO, q->irq_ptr, "siga-w:%1d", q->nr); in qdio_kick_outbound_q()
842 DBF_DEV_EVENT(DBF_INFO, q->irq_ptr, "siga-w cc2:%1d", q->nr); in qdio_kick_outbound_q()
883 likely(q->irq_ptr->state == QDIO_IRQ_STATE_ACTIVE)) in __qdio_outbound_processing()
913 for_each_output_queue(q->irq_ptr, out, i) in qdio_check_outbound_after_thinint()
958 static inline void qdio_set_state(struct qdio_irq *irq_ptr, in qdio_set_state() argument
961 DBF_DEV_EVENT(DBF_INFO, irq_ptr, "newstate: %1d", state); in qdio_set_state()
963 irq_ptr->state = state; in qdio_set_state()
967 static void qdio_irq_check_sense(struct qdio_irq *irq_ptr, struct irb *irb) in qdio_irq_check_sense() argument
970 DBF_ERROR("%4x sense:", irq_ptr->schid.sch_no); in qdio_irq_check_sense()
977 static void qdio_int_handler_pci(struct qdio_irq *irq_ptr) in qdio_int_handler_pci() argument
982 if (unlikely(irq_ptr->state != QDIO_IRQ_STATE_ACTIVE)) in qdio_int_handler_pci()
985 for_each_input_queue(irq_ptr, q, i) { in qdio_int_handler_pci()
993 q->u.in.queue_start_poll(q->irq_ptr->cdev, q->nr, in qdio_int_handler_pci()
994 q->irq_ptr->int_parm); in qdio_int_handler_pci()
1000 if (!(irq_ptr->qib.ac & QIB_AC_OUTBOUND_PCI_SUPPORTED)) in qdio_int_handler_pci()
1003 for_each_output_queue(irq_ptr, q, i) { in qdio_int_handler_pci()
1015 struct qdio_irq *irq_ptr = cdev->private->qdio_data; in qdio_handle_activate_check() local
1019 DBF_ERROR("%4x ACT CHECK", irq_ptr->schid.sch_no); in qdio_handle_activate_check()
1023 if (irq_ptr->nr_input_qs) { in qdio_handle_activate_check()
1024 q = irq_ptr->input_qs[0]; in qdio_handle_activate_check()
1025 } else if (irq_ptr->nr_output_qs) { in qdio_handle_activate_check()
1026 q = irq_ptr->output_qs[0]; in qdio_handle_activate_check()
1033 q->handler(q->irq_ptr->cdev, QDIO_ERROR_ACTIVATE, in qdio_handle_activate_check()
1034 q->nr, q->first_to_kick, count, irq_ptr->int_parm); in qdio_handle_activate_check()
1036 qdio_set_state(irq_ptr, QDIO_IRQ_STATE_STOPPED); in qdio_handle_activate_check()
1047 struct qdio_irq *irq_ptr = cdev->private->qdio_data; in qdio_establish_handle_irq() local
1049 DBF_DEV_EVENT(DBF_INFO, irq_ptr, "qest irq"); in qdio_establish_handle_irq()
1057 qdio_set_state(irq_ptr, QDIO_IRQ_STATE_ESTABLISHED); in qdio_establish_handle_irq()
1061 DBF_ERROR("%4x EQ:error", irq_ptr->schid.sch_no); in qdio_establish_handle_irq()
1063 qdio_set_state(irq_ptr, QDIO_IRQ_STATE_ERR); in qdio_establish_handle_irq()
1070 struct qdio_irq *irq_ptr = cdev->private->qdio_data; in qdio_int_handler() local
1074 if (!intparm || !irq_ptr) { in qdio_int_handler()
1080 if (irq_ptr->perf_stat_enabled) in qdio_int_handler()
1081 irq_ptr->perf_stat.qdio_int++; in qdio_int_handler()
1084 DBF_ERROR("%4x IO error", irq_ptr->schid.sch_no); in qdio_int_handler()
1085 qdio_set_state(irq_ptr, QDIO_IRQ_STATE_ERR); in qdio_int_handler()
1089 qdio_irq_check_sense(irq_ptr, irb); in qdio_int_handler()
1093 switch (irq_ptr->state) { in qdio_int_handler()
1098 qdio_set_state(irq_ptr, QDIO_IRQ_STATE_INACTIVE); in qdio_int_handler()
1103 qdio_int_handler_pci(irq_ptr); in qdio_int_handler()
1142 struct qdio_irq *irq_ptr = cdev->private->qdio_data; in qdio_shutdown_queues() local
1146 for_each_input_queue(irq_ptr, q, i) in qdio_shutdown_queues()
1149 for_each_output_queue(irq_ptr, q, i) { in qdio_shutdown_queues()
1162 struct qdio_irq *irq_ptr = cdev->private->qdio_data; in qdio_shutdown() local
1166 if (!irq_ptr) in qdio_shutdown()
1173 mutex_lock(&irq_ptr->setup_mutex); in qdio_shutdown()
1178 if (irq_ptr->state == QDIO_IRQ_STATE_INACTIVE) { in qdio_shutdown()
1179 mutex_unlock(&irq_ptr->setup_mutex); in qdio_shutdown()
1187 qdio_set_state(irq_ptr, QDIO_IRQ_STATE_STOPPED); in qdio_shutdown()
1189 tiqdio_remove_input_queues(irq_ptr); in qdio_shutdown()
1191 qdio_shutdown_debug_entries(irq_ptr); in qdio_shutdown()
1202 DBF_ERROR("%4x SHUTD ERR", irq_ptr->schid.sch_no); in qdio_shutdown()
1207 qdio_set_state(irq_ptr, QDIO_IRQ_STATE_CLEANUP); in qdio_shutdown()
1210 irq_ptr->state == QDIO_IRQ_STATE_INACTIVE || in qdio_shutdown()
1211 irq_ptr->state == QDIO_IRQ_STATE_ERR, in qdio_shutdown()
1216 qdio_shutdown_thinint(irq_ptr); in qdio_shutdown()
1220 cdev->handler = irq_ptr->orig_handler; in qdio_shutdown()
1223 qdio_set_state(irq_ptr, QDIO_IRQ_STATE_INACTIVE); in qdio_shutdown()
1224 mutex_unlock(&irq_ptr->setup_mutex); in qdio_shutdown()
1237 struct qdio_irq *irq_ptr = cdev->private->qdio_data; in qdio_free() local
1240 if (!irq_ptr) in qdio_free()
1245 DBF_DEV_EVENT(DBF_ERR, irq_ptr, "dbf abandoned"); in qdio_free()
1246 mutex_lock(&irq_ptr->setup_mutex); in qdio_free()
1248 irq_ptr->debug_area = NULL; in qdio_free()
1250 mutex_unlock(&irq_ptr->setup_mutex); in qdio_free()
1252 qdio_release_memory(irq_ptr); in qdio_free()
1264 struct qdio_irq *irq_ptr; in qdio_allocate() local
1282 irq_ptr = (void *) get_zeroed_page(GFP_KERNEL | GFP_DMA); in qdio_allocate()
1283 if (!irq_ptr) in qdio_allocate()
1286 mutex_init(&irq_ptr->setup_mutex); in qdio_allocate()
1287 if (qdio_allocate_dbf(init_data, irq_ptr)) in qdio_allocate()
1296 irq_ptr->chsc_page = get_zeroed_page(GFP_KERNEL); in qdio_allocate()
1297 if (!irq_ptr->chsc_page) in qdio_allocate()
1301 irq_ptr->qdr = (struct qdr *) get_zeroed_page(GFP_KERNEL | GFP_DMA); in qdio_allocate()
1302 if (!irq_ptr->qdr) in qdio_allocate()
1305 if (qdio_allocate_qs(irq_ptr, init_data->no_input_qs, in qdio_allocate()
1309 init_data->cdev->private->qdio_data = irq_ptr; in qdio_allocate()
1310 qdio_set_state(irq_ptr, QDIO_IRQ_STATE_INACTIVE); in qdio_allocate()
1313 qdio_release_memory(irq_ptr); in qdio_allocate()
1319 static void qdio_detect_hsicq(struct qdio_irq *irq_ptr) in qdio_detect_hsicq() argument
1321 struct qdio_q *q = irq_ptr->input_qs[0]; in qdio_detect_hsicq()
1324 if (irq_ptr->nr_input_qs > 1 && queue_type(q) == QDIO_IQDIO_QFMT) in qdio_detect_hsicq()
1327 for_each_output_queue(irq_ptr, q, i) { in qdio_detect_hsicq()
1347 struct qdio_irq *irq_ptr; in qdio_establish() local
1353 irq_ptr = cdev->private->qdio_data; in qdio_establish()
1354 if (!irq_ptr) in qdio_establish()
1357 mutex_lock(&irq_ptr->setup_mutex); in qdio_establish()
1360 rc = qdio_establish_thinint(irq_ptr); in qdio_establish()
1362 mutex_unlock(&irq_ptr->setup_mutex); in qdio_establish()
1368 irq_ptr->ccw.cmd_code = irq_ptr->equeue.cmd; in qdio_establish()
1369 irq_ptr->ccw.flags = CCW_FLAG_SLI; in qdio_establish()
1370 irq_ptr->ccw.count = irq_ptr->equeue.count; in qdio_establish()
1371 irq_ptr->ccw.cda = (u32)((addr_t)irq_ptr->qdr); in qdio_establish()
1376 rc = ccw_device_start(cdev, &irq_ptr->ccw, QDIO_DOING_ESTABLISH, 0, 0); in qdio_establish()
1379 DBF_ERROR("%4x est IO ERR", irq_ptr->schid.sch_no); in qdio_establish()
1381 mutex_unlock(&irq_ptr->setup_mutex); in qdio_establish()
1387 irq_ptr->state == QDIO_IRQ_STATE_ESTABLISHED || in qdio_establish()
1388 irq_ptr->state == QDIO_IRQ_STATE_ERR, HZ); in qdio_establish()
1390 if (irq_ptr->state != QDIO_IRQ_STATE_ESTABLISHED) { in qdio_establish()
1391 mutex_unlock(&irq_ptr->setup_mutex); in qdio_establish()
1396 qdio_setup_ssqd_info(irq_ptr); in qdio_establish()
1398 qdio_detect_hsicq(irq_ptr); in qdio_establish()
1401 qdio_init_buf_states(irq_ptr); in qdio_establish()
1403 mutex_unlock(&irq_ptr->setup_mutex); in qdio_establish()
1404 qdio_print_subchannel_info(irq_ptr, cdev); in qdio_establish()
1405 qdio_setup_debug_entries(irq_ptr, cdev); in qdio_establish()
1417 struct qdio_irq *irq_ptr; in qdio_activate() local
1423 irq_ptr = cdev->private->qdio_data; in qdio_activate()
1424 if (!irq_ptr) in qdio_activate()
1427 mutex_lock(&irq_ptr->setup_mutex); in qdio_activate()
1428 if (irq_ptr->state == QDIO_IRQ_STATE_INACTIVE) { in qdio_activate()
1433 irq_ptr->ccw.cmd_code = irq_ptr->aqueue.cmd; in qdio_activate()
1434 irq_ptr->ccw.flags = CCW_FLAG_SLI; in qdio_activate()
1435 irq_ptr->ccw.count = irq_ptr->aqueue.count; in qdio_activate()
1436 irq_ptr->ccw.cda = 0; in qdio_activate()
1441 rc = ccw_device_start(cdev, &irq_ptr->ccw, QDIO_DOING_ACTIVATE, in qdio_activate()
1445 DBF_ERROR("%4x act IO ERR", irq_ptr->schid.sch_no); in qdio_activate()
1450 if (is_thinint_irq(irq_ptr)) in qdio_activate()
1451 tiqdio_add_input_queues(irq_ptr); in qdio_activate()
1456 switch (irq_ptr->state) { in qdio_activate()
1462 qdio_set_state(irq_ptr, QDIO_IRQ_STATE_ACTIVE); in qdio_activate()
1466 mutex_unlock(&irq_ptr->setup_mutex); in qdio_activate()
1594 likely(q->irq_ptr->state == QDIO_IRQ_STATE_ACTIVE)) in handle_outbound()
1610 struct qdio_irq *irq_ptr; in do_QDIO() local
1615 irq_ptr = cdev->private->qdio_data; in do_QDIO()
1616 if (!irq_ptr) in do_QDIO()
1619 DBF_DEV_EVENT(DBF_INFO, irq_ptr, in do_QDIO()
1622 if (irq_ptr->state != QDIO_IRQ_STATE_ACTIVE) in do_QDIO()
1627 return handle_inbound(irq_ptr->input_qs[q_nr], in do_QDIO()
1630 return handle_outbound(irq_ptr->output_qs[q_nr], in do_QDIO()
1648 struct qdio_irq *irq_ptr = cdev->private->qdio_data; in qdio_start_irq() local
1650 if (!irq_ptr) in qdio_start_irq()
1652 q = irq_ptr->input_qs[nr]; in qdio_start_irq()
1654 clear_nonshared_ind(irq_ptr); in qdio_start_irq()
1662 if (test_nonshared_ind(irq_ptr)) in qdio_start_irq()
1695 struct qdio_irq *irq_ptr = cdev->private->qdio_data; in qdio_get_next_buffers() local
1697 if (!irq_ptr) in qdio_get_next_buffers()
1699 q = irq_ptr->input_qs[nr]; in qdio_get_next_buffers()
1715 if (unlikely(q->irq_ptr->state != QDIO_IRQ_STATE_ACTIVE)) in qdio_get_next_buffers()
1742 struct qdio_irq *irq_ptr = cdev->private->qdio_data; in qdio_stop_irq() local
1744 if (!irq_ptr) in qdio_stop_irq()
1746 q = irq_ptr->input_qs[nr]; in qdio_stop_irq()