Lines Matching refs:port

60  *        methods for the port configuration agent.
82 // General port configuration agent routines
127 * This routine will find a matching port for the phy. This means that the
128 * port and phy both have the same broadcast sas address and same received
131 * @param[in] controller The controller object used for the port search.
134 * @return The port address or the SCI_INVALID_HANDLE if there is no matching
135 * port.
137 * @retvalue port address if the port can be found to match the phy.
138 * @retvalue SCI_INVALID_HANDLE if there is no matching port for the phy.
160 // Since this phy can be a member of a wide port check to see if one or
162 // case it should participate in the same port.
170 SCIC_SDS_PORT_T * port = (SCIC_SDS_PORT_T *)port_handle;
172 scic_sds_port_get_sas_address(port, &port_sas_address);
173 scic_sds_port_get_attached_sas_address(port, &port_attached_device_address);
180 return port;
189 * This routine will validate the port configuration is correct for the SCU
190 * hardware. The SCU hardware allows for port configurations as follows.
197 * port agent
198 * @param[in] port_agent This is the port configruation agent for
202 * @retval SCI_SUCCESS the port configuration is valid for this
203 * port configuration agent.
204 * @retval SCI_FAILURE_UNSUPPORTED_PORT_CONFIGURATION the port configuration
205 * is not valid for this port configuration agent.
225 // is always equal to the port range index
236 // This is a request to configure a single x4 port or at least attempt
237 // to make all the phys into a single port
249 // to the same port this is explicitly disallowed by the hardware
250 // unless they are part of the same x4 port and this condition was
258 // are part of the same x4 wide port and we have already checked
270 // part of the same port.
287 // part of the same port.
307 // Manual port configuration agent routines
311 * This routine will verify that all of the phys in the same port are using
348 // a different port.
364 // port range since the hardware starts all logical ports
378 // See how many additional phys are being added to this logical port.
381 // This is expected and required to add the phy to the port.
392 // The phy mask specified that this phy is part of the same port
419 * link down has allowed a better port configuration.
422 * to obtain the port configuration agent.
443 // Find the mask of phys that are reported read but as yet unconfigured into a port
461 * This method handles the manual port configuration link up notifications.
463 * around and notifiy the port object that there is a link up. If this PHY is
464 * not associated with a port there is no action taken.
468 * @param[in] port This is the port object associated with the phy. If the
469 * is no associated port this is an SCI_INVALID_HANDLE.
473 * no assocoated port?
479 SCIC_SDS_PORT_T * port,
487 controller, port_agent, port, phy
490 // If the port has an invalid handle then the phy was not assigned to
491 // a port. This is because the phy was not given the same SAS Address
492 // as the other PHYs in the port.
493 if (port != SCI_INVALID_HANDLE)
497 scic_sds_port_link_up(port, phy);
499 if ((port->active_phy_mask & (1 << scic_sds_phy_get_index(phy))) != 0)
507 * This method handles the manual port configuration link down notifications.
509 * around and notifiy the port object of the link down event. If this PHY is
510 * not associated with a port there is no action taken.
514 * @param[in] port This is the port object associated with the phy. If the
515 * is no associated port this is an SCI_INVALID_HANDLE. The port
516 * is an invalid handle only if the phy was never port of this
517 * port. This happens when the phy is not broadcasting the same
518 * SAS address as the other phys in the assigned port.
522 * no assocoated port?
528 SCIC_SDS_PORT_T * port,
536 controller, port_agent, port, phy
539 if (port != SCI_INVALID_HANDLE)
541 // If we can form a new port from the remainder of the phys then we want
543 // rediscover the port before rebuilding the port with the phys that
548 // Check to see if there are more phys waiting to be configured into a port.
549 // If there are allow the SCI User to tear down this port, if necessary, and
550 // then reconstruc the port after the timeout.
566 scic_sds_port_link_down(port, phy);
571 // Automatic port configuration agent routines
576 * automatic port configuration mode.
632 * This routine will restart the automatic port configuration timeout
635 * port a phy belongs.
637 * @param[in] controller This is the controller that to which the port
639 * @param[in] port_agent This is the port agent that is requesting the
671 * This method handles the automatic port configuration for link up notifications.
677 * any phys that might be added to a port in the future.
689 SCIC_SDS_PORT_T * port;
700 port = scic_sds_port_configuration_agent_find_port(controller, phy);
702 if (port != SCI_INVALID_HANDLE)
704 if (scic_sds_port_is_valid_phy_assignment(port, phy->phy_index))
712 // Ports and see if we can add the PHY to its own port or maybe start
713 // the timer and wait to see if a wider port can be made.
715 // Note the break when we reach the condition of the port id == phy id
724 port = (SCIC_SDS_PORT_T *)port_handle;
727 if (scic_sds_port_is_valid_phy_assignment(port, phy->phy_index))
731 // port so skip it and move on.
732 if (port->active_phy_mask > (1 << phy->phy_index))
739 // any reason why we should not either add the PHY to the port
741 if (port->physical_port_index == phy->phy_index)
744 // Consider that if the port had any active PHYs we would have
758 if (port->active_phy_mask == 0)
763 else if (port->active_phy_mask != 0)
766 // participate in this port so skip the PHY and see if
775 // add a phy to a port but could not becuase the automatic port
778 // choice to the smallest possible port.
790 status = scic_sds_port_add_phy(port, phy);
806 // do nothing the PHY can not be made part of a port at this time.
812 * This method handles the automatic port configuration for link up notifications.
816 * @param[in] port This is the port object associated with the phy. If the
817 * is no associated port this is an SCI_INVALID_HANDLE.
821 * no assocoated port?
827 SCIC_SDS_PORT_T * port,
835 controller, port_agent, port, phy
838 //the phy is not the part of this port, configure the port with this phy
839 if (port == SCI_INVALID_HANDLE)
849 //the phy is already the part of the port
851 //if the PORT'S state is resetting then the link up is from port hard reset
852 //in this case, we need to tell the port that link up is recieved
854 == port->parent.state_machine.current_state_id
857 //notify the port that port needs to be ready
859 scic_sds_port_link_up(port, phy);
869 * This method handles the automatic port configuration link down notifications.
870 * If this PHY is * not associated with a port there is no action taken.
874 * @param[in] port This is the port object associated with the phy. If the
875 * is no associated port this is an SCI_INVALID_HANDLE.
879 * no assocoated port?
885 SCIC_SDS_PORT_T * port,
893 controller, port_agent, port, phy
898 if (port != SCI_INVALID_HANDLE)
904 status = scic_sds_port_remove_phy(port, phy);
973 // Public port configuration agent routines
977 * This method will construct the port configuration agent for operation.
978 * This call is universal for both manual port configuration and automatic
979 * port configuration modes.
981 * @param[in] port_agent This is the port configuration agent for this
1007 * This method will construct the port configuration agent for this controller.
1009 * @param[in] controller This is the controller object for which the port
1012 * @param[in] port_agent This is the port configuration agent that is being
1014 * for the automatic port configuration agent and the manual port
1069 "Controller 0x%x automatic port configuration agent could not get timer.\n",
1080 * This method will destroy the port configuration agent for this controller.
1082 * @param[in] controller This is the controller object for which the port
1085 * @param[in] port_agent This is the port configuration agent that is being
1108 * @brief This method release resources in for a scic port configuration agent.