Lines Matching refs:hpsa_sas_port
9421 struct hpsa_sas_port *hpsa_sas_port) in hpsa_alloc_sas_phy() argument
9430 phy = sas_phy_alloc(hpsa_sas_port->parent_node->parent_dev, in hpsa_alloc_sas_phy()
9431 hpsa_sas_port->next_phy_index); in hpsa_alloc_sas_phy()
9437 hpsa_sas_port->next_phy_index++; in hpsa_alloc_sas_phy()
9439 hpsa_sas_phy->parent_port = hpsa_sas_port; in hpsa_alloc_sas_phy()
9458 struct hpsa_sas_port *hpsa_sas_port; in hpsa_sas_port_add_phy() local
9462 hpsa_sas_port = hpsa_sas_phy->parent_port; in hpsa_sas_port_add_phy()
9467 identify->sas_address = hpsa_sas_port->sas_address; in hpsa_sas_port_add_phy()
9481 sas_port_add_phy(hpsa_sas_port->port, hpsa_sas_phy->phy); in hpsa_sas_port_add_phy()
9483 &hpsa_sas_port->phy_list_head); in hpsa_sas_port_add_phy()
9490 hpsa_sas_port_add_rphy(struct hpsa_sas_port *hpsa_sas_port, in hpsa_sas_port_add_rphy() argument
9496 identify->sas_address = hpsa_sas_port->sas_address; in hpsa_sas_port_add_rphy()
9503 static struct hpsa_sas_port
9508 struct hpsa_sas_port *hpsa_sas_port; in hpsa_alloc_sas_port() local
9511 hpsa_sas_port = kzalloc(sizeof(*hpsa_sas_port), GFP_KERNEL); in hpsa_alloc_sas_port()
9512 if (!hpsa_sas_port) in hpsa_alloc_sas_port()
9515 INIT_LIST_HEAD(&hpsa_sas_port->phy_list_head); in hpsa_alloc_sas_port()
9516 hpsa_sas_port->parent_node = hpsa_sas_node; in hpsa_alloc_sas_port()
9526 hpsa_sas_port->port = port; in hpsa_alloc_sas_port()
9527 hpsa_sas_port->sas_address = sas_address; in hpsa_alloc_sas_port()
9528 list_add_tail(&hpsa_sas_port->port_list_entry, in hpsa_alloc_sas_port()
9531 return hpsa_sas_port; in hpsa_alloc_sas_port()
9536 kfree(hpsa_sas_port); in hpsa_alloc_sas_port()
9541 static void hpsa_free_sas_port(struct hpsa_sas_port *hpsa_sas_port) in hpsa_free_sas_port() argument
9547 &hpsa_sas_port->phy_list_head, phy_list_entry) in hpsa_free_sas_port()
9550 sas_port_delete(hpsa_sas_port->port); in hpsa_free_sas_port()
9551 list_del(&hpsa_sas_port->port_list_entry); in hpsa_free_sas_port()
9552 kfree(hpsa_sas_port); in hpsa_free_sas_port()
9570 struct hpsa_sas_port *hpsa_sas_port; in hpsa_free_sas_node() local
9571 struct hpsa_sas_port *next; in hpsa_free_sas_node()
9576 list_for_each_entry_safe(hpsa_sas_port, next, in hpsa_free_sas_node()
9578 hpsa_free_sas_port(hpsa_sas_port); in hpsa_free_sas_node()
9606 struct hpsa_sas_port *hpsa_sas_port; in hpsa_add_sas_host() local
9615 hpsa_sas_port = hpsa_alloc_sas_port(hpsa_sas_node, h->sas_address); in hpsa_add_sas_host()
9616 if (!hpsa_sas_port) { in hpsa_add_sas_host()
9621 hpsa_sas_phy = hpsa_alloc_sas_phy(hpsa_sas_port); in hpsa_add_sas_host()
9638 hpsa_free_sas_port(hpsa_sas_port); in hpsa_add_sas_host()
9654 struct hpsa_sas_port *hpsa_sas_port; in hpsa_add_sas_device() local
9657 hpsa_sas_port = hpsa_alloc_sas_port(hpsa_sas_node, device->sas_address); in hpsa_add_sas_device()
9658 if (!hpsa_sas_port) in hpsa_add_sas_device()
9661 rphy = sas_end_device_alloc(hpsa_sas_port->port); in hpsa_add_sas_device()
9667 hpsa_sas_port->rphy = rphy; in hpsa_add_sas_device()
9668 device->sas_port = hpsa_sas_port; in hpsa_add_sas_device()
9670 rc = hpsa_sas_port_add_rphy(hpsa_sas_port, rphy); in hpsa_add_sas_device()
9677 hpsa_free_sas_port(hpsa_sas_port); in hpsa_add_sas_device()