lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sat, 10 Aug 2013 18:13:25 +0200 From: Ben Hutchings <bhutchings@...arflare.com> To: Stephen Hemminger <stephen@...workplumber.org> CC: Neel Patel <neepatel@...co.com>, <netdev@...r.kernel.org>, Nishank Trivedi <nistrive@...co.com>, Christian Benvenuti <benve@...co.com> Subject: Re: [PATCH 3/4] drivers/net: enic: Make ASIC information available to USNIC On Fri, 2013-08-09 at 15:21 -0700, Stephen Hemminger wrote: > On Fri, 9 Aug 2013 11:12:20 -0700 > Neel Patel <neepatel@...co.com> wrote: > > > This patch provides asic information via ethtool. [...] > > --- a/drivers/net/ethernet/cisco/enic/enic_ethtool.c > > +++ b/drivers/net/ethernet/cisco/enic/enic_ethtool.c > > @@ -19,6 +19,7 @@ > > #include <linux/netdevice.h> > > #include <linux/ethtool.h> > > > > +#include "driver_utils.h" > > #include "enic_res.h" > > #include "enic.h" > > #include "enic_dev.h" > > @@ -116,6 +117,9 @@ static void enic_get_drvinfo(struct net_device *netdev, > > sizeof(drvinfo->fw_version)); > > strlcpy(drvinfo->bus_info, pci_name(enic->pdev), > > sizeof(drvinfo->bus_info)); > > + memset(drvinfo->reserved1, 0, sizeof(drvinfo->reserved1)); > > + driver_encode_asic_info(drvinfo->reserved1, sizeof(drvinfo->reserved1), > > + fw_info->asic_type, fw_info->asic_rev); > > } > > If you want to use a reserved field, then make it a first class citizen. > Rename it to asic_info, make sure the result is okay for other drivers > and add send patch so Ben can make it part of normal ethtool support. > > Otherwise, this code is likely to break when someone else actually unreserves > that field. Right. I bet this is redundant with the IDs that lspci can show, anyway. Ben. -- 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. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists