Lines Matching refs:mpt3sas_port

471 	struct _sas_port *mpt3sas_port)  in _transport_delete_port()  argument
473 u64 sas_address = mpt3sas_port->remote_identify.sas_address; in _transport_delete_port()
475 mpt3sas_port->remote_identify.device_type; in _transport_delete_port()
477 dev_printk(KERN_INFO, &mpt3sas_port->port->dev, in _transport_delete_port()
500 struct _sas_port *mpt3sas_port, struct _sas_phy *mpt3sas_phy) in _transport_delete_phy() argument
502 u64 sas_address = mpt3sas_port->remote_identify.sas_address; in _transport_delete_phy()
509 mpt3sas_port->num_phys--; in _transport_delete_phy()
510 sas_port_delete_phy(mpt3sas_port->port, mpt3sas_phy->phy); in _transport_delete_phy()
523 _transport_add_phy(struct MPT3SAS_ADAPTER *ioc, struct _sas_port *mpt3sas_port, in _transport_add_phy() argument
526 u64 sas_address = mpt3sas_port->remote_identify.sas_address; in _transport_add_phy()
532 list_add_tail(&mpt3sas_phy->port_siblings, &mpt3sas_port->phy_list); in _transport_add_phy()
533 mpt3sas_port->num_phys++; in _transport_add_phy()
534 sas_port_add_phy(mpt3sas_port->port, mpt3sas_phy->phy); in _transport_add_phy()
552 struct _sas_port *mpt3sas_port; in _transport_add_phy_to_an_existing_port() local
558 list_for_each_entry(mpt3sas_port, &sas_node->sas_port_list, in _transport_add_phy_to_an_existing_port()
560 if (mpt3sas_port->remote_identify.sas_address != in _transport_add_phy_to_an_existing_port()
563 list_for_each_entry(phy_srch, &mpt3sas_port->phy_list, in _transport_add_phy_to_an_existing_port()
568 _transport_add_phy(ioc, mpt3sas_port, mpt3sas_phy); in _transport_add_phy_to_an_existing_port()
586 struct _sas_port *mpt3sas_port, *next; in _transport_del_phy_from_an_existing_port() local
592 list_for_each_entry_safe(mpt3sas_port, next, &sas_node->sas_port_list, in _transport_del_phy_from_an_existing_port()
594 list_for_each_entry(phy_srch, &mpt3sas_port->phy_list, in _transport_del_phy_from_an_existing_port()
599 if (mpt3sas_port->num_phys == 1) in _transport_del_phy_from_an_existing_port()
600 _transport_delete_port(ioc, mpt3sas_port); in _transport_del_phy_from_an_existing_port()
602 _transport_delete_phy(ioc, mpt3sas_port, in _transport_del_phy_from_an_existing_port()
648 struct _sas_port *mpt3sas_port; in mpt3sas_transport_port_add() local
655 mpt3sas_port = kzalloc(sizeof(struct _sas_port), in mpt3sas_transport_port_add()
657 if (!mpt3sas_port) { in mpt3sas_transport_port_add()
663 INIT_LIST_HEAD(&mpt3sas_port->port_list); in mpt3sas_transport_port_add()
664 INIT_LIST_HEAD(&mpt3sas_port->phy_list); in mpt3sas_transport_port_add()
677 &mpt3sas_port->remote_identify))) { in mpt3sas_transport_port_add()
683 if (mpt3sas_port->remote_identify.device_type == SAS_PHY_UNUSED) { in mpt3sas_transport_port_add()
690 mpt3sas_port->remote_identify.sas_address); in mpt3sas_transport_port_add()
694 mpt3sas_port->remote_identify.sas_address) in mpt3sas_transport_port_add()
697 &mpt3sas_port->phy_list); in mpt3sas_transport_port_add()
698 mpt3sas_port->num_phys++; in mpt3sas_transport_port_add()
701 if (!mpt3sas_port->num_phys) { in mpt3sas_transport_port_add()
714 list_for_each_entry(mpt3sas_phy, &mpt3sas_port->phy_list, in mpt3sas_transport_port_add()
720 mpt3sas_port->remote_identify.sas_address, in mpt3sas_transport_port_add()
726 mpt3sas_port->port = port; in mpt3sas_transport_port_add()
727 if (mpt3sas_port->remote_identify.device_type == SAS_END_DEVICE) in mpt3sas_transport_port_add()
731 mpt3sas_port->remote_identify.device_type); in mpt3sas_transport_port_add()
733 rphy->identify = mpt3sas_port->remote_identify; in mpt3sas_transport_port_add()
742 mpt3sas_port->remote_identify.sas_address); in mpt3sas_transport_port_add()
743 mpt3sas_port->rphy = rphy; in mpt3sas_transport_port_add()
745 list_add_tail(&mpt3sas_port->port_list, &sas_node->sas_port_list); in mpt3sas_transport_port_add()
749 if (mpt3sas_port->remote_identify.device_type == in mpt3sas_transport_port_add()
751 mpt3sas_port->remote_identify.device_type == in mpt3sas_transport_port_add()
754 mpt3sas_port->remote_identify.sas_address, in mpt3sas_transport_port_add()
756 return mpt3sas_port; in mpt3sas_transport_port_add()
759 list_for_each_entry_safe(mpt3sas_phy, next, &mpt3sas_port->phy_list, in mpt3sas_transport_port_add()
762 kfree(mpt3sas_port); in mpt3sas_transport_port_add()
784 struct _sas_port *mpt3sas_port, *next; in mpt3sas_transport_port_remove() local
796 list_for_each_entry_safe(mpt3sas_port, next, &sas_node->sas_port_list, in mpt3sas_transport_port_remove()
798 if (mpt3sas_port->remote_identify.sas_address != sas_address) in mpt3sas_transport_port_remove()
801 list_del(&mpt3sas_port->port_list); in mpt3sas_transport_port_remove()
819 &mpt3sas_port->phy_list, port_siblings) { in mpt3sas_transport_port_remove()
821 dev_printk(KERN_INFO, &mpt3sas_port->port->dev, in mpt3sas_transport_port_remove()
824 mpt3sas_port->remote_identify.sas_address, in mpt3sas_transport_port_remove()
827 sas_port_delete_phy(mpt3sas_port->port, mpt3sas_phy->phy); in mpt3sas_transport_port_remove()
830 sas_port_delete(mpt3sas_port->port); in mpt3sas_transport_port_remove()
831 kfree(mpt3sas_port); in mpt3sas_transport_port_remove()