Message ID | fc701a2ed18198b7a671c55f1e65725f1709509c.1346775479.git.nicolas.ferre@atmel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
From: Nicolas Ferre <nicolas.ferre@atmel.com> Date: Wed, 5 Sep 2012 11:00:53 +0200 > strcpy(info->driver, bp->pdev->dev.driver->name); > + if (macb_is_gem(bp)) > + strcat(info->driver, " GEM"); > + else > + strcat(info->driver, " MACB"); This is a driver string, which means the software driver, and has absolutely nothing to do with the exact type of the underlying physical hardware. Therefore the these suffixes should be left out of the driver string.
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 <nicolas.ferre@atmel.com> > --- > 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)); > }
On 09/06/2012 01:27 AM, Ben Hutchings : > 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 <nicolas.ferre@atmel.com> >> --- >> 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. Absolutely, I will do this. Thanks for the tip. Best regards,
From: Nicolas Ferre <nicolas.ferre@atmel.com> Date: Thu, 6 Sep 2012 16:01:34 +0200 > Absolutely, I will do this. Please, when you receive feedback on your patches, you need to resubmit the whole patch series for review not just the patches where changes were asked for.
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 $"); strcpy(info->bus_info, dev_name(&bp->pdev->dev)); }
Add an indication about which revision of the hardware we are running in info->driver string. Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> --- drivers/net/ethernet/cadence/macb.c | 4 ++++ 1 file changed, 4 insertions(+)