static void isci_sysctl_stop(struct ISCI_CONTROLLER *controller, uint32_t phy_to_be_stopped) { SCI_PHY_HANDLE_T phy_handle = NULL; scic_controller_get_phy_handle( scif_controller_get_scic_handle(controller->scif_controller_handle), phy_to_be_stopped, &phy_handle); scic_phy_stop(phy_handle); }
uint32_t isci_remote_device_get_bitrate(struct ISCI_REMOTE_DEVICE *remote_device) { struct ISCI_DOMAIN *domain = remote_device->domain; struct ISCI_CONTROLLER *controller = domain->controller; SCI_PORT_HANDLE_T port_handle; SCIC_PORT_PROPERTIES_T port_properties; uint8_t phy_index; SCI_PHY_HANDLE_T phy_handle; SCIC_PHY_PROPERTIES_T phy_properties; /* get a handle to the port associated with this remote device's * domain */ port_handle = scif_domain_get_scic_port_handle(domain->sci_object); scic_port_get_properties(port_handle, &port_properties); /* get the lowest numbered phy in the port */ phy_index = 0; while ((port_properties.phy_mask != 0) && !(port_properties.phy_mask & 0x1)) { phy_index++; port_properties.phy_mask >>= 1; } /* get the properties for the lowest numbered phy */ scic_controller_get_phy_handle( scif_controller_get_scic_handle(controller->scif_controller_handle), phy_index, &phy_handle); scic_phy_get_properties(phy_handle, &phy_properties); switch (phy_properties.negotiated_link_rate) { case SCI_SAS_150_GB: return (150000); case SCI_SAS_300_GB: return (300000); case SCI_SAS_600_GB: return (600000); default: return (0); } }