Lines Matching refs:port_agent

150  * @port_agent: This is the port configuration agent for the controller.
161 struct sci_port_configuration_agent *port_agent)
169 if (port_agent->phy_valid_port_range[0].max_index != 0 ||
170 port_agent->phy_valid_port_range[1].max_index != 1 ||
171 port_agent->phy_valid_port_range[2].max_index != 2 ||
172 port_agent->phy_valid_port_range[3].max_index != 3)
178 if (port_agent->phy_valid_port_range[0].min_index == 0 &&
179 port_agent->phy_valid_port_range[1].min_index == 0 &&
180 port_agent->phy_valid_port_range[2].min_index == 0 &&
181 port_agent->phy_valid_port_range[3].min_index == 0)
189 if (port_agent->phy_valid_port_range[2].min_index == 1) {
208 if (port_agent->phy_valid_port_range[0].min_index == 0 &&
209 port_agent->phy_valid_port_range[1].min_index == 1) {
222 if (port_agent->phy_valid_port_range[2].min_index == 2 &&
223 port_agent->phy_valid_port_range[3].min_index == 3) {
243 struct sci_port_configuration_agent *port_agent)
279 port_agent->phy_valid_port_range[phy_index].min_index = port_index;
280 port_agent->phy_valid_port_range[phy_index].max_index = phy_index;
307 port_agent->phy_valid_port_range[phy_index].min_index = port_index;
308 port_agent->phy_valid_port_range[phy_index].max_index = phy_index;
318 return sci_port_configuration_agent_validate_ports(ihost, port_agent);
325 struct sci_port_configuration_agent *port_agent;
330 port_agent = container_of(tmr, typeof(*port_agent), timer);
331 ihost = container_of(port_agent, typeof(*ihost), port_agent);
338 port_agent->timer_pending = false;
341 configure_phy_mask = ~port_agent->phy_configured_mask & port_agent->phy_ready_mask;
347 port_agent->link_up_handler(ihost, port_agent,
358 struct sci_port_configuration_agent *port_agent,
369 port_agent->phy_ready_mask |= (1 << iphy->phy_index);
372 port_agent->phy_configured_mask |= (1 << iphy->phy_index);
379 * @port_agent: This is the port configuration agent for the controller.
395 struct sci_port_configuration_agent *port_agent,
407 port_agent->phy_ready_mask &= ~(1 << iphy->phy_index);
408 port_agent->phy_configured_mask &= ~(1 << iphy->phy_index);
416 if ((port_agent->phy_configured_mask == 0x0000) &&
417 (port_agent->phy_ready_mask != 0x0000) &&
418 !port_agent->timer_pending) {
419 port_agent->timer_pending = true;
421 sci_mod_timer(&port_agent->timer,
434 struct sci_port_configuration_agent *port_agent)
456 port_agent->phy_valid_port_range[phy_index].min_index = port_index;
457 port_agent->phy_valid_port_range[phy_index].max_index = phy_index;
459 port_agent->phy_valid_port_range[phy_index].min_index = phy_index;
460 port_agent->phy_valid_port_range[phy_index].max_index = phy_index;
466 return sci_port_configuration_agent_validate_ports(ihost, port_agent);
475 static void sci_apc_agent_start_timer(struct sci_port_configuration_agent *port_agent,
478 port_agent->timer_pending = true;
479 sci_mod_timer(&port_agent->timer, timeout);
483 struct sci_port_configuration_agent *port_agent,
506 for (port_index = port_agent->phy_valid_port_range[iphy->phy_index].min_index;
507 port_index <= port_agent->phy_valid_port_range[iphy->phy_index].max_index;
576 port_agent->phy_configured_mask |= (1 << iphy->phy_index);
581 sci_apc_agent_start_timer(port_agent,
596 * @port_agent: This is the port configuration agent for the controller.
606 struct sci_port_configuration_agent *port_agent,
614 port_agent->phy_ready_mask |= 1 << phy_index;
615 sci_apc_agent_start_timer(port_agent,
619 port_agent->phy_ready_mask |= 1 << phy_index;
628 * @port_agent: This is the port configuration agent for the controller.
640 struct sci_port_configuration_agent *port_agent,
644 port_agent->phy_ready_mask &= ~(1 << iphy->phy_index);
648 if (port_agent->phy_configured_mask & (1 << iphy->phy_index)) {
654 port_agent->phy_configured_mask &= ~(1 << iphy->phy_index);
663 struct sci_port_configuration_agent *port_agent;
668 port_agent = container_of(tmr, typeof(*port_agent), timer);
669 ihost = container_of(port_agent, typeof(*ihost), port_agent);
676 port_agent->timer_pending = false;
678 configure_phy_mask = ~port_agent->phy_configured_mask & port_agent->phy_ready_mask;
687 sci_apc_agent_configure_ports(ihost, port_agent,
709 struct sci_port_configuration_agent *port_agent)
713 port_agent->phy_configured_mask = 0x00;
714 port_agent->phy_ready_mask = 0x00;
716 port_agent->link_up_handler = NULL;
717 port_agent->link_down_handler = NULL;
719 port_agent->timer_pending = false;
722 port_agent->phy_valid_port_range[index].min_index = 0;
723 port_agent->phy_valid_port_range[index].max_index = 0;
729 return ihost->port_agent.link_up_handler == sci_apc_agent_link_up;
734 struct sci_port_configuration_agent *port_agent)
743 ihost, port_agent);
745 port_agent->link_up_handler = sci_mpc_agent_link_up;
746 port_agent->link_down_handler = sci_mpc_agent_link_down;
748 sci_init_timer(&port_agent->timer, mpc_agent_timeout);
751 ihost, port_agent);
753 port_agent->link_up_handler = sci_apc_agent_link_up;
754 port_agent->link_down_handler = sci_apc_agent_link_down;
756 sci_init_timer(&port_agent->timer, apc_agent_timeout);