Lines Matching refs:shca
86 static void print_error_data(struct ehca_shca *shca, void *data, in print_error_data() argument
101 ehca_err(&shca->ib_device, in print_error_data()
110 ehca_err(&shca->ib_device, in print_error_data()
116 ehca_err(&shca->ib_device, in print_error_data()
118 type, shca->ib_device.name); in print_error_data()
122 ehca_err(&shca->ib_device, "Error data is available: %llx.", resource); in print_error_data()
123 ehca_err(&shca->ib_device, "EHCA ----- error data begin " in print_error_data()
126 ehca_err(&shca->ib_device, "EHCA ----- error data end " in print_error_data()
132 int ehca_error_data(struct ehca_shca *shca, void *data, in ehca_error_data() argument
142 ehca_err(&shca->ib_device, "Cannot allocate rblock memory."); in ehca_error_data()
148 ret = hipz_h_error_data(shca->ipz_hca_handle, in ehca_error_data()
154 ehca_err(&shca->ib_device, in ehca_error_data()
164 print_error_data(shca, data, rblock, length); in ehca_error_data()
166 ehca_err(&shca->ib_device, in ehca_error_data()
176 static void dispatch_qp_event(struct ehca_shca *shca, struct ehca_qp *qp, in dispatch_qp_event() argument
185 event.device = &shca->ib_device; in dispatch_qp_event()
203 static void qp_event_callback(struct ehca_shca *shca, u64 eqe, in qp_event_callback() argument
219 ehca_error_data(shca, qp, qp->ipz_qp_handle.handle); in qp_event_callback()
221 dispatch_qp_event(shca, qp, fatal && qp->ext_type == EQPT_SRQ ? in qp_event_callback()
230 dispatch_qp_event(shca, qp, IB_EVENT_QP_LAST_WQE_REACHED); in qp_event_callback()
237 static void cq_event_callback(struct ehca_shca *shca, in cq_event_callback() argument
252 ehca_error_data(shca, cq, cq->ipz_cq_handle.handle); in cq_event_callback()
260 static void parse_identifier(struct ehca_shca *shca, u64 eqe) in parse_identifier() argument
266 qp_event_callback(shca, eqe, IB_EVENT_PATH_MIG, 0); in parse_identifier()
269 qp_event_callback(shca, eqe, IB_EVENT_COMM_EST, 0); in parse_identifier()
272 qp_event_callback(shca, eqe, IB_EVENT_SQ_DRAINED, 0); in parse_identifier()
276 qp_event_callback(shca, eqe, IB_EVENT_QP_FATAL, 1); in parse_identifier()
280 cq_event_callback(shca, eqe); in parse_identifier()
283 ehca_err(&shca->ib_device, "MRMWPTE error."); in parse_identifier()
286 ehca_err(&shca->ib_device, "Port event."); in parse_identifier()
289 ehca_err(&shca->ib_device, "MR access error."); in parse_identifier()
292 ehca_err(&shca->ib_device, "EQ error."); in parse_identifier()
295 ehca_err(&shca->ib_device, "P/Q_Key mismatch."); in parse_identifier()
298 ehca_err(&shca->ib_device, "Sampling complete."); in parse_identifier()
301 ehca_err(&shca->ib_device, "Unaffiliated access error."); in parse_identifier()
304 ehca_err(&shca->ib_device, "Path migrating."); in parse_identifier()
307 ehca_err(&shca->ib_device, "Interface trace stopped."); in parse_identifier()
310 ehca_info(&shca->ib_device, "First error capture available"); in parse_identifier()
313 qp_event_callback(shca, eqe, IB_EVENT_SRQ_LIMIT_REACHED, 0); in parse_identifier()
316 ehca_err(&shca->ib_device, "Unknown identifier: %x on %s.", in parse_identifier()
317 identifier, shca->ib_device.name); in parse_identifier()
324 static void dispatch_port_event(struct ehca_shca *shca, int port_num, in dispatch_port_event() argument
329 ehca_info(&shca->ib_device, "port %d %s.", port_num, msg); in dispatch_port_event()
330 event.device = &shca->ib_device; in dispatch_port_event()
336 static void notify_port_conf_change(struct ehca_shca *shca, int port_num) in notify_port_conf_change() argument
339 struct ehca_sma_attr *old_attr = &shca->sport[port_num - 1].saved_attr; in notify_port_conf_change()
341 ehca_query_sma_attr(shca, port_num, &new_attr); in notify_port_conf_change()
345 dispatch_port_event(shca, port_num, IB_EVENT_SM_CHANGE, in notify_port_conf_change()
350 dispatch_port_event(shca, port_num, IB_EVENT_LID_CHANGE, in notify_port_conf_change()
356 dispatch_port_event(shca, port_num, IB_EVENT_PKEY_CHANGE, in notify_port_conf_change()
382 static void parse_ec(struct ehca_shca *shca, u64 eqe) in parse_ec() argument
387 struct ehca_sport *sport = &shca->sport[port - 1]; in parse_ec()
401 dispatch_port_event(shca, port, IB_EVENT_PORT_ACTIVE, in parse_ec()
403 ehca_query_sma_attr(shca, port, &sport->saved_attr); in parse_ec()
406 dispatch_port_event(shca, port, IB_EVENT_PORT_ERR, in parse_ec()
416 ehca_warn(&shca->ib_device, "disruptive port " in parse_ec()
420 dispatch_port_event(shca, port, IB_EVENT_PORT_ERR, in parse_ec()
424 dispatch_port_event(shca, port, IB_EVENT_PORT_ACTIVE, in parse_ec()
426 ehca_query_sma_attr(shca, port, in parse_ec()
429 notify_port_conf_change(shca, port); in parse_ec()
432 ehca_err(&shca->ib_device, "Adapter malfunction."); in parse_ec()
435 ehca_err(&shca->ib_device, "Traced stopped."); in parse_ec()
440 dispatch_port_event(shca, port, in parse_ec()
444 ehca_warn(&shca->ib_device, "Unknown util async " in parse_ec()
448 ehca_err(&shca->ib_device, "Unknown event code: %x on %s.", in parse_ec()
449 ec, shca->ib_device.name); in parse_ec()
469 struct ehca_shca *shca = (struct ehca_shca*)dev_id; in ehca_interrupt_neq() local
471 tasklet_hi_schedule(&shca->neq.interrupt_task); in ehca_interrupt_neq()
478 struct ehca_shca *shca = (struct ehca_shca*)data; in ehca_tasklet_neq() local
482 eqe = (struct ehca_eqe *)ehca_poll_eq(shca, &shca->neq); in ehca_tasklet_neq()
486 parse_ec(shca, eqe->entry); in ehca_tasklet_neq()
488 eqe = (struct ehca_eqe *)ehca_poll_eq(shca, &shca->neq); in ehca_tasklet_neq()
491 ret = hipz_h_reset_event(shca->ipz_hca_handle, in ehca_tasklet_neq()
492 shca->neq.ipz_eq_handle, 0xFFFFFFFFFFFFFFFFL); in ehca_tasklet_neq()
495 ehca_err(&shca->ib_device, "Can't clear notification events."); in ehca_tasklet_neq()
502 struct ehca_shca *shca = (struct ehca_shca*)dev_id; in ehca_interrupt_eq() local
504 tasklet_hi_schedule(&shca->eq.interrupt_task); in ehca_interrupt_eq()
510 static inline void process_eqe(struct ehca_shca *shca, struct ehca_eqe *eqe) in process_eqe() argument
517 ehca_dbg(&shca->ib_device, "eqe_value=%llx", eqe_value); in process_eqe()
519 ehca_dbg(&shca->ib_device, "Got completion event"); in process_eqe()
527 ehca_err(&shca->ib_device, in process_eqe()
541 ehca_dbg(&shca->ib_device, "Got non completion event"); in process_eqe()
542 parse_identifier(shca, eqe_value); in process_eqe()
546 void ehca_process_eq(struct ehca_shca *shca, int is_irq) in ehca_process_eq() argument
548 struct ehca_eq *eq = &shca->eq; in ehca_process_eq()
562 shca->ipz_hca_handle, eq->ist); in ehca_process_eq()
567 ehca_dbg(&shca->ib_device, "int_state=%x query_cnt=%x", in ehca_process_eq()
576 (struct ehca_eqe *)ehca_poll_eq(shca, eq); in ehca_process_eq()
588 ehca_err(&shca->ib_device, in ehca_process_eq()
599 ehca_dbg(&shca->ib_device, in ehca_process_eq()
605 ehca_err(&shca->ib_device, in ehca_process_eq()
607 ehca_dbg(&shca->ib_device, "deadman found %x eqe", eqe_cnt); in ehca_process_eq()
610 ehca_dbg(&shca->ib_device, "too many eqes for one irq event"); in ehca_process_eq()
618 eq_empty = (!ipz_eqit_eq_peek_valid(&shca->eq.ipz_queue)); in ehca_process_eq()
632 ehca_dbg(&shca->ib_device, "Got non completion event"); in ehca_process_eq()
633 parse_identifier(shca, eq->eqe_cache[i].eqe->entry); in ehca_process_eq()
640 eqe = (struct ehca_eqe *)ehca_poll_eq(shca, &shca->eq); in ehca_process_eq()
643 process_eqe(shca, eqe); in ehca_process_eq()