Lines Matching refs:hpsa_sas_port
9229 struct hpsa_sas_port *hpsa_sas_port) in hpsa_alloc_sas_phy() argument
9238 phy = sas_phy_alloc(hpsa_sas_port->parent_node->parent_dev, in hpsa_alloc_sas_phy()
9239 hpsa_sas_port->next_phy_index); in hpsa_alloc_sas_phy()
9245 hpsa_sas_port->next_phy_index++; in hpsa_alloc_sas_phy()
9247 hpsa_sas_phy->parent_port = hpsa_sas_port; in hpsa_alloc_sas_phy()
9266 struct hpsa_sas_port *hpsa_sas_port; in hpsa_sas_port_add_phy() local
9270 hpsa_sas_port = hpsa_sas_phy->parent_port; in hpsa_sas_port_add_phy()
9275 identify->sas_address = hpsa_sas_port->sas_address; in hpsa_sas_port_add_phy()
9289 sas_port_add_phy(hpsa_sas_port->port, hpsa_sas_phy->phy); in hpsa_sas_port_add_phy()
9291 &hpsa_sas_port->phy_list_head); in hpsa_sas_port_add_phy()
9298 hpsa_sas_port_add_rphy(struct hpsa_sas_port *hpsa_sas_port, in hpsa_sas_port_add_rphy() argument
9304 identify->sas_address = hpsa_sas_port->sas_address; in hpsa_sas_port_add_rphy()
9311 static struct hpsa_sas_port
9316 struct hpsa_sas_port *hpsa_sas_port; in hpsa_alloc_sas_port() local
9319 hpsa_sas_port = kzalloc(sizeof(*hpsa_sas_port), GFP_KERNEL); in hpsa_alloc_sas_port()
9320 if (!hpsa_sas_port) in hpsa_alloc_sas_port()
9323 INIT_LIST_HEAD(&hpsa_sas_port->phy_list_head); in hpsa_alloc_sas_port()
9324 hpsa_sas_port->parent_node = hpsa_sas_node; in hpsa_alloc_sas_port()
9334 hpsa_sas_port->port = port; in hpsa_alloc_sas_port()
9335 hpsa_sas_port->sas_address = sas_address; in hpsa_alloc_sas_port()
9336 list_add_tail(&hpsa_sas_port->port_list_entry, in hpsa_alloc_sas_port()
9339 return hpsa_sas_port; in hpsa_alloc_sas_port()
9344 kfree(hpsa_sas_port); in hpsa_alloc_sas_port()
9349 static void hpsa_free_sas_port(struct hpsa_sas_port *hpsa_sas_port) in hpsa_free_sas_port() argument
9355 &hpsa_sas_port->phy_list_head, phy_list_entry) in hpsa_free_sas_port()
9358 sas_port_delete(hpsa_sas_port->port); in hpsa_free_sas_port()
9359 list_del(&hpsa_sas_port->port_list_entry); in hpsa_free_sas_port()
9360 kfree(hpsa_sas_port); in hpsa_free_sas_port()
9378 struct hpsa_sas_port *hpsa_sas_port; in hpsa_free_sas_node() local
9379 struct hpsa_sas_port *next; in hpsa_free_sas_node()
9384 list_for_each_entry_safe(hpsa_sas_port, next, in hpsa_free_sas_node()
9386 hpsa_free_sas_port(hpsa_sas_port); in hpsa_free_sas_node()
9414 struct hpsa_sas_port *hpsa_sas_port; in hpsa_add_sas_host() local
9423 hpsa_sas_port = hpsa_alloc_sas_port(hpsa_sas_node, h->sas_address); in hpsa_add_sas_host()
9424 if (!hpsa_sas_port) { in hpsa_add_sas_host()
9429 hpsa_sas_phy = hpsa_alloc_sas_phy(hpsa_sas_port); in hpsa_add_sas_host()
9446 hpsa_free_sas_port(hpsa_sas_port); in hpsa_add_sas_host()
9462 struct hpsa_sas_port *hpsa_sas_port; in hpsa_add_sas_device() local
9465 hpsa_sas_port = hpsa_alloc_sas_port(hpsa_sas_node, device->sas_address); in hpsa_add_sas_device()
9466 if (!hpsa_sas_port) in hpsa_add_sas_device()
9469 rphy = sas_end_device_alloc(hpsa_sas_port->port); in hpsa_add_sas_device()
9475 hpsa_sas_port->rphy = rphy; in hpsa_add_sas_device()
9476 device->sas_port = hpsa_sas_port; in hpsa_add_sas_device()
9478 rc = hpsa_sas_port_add_rphy(hpsa_sas_port, rphy); in hpsa_add_sas_device()
9485 hpsa_free_sas_port(hpsa_sas_port); in hpsa_add_sas_device()