Lines Matching refs:adapter

147 	struct ehea_adapter *adapter;  in ehea_update_firmware_handles()  local
157 list_for_each_entry(adapter, &adapter_list, list) { in ehea_update_firmware_handles()
161 struct ehea_port *port = adapter->port[k]; in ehea_update_firmware_handles()
182 list_for_each_entry(adapter, &adapter_list, list) { in ehea_update_firmware_handles()
187 struct ehea_port *port = adapter->port[k]; in ehea_update_firmware_handles()
196 arr[i].adh = adapter->handle; in ehea_update_firmware_handles()
198 arr[i].adh = adapter->handle; in ehea_update_firmware_handles()
200 arr[i].adh = adapter->handle; in ehea_update_firmware_handles()
202 arr[i].adh = adapter->handle; in ehea_update_firmware_handles()
204 arr[i].adh = adapter->handle; in ehea_update_firmware_handles()
206 arr[i].adh = adapter->handle; in ehea_update_firmware_handles()
209 arr[i].adh = adapter->handle; in ehea_update_firmware_handles()
214 arr[i].adh = adapter->handle; in ehea_update_firmware_handles()
215 arr[i++].fwh = adapter->neq->fw_handle; in ehea_update_firmware_handles()
217 if (adapter->mr.handle) { in ehea_update_firmware_handles()
218 arr[i].adh = adapter->handle; in ehea_update_firmware_handles()
219 arr[i++].fwh = adapter->mr.handle; in ehea_update_firmware_handles()
236 struct ehea_adapter *adapter; in ehea_update_bcmc_registrations() local
245 list_for_each_entry(adapter, &adapter_list, list) in ehea_update_bcmc_registrations()
247 struct ehea_port *port = adapter->port[k]; in ehea_update_bcmc_registrations()
265 list_for_each_entry(adapter, &adapter_list, list) { in ehea_update_bcmc_registrations()
267 struct ehea_port *port = adapter->port[k]; in ehea_update_bcmc_registrations()
275 arr[i].adh = adapter->handle; in ehea_update_bcmc_registrations()
281 arr[i].adh = adapter->handle; in ehea_update_bcmc_registrations()
293 arr[i].adh = adapter->handle; in ehea_update_bcmc_registrations()
301 arr[i].adh = adapter->handle; in ehea_update_bcmc_registrations()
362 hret = ehea_h_query_ehea_port(port->adapter->handle, in ehea_update_stats()
940 resource_type = ehea_error_data(port->adapter, qp->fw_handle, in ehea_qp_aff_irq_handler()
961 static struct ehea_port *ehea_get_port(struct ehea_adapter *adapter, in ehea_get_port() argument
967 if (adapter->port[i]) in ehea_get_port()
968 if (adapter->port[i]->logical_port_id == logical_port) in ehea_get_port()
969 return adapter->port[i]; in ehea_get_port()
987 hret = ehea_h_query_ehea_port(port->adapter->handle, in ehea_sense_port_attr()
1076 hret = ehea_h_modify_ehea_port(port->adapter->handle, in ehea_set_portspeed()
1082 hret = ehea_h_query_ehea_port(port->adapter->handle, in ehea_set_portspeed()
1138 static void ehea_parse_eqe(struct ehea_adapter *adapter, u64 eqe) in ehea_parse_eqe() argument
1148 port = ehea_get_port(adapter, portnum); in ehea_parse_eqe()
1221 struct ehea_adapter *adapter = from_tasklet(adapter, t, neq_tasklet); in ehea_neq_tasklet() local
1225 eqe = ehea_poll_eq(adapter->neq); in ehea_neq_tasklet()
1230 ehea_parse_eqe(adapter, eqe->entry); in ehea_neq_tasklet()
1231 eqe = ehea_poll_eq(adapter->neq); in ehea_neq_tasklet()
1239 ehea_h_reset_events(adapter->handle, in ehea_neq_tasklet()
1240 adapter->neq->fw_handle, event_mask); in ehea_neq_tasklet()
1245 struct ehea_adapter *adapter = param; in ehea_interrupt_neq() local
1246 tasklet_hi_schedule(&adapter->neq_tasklet); in ehea_interrupt_neq()
1379 hret = ehea_h_modify_ehea_port(port->adapter->handle, in ehea_configure_port()
1397 struct ehea_adapter *adapter = pr->port->adapter; in ehea_gen_smrs() local
1399 ret = ehea_gen_smr(adapter, &adapter->mr, &pr->send_mr); in ehea_gen_smrs()
1403 ret = ehea_gen_smr(adapter, &adapter->mr, &pr->recv_mr); in ehea_gen_smrs()
1443 struct ehea_adapter *adapter = port->adapter; in ehea_init_port_res() local
1463 pr->eq = ehea_create_eq(adapter, eq_type, EHEA_MAX_ENTRIES_EQ, 0); in ehea_init_port_res()
1469 pr->recv_cq = ehea_create_cq(adapter, pr_cfg->max_entries_rcq, in ehea_init_port_res()
1477 pr->send_cq = ehea_create_cq(adapter, pr_cfg->max_entries_scq, in ehea_init_port_res()
1516 pr->qp = ehea_create_qp(adapter, adapter->pd, init_attr); in ehea_init_port_res()
1691 hret = ehea_h_reg_dereg_bcmc(port->adapter->handle, in ehea_broadcast_reg_helper()
1703 hret = ehea_h_reg_dereg_bcmc(port->adapter->handle, in ehea_broadcast_reg_helper()
1739 hret = ehea_h_modify_ehea_port(port->adapter->handle, in ehea_set_mac_addr()
1803 hret = ehea_h_modify_ehea_port(port->adapter->handle, in ehea_promiscuous()
1826 hret = ehea_h_reg_dereg_bcmc(port->adapter->handle, in ehea_multicast_reg_helper()
1836 hret = ehea_h_reg_dereg_bcmc(port->adapter->handle, in ehea_multicast_reg_helper()
1943 if (netdev_mc_count(dev) > port->adapter->max_mc_mac) { in ehea_set_multicast_list()
1945 port->adapter->max_mc_mac); in ehea_set_multicast_list()
2092 struct ehea_adapter *adapter = port->adapter; in ehea_vlan_rx_add_vid() local
2105 hret = ehea_h_query_ehea_port(adapter->handle, port->logical_port_id, in ehea_vlan_rx_add_vid()
2116 hret = ehea_h_modify_ehea_port(adapter->handle, port->logical_port_id, in ehea_vlan_rx_add_vid()
2130 struct ehea_adapter *adapter = port->adapter; in ehea_vlan_rx_kill_vid() local
2143 hret = ehea_h_query_ehea_port(adapter->handle, port->logical_port_id, in ehea_vlan_rx_kill_vid()
2154 hret = ehea_h_modify_ehea_port(adapter->handle, port->logical_port_id, in ehea_vlan_rx_kill_vid()
2165 static int ehea_activate_qp(struct ehea_adapter *adapter, struct ehea_qp *qp) in ehea_activate_qp() argument
2179 hret = ehea_h_query_ehea_qp(adapter->handle, 0, qp->fw_handle, in ehea_activate_qp()
2187 hret = ehea_h_modify_ehea_qp(adapter->handle, 0, qp->fw_handle, in ehea_activate_qp()
2195 hret = ehea_h_query_ehea_qp(adapter->handle, 0, qp->fw_handle, in ehea_activate_qp()
2203 hret = ehea_h_modify_ehea_qp(adapter->handle, 0, qp->fw_handle, in ehea_activate_qp()
2211 hret = ehea_h_query_ehea_qp(adapter->handle, 0, qp->fw_handle, in ehea_activate_qp()
2219 hret = ehea_h_modify_ehea_qp(adapter->handle, 0, qp->fw_handle, in ehea_activate_qp()
2227 hret = ehea_h_query_ehea_qp(adapter->handle, 0, qp->fw_handle, in ehea_activate_qp()
2246 port->qp_eq = ehea_create_eq(port->adapter, eq_type, in ehea_port_res_setup()
2304 static void ehea_remove_adapter_mr(struct ehea_adapter *adapter) in ehea_remove_adapter_mr() argument
2306 if (adapter->active_ports) in ehea_remove_adapter_mr()
2309 ehea_rem_mr(&adapter->mr); in ehea_remove_adapter_mr()
2312 static int ehea_add_adapter_mr(struct ehea_adapter *adapter) in ehea_add_adapter_mr() argument
2314 if (adapter->active_ports) in ehea_add_adapter_mr()
2317 return ehea_reg_kernel_mr(adapter, &adapter->mr); in ehea_add_adapter_mr()
2348 ret = ehea_activate_qp(port->adapter, port->port_res[i].qp); in ehea_up()
2512 struct ehea_adapter *adapter = port->adapter; in ehea_stop_qps() local
2535 hret = ehea_h_query_ehea_qp(adapter->handle, 0, qp->fw_handle, in ehea_stop_qps()
2546 hret = ehea_h_modify_ehea_qp(adapter->handle, 0, qp->fw_handle, in ehea_stop_qps()
2555 hret = ehea_h_query_ehea_qp(adapter->handle, 0, qp->fw_handle, in ehea_stop_qps()
2614 struct ehea_adapter *adapter = port->adapter; in ehea_restart_qps() local
2640 hret = ehea_h_query_ehea_qp(adapter->handle, 0, qp->fw_handle, in ehea_restart_qps()
2652 hret = ehea_h_modify_ehea_qp(adapter->handle, 0, qp->fw_handle, in ehea_restart_qps()
2662 hret = ehea_h_query_ehea_qp(adapter->handle, 0, qp->fw_handle, in ehea_restart_qps()
2717 struct ehea_adapter *adapter; in ehea_rereg_mrs() local
2721 list_for_each_entry(adapter, &adapter_list, list) in ehea_rereg_mrs()
2722 if (adapter->active_ports) { in ehea_rereg_mrs()
2725 struct ehea_port *port = adapter->port[i]; in ehea_rereg_mrs()
2749 ret = ehea_rem_mr(&adapter->mr); in ehea_rereg_mrs()
2758 list_for_each_entry(adapter, &adapter_list, list) in ehea_rereg_mrs()
2759 if (adapter->active_ports) { in ehea_rereg_mrs()
2761 ret = ehea_reg_kernel_mr(adapter, &adapter->mr); in ehea_rereg_mrs()
2769 struct ehea_port *port = adapter->port[i]; in ehea_rereg_mrs()
2803 static int ehea_sense_adapter_attr(struct ehea_adapter *adapter) in ehea_sense_adapter_attr() argument
2815 hret = ehea_h_query_ehea(adapter->handle, cb); in ehea_sense_adapter_attr()
2822 adapter->max_mc_mac = cb->max_mc_mac - 1; in ehea_sense_adapter_attr()
2846 hret = ehea_h_query_ehea_port(port->adapter->handle, in ehea_get_jumboframe_status()
2855 hret = ehea_h_modify_ehea_port(port->adapter-> in ehea_get_jumboframe_status()
2895 port->ofdev.dev.parent = &port->adapter->ofdev->dev; in ehea_register_port()
2941 static struct ehea_port *ehea_setup_single_port(struct ehea_adapter *adapter, in ehea_setup_single_port() argument
2965 port->adapter = adapter; in ehea_setup_single_port()
3031 adapter->active_ports++; in ehea_setup_single_port()
3052 struct ehea_adapter *adapter = port->adapter; in ehea_shutdown_single_port() local
3060 adapter->active_ports--; in ehea_shutdown_single_port()
3063 static int ehea_setup_ports(struct ehea_adapter *adapter) in ehea_setup_ports() argument
3071 lhea_dn = adapter->ofdev->dev.of_node; in ehea_setup_ports()
3081 if (ehea_add_adapter_mr(adapter)) { in ehea_setup_ports()
3087 adapter->port[i] = ehea_setup_single_port(adapter, in ehea_setup_ports()
3090 if (adapter->port[i]) in ehea_setup_ports()
3091 netdev_info(adapter->port[i]->netdev, in ehea_setup_ports()
3094 ehea_remove_adapter_mr(adapter); in ehea_setup_ports()
3101 static struct device_node *ehea_get_eth_dn(struct ehea_adapter *adapter, in ehea_get_eth_dn() argument
3108 lhea_dn = adapter->ofdev->dev.of_node; in ehea_get_eth_dn()
3125 struct ehea_adapter *adapter = dev_get_drvdata(dev); in probe_port_store() local
3134 port = ehea_get_port(adapter, logical_port_id); in probe_port_store()
3142 eth_dn = ehea_get_eth_dn(adapter, logical_port_id); in probe_port_store()
3149 if (ehea_add_adapter_mr(adapter)) { in probe_port_store()
3155 port = ehea_setup_single_port(adapter, logical_port_id, eth_dn); in probe_port_store()
3161 if (!adapter->port[i]) { in probe_port_store()
3162 adapter->port[i] = port; in probe_port_store()
3169 ehea_remove_adapter_mr(adapter); in probe_port_store()
3180 struct ehea_adapter *adapter = dev_get_drvdata(dev); in remove_port_store() local
3187 port = ehea_get_port(adapter, logical_port_id); in remove_port_store()
3196 if (adapter->port[i] == port) { in remove_port_store()
3197 adapter->port[i] = NULL; in remove_port_store()
3206 ehea_remove_adapter_mr(adapter); in remove_port_store()
3368 struct ehea_adapter *adapter; in ehea_probe_adapter() local
3382 adapter = devm_kzalloc(&dev->dev, sizeof(*adapter), GFP_KERNEL); in ehea_probe_adapter()
3383 if (!adapter) { in ehea_probe_adapter()
3389 list_add(&adapter->list, &adapter_list); in ehea_probe_adapter()
3391 adapter->ofdev = dev; in ehea_probe_adapter()
3396 adapter->handle = *adapter_handle; in ehea_probe_adapter()
3398 if (!adapter->handle) { in ehea_probe_adapter()
3405 adapter->pd = EHEA_PD_ID; in ehea_probe_adapter()
3407 platform_set_drvdata(dev, adapter); in ehea_probe_adapter()
3412 ret = ehea_sense_adapter_attr(adapter); in ehea_probe_adapter()
3418 adapter->neq = ehea_create_eq(adapter, in ehea_probe_adapter()
3420 if (!adapter->neq) { in ehea_probe_adapter()
3426 tasklet_setup(&adapter->neq_tasklet, ehea_neq_tasklet); in ehea_probe_adapter()
3432 ret = ehea_setup_ports(adapter); in ehea_probe_adapter()
3438 ret = ibmebus_request_irq(adapter->neq->attr.ist1, in ehea_probe_adapter()
3440 "ehea_neq", adapter); in ehea_probe_adapter()
3447 tasklet_hi_schedule(&adapter->neq_tasklet); in ehea_probe_adapter()
3454 if (adapter->port[i]) { in ehea_probe_adapter()
3455 ehea_shutdown_single_port(adapter->port[i]); in ehea_probe_adapter()
3456 adapter->port[i] = NULL; in ehea_probe_adapter()
3463 ehea_destroy_eq(adapter->neq); in ehea_probe_adapter()
3466 list_del(&adapter->list); in ehea_probe_adapter()
3476 struct ehea_adapter *adapter = platform_get_drvdata(dev); in ehea_remove() local
3480 if (adapter->port[i]) { in ehea_remove()
3481 ehea_shutdown_single_port(adapter->port[i]); in ehea_remove()
3482 adapter->port[i] = NULL; in ehea_remove()
3487 ibmebus_free_irq(adapter->neq->attr.ist1, adapter); in ehea_remove()
3488 tasklet_kill(&adapter->neq_tasklet); in ehea_remove()
3490 ehea_destroy_eq(adapter->neq); in ehea_remove()
3491 ehea_remove_adapter_mr(adapter); in ehea_remove()
3492 list_del(&adapter->list); in ehea_remove()