public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] 2.4.3-pre6 - hdlc/dscc4 missing bits
@ 2001-03-21 15:30 Francois Romieu
  2001-03-21 15:50 ` [PATCH] " Jeff Garzik
  0 siblings, 1 reply; 5+ messages in thread
From: Francois Romieu @ 2001-03-21 15:30 UTC (permalink / raw)
  To: linux-kernel; +Cc: torvalds, khc

- hdlc.c requires ARPHRD_CISCO (Cisco HDLC) to compile. This should* 
be ARPHRD_HDLC
- the PCI_VENDOR/DEVICE_xxx for drivers/net/wan/dscc4.c haven't been
included in the pci_ids db
- drivers/net/wan/dscc4.c relies on ARPHRD_RAWHDLC (it's initialized 
as a transparent hdlc driver and I know no ARPHRD_xxx for this)

*the name is misleading as it's only used for Cisco-HDLC (!= HDLC) :o(

diff -u -N --recursive linux-2.4.3-pre6.orig/drivers/net/wan/hdlc.c linux-2.4.3-pre6/drivers/net/wan/hdlc.c
--- linux-2.4.3-pre6.orig/drivers/net/wan/hdlc.c	Wed Mar 21 10:56:18 2001
+++ linux-2.4.3-pre6/drivers/net/wan/hdlc.c	Wed Mar 21 15:11:50 2001
@@ -1230,7 +1230,7 @@
 	case MODE_X25:   dev->type = ARPHRD_X25;   break;
 #endif
 	case MODE_FR:    dev->type = ARPHRD_FRAD;  break;
-	case MODE_CISCO: dev->type = ARPHRD_CISCO; break;
+	case MODE_CISCO: dev->type = ARPHRD_HDLC; break;
 	default:         dev->type = ARPHRD_RAWHDLC;
 	}
 
diff -u -N --recursive linux-2.4.3-pre6.orig/include/linux/if_arp.h linux-2.4.3-pre6/include/linux/if_arp.h
--- linux-2.4.3-pre6.orig/include/linux/if_arp.h	Thu Jan  4 22:51:20 2001
+++ linux-2.4.3-pre6/include/linux/if_arp.h	Wed Mar 21 15:12:23 2001
@@ -53,6 +53,7 @@
 #define ARPHRD_HDLC	513		/* (Cisco) HDLC 		*/
 #define ARPHRD_LAPB	516		/* LAPB				*/
 #define ARPHRD_DDCMP    517		/* Digital's DDCMP protocol     */
+#define ARPHRD_RAWHDLC  518             /* Raw HDLC                     */
 
 #define ARPHRD_TUNNEL	768		/* IPIP tunnel			*/
 #define ARPHRD_TUNNEL6	769		/* IPIP6 tunnel			*/
diff -u -N --recursive linux-2.4.3-pre6.orig/include/linux/pci_ids.h linux-2.4.3-pre6/include/linux/pci_ids.h
--- linux-2.4.3-pre6.orig/include/linux/pci_ids.h	Wed Mar 21 10:56:28 2001
+++ linux-2.4.3-pre6/include/linux/pci_ids.h	Wed Mar 21 14:07:28 2001
@@ -804,6 +804,9 @@
 #define PCI_DEVICE_ID_VIA_8633_1	0xB091
 #define PCI_DEVICE_ID_VIA_8367_1	0xB099
 
+#define PCI_VENDOR_ID_SIEMENS           0x110A
+#define PCI_DEVICE_ID_SIEMENS_DSCC4     0x2102
+
 #define PCI_VENDOR_ID_SMC2		0x1113
 #define PCI_DEVICE_ID_SMC2_1211TX	0x1211
 
-- 
Ueimor

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

* [PATCH] Re: [PATCH] 2.4.3-pre6 - hdlc/dscc4 missing bits
  2001-03-21 15:30 [PATCH] 2.4.3-pre6 - hdlc/dscc4 missing bits Francois Romieu
@ 2001-03-21 15:50 ` Jeff Garzik
  2001-03-21 16:39   ` [PATCH] " Francois Romieu
  0 siblings, 1 reply; 5+ messages in thread
From: Jeff Garzik @ 2001-03-21 15:50 UTC (permalink / raw)
  To: Francois Romieu; +Cc: linux-kernel, torvalds, khc, Alan Cox

[-- Attachment #1: Type: text/plain, Size: 272 bytes --]

You should use this patch instead, from Alan's tree, for updating
include/linux/if_arp.h...
-- 
Jeff Garzik       | May you have warm words on a cold evening,
Building 1024     | a full mooon on a dark night,
MandrakeSoft      | and a smooth road all the way to your door.

[-- Attachment #2: if-arp.patch --]
[-- Type: text/plain, Size: 848 bytes --]

Index: include/linux/if_arp.h
===================================================================
RCS file: /cvsroot/gkernel/linux_2_4/include/linux/if_arp.h,v
retrieving revision 1.1.1.21
diff -u -r1.1.1.21 if_arp.h
--- include/linux/if_arp.h	2001/03/20 12:54:44	1.1.1.21
+++ include/linux/if_arp.h	2001/03/21 15:49:59
@@ -50,9 +50,11 @@
 #define ARPHRD_X25	271		/* CCITT X.25			*/
 #define ARPHRD_HWX25	272		/* Boards with X.25 in firmware	*/
 #define ARPHRD_PPP	512
-#define ARPHRD_HDLC	513		/* (Cisco) HDLC 		*/
+#define ARPHRD_CISCO	513		/* Cisco HDLC	 		*/
+#define ARPHRD_HDLC	ARPHRD_CISCO
 #define ARPHRD_LAPB	516		/* LAPB				*/
 #define ARPHRD_DDCMP    517		/* Digital's DDCMP protocol     */
+#define ARPHRD_RAWHDLC	518		/* Raw HDLC			*/
 
 #define ARPHRD_TUNNEL	768		/* IPIP tunnel			*/
 #define ARPHRD_TUNNEL6	769		/* IPIP6 tunnel			*/

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

* [PATCH] Re: [PATCH] Re: [PATCH] 2.4.3-pre6 - hdlc/dscc4 missing bits
  2001-03-21 15:50 ` [PATCH] " Jeff Garzik
@ 2001-03-21 16:39   ` Francois Romieu
  2001-03-21 17:10     ` Jeff Garzik
  2001-03-21 18:53     ` Krzysztof Halasa
  0 siblings, 2 replies; 5+ messages in thread
From: Francois Romieu @ 2001-03-21 16:39 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: linux-kernel, torvalds, khc, Alan Cox

Jeff Garzik <jgarzik@mandrakesoft.com> écrit :
> You should use this patch instead, from Alan's tree, for updating
> include/linux/if_arp.h...

It adds confusion: do you imagine the poor soul who discovers hdlc in Linux
and sees ARPHRD_CISCO and ARPHRD_HDLC for the same use after some hours
of code-greping (both will be used at the moment if hdlc.c do so) ?
Don't be surprised if he ends using label pointers everywhere. :o)

What about the following (2.5 ?):

diff -u -N --recursive linux-2.4.3-pre6.orig/drivers/net/wan/comx-proto-ppp.c linux-2.4.3-pre6/drivers/net/wan/comx-proto-ppp.c
--- linux-2.4.3-pre6.orig/drivers/net/wan/comx-proto-ppp.c	Wed Mar 21 10:56:18 2001
+++ linux-2.4.3-pre6/drivers/net/wan/comx-proto-ppp.c	Wed Mar 21 14:26:37 2001
@@ -208,7 +208,7 @@
 
 	if(ch->protocol == &hdlc_protocol) {
 		pppdev->sppp.pp_flags |= PP_CISCO;
-		dev->type = ARPHRD_HDLC;
+		dev->type = ARPHRD_CISCO;
 	} else {
 		pppdev->sppp.pp_flags &= ~PP_CISCO;
 		dev->type = ARPHRD_PPP;
diff -u -N --recursive linux-2.4.3-pre6.orig/drivers/net/wan/lmc/lmc_main.c linux-2.4.3-pre6/drivers/net/wan/lmc/lmc_main.c
--- linux-2.4.3-pre6.orig/drivers/net/wan/lmc/lmc_main.c	Wed Mar 21 10:56:18 2001
+++ linux-2.4.3-pre6/drivers/net/wan/lmc/lmc_main.c	Wed Mar 21 14:25:55 2001
@@ -74,7 +74,7 @@
 #include <asm/uaccess.h>
 //#include <asm/spinlock.h>
 #else				/* 2.0 kernel */
-#define ARPHRD_HDLC 513
+#define ARPHRD_CISCO 513
 #endif
 
 #include <linux/module.h>
@@ -900,7 +900,7 @@
     /* Just fill in the entries for the device */
 
     dev->init = lmc_init;
-    dev->type = ARPHRD_HDLC;
+    dev->type = ARPHRD_CISCO;
     dev->hard_start_xmit = lmc_start_xmit;
     dev->open = lmc_open;
     dev->stop = lmc_close;
diff -u -N --recursive linux-2.4.3-pre6.orig/drivers/net/wan/syncppp.c linux-2.4.3-pre6/drivers/net/wan/syncppp.c
--- linux-2.4.3-pre6.orig/drivers/net/wan/syncppp.c	Wed Mar 21 10:56:18 2001
+++ linux-2.4.3-pre6/drivers/net/wan/syncppp.c	Wed Mar 21 14:23:54 2001
@@ -964,7 +964,7 @@
 	{
 		case SPPPIOCCISCO:
 			sp->pp_flags|=PP_CISCO;
-			dev->type = ARPHRD_HDLC;
+			dev->type = ARPHRD_CISCO;
 			break;
 		case SPPPIOCPPP:
 			sp->pp_flags&=~PP_CISCO;
@@ -1031,7 +1031,7 @@
 	dev->hard_header = sppp_hard_header;
 	dev->rebuild_header = sppp_rebuild_header;
 	dev->tx_queue_len = 10;
-	dev->type = ARPHRD_HDLC;
+	dev->type = ARPHRD_CISCO;
 	dev->addr_len = 0;
 	dev->hard_header_len = sizeof(struct ppp_header);
 	dev->mtu = PPP_MTU;
diff -u -N --recursive linux-2.4.3-pre6.orig/drivers/net/wan/z85230.c linux-2.4.3-pre6/drivers/net/wan/z85230.c
--- linux-2.4.3-pre6.orig/drivers/net/wan/z85230.c	Wed Mar 21 10:56:18 2001
+++ linux-2.4.3-pre6/drivers/net/wan/z85230.c	Wed Mar 21 14:24:30 2001
@@ -471,7 +471,7 @@
 			printk(KERN_INFO "%s: DCD raised\n", chan->dev->name);
 			write_zsreg(chan, R3, chan->regs[3]|RxENABLE);
 			if(chan->netdevice &&
-			    ((chan->netdevice->type == ARPHRD_HDLC) ||
+			    ((chan->netdevice->type == ARPHRD_CISCO) ||
 			    (chan->netdevice->type == ARPHRD_PPP)))
 				sppp_reopen(chan->netdevice);
 		}
@@ -590,7 +590,7 @@
 			printk(KERN_INFO "%s: DCD raised\n", chan->dev->name);
 			write_zsreg(chan, R3, chan->regs[3]|RxENABLE);
 			if(chan->netdevice &&
-			    ((chan->netdevice->type == ARPHRD_HDLC) ||
+			    ((chan->netdevice->type == ARPHRD_CISCO) ||
 			    (chan->netdevice->type == ARPHRD_PPP)))
 				sppp_reopen(chan->netdevice);
 		}
diff -u -N --recursive linux-2.4.3-pre6.orig/include/linux/if_arp.h linux-2.4.3-pre6/include/linux/if_arp.h
--- linux-2.4.3-pre6.orig/include/linux/if_arp.h	Thu Jan  4 22:51:20 2001
+++ linux-2.4.3-pre6/include/linux/if_arp.h	Wed Mar 21 14:19:21 2001
@@ -50,9 +50,10 @@
 #define ARPHRD_X25	271		/* CCITT X.25			*/
 #define ARPHRD_HWX25	272		/* Boards with X.25 in firmware	*/
 #define ARPHRD_PPP	512
-#define ARPHRD_HDLC	513		/* (Cisco) HDLC 		*/
+#define ARPHRD_CISCO	513		/* (Cisco) HDLC 		*/
 #define ARPHRD_LAPB	516		/* LAPB				*/
 #define ARPHRD_DDCMP    517		/* Digital's DDCMP protocol     */
+#define ARPHRD_RAWHDLC  518             /* Raw HDLC                     */
 
 #define ARPHRD_TUNNEL	768		/* IPIP tunnel			*/
 #define ARPHRD_TUNNEL6	769		/* IPIP6 tunnel			*/
 
-- 
Ueimor

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

* Re: [PATCH] Re: [PATCH] Re: [PATCH] 2.4.3-pre6 - hdlc/dscc4 missing bits
  2001-03-21 16:39   ` [PATCH] " Francois Romieu
@ 2001-03-21 17:10     ` Jeff Garzik
  2001-03-21 18:53     ` Krzysztof Halasa
  1 sibling, 0 replies; 5+ messages in thread
From: Jeff Garzik @ 2001-03-21 17:10 UTC (permalink / raw)
  To: Francois Romieu; +Cc: linux-kernel, torvalds, khc, Alan Cox

Francois Romieu wrote:
> 
> Jeff Garzik <jgarzik@mandrakesoft.com> écrit :
> > You should use this patch instead, from Alan's tree, for updating
> > include/linux/if_arp.h...
> 
> It adds confusion: do you imagine the poor soul who discovers hdlc in Linux
> and sees ARPHRD_CISCO and ARPHRD_HDLC for the same use after some hours
> of code-greping (both will be used at the moment if hdlc.c do so) ?
> Don't be surprised if he ends using label pointers everywhere. :o)
> 
> What about the following (2.5 ?):

That looks like 2.5 material to me.  Personally I wouldn't want to
remove identifiers during 2.4 stable series..  Changing all 2.4 code to
use one identifier or the other seems reasonable.

Make sure to sync with Alan.  WAN stuff has been occurring in his tree,
and we want to make sure everybody's on the same page..

-- 
Jeff Garzik       | May you have warm words on a cold evening,
Building 1024     | a full mooon on a dark night,
MandrakeSoft      | and a smooth road all the way to your door.

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

* Re: [PATCH] 2.4.3-pre6 - hdlc/dscc4 missing bits
  2001-03-21 16:39   ` [PATCH] " Francois Romieu
  2001-03-21 17:10     ` Jeff Garzik
@ 2001-03-21 18:53     ` Krzysztof Halasa
  1 sibling, 0 replies; 5+ messages in thread
From: Krzysztof Halasa @ 2001-03-21 18:53 UTC (permalink / raw)
  To: Francois Romieu; +Cc: Jeff Garzik, linux-kernel, torvalds, Alan Cox

Francois Romieu <romieu@cogenit.fr> writes:

> What about the following (2.5 ?):
> 
> -		dev->type = ARPHRD_HDLC;
> +		dev->type = ARPHRD_CISCO;

I'll replace ARPHRD_HDLC with ARPHRD_CISCO in the whole (AC) tree when
2.4.x kernel with '#define ARPHRD_CISCO' is out, leaving ARPHRD_HDLC only
in the header file for possible external drivers. It can then be removed
in 2.5.
-- 
Krzysztof Halasa
Network Administrator

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

end of thread, other threads:[~2001-03-21 18:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-03-21 15:30 [PATCH] 2.4.3-pre6 - hdlc/dscc4 missing bits Francois Romieu
2001-03-21 15:50 ` [PATCH] " Jeff Garzik
2001-03-21 16:39   ` [PATCH] " Francois Romieu
2001-03-21 17:10     ` Jeff Garzik
2001-03-21 18:53     ` Krzysztof Halasa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox