Lines Matching refs:mpt3sas_port

502 	struct _sas_port *mpt3sas_port)  in _transport_delete_port()  argument
504 u64 sas_address = mpt3sas_port->remote_identify.sas_address; in _transport_delete_port()
505 struct hba_port *port = mpt3sas_port->hba_port; in _transport_delete_port()
507 mpt3sas_port->remote_identify.device_type; in _transport_delete_port()
509 dev_printk(KERN_INFO, &mpt3sas_port->port->dev, in _transport_delete_port()
531 struct _sas_port *mpt3sas_port, struct _sas_phy *mpt3sas_phy) in _transport_delete_phy() argument
533 u64 sas_address = mpt3sas_port->remote_identify.sas_address; in _transport_delete_phy()
540 mpt3sas_port->num_phys--; in _transport_delete_phy()
541 sas_port_delete_phy(mpt3sas_port->port, mpt3sas_phy->phy); in _transport_delete_phy()
552 _transport_add_phy(struct MPT3SAS_ADAPTER *ioc, struct _sas_port *mpt3sas_port, in _transport_add_phy() argument
555 u64 sas_address = mpt3sas_port->remote_identify.sas_address; in _transport_add_phy()
561 list_add_tail(&mpt3sas_phy->port_siblings, &mpt3sas_port->phy_list); in _transport_add_phy()
562 mpt3sas_port->num_phys++; in _transport_add_phy()
563 sas_port_add_phy(mpt3sas_port->port, mpt3sas_phy->phy); in _transport_add_phy()
580 struct _sas_port *mpt3sas_port; in mpt3sas_transport_add_phy_to_an_existing_port() local
589 list_for_each_entry(mpt3sas_port, &sas_node->sas_port_list, in mpt3sas_transport_add_phy_to_an_existing_port()
591 if (mpt3sas_port->remote_identify.sas_address != in mpt3sas_transport_add_phy_to_an_existing_port()
594 if (mpt3sas_port->hba_port != port) in mpt3sas_transport_add_phy_to_an_existing_port()
596 list_for_each_entry(phy_srch, &mpt3sas_port->phy_list, in mpt3sas_transport_add_phy_to_an_existing_port()
601 _transport_add_phy(ioc, mpt3sas_port, mpt3sas_phy); in mpt3sas_transport_add_phy_to_an_existing_port()
617 struct _sas_port *mpt3sas_port, *next; in mpt3sas_transport_del_phy_from_an_existing_port() local
623 list_for_each_entry_safe(mpt3sas_port, next, &sas_node->sas_port_list, in mpt3sas_transport_del_phy_from_an_existing_port()
625 list_for_each_entry(phy_srch, &mpt3sas_port->phy_list, in mpt3sas_transport_del_phy_from_an_existing_port()
634 if (mpt3sas_port->num_phys == 1 && !ioc->shost_recovery) in mpt3sas_transport_del_phy_from_an_existing_port()
635 _transport_delete_port(ioc, mpt3sas_port); in mpt3sas_transport_del_phy_from_an_existing_port()
637 _transport_delete_phy(ioc, mpt3sas_port, in mpt3sas_transport_del_phy_from_an_existing_port()
687 struct _sas_port *mpt3sas_port; in mpt3sas_transport_port_add() local
702 mpt3sas_port = kzalloc(sizeof(struct _sas_port), in mpt3sas_transport_port_add()
704 if (!mpt3sas_port) { in mpt3sas_transport_port_add()
710 INIT_LIST_HEAD(&mpt3sas_port->port_list); in mpt3sas_transport_port_add()
711 INIT_LIST_HEAD(&mpt3sas_port->phy_list); in mpt3sas_transport_port_add()
724 &mpt3sas_port->remote_identify))) { in mpt3sas_transport_port_add()
730 if (mpt3sas_port->remote_identify.device_type == SAS_PHY_UNUSED) { in mpt3sas_transport_port_add()
736 mpt3sas_port->hba_port = hba_port; in mpt3sas_transport_port_add()
738 mpt3sas_port->remote_identify.sas_address, hba_port); in mpt3sas_transport_port_add()
742 mpt3sas_port->remote_identify.sas_address) in mpt3sas_transport_port_add()
747 &mpt3sas_port->phy_list); in mpt3sas_transport_port_add()
748 mpt3sas_port->num_phys++; in mpt3sas_transport_port_add()
764 if (!mpt3sas_port->num_phys) { in mpt3sas_transport_port_add()
770 if (mpt3sas_port->remote_identify.device_type == SAS_END_DEVICE) { in mpt3sas_transport_port_add()
772 mpt3sas_port->remote_identify.sas_address, in mpt3sas_transport_port_add()
773 mpt3sas_port->hba_port); in mpt3sas_transport_port_add()
794 list_for_each_entry(mpt3sas_phy, &mpt3sas_port->phy_list, in mpt3sas_transport_port_add()
800 mpt3sas_port->remote_identify.sas_address, in mpt3sas_transport_port_add()
807 mpt3sas_port->port = port; in mpt3sas_transport_port_add()
808 if (mpt3sas_port->remote_identify.device_type == SAS_END_DEVICE) { in mpt3sas_transport_port_add()
821 mpt3sas_port->remote_identify.device_type); in mpt3sas_transport_port_add()
824 mpt3sas_port->remote_identify.sas_address; in mpt3sas_transport_port_add()
827 rphy->identify = mpt3sas_port->remote_identify; in mpt3sas_transport_port_add()
836 if (mpt3sas_port->remote_identify.device_type == SAS_END_DEVICE) { in mpt3sas_transport_port_add()
843 (unsigned long long)mpt3sas_port->remote_identify.sas_address); in mpt3sas_transport_port_add()
845 mpt3sas_port->rphy = rphy; in mpt3sas_transport_port_add()
847 list_add_tail(&mpt3sas_port->port_list, &sas_node->sas_port_list); in mpt3sas_transport_port_add()
851 if (mpt3sas_port->remote_identify.device_type == in mpt3sas_transport_port_add()
853 mpt3sas_port->remote_identify.device_type == in mpt3sas_transport_port_add()
856 mpt3sas_port->remote_identify.sas_address, in mpt3sas_transport_port_add()
858 return mpt3sas_port; in mpt3sas_transport_port_add()
861 list_for_each_entry_safe(mpt3sas_phy, next, &mpt3sas_port->phy_list, in mpt3sas_transport_port_add()
864 kfree(mpt3sas_port); in mpt3sas_transport_port_add()
885 struct _sas_port *mpt3sas_port, *next; in mpt3sas_transport_port_remove() local
902 list_for_each_entry_safe(mpt3sas_port, next, &sas_node->sas_port_list, in mpt3sas_transport_port_remove()
904 if (mpt3sas_port->remote_identify.sas_address != sas_address) in mpt3sas_transport_port_remove()
906 if (mpt3sas_port->hba_port != port) in mpt3sas_transport_port_remove()
909 list_del(&mpt3sas_port->port_list); in mpt3sas_transport_port_remove()
982 &mpt3sas_port->phy_list, port_siblings) { in mpt3sas_transport_port_remove()
984 dev_printk(KERN_INFO, &mpt3sas_port->port->dev, in mpt3sas_transport_port_remove()
987 mpt3sas_port->remote_identify.sas_address, in mpt3sas_transport_port_remove()
991 sas_port_delete_phy(mpt3sas_port->port, in mpt3sas_transport_port_remove()
996 sas_port_delete(mpt3sas_port->port); in mpt3sas_transport_port_remove()
999 kfree(mpt3sas_port); in mpt3sas_transport_port_remove()