110-er200-ethernet_probe_order.patch 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. --- a/drivers/staging/octeon/ethernet.c
  2. +++ b/drivers/staging/octeon/ethernet.c
  3. @@ -667,6 +667,7 @@ static int cvm_oct_probe(struct platform
  4. int interface;
  5. int fau = FAU_NUM_PACKET_BUFFERS_TO_FREE;
  6. int qos;
  7. + int i;
  8. struct device_node *pip;
  9. octeon_mdiobus_force_mod_depencency();
  10. @@ -751,13 +752,19 @@ static int cvm_oct_probe(struct platform
  11. }
  12. num_interfaces = cvmx_helper_get_number_of_interfaces();
  13. - for (interface = 0; interface < num_interfaces; interface++) {
  14. - cvmx_helper_interface_mode_t imode =
  15. - cvmx_helper_interface_get_mode(interface);
  16. - int num_ports = cvmx_helper_ports_on_interface(interface);
  17. + for (i = 0; i < num_interfaces; i++) {
  18. + cvmx_helper_interface_mode_t imode;
  19. + int interface;
  20. + int num_ports;
  21. int port;
  22. int port_index;
  23. + interface = i;
  24. + if (cvmx_sysinfo_get()->board_type == CVMX_BOARD_TYPE_UBNT_E200)
  25. + interface = num_interfaces - (i + 1);
  26. +
  27. + num_ports = cvmx_helper_ports_on_interface(interface);
  28. + imode = cvmx_helper_interface_get_mode(interface);
  29. for (port_index = 0,
  30. port = cvmx_helper_get_ipd_port(interface, 0);
  31. port < cvmx_helper_get_ipd_port(interface, num_ports);