[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1401221397.2586.2.camel@deadeye.wl.decadent.org.uk>
Date: Tue, 27 May 2014 21:09:57 +0100
From: Ben Hutchings <ben@...adent.org.uk>
To: Vince Bridgers <vbridgers2013@...il.com>
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH ethtool] Ethtool: Add Altera Triple Speed Ethernet
Support
On Thu, 2014-05-08 at 13:15 -0500, Vince Bridgers wrote:
> This patch adds Altera Triple Speed Ethernet support for dumping
> formatted register output from Ethtool.
Sorry for the slow response
[...]
> --- /dev/null
> +++ b/tse.c
[...]
> +int altera_tse_dump_regs(struct ethtool_drvinfo *info,
> + struct ethtool_regs *regs)
> +{
> + int i;
> + u32 *tsereg = (unsigned int *)regs->data;
> + u32 version = regs->version;
> +
> + /*
> + * Version 1: Initial TSE driver release. No feature information
> + * available, 32-bits of version is equal to 1.
> + *
> + * Version 2: Lower 16-bits of version is 2, upper 16 bits are:
> + * Bit 16 - SGMDA or MSGDMA Registers
> + * Bit 17 - PCS Present
> + * Bit 18 - Supplementary MAC Address Filter Registers Present
> + * Bit 19 - Multicast Hash Filter Present
> + * Bit 20 - IEEE 1588 Feature Present
> + */
[...]
You need to check that you recognise the version and bail out if not.
Otherwise, this is likely to do something silly when the driver supports
a new hardware revision.
Ben.
--
Ben Hutchings
A free society is one where it is safe to be unpopular. - Adlai Stevenson
Download attachment "signature.asc" of type "application/pgp-signature" (829 bytes)
Powered by blists - more mailing lists