Lines Matching refs:mr_sas_phy
595 struct mpi3mr_sas_phy *mr_sas_phy) in mpi3mr_delete_sas_phy() argument
599 dev_info(&mr_sas_phy->phy->dev, in mpi3mr_delete_sas_phy()
601 (unsigned long long) sas_address, mr_sas_phy->phy_id); in mpi3mr_delete_sas_phy()
603 list_del(&mr_sas_phy->port_siblings); in mpi3mr_delete_sas_phy()
605 mr_sas_port->phy_mask &= ~(1 << mr_sas_phy->phy_id); in mpi3mr_delete_sas_phy()
606 if (mr_sas_port->lowest_phy == mr_sas_phy->phy_id) in mpi3mr_delete_sas_phy()
608 sas_port_delete_phy(mr_sas_port->port, mr_sas_phy->phy); in mpi3mr_delete_sas_phy()
609 mr_sas_phy->phy_belongs_to_port = 0; in mpi3mr_delete_sas_phy()
622 struct mpi3mr_sas_phy *mr_sas_phy) in mpi3mr_add_sas_phy() argument
626 dev_info(&mr_sas_phy->phy->dev, in mpi3mr_add_sas_phy()
628 sas_address, mr_sas_phy->phy_id); in mpi3mr_add_sas_phy()
630 list_add_tail(&mr_sas_phy->port_siblings, &mr_sas_port->phy_list); in mpi3mr_add_sas_phy()
632 mr_sas_port->phy_mask |= (1 << mr_sas_phy->phy_id); in mpi3mr_add_sas_phy()
633 if (mr_sas_phy->phy_id < mr_sas_port->lowest_phy) in mpi3mr_add_sas_phy()
635 sas_port_add_phy(mr_sas_port->port, mr_sas_phy->phy); in mpi3mr_add_sas_phy()
636 mr_sas_phy->phy_belongs_to_port = 1; in mpi3mr_add_sas_phy()
651 struct mpi3mr_sas_node *mr_sas_node, struct mpi3mr_sas_phy *mr_sas_phy, in mpi3mr_add_phy_to_an_existing_port() argument
657 if (mr_sas_phy->phy_belongs_to_port == 1) in mpi3mr_add_phy_to_an_existing_port()
672 if (srch_phy == mr_sas_phy) in mpi3mr_add_phy_to_an_existing_port()
675 mpi3mr_add_sas_phy(mrioc, mr_sas_port, mr_sas_phy); in mpi3mr_add_phy_to_an_existing_port()
717 struct mpi3mr_sas_node *mr_sas_node, struct mpi3mr_sas_phy *mr_sas_phy) in mpi3mr_del_phy_from_an_existing_port() argument
722 if (mr_sas_phy->phy_belongs_to_port == 0) in mpi3mr_del_phy_from_an_existing_port()
729 if (srch_phy != mr_sas_phy) in mpi3mr_del_phy_from_an_existing_port()
736 mr_sas_phy); in mpi3mr_del_phy_from_an_existing_port()
862 struct mpi3mr_sas_phy *mr_sas_phy, struct mpi3_sas_phy_page0 phy_pg0, in mpi3mr_add_host_phy() argument
866 int phy_index = mr_sas_phy->phy_id; in mpi3mr_add_host_phy()
869 INIT_LIST_HEAD(&mr_sas_phy->port_siblings); in mpi3mr_add_host_phy()
876 if ((mpi3mr_set_identify(mrioc, mr_sas_phy->handle, in mpi3mr_add_host_phy()
877 &mr_sas_phy->identify))) { in mpi3mr_add_host_phy()
883 phy->identify = mr_sas_phy->identify; in mpi3mr_add_host_phy()
884 mr_sas_phy->attached_handle = le16_to_cpu(phy_pg0.attached_dev_handle); in mpi3mr_add_host_phy()
885 if (mr_sas_phy->attached_handle) in mpi3mr_add_host_phy()
886 mpi3mr_set_identify(mrioc, mr_sas_phy->attached_handle, in mpi3mr_add_host_phy()
887 &mr_sas_phy->remote_identify); in mpi3mr_add_host_phy()
888 phy->identify.phy_identifier = mr_sas_phy->phy_id; in mpi3mr_add_host_phy()
901 phy->hostdata = mr_sas_phy->hba_port; in mpi3mr_add_host_phy()
913 mr_sas_phy->handle, (unsigned long long) in mpi3mr_add_host_phy()
914 mr_sas_phy->identify.sas_address, in mpi3mr_add_host_phy()
915 mr_sas_phy->attached_handle, in mpi3mr_add_host_phy()
917 mr_sas_phy->remote_identify.sas_address); in mpi3mr_add_host_phy()
918 mr_sas_phy->phy = phy; in mpi3mr_add_host_phy()
932 struct mpi3mr_sas_phy *mr_sas_phy, in mpi3mr_add_expander_phy() argument
937 int phy_index = mr_sas_phy->phy_id; in mpi3mr_add_expander_phy()
939 INIT_LIST_HEAD(&mr_sas_phy->port_siblings); in mpi3mr_add_expander_phy()
946 if ((mpi3mr_set_identify(mrioc, mr_sas_phy->handle, in mpi3mr_add_expander_phy()
947 &mr_sas_phy->identify))) { in mpi3mr_add_expander_phy()
953 phy->identify = mr_sas_phy->identify; in mpi3mr_add_expander_phy()
954 mr_sas_phy->attached_handle = in mpi3mr_add_expander_phy()
956 if (mr_sas_phy->attached_handle) in mpi3mr_add_expander_phy()
957 mpi3mr_set_identify(mrioc, mr_sas_phy->attached_handle, in mpi3mr_add_expander_phy()
958 &mr_sas_phy->remote_identify); in mpi3mr_add_expander_phy()
959 phy->identify.phy_identifier = mr_sas_phy->phy_id; in mpi3mr_add_expander_phy()
972 phy->hostdata = mr_sas_phy->hba_port; in mpi3mr_add_expander_phy()
984 mr_sas_phy->handle, (unsigned long long) in mpi3mr_add_expander_phy()
985 mr_sas_phy->identify.sas_address, in mpi3mr_add_expander_phy()
986 mr_sas_phy->attached_handle, in mpi3mr_add_expander_phy()
988 mr_sas_phy->remote_identify.sas_address); in mpi3mr_add_expander_phy()
989 mr_sas_phy->phy = phy; in mpi3mr_add_expander_phy()
1058 struct mpi3mr_sas_phy *mr_sas_phy; in mpi3mr_update_links() local
1071 mr_sas_phy = &mr_sas_node->phy[phy_number]; in mpi3mr_update_links()
1072 mr_sas_phy->attached_handle = handle; in mpi3mr_update_links()
1076 &mr_sas_phy->remote_identify); in mpi3mr_update_links()
1078 mr_sas_phy, mr_sas_phy->remote_identify.sas_address, in mpi3mr_update_links()
1081 memset(&mr_sas_phy->remote_identify, 0, sizeof(struct in mpi3mr_update_links()
1084 if (mr_sas_phy->phy) in mpi3mr_update_links()
1085 mr_sas_phy->phy->negotiated_linkrate = in mpi3mr_update_links()
1089 dev_info(&mr_sas_phy->phy->dev, in mpi3mr_update_links()
1095 mr_sas_phy->remote_identify.sas_address); in mpi3mr_update_links()
1309 struct mpi3mr_sas_phy *mr_sas_phy, *next; in mpi3mr_sas_port_add() local
1403 list_for_each_entry(mr_sas_phy, &mr_sas_port->phy_list, in mpi3mr_sas_port_add()
1410 mr_sas_phy->phy_id); in mpi3mr_sas_port_add()
1411 sas_port_add_phy(port, mr_sas_phy->phy); in mpi3mr_sas_port_add()
1412 mr_sas_phy->phy_belongs_to_port = 1; in mpi3mr_sas_port_add()
1413 mr_sas_phy->hba_port = hba_port; in mpi3mr_sas_port_add()
1467 list_for_each_entry_safe(mr_sas_phy, next, &mr_sas_port->phy_list, in mpi3mr_sas_port_add()
1469 list_del(&mr_sas_phy->port_siblings); in mpi3mr_sas_port_add()
1494 struct mpi3mr_sas_phy *mr_sas_phy, *next_phy; in mpi3mr_sas_port_remove() local
1550 list_for_each_entry_safe(mr_sas_phy, next_phy, in mpi3mr_sas_port_remove()
1558 mr_sas_phy->phy_id); in mpi3mr_sas_port_remove()
1559 mr_sas_phy->phy_belongs_to_port = 0; in mpi3mr_sas_port_remove()
1562 mr_sas_phy->phy); in mpi3mr_sas_port_remove()
1563 list_del(&mr_sas_phy->port_siblings); in mpi3mr_sas_port_remove()
1613 struct mpi3mr_sas_phy *mr_sas_phy; in mpi3mr_update_mr_sas_port() local
1641 mr_sas_phy = &mrioc->sas_hba.phy[i]; in mpi3mr_update_mr_sas_port()
1642 if (mr_sas_phy->phy_belongs_to_port) in mpi3mr_update_mr_sas_port()
1644 &mrioc->sas_hba, mr_sas_phy); in mpi3mr_update_mr_sas_port()
1646 &mrioc->sas_hba, mr_sas_phy, in mpi3mr_update_mr_sas_port()
1653 mr_sas_phy = &mrioc->sas_hba.phy[i]; in mpi3mr_update_mr_sas_port()
1654 if (mr_sas_phy->phy_belongs_to_port) in mpi3mr_update_mr_sas_port()
1656 &mrioc->sas_hba, mr_sas_phy); in mpi3mr_update_mr_sas_port()