netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] UAPI: Fix compilation of the wanxl firmware blob.
@ 2012-11-07 12:37 David Howells
  2012-11-07 12:37 ` [PATCH 2/4] UAPI: (Scripted) Disintegrate include/linux/hdlc David Howells
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: David Howells @ 2012-11-07 12:37 UTC (permalink / raw)
  To: khc; +Cc: netdev, linux

The wanxl firmware needs access to some bits of UAPI stuff, so the -I flag in
the Makefile needs adjusting to point at the UAPI headers.

Signed-off-by: David Howells <dhowells@redhat.com>
---

 drivers/net/wan/Makefile |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wan/Makefile b/drivers/net/wan/Makefile
index eac709b..4dac96b 100644
--- a/drivers/net/wan/Makefile
+++ b/drivers/net/wan/Makefile
@@ -52,7 +52,7 @@ endif
 
 quiet_cmd_build_wanxlfw = BLD FW  $@
       cmd_build_wanxlfw = \
-	$(CPP) -Wp,-MD,$(depfile) -I$(srctree)/include $< | $(AS68K) -m68360 -o $(obj)/wanxlfw.o; \
+	$(CPP) -Wp,-MD,$(depfile) -I$(srctree)/include/uapi $< | $(AS68K) -m68360 -o $(obj)/wanxlfw.o; \
 	$(LD68K) --oformat binary -Ttext 0x1000 $(obj)/wanxlfw.o -o $(obj)/wanxlfw.bin; \
 	hexdump -ve '"\n" 16/1 "0x%02X,"' $(obj)/wanxlfw.bin | sed 's/0x  ,//g;1s/^/static u8 firmware[]={/;$$s/,$$/\n};\n/' >$(obj)/wanxlfw.inc; \
 	rm -f $(obj)/wanxlfw.bin $(obj)/wanxlfw.o

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

* [PATCH 2/4] UAPI: (Scripted) Disintegrate include/linux/hdlc
  2012-11-07 12:37 [PATCH 1/4] UAPI: Fix compilation of the wanxl firmware blob David Howells
@ 2012-11-07 12:37 ` David Howells
  2012-11-09 21:29   ` David Miller
  2012-11-07 12:37 ` [PATCH 3/4] Fix the wanxl firmware to include missing constants David Howells
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: David Howells @ 2012-11-07 12:37 UTC (permalink / raw)
  To: khc; +Cc: netdev, linux

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Michael Kerrisk <mtk.manpages@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Dave Jones <davej@redhat.com>
Acked-by: Krzysztof Halasa <khc@pm.waw.pl>
---

 include/linux/hdlc/Kbuild       |    1 
 include/linux/hdlc/ioctl.h      |   81 ---------------------------------------
 include/uapi/linux/hdlc/Kbuild  |    1 
 include/uapi/linux/hdlc/ioctl.h |   81 +++++++++++++++++++++++++++++++++++++++
 4 files changed, 82 insertions(+), 82 deletions(-)
 delete mode 100644 include/linux/hdlc/ioctl.h
 create mode 100644 include/uapi/linux/hdlc/ioctl.h

diff --git a/include/linux/hdlc/Kbuild b/include/linux/hdlc/Kbuild
index 1fb2644..e69de29 100644
--- a/include/linux/hdlc/Kbuild
+++ b/include/linux/hdlc/Kbuild
@@ -1 +0,0 @@
-header-y += ioctl.h
diff --git a/include/linux/hdlc/ioctl.h b/include/linux/hdlc/ioctl.h
deleted file mode 100644
index 5839723..0000000
--- a/include/linux/hdlc/ioctl.h
+++ /dev/null
@@ -1,81 +0,0 @@
-#ifndef __HDLC_IOCTL_H__
-#define __HDLC_IOCTL_H__
-
-
-#define GENERIC_HDLC_VERSION 4	/* For synchronization with sethdlc utility */
-
-#define CLOCK_DEFAULT   0	/* Default setting */
-#define CLOCK_EXT	1	/* External TX and RX clock - DTE */
-#define CLOCK_INT	2	/* Internal TX and RX clock - DCE */
-#define CLOCK_TXINT	3	/* Internal TX and external RX clock */
-#define CLOCK_TXFROMRX	4	/* TX clock derived from external RX clock */
-
-
-#define ENCODING_DEFAULT	0 /* Default setting */
-#define ENCODING_NRZ		1
-#define ENCODING_NRZI		2
-#define ENCODING_FM_MARK	3
-#define ENCODING_FM_SPACE	4
-#define ENCODING_MANCHESTER	5
-
-
-#define PARITY_DEFAULT		0 /* Default setting */
-#define PARITY_NONE		1 /* No parity */
-#define PARITY_CRC16_PR0	2 /* CRC16, initial value 0x0000 */
-#define PARITY_CRC16_PR1	3 /* CRC16, initial value 0xFFFF */
-#define PARITY_CRC16_PR0_CCITT	4 /* CRC16, initial 0x0000, ITU-T version */
-#define PARITY_CRC16_PR1_CCITT	5 /* CRC16, initial 0xFFFF, ITU-T version */
-#define PARITY_CRC32_PR0_CCITT	6 /* CRC32, initial value 0x00000000 */
-#define PARITY_CRC32_PR1_CCITT	7 /* CRC32, initial value 0xFFFFFFFF */
-
-#define LMI_DEFAULT		0 /* Default setting */
-#define LMI_NONE		1 /* No LMI, all PVCs are static */
-#define LMI_ANSI		2 /* ANSI Annex D */
-#define LMI_CCITT		3 /* ITU-T Annex A */
-#define LMI_CISCO		4 /* The "original" LMI, aka Gang of Four */
-
-typedef struct { 
-	unsigned int clock_rate; /* bits per second */
-	unsigned int clock_type; /* internal, external, TX-internal etc. */
-	unsigned short loopback;
-} sync_serial_settings;          /* V.35, V.24, X.21 */
-
-typedef struct { 
-	unsigned int clock_rate; /* bits per second */
-	unsigned int clock_type; /* internal, external, TX-internal etc. */
-	unsigned short loopback;
-	unsigned int slot_map;
-} te1_settings;                  /* T1, E1 */
-
-typedef struct {
-	unsigned short encoding;
-	unsigned short parity;
-} raw_hdlc_proto;
-
-typedef struct {
-	unsigned int t391;
-	unsigned int t392;
-	unsigned int n391;
-	unsigned int n392;
-	unsigned int n393;
-	unsigned short lmi;
-	unsigned short dce; /* 1 for DCE (network side) operation */
-} fr_proto;
-
-typedef struct {
-	unsigned int dlci;
-} fr_proto_pvc;          /* for creating/deleting FR PVCs */
-
-typedef struct {
-	unsigned int dlci;
-	char master[IFNAMSIZ];	/* Name of master FRAD device */
-}fr_proto_pvc_info;		/* for returning PVC information only */
-
-typedef struct {
-    unsigned int interval;
-    unsigned int timeout;
-} cisco_proto;
-
-/* PPP doesn't need any info now - supply length = 0 to ioctl */
-
-#endif /* __HDLC_IOCTL_H__ */
diff --git a/include/uapi/linux/hdlc/Kbuild b/include/uapi/linux/hdlc/Kbuild
index aafaa5a..8c1d2cb 100644
--- a/include/uapi/linux/hdlc/Kbuild
+++ b/include/uapi/linux/hdlc/Kbuild
@@ -1 +1,2 @@
 # UAPI Header export list
+header-y += ioctl.h
diff --git a/include/uapi/linux/hdlc/ioctl.h b/include/uapi/linux/hdlc/ioctl.h
new file mode 100644
index 0000000..5839723
--- /dev/null
+++ b/include/uapi/linux/hdlc/ioctl.h
@@ -0,0 +1,81 @@
+#ifndef __HDLC_IOCTL_H__
+#define __HDLC_IOCTL_H__
+
+
+#define GENERIC_HDLC_VERSION 4	/* For synchronization with sethdlc utility */
+
+#define CLOCK_DEFAULT   0	/* Default setting */
+#define CLOCK_EXT	1	/* External TX and RX clock - DTE */
+#define CLOCK_INT	2	/* Internal TX and RX clock - DCE */
+#define CLOCK_TXINT	3	/* Internal TX and external RX clock */
+#define CLOCK_TXFROMRX	4	/* TX clock derived from external RX clock */
+
+
+#define ENCODING_DEFAULT	0 /* Default setting */
+#define ENCODING_NRZ		1
+#define ENCODING_NRZI		2
+#define ENCODING_FM_MARK	3
+#define ENCODING_FM_SPACE	4
+#define ENCODING_MANCHESTER	5
+
+
+#define PARITY_DEFAULT		0 /* Default setting */
+#define PARITY_NONE		1 /* No parity */
+#define PARITY_CRC16_PR0	2 /* CRC16, initial value 0x0000 */
+#define PARITY_CRC16_PR1	3 /* CRC16, initial value 0xFFFF */
+#define PARITY_CRC16_PR0_CCITT	4 /* CRC16, initial 0x0000, ITU-T version */
+#define PARITY_CRC16_PR1_CCITT	5 /* CRC16, initial 0xFFFF, ITU-T version */
+#define PARITY_CRC32_PR0_CCITT	6 /* CRC32, initial value 0x00000000 */
+#define PARITY_CRC32_PR1_CCITT	7 /* CRC32, initial value 0xFFFFFFFF */
+
+#define LMI_DEFAULT		0 /* Default setting */
+#define LMI_NONE		1 /* No LMI, all PVCs are static */
+#define LMI_ANSI		2 /* ANSI Annex D */
+#define LMI_CCITT		3 /* ITU-T Annex A */
+#define LMI_CISCO		4 /* The "original" LMI, aka Gang of Four */
+
+typedef struct { 
+	unsigned int clock_rate; /* bits per second */
+	unsigned int clock_type; /* internal, external, TX-internal etc. */
+	unsigned short loopback;
+} sync_serial_settings;          /* V.35, V.24, X.21 */
+
+typedef struct { 
+	unsigned int clock_rate; /* bits per second */
+	unsigned int clock_type; /* internal, external, TX-internal etc. */
+	unsigned short loopback;
+	unsigned int slot_map;
+} te1_settings;                  /* T1, E1 */
+
+typedef struct {
+	unsigned short encoding;
+	unsigned short parity;
+} raw_hdlc_proto;
+
+typedef struct {
+	unsigned int t391;
+	unsigned int t392;
+	unsigned int n391;
+	unsigned int n392;
+	unsigned int n393;
+	unsigned short lmi;
+	unsigned short dce; /* 1 for DCE (network side) operation */
+} fr_proto;
+
+typedef struct {
+	unsigned int dlci;
+} fr_proto_pvc;          /* for creating/deleting FR PVCs */
+
+typedef struct {
+	unsigned int dlci;
+	char master[IFNAMSIZ];	/* Name of master FRAD device */
+}fr_proto_pvc_info;		/* for returning PVC information only */
+
+typedef struct {
+    unsigned int interval;
+    unsigned int timeout;
+} cisco_proto;
+
+/* PPP doesn't need any info now - supply length = 0 to ioctl */
+
+#endif /* __HDLC_IOCTL_H__ */

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

* [PATCH 3/4] Fix the wanxl firmware to include missing constants
  2012-11-07 12:37 [PATCH 1/4] UAPI: Fix compilation of the wanxl firmware blob David Howells
  2012-11-07 12:37 ` [PATCH 2/4] UAPI: (Scripted) Disintegrate include/linux/hdlc David Howells
@ 2012-11-07 12:37 ` David Howells
  2012-11-09 21:29   ` David Miller
  2012-11-07 12:37 ` [PATCH 4/4] Make the wanxl firmware array const David Howells
  2012-11-09 21:29 ` [PATCH 1/4] UAPI: Fix compilation of the wanxl firmware blob David Miller
  3 siblings, 1 reply; 8+ messages in thread
From: David Howells @ 2012-11-07 12:37 UTC (permalink / raw)
  To: khc; +Cc: netdev, linux

Fix the wanxl firmware to include missing constants such as PARITY_NONE.  It
should be #including the linux/hdlc/ioctl.h header.

To make this work, we also have to guard parts of ioctl.h with !__ASSEMBLY__.

Signed-off-by: David Howells <dhowells@redhat.com>
---

 drivers/net/wan/Makefile        |    2 +-
 drivers/net/wan/wanxlfw.S       |    1 +
 include/uapi/linux/hdlc/ioctl.h |    3 +++
 3 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wan/Makefile b/drivers/net/wan/Makefile
index 4dac96b..b0a6163 100644
--- a/drivers/net/wan/Makefile
+++ b/drivers/net/wan/Makefile
@@ -52,7 +52,7 @@ endif
 
 quiet_cmd_build_wanxlfw = BLD FW  $@
       cmd_build_wanxlfw = \
-	$(CPP) -Wp,-MD,$(depfile) -I$(srctree)/include/uapi $< | $(AS68K) -m68360 -o $(obj)/wanxlfw.o; \
+	$(CPP) -D__ASSEMBLY__ -Wp,-MD,$(depfile) -I$(srctree)/include/uapi $< | $(AS68K) -m68360 -o $(obj)/wanxlfw.o; \
 	$(LD68K) --oformat binary -Ttext 0x1000 $(obj)/wanxlfw.o -o $(obj)/wanxlfw.bin; \
 	hexdump -ve '"\n" 16/1 "0x%02X,"' $(obj)/wanxlfw.bin | sed 's/0x  ,//g;1s/^/static u8 firmware[]={/;$$s/,$$/\n};\n/' >$(obj)/wanxlfw.inc; \
 	rm -f $(obj)/wanxlfw.bin $(obj)/wanxlfw.o
diff --git a/drivers/net/wan/wanxlfw.S b/drivers/net/wan/wanxlfw.S
index 73aae2b..21565d5 100644
--- a/drivers/net/wan/wanxlfw.S
+++ b/drivers/net/wan/wanxlfw.S
@@ -35,6 +35,7 @@
 */
 
 #include <linux/hdlc.h>
+#include <linux/hdlc/ioctl.h>
 #include "wanxl.h"
 
 /* memory addresses and offsets */
diff --git a/include/uapi/linux/hdlc/ioctl.h b/include/uapi/linux/hdlc/ioctl.h
index 5839723..e5dbbb0 100644
--- a/include/uapi/linux/hdlc/ioctl.h
+++ b/include/uapi/linux/hdlc/ioctl.h
@@ -34,6 +34,8 @@
 #define LMI_CCITT		3 /* ITU-T Annex A */
 #define LMI_CISCO		4 /* The "original" LMI, aka Gang of Four */
 
+#ifndef __ASSEMBLY__
+
 typedef struct { 
 	unsigned int clock_rate; /* bits per second */
 	unsigned int clock_type; /* internal, external, TX-internal etc. */
@@ -78,4 +80,5 @@ typedef struct {
 
 /* PPP doesn't need any info now - supply length = 0 to ioctl */
 
+#endif /* __ASSEMBLY__ */
 #endif /* __HDLC_IOCTL_H__ */

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

* [PATCH 4/4] Make the wanxl firmware array const
  2012-11-07 12:37 [PATCH 1/4] UAPI: Fix compilation of the wanxl firmware blob David Howells
  2012-11-07 12:37 ` [PATCH 2/4] UAPI: (Scripted) Disintegrate include/linux/hdlc David Howells
  2012-11-07 12:37 ` [PATCH 3/4] Fix the wanxl firmware to include missing constants David Howells
@ 2012-11-07 12:37 ` David Howells
  2012-11-09 21:29   ` David Miller
  2012-11-09 21:29 ` [PATCH 1/4] UAPI: Fix compilation of the wanxl firmware blob David Miller
  3 siblings, 1 reply; 8+ messages in thread
From: David Howells @ 2012-11-07 12:37 UTC (permalink / raw)
  To: khc; +Cc: netdev, linux

Make the wanxl firmware array const so that it goes in the read-only section.

Signed-off-by: David Howells <dhowells@redhat.com>
---

 drivers/net/wan/Makefile |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wan/Makefile b/drivers/net/wan/Makefile
index b0a6163..df70248 100644
--- a/drivers/net/wan/Makefile
+++ b/drivers/net/wan/Makefile
@@ -54,7 +54,7 @@ quiet_cmd_build_wanxlfw = BLD FW  $@
       cmd_build_wanxlfw = \
 	$(CPP) -D__ASSEMBLY__ -Wp,-MD,$(depfile) -I$(srctree)/include/uapi $< | $(AS68K) -m68360 -o $(obj)/wanxlfw.o; \
 	$(LD68K) --oformat binary -Ttext 0x1000 $(obj)/wanxlfw.o -o $(obj)/wanxlfw.bin; \
-	hexdump -ve '"\n" 16/1 "0x%02X,"' $(obj)/wanxlfw.bin | sed 's/0x  ,//g;1s/^/static u8 firmware[]={/;$$s/,$$/\n};\n/' >$(obj)/wanxlfw.inc; \
+	hexdump -ve '"\n" 16/1 "0x%02X,"' $(obj)/wanxlfw.bin | sed 's/0x  ,//g;1s/^/static const u8 firmware[]={/;$$s/,$$/\n};\n/' >$(obj)/wanxlfw.inc; \
 	rm -f $(obj)/wanxlfw.bin $(obj)/wanxlfw.o
 
 $(obj)/wanxlfw.inc:	$(src)/wanxlfw.S

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

* Re: [PATCH 1/4] UAPI: Fix compilation of the wanxl firmware blob.
  2012-11-07 12:37 [PATCH 1/4] UAPI: Fix compilation of the wanxl firmware blob David Howells
                   ` (2 preceding siblings ...)
  2012-11-07 12:37 ` [PATCH 4/4] Make the wanxl firmware array const David Howells
@ 2012-11-09 21:29 ` David Miller
  3 siblings, 0 replies; 8+ messages in thread
From: David Miller @ 2012-11-09 21:29 UTC (permalink / raw)
  To: dhowells; +Cc: khc, netdev, linux

From: David Howells <dhowells@redhat.com>
Date: Wed, 07 Nov 2012 12:37:09 +0000

> The wanxl firmware needs access to some bits of UAPI stuff, so the -I flag in
> the Makefile needs adjusting to point at the UAPI headers.
> 
> Signed-off-by: David Howells <dhowells@redhat.com>

Applied to net-next.

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

* Re: [PATCH 2/4] UAPI: (Scripted) Disintegrate include/linux/hdlc
  2012-11-07 12:37 ` [PATCH 2/4] UAPI: (Scripted) Disintegrate include/linux/hdlc David Howells
@ 2012-11-09 21:29   ` David Miller
  0 siblings, 0 replies; 8+ messages in thread
From: David Miller @ 2012-11-09 21:29 UTC (permalink / raw)
  To: dhowells; +Cc: khc, netdev, linux

From: David Howells <dhowells@redhat.com>
Date: Wed, 07 Nov 2012 12:37:17 +0000

> Signed-off-by: David Howells <dhowells@redhat.com>
> Acked-by: Arnd Bergmann <arnd@arndb.de>
> Acked-by: Thomas Gleixner <tglx@linutronix.de>
> Acked-by: Michael Kerrisk <mtk.manpages@gmail.com>
> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> Acked-by: Dave Jones <davej@redhat.com>
> Acked-by: Krzysztof Halasa <khc@pm.waw.pl>

Applied to net-next.

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

* Re: [PATCH 3/4] Fix the wanxl firmware to include missing constants
  2012-11-07 12:37 ` [PATCH 3/4] Fix the wanxl firmware to include missing constants David Howells
@ 2012-11-09 21:29   ` David Miller
  0 siblings, 0 replies; 8+ messages in thread
From: David Miller @ 2012-11-09 21:29 UTC (permalink / raw)
  To: dhowells; +Cc: khc, netdev, linux

From: David Howells <dhowells@redhat.com>
Date: Wed, 07 Nov 2012 12:37:24 +0000

> Fix the wanxl firmware to include missing constants such as PARITY_NONE.  It
> should be #including the linux/hdlc/ioctl.h header.
> 
> To make this work, we also have to guard parts of ioctl.h with !__ASSEMBLY__.
> 
> Signed-off-by: David Howells <dhowells@redhat.com>

Applied to net-next.

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

* Re: [PATCH 4/4] Make the wanxl firmware array const
  2012-11-07 12:37 ` [PATCH 4/4] Make the wanxl firmware array const David Howells
@ 2012-11-09 21:29   ` David Miller
  0 siblings, 0 replies; 8+ messages in thread
From: David Miller @ 2012-11-09 21:29 UTC (permalink / raw)
  To: dhowells; +Cc: khc, netdev, linux

From: David Howells <dhowells@redhat.com>
Date: Wed, 07 Nov 2012 12:37:31 +0000

> Make the wanxl firmware array const so that it goes in the read-only section.
> 
> Signed-off-by: David Howells <dhowells@redhat.com>

Applied to net-next.

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

end of thread, other threads:[~2012-11-09 21:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-07 12:37 [PATCH 1/4] UAPI: Fix compilation of the wanxl firmware blob David Howells
2012-11-07 12:37 ` [PATCH 2/4] UAPI: (Scripted) Disintegrate include/linux/hdlc David Howells
2012-11-09 21:29   ` David Miller
2012-11-07 12:37 ` [PATCH 3/4] Fix the wanxl firmware to include missing constants David Howells
2012-11-09 21:29   ` David Miller
2012-11-07 12:37 ` [PATCH 4/4] Make the wanxl firmware array const David Howells
2012-11-09 21:29   ` David Miller
2012-11-09 21:29 ` [PATCH 1/4] UAPI: Fix compilation of the wanxl firmware blob David Miller

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).