All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next v1] net: netcp: remove call to netif_carrier_(on/off) for MAC to Phy interface
@ 2015-04-24 19:01 Murali Karicheri
  2015-04-25 19:48 ` David Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Murali Karicheri @ 2015-04-24 19:01 UTC (permalink / raw)
  To: netdev, davem, linux-kernel; +Cc: Murali Karicheri

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 <m-karicheri2@ti.com>
---
 - Fixed comment against initial version
 - Ok to apply this to net-next. So changed subject prefix to reflect the same

 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..9b7e0a3 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)
 			netif_carrier_on(ndev);
 	} else {
 		writel(mac_control, GBE_REG_ADDR(slave, emac_regs,
@@ -1773,7 +1775,9 @@ static void netcp_ethss_link_state_action(struct gbe_priv *gbe_dev,
 		cpsw_ale_control_set(gbe_dev->ale, slave->port_num,
 				     ALE_PORT_STATE,
 				     ALE_PORT_STATE_DISABLE);
-		if (ndev)
+		if (ndev &&
+		    slave->link_interface != SGMII_LINK_MAC_PHY &&
+		    slave->link_interface != XGMII_LINK_MAC_PHY)
 			netif_carrier_off(ndev);
 	}
 
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next v1] net: netcp: remove call to netif_carrier_(on/off) for MAC to Phy interface
  2015-04-24 19:01 [PATCH net-next v1] net: netcp: remove call to netif_carrier_(on/off) for MAC to Phy interface Murali Karicheri
@ 2015-04-25 19:48 ` David Miller
  2015-04-27 17:07   ` Murali Karicheri
  0 siblings, 1 reply; 5+ messages in thread
From: David Miller @ 2015-04-25 19:48 UTC (permalink / raw)
  To: m-karicheri2; +Cc: netdev, linux-kernel

From: Murali Karicheri <m-karicheri2@ti.com>
Date: Fri, 24 Apr 2015 15:01:41 -0400

> 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 <m-karicheri2@ti.com>

net-next is not open for submissions yet

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next v1] net: netcp: remove call to netif_carrier_(on/off) for MAC to Phy interface
  2015-04-25 19:48 ` David Miller
@ 2015-04-27 17:07   ` Murali Karicheri
  2015-04-27 17:23     ` David Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Murali Karicheri @ 2015-04-27 17:07 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, linux-kernel

On 04/25/2015 03:48 PM, David Miller wrote:
> From: Murali Karicheri<m-karicheri2@ti.com>
> Date: Fri, 24 Apr 2015 15:01:41 -0400
>
>> 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<m-karicheri2@ti.com>
>
> net-next is not open for submissions yet
David,

Do I need to re-submit this patch when the net-next gets opened for 
this? This is essentially a bug fix and can be applied to current 
version (v4.1) as well. The reason I thought of adding this to net-next 
is because the DTS patch set for enabling network driver on K2 devices
is queued for v4.2. But this has no dependency on this DTS patch and
hence can be applied to v4.1 as well if you are fine with it.

Regards,
-- 
Murali Karicheri
Linux Kernel, Texas Instruments

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next v1] net: netcp: remove call to netif_carrier_(on/off) for MAC to Phy interface
  2015-04-27 17:07   ` Murali Karicheri
@ 2015-04-27 17:23     ` David Miller
  2015-04-27 18:09       ` Murali Karicheri
  0 siblings, 1 reply; 5+ messages in thread
From: David Miller @ 2015-04-27 17:23 UTC (permalink / raw)
  To: m-karicheri2; +Cc: netdev, linux-kernel

From: Murali Karicheri <m-karicheri2@ti.com>
Date: Mon, 27 Apr 2015 13:07:35 -0400

> On 04/25/2015 03:48 PM, David Miller wrote:
>> From: Murali Karicheri<m-karicheri2@ti.com>
>> Date: Fri, 24 Apr 2015 15:01:41 -0400
>>
>>> 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<m-karicheri2@ti.com>
>>
>> net-next is not open for submissions yet
> David,
> 
> Do I need to re-submit this patch when the net-next gets opened for
> this? This is essentially a bug fix and can be applied to current

If it's really a bug fix, then you shouldn't target it at net-next.

I'll never understand why people do things like this.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next v1] net: netcp: remove call to netif_carrier_(on/off) for MAC to Phy interface
  2015-04-27 17:23     ` David Miller
@ 2015-04-27 18:09       ` Murali Karicheri
  0 siblings, 0 replies; 5+ messages in thread
From: Murali Karicheri @ 2015-04-27 18:09 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, linux-kernel

On 04/27/2015 01:23 PM, David Miller wrote:
> From: Murali Karicheri<m-karicheri2@ti.com>
> Date: Mon, 27 Apr 2015 13:07:35 -0400
>
>> On 04/25/2015 03:48 PM, David Miller wrote:
>>> From: Murali Karicheri<m-karicheri2@ti.com>
>>> Date: Fri, 24 Apr 2015 15:01:41 -0400
>>>
>>>> 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<m-karicheri2@ti.com>
>>>
>>> net-next is not open for submissions yet
>> David,
>>
>> Do I need to re-submit this patch when the net-next gets opened for
>> this? This is essentially a bug fix and can be applied to current
>
> If it's really a bug fix, then you shouldn't target it at net-next.
>
> I'll never understand why people do things like this.
Ok. My bad. I will re-send it with proper prefix for applying to v4.1.

-- 
Murali Karicheri
Linux Kernel, Texas Instruments

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-04-27 18:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-24 19:01 [PATCH net-next v1] net: netcp: remove call to netif_carrier_(on/off) for MAC to Phy interface Murali Karicheri
2015-04-25 19:48 ` David Miller
2015-04-27 17:07   ` Murali Karicheri
2015-04-27 17:23     ` David Miller
2015-04-27 18:09       ` Murali Karicheri

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.