Lines Matching refs:mpt2sas_port
479 struct _sas_port *mpt2sas_port) in _transport_delete_port() argument
481 u64 sas_address = mpt2sas_port->remote_identify.sas_address; in _transport_delete_port()
483 mpt2sas_port->remote_identify.device_type; in _transport_delete_port()
485 dev_printk(KERN_INFO, &mpt2sas_port->port->dev, in _transport_delete_port()
508 struct _sas_port *mpt2sas_port, struct _sas_phy *mpt2sas_phy) in _transport_delete_phy() argument
510 u64 sas_address = mpt2sas_port->remote_identify.sas_address; in _transport_delete_phy()
517 mpt2sas_port->num_phys--; in _transport_delete_phy()
518 sas_port_delete_phy(mpt2sas_port->port, mpt2sas_phy->phy); in _transport_delete_phy()
531 _transport_add_phy(struct MPT2SAS_ADAPTER *ioc, struct _sas_port *mpt2sas_port, in _transport_add_phy() argument
534 u64 sas_address = mpt2sas_port->remote_identify.sas_address; in _transport_add_phy()
540 list_add_tail(&mpt2sas_phy->port_siblings, &mpt2sas_port->phy_list); in _transport_add_phy()
541 mpt2sas_port->num_phys++; in _transport_add_phy()
542 sas_port_add_phy(mpt2sas_port->port, mpt2sas_phy->phy); in _transport_add_phy()
559 struct _sas_port *mpt2sas_port; in _transport_add_phy_to_an_existing_port() local
565 list_for_each_entry(mpt2sas_port, &sas_node->sas_port_list, in _transport_add_phy_to_an_existing_port()
567 if (mpt2sas_port->remote_identify.sas_address != in _transport_add_phy_to_an_existing_port()
570 list_for_each_entry(phy_srch, &mpt2sas_port->phy_list, in _transport_add_phy_to_an_existing_port()
575 _transport_add_phy(ioc, mpt2sas_port, mpt2sas_phy); in _transport_add_phy_to_an_existing_port()
593 struct _sas_port *mpt2sas_port, *next; in _transport_del_phy_from_an_existing_port() local
599 list_for_each_entry_safe(mpt2sas_port, next, &sas_node->sas_port_list, in _transport_del_phy_from_an_existing_port()
601 list_for_each_entry(phy_srch, &mpt2sas_port->phy_list, in _transport_del_phy_from_an_existing_port()
605 if (mpt2sas_port->num_phys == 1) in _transport_del_phy_from_an_existing_port()
606 _transport_delete_port(ioc, mpt2sas_port); in _transport_del_phy_from_an_existing_port()
608 _transport_delete_phy(ioc, mpt2sas_port, in _transport_del_phy_from_an_existing_port()
654 struct _sas_port *mpt2sas_port; in mpt2sas_transport_port_add() local
661 mpt2sas_port = kzalloc(sizeof(struct _sas_port), in mpt2sas_transport_port_add()
663 if (!mpt2sas_port) { in mpt2sas_transport_port_add()
669 INIT_LIST_HEAD(&mpt2sas_port->port_list); in mpt2sas_transport_port_add()
670 INIT_LIST_HEAD(&mpt2sas_port->phy_list); in mpt2sas_transport_port_add()
683 &mpt2sas_port->remote_identify))) { in mpt2sas_transport_port_add()
689 if (mpt2sas_port->remote_identify.device_type == SAS_PHY_UNUSED) { in mpt2sas_transport_port_add()
696 mpt2sas_port->remote_identify.sas_address); in mpt2sas_transport_port_add()
700 mpt2sas_port->remote_identify.sas_address) in mpt2sas_transport_port_add()
703 &mpt2sas_port->phy_list); in mpt2sas_transport_port_add()
704 mpt2sas_port->num_phys++; in mpt2sas_transport_port_add()
707 if (!mpt2sas_port->num_phys) { in mpt2sas_transport_port_add()
720 list_for_each_entry(mpt2sas_phy, &mpt2sas_port->phy_list, in mpt2sas_transport_port_add()
726 mpt2sas_port->remote_identify.sas_address, in mpt2sas_transport_port_add()
732 mpt2sas_port->port = port; in mpt2sas_transport_port_add()
733 if (mpt2sas_port->remote_identify.device_type == SAS_END_DEVICE) in mpt2sas_transport_port_add()
737 mpt2sas_port->remote_identify.device_type); in mpt2sas_transport_port_add()
739 rphy->identify = mpt2sas_port->remote_identify; in mpt2sas_transport_port_add()
748 mpt2sas_port->remote_identify.sas_address); in mpt2sas_transport_port_add()
749 mpt2sas_port->rphy = rphy; in mpt2sas_transport_port_add()
751 list_add_tail(&mpt2sas_port->port_list, &sas_node->sas_port_list); in mpt2sas_transport_port_add()
755 if (mpt2sas_port->remote_identify.device_type == in mpt2sas_transport_port_add()
757 mpt2sas_port->remote_identify.device_type == in mpt2sas_transport_port_add()
760 mpt2sas_port->remote_identify.sas_address, in mpt2sas_transport_port_add()
763 return mpt2sas_port; in mpt2sas_transport_port_add()
766 list_for_each_entry_safe(mpt2sas_phy, next, &mpt2sas_port->phy_list, in mpt2sas_transport_port_add()
769 kfree(mpt2sas_port); in mpt2sas_transport_port_add()
791 struct _sas_port *mpt2sas_port, *next; in mpt2sas_transport_port_remove() local
803 list_for_each_entry_safe(mpt2sas_port, next, &sas_node->sas_port_list, in mpt2sas_transport_port_remove()
805 if (mpt2sas_port->remote_identify.sas_address != sas_address) in mpt2sas_transport_port_remove()
808 list_del(&mpt2sas_port->port_list); in mpt2sas_transport_port_remove()
825 &mpt2sas_port->phy_list, port_siblings) { in mpt2sas_transport_port_remove()
827 dev_printk(KERN_INFO, &mpt2sas_port->port->dev, in mpt2sas_transport_port_remove()
830 mpt2sas_port->remote_identify.sas_address, in mpt2sas_transport_port_remove()
833 sas_port_delete_phy(mpt2sas_port->port, mpt2sas_phy->phy); in mpt2sas_transport_port_remove()
836 sas_port_delete(mpt2sas_port->port); in mpt2sas_transport_port_remove()
837 kfree(mpt2sas_port); in mpt2sas_transport_port_remove()