netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] Fabric7 VIOC: Ethtool
@ 2006-10-24 21:30 Sriram Chidambaram
  2006-10-24 21:46 ` Stephen Hemminger
  2006-11-01  1:30 ` Jeff Garzik
  0 siblings, 2 replies; 4+ messages in thread
From: Sriram Chidambaram @ 2006-10-24 21:30 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: KERNEL Linux, NETDEV Linux, Driver Support

Ethtool patch for Fabric7 VIOC Device Driver.

Signed-off-by: Fabric7 Driver-Support <driver-support@fabric7.com>
---
 Makefile.am    |    2 +-
 ethtool-util.h |    2 ++
 ethtool.c      |    1 +
 vioc.c         |   35 +++++++++++++++++++++++++++++++++++
 4 files changed, 39 insertions(+), 1 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 97ad512..240979e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -7,7 +7,7 @@ sbin_PROGRAMS = ethtool
 ethtool_SOURCES = ethtool.c ethtool-copy.h ethtool-util.h	\
 		  amd8111e.c de2104x.c e100.c e1000.c		\
 		  fec_8xx.c ibm_emac.c ixgb.c natsemi.c		\
-		  pcnet32.c realtek.c tg3.c marvell.c
+		  pcnet32.c realtek.c tg3.c marvell.c vioc.c
 
 dist-hook:
 	cp $(top_srcdir)/ethtool.spec $(distdir)
diff --git a/ethtool-util.h b/ethtool-util.h
index 0909a5a..dcb0c1c 100644
--- a/ethtool-util.h
+++ b/ethtool-util.h
@@ -54,4 +54,6 @@ int skge_dump_regs(struct ethtool_drvinf
 /* SysKonnect Gigabit (Yukon2) */
 int sky2_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs);
 
+/* Fabric7 VIOC */
+int vioc_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs);
 #endif
diff --git a/ethtool.c b/ethtool.c
index b783248..6e68009 100644
--- a/ethtool.c
+++ b/ethtool.c
@@ -958,6 +958,7 @@ static struct {
 	{ "tg3", tg3_dump_regs },
 	{ "skge", skge_dump_regs },
 	{ "sky2", sky2_dump_regs },
+        { "vioc", vioc_dump_regs },
 };
 
 static int dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs)
diff --git a/vioc.c b/vioc.c
new file mode 100644
index 0000000..b58dd40
--- /dev/null
+++ b/vioc.c
@@ -0,0 +1,35 @@
+/* Copyright 2006 Fabric7 Systems, Inc */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "ethtool-util.h"
+
+struct regs_line {
+		u32	addr;
+		u32	data;
+};
+
+#define VIOC_REGS_LINE_SIZE	sizeof(struct regs_line)
+
+int vioc_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs)
+{
+	unsigned int	i;
+	unsigned int	num_regs;
+	struct regs_line *reg_info = (struct regs_line *) regs->data;
+
+	printf("%s: Enter\n", __FUNCTION__);
+
+	printf("ethtool_regs\n"
+		"%-20s = %04x\n"
+		"%-20s = %04x\n",
+		"cmd", regs->cmd,
+		"version", regs->version);
+
+	num_regs = regs->len/VIOC_REGS_LINE_SIZE;
+
+	for (i = 0; i < num_regs; i++){
+		printf("%08x = %08x\n", reg_info[i].addr, reg_info[i].data);
+	}
+
+	return 0;
+}
-- 
1.4.3.GIT



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] Fabric7 VIOC: Ethtool
  2006-10-24 21:30 [PATCH 1/1] Fabric7 VIOC: Ethtool Sriram Chidambaram
@ 2006-10-24 21:46 ` Stephen Hemminger
  2006-10-24 22:07   ` Sriram Chidambaram
  2006-11-01  1:30 ` Jeff Garzik
  1 sibling, 1 reply; 4+ messages in thread
From: Stephen Hemminger @ 2006-10-24 21:46 UTC (permalink / raw)
  To: driver-support; +Cc: schidambaram, Jeff Garzik, KERNEL Linux, NETDEV Linux

On Tue, 24 Oct 2006 14:30:41 -0700
Sriram Chidambaram <schidambaram@fabric7.com> wrote:

> Ethtool patch for Fabric7 VIOC Device Driver.
> 
> Signed-off-by: Fabric7 Driver-Support <driver-support@fabric7.com>
> ---
>  Makefile.am    |    2 +-
>  ethtool-util.h |    2 ++
>  ethtool.c      |    1 +
>  vioc.c         |   35 +++++++++++++++++++++++++++++++++++
>  4 files changed, 39 insertions(+), 1 deletions(-)
> 
> diff --git a/Makefile.am b/Makefile.am
> index 97ad512..240979e 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -7,7 +7,7 @@ sbin_PROGRAMS = ethtool
>  ethtool_SOURCES = ethtool.c ethtool-copy.h ethtool-util.h	\
>  		  amd8111e.c de2104x.c e100.c e1000.c		\
>  		  fec_8xx.c ibm_emac.c ixgb.c natsemi.c		\
> -		  pcnet32.c realtek.c tg3.c marvell.c
> +		  pcnet32.c realtek.c tg3.c marvell.c vioc.c
>  
>  dist-hook:
>  	cp $(top_srcdir)/ethtool.spec $(distdir)
> diff --git a/ethtool-util.h b/ethtool-util.h
> index 0909a5a..dcb0c1c 100644
> --- a/ethtool-util.h
> +++ b/ethtool-util.h
> @@ -54,4 +54,6 @@ int skge_dump_regs(struct ethtool_drvinf
>  /* SysKonnect Gigabit (Yukon2) */
>  int sky2_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs);
>  
> +/* Fabric7 VIOC */
> +int vioc_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs);
>  #endif
> diff --git a/ethtool.c b/ethtool.c
> index b783248..6e68009 100644
> --- a/ethtool.c
> +++ b/ethtool.c
> @@ -958,6 +958,7 @@ static struct {
>  	{ "tg3", tg3_dump_regs },
>  	{ "skge", skge_dump_regs },
>  	{ "sky2", sky2_dump_regs },
> +        { "vioc", vioc_dump_regs },
>  };
>  
>  static int dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs)
> diff --git a/vioc.c b/vioc.c
> new file mode 100644
> index 0000000..b58dd40
> --- /dev/null
> +++ b/vioc.c
> @@ -0,0 +1,35 @@
> +/* Copyright 2006 Fabric7 Systems, Inc */
> +
> +#include <stdio.h>
> +#include <stdlib.h>
> +#include "ethtool-util.h"
> +
> +struct regs_line {
> +		u32	addr;
> +		u32	data;
> +};
> +
> +#define VIOC_REGS_LINE_SIZE	sizeof(struct regs_line)
> +
> +int vioc_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs)
> +{
> +	unsigned int	i;
> +	unsigned int	num_regs;
> +	struct regs_line *reg_info = (struct regs_line *) regs->data;
> +
> +	printf("%s: Enter\n", __FUNCTION__);

Leftover debug?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] Fabric7 VIOC: Ethtool
  2006-10-24 21:46 ` Stephen Hemminger
@ 2006-10-24 22:07   ` Sriram Chidambaram
  0 siblings, 0 replies; 4+ messages in thread
From: Sriram Chidambaram @ 2006-10-24 22:07 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Driver Support, Jeff Garzik, KERNEL Linux, NETDEV Linux

Removed debug print statement

Signed-off-by: Fabric7 Driver-Support <driver-support@fabric7.com>
---
 vioc.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/vioc.c b/vioc.c
index 51004c6..c771737 100644
--- a/vioc.c
+++ b/vioc.c
@@ -17,8 +17,6 @@ int vioc_dump_regs(struct ethtool_drvinf
 	unsigned int	num_regs;
 	struct regs_line *reg_info = (struct regs_line *) regs->data;
 
-	printf("%s: Enter\n", __FUNCTION__);
-
 	printf("ethtool_regs\n"
 		"%-20s = %04x\n"
 		"%-20s = %04x\n",
-- 
1.4.3.GIT



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] Fabric7 VIOC: Ethtool
  2006-10-24 21:30 [PATCH 1/1] Fabric7 VIOC: Ethtool Sriram Chidambaram
  2006-10-24 21:46 ` Stephen Hemminger
@ 2006-11-01  1:30 ` Jeff Garzik
  1 sibling, 0 replies; 4+ messages in thread
From: Jeff Garzik @ 2006-11-01  1:30 UTC (permalink / raw)
  To: driver-support; +Cc: KERNEL Linux, NETDEV Linux

Sriram Chidambaram wrote:
> Ethtool patch for Fabric7 VIOC Device Driver.
> 
> Signed-off-by: Fabric7 Driver-Support <driver-support@fabric7.com>
> ---
>  Makefile.am    |    2 +-
>  ethtool-util.h |    2 ++
>  ethtool.c      |    1 +
>  vioc.c         |   35 +++++++++++++++++++++++++++++++++++
>  4 files changed, 39 insertions(+), 1 deletions(-)
> 

applied



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-11-01  1:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-24 21:30 [PATCH 1/1] Fabric7 VIOC: Ethtool Sriram Chidambaram
2006-10-24 21:46 ` Stephen Hemminger
2006-10-24 22:07   ` Sriram Chidambaram
2006-11-01  1:30 ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).