Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH] net/phy: Delete unused function phy_ethtool_gset
From: Florian Fainelli @ 2017-06-04 17:20 UTC (permalink / raw)
  To: Yuval Shaia, andrew, netdev
In-Reply-To: <20170604171016.3910-1-yuval.shaia@oracle.com>



On 06/04/2017 10:10 AM, Yuval Shaia wrote:
> Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>

A commit message that just says: it's unused, so remove it would be
nice. You seem to have missed Documentation/networking/phy.txt in this
patch, do you mind resubmitting with that fixed?

Finally, the subject should be:

net: phy: Delete unused function phy_ethtool_gset

to be (semi) consistent with past submissions done to these files. Thanks!

> ---
>  drivers/net/phy/phy.c | 24 ------------------------
>  include/linux/phy.h   |  1 -
>  2 files changed, 25 deletions(-)
> 
> diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
> index 9c372bf..8e26af5 100644
> --- a/drivers/net/phy/phy.c
> +++ b/drivers/net/phy/phy.c
> @@ -484,30 +484,6 @@ int phy_ethtool_ksettings_set(struct phy_device *phydev,
>  }
>  EXPORT_SYMBOL(phy_ethtool_ksettings_set);
>  
> -int phy_ethtool_gset(struct phy_device *phydev, struct ethtool_cmd *cmd)
> -{
> -	cmd->supported = phydev->supported;
> -
> -	cmd->advertising = phydev->advertising;
> -	cmd->lp_advertising = phydev->lp_advertising;
> -
> -	ethtool_cmd_speed_set(cmd, phydev->speed);
> -	cmd->duplex = phydev->duplex;
> -	if (phydev->interface == PHY_INTERFACE_MODE_MOCA)
> -		cmd->port = PORT_BNC;
> -	else
> -		cmd->port = PORT_MII;
> -	cmd->phy_address = phydev->mdio.addr;
> -	cmd->transceiver = phy_is_internal(phydev) ?
> -		XCVR_INTERNAL : XCVR_EXTERNAL;
> -	cmd->autoneg = phydev->autoneg;
> -	cmd->eth_tp_mdix_ctrl = phydev->mdix_ctrl;
> -	cmd->eth_tp_mdix = phydev->mdix;
> -
> -	return 0;
> -}
> -EXPORT_SYMBOL(phy_ethtool_gset);
> -
>  void phy_ethtool_ksettings_get(struct phy_device *phydev,
>  			       struct ethtool_link_ksettings *cmd)
>  {
> diff --git a/include/linux/phy.h b/include/linux/phy.h
> index 4ec07a6..804851c 100644
> --- a/include/linux/phy.h
> +++ b/include/linux/phy.h
> @@ -843,7 +843,6 @@ void phy_start_machine(struct phy_device *phydev);
>  void phy_stop_machine(struct phy_device *phydev);
>  void phy_trigger_machine(struct phy_device *phydev, bool sync);
>  int phy_ethtool_sset(struct phy_device *phydev, struct ethtool_cmd *cmd);
> -int phy_ethtool_gset(struct phy_device *phydev, struct ethtool_cmd *cmd);
>  void phy_ethtool_ksettings_get(struct phy_device *phydev,
>  			       struct ethtool_link_ksettings *cmd);
>  int phy_ethtool_ksettings_set(struct phy_device *phydev,
> 

-- 
Florian

^ permalink raw reply

* [PATCH] net/{mii, smsc}: Make mii_ethtool_get_link_ksettings and smc_netdev_get_ecmd return void
From: Yuval Shaia @ 2017-06-04 17:22 UTC (permalink / raw)
  To: klassert, pcnet32, hsweeten, jeffrey.t.kirsher, cooldavid,
	mcuos.com, nic_swsd, ralf, romieu, nico, oneukum, davem, tremyfr,
	paul.gortmaker, yuval.shaia, jarod, green.hu, f.fainelli,
	edumazet, shchers, stephen.boyd, fgao, tklauser, jay.vosburgh,
	robert.jarzmik, jeremy.linton, rmk+kernel, stephen, arnd, gerg,
	allan, chris.roth, hayeswang, mario_limonciello, netdev,
	linux-parisc, intel-wired-lan

Make return value void since functions never returns meaningfull value.

Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
---
 drivers/net/cris/eth_v10.c                              |  5 ++---
 drivers/net/ethernet/3com/3c59x.c                       |  4 +++-
 drivers/net/ethernet/amd/pcnet32.c                      |  5 +----
 drivers/net/ethernet/cirrus/ep93xx_eth.c                |  5 ++++-
 drivers/net/ethernet/dec/tulip/winbond-840.c            |  5 ++---
 drivers/net/ethernet/faraday/ftmac100.c                 |  5 ++++-
 drivers/net/ethernet/fealnx.c                           |  5 ++---
 drivers/net/ethernet/intel/e100.c                       |  5 ++++-
 drivers/net/ethernet/jme.c                              |  5 ++---
 drivers/net/ethernet/korina.c                           |  5 ++---
 drivers/net/ethernet/micrel/ks8851.c                    |  5 ++++-
 drivers/net/ethernet/micrel/ks8851_mll.c                |  5 ++++-
 drivers/net/ethernet/nuvoton/w90p910_ether.c            |  5 ++++-
 drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_ethtool.c |  6 +++---
 drivers/net/ethernet/realtek/8139cp.c                   |  5 ++---
 drivers/net/ethernet/realtek/r8169.c                    |  4 +++-
 drivers/net/ethernet/sgi/ioc3-eth.c                     |  5 ++---
 drivers/net/ethernet/sis/sis190.c                       |  4 +++-
 drivers/net/ethernet/smsc/epic100.c                     |  5 ++---
 drivers/net/ethernet/smsc/smc911x.c                     |  7 +++----
 drivers/net/ethernet/smsc/smc91c92_cs.c                 | 13 +++++--------
 drivers/net/ethernet/smsc/smc91x.c                      |  7 ++-----
 drivers/net/ethernet/tundra/tsi108_eth.c                |  5 ++---
 drivers/net/ethernet/via/via-rhine.c                    |  5 ++---
 drivers/net/mii.c                                       |  8 ++------
 drivers/net/usb/ax88179_178a.c                          |  5 ++++-
 drivers/net/usb/r8152.c                                 |  2 +-
 drivers/net/usb/usbnet.c                                |  4 +++-
 include/linux/mii.h                                     |  2 +-
 29 files changed, 78 insertions(+), 73 deletions(-)

diff --git a/drivers/net/cris/eth_v10.c b/drivers/net/cris/eth_v10.c
index da02041..017f48c 100644
--- a/drivers/net/cris/eth_v10.c
+++ b/drivers/net/cris/eth_v10.c
@@ -1417,10 +1417,9 @@ static int e100_get_link_ksettings(struct net_device *dev,
 {
 	struct net_local *np = netdev_priv(dev);
 	u32 supported;
-	int err;
 
 	spin_lock_irq(&np->lock);
-	err = mii_ethtool_get_link_ksettings(&np->mii_if, cmd);
+	mii_ethtool_get_link_ksettings(&np->mii_if, cmd);
 	spin_unlock_irq(&np->lock);
 
 	/* The PHY may support 1000baseT, but the Etrax100 does not.  */
@@ -1432,7 +1431,7 @@ static int e100_get_link_ksettings(struct net_device *dev,
 	ethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.supported,
 						supported);
 
-	return err;
+	return 0;
 }
 
 static int e100_set_link_ksettings(struct net_device *dev,
diff --git a/drivers/net/ethernet/3com/3c59x.c b/drivers/net/ethernet/3com/3c59x.c
index e41245a..14cff60 100644
--- a/drivers/net/ethernet/3com/3c59x.c
+++ b/drivers/net/ethernet/3com/3c59x.c
@@ -2912,7 +2912,9 @@ static int vortex_get_link_ksettings(struct net_device *dev,
 {
 	struct vortex_private *vp = netdev_priv(dev);
 
-	return mii_ethtool_get_link_ksettings(&vp->mii, cmd);
+	mii_ethtool_get_link_ksettings(&vp->mii, cmd);
+
+	return 0;
 }
 
 static int vortex_set_link_ksettings(struct net_device *dev,
diff --git a/drivers/net/ethernet/amd/pcnet32.c b/drivers/net/ethernet/amd/pcnet32.c
index 86369d7..7f60d17 100644
--- a/drivers/net/ethernet/amd/pcnet32.c
+++ b/drivers/net/ethernet/amd/pcnet32.c
@@ -731,12 +731,10 @@ static int pcnet32_get_link_ksettings(struct net_device *dev,
 {
 	struct pcnet32_private *lp = netdev_priv(dev);
 	unsigned long flags;
-	int r = -EOPNOTSUPP;
 
 	spin_lock_irqsave(&lp->lock, flags);
 	if (lp->mii) {
 		mii_ethtool_get_link_ksettings(&lp->mii_if, cmd);
-		r = 0;
 	} else if (lp->chip_version == PCNET32_79C970A) {
 		if (lp->autoneg) {
 			cmd->base.autoneg = AUTONEG_ENABLE;
@@ -753,10 +751,9 @@ static int pcnet32_get_link_ksettings(struct net_device *dev,
 		ethtool_convert_legacy_u32_to_link_mode(
 						cmd->link_modes.supported,
 						SUPPORTED_TP | SUPPORTED_AUI);
-		r = 0;
 	}
 	spin_unlock_irqrestore(&lp->lock, flags);
-	return r;
+	return 0;
 }
 
 static int pcnet32_set_link_ksettings(struct net_device *dev,
diff --git a/drivers/net/ethernet/cirrus/ep93xx_eth.c b/drivers/net/ethernet/cirrus/ep93xx_eth.c
index 7a7c02f..e2a7029 100644
--- a/drivers/net/ethernet/cirrus/ep93xx_eth.c
+++ b/drivers/net/ethernet/cirrus/ep93xx_eth.c
@@ -702,7 +702,10 @@ static int ep93xx_get_link_ksettings(struct net_device *dev,
 				     struct ethtool_link_ksettings *cmd)
 {
 	struct ep93xx_priv *ep = netdev_priv(dev);
-	return mii_ethtool_get_link_ksettings(&ep->mii, cmd);
+
+	mii_ethtool_get_link_ksettings(&ep->mii, cmd);
+
+	return 0;
 }
 
 static int ep93xx_set_link_ksettings(struct net_device *dev,
diff --git a/drivers/net/ethernet/dec/tulip/winbond-840.c b/drivers/net/ethernet/dec/tulip/winbond-840.c
index d1f2f3c..32d7229 100644
--- a/drivers/net/ethernet/dec/tulip/winbond-840.c
+++ b/drivers/net/ethernet/dec/tulip/winbond-840.c
@@ -1395,13 +1395,12 @@ static int netdev_get_link_ksettings(struct net_device *dev,
 				     struct ethtool_link_ksettings *cmd)
 {
 	struct netdev_private *np = netdev_priv(dev);
-	int rc;
 
 	spin_lock_irq(&np->lock);
-	rc = mii_ethtool_get_link_ksettings(&np->mii_if, cmd);
+	mii_ethtool_get_link_ksettings(&np->mii_if, cmd);
 	spin_unlock_irq(&np->lock);
 
-	return rc;
+	return 0;
 }
 
 static int netdev_set_link_ksettings(struct net_device *dev,
diff --git a/drivers/net/ethernet/faraday/ftmac100.c b/drivers/net/ethernet/faraday/ftmac100.c
index 1536356..66928a9 100644
--- a/drivers/net/ethernet/faraday/ftmac100.c
+++ b/drivers/net/ethernet/faraday/ftmac100.c
@@ -829,7 +829,10 @@ static int ftmac100_get_link_ksettings(struct net_device *netdev,
 				       struct ethtool_link_ksettings *cmd)
 {
 	struct ftmac100 *priv = netdev_priv(netdev);
-	return mii_ethtool_get_link_ksettings(&priv->mii, cmd);
+
+	mii_ethtool_get_link_ksettings(&priv->mii, cmd);
+
+	return 0;
 }
 
 static int ftmac100_set_link_ksettings(struct net_device *netdev,
diff --git a/drivers/net/ethernet/fealnx.c b/drivers/net/ethernet/fealnx.c
index 766636a..610f9c0 100644
--- a/drivers/net/ethernet/fealnx.c
+++ b/drivers/net/ethernet/fealnx.c
@@ -1821,13 +1821,12 @@ static int netdev_get_link_ksettings(struct net_device *dev,
 				     struct ethtool_link_ksettings *cmd)
 {
 	struct netdev_private *np = netdev_priv(dev);
-	int rc;
 
 	spin_lock_irq(&np->lock);
-	rc = mii_ethtool_get_link_ksettings(&np->mii, cmd);
+	mii_ethtool_get_link_ksettings(&np->mii, cmd);
 	spin_unlock_irq(&np->lock);
 
-	return rc;
+	return 0;
 }
 
 static int netdev_set_link_ksettings(struct net_device *dev,
diff --git a/drivers/net/ethernet/intel/e100.c b/drivers/net/ethernet/intel/e100.c
index 2b7323d..4d10270 100644
--- a/drivers/net/ethernet/intel/e100.c
+++ b/drivers/net/ethernet/intel/e100.c
@@ -2430,7 +2430,10 @@ static int e100_get_link_ksettings(struct net_device *netdev,
 				   struct ethtool_link_ksettings *cmd)
 {
 	struct nic *nic = netdev_priv(netdev);
-	return mii_ethtool_get_link_ksettings(&nic->mii, cmd);
+
+	mii_ethtool_get_link_ksettings(&nic->mii, cmd);
+
+	return 0;
 }
 
 static int e100_set_link_ksettings(struct net_device *netdev,
diff --git a/drivers/net/ethernet/jme.c b/drivers/net/ethernet/jme.c
index f580b49..a70440b 100644
--- a/drivers/net/ethernet/jme.c
+++ b/drivers/net/ethernet/jme.c
@@ -2652,12 +2652,11 @@ jme_get_link_ksettings(struct net_device *netdev,
 		       struct ethtool_link_ksettings *cmd)
 {
 	struct jme_adapter *jme = netdev_priv(netdev);
-	int rc;
 
 	spin_lock_bh(&jme->phy_lock);
-	rc = mii_ethtool_get_link_ksettings(&jme->mii_if, cmd);
+	mii_ethtool_get_link_ksettings(&jme->mii_if, cmd);
 	spin_unlock_bh(&jme->phy_lock);
-	return rc;
+	return 0;
 }
 
 static int
diff --git a/drivers/net/ethernet/korina.c b/drivers/net/ethernet/korina.c
index 9fae98c..3c0a645 100644
--- a/drivers/net/ethernet/korina.c
+++ b/drivers/net/ethernet/korina.c
@@ -699,13 +699,12 @@ static int netdev_get_link_ksettings(struct net_device *dev,
 				     struct ethtool_link_ksettings *cmd)
 {
 	struct korina_private *lp = netdev_priv(dev);
-	int rc;
 
 	spin_lock_irq(&lp->lock);
-	rc = mii_ethtool_get_link_ksettings(&lp->mii_if, cmd);
+	mii_ethtool_get_link_ksettings(&lp->mii_if, cmd);
 	spin_unlock_irq(&lp->lock);
 
-	return rc;
+	return 0;
 }
 
 static int netdev_set_link_ksettings(struct net_device *dev,
diff --git a/drivers/net/ethernet/micrel/ks8851.c b/drivers/net/ethernet/micrel/ks8851.c
index 20358f8..2fe96f1 100644
--- a/drivers/net/ethernet/micrel/ks8851.c
+++ b/drivers/net/ethernet/micrel/ks8851.c
@@ -1071,7 +1071,10 @@ static int ks8851_get_link_ksettings(struct net_device *dev,
 				     struct ethtool_link_ksettings *cmd)
 {
 	struct ks8851_net *ks = netdev_priv(dev);
-	return mii_ethtool_get_link_ksettings(&ks->mii, cmd);
+
+	mii_ethtool_get_link_ksettings(&ks->mii, cmd);
+
+	return 0;
 }
 
 static int ks8851_set_link_ksettings(struct net_device *dev,
diff --git a/drivers/net/ethernet/micrel/ks8851_mll.c b/drivers/net/ethernet/micrel/ks8851_mll.c
index 7647f7b..f3e9dd4 100644
--- a/drivers/net/ethernet/micrel/ks8851_mll.c
+++ b/drivers/net/ethernet/micrel/ks8851_mll.c
@@ -1315,7 +1315,10 @@ static int ks_get_link_ksettings(struct net_device *netdev,
 				 struct ethtool_link_ksettings *cmd)
 {
 	struct ks_net *ks = netdev_priv(netdev);
-	return mii_ethtool_get_link_ksettings(&ks->mii, cmd);
+
+	mii_ethtool_get_link_ksettings(&ks->mii, cmd);
+
+	return 0;
 }
 
 static int ks_set_link_ksettings(struct net_device *netdev,
diff --git a/drivers/net/ethernet/nuvoton/w90p910_ether.c b/drivers/net/ethernet/nuvoton/w90p910_ether.c
index 159564d..89ab786 100644
--- a/drivers/net/ethernet/nuvoton/w90p910_ether.c
+++ b/drivers/net/ethernet/nuvoton/w90p910_ether.c
@@ -868,7 +868,10 @@ static int w90p910_get_link_ksettings(struct net_device *dev,
 				      struct ethtool_link_ksettings *cmd)
 {
 	struct w90p910_ether *ether = netdev_priv(dev);
-	return mii_ethtool_get_link_ksettings(&ether->mii, cmd);
+
+	mii_ethtool_get_link_ksettings(&ether->mii, cmd);
+
+	return 0;
 }
 
 static int w90p910_set_link_ksettings(struct net_device *dev,
diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_ethtool.c b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_ethtool.c
index 2109327..731ce1e 100644
--- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_ethtool.c
+++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_ethtool.c
@@ -85,9 +85,8 @@ static int pch_gbe_get_link_ksettings(struct net_device *netdev,
 {
 	struct pch_gbe_adapter *adapter = netdev_priv(netdev);
 	u32 supported, advertising;
-	int ret;
 
-	ret = mii_ethtool_get_link_ksettings(&adapter->mii, ecmd);
+	mii_ethtool_get_link_ksettings(&adapter->mii, ecmd);
 
 	ethtool_convert_link_mode_to_legacy_u32(&supported,
 						ecmd->link_modes.supported);
@@ -104,7 +103,8 @@ static int pch_gbe_get_link_ksettings(struct net_device *netdev,
 
 	if (!netif_carrier_ok(adapter->netdev))
 		ecmd->base.speed = SPEED_UNKNOWN;
-	return ret;
+
+	return 0;
 }
 
 /**
diff --git a/drivers/net/ethernet/realtek/8139cp.c b/drivers/net/ethernet/realtek/8139cp.c
index 72233ab..e7ab23e 100644
--- a/drivers/net/ethernet/realtek/8139cp.c
+++ b/drivers/net/ethernet/realtek/8139cp.c
@@ -1410,14 +1410,13 @@ static int cp_get_link_ksettings(struct net_device *dev,
 				 struct ethtool_link_ksettings *cmd)
 {
 	struct cp_private *cp = netdev_priv(dev);
-	int rc;
 	unsigned long flags;
 
 	spin_lock_irqsave(&cp->lock, flags);
-	rc = mii_ethtool_get_link_ksettings(&cp->mii_if, cmd);
+	mii_ethtool_get_link_ksettings(&cp->mii_if, cmd);
 	spin_unlock_irqrestore(&cp->lock, flags);
 
-	return rc;
+	return 0;
 }
 
 static int cp_set_link_ksettings(struct net_device *dev,
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index 0a8f281..bd07a15 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -2148,7 +2148,9 @@ static int rtl8169_get_link_ksettings_xmii(struct net_device *dev,
 {
 	struct rtl8169_private *tp = netdev_priv(dev);
 
-	return mii_ethtool_get_link_ksettings(&tp->mii, cmd);
+	mii_ethtool_get_link_ksettings(&tp->mii, cmd);
+
+	return 0;
 }
 
 static int rtl8169_get_link_ksettings(struct net_device *dev,
diff --git a/drivers/net/ethernet/sgi/ioc3-eth.c b/drivers/net/ethernet/sgi/ioc3-eth.c
index 52ead55..b607936 100644
--- a/drivers/net/ethernet/sgi/ioc3-eth.c
+++ b/drivers/net/ethernet/sgi/ioc3-eth.c
@@ -1562,13 +1562,12 @@ static int ioc3_get_link_ksettings(struct net_device *dev,
 				   struct ethtool_link_ksettings *cmd)
 {
 	struct ioc3_private *ip = netdev_priv(dev);
-	int rc;
 
 	spin_lock_irq(&ip->ioc3_lock);
-	rc = mii_ethtool_get_link_ksettings(&ip->mii, cmd);
+	mii_ethtool_get_link_ksettings(&ip->mii, cmd);
 	spin_unlock_irq(&ip->ioc3_lock);
 
-	return rc;
+	return 0;
 }
 
 static int ioc3_set_link_ksettings(struct net_device *dev,
diff --git a/drivers/net/ethernet/sis/sis190.c b/drivers/net/ethernet/sis/sis190.c
index 02da106..445109b 100644
--- a/drivers/net/ethernet/sis/sis190.c
+++ b/drivers/net/ethernet/sis/sis190.c
@@ -1739,7 +1739,9 @@ static int sis190_get_link_ksettings(struct net_device *dev,
 {
 	struct sis190_private *tp = netdev_priv(dev);
 
-	return mii_ethtool_get_link_ksettings(&tp->mii_if, cmd);
+	mii_ethtool_get_link_ksettings(&tp->mii_if, cmd);
+
+	return 0;
 }
 
 static int sis190_set_link_ksettings(struct net_device *dev,
diff --git a/drivers/net/ethernet/smsc/epic100.c b/drivers/net/ethernet/smsc/epic100.c
index db6dcb0..6a0e1d4 100644
--- a/drivers/net/ethernet/smsc/epic100.c
+++ b/drivers/net/ethernet/smsc/epic100.c
@@ -1391,13 +1391,12 @@ static int netdev_get_link_ksettings(struct net_device *dev,
 				     struct ethtool_link_ksettings *cmd)
 {
 	struct epic_private *np = netdev_priv(dev);
-	int rc;
 
 	spin_lock_irq(&np->lock);
-	rc = mii_ethtool_get_link_ksettings(&np->mii, cmd);
+	mii_ethtool_get_link_ksettings(&np->mii, cmd);
 	spin_unlock_irq(&np->lock);
 
-	return rc;
+	return 0;
 }
 
 static int netdev_set_link_ksettings(struct net_device *dev,
diff --git a/drivers/net/ethernet/smsc/smc911x.c b/drivers/net/ethernet/smsc/smc911x.c
index 36307d3..0515744 100644
--- a/drivers/net/ethernet/smsc/smc911x.c
+++ b/drivers/net/ethernet/smsc/smc911x.c
@@ -1450,7 +1450,7 @@ smc911x_ethtool_get_link_ksettings(struct net_device *dev,
 				   struct ethtool_link_ksettings *cmd)
 {
 	struct smc911x_local *lp = netdev_priv(dev);
-	int ret, status;
+	int status;
 	unsigned long flags;
 	u32 supported;
 
@@ -1458,7 +1458,7 @@ smc911x_ethtool_get_link_ksettings(struct net_device *dev,
 
 	if (lp->phy_type != 0) {
 		spin_lock_irqsave(&lp->lock, flags);
-		ret = mii_ethtool_get_link_ksettings(&lp->mii, cmd);
+		mii_ethtool_get_link_ksettings(&lp->mii, cmd);
 		spin_unlock_irqrestore(&lp->lock, flags);
 	} else {
 		supported = SUPPORTED_10baseT_Half |
@@ -1480,10 +1480,9 @@ smc911x_ethtool_get_link_ksettings(struct net_device *dev,
 		ethtool_convert_legacy_u32_to_link_mode(
 			cmd->link_modes.supported, supported);
 
-		ret = 0;
 	}
 
-	return ret;
+	return 0;
 }
 
 static int
diff --git a/drivers/net/ethernet/smsc/smc91c92_cs.c b/drivers/net/ethernet/smsc/smc91c92_cs.c
index 976aa87..92c927a 100644
--- a/drivers/net/ethernet/smsc/smc91c92_cs.c
+++ b/drivers/net/ethernet/smsc/smc91c92_cs.c
@@ -1843,8 +1843,8 @@ static int smc_link_ok(struct net_device *dev)
     }
 }
 
-static int smc_netdev_get_ecmd(struct net_device *dev,
-			       struct ethtool_link_ksettings *ecmd)
+static void smc_netdev_get_ecmd(struct net_device *dev,
+				struct ethtool_link_ksettings *ecmd)
 {
 	u16 tmp;
 	unsigned int ioaddr = dev->base_addr;
@@ -1865,8 +1865,6 @@ static int smc_netdev_get_ecmd(struct net_device *dev,
 
 	ethtool_convert_legacy_u32_to_link_mode(ecmd->link_modes.supported,
 						supported);
-
-	return 0;
 }
 
 static int smc_netdev_set_ecmd(struct net_device *dev,
@@ -1918,18 +1916,17 @@ static int smc_get_link_ksettings(struct net_device *dev,
 	struct smc_private *smc = netdev_priv(dev);
 	unsigned int ioaddr = dev->base_addr;
 	u16 saved_bank = inw(ioaddr + BANK_SELECT);
-	int ret;
 	unsigned long flags;
 
 	spin_lock_irqsave(&smc->lock, flags);
 	SMC_SELECT_BANK(3);
 	if (smc->cfg & CFG_MII_SELECT)
-		ret = mii_ethtool_get_link_ksettings(&smc->mii_if, ecmd);
+		mii_ethtool_get_link_ksettings(&smc->mii_if, ecmd);
 	else
-		ret = smc_netdev_get_ecmd(dev, ecmd);
+		smc_netdev_get_ecmd(dev, ecmd);
 	SMC_SELECT_BANK(saved_bank);
 	spin_unlock_irqrestore(&smc->lock, flags);
-	return ret;
+	return 0;
 }
 
 static int smc_set_link_ksettings(struct net_device *dev,
diff --git a/drivers/net/ethernet/smsc/smc91x.c b/drivers/net/ethernet/smsc/smc91x.c
index 91e9bd7..0d230b1 100644
--- a/drivers/net/ethernet/smsc/smc91x.c
+++ b/drivers/net/ethernet/smsc/smc91x.c
@@ -1539,11 +1539,10 @@ smc_ethtool_get_link_ksettings(struct net_device *dev,
 			       struct ethtool_link_ksettings *cmd)
 {
 	struct smc_local *lp = netdev_priv(dev);
-	int ret;
 
 	if (lp->phy_type != 0) {
 		spin_lock_irq(&lp->lock);
-		ret = mii_ethtool_get_link_ksettings(&lp->mii, cmd);
+		mii_ethtool_get_link_ksettings(&lp->mii, cmd);
 		spin_unlock_irq(&lp->lock);
 	} else {
 		u32 supported = SUPPORTED_10baseT_Half |
@@ -1562,11 +1561,9 @@ smc_ethtool_get_link_ksettings(struct net_device *dev,
 
 		ethtool_convert_legacy_u32_to_link_mode(
 			cmd->link_modes.supported, supported);
-
-		ret = 0;
 	}
 
-	return ret;
+	return 0;
 }
 
 static int
diff --git a/drivers/net/ethernet/tundra/tsi108_eth.c b/drivers/net/ethernet/tundra/tsi108_eth.c
index 5ac6eaa..c2d15d9 100644
--- a/drivers/net/ethernet/tundra/tsi108_eth.c
+++ b/drivers/net/ethernet/tundra/tsi108_eth.c
@@ -1504,13 +1504,12 @@ static int tsi108_get_link_ksettings(struct net_device *dev,
 {
 	struct tsi108_prv_data *data = netdev_priv(dev);
 	unsigned long flags;
-	int rc;
 
 	spin_lock_irqsave(&data->txlock, flags);
-	rc = mii_ethtool_get_link_ksettings(&data->mii_if, cmd);
+	mii_ethtool_get_link_ksettings(&data->mii_if, cmd);
 	spin_unlock_irqrestore(&data->txlock, flags);
 
-	return rc;
+	return 0;
 }
 
 static int tsi108_set_link_ksettings(struct net_device *dev,
diff --git a/drivers/net/ethernet/via/via-rhine.c b/drivers/net/ethernet/via/via-rhine.c
index 4cf41f7..acd29d6 100644
--- a/drivers/net/ethernet/via/via-rhine.c
+++ b/drivers/net/ethernet/via/via-rhine.c
@@ -2307,13 +2307,12 @@ static int netdev_get_link_ksettings(struct net_device *dev,
 				     struct ethtool_link_ksettings *cmd)
 {
 	struct rhine_private *rp = netdev_priv(dev);
-	int rc;
 
 	mutex_lock(&rp->task_lock);
-	rc = mii_ethtool_get_link_ksettings(&rp->mii_if, cmd);
+	mii_ethtool_get_link_ksettings(&rp->mii_if, cmd);
 	mutex_unlock(&rp->task_lock);
 
-	return rc;
+	return 0;
 }
 
 static int netdev_set_link_ksettings(struct net_device *dev,
diff --git a/drivers/net/mii.c b/drivers/net/mii.c
index 6d953c5..44612122 100644
--- a/drivers/net/mii.c
+++ b/drivers/net/mii.c
@@ -141,11 +141,9 @@ int mii_ethtool_gset(struct mii_if_info *mii, struct ethtool_cmd *ecmd)
  *
  * The @cmd parameter is expected to have been cleared before calling
  * mii_ethtool_get_link_ksettings().
- *
- * Returns 0 for success, negative on error.
  */
-int mii_ethtool_get_link_ksettings(struct mii_if_info *mii,
-				   struct ethtool_link_ksettings *cmd)
+void mii_ethtool_get_link_ksettings(struct mii_if_info *mii,
+				    struct ethtool_link_ksettings *cmd)
 {
 	struct net_device *dev = mii->dev;
 	u16 bmcr, bmsr, ctrl1000 = 0, stat1000 = 0;
@@ -227,8 +225,6 @@ int mii_ethtool_get_link_ksettings(struct mii_if_info *mii,
 						lp_advertising);
 
 	/* ignore maxtxpkt, maxrxpkt for now */
-
-	return 0;
 }
 
 /**
diff --git a/drivers/net/usb/ax88179_178a.c b/drivers/net/usb/ax88179_178a.c
index 51cf600..793ce90 100644
--- a/drivers/net/usb/ax88179_178a.c
+++ b/drivers/net/usb/ax88179_178a.c
@@ -624,7 +624,10 @@ static int ax88179_get_link_ksettings(struct net_device *net,
 				      struct ethtool_link_ksettings *cmd)
 {
 	struct usbnet *dev = netdev_priv(net);
-	return mii_ethtool_get_link_ksettings(&dev->mii, cmd);
+
+	mii_ethtool_get_link_ksettings(&dev->mii, cmd);
+
+	return 0;
 }
 
 static int ax88179_set_link_ksettings(struct net_device *net,
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index ddc62cb..effa7a22 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -3841,7 +3841,7 @@ int rtl8152_get_link_ksettings(struct net_device *netdev,
 
 	mutex_lock(&tp->control);
 
-	ret = mii_ethtool_get_link_ksettings(&tp->mii, cmd);
+	mii_ethtool_get_link_ksettings(&tp->mii, cmd);
 
 	mutex_unlock(&tp->control);
 
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index 79048e7..6510e5c 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -956,7 +956,9 @@ int usbnet_get_link_ksettings(struct net_device *net,
 	if (!dev->mii.mdio_read)
 		return -EOPNOTSUPP;
 
-	return mii_ethtool_get_link_ksettings(&dev->mii, cmd);
+	mii_ethtool_get_link_ksettings(&dev->mii, cmd);
+
+	return 0;
 }
 EXPORT_SYMBOL_GPL(usbnet_get_link_ksettings);
 
diff --git a/include/linux/mii.h b/include/linux/mii.h
index 1629a0c..e870bfa 100644
--- a/include/linux/mii.h
+++ b/include/linux/mii.h
@@ -31,7 +31,7 @@ struct mii_if_info {
 extern int mii_link_ok (struct mii_if_info *mii);
 extern int mii_nway_restart (struct mii_if_info *mii);
 extern int mii_ethtool_gset(struct mii_if_info *mii, struct ethtool_cmd *ecmd);
-extern int mii_ethtool_get_link_ksettings(
+extern void mii_ethtool_get_link_ksettings(
 	struct mii_if_info *mii, struct ethtool_link_ksettings *cmd);
 extern int mii_ethtool_sset(struct mii_if_info *mii, struct ethtool_cmd *ecmd);
 extern int mii_ethtool_set_link_ksettings(
-- 
2.9.4

^ permalink raw reply related

* Re: [PATCH] net/dec: Make __de_get_link_ksettings return void
From: Sergei Shtylyov @ 2017-06-04 17:22 UTC (permalink / raw)
  To: Yuval Shaia, davem, jarod, tklauser, tremyfr, netdev,
	linux-parisc
In-Reply-To: <20170604170851.3808-1-yuval.shaia@oracle.com>

Hello!

On 6/4/2017 8:08 PM, Yuval Shaia wrote:

> Make return value void since function never return meaningfull value

   You only make 1 of 2 functions void. It looks like there should be 2 patches.

>
> Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
> ---
>  drivers/net/ethernet/dec/tulip/de2104x.c | 11 ++++-------
>  1 file changed, 4 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/net/ethernet/dec/tulip/de2104x.c b/drivers/net/ethernet/dec/tulip/de2104x.c
> index 91b8f6f..c87b8cc 100644
> --- a/drivers/net/ethernet/dec/tulip/de2104x.c
> +++ b/drivers/net/ethernet/dec/tulip/de2104x.c
> @@ -1483,8 +1483,8 @@ static void __de_get_regs(struct de_private *de, u8 *buf)
>  	de_rx_missed(de, rbuf[8]);
>  }
>
> -static int __de_get_link_ksettings(struct de_private *de,
> -				   struct ethtool_link_ksettings *cmd)
> +static void __de_get_link_ksettings(struct de_private *de,
> +				    struct ethtool_link_ksettings *cmd)
>  {
>  	ethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.supported,
>  						de->media_supported);
> @@ -1517,8 +1517,6 @@ static int __de_get_link_ksettings(struct de_private *de,
>  		cmd->base.autoneg = AUTONEG_ENABLE;
>
>  	/* ignore maxtxpkt, maxrxpkt for now */
> -
> -	return 0;
>  }
>
>  static int __de_set_link_ksettings(struct de_private *de,
> @@ -1615,13 +1613,12 @@ static int de_get_link_ksettings(struct net_device *dev,
>  				 struct ethtool_link_ksettings *cmd)
>  {
>  	struct de_private *de = netdev_priv(dev);
> -	int rc;
>
>  	spin_lock_irq(&de->lock);
> -	rc = __de_get_link_ksettings(de, cmd);
> +	__de_get_link_ksettings(de, cmd);
>  	spin_unlock_irq(&de->lock);
>
> -	return rc;
> +	return 0;
>  }
>
>  static int de_set_link_ksettings(struct net_device *dev,
>

MBR, Sergei


^ permalink raw reply

* Re: [PATCH] net/dec: Make __de_get_link_ksettings return void
From: Sergei Shtylyov @ 2017-06-04 17:24 UTC (permalink / raw)
  To: Yuval Shaia, davem, jarod, tklauser, tremyfr, netdev,
	linux-parisc
In-Reply-To: <4391c380-f7f6-d549-a225-716b9b9df664@cogentembedded.com>

On 6/4/2017 8:22 PM, Sergei Shtylyov wrote:

>> Make return value void since function never return meaningfull value
>
>   You only make 1 of 2 functions void. It looks like there should be 2 patches.

    Oh, sorry, I was just blind. B-)

MBR, Sergei


^ permalink raw reply

* [PATCH] net/3com: Make el3_netdev_get_ecmd return void
From: Yuval Shaia @ 2017-06-04 17:24 UTC (permalink / raw)
  To: davem, yuval.shaia, jarod, tremyfr, dhowells, netdev

Make return value void since function never returns meaningfull value.

Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
---
 drivers/net/ethernet/3com/3c509.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/3com/3c509.c b/drivers/net/ethernet/3com/3c509.c
index db8592d..f66c971 100644
--- a/drivers/net/ethernet/3com/3c509.c
+++ b/drivers/net/ethernet/3com/3c509.c
@@ -1039,7 +1039,7 @@ el3_link_ok(struct net_device *dev)
 	return tmp & (1<<11);
 }
 
-static int
+static void
 el3_netdev_get_ecmd(struct net_device *dev, struct ethtool_link_ksettings *cmd)
 {
 	u16 tmp;
@@ -1082,7 +1082,6 @@ el3_netdev_get_ecmd(struct net_device *dev, struct ethtool_link_ksettings *cmd)
 						supported);
 	cmd->base.speed = SPEED_10;
 	EL3WINDOW(1);
-	return 0;
 }
 
 static int
@@ -1151,12 +1150,11 @@ static int el3_get_link_ksettings(struct net_device *dev,
 				  struct ethtool_link_ksettings *cmd)
 {
 	struct el3_private *lp = netdev_priv(dev);
-	int ret;
 
 	spin_lock_irq(&lp->lock);
-	ret = el3_netdev_get_ecmd(dev, cmd);
+	el3_netdev_get_ecmd(dev, cmd);
 	spin_unlock_irq(&lp->lock);
-	return ret;
+	return 0;
 }
 
 static int el3_set_link_ksettings(struct net_device *dev,
-- 
2.9.4

^ permalink raw reply related

* [PATCH] net-next: stmmac: dwmac-sun8i: ensure the EPHY is properly reseted
From: Icenowy Zheng @ 2017-06-04 17:53 UTC (permalink / raw)
  To: Corentin Labbe, David S . Miller
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Icenowy Zheng

The EPHY may be already enabled by bootloaders which have Ethernet
capability (e.g. current U-Boot). Thus it should be reseted properly
before doing the enabling sequence in the dwmac-sun8i driver, otherwise
the EMAC reset process may fail if no cable is plugged, and then fail
the dwmac-sun8i probing.

Tested on Orange Pi PC, One and Zero. All the boards fail to have
dwmac-sun8i probed with "EMAC reset timeout" without cable plugged
before, and with this fix they're now all able to successfully probe the
EMAC without cable plugged and then use the connection after a cable is
hot-plugged in.

Fixes: 9f93ac8d408 ("net-next: stmmac: Add dwmac-sun8i")
Signed-off-by: Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org>
---
 drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
index 1a6bfe6c958f..54f93ee53ef7 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
@@ -750,6 +750,11 @@ static int sun8i_dwmac_power_internal_phy(struct stmmac_priv *priv)
 		return ret;
 	}
 
+	/* Make sure the EPHY is properly reseted, as U-Boot may leave
+	 * it at deasserted state, and thus it may fail to reset EMAC.
+	 */
+	reset_control_assert(gmac->rst_ephy);
+
 	ret = reset_control_deassert(gmac->rst_ephy);
 	if (ret) {
 		dev_err(priv->device, "Cannot deassert ephy\n");
-- 
2.12.2

^ permalink raw reply related

* Re: [PATCH] net/phy: Make phy_ethtool_ksettings_get return void
From: kbuild test robot @ 2017-06-04 18:45 UTC (permalink / raw)
  To: Yuval Shaia
  Cc: andrew, madalin.bucur, prashant, f.fainelli, xypron.glpk, jarod,
	bcm-kernel-feedback-list, leoli, sebastian.hesselbarth,
	woojung.huh, mugunthanvnm, grygorii.strashko, arnd, johan,
	yuval.shaia, siva.kallam, michael.chan, linux-omap,
	linux-arm-kernel, ivan.khoronzhuk, vivien.didelot, netdev,
	linux-usb, UNGLinuxDriver, kbuild-all, linuxppc-dev, davem,
	tremyfr
In-Reply-To: <20170604171428.4012-1-yuval.shaia@oracle.com>

[-- Attachment #1: Type: text/plain, Size: 5594 bytes --]

Hi Yuval,

[auto build test ERROR on net-next/master]
[also build test ERROR on v4.12-rc3 next-20170602]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Yuval-Shaia/net-phy-Make-phy_ethtool_ksettings_get-return-void/20170605-012813
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 6.2.0
reproduce:
        wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=ia64 

All error/warnings (new ones prefixed by >>):

   drivers/net//ethernet/renesas/sh_eth.c: In function 'sh_eth_get_link_ksettings':
>> drivers/net//ethernet/renesas/sh_eth.c:1924:6: error: void value not ignored as it ought to be
     ret = phy_ethtool_ksettings_get(ndev->phydev, cmd);
         ^
--
   drivers/net//ethernet/renesas/ravb_main.c: In function 'ravb_get_link_ksettings':
>> drivers/net//ethernet/renesas/ravb_main.c:1084:9: error: void value not ignored as it ought to be
      error = phy_ethtool_ksettings_get(ndev->phydev, cmd);
            ^
--
   drivers/net//ethernet/apm/xgene/xgene_enet_ethtool.c: In function 'xgene_get_link_ksettings':
>> drivers/net//ethernet/apm/xgene/xgene_enet_ethtool.c:134:10: error: void value not ignored as it ought to be
      return phy_ethtool_ksettings_get(phydev, cmd);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net//ethernet/apm/xgene/xgene_enet_ethtool.c:140:11: error: void value not ignored as it ought to be
       return phy_ethtool_ksettings_get(phydev, cmd);
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
   drivers/net//ethernet/apm/xgene-v2/ethtool.c: In function 'xge_get_link_ksettings':
>> drivers/net//ethernet/apm/xgene-v2/ethtool.c:160:9: error: void value not ignored as it ought to be
     return phy_ethtool_ksettings_get(phydev, cmd);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net//ethernet/apm/xgene-v2/ethtool.c:161:1: warning: control reaches end of non-void function [-Wreturn-type]
    }
    ^
--
   drivers/net//ethernet/stmicro/stmmac/stmmac_ethtool.c: In function 'stmmac_ethtool_get_link_ksettings':
>> drivers/net//ethernet/stmicro/stmmac/stmmac_ethtool.c:367:5: error: void value not ignored as it ought to be
     rc = phy_ethtool_ksettings_get(phy, cmd);
        ^

vim +1924 drivers/net//ethernet/renesas/sh_eth.c

9fd0375ad drivers/net/ethernet/renesas/sh_eth.c Philippe Reynes   2016-08-10  1908  	phy_start(ndev->phydev);
86a74ff21 drivers/net/sh_eth.c                  Nobuhiro Iwamatsu 2008-06-09  1909  
86a74ff21 drivers/net/sh_eth.c                  Nobuhiro Iwamatsu 2008-06-09  1910  	return 0;
86a74ff21 drivers/net/sh_eth.c                  Nobuhiro Iwamatsu 2008-06-09  1911  }
86a74ff21 drivers/net/sh_eth.c                  Nobuhiro Iwamatsu 2008-06-09  1912  
f08aff444 drivers/net/ethernet/renesas/sh_eth.c Philippe Reynes   2016-08-10  1913  static int sh_eth_get_link_ksettings(struct net_device *ndev,
f08aff444 drivers/net/ethernet/renesas/sh_eth.c Philippe Reynes   2016-08-10  1914  				     struct ethtool_link_ksettings *cmd)
dc19e4e5e drivers/net/sh_eth.c                  Nobuhiro Iwamatsu 2011-02-15  1915  {
dc19e4e5e drivers/net/sh_eth.c                  Nobuhiro Iwamatsu 2011-02-15  1916  	struct sh_eth_private *mdp = netdev_priv(ndev);
dc19e4e5e drivers/net/sh_eth.c                  Nobuhiro Iwamatsu 2011-02-15  1917  	unsigned long flags;
dc19e4e5e drivers/net/sh_eth.c                  Nobuhiro Iwamatsu 2011-02-15  1918  	int ret;
dc19e4e5e drivers/net/sh_eth.c                  Nobuhiro Iwamatsu 2011-02-15  1919  
9fd0375ad drivers/net/ethernet/renesas/sh_eth.c Philippe Reynes   2016-08-10  1920  	if (!ndev->phydev)
4f9dce230 drivers/net/ethernet/renesas/sh_eth.c Ben Hutchings     2015-01-16  1921  		return -ENODEV;
4f9dce230 drivers/net/ethernet/renesas/sh_eth.c Ben Hutchings     2015-01-16  1922  
dc19e4e5e drivers/net/sh_eth.c                  Nobuhiro Iwamatsu 2011-02-15  1923  	spin_lock_irqsave(&mdp->lock, flags);
f08aff444 drivers/net/ethernet/renesas/sh_eth.c Philippe Reynes   2016-08-10 @1924  	ret = phy_ethtool_ksettings_get(ndev->phydev, cmd);
dc19e4e5e drivers/net/sh_eth.c                  Nobuhiro Iwamatsu 2011-02-15  1925  	spin_unlock_irqrestore(&mdp->lock, flags);
dc19e4e5e drivers/net/sh_eth.c                  Nobuhiro Iwamatsu 2011-02-15  1926  
dc19e4e5e drivers/net/sh_eth.c                  Nobuhiro Iwamatsu 2011-02-15  1927  	return ret;
dc19e4e5e drivers/net/sh_eth.c                  Nobuhiro Iwamatsu 2011-02-15  1928  }
dc19e4e5e drivers/net/sh_eth.c                  Nobuhiro Iwamatsu 2011-02-15  1929  
f08aff444 drivers/net/ethernet/renesas/sh_eth.c Philippe Reynes   2016-08-10  1930  static int sh_eth_set_link_ksettings(struct net_device *ndev,
f08aff444 drivers/net/ethernet/renesas/sh_eth.c Philippe Reynes   2016-08-10  1931  				     const struct ethtool_link_ksettings *cmd)
dc19e4e5e drivers/net/sh_eth.c                  Nobuhiro Iwamatsu 2011-02-15  1932  {

:::::: The code at line 1924 was first introduced by commit
:::::: f08aff444ae0004c9ae6df3241fc313a5024d375 net: ethernet: renesas: sh_eth: use new api ethtool_{get|set}_link_ksettings

:::::: TO: Philippe Reynes <tremyfr@gmail.com>
:::::: CC: David S. Miller <davem@davemloft.net>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 47761 bytes --]

[-- Attachment #3: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply

* Re: [PATCH] net/{mii,smsc}: Make mii_ethtool_get_link_ksettings and smc_netdev_get_ecmd return void
From: Andrew Lunn @ 2017-06-04 19:01 UTC (permalink / raw)
  To: Yuval Shaia
  Cc: klassert, pcnet32, hsweeten, jeffrey.t.kirsher, cooldavid,
	mcuos.com, nic_swsd, ralf, romieu, nico, oneukum, davem, tremyfr,
	paul.gortmaker, jarod, green.hu, f.fainelli, edumazet, shchers,
	stephen.boyd, fgao, tklauser, jay.vosburgh, robert.jarzmik,
	jeremy.linton, rmk+kernel, stephen, arnd, gerg, allan, chris.roth,
	hayeswang, mario_limonciello, netdev
In-Reply-To: <20170604172200.4177-1-yuval.shaia@oracle.com>

> diff --git a/drivers/net/cris/eth_v10.c b/drivers/net/cris/eth_v10.c
> index da02041..017f48c 100644
> --- a/drivers/net/cris/eth_v10.c
> +++ b/drivers/net/cris/eth_v10.c
> @@ -1417,10 +1417,9 @@ static int e100_get_link_ksettings(struct net_device *dev,
>  {
>  	struct net_local *np = netdev_priv(dev);
>  	u32 supported;
> -	int err;
>  
>  	spin_lock_irq(&np->lock);
> -	err = mii_ethtool_get_link_ksettings(&np->mii_if, cmd);
> +	mii_ethtool_get_link_ksettings(&np->mii_if, cmd);
>  	spin_unlock_irq(&np->lock);
>  
>  	/* The PHY may support 1000baseT, but the Etrax100 does not.  */
> @@ -1432,7 +1431,7 @@ static int e100_get_link_ksettings(struct net_device *dev,
>  	ethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.supported,
>  						supported);
>  
> -	return err;
> +	return 0;
>  }

How far are going planning on going? It seems like
*_get_link_ksettings() now all return a useless 0. Do you plan to
change ethtool_ops and make if void all the way up?

       Andrew

^ permalink raw reply

* RE: [PATCH net-next] genetlink: remove ops_list from genetlink header.
From: Rosen, Rami @ 2017-06-04 19:20 UTC (permalink / raw)
  To: Sergei Shtylyov, davem@davemloft.net
  Cc: netdev@vger.kernel.org, Berg, Johannes
In-Reply-To: <b68021eb-180c-f486-3e0e-546824444b5b@cogentembedded.com>

Hi, Sergei,

Thanks! I will send V2 with 12 digits for the commit.

Regards,
Rami Rosen


-----Original Message-----
From: Sergei Shtylyov [mailto:sergei.shtylyov@cogentembedded.com] 
Sent: Sunday, June 04, 2017 20:18
To: Rosen, Rami <rami.rosen@intel.com>; davem@davemloft.net
Cc: netdev@vger.kernel.org; Berg, Johannes <johannes.berg@intel.com>
Subject: Re: [PATCH net-next] genetlink: remove ops_list from genetlink header.

Hello!

On 6/4/2017 10:07 AM, Rami Rosen wrote:

> commit d91824 ("genetlink: register family ops as array") removed the

    At least 12 digits required.

> ops_list member from both genl_family and genl_ops; while the 
> documentation of genl_family was updated accordingly by this patch, 
> ops_list remained in the documentation of the genl_ops object.
> This patch fixes it by removing ops_list from genl_ops documentation.
>
> Signed-off-by: Rami Rosen <rami.rosen@intel.com>
[...]

MNR, Sergei


^ permalink raw reply

* [PATCH v2 net-next] genetlink: remove ops_list from genetlink header.
From: Rami Rosen @ 2017-06-04 12:20 UTC (permalink / raw)
  To: davem; +Cc: johannes.berg, netdev, Rami Rosen

commit d91824c08fbc ("genetlink: register family ops as array") removed the 
ops_list member from both genl_family and genl_ops; while the 
documentation of genl_family was updated accordingly by this patch, 
ops_list remained in the documentation of the genl_ops object. 
This patch fixes it by removing ops_list from genl_ops documentation. 

Signed-off-by: Rami Rosen <rami.rosen@intel.com>
---
 include/net/genetlink.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/net/genetlink.h b/include/net/genetlink.h
index 68b8819..c59a098 100644
--- a/include/net/genetlink.h
+++ b/include/net/genetlink.h
@@ -128,7 +128,6 @@ static inline int genl_err_attr(struct genl_info *info, int err,
  * @start: start callback for dumps
  * @dumpit: callback for dumpers
  * @done: completion callback for dumps
- * @ops_list: operations list
  */
 struct genl_ops {
 	const struct nla_policy	*policy;
-- 
2.4.11

^ permalink raw reply related

* Re: [PATCH] net/{mii,smsc}: Make mii_ethtool_get_link_ksettings and smc_netdev_get_ecmd return void
From: Yuval Shaia @ 2017-06-04 19:49 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: linux-mips, linux-usb, shchers, stephen.boyd, paul.gortmaker,
	edumazet, jeremy.linton, robert.jarzmik, gerg, f.fainelli, arnd,
	cooldavid, jarod, intel-wired-lan, jeffrey.t.kirsher, romieu,
	jay.vosburgh, tklauser, hayeswang, allan, nic_swsd, mcuos.com,
	mario_limonciello, rmk+kernel, pcnet32, green.hu, chris.roth,
	linux-arm-kernel, klassert, linux-parisc, nico, netdev, oneukum,
	ralf, stephen, hsweeten, fgao
In-Reply-To: <20170604190133.GB10273@lunn.ch>

On Sun, Jun 04, 2017 at 09:01:33PM +0200, Andrew Lunn wrote:
> > diff --git a/drivers/net/cris/eth_v10.c b/drivers/net/cris/eth_v10.c
> > index da02041..017f48c 100644
> > --- a/drivers/net/cris/eth_v10.c
> > +++ b/drivers/net/cris/eth_v10.c
> > @@ -1417,10 +1417,9 @@ static int e100_get_link_ksettings(struct net_device *dev,
> >  {
> >  	struct net_local *np = netdev_priv(dev);
> >  	u32 supported;
> > -	int err;
> >  
> >  	spin_lock_irq(&np->lock);
> > -	err = mii_ethtool_get_link_ksettings(&np->mii_if, cmd);
> > +	mii_ethtool_get_link_ksettings(&np->mii_if, cmd);
> >  	spin_unlock_irq(&np->lock);
> >  
> >  	/* The PHY may support 1000baseT, but the Etrax100 does not.  */
> > @@ -1432,7 +1431,7 @@ static int e100_get_link_ksettings(struct net_device *dev,
> >  	ethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.supported,
> >  						supported);
> >  
> > -	return err;
> > +	return 0;
> >  }
> 
> How far are going planning on going? It seems like
> *_get_link_ksettings() now all return a useless 0. Do you plan to
> change ethtool_ops and make if void all the way up?

It is not always correct, see for example how xgene_get_link_ksettings
returns non-zero value so i assume that ethtool_ops should remain as it is.
Also, looking at ethtool_get_settings it seems that returned value is
checked.

> 
>        Andrew

^ permalink raw reply

* Re: [PATCH] net/dec: Make __de_get_link_ksettings return void
From: Yuval Shaia @ 2017-06-04 19:52 UTC (permalink / raw)
  To: Sergei Shtylyov; +Cc: davem, jarod, tklauser, tremyfr, netdev, linux-parisc
In-Reply-To: <4391c380-f7f6-d549-a225-716b9b9df664@cogentembedded.com>

On Sun, Jun 04, 2017 at 08:22:05PM +0300, Sergei Shtylyov wrote:
> Hello!
> 
> On 6/4/2017 8:08 PM, Yuval Shaia wrote:
> 
> > Make return value void since function never return meaningfull value
> 
>   You only make 1 of 2 functions void. It looks like there should be 2 patches.

And what would be the second function?

> 
> > 
> > Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
> > ---
> >  drivers/net/ethernet/dec/tulip/de2104x.c | 11 ++++-------
> >  1 file changed, 4 insertions(+), 7 deletions(-)
> > 
> > diff --git a/drivers/net/ethernet/dec/tulip/de2104x.c b/drivers/net/ethernet/dec/tulip/de2104x.c
> > index 91b8f6f..c87b8cc 100644
> > --- a/drivers/net/ethernet/dec/tulip/de2104x.c
> > +++ b/drivers/net/ethernet/dec/tulip/de2104x.c
> > @@ -1483,8 +1483,8 @@ static void __de_get_regs(struct de_private *de, u8 *buf)
> >  	de_rx_missed(de, rbuf[8]);
> >  }
> > 
> > -static int __de_get_link_ksettings(struct de_private *de,
> > -				   struct ethtool_link_ksettings *cmd)
> > +static void __de_get_link_ksettings(struct de_private *de,
> > +				    struct ethtool_link_ksettings *cmd)
> >  {
> >  	ethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.supported,
> >  						de->media_supported);
> > @@ -1517,8 +1517,6 @@ static int __de_get_link_ksettings(struct de_private *de,
> >  		cmd->base.autoneg = AUTONEG_ENABLE;
> > 
> >  	/* ignore maxtxpkt, maxrxpkt for now */
> > -
> > -	return 0;
> >  }
> > 
> >  static int __de_set_link_ksettings(struct de_private *de,
> > @@ -1615,13 +1613,12 @@ static int de_get_link_ksettings(struct net_device *dev,
> >  				 struct ethtool_link_ksettings *cmd)
> >  {
> >  	struct de_private *de = netdev_priv(dev);
> > -	int rc;
> > 
> >  	spin_lock_irq(&de->lock);
> > -	rc = __de_get_link_ksettings(de, cmd);
> > +	__de_get_link_ksettings(de, cmd);
> >  	spin_unlock_irq(&de->lock);
> > 
> > -	return rc;
> > +	return 0;
> >  }
> > 
> >  static int de_set_link_ksettings(struct net_device *dev,
> > 
> 
> MBR, Sergei
> 

^ permalink raw reply

* Re: [net-next] openvswitch: add macro MODULE_ALIAS_VPORT_TYPE for vport type alias
From: David Miller @ 2017-06-04 20:12 UTC (permalink / raw)
  To: pshelar; +Cc: zhangshengju, pshelar, netdev
In-Reply-To: <CAOrHB_CjkyEoWVJFT5Q+vPOvcg4rd9cY+z5gRi7JEQscG6-dNg@mail.gmail.com>

From: Pravin Shelar <pshelar@ovn.org>
Date: Sat, 3 Jun 2017 22:58:22 -0700

> On Sat, Jun 3, 2017 at 6:47 AM, Zhang Shengju
> <zhangshengju@cmss.chinamobile.com> wrote:
>> Add a new macro MODULE_ALIAS_VPORT_TYPE to unify and simplify the
>> declaration of vport type alias, and replace magic numbers with
>> symbolic constants.
>>
>> Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
>> ---
>>  net/openvswitch/vport-geneve.c | 2 +-
>>  net/openvswitch/vport-gre.c    | 2 +-
>>  net/openvswitch/vport-vxlan.c  | 2 +-
>>  net/openvswitch/vport.h        | 3 +++
>>  4 files changed, 6 insertions(+), 3 deletions(-)
>>
>> diff --git a/net/openvswitch/vport-geneve.c b/net/openvswitch/vport-geneve.c
>> index 5aaf3ba..1c068d6 100644
>> --- a/net/openvswitch/vport-geneve.c
>> +++ b/net/openvswitch/vport-geneve.c
>> @@ -141,4 +141,4 @@ static void __exit ovs_geneve_tnl_exit(void)
>>
>>  MODULE_DESCRIPTION("OVS: Geneve switching port");
>>  MODULE_LICENSE("GPL");
>> -MODULE_ALIAS("vport-type-5");
>> +MODULE_ALIAS_VPORT_TYPE(OVS_VPORT_TYPE_GENEVE);
>> diff --git a/net/openvswitch/vport-gre.c b/net/openvswitch/vport-gre.c
>> index 0e72d95..48a5852 100644
>> --- a/net/openvswitch/vport-gre.c
>> +++ b/net/openvswitch/vport-gre.c
>> @@ -113,4 +113,4 @@ static void __exit ovs_gre_tnl_exit(void)
>>
>>  MODULE_DESCRIPTION("OVS: GRE switching port");
>>  MODULE_LICENSE("GPL");
>> -MODULE_ALIAS("vport-type-3");
>> +MODULE_ALIAS_VPORT_TYPE(OVS_VPORT_TYPE_GRE);
> 
> This is user visible change. For example this is changing the gre
> module alias from "vport-type-3" to "vport-type-OVS_VPORT_TYPE_GRE".
> This could break userspace application.

Agreed, you really can't do this.

^ permalink raw reply

* Re: [PATCH net-next] genetlink: remove ops_list from genetlink header.
From: David Miller @ 2017-06-04 20:25 UTC (permalink / raw)
  To: rami.rosen; +Cc: sergei.shtylyov, netdev, johannes.berg
In-Reply-To: <9B0331B6EBBD0E4684FBFAEDA55776F93DA1EEFA@HASMSX110.ger.corp.intel.com>

From: "Rosen, Rami" <rami.rosen@intel.com>
Date: Sun, 4 Jun 2017 19:20:43 +0000

> Hi, Sergei,
> 
> Thanks! I will send V2 with 12 digits for the commit.

Please never top-post.

^ permalink raw reply

* RE: [PATCH net-next] liquidio: add support for OVS offload
From: Chickles, Derek @ 2017-06-04 20:43 UTC (permalink / raw)
  To: David Miller, Manlunas, Felix
  Cc: netdev@vger.kernel.org, Burru, Veerasenareddy, Vatsavayi, Raghu,
	Burla, Satananda
In-Reply-To: <20170527.200656.1963846123525565873.davem@davemloft.net>



> From: David Miller [mailto:davem@davemloft.net]
> Sent: Saturday, May 27, 2017 5:07 PM
> Subject: Re: [PATCH net-next] liquidio: add support for OVS offload
> 
> From: Felix Manlunas <felix.manlunas@cavium.com>
> Date: Sat, 27 May 2017 08:56:33 -0700
> 
> > From: VSR Burru <veerasenareddy.burru@cavium.com>
> >
> > Add support for OVS offload.  By default PF driver runs in basic NIC
> > mode as usual.  To run in OVS mode, use the insmod parameter
> "fw_type=ovs".
> >
> > For OVS mode, create a management interface for communication with NIC
> > firmware.  This communication channel uses PF0's I/O rings.
> >
> > Bump up driver version to 1.6.0 to match newer firmware.
> >
> > Signed-off-by: VSR Burru <veerasenareddy.burru@cavium.com>
> > Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com>
> 

Hi David,

We probably should have put in a cover letter before submitting this patch, but we'll try to explain how everything works here. We've also reassessed the mechanism for triggering the creating of the management interface, and will be submitting a revised patch shortly that triggers creation of this interface based on a message coming from the firmware at startup, instead of that module parameter check.

Anyway, this patch is really a foundational change for a series of new features that depend on having a private ethernet interface into the adapter. It will enable features like OVS, traffic monitoring, remote management of LiquidIO and other things that are planned for LiquidIO down the road.

> How does this work?
> 

LiquidIO can be thought of as a second computer within a NIC form factor. It has a processor complex, various I/Os, and may run a full blown operating system, like Linux. In such a configuration it is natural to have an ethernet interface from the host operating system so one could communicate with the Linux instance running on the card. Things like regular TCP sockets, SSH, etc are all possible. That's what this patch specifically enables. Again, we're not going to create this interface based on some module parameter, but rather the card will tell the host that it needs this interface when it starts.

Our initial versions of the LiquidIO host driver required LiquidIO firmware that provided basic NIC features, as seen by our previous submissions into the driver tree. Now, we're moving to running Linux on the LiquidIO adapter itself. 

So, in the OVS case, we simply replace the Ethernet Bridge in the "basic NIC" implementation with Linux running OVS. Since we have the management interface available to the host, this OVS implementation can communicate with an external controller residing on the host.

> What in userspace installs the OVS rules onto the card?
> 

There is no direct host involvement in the LiquidIO OVS configuration. The ovs-vswitchd runs on LiquidIO and can communicate with ovsdb-server running on the LiquidIO processor or on the host using the management interface supplied in this patch.

> We do not support direct offload of OVS, as an OVS entity, instead we
> required all vendors to make their OVS offloads visible as packet
> scheduler classifiers and actions.
> 
> The same rules apply to liquidio.
> 

We are running OVS as the switching infrastructure on the card instead of a VEB. If someone wants to run OVS in the host they can still do that. We do have plans to add the ndo interfaces for supporting classifiers and filters, so the host could have accelerated OVS when a LiquidIO card is installed. However, in the near term, we're focusing on enabling an ethernet interface to the Linux instance running on the card, so you can simply connect to ovs-switchd running on the card. This also enables a lot of flexibility in the types of applications that could be running on the adapter.

> If there is some special set of userspace interfaces that are used to
> comunicate with these different firmwares in some liquidio specific way, I
> am going to be very upset.  That is definitely not allowed.
> 

Our solution does not require any special user or kernel space components on the host. The OVS-based LiquidIO firmware can be configured just like OVS on the host by usual means such as a remote Openflow controller on the network.


> I'm not applying this patch until the above is resolved and at least more
> information is added to this commit log message to explain how this stuff
> works.

Thanks and regards,
Derek

^ permalink raw reply

* Re: [PATCH v2 4/4] net: macb: Add hardware PTP support
From: Richard Cochran @ 2017-06-04 20:55 UTC (permalink / raw)
  To: Rafal Ozieblo
  Cc: David Miller, nicolas.ferre-AIFe0yeh4nAAvxtiuMwx3w,
	netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	harini.katakam-gjFFaj9aHVfQT0dZR+AlfA,
	andrei.pistirica-UWL1GkI3JZL3oGB3hsPCZA
In-Reply-To: <1496413690-22826-1-git-send-email-rafalo-vna1KIf7WgpBDgjK7y7TUQ@public.gmane.org>

On Fri, Jun 02, 2017 at 03:28:10PM +0100, Rafal Ozieblo wrote:

> +int gem_get_hwtst(struct net_device *dev, struct ifreq *rq)
> +{
> +	struct macb *bp = netdev_priv(dev);
> +	struct hwtstamp_config *tstamp_config = &bp->tstamp_config;
> +
> +	if ((bp->hw_dma_cap & HW_DMA_CAP_PTP) == 0)
> +		return -EFAULT;

Segmentation fault?  Really?

...

> +int gem_set_hwtst(struct net_device *dev, struct ifreq *ifr, int cmd)
> +{
> +	struct macb *bp = netdev_priv(dev);
> +	struct hwtstamp_config *tstamp_config = &bp->tstamp_config;
> +	enum macb_bd_control tx_bd_control = TSTAMP_DISABLED;
> +	enum macb_bd_control rx_bd_control = TSTAMP_DISABLED;
> +	u32 regval;
> +
> +	if ((bp->hw_dma_cap & HW_DMA_CAP_PTP) == 0)
> +		return -EFAULT;

here again

Thanks,
Richard
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* [PATCH] net: sched: fix mips build failure
From: Sudip Mukherjee @ 2017-06-04 21:44 UTC (permalink / raw)
  To: Jamal Hadi Salim, Cong Wang, Jiri Pirko, David S. Miller,
	Ralf Baechle
  Cc: linux-kernel, netdev, linux-mips, Sudip Mukherjee

The build of mips ar7_defconfig was failing with the error:
../net/sched/act_api.c: In function 'tcf_action_goto_chain_init':
../net/sched/act_api.c:37:18: error:
	implicit declaration of function 'tcf_chain_get'
	[-Werror=implicit-function-declaration]

../net/sched/act_api.c: In function 'tcf_action_goto_chain_fini':
../net/sched/act_api.c:45:2: error:
	implicit declaration of function 'tcf_chain_put'
	[-Werror=implicit-function-declaration]

Add two inline helpers for the case where CONFIG_NET_CLS is not enabled.

Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
---

The build log of the latest linux-next is at:
https://travis-ci.org/sudipm-mukherjee/parport/jobs/238623031/

 include/net/pkt_cls.h | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h
index 537d0a0..c34ade5 100644
--- a/include/net/pkt_cls.h
+++ b/include/net/pkt_cls.h
@@ -29,6 +29,17 @@ int tcf_classify(struct sk_buff *skb, const struct tcf_proto *tp,
 
 #else
 static inline
+struct tcf_chain *tcf_chain_get(struct tcf_block *block,
+				u32 chain_index, bool create)
+{
+	return NULL;
+}
+
+static inline void tcf_chain_put(struct tcf_chain *chain)
+{
+}
+
+static inline
 int tcf_block_get(struct tcf_block **p_block,
 		  struct tcf_proto __rcu **p_filter_chain)
 {
-- 
2.7.4

^ permalink raw reply related

* Re: [PATCH net-next V2 0/4] add support for dissection and matching on ip tos and ttl
From: David Miller @ 2017-06-04 22:12 UTC (permalink / raw)
  To: ogerlitz; +Cc: netdev, saeedm, roid, paulb
In-Reply-To: <1496342260-28199-1-git-send-email-ogerlitz@mellanox.com>

From: Or Gerlitz <ogerlitz@mellanox.com>
Date: Thu,  1 Jun 2017 21:37:36 +0300

> The 1st two patches enable matching/classifying on ip tos and ttl by 
> the flow dissector and flower. The other two patches offload matching 
> on tcp flags and ip tos in mlx5. 
> 
> The mlx5 patches touch single file/function and not interfere with
> other inflight mlx5 submissions.

Series applied, thanks.

^ permalink raw reply

* BUG: KASAN: use-after-free in free_old_xmit_skbs
From: Jean-Philippe Menil @ 2017-06-04 22:48 UTC (permalink / raw)
  To: netdev; +Cc: mst, jasowang

Hi,

while playing with xdp and ebpf, i'm hitting the following:

[  309.993136] 
==================================================================
[  309.994735] BUG: KASAN: use-after-free in 
free_old_xmit_skbs.isra.29+0x2b7/0x2e0 [virtio_net]
[  309.998396] Read of size 8 at addr ffff88006aa64220 by task sshd/323
[  310.000650]
[  310.002305] CPU: 1 PID: 323 Comm: sshd Not tainted 4.12.0-rc3+ #2
[  310.004018] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), 
BIOS 1.10.2-20170228_101828-anatol 04/01/2014
[  310.006495] Call Trace:
[  310.007610]  dump_stack+0xb8/0x14c
[  310.008748]  ? _atomic_dec_and_lock+0x174/0x174
[  310.009998]  ? pm_qos_get_value.part.7+0x6/0x6
[  310.011203]  print_address_description+0x6f/0x280
[  310.012416]  kasan_report+0x27a/0x370
[  310.013573]  ? free_old_xmit_skbs.isra.29+0x2b7/0x2e0 [virtio_net]
[  310.014900]  __asan_report_load8_noabort+0x19/0x20
[  310.016136]  free_old_xmit_skbs.isra.29+0x2b7/0x2e0 [virtio_net]
[  310.017467]  ? virtnet_del_vqs+0xe0/0xe0 [virtio_net]
[  310.018759]  ? packet_rcv+0x20d0/0x20d0
[  310.019950]  ? dev_queue_xmit_nit+0x5cd/0xaf0
[  310.021168]  start_xmit+0x1b4/0x1b10 [virtio_net]
[  310.022413]  ? default_device_exit+0x2d0/0x2d0
[  310.023634]  ? virtnet_remove+0xf0/0xf0 [virtio_net]
[  310.024874]  ? update_load_avg+0x1281/0x29f0
[  310.026059]  dev_hard_start_xmit+0x1ea/0x7f0
[  310.027247]  ? validate_xmit_skb_list+0x100/0x100
[  310.028470]  ? validate_xmit_skb+0x7f/0xc10
[  310.029731]  ? netif_skb_features+0x920/0x920
[  310.033469]  ? __skb_tx_hash+0x2f0/0x2f0
[  310.035615]  ? validate_xmit_skb_list+0xa3/0x100
[  310.037782]  sch_direct_xmit+0x2eb/0x7a0
[  310.039842]  ? dev_deactivate_queue.constprop.29+0x230/0x230
[  310.041980]  ? netdev_pick_tx+0x212/0x2b0
[  310.043868]  __dev_queue_xmit+0x12fa/0x20b0
[  310.045564]  ? netdev_pick_tx+0x2b0/0x2b0
[  310.047210]  ? __account_cfs_rq_runtime+0x630/0x630
[  310.048301]  ? update_stack_state+0x402/0x780
[  310.049307]  ? account_entity_enqueue+0x730/0x730
[  310.050322]  ? __rb_erase_color+0x27d0/0x27d0
[  310.051286]  ? update_curr_fair+0x70/0x70
[  310.052206]  ? enqueue_entity+0x2450/0x2450
[  310.053124]  ? entry_SYSCALL64_slow_path+0x25/0x25
[  310.054082]  ? dequeue_entity+0x27a/0x1520
[  310.054967]  ? bpf_prog_alloc+0x320/0x320
[  310.055822]  ? yield_to_task_fair+0x110/0x110
[  310.056708]  ? set_next_entity+0x2f2/0xa90
[  310.057574]  ? dequeue_task_fair+0xc09/0x2ec0
[  310.058457]  dev_queue_xmit+0x10/0x20
[  310.059298]  ip_finish_output2+0xacf/0x12a0
[  310.060160]  ? dequeue_entity+0x1520/0x1520
[  310.063410]  ? ip_fragment.constprop.47+0x220/0x220
[  310.065078]  ? ring_buffer_set_clock+0x50/0x50
[  310.066677]  ? __switch_to+0x685/0xda0
[  310.068166]  ? load_balance+0x38f0/0x38f0
[  310.069544]  ? compat_start_thread+0x80/0x80
[  310.070989]  ? trace_find_cmdline+0x60/0x60
[  310.072402]  ? rt_cpu_seq_show+0x2d0/0x2d0
[  310.073579]  ip_finish_output+0x407/0x880
[  310.074441]  ? ip_finish_output+0x407/0x880
[  310.075255]  ? update_stack_state+0x402/0x780
[  310.076076]  ip_output+0x1c0/0x640
[  310.076843]  ? ip_mc_output+0x1350/0x1350
[  310.077642]  ? __sk_dst_check+0x164/0x370
[  310.078441]  ? complete_formation.isra.53+0xa30/0xa30
[  310.079313]  ? __read_once_size_nocheck.constprop.7+0x20/0x20
[  310.080265]  ? sock_prot_inuse_add+0xa0/0xa0
[  310.081097]  ? memcpy+0x45/0x50
[  310.081850]  ? __copy_skb_header+0x1fa/0x280
[  310.082676]  ip_local_out+0x70/0x90
[  310.083448]  ip_queue_xmit+0x8a1/0x22a0
[  310.084236]  ? ip_build_and_send_pkt+0xe80/0xe80
[  310.085079]  ? tcp_v4_md5_lookup+0x13/0x20
[  310.085884]  tcp_transmit_skb+0x187a/0x3e00
[  310.086696]  ? __tcp_select_window+0xaf0/0xaf0
[  310.087524]  ? sock_sendmsg+0xba/0xf0
[  310.088298]  ? __vfs_write+0x4e0/0x960
[  310.089074]  ? vfs_write+0x155/0x4b0
[  310.089838]  ? SyS_write+0xf7/0x240
[  310.090593]  ? do_syscall_64+0x235/0x5b0
[  310.091372]  ? entry_SYSCALL64_slow_path+0x25/0x25
[  310.094690]  ? sock_sendmsg+0xba/0xf0
[  310.096133]  ? do_syscall_64+0x235/0x5b0
[  310.097593]  ? entry_SYSCALL64_slow_path+0x25/0x25
[  310.099157]  ? tcp_init_tso_segs+0x1e0/0x1e0
[  310.100539]  ? radix_tree_lookup+0xd/0x10
[  310.101894]  ? get_work_pool+0xcd/0x150
[  310.103216]  ? check_flush_dependency+0x330/0x330
[  310.104113]  tcp_write_xmit+0x498/0x52a0
[  310.104905]  ? kasan_unpoison_shadow+0x35/0x50
[  310.105729]  ? kasan_kmalloc+0xad/0xe0
[  310.106505]  ? tcp_transmit_skb+0x3e00/0x3e00
[  310.107331]  ? memset+0x31/0x40
[  310.108070]  ? __check_object_size+0x22e/0x55c
[  310.108895]  ? skb_pull_rcsum+0x2b0/0x2b0
[  310.109690]  ? check_stack_object+0x120/0x120
[  310.110512]  ? tcp_v4_md5_lookup+0x13/0x20
[  310.111315]  __tcp_push_pending_frames+0x8d/0x2a0
[  310.112159]  tcp_push+0x47c/0xbd0
[  310.112912]  ? copy_from_iter_full+0x21e/0xc70
[  310.113747]  ? sock_warn_obsolete_bsdism+0x70/0x70
[  310.114604]  ? tcp_splice_data_recv+0x1c0/0x1c0
[  310.115436]  ? iov_iter_copy_from_user_atomic+0xeb0/0xeb0
[  310.116324]  tcp_sendmsg+0xd6d/0x43f0
[  310.117106]  ? tcp_sendpage+0x2170/0x2170
[  310.117911]  ? set_fd_set.part.1+0x50/0x50
[  310.118718]  ? remove_wait_queue+0x196/0x3b0
[  310.119535]  ? set_fd_set.part.1+0x50/0x50
[  310.120365]  ? add_wait_queue_exclusive+0x290/0x290
[  310.121224]  ? __wake_up+0x44/0x50
[  310.121985]  ? n_tty_read+0x9f9/0x19d0
[  310.122898]  ? __check_object_size+0x22e/0x55c
[  310.125380]  inet_sendmsg+0x111/0x590
[  310.126863]  ? inet_recvmsg+0x5e0/0x5e0
[  310.128348]  ? inet_recvmsg+0x5e0/0x5e0
[  310.129817]  sock_sendmsg+0xba/0xf0
[  310.131110]  sock_write_iter+0x2e4/0x6a0
[  310.132433]  ? core_sys_select+0x47d/0x780
[  310.133779]  ? sock_sendmsg+0xf0/0xf0
[  310.134591]  __vfs_write+0x4e0/0x960
[  310.135351]  ? kvm_clock_get_cycles+0x1e/0x20
[  310.136160]  ? __vfs_read+0x950/0x950
[  310.136931]  ? rw_verify_area+0xbd/0x2b0
[  310.137711]  vfs_write+0x155/0x4b0
[  310.138454]  SyS_write+0xf7/0x240
[  310.139183]  ? SyS_read+0x240/0x240
[  310.139922]  ? SyS_read+0x240/0x240
[  310.140649]  do_syscall_64+0x235/0x5b0
[  310.141390]  ? trace_raw_output_sys_exit+0xf0/0xf0
[  310.142204]  ? syscall_return_slowpath+0x240/0x240
[  310.143018]  ? trace_do_page_fault+0xc4/0x3a0
[  310.143810]  ? prepare_exit_to_usermode+0x124/0x160
[  310.144634]  ? perf_trace_sys_enter+0x1080/0x1080
[  310.145447]  entry_SYSCALL64_slow_path+0x25/0x25
[  310.146257] RIP: 0033:0x7f6f868fb070
[  310.146999] RSP: 002b:00007fffed379578 EFLAGS: 00000246 ORIG_RAX: 
0000000000000001
[  310.148507] RAX: ffffffffffffffda RBX: 00000000000002e4 RCX: 
00007f6f868fb070
[  310.149521] RDX: 00000000000002e4 RSI: 000055603b5cfc10 RDI: 
0000000000000003
[  310.150532] RBP: 000055603b5aca60 R08: 0000000000000000 R09: 
0000000000003000
[  310.151530] R10: 0000000000000008 R11: 0000000000000246 R12: 
0000000000000000
[  310.152537] R13: 00007fffed37960f R14: 000055603a832e31 R15: 
0000000000000003
[  310.153578]
[  310.156362] Allocated by task 483:
[  310.157812]  save_stack_trace+0x1b/0x20
[  310.159274]  save_stack+0x43/0xd0
[  310.160663]  kasan_kmalloc+0xad/0xe0
[  310.161943]  __kmalloc+0x105/0x230
[  310.163233]  __vring_new_virtqueue+0xd1/0xee0
[  310.164623]  vring_create_virtqueue+0x2e3/0x5e0
[  310.165536]  setup_vq+0x136/0x620
[  310.166286]  vp_setup_vq+0x13d/0x6d0
[  310.167059]  vp_find_vqs_msix+0x46c/0xb50
[  310.167855]  vp_find_vqs+0x71/0x410
[  310.168641]  vp_modern_find_vqs+0x21/0x140
[  310.169453]  init_vqs+0x957/0x1390 [virtio_net]
[  310.170306]  virtnet_restore_up+0x4a/0x590 [virtio_net]
[  310.171214]  virtnet_xdp+0x89f/0xdf0 [virtio_net]
[  310.172077]  dev_change_xdp_fd+0x1ca/0x420
[  310.172918]  do_setlink+0x2c33/0x3bc0
[  310.173703]  rtnl_setlink+0x245/0x380
[  310.174511]  rtnetlink_rcv_msg+0x530/0x9b0
[  310.175344]  netlink_rcv_skb+0x213/0x450
[  310.176166]  rtnetlink_rcv+0x28/0x30
[  310.176990]  netlink_unicast+0x4a0/0x6c0
[  310.177807]  netlink_sendmsg+0x9ec/0xe50
[  310.178646]  sock_sendmsg+0xba/0xf0
[  310.179435]  SYSC_sendto+0x31d/0x620
[  310.180229]  SyS_sendto+0xe/0x10
[  310.181004]  do_syscall_64+0x235/0x5b0
[  310.181783]  return_from_SYSCALL_64+0x0/0x6a
[  310.182595]
[  310.183217] Freed by task 483:
[  310.183934]  save_stack_trace+0x1b/0x20
[  310.184801]  save_stack+0x43/0xd0
[  310.187187]  kasan_slab_free+0x72/0xc0
[  310.188530]  kfree+0x94/0x1a0
[  310.189797]  vring_del_virtqueue+0x19a/0x430
[  310.191221]  del_vq+0x11c/0x250
[  310.192474]  vp_del_vqs+0x379/0xc30
[  310.193772]  virtnet_del_vqs+0xad/0xe0 [virtio_net]
[  310.195064]  virtnet_xdp+0x836/0xdf0 [virtio_net]
[  310.196231]  dev_change_xdp_fd+0x37c/0x420
[  310.197072]  do_setlink+0x2c33/0x3bc0
[  310.197804]  rtnl_setlink+0x245/0x380
[  310.198530]  rtnetlink_rcv_msg+0x530/0x9b0
[  310.199283]  netlink_rcv_skb+0x213/0x450
[  310.200036]  rtnetlink_rcv+0x28/0x30
[  310.200754]  netlink_unicast+0x4a0/0x6c0
[  310.201496]  netlink_sendmsg+0x9ec/0xe50
[  310.202236]  sock_sendmsg+0xba/0xf0
[  310.202947]  SYSC_sendto+0x31d/0x620
[  310.203660]  SyS_sendto+0xe/0x10
[  310.204340]  do_syscall_64+0x235/0x5b0
[  310.205050]  return_from_SYSCALL_64+0x0/0x6a
[  310.205792]
[  310.206350] The buggy address belongs to the object at ffff88006aa64200
[  310.206350]  which belongs to the cache kmalloc-8192 of size 8192
[  310.208149] The buggy address is located 32 bytes inside of
[  310.208149]  8192-byte region [ffff88006aa64200, ffff88006aa66200)
[  310.209929] The buggy address belongs to the page:
[  310.210763] page:ffffea0001aa9800 count:1 mapcount:0 mapping: 
  (null) index:0x0 compound_mapcount: 0
[  310.212499] flags: 0x1ffff8000008100(slab|head)
[  310.213373] raw: 01ffff8000008100 0000000000000000 0000000000000000 
0000000100030003
[  310.214481] raw: dead000000000100 dead000000000200 ffff88006cc02700 
0000000000000000
[  310.215635] page dumped because: kasan: bad access detected
[  310.218989]
[  310.220398] Memory state around the buggy address:
[  310.222141]  ffff88006aa64100: fc fc fc fc fc fc fc fc fc fc fc fc fc 
fc fc fc
[  310.223996]  ffff88006aa64180: fc fc fc fc fc fc fc fc fc fc fc fc fc 
fc fc fc
[  310.225469] >ffff88006aa64200: fb fb fb fb fb fb fb fb fb fb fb fb fb 
fb fb fb
[  310.227400]                                ^
[  310.228367]  ffff88006aa64280: fb fb fb fb fb fb fb fb fb fb fb fb fb 
fb fb fb
[  310.229510]  ffff88006aa64300: fb fb fb fb fb fb fb fb fb fb fb fb fb 
fb fb fb
[  310.230639] 
==================================================================
[  310.231788] Disabling lock debugging due to kernel taint
[  310.233499] kasan: CONFIG_KASAN_INLINE enabled
[  310.236846] kasan: GPF could be caused by NULL-ptr deref or user 
memory access
[  310.239138] general protection fault: 0000 [#1] SMP KASAN
[  310.240926] Modules linked in: joydev kvm_intel kvm psmouse irqbypass 
i2c_piix4 qemu_fw_cfg ip_tables x_tables autofs4 serio_raw 
virtio_balloon pata_acpi virtio_net virtio_blk
[  310.243618] CPU: 0 PID: 352 Comm: sshd Tainted: G    B 
4.12.0-rc3+ #2
[  310.245780] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), 
BIOS 1.10.2-20170228_101828-anatol 04/01/2014
[  310.249799] task: ffff880066ca8d80 task.stack: ffff880069e40000
[  310.251090] RIP: 0010:free_old_xmit_skbs.isra.29+0x9d/0x2e0 [virtio_net]
[  310.252403] RSP: 0018:ffff880069e46540 EFLAGS: 00010202
[  310.253631] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 
0000000000000004
[  310.255916] RDX: dffffc0000000000 RSI: 0000000000000008 RDI: 
0000000000000020
[  310.258017] RBP: ffff880069e465e8 R08: ffff880069e45f10 R09: 
ffff880066b3c400
[  310.259430] R10: ffff880069e45e98 R11: 1ffff1000cd952f3 R12: 
ffff880066b3c400
[  310.260797] R13: ffff880066b3c400 R14: ffff88006afc9156 R15: 
ffff88006afc9001
[  310.262139] FS:  00007f3020f26680(0000) GS:ffff88006d000000(0000) 
knlGS:0000000000000000
[  310.263564] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  310.264825] CR2: 00007efed4534010 CR3: 000000006986d000 CR4: 
00000000000006f0
[  310.266178] Call Trace:
[  310.267231]  ? virtnet_del_vqs+0xe0/0xe0 [virtio_net]
[  310.268453]  ? packet_rcv+0x20d0/0x20d0
[  310.269559]  start_xmit+0x1b4/0x1b10 [virtio_net]
[  310.270762]  ? default_device_exit+0x2d0/0x2d0
[  310.271910]  ? virtnet_remove+0xf0/0xf0 [virtio_net]
[  310.273076]  ? update_load_avg+0x1281/0x29f0
[  310.274189]  dev_hard_start_xmit+0x1ea/0x7f0
[  310.275295]  ? validate_xmit_skb_list+0x100/0x100
[  310.276425]  ? validate_xmit_skb+0x7f/0xc10
[  310.277548]  ? rb_insert_color+0x1590/0x1590
[  310.280172]  ? netif_skb_features+0x920/0x920
[  310.281275]  ? __skb_tx_hash+0x2f0/0x2f0
[  310.282362]  ? validate_xmit_skb_list+0xa3/0x100
[  310.283494]  sch_direct_xmit+0x2eb/0x7a0
[  310.284559]  ? dev_deactivate_queue.constprop.29+0x230/0x230
[  310.286448]  ? netdev_pick_tx+0x212/0x2b0
[  310.288251]  ? __account_cfs_rq_runtime+0x630/0x630
[  310.289707]  __dev_queue_xmit+0x12fa/0x20b0
[  310.290788]  ? netdev_pick_tx+0x2b0/0x2b0
[  310.291837]  ? update_curr+0x1ef/0x750
[  310.292826]  ? update_stack_state+0x402/0x780
[  310.293827]  ? account_entity_enqueue+0x730/0x730
[  310.294831]  ? update_stack_state+0x402/0x780
[  310.295818]  ? update_curr_fair+0x70/0x70
[  310.296737]  ? entry_SYSCALL64_slow_path+0x25/0x25
[  310.297693]  ? dequeue_entity+0x27a/0x1520
[  310.298591]  ? bpf_prog_alloc+0x320/0x320
[  310.299484]  ? yield_to_task_fair+0x110/0x110
[  310.300385]  ? unwind_dump+0x4e0/0x4e0
[  310.301246]  ? __free_insn_slot+0x600/0x600
[  310.302125]  ? unwind_dump+0x4e0/0x4e0
[  310.302975]  ? dequeue_task_fair+0xc09/0x2ec0
[  310.303883]  dev_queue_xmit+0x10/0x20
[  310.304711]  ip_finish_output2+0xacf/0x12a0
[  310.305558]  ? dequeue_entity+0x1520/0x1520
[  310.306393]  ? ip_fragment.constprop.47+0x220/0x220
[  310.307320]  ? save_stack_trace+0x1b/0x20
[  310.308133]  ? save_stack+0x43/0xd0
[  310.309081]  ? kasan_slab_free+0x72/0xc0
[  310.310614]  ? kfree_skbmem+0xb6/0x1d0
[  310.311406]  ? tcp_ack+0x2730/0x7450
[  310.312167]  ? tcp_rcv_established+0xdbb/0x2db0
[  310.312987]  ? tcp_v4_do_rcv+0x2bb/0x7a0
[  310.313769]  ? __release_sock+0x14a/0x2b0
[  310.314550]  ? release_sock+0xa8/0x270
[  310.315330]  ? inet_sendmsg+0x111/0x590
[  310.316100]  ? sock_sendmsg+0xba/0xf0
[  310.317403]  ? sock_write_iter+0x2e4/0x6a0
[  310.318759]  ? __rb_erase_color+0x27d0/0x27d0
[  310.319949]  ? rt_cpu_seq_show+0x2d0/0x2d0
[  310.320800]  ? update_stack_state+0x402/0x780
[  310.321590]  ip_finish_output+0x407/0x880
[  310.322347]  ? ip_finish_output+0x407/0x880
[  310.323138]  ? update_stack_state+0x402/0x780
[  310.323948]  ip_output+0x1c0/0x640
[  310.324661]  ? ip_mc_output+0x1350/0x1350
[  310.325415]  ? __sk_dst_check+0x164/0x370
[  310.326169]  ? complete_formation.isra.53+0xa30/0xa30
[  310.327013]  ? __read_once_size_nocheck.constprop.7+0x20/0x20
[  310.327896]  ? sock_prot_inuse_add+0xa0/0xa0
[  310.328684]  ? memcpy+0x45/0x50
[  310.329393]  ? __copy_skb_header+0x1fa/0x280
[  310.330180]  ip_local_out+0x70/0x90
[  310.330914]  ip_queue_xmit+0x8a1/0x22a0
[  310.331676]  ? ip_build_and_send_pkt+0xe80/0xe80
[  310.332517]  ? tcp_v4_md5_lookup+0x13/0x20
[  310.333298]  tcp_transmit_skb+0x187a/0x3e00
[  310.334085]  ? __tcp_select_window+0xaf0/0xaf0
[  310.334887]  ? sock_sendmsg+0xba/0xf0
[  310.335637]  ? __vfs_write+0x4e0/0x960
[  310.336391]  ? vfs_write+0x155/0x4b0
[  310.337135]  ? SyS_write+0xf7/0x240
[  310.337861]  ? do_syscall_64+0x235/0x5b0
[  310.338612]  ? entry_SYSCALL64_slow_path+0x25/0x25
[  310.339443]  ? sock_sendmsg+0xba/0xf0
[  310.341675]  ? do_syscall_64+0x235/0x5b0
[  310.342441]  ? entry_SYSCALL64_slow_path+0x25/0x25
[  310.343298]  ? tcp_init_tso_segs+0x1e0/0x1e0
[  310.344095]  ? radix_tree_lookup+0xd/0x10
[  310.344871]  ? get_work_pool+0xcd/0x150
[  310.345635]  ? check_flush_dependency+0x330/0x330
[  310.346466]  tcp_write_xmit+0x498/0x52a0
[  310.347826]  ? kasan_unpoison_shadow+0x35/0x50
[  310.349243]  ? kasan_kmalloc+0xad/0xe0
[  310.350156]  ? tcp_transmit_skb+0x3e00/0x3e00
[  310.351261]  ? memset+0x31/0x40
[  310.352054]  ? __check_object_size+0x22e/0x55c
[  310.352881]  ? skb_pull_rcsum+0x2b0/0x2b0
[  310.353686]  ? check_stack_object+0x120/0x120
[  310.354506]  ? tcp_v4_md5_lookup+0x13/0x20
[  310.355327]  __tcp_push_pending_frames+0x8d/0x2a0
[  310.356174]  ? tcp_cwnd_restart+0x169/0x440
[  310.357016]  tcp_push+0x47c/0xbd0
[  310.357777]  ? copy_from_iter_full+0x21e/0xc70
[  310.358618]  ? tcp_splice_data_recv+0x1c0/0x1c0
[  310.359463]  ? iov_iter_copy_from_user_atomic+0xeb0/0xeb0
[  310.360355]  ? tcp_send_mss+0x24/0x2b0
[  310.361135]  tcp_sendmsg+0xd6d/0x43f0
[  310.361908]  ? select_estimate_accuracy+0x440/0x440
[  310.362765]  ? tcp_sendpage+0x2170/0x2170
[  310.363583]  ? set_fd_set.part.1+0x50/0x50
[  310.364392]  ? remove_wait_queue+0x196/0x3b0
[  310.365205]  ? set_fd_set.part.1+0x50/0x50
[  310.366005]  ? add_wait_queue_exclusive+0x290/0x290
[  310.366865]  ? __wake_up+0x44/0x50
[  310.367637]  ? n_tty_read+0x9f9/0x19d0
[  310.368424]  ? update_blocked_averages+0x9a0/0x9a0
[  310.369283]  ? __check_object_size+0x22e/0x55c
[  310.370129]  inet_sendmsg+0x111/0x590
[  310.371104]  ? inet_recvmsg+0x5e0/0x5e0
[  310.372571]  ? inet_recvmsg+0x5e0/0x5e0
[  310.373449]  sock_sendmsg+0xba/0xf0
[  310.374217]  sock_write_iter+0x2e4/0x6a0
[  310.375005]  ? core_sys_select+0x47d/0x780
[  310.375822]  ? sock_sendmsg+0xf0/0xf0
[  310.376607]  __vfs_write+0x4e0/0x960
[  310.377463]  ? kvm_clock_get_cycles+0x1e/0x20
[  310.378864]  ? __vfs_read+0x950/0x950
[  310.380178]  ? rw_verify_area+0xbd/0x2b0
[  310.381092]  vfs_write+0x155/0x4b0
[  310.381877]  SyS_write+0xf7/0x240
[  310.382616]  ? SyS_read+0x240/0x240
[  310.383404]  ? SyS_read+0x240/0x240
[  310.384159]  do_syscall_64+0x235/0x5b0
[  310.384930]  ? trace_raw_output_sys_exit+0xf0/0xf0
[  310.385747]  ? syscall_return_slowpath+0x240/0x240
[  310.386564]  ? trace_do_page_fault+0xc4/0x3a0
[  310.387424]  ? prepare_exit_to_usermode+0x124/0x160
[  310.388524]  ? perf_trace_sys_enter+0x1080/0x1080
[  310.389347]  entry_SYSCALL64_slow_path+0x25/0x25
[  310.390164] RIP: 0033:0x7f301f83c070
[  310.390906] RSP: 002b:00007ffff738fc78 EFLAGS: 00000246 ORIG_RAX: 
0000000000000001
[  310.391943] RAX: ffffffffffffffda RBX: 0000000000000564 RCX: 
00007f301f83c070
[  310.392938] RDX: 0000000000000564 RSI: 000055cf87fb0748 RDI: 
0000000000000003
[  310.393947] RBP: 000055cf87f8f090 R08: 0000000000000000 R09: 
0000000000003000
[  310.394948] R10: 0000000000000008 R11: 0000000000000246 R12: 
0000000000000000
[  310.395967] R13: 00007ffff738fd0f R14: 000055cf873dde31 R15: 
0000000000000003
[  310.396969] Code: 00 00 48 89 5d d0 31 db 80 3c 02 00 0f 85 05 02 00 
00 49 8b 45 00 48 ba 00 00 00 00 00 fc ff df 48 8d 78 20 48 89 f9 48 c1 
e9 03 <80> 3c 11 00 0f 85 04 02 00 00 48 8b 58 20 48 ba 00 00 00 00 00
[  310.399937] RIP: free_old_xmit_skbs.isra.29+0x9d/0x2e0 [virtio_net] 
RSP: ffff880069e46540
[  310.401120] ---[ end trace 89c5b0ea3f07debe ]---
[  310.403923] Kernel panic - not syncing: Fatal exception in interrupt
[  310.405942] Kernel Offset: 0x33200000 from 0xffffffff81000000 
(relocation range: 0xffffffff80000000-0xffffffffbfffffff)
[  310.408133] ---[ end Kernel panic - not syncing: Fatal exception in 
interrupt


(gdb) l *(free_old_xmit_skbs+0x2b7)
0x22f7 is in free_old_xmit_skbs (drivers/net/virtio_net.c:1051).
1046
1047	static void free_old_xmit_skbs(struct send_queue *sq)
1048	{
1049		struct sk_buff *skb;
1050		unsigned int len;
1051		struct virtnet_info *vi = sq->vq->vdev->priv;
1052		struct virtnet_stats *stats = this_cpu_ptr(vi->stats);
1053		unsigned int packets = 0;
1054		unsigned int bytes = 0;
1055

Let me know if i need to provide more informations.

Best regards.

Jean-Philippe

^ permalink raw reply

* Re: [PATCH net-next] mdio: mux: make child bus walking more permissive and errors more verbose
From: David Miller @ 2017-06-04 23:30 UTC (permalink / raw)
  To: jon.mason
  Cc: andrew, f.fainelli, netdev, linux-kernel,
	bcm-kernel-feedback-list
In-Reply-To: <1496259890-3719-1-git-send-email-jon.mason@broadcom.com>

From: Jon Mason <jon.mason@broadcom.com>
Date: Wed, 31 May 2017 15:44:50 -0400

> If any errors are encountered while walking the device tree structure of
> the MDIO bus for children, the code may silently continue, silently
> exit, or throw an error and exit.  This make it difficult for device
> tree writers to know there is an error.  Also, it makes any error in a
> child entry of the MDIO bus be fatal for all entries.  Instead, we
> should provide verbose errors describing the error and then attempt to
> continue if it all possible.  Also, use of_mdio_parse_addr()
> 
> Signed-off-by: Jon Mason <jon.mason@broadcom.com>

Looks good.  Every conversion from break to continue properly gets rid
of the child_bus_node release, and this new behavior matches what was
discussed a few weeks ago.

Applied, thanks.

^ permalink raw reply

* Re: [for 4.12] net: qcom/emac: do not use hardware mdio automatic polling
From: David Miller @ 2017-06-04 23:34 UTC (permalink / raw)
  To: timur
  Cc: linux-arm-kernel, f.fainelli, manoj.iyer, netdev, stable,
	zefir.kurtisi, andrew, matthias.may
In-Reply-To: <1496351293-6846-1-git-send-email-timur@codeaurora.org>

From: Timur Tabi <timur@codeaurora.org>
Date: Thu,  1 Jun 2017 16:08:13 -0500

> Use software polling (PHY_POLL) to check for link state changes instead
> of relying on the EMAC's hardware polling feature.  Some PHY drivers
> are unable to get a functioning link because the HW polling is not
> robust enough.
> 
> The EMAC is able to poll the PHY on the MDIO bus looking for link state
> changes (via the Link Status bit in the Status Register at address 0x1).
> When the link state changes, the EMAC triggers an interrupt and tells the
> driver what the new state is.  The feature eliminates the need for
> software to poll the MDIO bus.
> 
> Unfortunately, this feature is incompatible with phylib, because it
> ignores everything that the PHY core and PHY drivers are trying to do.
> In particular:
> 
> 1. It assumes a compatible register set, so PHYs with different registers
>    may not work.
> 
> 2. It doesn't allow for hardware errata that have work-arounds implemented
>    in the PHY driver.
> 
> 3. It doesn't support multiple register pages. If the PHY core switches
>    the register set to another page, the EMAC won't know the page has
>    changed and will still attempt to read the same PHY register.
> 
> 4. It only checks the copper side of the link, not the SGMII side.  Some
>    PHY drivers (e.g. at803x) may also check the SGMII side, and
>    report the link as not ready during autonegotiation if the SGMII link
>    is still down.  Phylib then waits for another interrupt to query
>    the PHY again, but the EMAC won't send another interrupt because it
>    thinks the link is up.
> 
> Cc: stable@vger.kernel.org # 4.11.x
> Tested-by: Manoj Iyer <manoj.iyer@canonical.com>
> Signed-off-by: Timur Tabi <timur@codeaurora.org>

Applied, thanks.

^ permalink raw reply

* Re: [PATCH net] ip6_tunnel: fix traffic class routing for tunnels
From: David Miller @ 2017-06-04 23:50 UTC (permalink / raw)
  To: mcbirnie.l; +Cc: kuznet, jmorris, yoshfuji, kaber, netdev, peter.a.dawson
In-Reply-To: <91e31c60-5994-6784-cfe8-6a18016c6524@gmail.com>

From: Liam McBirnie <mcbirnie.l@gmail.com>
Date: Fri, 2 Jun 2017 15:12:26 +1000

> From: Liam McBirnie <mcbirnie.l@gmail.com>
> Date: Thu, 1 Jun 2017 15:36:01 +1000
> Subject: [PATCH net] ip6_tunnel: fix traffic class routing for tunnels
> 
> ip6_route_output() requires that the flowlabel contains the traffic
> class for policy routing.
> 
> Commit 0e9a709560db ("ip6_tunnel, ip6_gre: fix setting of DSCP on
> encapsulated packets") removed the code which previously added the
> traffic class to the flowlabel.
> 
> The traffic class is added here because only route lookup needs the
> flowlabel to contain the traffic class.
> 
> Fixes: 0e9a709560db ("ip6_tunnel, ip6_gre: fix setting of DSCP on encapsulated packets")
> Signed-off-by: Liam McBirnie <liam.mcbirnie@boeing.com>

Applied and queued up for -stable, thanks.

^ permalink raw reply

* Re: [PATCH] net-procfs: Use vsnprintf extension %phN
From: David Miller @ 2017-06-04 23:53 UTC (permalink / raw)
  To: joe; +Cc: linux-kernel, netdev
In-Reply-To: <41a53a84b6332651a9c562a4f834ba964c1810e9.1496396274.git.joe@perches.com>

From: Joe Perches <joe@perches.com>
Date: Fri,  2 Jun 2017 02:40:44 -0700

> Save a bit of code by using the kernel extension.
> 
> $ size net/core/net-procfs.o*
>    text	   data	    bss	    dec	    hex	filename
>    3701	    120	      0	   3821	    eed	net/core/net-procfs.o.new
>    3764	    120	      0	   3884	    f2c	net/core/net-procfs.o.old
> 
> Signed-off-by: Joe Perches <joe@perches.com>

Applied, thanks Joe.

^ permalink raw reply

* Re: [PATCH] netxen: remove writeq/readq function definitions
From: David Miller @ 2017-06-04 23:54 UTC (permalink / raw)
  To: clabbe.montjoie
  Cc: manish.chopra, rahul.verma, Dept-GELinuxNICDev, netdev,
	linux-kernel
In-Reply-To: <20170602113627.28642-1-clabbe.montjoie@gmail.com>

From: Corentin Labbe <clabbe.montjoie@gmail.com>
Date: Fri,  2 Jun 2017 13:36:27 +0200

> Instead of rewriting write/readq, use linux/io-64-nonatomic-lo-hi.h which
> already have them.
> 
> Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>

Applied to net-next.

^ permalink raw reply

* Re: [PATCH][V2] net: phy: marvell: make some functions static
From: David Miller @ 2017-06-04 23:55 UTC (permalink / raw)
  To: colin.king; +Cc: andrew, f.fainelli, netdev, kernel-janitors, linux-kernel
In-Reply-To: <20170602141334.26506-1-colin.king@canonical.com>

From: Colin King <colin.king@canonical.com>
Date: Fri,  2 Jun 2017 15:13:34 +0100

> From: Colin Ian King <colin.king@canonical.com>
> 
> functions m88e1510_get_temp_critical, m88e1510_set_temp_critical and
> m88e1510_get_temp_alarm can be made static as they not need to be
> in global scope.
> 
> Cleans up sparse warnings:
>  "symbol 'm88e1510_get_temp_alarm' was not declared. Should it be static?"
>  "symbol 'm88e1510_get_temp_critical' was not declared. Should it be
>   static?"
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Applied to net-next, thanks.

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox