Lines Matching refs:mpt3sas_port
439 struct _sas_port *mpt3sas_port) in _transport_delete_port() argument
441 u64 sas_address = mpt3sas_port->remote_identify.sas_address; in _transport_delete_port()
443 mpt3sas_port->remote_identify.device_type; in _transport_delete_port()
445 dev_printk(KERN_INFO, &mpt3sas_port->port->dev, in _transport_delete_port()
466 struct _sas_port *mpt3sas_port, struct _sas_phy *mpt3sas_phy) in _transport_delete_phy() argument
468 u64 sas_address = mpt3sas_port->remote_identify.sas_address; in _transport_delete_phy()
475 mpt3sas_port->num_phys--; in _transport_delete_phy()
476 sas_port_delete_phy(mpt3sas_port->port, mpt3sas_phy->phy); in _transport_delete_phy()
487 _transport_add_phy(struct MPT3SAS_ADAPTER *ioc, struct _sas_port *mpt3sas_port, in _transport_add_phy() argument
490 u64 sas_address = mpt3sas_port->remote_identify.sas_address; in _transport_add_phy()
496 list_add_tail(&mpt3sas_phy->port_siblings, &mpt3sas_port->phy_list); in _transport_add_phy()
497 mpt3sas_port->num_phys++; in _transport_add_phy()
498 sas_port_add_phy(mpt3sas_port->port, mpt3sas_phy->phy); in _transport_add_phy()
514 struct _sas_port *mpt3sas_port; in _transport_add_phy_to_an_existing_port() local
520 list_for_each_entry(mpt3sas_port, &sas_node->sas_port_list, in _transport_add_phy_to_an_existing_port()
522 if (mpt3sas_port->remote_identify.sas_address != in _transport_add_phy_to_an_existing_port()
525 list_for_each_entry(phy_srch, &mpt3sas_port->phy_list, in _transport_add_phy_to_an_existing_port()
530 _transport_add_phy(ioc, mpt3sas_port, mpt3sas_phy); in _transport_add_phy_to_an_existing_port()
546 struct _sas_port *mpt3sas_port, *next; in _transport_del_phy_from_an_existing_port() local
552 list_for_each_entry_safe(mpt3sas_port, next, &sas_node->sas_port_list, in _transport_del_phy_from_an_existing_port()
554 list_for_each_entry(phy_srch, &mpt3sas_port->phy_list, in _transport_del_phy_from_an_existing_port()
559 if (mpt3sas_port->num_phys == 1) in _transport_del_phy_from_an_existing_port()
560 _transport_delete_port(ioc, mpt3sas_port); in _transport_del_phy_from_an_existing_port()
562 _transport_delete_phy(ioc, mpt3sas_port, in _transport_del_phy_from_an_existing_port()
608 struct _sas_port *mpt3sas_port; in mpt3sas_transport_port_add() local
616 mpt3sas_port = kzalloc(sizeof(struct _sas_port), in mpt3sas_transport_port_add()
618 if (!mpt3sas_port) { in mpt3sas_transport_port_add()
624 INIT_LIST_HEAD(&mpt3sas_port->port_list); in mpt3sas_transport_port_add()
625 INIT_LIST_HEAD(&mpt3sas_port->phy_list); in mpt3sas_transport_port_add()
637 &mpt3sas_port->remote_identify))) { in mpt3sas_transport_port_add()
643 if (mpt3sas_port->remote_identify.device_type == SAS_PHY_UNUSED) { in mpt3sas_transport_port_add()
650 mpt3sas_port->remote_identify.sas_address); in mpt3sas_transport_port_add()
654 mpt3sas_port->remote_identify.sas_address) in mpt3sas_transport_port_add()
657 &mpt3sas_port->phy_list); in mpt3sas_transport_port_add()
658 mpt3sas_port->num_phys++; in mpt3sas_transport_port_add()
661 if (!mpt3sas_port->num_phys) { in mpt3sas_transport_port_add()
679 list_for_each_entry(mpt3sas_phy, &mpt3sas_port->phy_list, in mpt3sas_transport_port_add()
685 mpt3sas_port->remote_identify.sas_address, in mpt3sas_transport_port_add()
691 mpt3sas_port->port = port; in mpt3sas_transport_port_add()
692 if (mpt3sas_port->remote_identify.device_type == SAS_END_DEVICE) in mpt3sas_transport_port_add()
696 mpt3sas_port->remote_identify.device_type); in mpt3sas_transport_port_add()
698 rphy->identify = mpt3sas_port->remote_identify; in mpt3sas_transport_port_add()
700 if (mpt3sas_port->remote_identify.device_type == SAS_END_DEVICE) { in mpt3sas_transport_port_add()
702 mpt3sas_port->remote_identify.sas_address); in mpt3sas_transport_port_add()
717 if (mpt3sas_port->remote_identify.device_type == SAS_END_DEVICE) { in mpt3sas_transport_port_add()
726 mpt3sas_port->remote_identify.sas_address); in mpt3sas_transport_port_add()
727 mpt3sas_port->rphy = rphy; in mpt3sas_transport_port_add()
729 list_add_tail(&mpt3sas_port->port_list, &sas_node->sas_port_list); in mpt3sas_transport_port_add()
733 if (mpt3sas_port->remote_identify.device_type == in mpt3sas_transport_port_add()
735 mpt3sas_port->remote_identify.device_type == in mpt3sas_transport_port_add()
738 mpt3sas_port->remote_identify.sas_address, in mpt3sas_transport_port_add()
740 return mpt3sas_port; in mpt3sas_transport_port_add()
743 list_for_each_entry_safe(mpt3sas_phy, next, &mpt3sas_port->phy_list, in mpt3sas_transport_port_add()
746 kfree(mpt3sas_port); in mpt3sas_transport_port_add()
766 struct _sas_port *mpt3sas_port, *next; in mpt3sas_transport_port_remove() local
778 list_for_each_entry_safe(mpt3sas_port, next, &sas_node->sas_port_list, in mpt3sas_transport_port_remove()
780 if (mpt3sas_port->remote_identify.sas_address != sas_address) in mpt3sas_transport_port_remove()
783 list_del(&mpt3sas_port->port_list); in mpt3sas_transport_port_remove()
801 &mpt3sas_port->phy_list, port_siblings) { in mpt3sas_transport_port_remove()
803 dev_printk(KERN_INFO, &mpt3sas_port->port->dev, in mpt3sas_transport_port_remove()
806 mpt3sas_port->remote_identify.sas_address, in mpt3sas_transport_port_remove()
810 sas_port_delete_phy(mpt3sas_port->port, in mpt3sas_transport_port_remove()
815 sas_port_delete(mpt3sas_port->port); in mpt3sas_transport_port_remove()
816 kfree(mpt3sas_port); in mpt3sas_transport_port_remove()