Lines Matching refs:eqe
123 struct mlx4_eqe *eqe = get_eqe(eq, eq->cons_index, eqe_factor, size); in next_eqe_sw() local
124 return !!(eqe->owner & 0x80) ^ !!(eq->cons_index & eq->nent) ? NULL : eqe; in next_eqe_sw()
129 struct mlx4_eqe *eqe = in next_slave_event_eqe() local
131 return (!!(eqe->owner & 0x80) ^ in next_slave_event_eqe()
133 eqe : NULL; in next_slave_event_eqe()
146 struct mlx4_eqe *eqe; in mlx4_gen_slave_eqe() local
150 for (eqe = next_slave_event_eqe(slave_eq); eqe; in mlx4_gen_slave_eqe()
151 eqe = next_slave_event_eqe(slave_eq)) { in mlx4_gen_slave_eqe()
152 slave = eqe->slave_id; in mlx4_gen_slave_eqe()
154 if (eqe->type == MLX4_EVENT_TYPE_PORT_CHANGE && in mlx4_gen_slave_eqe()
155 eqe->subtype == MLX4_PORT_CHANGE_SUBTYPE_DOWN && in mlx4_gen_slave_eqe()
169 if (eqe->type == MLX4_EVENT_TYPE_PORT_MNG_CHG_EVENT && in mlx4_gen_slave_eqe()
170 eqe->subtype == MLX4_DEV_PMC_SUBTYPE_PORT_INFO) { in mlx4_gen_slave_eqe()
171 phys_port = eqe->event.port_mgmt_change.port; in mlx4_gen_slave_eqe()
175 eqe->event.port_mgmt_change.port = slave_port; in mlx4_gen_slave_eqe()
177 if (mlx4_GEN_EQE(dev, i, eqe)) in mlx4_gen_slave_eqe()
181 eqe->event.port_mgmt_change.port = phys_port; in mlx4_gen_slave_eqe()
184 if (mlx4_GEN_EQE(dev, slave, eqe)) in mlx4_gen_slave_eqe()
194 static void slave_event(struct mlx4_dev *dev, u8 slave, struct mlx4_eqe *eqe) in slave_event() argument
211 memcpy(s_eqe, eqe, sizeof(struct mlx4_eqe) - 1); in slave_event()
224 struct mlx4_eqe *eqe) in mlx4_slave_event() argument
233 slave_event(dev, slave, eqe); in mlx4_slave_event()
255 struct mlx4_eqe eqe; in mlx4_gen_pkey_eqe() local
263 memset(&eqe, 0, sizeof(eqe)); in mlx4_gen_pkey_eqe()
265 eqe.type = MLX4_EVENT_TYPE_PORT_MNG_CHG_EVENT; in mlx4_gen_pkey_eqe()
266 eqe.subtype = MLX4_DEV_PMC_SUBTYPE_PKEY_TABLE; in mlx4_gen_pkey_eqe()
267 eqe.event.port_mgmt_change.port = mlx4_phys_to_slave_port(dev, slave, port); in mlx4_gen_pkey_eqe()
269 return mlx4_GEN_EQE(dev, slave, &eqe); in mlx4_gen_pkey_eqe()
275 struct mlx4_eqe eqe; in mlx4_gen_guid_change_eqe() local
280 memset(&eqe, 0, sizeof(eqe)); in mlx4_gen_guid_change_eqe()
282 eqe.type = MLX4_EVENT_TYPE_PORT_MNG_CHG_EVENT; in mlx4_gen_guid_change_eqe()
283 eqe.subtype = MLX4_DEV_PMC_SUBTYPE_GUID_INFO; in mlx4_gen_guid_change_eqe()
284 eqe.event.port_mgmt_change.port = mlx4_phys_to_slave_port(dev, slave, port); in mlx4_gen_guid_change_eqe()
286 return mlx4_GEN_EQE(dev, slave, &eqe); in mlx4_gen_guid_change_eqe()
293 struct mlx4_eqe eqe; in mlx4_gen_port_state_change_eqe() local
299 memset(&eqe, 0, sizeof(eqe)); in mlx4_gen_port_state_change_eqe()
301 eqe.type = MLX4_EVENT_TYPE_PORT_CHANGE; in mlx4_gen_port_state_change_eqe()
302 eqe.subtype = port_subtype_change; in mlx4_gen_port_state_change_eqe()
303 eqe.event.port_change.port = cpu_to_be32(slave_port << 28); in mlx4_gen_port_state_change_eqe()
307 return mlx4_GEN_EQE(dev, slave, &eqe); in mlx4_gen_port_state_change_eqe()
434 struct mlx4_eqe eqe; in mlx4_gen_slaves_port_mgt_ev() local
436 memset(&eqe, 0, sizeof(eqe)); in mlx4_gen_slaves_port_mgt_ev()
438 eqe.type = MLX4_EVENT_TYPE_PORT_MNG_CHG_EVENT; in mlx4_gen_slaves_port_mgt_ev()
439 eqe.subtype = MLX4_DEV_PMC_SUBTYPE_PORT_INFO; in mlx4_gen_slaves_port_mgt_ev()
440 eqe.event.port_mgmt_change.port = port; in mlx4_gen_slaves_port_mgt_ev()
441 eqe.event.port_mgmt_change.params.port_info.changed_attr = in mlx4_gen_slaves_port_mgt_ev()
444 slave_event(dev, ALL_SLAVES, &eqe); in mlx4_gen_slaves_port_mgt_ev()
497 struct mlx4_eqe *eqe; in mlx4_eq_int() local
512 while ((eqe = next_eqe_sw(eq, dev->caps.eqe_factor, eqe_size))) { in mlx4_eq_int()
519 switch (eqe->type) { in mlx4_eq_int()
521 cqn = be32_to_cpu(eqe->event.comp.cqn) & 0xffffff; in mlx4_eq_int()
533 mlx4_dbg(dev, "event %d arrived\n", eqe->type); in mlx4_eq_int()
538 be32_to_cpu(eqe->event.qp.qpn) in mlx4_eq_int()
542 eqe->type, eqe->subtype, in mlx4_eq_int()
548 mlx4_slave_event(dev, slave, eqe); in mlx4_eq_int()
553 mlx4_qp_event(dev, be32_to_cpu(eqe->event.qp.qpn) & in mlx4_eq_int()
554 0xffffff, eqe->type); in mlx4_eq_int()
559 __func__, be32_to_cpu(eqe->event.srq.srqn), in mlx4_eq_int()
567 be32_to_cpu(eqe->event.srq.srqn) in mlx4_eq_int()
572 eqe->type, eqe->subtype, in mlx4_eq_int()
576 if (eqe->type == in mlx4_eq_int()
580 be32_to_cpu(eqe->event.srq.srqn), in mlx4_eq_int()
581 eqe->type, eqe->subtype); in mlx4_eq_int()
584 if (eqe->type == in mlx4_eq_int()
587 __func__, eqe->type, in mlx4_eq_int()
588 eqe->subtype, slave); in mlx4_eq_int()
589 mlx4_slave_event(dev, slave, eqe); in mlx4_eq_int()
593 mlx4_srq_event(dev, be32_to_cpu(eqe->event.srq.srqn) & in mlx4_eq_int()
594 0xffffff, eqe->type); in mlx4_eq_int()
599 be16_to_cpu(eqe->event.cmd.token), in mlx4_eq_int()
600 eqe->event.cmd.status, in mlx4_eq_int()
601 be64_to_cpu(eqe->event.cmd.out_param)); in mlx4_eq_int()
606 port = be32_to_cpu(eqe->event.port_change.port) >> 28; in mlx4_eq_int()
608 if (eqe->subtype == MLX4_PORT_CHANGE_SUBTYPE_DOWN) { in mlx4_eq_int()
627 eqe->event.port_change.port = in mlx4_eq_int()
629 (be32_to_cpu(eqe->event.port_change.port) & 0xFFFFFFF) in mlx4_eq_int()
631 mlx4_slave_event(dev, i, eqe); in mlx4_eq_int()
641 eqe->event.port_change.port = in mlx4_eq_int()
643 (be32_to_cpu(eqe->event.port_change.port) & 0xFFFFFFF) in mlx4_eq_int()
645 mlx4_slave_event(dev, i, eqe); in mlx4_eq_int()
668 eqe->event.port_change.port = in mlx4_eq_int()
670 (be32_to_cpu(eqe->event.port_change.port) & 0xFFFFFFF) in mlx4_eq_int()
672 mlx4_slave_event(dev, i, eqe); in mlx4_eq_int()
686 eqe->event.cq_err.syndrome == 1 ? in mlx4_eq_int()
688 be32_to_cpu(eqe->event.cq_err.cqn) & 0xffffff); in mlx4_eq_int()
692 be32_to_cpu(eqe->event.cq_err.cqn) in mlx4_eq_int()
696 eqe->type, eqe->subtype, in mlx4_eq_int()
702 mlx4_slave_event(dev, slave, eqe); in mlx4_eq_int()
707 be32_to_cpu(eqe->event.cq_err.cqn) in mlx4_eq_int()
709 eqe->type); in mlx4_eq_int()
730 eqe->event.comm_channel_arm.bit_vec, in mlx4_eq_int()
731 sizeof(eqe->event.comm_channel_arm.bit_vec)); in mlx4_eq_int()
737 flr_slave = be32_to_cpu(eqe->event.flr_event.slave_id); in mlx4_eq_int()
767 if (eqe->subtype == MLX4_FATAL_WARNING_SUBTYPE_WARMING) { in mlx4_eq_int()
774 mlx4_slave_event(dev, i, eqe); in mlx4_eq_int()
777 be16_to_cpu(eqe->event.warming.warning_threshold), in mlx4_eq_int()
778 be16_to_cpu(eqe->event.warming.current_temperature)); in mlx4_eq_int()
781 eqe->type, eqe->subtype, eq->eqn, in mlx4_eq_int()
782 eq->cons_index, eqe->owner, eq->nent, in mlx4_eq_int()
783 eqe->slave_id, in mlx4_eq_int()
784 !!(eqe->owner & 0x80) ^ in mlx4_eq_int()
791 (unsigned long) eqe); in mlx4_eq_int()
795 switch (eqe->subtype) { in mlx4_eq_int()
798 eqe->event.bad_cable.port); in mlx4_eq_int()
806 eqe->type, eqe->subtype, eq->eqn, in mlx4_eq_int()
807 eq->cons_index, eqe->owner, eq->nent, in mlx4_eq_int()
808 !!(eqe->owner & 0x80) ^ in mlx4_eq_int()
818 eqe->type, eqe->subtype, eq->eqn, in mlx4_eq_int()
819 eq->cons_index, eqe->owner, eq->nent, in mlx4_eq_int()
820 eqe->slave_id, in mlx4_eq_int()
821 !!(eqe->owner & 0x80) ^ in mlx4_eq_int()