Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030406AbbDXQlh (ORCPT ); Fri, 24 Apr 2015 12:41:37 -0400 Received: from mail-la0-f46.google.com ([209.85.215.46]:33149 "EHLO mail-la0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754534AbbDXQle (ORCPT ); Fri, 24 Apr 2015 12:41:34 -0400 Message-ID: <553A723A.8090700@cogentembedded.com> Date: Fri, 24 Apr 2015 19:41:30 +0300 From: Sergei Shtylyov Organization: Cogent Embedded User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Murali Karicheri CC: netdev@vger.kernel.org, davem@davemloft.net, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: netcp: remove call to netif_carrier_(on/off) for MAC to Phy interface References: <1429816627-24337-1-git-send-email-m-karicheri2@ti.com> <553A4623.2070802@cogentembedded.com> <553A5EA8.4010908@ti.com> In-Reply-To: <553A5EA8.4010908@ti.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1507 Lines: 43 On 04/24/2015 06:18 PM, Murali Karicheri wrote: >>> Currently when interface type is MAC to Phy, netif_carrier_(on/off) >>> is called which is not needed as Phy lib already updates the carrier >>> status to net stack. This is needed only for other interface types >>> Signed-off-by: Murali Karicheri >>> --- >>> drivers/net/ethernet/ti/netcp_ethss.c | 8 ++++++-- >>> 1 file changed, 6 insertions(+), 2 deletions(-) >>> diff --git a/drivers/net/ethernet/ti/netcp_ethss.c >>> b/drivers/net/ethernet/ti/netcp_ethss.c >>> index 2bef655..0a1ef2e 100644 >>> --- a/drivers/net/ethernet/ti/netcp_ethss.c >>> +++ b/drivers/net/ethernet/ti/netcp_ethss.c >>> @@ -1765,7 +1765,9 @@ static void netcp_ethss_link_state_action(struct >>> gbe_priv *gbe_dev, >>> ALE_PORT_STATE, >>> ALE_PORT_STATE_FORWARD); >>> >>> - if (ndev && slave->open) >>> + if (ndev && slave->open && >>> + ((slave->link_interface != SGMII_LINK_MAC_PHY) && >>> + (slave->link_interface != XGMII_LINK_MAC_PHY))) >> You don't need extra parens around &&. > You are right! I will fix it up and re-send. In fact, you don't need parens around != either. > Mruali [...] WBR, Sergei -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/