Lines Matching refs:mpt3sas_port
466 struct _sas_port *mpt3sas_port) in _transport_delete_port() argument
468 u64 sas_address = mpt3sas_port->remote_identify.sas_address; in _transport_delete_port()
470 mpt3sas_port->remote_identify.device_type; in _transport_delete_port()
472 dev_printk(KERN_INFO, &mpt3sas_port->port->dev, in _transport_delete_port()
493 struct _sas_port *mpt3sas_port, struct _sas_phy *mpt3sas_phy) in _transport_delete_phy() argument
495 u64 sas_address = mpt3sas_port->remote_identify.sas_address; in _transport_delete_phy()
502 mpt3sas_port->num_phys--; in _transport_delete_phy()
503 sas_port_delete_phy(mpt3sas_port->port, mpt3sas_phy->phy); in _transport_delete_phy()
514 _transport_add_phy(struct MPT3SAS_ADAPTER *ioc, struct _sas_port *mpt3sas_port, in _transport_add_phy() argument
517 u64 sas_address = mpt3sas_port->remote_identify.sas_address; in _transport_add_phy()
523 list_add_tail(&mpt3sas_phy->port_siblings, &mpt3sas_port->phy_list); in _transport_add_phy()
524 mpt3sas_port->num_phys++; in _transport_add_phy()
525 sas_port_add_phy(mpt3sas_port->port, mpt3sas_phy->phy); in _transport_add_phy()
541 struct _sas_port *mpt3sas_port; in _transport_add_phy_to_an_existing_port() local
547 list_for_each_entry(mpt3sas_port, &sas_node->sas_port_list, in _transport_add_phy_to_an_existing_port()
549 if (mpt3sas_port->remote_identify.sas_address != in _transport_add_phy_to_an_existing_port()
552 list_for_each_entry(phy_srch, &mpt3sas_port->phy_list, in _transport_add_phy_to_an_existing_port()
557 _transport_add_phy(ioc, mpt3sas_port, mpt3sas_phy); in _transport_add_phy_to_an_existing_port()
573 struct _sas_port *mpt3sas_port, *next; in _transport_del_phy_from_an_existing_port() local
579 list_for_each_entry_safe(mpt3sas_port, next, &sas_node->sas_port_list, in _transport_del_phy_from_an_existing_port()
581 list_for_each_entry(phy_srch, &mpt3sas_port->phy_list, in _transport_del_phy_from_an_existing_port()
586 if (mpt3sas_port->num_phys == 1) in _transport_del_phy_from_an_existing_port()
587 _transport_delete_port(ioc, mpt3sas_port); in _transport_del_phy_from_an_existing_port()
589 _transport_delete_phy(ioc, mpt3sas_port, in _transport_del_phy_from_an_existing_port()
635 struct _sas_port *mpt3sas_port; in mpt3sas_transport_port_add() local
643 mpt3sas_port = kzalloc(sizeof(struct _sas_port), in mpt3sas_transport_port_add()
645 if (!mpt3sas_port) { in mpt3sas_transport_port_add()
651 INIT_LIST_HEAD(&mpt3sas_port->port_list); in mpt3sas_transport_port_add()
652 INIT_LIST_HEAD(&mpt3sas_port->phy_list); in mpt3sas_transport_port_add()
665 &mpt3sas_port->remote_identify))) { in mpt3sas_transport_port_add()
671 if (mpt3sas_port->remote_identify.device_type == SAS_PHY_UNUSED) { in mpt3sas_transport_port_add()
678 mpt3sas_port->remote_identify.sas_address); in mpt3sas_transport_port_add()
682 mpt3sas_port->remote_identify.sas_address) in mpt3sas_transport_port_add()
685 &mpt3sas_port->phy_list); in mpt3sas_transport_port_add()
686 mpt3sas_port->num_phys++; in mpt3sas_transport_port_add()
689 if (!mpt3sas_port->num_phys) { in mpt3sas_transport_port_add()
707 list_for_each_entry(mpt3sas_phy, &mpt3sas_port->phy_list, in mpt3sas_transport_port_add()
713 mpt3sas_port->remote_identify.sas_address, in mpt3sas_transport_port_add()
719 mpt3sas_port->port = port; in mpt3sas_transport_port_add()
720 if (mpt3sas_port->remote_identify.device_type == SAS_END_DEVICE) in mpt3sas_transport_port_add()
724 mpt3sas_port->remote_identify.device_type); in mpt3sas_transport_port_add()
726 rphy->identify = mpt3sas_port->remote_identify; in mpt3sas_transport_port_add()
728 if (mpt3sas_port->remote_identify.device_type == SAS_END_DEVICE) { in mpt3sas_transport_port_add()
730 mpt3sas_port->remote_identify.sas_address); in mpt3sas_transport_port_add()
745 if (mpt3sas_port->remote_identify.device_type == SAS_END_DEVICE) { in mpt3sas_transport_port_add()
754 mpt3sas_port->remote_identify.sas_address); in mpt3sas_transport_port_add()
755 mpt3sas_port->rphy = rphy; in mpt3sas_transport_port_add()
757 list_add_tail(&mpt3sas_port->port_list, &sas_node->sas_port_list); in mpt3sas_transport_port_add()
761 if (mpt3sas_port->remote_identify.device_type == in mpt3sas_transport_port_add()
763 mpt3sas_port->remote_identify.device_type == in mpt3sas_transport_port_add()
766 mpt3sas_port->remote_identify.sas_address, in mpt3sas_transport_port_add()
768 return mpt3sas_port; in mpt3sas_transport_port_add()
771 list_for_each_entry_safe(mpt3sas_phy, next, &mpt3sas_port->phy_list, in mpt3sas_transport_port_add()
774 kfree(mpt3sas_port); in mpt3sas_transport_port_add()
794 struct _sas_port *mpt3sas_port, *next; in mpt3sas_transport_port_remove() local
806 list_for_each_entry_safe(mpt3sas_port, next, &sas_node->sas_port_list, in mpt3sas_transport_port_remove()
808 if (mpt3sas_port->remote_identify.sas_address != sas_address) in mpt3sas_transport_port_remove()
811 list_del(&mpt3sas_port->port_list); in mpt3sas_transport_port_remove()
829 &mpt3sas_port->phy_list, port_siblings) { in mpt3sas_transport_port_remove()
831 dev_printk(KERN_INFO, &mpt3sas_port->port->dev, in mpt3sas_transport_port_remove()
834 mpt3sas_port->remote_identify.sas_address, in mpt3sas_transport_port_remove()
837 sas_port_delete_phy(mpt3sas_port->port, mpt3sas_phy->phy); in mpt3sas_transport_port_remove()
840 sas_port_delete(mpt3sas_port->port); in mpt3sas_transport_port_remove()
841 kfree(mpt3sas_port); in mpt3sas_transport_port_remove()