summaryrefslogtreecommitdiff
path: root/at76c50x-usb.c
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2009-12-23 09:29:47 -0500
committerJeff Garzik <jgarzik@redhat.com>2009-12-23 17:10:56 -0500
commitc1af44178cfaeb865f6ed1f6d00439edaa7b00d1 (patch)
tree3faf569fbc130a42ed544301deb8c1426c09f073 /at76c50x-usb.c
parentef381865d941b62a40432b9dfc1e74b4ee54cb91 (diff)
downloadethtool-c1af44178cfaeb865f6ed1f6d00439edaa7b00d1.tar.gz
ethtool: add support for at76c50x-usb driver
Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'at76c50x-usb.c')
-rw-r--r--at76c50x-usb.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/at76c50x-usb.c b/at76c50x-usb.c
new file mode 100644
index 0000000..4c2a1a8
--- /dev/null
+++ b/at76c50x-usb.c
@@ -0,0 +1,32 @@
+#include <stdio.h>
+#include "ethtool-util.h"
+
+static char *hw_versions[] = {
+ "503_ISL3861",
+ "503_ISL3863",
+ " 503",
+ " 503_ACC",
+ " 505",
+ " 505_2958",
+ " 505A",
+ " 505AMX",
+};
+
+int
+at76c50x_usb_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs)
+{
+ u8 version = (u8)(regs->version >> 24);
+ u8 rev_id = (u8)(regs->version);
+ char *ver_string;
+
+ if (version != 0)
+ return -1;
+
+ ver_string = hw_versions[rev_id];
+ fprintf(stdout,
+ "Hardware Version %s\n",
+ ver_string);
+
+ return 0;
+}
+