From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753264Ab1D1CEL (ORCPT ); Wed, 27 Apr 2011 22:04:11 -0400 Received: from exchange.solarflare.com ([216.237.3.220]:5467 "EHLO exchange.solarflare.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751342Ab1D1CEJ (ORCPT ); Wed, 27 Apr 2011 22:04:09 -0400 Subject: Re: [PATCHv3 2/7] ethtool: Call ethtool's get/set_settings callbacks with cleaned data From: Ben Hutchings To: David Decotigny Cc: "David S. Miller" , mirq-linux@rere.qmqm.pl, Stanislaw Gruszka , Alexander Duyck , Eilon Greenstein , Grant Grundler , e1000-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, netdev@vger.kernel.org In-Reply-To: <1303954043-17440-3-git-send-email-decot@google.com> References: <1303954043-17440-1-git-send-email-decot@google.com> <1303954043-17440-3-git-send-email-decot@google.com> Content-Type: text/plain; charset="UTF-8" Organization: Solarflare Date: Thu, 28 Apr 2011 03:04:04 +0100 Message-ID: <1303956244.3032.423.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.32.2 Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 28 Apr 2011 02:04:08.0859 (UTC) FILETIME=[8F672EB0:01CC0548] X-TM-AS-Product-Ver: SMEX-8.0.0.1181-6.500.1024-18098.005 X-TM-AS-Result: No--9.430000-0.000000-31 X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2011-04-27 at 18:27 -0700, David Decotigny wrote: > This makes sure that when a driver calls the ethtool's > get/set_settings() callback of another driver, the data passed to it > is clean. This guarantees that speed_hi will be zeroed correctly if > the called callback doesn't explicitely set it: we are sure we don't > get a corrupted speed from the underlying driver. We also take care of > setting the cmd field appropriately (ETHTOOL_GSET/SSET). > > This applies to dev_ethtool_get_settings(), which now makes sure it > sets up that ethtool command parameter correctly before passing it to > drivers. This also means that whoever calls dev_ethtool_get_settings() > does not have to clean the ethtool command parameter. This function > also becomes an exported symbol instead of an inline. > > All drivers visible to make allyesconfig under x86_64 have been > updated. > > Signed-off-by: David Decotigny Reviewed-by: Ben Hutchings -- Ben Hutchings, Senior Software Engineer, Solarflare Not speaking for my employer; that's the marketing department's job. They asked us to note that Solarflare product names are trademarked. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Hutchings Subject: Re: [PATCHv3 2/7] ethtool: Call ethtool's get/set_settings callbacks with cleaned data Date: Thu, 28 Apr 2011 03:04:04 +0100 Message-ID: <1303956244.3032.423.camel@localhost> References: <1303954043-17440-1-git-send-email-decot@google.com> <1303954043-17440-3-git-send-email-decot@google.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Stanislaw Gruszka , Grant Grundler , e1000-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, Eilon Greenstein , mirq-linux@rere.qmqm.pl, netdev@vger.kernel.org, "David S. Miller" To: David Decotigny Return-path: In-Reply-To: <1303954043-17440-3-git-send-email-decot@google.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: e1000-devel-bounces@lists.sourceforge.net List-Id: netdev.vger.kernel.org On Wed, 2011-04-27 at 18:27 -0700, David Decotigny wrote: > This makes sure that when a driver calls the ethtool's > get/set_settings() callback of another driver, the data passed to it > is clean. This guarantees that speed_hi will be zeroed correctly if > the called callback doesn't explicitely set it: we are sure we don't > get a corrupted speed from the underlying driver. We also take care of > setting the cmd field appropriately (ETHTOOL_GSET/SSET). > > This applies to dev_ethtool_get_settings(), which now makes sure it > sets up that ethtool command parameter correctly before passing it to > drivers. This also means that whoever calls dev_ethtool_get_settings() > does not have to clean the ethtool command parameter. This function > also becomes an exported symbol instead of an inline. > > All drivers visible to make allyesconfig under x86_64 have been > updated. > > Signed-off-by: David Decotigny Reviewed-by: Ben Hutchings -- Ben Hutchings, Senior Software Engineer, Solarflare Not speaking for my employer; that's the marketing department's job. They asked us to note that Solarflare product names are trademarked. ------------------------------------------------------------------------------ WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd _______________________________________________ E1000-devel mailing list E1000-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/e1000-devel To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired