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
656 mpt3sas_port = kzalloc(sizeof(struct _sas_port), in mpt3sas_transport_port_add()
658 if (!mpt3sas_port) { in mpt3sas_transport_port_add()
664 INIT_LIST_HEAD(&mpt3sas_port->port_list); in mpt3sas_transport_port_add()
665 INIT_LIST_HEAD(&mpt3sas_port->phy_list); in mpt3sas_transport_port_add()
678 &mpt3sas_port->remote_identify))) { in mpt3sas_transport_port_add()
684 if (mpt3sas_port->remote_identify.device_type == SAS_PHY_UNUSED) { in mpt3sas_transport_port_add()
691 mpt3sas_port->remote_identify.sas_address); in mpt3sas_transport_port_add()
695 mpt3sas_port->remote_identify.sas_address) in mpt3sas_transport_port_add()
698 &mpt3sas_port->phy_list); in mpt3sas_transport_port_add()
699 mpt3sas_port->num_phys++; in mpt3sas_transport_port_add()
702 if (!mpt3sas_port->num_phys) { in mpt3sas_transport_port_add()
715 list_for_each_entry(mpt3sas_phy, &mpt3sas_port->phy_list, in mpt3sas_transport_port_add()
721 mpt3sas_port->remote_identify.sas_address, in mpt3sas_transport_port_add()
727 mpt3sas_port->port = port; in mpt3sas_transport_port_add()
728 if (mpt3sas_port->remote_identify.device_type == SAS_END_DEVICE) in mpt3sas_transport_port_add()
732 mpt3sas_port->remote_identify.device_type); in mpt3sas_transport_port_add()
734 rphy->identify = mpt3sas_port->remote_identify; in mpt3sas_transport_port_add()
736 if (mpt3sas_port->remote_identify.device_type == SAS_END_DEVICE) { in mpt3sas_transport_port_add()
738 mpt3sas_port->remote_identify.sas_address); in mpt3sas_transport_port_add()
753 if (mpt3sas_port->remote_identify.device_type == SAS_END_DEVICE) { in mpt3sas_transport_port_add()
762 mpt3sas_port->remote_identify.sas_address); in mpt3sas_transport_port_add()
763 mpt3sas_port->rphy = rphy; in mpt3sas_transport_port_add()
765 list_add_tail(&mpt3sas_port->port_list, &sas_node->sas_port_list); in mpt3sas_transport_port_add()
769 if (mpt3sas_port->remote_identify.device_type == in mpt3sas_transport_port_add()
771 mpt3sas_port->remote_identify.device_type == in mpt3sas_transport_port_add()
774 mpt3sas_port->remote_identify.sas_address, in mpt3sas_transport_port_add()
776 return mpt3sas_port; in mpt3sas_transport_port_add()
779 list_for_each_entry_safe(mpt3sas_phy, next, &mpt3sas_port->phy_list, in mpt3sas_transport_port_add()
782 kfree(mpt3sas_port); in mpt3sas_transport_port_add()
804 struct _sas_port *mpt3sas_port, *next; in mpt3sas_transport_port_remove() local
816 list_for_each_entry_safe(mpt3sas_port, next, &sas_node->sas_port_list, in mpt3sas_transport_port_remove()
818 if (mpt3sas_port->remote_identify.sas_address != sas_address) in mpt3sas_transport_port_remove()
821 list_del(&mpt3sas_port->port_list); in mpt3sas_transport_port_remove()
839 &mpt3sas_port->phy_list, port_siblings) { in mpt3sas_transport_port_remove()
841 dev_printk(KERN_INFO, &mpt3sas_port->port->dev, in mpt3sas_transport_port_remove()
844 mpt3sas_port->remote_identify.sas_address, in mpt3sas_transport_port_remove()
847 sas_port_delete_phy(mpt3sas_port->port, mpt3sas_phy->phy); in mpt3sas_transport_port_remove()
850 sas_port_delete(mpt3sas_port->port); in mpt3sas_transport_port_remove()
851 kfree(mpt3sas_port); in mpt3sas_transport_port_remove()