Lines Matching refs:fport

176 static int fcip_handle_suspend(fcip_port_info_t *fport, fc_detach_cmd_t cmd);
177 static int fcip_handle_resume(fcip_port_info_t *fport,
179 static fcip_port_info_t *fcip_softstate_free(fcip_port_info_t *fport);
773 fcip_port_info_t *fport = NULL;
808 fport = kmem_zalloc(sizeof (fcip_port_info_t),
810 if (fport == NULL) {
821 fcip_port_head = fport;
845 fport = kmem_zalloc(sizeof (fcip_port_info_t),
847 if (fport == NULL) {
858 fport->fcipp_next = fcip_port_head;
859 fcip_port_head = fport;
867 fport->fcipp_linkage = *port_info->port_linkage;
868 fport->fcipp_handle = port_info->port_handle;
869 fport->fcipp_dip = port_info->port_dip;
870 fport->fcipp_topology = port_info->port_flags;
871 fport->fcipp_pstate = port_info->port_state;
872 fport->fcipp_naa = port_info->port_pwwn.w.naa_id;
873 bcopy(&port_info->port_pwwn, &fport->fcipp_pwwn,
875 bcopy(&port_info->port_nwwn, &fport->fcipp_nwwn,
877 fport->fcipp_fca_pkt_size = port_info->port_fca_pkt_size;
878 fport->fcipp_cmd_dma_attr = *port_info->port_cmd_dma_attr;
879 fport->fcipp_resp_dma_attr = *port_info->port_resp_dma_attr;
880 fport->fcipp_fca_acc_attr = *port_info->port_acc_attr;
883 fport->fcipp_sid = src_id;
888 instance = ddi_get_instance(fport->fcipp_dip);
920 fptr->fcip_dip = fport->fcipp_dip; /* parent's dip */
935 fptr->fcip_port_info = fport;
941 wwn_to_ether(&fport->fcipp_nwwn, &fptr->fcip_macaddr);
943 fport->fcipp_fcip = fptr;
1010 fport = fcip_port_head;
1011 while (fport != NULL) {
1012 if (fport->fcipp_handle == port_info->port_handle) {
1015 fport = fport->fcipp_next;
1017 if (fport == NULL) {
1022 rval = fcip_handle_resume(fport, port_info, cmd);
1037 if (fport) {
1041 (void) fcip_softstate_free(fport);
1065 fcip_port_info_t *fport = fptr->fcip_port_info;
1068 ASSERT(fport != NULL);
1106 fcip_is_supported_fc_topology(fport->fcipp_topology)) {
1165 (void) fcip_softstate_free(fport);
1179 fcip_handle_resume(fcip_port_info_t *fport, fc_ulp_port_info_t *port_info,
1183 struct fcip *fptr = fport->fcipp_fcip;
1208 fport->fcipp_topology = port_info->port_flags;
1209 fport->fcipp_pstate = port_info->port_state;
1277 fcip_port_info_t *fport = fptr->fcip_port_info;
1391 fc_ulp_get_fca_device(fport->fcipp_handle, pmap->map_did);
1399 } else if (FC_TOP_EXTERNAL(fport->fcipp_topology)) {
1512 fcip_port_info_t *fport;
1533 fport = fcip_port_head;
1534 while (fport != NULL) {
1535 fptr = fport->fcipp_fcip;
1583 fport = fport->fcipp_next;
1586 * if fport is non NULL - we have active ports
1588 if (fport != NULL) {
1592 fport = fcip_port_head;
1593 while (fport != NULL) {
1594 fptr = fport->fcipp_fcip;
1598 fport = fport->fcipp_next;
1608 fport = fcip_port_head;
1609 while (fport != NULL) {
1612 fptr = fport->fcipp_fcip;
1626 fport = fcip_softstate_free(fport);
1635 * fport->fcipp_next to find out what
1638 fport = fport->fcipp_next;
1682 fcip_port_info_t *fport;
1705 fport = fcip_port_head;
1706 while (fport != NULL) {
1707 if (fport->fcipp_handle ==
1709 fptr = fport->fcipp_fcip;
1753 (void) fcip_softstate_free(fport);
1759 fport = fport->fcipp_next;
1761 ASSERT(fport == NULL);
1770 fport = fcip_port_head;
1771 while (fport != NULL) {
1772 if (fport->fcipp_handle == port_info->port_handle) {
1775 fport = fport->fcipp_next;
1777 if (fport == NULL) {
1781 rval = fcip_handle_suspend(fport, cmd);
1847 fcip_handle_suspend(fcip_port_info_t *fport, fc_detach_cmd_t cmd)
1849 struct fcip *fptr = fport->fcipp_fcip;
2256 fcip_port_info_t *fport;
2264 fport = fcip_get_port(phandle);
2266 if (fport == NULL) {
2270 fptr = fport->fcipp_fcip;
2277 instance = ddi_get_instance(fport->fcipp_dip);
2303 fport->fcipp_pstate = port_state;
2309 if (fport->fcipp_topology != port_top &&
2314 fport->fcipp_topology, port_top));
2320 fport->fcipp_topology = port_top;
2488 fcip_port_info_t *fport;
2493 fport = fcip_port_head;
2495 while (fport != NULL) {
2496 if (fport->fcipp_handle == phandle) {
2500 fport = fport->fcipp_next;
2505 return (fport);
2517 fcip_port_info_t *fport;
2526 fport = fcip_get_port(phandle);
2527 if (fport == NULL) {
2531 fptr = fport->fcipp_fcip;
2537 instance = ddi_get_instance(fport->fcipp_dip);
2581 &fport->fcipp_nwwn,
2593 (void) fc_ulp_ubrelease(fport->fcipp_handle, 1,
2628 (void) fc_ulp_ubrelease(fport->fcipp_handle, 1,
2671 fcip_port_info_t *fport = fptr->fcip_port_info;
2708 fcmd->resp_pwwn = fport->fcipp_pwwn;
2709 fcmd->resp_nwwn = fport->fcipp_nwwn;
2711 fcip_init_unicast_pkt(fcip_pkt, fport->fcipp_sid,
2715 fc_ulp_get_fca_device(fport->fcipp_handle, fcmd->req_id);
2740 rval = fc_ulp_issue_els(fport->fcipp_handle, fc_pkt);
2822 fcip_port_info_t *fport;
2838 fport = fcip_get_port(phandle);
2839 if (fport == NULL) {
2843 fptr = fport->fcipp_fcip;
2868 tnf_int, instance, ddi_get_instance(fport->fcipp_dip)));
2871 ddi_get_instance(fport->fcipp_dip)));
2927 if ((fcip_wwn_compare(&nhdr->net_dest_addr, &fport->fcipp_pwwn,
3125 fcip_port_info_t *fport;
3130 fport = fptr->fcip_port_info;
3131 if (fport == NULL) {
3134 ASSERT(fport != NULL);
3266 fcip_port_info_t *fport;
3270 fport = fcip_get_port(fesb_argp->phandle);
3271 fptr = fport->fcipp_fcip;
4079 fcip_port_info_t *fport = fptr->fcip_port_info;
4165 if (fc_ulp_init_packet((opaque_t)fport->fcipp_handle,
4180 fcip_init_unicast_pkt(fcip_pkt, fport->fcipp_sid,
4321 fcip_port_info_t *fport;
4331 fport = fptr->fcip_port_info;
4394 rval = fc_ulp_transport(fport->fcipp_handle, fc_pkt);
4501 fcip_port_info_t *fport = fptr->fcip_port_info;
4513 tnf_uint, port_state, fport->fcipp_pstate,
4514 tnf_uint, topology, fport->fcipp_topology));
4516 fport->fcipp_pstate, fport->fcipp_topology));
4523 if (!fcip_is_supported_fc_topology(fport->fcipp_topology)) {
4526 fptr->fcip_instance, fport->fcipp_topology));
4530 switch (fport->fcipp_topology) {
4551 if (fc_ulp_getportmap(fport->fcipp_handle, &port_map,
4602 if (fc_ulp_getportmap(fport->fcipp_handle, &port_map,
4626 fcip_port_info_t *fport = fptr->fcip_port_info;
4651 rfc.rfc_port_id.port_id = fport->fcipp_sid.port_id;
4684 fcip_port_info_t *fport = fptr->fcip_port_info;
4688 ASSERT(fport != NULL);
4739 rval = fc_ulp_uballoc(fport->fcipp_handle, &fptr->fcip_ub_nbufs,
4772 ddi_get_instance(fport->fcipp_dip));
4792 (fport->fcipp_fca_pkt_size + sizeof (fcip_pkt_t)),
4794 NULL, (void *)fport, NULL, 0);
4799 8, fcip_sendup_constructor, NULL, NULL, (void *)fport, NULL, 0);
4857 (void) fc_ulp_ubfree(fport->fcipp_handle, fptr->fcip_ub_nbufs,
4874 fcip_port_info_t *fport = fptr->fcip_port_info;
4887 if ((fport->fcipp_nwwn.w.wwn_hi != 0) ||
4888 (fport->fcipp_nwwn.w.wwn_lo != 0)) {
4891 wwn_to_ether(&fport->fcipp_nwwn, &fptr->fcip_macaddr);
4947 fcip_softstate_free(fcip_port_info_t *fport)
4957 if (fport) {
4958 phandle = fport->fcipp_handle;
4959 fptr = fport->fcipp_fcip;
5070 if (cur_fport == fport) {
5080 ASSERT(cur_fport == fport);
5086 prev_fport->fcipp_next = fport->fcipp_next;
5091 fcip_port_head = fport->fcipp_next;
5093 next_fport = fport->fcipp_next;
5094 kmem_free(fport, sizeof (fcip_port_info_t));
5188 fcip_port_info_t *fport;
5218 fport = fptr->fcip_port_info;
5310 bcopy(&fport->fcipp_pwwn, &headerp->net_src_addr,
5351 fcip_port_info_t *fport;
5377 for (fport = fcip_port_head; fport; fport = fport->fcipp_next) {
5378 if ((fptr = fport->fcipp_fcip) == NULL) {
5391 if (fport == NULL) {
5393 (CE_NOTE, "dlerrorack coz fport==NULL"));
5565 fcip_port_info_t *fport;
5584 fport = fptr->fcip_port_info;
5590 wwn_to_ether(&fport->fcipp_pwwn, &addr);
5735 fcip_port_info_t *fport;
5757 fport = fptr->fcip_port_info;
5806 bcopy(&fport->fcipp_pwwn, &headerp->net_src_addr, sizeof (la_wwn_t));
5837 fcip_port_info_t *fport = (fcip_port_info_t *)arg;
5843 ASSERT(fport != NULL);
5845 fptr = fport->fcipp_fcip;
5870 if (ddi_dma_alloc_handle(fport->fcipp_dip,
5871 &fport->fcipp_cmd_dma_attr, cb, NULL,
5897 fcip_port_info_t *fport = (fcip_port_info_t *)arg;
5900 ASSERT(fport != NULL);
5902 fptr = fport->fcipp_fcip;
5920 fcip_port_info_t *fport;
5942 fport = fptr->fcip_port_info;
6007 pd = fc_ulp_get_remote_port(fport->fcipp_handle,
6022 pd = fc_ulp_get_remote_port(fport->fcipp_handle,
6031 pd = fc_ulp_get_remote_port(fport->fcipp_handle,
6058 (FC_TOP_EXTERNAL(fport->fcipp_topology) ||
6059 (fport->fcipp_topology == FC_TOP_PT_PT))) {
6208 fcip_port_info_t *fport = fptr->fcip_port_info;
6273 fcmd->req_id = fport->fcipp_sid;
6275 bcopy(&fport->fcipp_pwwn, &fcmd->req_pwwn, sizeof (la_wwn_t));
6276 bcopy(&fport->fcipp_nwwn, &fcmd->req_nwwn, sizeof (la_wwn_t));
6299 rval = fc_ulp_issue_els(fport->fcipp_handle, fc_pkt);
6373 fcip_port_info_t *fport = fptr->fcip_port_info;
6418 fr_hdr->s_id = fport->fcipp_sid.port_id;
6449 rval = fc_ulp_login(fport->fcipp_handle, &fc_pkt, 1);
6472 fcip_port_info_t *fport;
6486 fport = fptr->fcip_port_info;
6515 fc_ulp_get_fca_device(fport->fcipp_handle, d_id);
6537 fcip_port_info_t *fport = fptr->fcip_port_info;
6565 fport->fcipp_cmd_dma_attr.dma_attr_sgllen) {
6643 fcip_port_info_t *fport = fptr->fcip_port_info;
6653 fport->fcipp_fca_pkt_size), flags);
6675 &fport->fcipp_cmd_dma_attr, cb, NULL,
6681 &fport->fcipp_fca_acc_attr, DDI_DMA_CONSISTENT,
6705 fport->fcipp_cmd_dma_attr.dma_attr_sgllen) {
6729 &fport->fcipp_resp_dma_attr, cb, NULL,
6735 &fport->fcipp_fca_acc_attr, DDI_DMA_CONSISTENT,
6759 fport->fcipp_resp_dma_attr.dma_attr_sgllen) {
6790 if (fc_ulp_init_packet((opaque_t)fport->fcipp_handle,
6828 fcip_port_info_t *fport = fptr->fcip_port_info;
6853 if (fc_ulp_uninit_packet(fport->fcipp_handle, fc_pkt) != FC_SUCCESS) {
6859 kmem_free(fcip_pkt, (sizeof (fcip_pkt_t) + fport->fcipp_fca_pkt_size));
6913 fcip_port_info_t *fport = fptr->fcip_port_info;
6921 sid = fport->fcipp_sid.port_id;
7101 fcip_port_info_t *fport = fptr->fcip_port_info;
7109 sid = fport->fcipp_sid.port_id;
7111 switch (fport->fcipp_topology) {
7117 if (fc_ulp_getportmap(fport->fcipp_handle, &port_map,
7359 fcip_port_info_t *fport;
7364 fport = fptr->fcip_port_info;
7371 rval = fc_ulp_abort(fport->fcipp_handle, fc_pkt, KM_NOSLEEP);
7587 fcip_port_info_t *fport;
7590 fport = fptr->fcip_port_info;
7593 if (cur_fport == fport) {
7616 fcip_port_info_t *fport = (fcip_port_info_t *)arg;
7618 ASSERT(fport != NULL);