* Re: [PATCH] fec_8xx driver take 2 (+ethtool)
[not found] <40CD902A.4020702@intracom.gr>
@ 2004-06-19 21:35 ` Jeff Garzik
2004-06-21 8:01 ` Pantelis Antoniou
[not found] ` <40D695A3.50809@intracom.gr>
0 siblings, 2 replies; 4+ messages in thread
From: Jeff Garzik @ 2004-06-19 21:35 UTC (permalink / raw)
To: Pantelis Antoniou; +Cc: Tom Rini, Linuxppc-Embedded
Your patch is acceptable and OK to apply, but time has moved forward and
there is a trivial rejection:
[jgarzik@sata fec]$ BK_USER=panto BK_HOST=intracom.gr bk import -tpatch
-CR "-y[netdrvr] add fec_8xx driver" ~/tmp/patch .
Patching...
Patch failed. **** patch log follows ****
Patching file drivers/net/Kconfig
Patching file drivers/net/Makefile
Creating file drivers/net/fec_8xx/Kconfig
Creating file drivers/net/fec_8xx/Makefile
Creating file drivers/net/fec_8xx/fec_8xx-netta.c
Creating file drivers/net/fec_8xx/fec_8xx.h
Creating file drivers/net/fec_8xx/fec_main.c
Creating file drivers/net/fec_8xx/fec_mii.c
Patching file include/asm-ppc/8xx_immap.h
1 out of 1 hunk FAILED -- saving rejects to file
include/asm-ppc/8xx_immap.h.rej
Please resubmit TWO emails, one with fec_8xx patch, and another with
ethtool patch.
See Documentation/SubmittingPatches for more info.
Jeff
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] fec_8xx driver take 2 (+ethtool)
2004-06-19 21:35 ` [PATCH] fec_8xx driver take 2 (+ethtool) Jeff Garzik
@ 2004-06-21 8:01 ` Pantelis Antoniou
2004-07-02 15:35 ` Jeff Garzik
[not found] ` <40D695A3.50809@intracom.gr>
1 sibling, 1 reply; 4+ messages in thread
From: Pantelis Antoniou @ 2004-06-21 8:01 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Tom Rini, Linuxppc-Embedded
[-- Attachment #1: Type: text/plain, Size: 53 bytes --]
And here is the ethtool patch...
Regards
Pantelis
[-- Attachment #2: ethtool-fec_8xx.diff --]
[-- Type: text/x-patch, Size: 4331 bytes --]
diff -ruN ethtool-1.8/Makefile.am ethtool-1.8-work/Makefile.am
--- ethtool-1.8/Makefile.am 2003-05-30 00:20:20.000000000 +0300
+++ ethtool-1.8-work/Makefile.am 2004-06-14 14:18:18.328540128 +0300
@@ -5,7 +5,7 @@
sbin_PROGRAMS = ethtool
ethtool_SOURCES = de2104x.c ethtool.c ethtool-copy.h ethtool-util.h natsemi.c \
- e1000.c realtek.c e100.c tg3.c amd8111e.c
+ e1000.c realtek.c e100.c tg3.c amd8111e.c fec_8xx.c
dist-hook:
cp $(top_srcdir)/ethtool.spec $(distdir)
diff -ruN ethtool-1.8/ethtool-util.h ethtool-1.8-work/ethtool-util.h
--- ethtool-1.8/ethtool-util.h 2003-05-30 00:20:24.000000000 +0300
+++ ethtool-1.8-work/ethtool-util.h 2004-06-14 14:19:19.011314944 +0300
@@ -33,4 +33,7 @@
/* Advanced Micro Devices AMD8111 based Adapter */
int amd8111e_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs);
+/* Motorola 8xx FEC Ethernet controller */
+int fec_8xx_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs);
+
#endif
diff -ruN ethtool-1.8/ethtool.c ethtool-1.8-work/ethtool.c
--- ethtool-1.8/ethtool.c 2003-07-19 18:15:26.000000000 +0300
+++ ethtool-1.8-work/ethtool.c 2004-06-14 14:18:43.428724320 +0300
@@ -998,6 +998,8 @@
return e100_dump_regs(info, regs);
if (!strncmp("amd8111e", info->driver, ETHTOOL_BUSINFO_LEN))
return amd8111e_dump_regs(info, regs);
+ if (!strncmp("fec_8xx", info->driver, ETHTOOL_BUSINFO_LEN))
+ return fec_8xx_dump_regs(info, regs);
fprintf(stdout, "Offset\tValue\n");
diff -ruN ethtool-1.8/fec_8xx.c ethtool-1.8-work/fec_8xx.c
--- ethtool-1.8/fec_8xx.c 1970-01-01 02:00:00.000000000 +0200
+++ ethtool-1.8-work/fec_8xx.c 2004-06-14 14:20:09.546632408 +0300
@@ -0,0 +1,81 @@
+/*
+ * Copyright (C) 2004 Intracom S.A.
+ * Pantelis Antoniou <panto@intracom.gr>
+ */
+
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+
+#include "ethtool-util.h"
+
+struct fec {
+ uint32_t addr_low; /* lower 32 bits of station address */
+ uint32_t addr_high; /* upper 16 bits of station address||0 */
+ uint32_t hash_table_high;/* upper 32-bits of hash table */
+ uint32_t hash_table_low; /* lower 32-bits of hash table */
+ uint32_t r_des_start; /* beginning of Rx descriptor ring */
+ uint32_t x_des_start; /* beginning of Tx descriptor ring */
+ uint32_t r_buff_size; /* Rx buffer size */
+ uint32_t res2[9]; /* reserved */
+ uint32_t ecntrl; /* ethernet control register */
+ uint32_t ievent; /* interrupt event register */
+ uint32_t imask; /* interrupt mask register */
+ uint32_t ivec; /* interrupt level and vector status */
+ uint32_t r_des_active; /* Rx ring updated flag */
+ uint32_t x_des_active; /* Tx ring updated flag */
+ uint32_t res3[10]; /* reserved */
+ uint32_t mii_data; /* MII data register */
+ uint32_t mii_speed; /* MII speed control register */
+ uint32_t res4[17]; /* reserved */
+ uint32_t r_bound; /* end of RAM (read-only) */
+ uint32_t r_fstart; /* Rx FIFO start address */
+ uint32_t res5[6]; /* reserved */
+ uint32_t x_fstart; /* Tx FIFO start address */
+ uint32_t res6[17]; /* reserved */
+ uint32_t fun_code; /* fec SDMA function code */
+ uint32_t res7[3]; /* reserved */
+ uint32_t r_cntrl; /* Rx control register */
+ uint32_t r_hash; /* Rx hash register */
+ uint32_t res8[14]; /* reserved */
+ uint32_t x_cntrl; /* Tx control register */
+ uint32_t res9[0x1e]; /* reserved */
+};
+
+#define DUMP_REG(f, x) fprintf(stdout, \
+ "0x%04x: %-16s 0x%08x\n", \
+ offsetof(struct fec, x), \
+ #x, f->x)
+
+int fec_8xx_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs)
+{
+ struct fec *f = (struct fec *)regs->data;
+
+ fprintf(stdout, "Descriptor Registers\n");
+ fprintf(stdout, "---------------------\n");
+
+ DUMP_REG(f, addr_low);
+ DUMP_REG(f, addr_high);
+ DUMP_REG(f, hash_table_high);
+ DUMP_REG(f, hash_table_low);
+ DUMP_REG(f, r_des_start);
+ DUMP_REG(f, x_des_start);
+ DUMP_REG(f, r_buff_size);
+ DUMP_REG(f, ecntrl);
+ DUMP_REG(f, ievent);
+ DUMP_REG(f, imask);
+ DUMP_REG(f, ivec);
+ DUMP_REG(f, r_des_active);
+ DUMP_REG(f, x_des_active);
+ DUMP_REG(f, mii_data);
+ DUMP_REG(f, mii_speed);
+ DUMP_REG(f, r_bound);
+ DUMP_REG(f, r_fstart);
+ DUMP_REG(f, x_fstart);
+ DUMP_REG(f, fun_code);
+ DUMP_REG(f, r_cntrl);
+ DUMP_REG(f, r_hash);
+ DUMP_REG(f, x_cntrl);
+
+ return 0;
+}
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] fec_8xx driver take 2 (+ethtool)
[not found] ` <40D695A3.50809@intracom.gr>
@ 2004-07-01 3:37 ` Jeff Garzik
0 siblings, 0 replies; 4+ messages in thread
From: Jeff Garzik @ 2004-07-01 3:37 UTC (permalink / raw)
To: Pantelis Antoniou; +Cc: Tom Rini, Linuxppc-Embedded
applied
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] fec_8xx driver take 2 (+ethtool)
2004-06-21 8:01 ` Pantelis Antoniou
@ 2004-07-02 15:35 ` Jeff Garzik
0 siblings, 0 replies; 4+ messages in thread
From: Jeff Garzik @ 2004-07-02 15:35 UTC (permalink / raw)
To: Pantelis Antoniou; +Cc: Tom Rini, Linuxppc-Embedded
applied
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-07-02 15:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <40CD902A.4020702@intracom.gr>
2004-06-19 21:35 ` [PATCH] fec_8xx driver take 2 (+ethtool) Jeff Garzik
2004-06-21 8:01 ` Pantelis Antoniou
2004-07-02 15:35 ` Jeff Garzik
[not found] ` <40D695A3.50809@intracom.gr>
2004-07-01 3:37 ` 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).