Lines Matching +full:port +full:- +full:expander
1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0
9 * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved.
22 * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
28 * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved.
102 state = sci_base_state_machine_get_state(&fw_domain->parent.state_machine); in scif_sas_domain_operation_timeout_handler()
115 fw_domain->operation.status = SCI_FAILURE_TIMEOUT; in scif_sas_domain_operation_timeout_handler()
145 if ( (fw_domain == NULL) || (fw_domain->core_object == SCI_INVALID_HANDLE) ) in scif_domain_get_scic_port_handle()
151 "Domain:0x%x no associated core port found\n", in scif_domain_get_scic_port_handle()
155 return fw_domain->core_object; in scif_domain_get_scic_port_handle()
158 // ---------------------------------------------------------------------------
167 &fw_domain->remote_device_list in scif_domain_get_device_by_sas_address()
187 fw_device->core_object, &fw_device_address in scif_domain_get_device_by_sas_address()
191 if ( (fw_device_address.low == sas_address->low) in scif_domain_get_device_by_sas_address()
192 && (fw_device_address.high == sas_address->high) ) in scif_domain_get_device_by_sas_address()
203 // ---------------------------------------------------------------------------
215 iterator, &((SCIF_SAS_DOMAIN_T*) domain)->remote_device_list in scif_domain_get_remote_device_iterator()
224 // ---------------------------------------------------------------------------
245 if ((device_timeout * sci_abstract_list_size(&fw_domain->remote_device_list)) in scif_domain_discover()
249 op_status = fw_domain->state_handlers->discover_handler( in scif_domain_discover()
250 &fw_domain->parent, discover_timeout, device_timeout in scif_domain_discover()
263 // ---------------------------------------------------------------------------
269 U32 suggested_timeout = SCIF_DOMAIN_DISCOVER_TIMEOUT; //milli-seconds in scif_domain_get_suggested_discover_timeout()
273 // ---------------------------------------------------------------------------
277 SCI_PORT_HANDLE_T port, in scic_cb_port_stop_complete() argument
282 sci_base_object_get_logger((SCIF_SAS_DOMAIN_T*)sci_object_get_association(port)), in scic_cb_port_stop_complete()
285 controller, port, completion_status in scic_cb_port_stop_complete()
289 // ---------------------------------------------------------------------------
293 SCI_PORT_HANDLE_T port in scic_cb_port_ready() argument
297 sci_object_get_association(port); in scic_cb_port_ready()
303 controller, port in scic_cb_port_ready()
306 // The controller supplied with the port should match the controller in scic_cb_port_ready()
308 ASSERT(sci_object_get_association(controller) == fw_domain->controller); in scic_cb_port_ready()
310 fw_domain->is_port_ready = TRUE; in scic_cb_port_ready()
312 fw_domain->state_handlers->port_ready_handler(&fw_domain->parent); in scic_cb_port_ready()
315 // ---------------------------------------------------------------------------
319 SCI_PORT_HANDLE_T port, in scic_cb_port_not_ready() argument
324 sci_object_get_association(port); in scic_cb_port_not_ready()
330 controller, port in scic_cb_port_not_ready()
333 // The controller supplied with the port should match the controller in scic_cb_port_not_ready()
335 ASSERT(sci_object_get_association(controller) == fw_domain->controller); in scic_cb_port_not_ready()
337 // There is no need to take action on the port reconfiguring since it is in scic_cb_port_not_ready()
338 // just a change of the port width. in scic_cb_port_not_ready()
341 fw_domain->is_port_ready = FALSE; in scic_cb_port_not_ready()
343 fw_domain->state_handlers->port_not_ready_handler( in scic_cb_port_not_ready()
344 &fw_domain->parent, reason_code); in scic_cb_port_not_ready()
348 // ---------------------------------------------------------------------------
352 SCI_PORT_HANDLE_T port, in scic_cb_port_hard_reset_complete() argument
357 sci_object_get_association(port); in scic_cb_port_hard_reset_complete()
359 SCI_FAST_LIST_ELEMENT_T * element = fw_domain->request_list.list_head; in scic_cb_port_hard_reset_complete()
366 controller, port, completion_status in scic_cb_port_hard_reset_complete()
377 fw_device = task_request->parent.device; in scic_cb_port_hard_reset_complete()
379 if (fw_device->domain == fw_domain) in scic_cb_port_hard_reset_complete()
381 scic_remote_device_reset_complete(fw_device->core_object); in scic_cb_port_hard_reset_complete()
396 // ---------------------------------------------------------------------------
400 SCI_PORT_HANDLE_T port, in scic_cb_port_bc_change_primitive_recieved() argument
405 sci_object_get_association(port); in scic_cb_port_bc_change_primitive_recieved()
414 controller, port, phy in scic_cb_port_bc_change_primitive_recieved()
417 if (fw_domain->broadcast_change_count == 0) in scic_cb_port_bc_change_primitive_recieved()
419 // not zero at this time, we won't enable BCN detection since all non-zero in scic_cb_port_bc_change_primitive_recieved()
422 scic_port_enable_broadcast_change_notification(fw_domain->core_object); in scic_cb_port_bc_change_primitive_recieved()
425 fw_domain->broadcast_change_count++; in scic_cb_port_bc_change_primitive_recieved()
434 // ---------------------------------------------------------------------------
438 SCI_PORT_HANDLE_T port, in scic_cb_port_bc_ses_primitive_recieved() argument
443 sci_base_object_get_logger(sci_object_get_association(port)), in scic_cb_port_bc_ses_primitive_recieved()
446 controller, port, phy in scic_cb_port_bc_ses_primitive_recieved()
450 // ---------------------------------------------------------------------------
454 SCI_PORT_HANDLE_T port, in scic_cb_port_bc_expander_primitive_recieved() argument
459 sci_base_object_get_logger(sci_object_get_association(port)), in scic_cb_port_bc_expander_primitive_recieved()
462 controller, port, phy in scic_cb_port_bc_expander_primitive_recieved()
466 // ---------------------------------------------------------------------------
470 SCI_PORT_HANDLE_T port, in scic_cb_port_bc_aen_primitive_recieved() argument
475 sci_base_object_get_logger(sci_object_get_association(port)), in scic_cb_port_bc_aen_primitive_recieved()
478 controller, port, phy in scic_cb_port_bc_aen_primitive_recieved()
482 // ---------------------------------------------------------------------------
486 SCI_PORT_HANDLE_T port, in scic_cb_port_link_up() argument
491 sci_object_get_association(port); in scic_cb_port_link_up()
494 sci_base_object_get_logger(sci_object_get_association(port)), in scic_cb_port_link_up()
497 controller, port, phy in scic_cb_port_link_up()
500 scif_sas_domain_update_device_port_width(fw_domain, port); in scic_cb_port_link_up()
503 // ---------------------------------------------------------------------------
507 SCI_PORT_HANDLE_T port, in scic_cb_port_link_down() argument
512 sci_object_get_association(port); in scic_cb_port_link_down()
515 sci_base_object_get_logger(sci_object_get_association(port)), in scic_cb_port_link_down()
518 controller, port, phy in scic_cb_port_link_down()
521 scif_sas_domain_update_device_port_width(fw_domain, port); in scic_cb_port_link_down()
530 * the construction process a linkage to the corresponding core port
556 &fw_domain->parent, in scif_sas_domain_construct()
564 &fw_domain->remote_device_list, &fw_controller->free_remote_device_pool in scif_sas_domain_construct()
567 // Retrieve the core's port object that directly corresponds to this in scif_sas_domain_construct()
570 fw_controller->core_object, domain_id, &fw_domain->core_object in scif_sas_domain_construct()
573 // Set the association in the core port to this framework domain object. in scif_sas_domain_construct()
575 (SCI_OBJECT_HANDLE_T) fw_domain->core_object, fw_domain in scif_sas_domain_construct()
578 sci_fast_list_init(&fw_domain->request_list); in scif_sas_domain_construct()
580 fw_domain->operation.timer = NULL; in scif_sas_domain_construct()
582 fw_domain->is_port_ready = FALSE; in scif_sas_domain_construct()
583 fw_domain->device_start_count = 0; in scif_sas_domain_construct()
584 fw_domain->controller = fw_controller; in scif_sas_domain_construct()
585 fw_domain->operation.status = SCI_SUCCESS; in scif_sas_domain_construct()
586 fw_domain->is_config_route_table_needed = FALSE; in scif_sas_domain_construct()
592 * - if the all three parameters are specified then only the single
594 * - if only the SCIF_SAS_DOMAIN and SCIF_SAS_REMOTE_DEVICE are
598 * - if only the SCIF_SAS_DOMAIN object is specified, then all
631 fw_request->terminate_requestor = fw_requestor; in scif_sas_domain_terminate_requests()
632 fw_request->state_handlers->abort_handler(&fw_request->parent); in scif_sas_domain_terminate_requests()
636 SCI_FAST_LIST_ELEMENT_T * element = fw_domain->request_list.list_head; in scif_sas_domain_terminate_requests()
654 (request->device == fw_device) in scif_sas_domain_terminate_requests()
660 (request->is_waiting_for_abort_task_set == FALSE) || in scif_sas_domain_terminate_requests()
661 (request->terminate_requestor == NULL) in scif_sas_domain_terminate_requests()
664 request->terminate_requestor = fw_requestor; in scif_sas_domain_terminate_requests()
665 request->state_handlers->abort_handler(&request->parent); in scif_sas_domain_terminate_requests()
691 SCI_FAST_LIST_ELEMENT_T * element = fw_domain->request_list.list_head; in scif_sas_domain_get_request_by_io_tag()
706 if (scic_io_request_get_io_tag(io_request->parent.core_object) == io_tag) in scif_sas_domain_get_request_by_io_tag()
707 return &io_request->parent; in scif_sas_domain_get_request_by_io_tag()
739 if (fw_domain->operation.timer == 0) in scif_sas_domain_initialize()
741 fw_domain->operation.timer = scif_cb_timer_create( in scif_sas_domain_initialize()
742 fw_domain->controller, in scif_sas_domain_initialize()
779 ASSERT(fw_domain->parent.state_machine.current_state_id in scif_sas_domain_remote_device_start_complete()
782 scic_remote_device_get_protocols(fw_device->core_object, &dev_protocols); in scif_sas_domain_remote_device_start_complete()
786 fw_domain->device_start_in_progress_count--; in scif_sas_domain_remote_device_start_complete()
790 if ( fw_device->containing_device == NULL ) in scif_sas_domain_remote_device_start_complete()
791 //kick off the smp discover process if this expander is direct attached. in scif_sas_domain_remote_device_start_complete()
796 fw_device->protocol_device.smp_device.scheduled_activity = in scif_sas_domain_remote_device_start_complete()
801 fw_domain->state_handlers->device_start_complete_handler( in scif_sas_domain_remote_device_start_complete()
802 &fw_domain->parent, &fw_device->parent in scif_sas_domain_remote_device_start_complete()
823 sci_abstract_list_get_front(&fw_domain->remote_device_list); in scif_sas_domain_is_in_smp_activity()
834 scic_remote_device_get_protocols(current_device->core_object, in scif_sas_domain_is_in_smp_activity()
851 * @brief This methods finds a expander attached device by searching the domain's
852 * device list using connected expander device and expander phy id.
855 * @param[in] parent_device The expander device the target device attaches to.
856 * @param[in] expander_phy_id The expander phy id that the target device owns.
868 &fw_domain->remote_device_list in scif_sas_domain_get_device_by_containing_device()
883 (fw_device->containing_device == containing_device) in scif_sas_domain_get_device_by_containing_device()
884 && (fw_device->expander_phy_identifier == expander_phy_id) in scif_sas_domain_get_device_by_containing_device()
920 current_element = sci_abstract_list_get_front(&fw_domain->remote_device_list); in scif_sas_domain_find_device_in_spinup_hold()
931 if ( sci_base_state_machine_get_state(¤t_device->parent.state_machine) == in scif_sas_domain_find_device_in_spinup_hold()
933 && scic_remote_device_get_connection_rate(current_device->core_object) == in scif_sas_domain_find_device_in_spinup_hold()
958 sci_abstract_list_get_front(&fw_domain->remote_device_list); in scif_sas_domain_find_device_has_scheduled_activity()
969 scic_remote_device_get_protocols(current_device->core_object, in scif_sas_domain_find_device_has_scheduled_activity()
976 && current_device->protocol_device.smp_device.scheduled_activity == in scif_sas_domain_find_device_has_scheduled_activity()
1014 device_has_scheduled_activity->protocol_device.smp_device.scheduled_activity = in scif_sas_domain_start_smp_activity()
1033 * @brief This method starts domain's smp discover process from the top level expander.
1036 @ @param[in] top_expander The top level expander device to start smp discover process.
1046 sci_abstract_list_get_front(&fw_domain->remote_device_list); in scif_sas_domain_start_smp_discover()
1050 // something changed behind expander in scif_sas_domain_start_smp_discover()
1051 // mark all the device behind expander to be NOT in scif_sas_domain_start_smp_discover()
1058 current_device->is_currently_discovered = FALSE; in scif_sas_domain_start_smp_discover()
1060 //reset all the devices' port witdh except the top expander. in scif_sas_domain_start_smp_discover()
1061 if (current_device->containing_device != NULL) in scif_sas_domain_start_smp_discover()
1062 current_device->device_port_width = 1; in scif_sas_domain_start_smp_discover()
1067 //expander device itself should be set to is_currently_discovered. in scif_sas_domain_start_smp_discover()
1068 top_expander->is_currently_discovered = TRUE; in scif_sas_domain_start_smp_discover()
1094 if ( fw_domain->device_start_in_progress_count == 0 in scif_sas_domain_continue_discover()
1098 //to start smp discover on expander device. There may be no in scif_sas_domain_continue_discover()
1143 //need to scrub all the devices behind the expander. Check each in scif_sas_domain_finish_discover()
1146 current_element = sci_abstract_list_get_front(&fw_domain->remote_device_list); in scif_sas_domain_finish_discover()
1157 if ( current_device->is_currently_discovered == FALSE ) in scif_sas_domain_finish_discover()
1161 fw_domain->controller, fw_domain, current_device in scif_sas_domain_finish_discover()
1167 &fw_domain->parent.state_machine, SCI_BASE_DOMAIN_STATE_READY in scif_sas_domain_finish_discover()
1174 * @brief This method remove an expander device and its child devices, in order to
1177 * @param[in] fw_domain The domain that a expander belongs to.
1178 * @param[in] fw_device The expander device to be removed.
1188 &fw_device->protocol_device.smp_device; in scif_sas_domain_remove_expander_device()
1190 SCI_FAST_LIST_ELEMENT_T * element = smp_remote_device->smp_phy_list.list_head; in scif_sas_domain_remove_expander_device()
1199 if ( curr_smp_phy->attached_device_type != SMP_NO_DEVICE_ATTACHED in scif_sas_domain_remove_expander_device()
1200 && curr_smp_phy->u.end_device != NULL ) in scif_sas_domain_remove_expander_device()
1202 if (curr_smp_phy->attached_device_type == SMP_END_DEVICE_ONLY) in scif_sas_domain_remove_expander_device()
1203 current_device = curr_smp_phy->u.end_device; in scif_sas_domain_remove_expander_device()
1205 current_device = curr_smp_phy->u.attached_phy->owning_device; in scif_sas_domain_remove_expander_device()
1207 scif_cb_domain_device_removed(fw_domain->controller, fw_domain, current_device); in scif_sas_domain_remove_expander_device()
1212 scif_cb_domain_device_removed(fw_domain->controller, fw_domain, fw_device); in scif_sas_domain_remove_expander_device()
1229 sci_abstract_list_get_front(&fw_domain->remote_device_list); in scif_sas_domain_cancel_smp_activities()
1235 &fw_domain->controller->hprq, fw_domain in scif_sas_domain_cancel_smp_activities()
1245 scic_remote_device_get_protocols(current_device->core_object, in scif_sas_domain_cancel_smp_activities()
1272 SCI_FAST_LIST_ELEMENT_T * element = fw_domain->request_list.list_head; in scif_sas_domain_get_smp_request_count()
1287 protocol = scic_io_request_get_protocol(request->core_object); in scif_sas_domain_get_smp_request_count()
1329 sci_abstract_list_get_front(&fw_domain->remote_device_list); in scif_sas_domain_schedule_clear_affiliation()
1340 scic_remote_device_get_protocols(current_device->core_object, in scif_sas_domain_schedule_clear_affiliation()
1348 current_device->protocol_device.smp_device.scheduled_activity = in scif_sas_domain_schedule_clear_affiliation()
1379 SCIF_SAS_CONTROLLER_T * fw_controller = fw_domain->controller; in scif_sas_domain_continue_clear_affiliation()
1380 fw_controller->current_domain_to_clear_affiliation++; in scif_sas_domain_continue_clear_affiliation()
1383 scif_sas_controller_clear_affiliation(fw_domain->controller); in scif_sas_domain_continue_clear_affiliation()
1401 if (fw_domain->operation.timer != NULL) in scif_sas_domain_release_resource()
1403 scif_cb_timer_destroy(fw_controller, fw_domain->operation.timer); in scif_sas_domain_release_resource()
1404 fw_domain->operation.timer = NULL; in scif_sas_domain_release_resource()
1431 current_element = sci_abstract_list_get_front(&fw_domain->remote_device_list); in scif_sas_domain_find_next_ea_target_reset()
1439 if ( current_device->ea_target_reset_request_scheduled != NULL ) in scif_sas_domain_find_next_ea_target_reset()
1450 * @brief This method update the direct attached device port width.
1453 * @param[in] port The associated port object which recently has link up/down
1460 SCI_PORT_HANDLE_T port in scif_sas_domain_update_device_port_width() argument
1471 fw_domain, port in scif_sas_domain_update_device_port_width()
1474 scic_port_get_properties(port, &properties); in scif_sas_domain_update_device_port_width()
1481 // If the device already existed in the domain, it is a wide port SSP target, in scif_sas_domain_update_device_port_width()
1482 // we need to update its port width. in scif_sas_domain_update_device_port_width()
1486 scic_remote_device_get_protocols(fw_device->core_object, &dev_protocols); in scif_sas_domain_update_device_port_width()
1490 //Get accurate port width from port's phy mask for a DA device. in scif_sas_domain_update_device_port_width()
1512 &fw_domain->parent.state_machine_logger, in scif_sas_domain_initialize_state_logging()
1513 &fw_domain->parent.state_machine, in scif_sas_domain_initialize_state_logging()
1514 &fw_domain->parent.parent, in scif_sas_domain_initialize_state_logging()
1532 &fw_domain->parent.state_machine_logger, in scif_sas_domain_deinitialize_state_logging()
1533 &fw_domain->parent.state_machine in scif_sas_domain_deinitialize_state_logging()