From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759926Ab2IEX15 (ORCPT ); Wed, 5 Sep 2012 19:27:57 -0400 Received: from webmail.solarflare.com ([12.187.104.25]:13774 "EHLO ocex02.SolarFlarecom.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753952Ab2IEX1z (ORCPT ); Wed, 5 Sep 2012 19:27:55 -0400 Message-ID: <1346887671.5325.47.camel@bwh-desktop.uk.solarflarecom.com> Subject: Re: [PATCH 08/10] net/macb: macb_get_drvinfo: add GEM/MACB suffix to differentiate revision From: Ben Hutchings To: Nicolas Ferre CC: , , , , , , , Date: Thu, 6 Sep 2012 00:27:51 +0100 In-Reply-To: References: Organization: Solarflare Communications Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3 (3.2.3-3.fc16) Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-Originating-IP: [10.17.20.137] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2012-09-05 at 11:00 +0200, Nicolas Ferre wrote: > Add an indication about which revision of the hardware we are running in > info->driver string. > > Signed-off-by: Nicolas Ferre > --- > drivers/net/ethernet/cadence/macb.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c > index bd331fd..c7c39f1 100644 > --- a/drivers/net/ethernet/cadence/macb.c > +++ b/drivers/net/ethernet/cadence/macb.c > @@ -1313,6 +1313,10 @@ static void macb_get_drvinfo(struct net_device *dev, > struct macb *bp = netdev_priv(dev); > > strcpy(info->driver, bp->pdev->dev.driver->name); > + if (macb_is_gem(bp)) > + strcat(info->driver, " GEM"); > + else > + strcat(info->driver, " MACB"); > strcpy(info->version, "$Revision: 1.14 $"); Related to hardware revisions (which don't belong here, as David said), I rather doubt this CVS ID is very useful as a driver version. If the driver doesn't have a meaningful version (aside from the kernel version) then you can remove this function and let the ethtool core fill in the other two fields automatically. Ben. > strcpy(info->bus_info, dev_name(&bp->pdev->dev)); > } -- Ben Hutchings, Staff 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.