Lines Matching refs:hpsa_sas_port
9580 struct hpsa_sas_port *hpsa_sas_port) in hpsa_alloc_sas_phy() argument
9589 phy = sas_phy_alloc(hpsa_sas_port->parent_node->parent_dev, in hpsa_alloc_sas_phy()
9590 hpsa_sas_port->next_phy_index); in hpsa_alloc_sas_phy()
9596 hpsa_sas_port->next_phy_index++; in hpsa_alloc_sas_phy()
9598 hpsa_sas_phy->parent_port = hpsa_sas_port; in hpsa_alloc_sas_phy()
9617 struct hpsa_sas_port *hpsa_sas_port; in hpsa_sas_port_add_phy() local
9621 hpsa_sas_port = hpsa_sas_phy->parent_port; in hpsa_sas_port_add_phy()
9626 identify->sas_address = hpsa_sas_port->sas_address; in hpsa_sas_port_add_phy()
9640 sas_port_add_phy(hpsa_sas_port->port, hpsa_sas_phy->phy); in hpsa_sas_port_add_phy()
9642 &hpsa_sas_port->phy_list_head); in hpsa_sas_port_add_phy()
9649 hpsa_sas_port_add_rphy(struct hpsa_sas_port *hpsa_sas_port, in hpsa_sas_port_add_rphy() argument
9655 identify->sas_address = hpsa_sas_port->sas_address; in hpsa_sas_port_add_rphy()
9662 static struct hpsa_sas_port
9667 struct hpsa_sas_port *hpsa_sas_port; in hpsa_alloc_sas_port() local
9670 hpsa_sas_port = kzalloc(sizeof(*hpsa_sas_port), GFP_KERNEL); in hpsa_alloc_sas_port()
9671 if (!hpsa_sas_port) in hpsa_alloc_sas_port()
9674 INIT_LIST_HEAD(&hpsa_sas_port->phy_list_head); in hpsa_alloc_sas_port()
9675 hpsa_sas_port->parent_node = hpsa_sas_node; in hpsa_alloc_sas_port()
9685 hpsa_sas_port->port = port; in hpsa_alloc_sas_port()
9686 hpsa_sas_port->sas_address = sas_address; in hpsa_alloc_sas_port()
9687 list_add_tail(&hpsa_sas_port->port_list_entry, in hpsa_alloc_sas_port()
9690 return hpsa_sas_port; in hpsa_alloc_sas_port()
9695 kfree(hpsa_sas_port); in hpsa_alloc_sas_port()
9700 static void hpsa_free_sas_port(struct hpsa_sas_port *hpsa_sas_port) in hpsa_free_sas_port() argument
9706 &hpsa_sas_port->phy_list_head, phy_list_entry) in hpsa_free_sas_port()
9709 sas_port_delete(hpsa_sas_port->port); in hpsa_free_sas_port()
9710 list_del(&hpsa_sas_port->port_list_entry); in hpsa_free_sas_port()
9711 kfree(hpsa_sas_port); in hpsa_free_sas_port()
9729 struct hpsa_sas_port *hpsa_sas_port; in hpsa_free_sas_node() local
9730 struct hpsa_sas_port *next; in hpsa_free_sas_node()
9735 list_for_each_entry_safe(hpsa_sas_port, next, in hpsa_free_sas_node()
9737 hpsa_free_sas_port(hpsa_sas_port); in hpsa_free_sas_node()
9765 struct hpsa_sas_port *hpsa_sas_port; in hpsa_add_sas_host() local
9774 hpsa_sas_port = hpsa_alloc_sas_port(hpsa_sas_node, h->sas_address); in hpsa_add_sas_host()
9775 if (!hpsa_sas_port) { in hpsa_add_sas_host()
9780 hpsa_sas_phy = hpsa_alloc_sas_phy(hpsa_sas_port); in hpsa_add_sas_host()
9797 hpsa_free_sas_port(hpsa_sas_port); in hpsa_add_sas_host()
9813 struct hpsa_sas_port *hpsa_sas_port; in hpsa_add_sas_device() local
9816 hpsa_sas_port = hpsa_alloc_sas_port(hpsa_sas_node, device->sas_address); in hpsa_add_sas_device()
9817 if (!hpsa_sas_port) in hpsa_add_sas_device()
9820 rphy = sas_end_device_alloc(hpsa_sas_port->port); in hpsa_add_sas_device()
9826 hpsa_sas_port->rphy = rphy; in hpsa_add_sas_device()
9827 device->sas_port = hpsa_sas_port; in hpsa_add_sas_device()
9829 rc = hpsa_sas_port_add_rphy(hpsa_sas_port, rphy); in hpsa_add_sas_device()
9836 hpsa_free_sas_port(hpsa_sas_port); in hpsa_add_sas_device()