From patchwork Mon Dec 2 07:23:39 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mugunthan V N X-Patchwork-Id: 295815 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 016712C009D for ; Mon, 2 Dec 2013 18:23:54 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752593Ab3LBHXu (ORCPT ); Mon, 2 Dec 2013 02:23:50 -0500 Received: from arroyo.ext.ti.com ([192.94.94.40]:45837 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751049Ab3LBHXs (ORCPT ); Mon, 2 Dec 2013 02:23:48 -0500 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id rB27Njsc011632; Mon, 2 Dec 2013 01:23:45 -0600 Received: from DLEE70.ent.ti.com (dlemailx.itg.ti.com [157.170.170.113]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id rB27NjGq028373; Mon, 2 Dec 2013 01:23:45 -0600 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.2.342.3; Mon, 2 Dec 2013 01:23:44 -0600 Received: from mugunthan-lt.apr.dhcp.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id rB27NgLU000508; Mon, 2 Dec 2013 01:23:43 -0600 From: Mugunthan V N To: CC: , , Mugunthan V N Subject: [PATCH 1/1] drivers: net: cpsw: fix dt probe for one port ethernet Date: Mon, 2 Dec 2013 12:53:39 +0530 Message-ID: <1385969019-12880-1-git-send-email-mugunthanvnm@ti.com> X-Mailer: git-send-email 1.8.5.rc3.2.gc302941 MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 --- drivers/net/ethernet/ti/cpsw.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index 90d41d2..68ef9f2 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -1813,6 +1813,8 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data, } i++; + if (i == data->slaves) + break; } return 0;