Lines Matching refs:fdmi

1411 static u16 bfa_fcs_lport_fdmi_build_rhba_pyld(struct bfa_fcs_lport_fdmi_s *fdmi,
1413 static u16 bfa_fcs_lport_fdmi_build_rprt_pyld(struct bfa_fcs_lport_fdmi_s *fdmi,
1415 static u16 bfa_fcs_lport_fdmi_build_rpa_pyld(struct bfa_fcs_lport_fdmi_s *fdmi,
1418 fdmi, u8 *pyld);
1419 static void bfa_fcs_fdmi_get_hbaattr(struct bfa_fcs_lport_fdmi_s *fdmi,
1421 static void bfa_fcs_fdmi_get_portattr(struct bfa_fcs_lport_fdmi_s *fdmi,
1443 static void bfa_fcs_lport_fdmi_sm_offline(struct bfa_fcs_lport_fdmi_s *fdmi,
1446 struct bfa_fcs_lport_fdmi_s *fdmi,
1448 static void bfa_fcs_lport_fdmi_sm_rhba(struct bfa_fcs_lport_fdmi_s *fdmi,
1451 struct bfa_fcs_lport_fdmi_s *fdmi,
1454 struct bfa_fcs_lport_fdmi_s *fdmi,
1456 static void bfa_fcs_lport_fdmi_sm_rprt(struct bfa_fcs_lport_fdmi_s *fdmi,
1459 struct bfa_fcs_lport_fdmi_s *fdmi,
1462 struct bfa_fcs_lport_fdmi_s *fdmi,
1464 static void bfa_fcs_lport_fdmi_sm_rpa(struct bfa_fcs_lport_fdmi_s *fdmi,
1467 struct bfa_fcs_lport_fdmi_s *fdmi,
1469 static void bfa_fcs_lport_fdmi_sm_online(struct bfa_fcs_lport_fdmi_s *fdmi,
1472 struct bfa_fcs_lport_fdmi_s *fdmi,
1478 bfa_fcs_lport_fdmi_sm_offline(struct bfa_fcs_lport_fdmi_s *fdmi, in bfa_fcs_lport_fdmi_sm_offline() argument
1481 struct bfa_fcs_lport_s *port = fdmi->ms->port; in bfa_fcs_lport_fdmi_sm_offline()
1486 fdmi->retry_cnt = 0; in bfa_fcs_lport_fdmi_sm_offline()
1494 bfa_sm_set_state(fdmi, in bfa_fcs_lport_fdmi_sm_offline()
1496 bfa_fcs_lport_fdmi_send_rprt(fdmi, NULL); in bfa_fcs_lport_fdmi_sm_offline()
1503 bfa_sm_set_state(fdmi, in bfa_fcs_lport_fdmi_sm_offline()
1505 bfa_fcs_lport_fdmi_send_rhba(fdmi, NULL); in bfa_fcs_lport_fdmi_sm_offline()
1518 bfa_fcs_lport_fdmi_sm_sending_rhba(struct bfa_fcs_lport_fdmi_s *fdmi, in bfa_fcs_lport_fdmi_sm_sending_rhba() argument
1521 struct bfa_fcs_lport_s *port = fdmi->ms->port; in bfa_fcs_lport_fdmi_sm_sending_rhba()
1528 bfa_sm_set_state(fdmi, bfa_fcs_lport_fdmi_sm_rhba); in bfa_fcs_lport_fdmi_sm_sending_rhba()
1532 bfa_sm_set_state(fdmi, bfa_fcs_lport_fdmi_sm_offline); in bfa_fcs_lport_fdmi_sm_sending_rhba()
1534 &fdmi->fcxp_wqe); in bfa_fcs_lport_fdmi_sm_sending_rhba()
1543 bfa_fcs_lport_fdmi_sm_rhba(struct bfa_fcs_lport_fdmi_s *fdmi, in bfa_fcs_lport_fdmi_sm_rhba() argument
1546 struct bfa_fcs_lport_s *port = fdmi->ms->port; in bfa_fcs_lport_fdmi_sm_rhba()
1557 if (fdmi->retry_cnt++ < BFA_FCS_FDMI_CMD_MAX_RETRIES) { in bfa_fcs_lport_fdmi_sm_rhba()
1558 bfa_sm_set_state(fdmi, in bfa_fcs_lport_fdmi_sm_rhba()
1561 &fdmi->timer, in bfa_fcs_lport_fdmi_sm_rhba()
1562 bfa_fcs_lport_fdmi_timeout, fdmi, in bfa_fcs_lport_fdmi_sm_rhba()
1568 bfa_sm_set_state(fdmi, bfa_fcs_lport_fdmi_sm_offline); in bfa_fcs_lport_fdmi_sm_rhba()
1576 bfa_sm_set_state(fdmi, bfa_fcs_lport_fdmi_sm_sending_rpa); in bfa_fcs_lport_fdmi_sm_rhba()
1577 fdmi->retry_cnt = 0; in bfa_fcs_lport_fdmi_sm_rhba()
1578 bfa_fcs_lport_fdmi_send_rpa(fdmi, NULL); in bfa_fcs_lport_fdmi_sm_rhba()
1582 bfa_fcxp_discard(fdmi->fcxp); in bfa_fcs_lport_fdmi_sm_rhba()
1583 bfa_sm_set_state(fdmi, bfa_fcs_lport_fdmi_sm_offline); in bfa_fcs_lport_fdmi_sm_rhba()
1592 bfa_fcs_lport_fdmi_sm_rhba_retry(struct bfa_fcs_lport_fdmi_s *fdmi, in bfa_fcs_lport_fdmi_sm_rhba_retry() argument
1595 struct bfa_fcs_lport_s *port = fdmi->ms->port; in bfa_fcs_lport_fdmi_sm_rhba_retry()
1605 bfa_sm_set_state(fdmi, bfa_fcs_lport_fdmi_sm_sending_rhba); in bfa_fcs_lport_fdmi_sm_rhba_retry()
1606 bfa_fcs_lport_fdmi_send_rhba(fdmi, NULL); in bfa_fcs_lport_fdmi_sm_rhba_retry()
1610 bfa_sm_set_state(fdmi, bfa_fcs_lport_fdmi_sm_offline); in bfa_fcs_lport_fdmi_sm_rhba_retry()
1611 bfa_timer_stop(&fdmi->timer); in bfa_fcs_lport_fdmi_sm_rhba_retry()
1623 bfa_fcs_lport_fdmi_sm_sending_rprt(struct bfa_fcs_lport_fdmi_s *fdmi, in bfa_fcs_lport_fdmi_sm_sending_rprt() argument
1626 struct bfa_fcs_lport_s *port = fdmi->ms->port; in bfa_fcs_lport_fdmi_sm_sending_rprt()
1633 bfa_sm_set_state(fdmi, bfa_fcs_lport_fdmi_sm_rprt); in bfa_fcs_lport_fdmi_sm_sending_rprt()
1637 bfa_sm_set_state(fdmi, bfa_fcs_lport_fdmi_sm_offline); in bfa_fcs_lport_fdmi_sm_sending_rprt()
1639 &fdmi->fcxp_wqe); in bfa_fcs_lport_fdmi_sm_sending_rprt()
1648 bfa_fcs_lport_fdmi_sm_rprt(struct bfa_fcs_lport_fdmi_s *fdmi, in bfa_fcs_lport_fdmi_sm_rprt() argument
1651 struct bfa_fcs_lport_s *port = fdmi->ms->port; in bfa_fcs_lport_fdmi_sm_rprt()
1662 if (fdmi->retry_cnt++ < BFA_FCS_FDMI_CMD_MAX_RETRIES) { in bfa_fcs_lport_fdmi_sm_rprt()
1663 bfa_sm_set_state(fdmi, in bfa_fcs_lport_fdmi_sm_rprt()
1666 &fdmi->timer, in bfa_fcs_lport_fdmi_sm_rprt()
1667 bfa_fcs_lport_fdmi_timeout, fdmi, in bfa_fcs_lport_fdmi_sm_rprt()
1674 bfa_sm_set_state(fdmi, bfa_fcs_lport_fdmi_sm_offline); in bfa_fcs_lport_fdmi_sm_rprt()
1675 fdmi->retry_cnt = 0; in bfa_fcs_lport_fdmi_sm_rprt()
1680 fdmi->retry_cnt = 0; in bfa_fcs_lport_fdmi_sm_rprt()
1681 bfa_sm_set_state(fdmi, bfa_fcs_lport_fdmi_sm_online); in bfa_fcs_lport_fdmi_sm_rprt()
1685 bfa_fcxp_discard(fdmi->fcxp); in bfa_fcs_lport_fdmi_sm_rprt()
1686 bfa_sm_set_state(fdmi, bfa_fcs_lport_fdmi_sm_offline); in bfa_fcs_lport_fdmi_sm_rprt()
1695 bfa_fcs_lport_fdmi_sm_rprt_retry(struct bfa_fcs_lport_fdmi_s *fdmi, in bfa_fcs_lport_fdmi_sm_rprt_retry() argument
1698 struct bfa_fcs_lport_s *port = fdmi->ms->port; in bfa_fcs_lport_fdmi_sm_rprt_retry()
1708 bfa_sm_set_state(fdmi, bfa_fcs_lport_fdmi_sm_sending_rprt); in bfa_fcs_lport_fdmi_sm_rprt_retry()
1709 bfa_fcs_lport_fdmi_send_rprt(fdmi, NULL); in bfa_fcs_lport_fdmi_sm_rprt_retry()
1713 bfa_sm_set_state(fdmi, bfa_fcs_lport_fdmi_sm_offline); in bfa_fcs_lport_fdmi_sm_rprt_retry()
1714 bfa_timer_stop(&fdmi->timer); in bfa_fcs_lport_fdmi_sm_rprt_retry()
1726 bfa_fcs_lport_fdmi_sm_sending_rpa(struct bfa_fcs_lport_fdmi_s *fdmi, in bfa_fcs_lport_fdmi_sm_sending_rpa() argument
1729 struct bfa_fcs_lport_s *port = fdmi->ms->port; in bfa_fcs_lport_fdmi_sm_sending_rpa()
1736 bfa_sm_set_state(fdmi, bfa_fcs_lport_fdmi_sm_rpa); in bfa_fcs_lport_fdmi_sm_sending_rpa()
1740 bfa_sm_set_state(fdmi, bfa_fcs_lport_fdmi_sm_offline); in bfa_fcs_lport_fdmi_sm_sending_rpa()
1742 &fdmi->fcxp_wqe); in bfa_fcs_lport_fdmi_sm_sending_rpa()
1751 bfa_fcs_lport_fdmi_sm_rpa(struct bfa_fcs_lport_fdmi_s *fdmi, in bfa_fcs_lport_fdmi_sm_rpa() argument
1754 struct bfa_fcs_lport_s *port = fdmi->ms->port; in bfa_fcs_lport_fdmi_sm_rpa()
1765 if (fdmi->retry_cnt++ < BFA_FCS_FDMI_CMD_MAX_RETRIES) { in bfa_fcs_lport_fdmi_sm_rpa()
1766 bfa_sm_set_state(fdmi, bfa_fcs_lport_fdmi_sm_rpa_retry); in bfa_fcs_lport_fdmi_sm_rpa()
1768 &fdmi->timer, in bfa_fcs_lport_fdmi_sm_rpa()
1769 bfa_fcs_lport_fdmi_timeout, fdmi, in bfa_fcs_lport_fdmi_sm_rpa()
1775 bfa_sm_set_state(fdmi, bfa_fcs_lport_fdmi_sm_offline); in bfa_fcs_lport_fdmi_sm_rpa()
1776 fdmi->retry_cnt = 0; in bfa_fcs_lport_fdmi_sm_rpa()
1781 bfa_sm_set_state(fdmi, bfa_fcs_lport_fdmi_sm_online); in bfa_fcs_lport_fdmi_sm_rpa()
1782 fdmi->retry_cnt = 0; in bfa_fcs_lport_fdmi_sm_rpa()
1786 bfa_fcxp_discard(fdmi->fcxp); in bfa_fcs_lport_fdmi_sm_rpa()
1787 bfa_sm_set_state(fdmi, bfa_fcs_lport_fdmi_sm_offline); in bfa_fcs_lport_fdmi_sm_rpa()
1796 bfa_fcs_lport_fdmi_sm_rpa_retry(struct bfa_fcs_lport_fdmi_s *fdmi, in bfa_fcs_lport_fdmi_sm_rpa_retry() argument
1799 struct bfa_fcs_lport_s *port = fdmi->ms->port; in bfa_fcs_lport_fdmi_sm_rpa_retry()
1809 bfa_sm_set_state(fdmi, bfa_fcs_lport_fdmi_sm_sending_rpa); in bfa_fcs_lport_fdmi_sm_rpa_retry()
1810 bfa_fcs_lport_fdmi_send_rpa(fdmi, NULL); in bfa_fcs_lport_fdmi_sm_rpa_retry()
1814 bfa_sm_set_state(fdmi, bfa_fcs_lport_fdmi_sm_offline); in bfa_fcs_lport_fdmi_sm_rpa_retry()
1815 bfa_timer_stop(&fdmi->timer); in bfa_fcs_lport_fdmi_sm_rpa_retry()
1824 bfa_fcs_lport_fdmi_sm_online(struct bfa_fcs_lport_fdmi_s *fdmi, in bfa_fcs_lport_fdmi_sm_online() argument
1827 struct bfa_fcs_lport_s *port = fdmi->ms->port; in bfa_fcs_lport_fdmi_sm_online()
1834 bfa_sm_set_state(fdmi, bfa_fcs_lport_fdmi_sm_offline); in bfa_fcs_lport_fdmi_sm_online()
1845 bfa_fcs_lport_fdmi_sm_disabled(struct bfa_fcs_lport_fdmi_s *fdmi, in bfa_fcs_lport_fdmi_sm_disabled() argument
1848 struct bfa_fcs_lport_s *port = fdmi->ms->port; in bfa_fcs_lport_fdmi_sm_disabled()
1862 struct bfa_fcs_lport_fdmi_s *fdmi = fdmi_cbarg; in bfa_fcs_lport_fdmi_send_rhba() local
1863 struct bfa_fcs_lport_s *port = fdmi->ms->port; in bfa_fcs_lport_fdmi_send_rhba()
1874 bfa_fcs_fcxp_alloc_wait(port->fcs->bfa, &fdmi->fcxp_wqe, in bfa_fcs_lport_fdmi_send_rhba()
1875 bfa_fcs_lport_fdmi_send_rhba, fdmi, BFA_TRUE); in bfa_fcs_lport_fdmi_send_rhba()
1878 fdmi->fcxp = fcxp; in bfa_fcs_lport_fdmi_send_rhba()
1887 bfa_fcs_lport_fdmi_build_rhba_pyld(fdmi, in bfa_fcs_lport_fdmi_send_rhba()
1893 bfa_fcs_lport_fdmi_rhba_response, (void *)fdmi, in bfa_fcs_lport_fdmi_send_rhba()
1896 bfa_sm_send_event(fdmi, FDMISM_EVENT_RHBA_SENT); in bfa_fcs_lport_fdmi_send_rhba()
1900 bfa_fcs_lport_fdmi_build_rhba_pyld(struct bfa_fcs_lport_fdmi_s *fdmi, u8 *pyld) in bfa_fcs_lport_fdmi_build_rhba_pyld() argument
1902 struct bfa_fcs_lport_s *port = fdmi->ms->port; in bfa_fcs_lport_fdmi_build_rhba_pyld()
1914 bfa_fcs_fdmi_get_hbaattr(fdmi, fcs_hba_attr); in bfa_fcs_lport_fdmi_build_rhba_pyld()
2088 if (fdmi->retry_cnt == 0) { in bfa_fcs_lport_fdmi_build_rhba_pyld()
2160 struct bfa_fcs_lport_fdmi_s *fdmi = in bfa_fcs_lport_fdmi_rhba_response() local
2162 struct bfa_fcs_lport_s *port = fdmi->ms->port; in bfa_fcs_lport_fdmi_rhba_response()
2172 bfa_sm_send_event(fdmi, FDMISM_EVENT_RSP_ERROR); in bfa_fcs_lport_fdmi_rhba_response()
2180 bfa_sm_send_event(fdmi, FDMISM_EVENT_RSP_OK); in bfa_fcs_lport_fdmi_rhba_response()
2186 bfa_sm_send_event(fdmi, FDMISM_EVENT_RSP_ERROR); in bfa_fcs_lport_fdmi_rhba_response()
2195 struct bfa_fcs_lport_fdmi_s *fdmi = fdmi_cbarg; in bfa_fcs_lport_fdmi_send_rprt() local
2196 struct bfa_fcs_lport_s *port = fdmi->ms->port; in bfa_fcs_lport_fdmi_send_rprt()
2207 bfa_fcs_fcxp_alloc_wait(port->fcs->bfa, &fdmi->fcxp_wqe, in bfa_fcs_lport_fdmi_send_rprt()
2208 bfa_fcs_lport_fdmi_send_rprt, fdmi, BFA_TRUE); in bfa_fcs_lport_fdmi_send_rprt()
2211 fdmi->fcxp = fcxp; in bfa_fcs_lport_fdmi_send_rprt()
2220 bfa_fcs_lport_fdmi_build_rprt_pyld(fdmi, in bfa_fcs_lport_fdmi_send_rprt()
2226 bfa_fcs_lport_fdmi_rprt_response, (void *)fdmi, in bfa_fcs_lport_fdmi_send_rprt()
2229 bfa_sm_send_event(fdmi, FDMISM_EVENT_RPRT_SENT); in bfa_fcs_lport_fdmi_send_rprt()
2236 bfa_fcs_lport_fdmi_build_portattr_block(struct bfa_fcs_lport_fdmi_s *fdmi, in bfa_fcs_lport_fdmi_build_portattr_block() argument
2250 bfa_fcs_fdmi_get_portattr(fdmi, &fcs_port_attr); in bfa_fcs_lport_fdmi_build_portattr_block()
2344 if (fdmi->retry_cnt == 0) { in bfa_fcs_lport_fdmi_build_portattr_block()
2460 bfa_fcs_lport_fdmi_build_rprt_pyld(struct bfa_fcs_lport_fdmi_s *fdmi, u8 *pyld) in bfa_fcs_lport_fdmi_build_rprt_pyld() argument
2462 struct bfa_fcs_lport_s *port = fdmi->ms->port; in bfa_fcs_lport_fdmi_build_rprt_pyld()
2469 len = bfa_fcs_lport_fdmi_build_portattr_block(fdmi, in bfa_fcs_lport_fdmi_build_rprt_pyld()
2483 struct bfa_fcs_lport_fdmi_s *fdmi = in bfa_fcs_lport_fdmi_rprt_response() local
2485 struct bfa_fcs_lport_s *port = fdmi->ms->port; in bfa_fcs_lport_fdmi_rprt_response()
2495 bfa_sm_send_event(fdmi, FDMISM_EVENT_RSP_ERROR); in bfa_fcs_lport_fdmi_rprt_response()
2503 bfa_sm_send_event(fdmi, FDMISM_EVENT_RSP_OK); in bfa_fcs_lport_fdmi_rprt_response()
2509 bfa_sm_send_event(fdmi, FDMISM_EVENT_RSP_ERROR); in bfa_fcs_lport_fdmi_rprt_response()
2518 struct bfa_fcs_lport_fdmi_s *fdmi = fdmi_cbarg; in bfa_fcs_lport_fdmi_send_rpa() local
2519 struct bfa_fcs_lport_s *port = fdmi->ms->port; in bfa_fcs_lport_fdmi_send_rpa()
2530 bfa_fcs_fcxp_alloc_wait(port->fcs->bfa, &fdmi->fcxp_wqe, in bfa_fcs_lport_fdmi_send_rpa()
2531 bfa_fcs_lport_fdmi_send_rpa, fdmi, BFA_TRUE); in bfa_fcs_lport_fdmi_send_rpa()
2534 fdmi->fcxp = fcxp; in bfa_fcs_lport_fdmi_send_rpa()
2542 attr_len = bfa_fcs_lport_fdmi_build_rpa_pyld(fdmi, in bfa_fcs_lport_fdmi_send_rpa()
2547 bfa_fcs_lport_fdmi_rpa_response, (void *)fdmi, in bfa_fcs_lport_fdmi_send_rpa()
2550 bfa_sm_send_event(fdmi, FDMISM_EVENT_RPA_SENT); in bfa_fcs_lport_fdmi_send_rpa()
2554 bfa_fcs_lport_fdmi_build_rpa_pyld(struct bfa_fcs_lport_fdmi_s *fdmi, u8 *pyld) in bfa_fcs_lport_fdmi_build_rpa_pyld() argument
2556 struct bfa_fcs_lport_s *port = fdmi->ms->port; in bfa_fcs_lport_fdmi_build_rpa_pyld()
2562 len = bfa_fcs_lport_fdmi_build_portattr_block(fdmi, in bfa_fcs_lport_fdmi_build_rpa_pyld()
2575 struct bfa_fcs_lport_fdmi_s *fdmi = in bfa_fcs_lport_fdmi_rpa_response() local
2577 struct bfa_fcs_lport_s *port = fdmi->ms->port; in bfa_fcs_lport_fdmi_rpa_response()
2587 bfa_sm_send_event(fdmi, FDMISM_EVENT_RSP_ERROR); in bfa_fcs_lport_fdmi_rpa_response()
2595 bfa_sm_send_event(fdmi, FDMISM_EVENT_RSP_OK); in bfa_fcs_lport_fdmi_rpa_response()
2601 bfa_sm_send_event(fdmi, FDMISM_EVENT_RSP_ERROR); in bfa_fcs_lport_fdmi_rpa_response()
2607 struct bfa_fcs_lport_fdmi_s *fdmi = (struct bfa_fcs_lport_fdmi_s *) arg; in bfa_fcs_lport_fdmi_timeout() local
2609 bfa_sm_send_event(fdmi, FDMISM_EVENT_TIMEOUT); in bfa_fcs_lport_fdmi_timeout()
2613 bfa_fcs_fdmi_get_hbaattr(struct bfa_fcs_lport_fdmi_s *fdmi, in bfa_fcs_fdmi_get_hbaattr() argument
2616 struct bfa_fcs_lport_s *port = fdmi->ms->port; in bfa_fcs_fdmi_get_hbaattr()
2655 bfa_fcs_fdmi_get_portattr(fdmi, &fcs_port_attr); in bfa_fcs_fdmi_get_hbaattr()
2669 bfa_fcs_fdmi_get_portattr(struct bfa_fcs_lport_fdmi_s *fdmi, in bfa_fcs_fdmi_get_portattr() argument
2672 struct bfa_fcs_lport_s *port = fdmi->ms->port; in bfa_fcs_fdmi_get_portattr()
2793 struct bfa_fcs_lport_fdmi_s *fdmi = &ms->fdmi; in bfa_fcs_lport_fdmi_init() local
2795 fdmi->ms = ms; in bfa_fcs_lport_fdmi_init()
2797 bfa_sm_set_state(fdmi, bfa_fcs_lport_fdmi_sm_offline); in bfa_fcs_lport_fdmi_init()
2799 bfa_sm_set_state(fdmi, bfa_fcs_lport_fdmi_sm_disabled); in bfa_fcs_lport_fdmi_init()
2805 struct bfa_fcs_lport_fdmi_s *fdmi = &ms->fdmi; in bfa_fcs_lport_fdmi_offline() local
2807 fdmi->ms = ms; in bfa_fcs_lport_fdmi_offline()
2808 bfa_sm_send_event(fdmi, FDMISM_EVENT_PORT_OFFLINE); in bfa_fcs_lport_fdmi_offline()
2814 struct bfa_fcs_lport_fdmi_s *fdmi = &ms->fdmi; in bfa_fcs_lport_fdmi_online() local
2816 fdmi->ms = ms; in bfa_fcs_lport_fdmi_online()
2817 bfa_sm_send_event(fdmi, FDMISM_EVENT_PORT_ONLINE); in bfa_fcs_lport_fdmi_online()