Skip to contentSkip to conversation

irtty MODEM_BITS additional fix

PATCH In review Jean Tourrilhes 2 participants 3 messages Sep 26, 2002 – Sep 30, 2002 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 irtty MODEM_BITS additional fix

Hi Marcelo,

Alan did fix the compile of the irtty driver for i386 in
pre8. Unfortunately, there is still many platforms which doesn't compile, including some that I know where IrDA is heavily used (PPC, ARM).
This patch make sure the code works on all platforms. It's
2.4.X, so I guess the code *must* work.

Regards,

Jean

P.S. : Russel : this is an opportunity to fix the ARM platform difference in the proper way. I guess irtty is still used on some ARM platforms (especially with serial dongles).

-----------------------------------------------

drivers/net/irda/irtty.c renamed from drivers/net/irda/irtty.a0.c +13 -0
@@ -46,6 +46,19 @@ static struct tty_ldisc irda_ldisc;
 
 static int qos_mtt_bits = 0x03;      /* 5 ms or more */
 
+/* To workaround some of the difference in the serial driver over various
+ * arch, some people have introduced TIOCM_MODEM_BITS.
+ * Unfortunately, this is not yet defined on all architectures, so
+ * we make sure the code is still usable. - Jean II */
+#ifndef TIOCM_MODEM_BITS
+#warning "Please define TIOCM_MODEM_BITS in termios.h !"
+#ifdef TIOCM_OUT2
+#define TIOCM_MODEM_BITS	TIOCM_OUT2	/* Most architectures */
+#else
+#define TIOCM_MODEM_BITS	0		/* Not defined for ARM */
+#endif
+#endif
+
 /* Network device fuction prototypes */
 static int  irtty_hard_xmit(struct sk_buff *skb, struct net_device *dev);
 static int  irtty_net_init(struct net_device *dev);
#1 lore raw
Quoted 10 lines · Jean Tourrilhes

Hi Marcelo,

Alan did fix the compile of the irtty driver for i386 in
pre8. Unfortunately, there is still many platforms which doesn't compile, including some that I know where IrDA is heavily used (PPC, ARM).
This patch make sure the code works on all platforms. It's
2.4.X, so I guess the code *must* work.

Regards,

I'll remove that once we have all arch's OK.

Thanks

#2 lore raw
Quoted 13 lines · Marcelo Tosatti
Quoted 9 lines · Jean Tourrilhes

Hi Marcelo,

Alan did fix the compile of the irtty driver for i386 in
pre8. Unfortunately, there is still many platforms which doesn't compile, including some that I know where IrDA is heavily used (PPC, ARM).
This patch make sure the code works on all platforms. It's
2.4.X, so I guess the code *must* work.

Quoted 5 lines
Quoted 1 line

Regards,

I'll remove that once we have all arch's OK.

Thanks

I've no problem with that.
Bear in mind that people are using IrDA on platform where you
would not suspect them to be, such as Alpha and PA-Risc, and many obscure platforms, such as SH.
I personally would like the platform people or the serial
people to look into that, because I don't feel qualified.

	Have fun...

	Jean