Patchwork [net-next-2.6,07/12] igbvf: remove bogus phys_id

login
register
mail settings
Submitter stephen hemminger
Date April 4, 2011, 6:43 p.m.
Message ID <20110404184501.915865252@linuxplumber.net>
Download mbox | patch
Permalink /patch/89688/
State Awaiting Upstream
Delegated to: David Miller
Headers show

Comments

stephen hemminger - April 4, 2011, 6:43 p.m.
This device lies about supporting phys_id. Remove it and just
let the upper layer report not supported.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Rose, Gregory V - April 4, 2011, 9:27 p.m.
> -----Original Message-----
> From: netdev-owner@vger.kernel.org [mailto:netdev-owner@vger.kernel.org]
> On Behalf Of Stephen Hemminger
> Sent: Monday, April 04, 2011 11:44 AM
> To: David S. Miller; Ben Hutchings; Kirsher, Jeffrey T; Brandeburg, Jesse;
> Allan, Bruce W; Wyborny, Carolyn; Skidmore, Donald C; Ronciak, John
> Cc: netdev@vger.kernel.org
> Subject: [PATCH net-next-2.6 07/12] igbvf: remove bogus phys_id
> 
> This device lies about supporting phys_id. Remove it and just
> let the upper layer report not supported.
> 
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
> 
> --- a/drivers/net/igbvf/ethtool.c	2011-04-04 11:15:50.477019338 -0700
> +++ b/drivers/net/igbvf/ethtool.c	2011-04-04 11:16:12.661202774 -0700
> @@ -391,11 +391,6 @@ static int igbvf_set_wol(struct net_devi
>  	return -EOPNOTSUPP;
>  }
> 
> -static int igbvf_phys_id(struct net_device *netdev, u32 data)
> -{
> -	return 0;
> -}
> -
>  static int igbvf_get_coalesce(struct net_device *netdev,
>                                struct ethtool_coalesce *ec)
>  {
> @@ -527,7 +522,6 @@ static const struct ethtool_ops igbvf_et
>  	.self_test		= igbvf_diag_test,
>  	.get_sset_count		= igbvf_get_sset_count,
>  	.get_strings		= igbvf_get_strings,
> -	.phys_id		= igbvf_phys_id,
>  	.get_ethtool_stats	= igbvf_get_ethtool_stats,
>  	.get_coalesce		= igbvf_get_coalesce,
>  	.set_coalesce		= igbvf_set_coalesce,

I would just like to note that many virtual devices lie about their underlying capabilities.  Many systems report having an Realtek adapter when in fact they don't.  I'm agnostic about this change but at one time I had an internal bug report because my VF driver *didn't* report phys_id.  I'll keep this email around if my tester writes up a big for me.

Regards,

- Greg

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - April 6, 2011, 9:31 p.m.
From: Stephen Hemminger <shemminger@vyatta.com>
Date: Mon, 04 Apr 2011 11:43:47 -0700

> This device lies about supporting phys_id. Remove it and just
> let the upper layer report not supported.
> 
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

Deferred to Intel driver maintainers.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

--- a/drivers/net/igbvf/ethtool.c	2011-04-04 11:15:50.477019338 -0700
+++ b/drivers/net/igbvf/ethtool.c	2011-04-04 11:16:12.661202774 -0700
@@ -391,11 +391,6 @@  static int igbvf_set_wol(struct net_devi
 	return -EOPNOTSUPP;
 }
 
-static int igbvf_phys_id(struct net_device *netdev, u32 data)
-{
-	return 0;
-}
-
 static int igbvf_get_coalesce(struct net_device *netdev,
                               struct ethtool_coalesce *ec)
 {
@@ -527,7 +522,6 @@  static const struct ethtool_ops igbvf_et
 	.self_test		= igbvf_diag_test,
 	.get_sset_count		= igbvf_get_sset_count,
 	.get_strings		= igbvf_get_strings,
-	.phys_id		= igbvf_phys_id,
 	.get_ethtool_stats	= igbvf_get_ethtool_stats,
 	.get_coalesce		= igbvf_get_coalesce,
 	.set_coalesce		= igbvf_set_coalesce,