Просмотр исходного кода

drivers: net: cpsw: fix dt probe for one port ethernet

When only one port of the two port is pinned out, then dt probe is failing
because second port phy is not found. fixing this by checking the number of
slaves and breaking the loop.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Mugunthan V N 12 лет назад
Родитель
Сommit
3a27bfac17
1 измененных файлов с 2 добавлено и 0 удалено
  1. 2 0
      drivers/net/ethernet/ti/cpsw.c

+ 2 - 0
drivers/net/ethernet/ti/cpsw.c

@@ -1816,6 +1816,8 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data,
 		}
 
 		i++;
+		if (i == data->slaves)
+			break;
 	}
 
 	return 0;