diff -ur --new-file old/linux/Documentation/Configure.help new/linux/Documentation/Configure.help --- old/linux/Documentation/Configure.help Fri Apr 4 22:49:45 1997 +++ new/linux/Documentation/Configure.help Fri Apr 4 22:50:13 1997 @@ -1296,8 +1296,8 @@ Rolfs TI TNETA1570 CONFIG_ATM_TNETA1570 - Driver for the TNETA1570 155 Mbps ATM adapter, both developed by Rolf - Fiedler at TU Chemnitz, see also + Driver for the TNETA1570 (or UniNET 1570) 155 Mbps ATM adapter, both + (driver and adapter) developed by Rolf Fiedler at TU Chemnitz, see also ftp://ftp.infotech.tu-chemnitz.de/pub/linux-atm Enable extended debugging @@ -1310,8 +1310,8 @@ IDT 77201 (NICStAR) CONFIG_ATM_NICSTAR - Driver for the IDT 77201 (NICStAR) ATM adapter. Written by Matt Welsh - and Stuart Daniel . + Driver for the IDT 77901/77903 ("NICStAR", 77201/77211 SAR) ATM adapters. + Written by Matt Welsh and Stuart Daniel . SCSI support? CONFIG_SCSI diff -ur --new-file old/linux/drivers/atm/eni.c new/linux/drivers/atm/eni.c --- old/linux/drivers/atm/eni.c Fri Apr 4 22:49:45 1997 +++ new/linux/drivers/atm/eni.c Fri Apr 4 22:50:13 1997 @@ -17,6 +17,7 @@ #include /* for xtime */ #include #include +#include #include #include #include diff -ur --new-file old/linux/drivers/atm/eni.h new/linux/drivers/atm/eni.h --- old/linux/drivers/atm/eni.h Fri Apr 4 22:49:45 1997 +++ new/linux/drivers/atm/eni.h Fri Apr 4 22:50:13 1997 @@ -1,19 +1,11 @@ /* drivers/atm/eni.h - Efficient Networks ENI155P device driver declarations */ -/* Written 1995,1996 by Werner Almesberger, EPFL LRC */ +/* Written 1995-1997 by Werner Almesberger, EPFL LRC */ #ifndef DRIVER_ATM_ENI_H #define DRIVER_ATM_ENI_H -#include - -#define ENI_MEMDUMP _IOW('a',ATMIOC_SARPRV,struct atmif_sioc) - /* printk memory map */ - - -#ifdef __KERNEL__ - #include #include #include @@ -108,7 +100,5 @@ #define ENI_DEV(d) ((struct eni_dev *) (d)->dev_data) #define ENI_VCC(d) ((struct eni_vcc *) (d)->dev_data) - -#endif /* __KERNEL__ */ #endif diff -ur --new-file old/linux/drivers/atm/zatm.c new/linux/drivers/atm/zatm.c --- old/linux/drivers/atm/zatm.c Fri Apr 4 22:49:45 1997 +++ new/linux/drivers/atm/zatm.c Fri Apr 4 22:50:15 1997 @@ -18,6 +18,7 @@ #include #include /* for request_region */ #include +#include #include #include #include @@ -206,8 +207,8 @@ * ... */ skb->free = 1; - skb->data = (void *) ((((unsigned long) skb->data+align+ - offset-1) & ~(align-1))-offset); + skb_reserve(skb,(unsigned char *) ((((unsigned long) skb->data+ + align+offset-1) & ~(align-1))-offset)-skb->data); ((void **) skb->data)[0] = skb->data+HEAD_SIZE; ((void **) skb->data)[1] = NULL; ((void **) skb->data)[2] = skb; diff -ur --new-file old/linux/drivers/atm/zatm.h new/linux/drivers/atm/zatm.h --- old/linux/drivers/atm/zatm.h Fri Apr 4 22:49:45 1997 +++ new/linux/drivers/atm/zatm.h Fri Apr 4 22:50:15 1997 @@ -1,58 +1,11 @@ /* drivers/atm/zatm.h - ZeitNet ZN122x device driver declarations */ -/* Written 1995,1996 by Werner Almesberger, EPFL LRC */ +/* Written 1995-1997 by Werner Almesberger, EPFL LRC */ #ifndef DRIVER_ATM_ZATM_H #define DRIVER_ATM_ZATM_H -/* - * Note: non-kernel programs including this file must also include - * sys/types.h for struct timeval - */ - -#include - -#define ZATM_GETPOOL _IOW('a',ATMIOC_SARPRV+1,struct atmif_sioc) - /* get pool statistics */ -#define ZATM_GETPOOLZ _IOW('a',ATMIOC_SARPRV+2,struct atmif_sioc) - /* get statistics and zero */ -#define ZATM_SETPOOL _IOW('a',ATMIOC_SARPRV+3,struct atmif_sioc) - /* set pool parameters */ -#define ZATM_GETTHIST _IOW('a',ATMIOC_SARPRV+4,struct atmif_sioc) - /* get a history of timer - differences */ - -struct zatm_pool_info { - int ref_count; /* free buffer pool usage counters */ - int low_water,high_water; /* refill parameters */ - int rqa_count,rqu_count; /* queue condition counters */ - int offset,next_off; /* alignment optimizations: offset */ - int next_cnt,next_thres; /* repetition counter and threshold */ -}; - -struct zatm_pool_req { - int pool_num; /* pool number */ - struct zatm_pool_info info; /* actual information */ -}; - -struct zatm_thist { - struct timeval real; /* real (wall-clock) time */ - struct timeval expected; /* expected real time */ -}; - - -#define ZATM_OAM_POOL 0 /* free buffer pool for OAM cells */ -#define ZATM_AAL0_POOL 1 /* free buffer pool for AAL0 cells */ -#define ZATM_AAL5_POOL_BASE 2 /* first AAL5 free buffer pool */ -#define ZATM_LAST_POOL ZATM_AAL5_POOL_BASE+10 /* max. 64 kB */ - -#define ZATM_TIMER_HISTORY_SIZE 16 /* number of timer adjustments to - record; must be 2^n */ - - -#ifdef __KERNEL__ - #include #include #include @@ -168,5 +121,4 @@ #define ZATM_DEV(d) ((struct zatm_dev *) (d)->dev_data) #define ZATM_VCC(d) ((struct zatm_vcc *) (d)->dev_data) -#endif __KERNEL__ #endif diff -ur --new-file old/linux/include/linux/atm_eni.h new/linux/include/linux/atm_eni.h --- old/linux/include/linux/atm_eni.h Thu Jan 1 01:00:00 1970 +++ new/linux/include/linux/atm_eni.h Fri Apr 4 22:50:18 1997 @@ -0,0 +1,15 @@ +/* atm_eni.h - Driver-specific declarations of the ENI driver (for use by + driver-specific utilities) */ + +/* Written 1995-1997 by Werner Almesberger, EPFL LRC */ + + +#ifndef LINUX_ATM_ENI_H +#define LINUX_ATM_ENI_H + +#include + +#define ENI_MEMDUMP _IOW('a',ATMIOC_SARPRV,struct atmif_sioc) + /* printk memory map */ + +#endif diff -ur --new-file old/linux/include/linux/atm_zatm.h new/linux/include/linux/atm_zatm.h --- old/linux/include/linux/atm_zatm.h Thu Jan 1 01:00:00 1970 +++ new/linux/include/linux/atm_zatm.h Fri Apr 4 22:50:18 1997 @@ -0,0 +1,54 @@ +/* atm_zatm.h - Driver-specific declarations of the ZATM driver (for use by + driver-specific utilities) */ + +/* Written 1995-1997 by Werner Almesberger, EPFL LRC */ + + +#ifndef LINUX_ATM_ZATM_H +#define LINUX_ATM_ZATM_H + +/* + * Note: non-kernel programs including this file must also include + * sys/types.h for struct timeval + */ + +#include + +#define ZATM_GETPOOL _IOW('a',ATMIOC_SARPRV+1,struct atmif_sioc) + /* get pool statistics */ +#define ZATM_GETPOOLZ _IOW('a',ATMIOC_SARPRV+2,struct atmif_sioc) + /* get statistics and zero */ +#define ZATM_SETPOOL _IOW('a',ATMIOC_SARPRV+3,struct atmif_sioc) + /* set pool parameters */ +#define ZATM_GETTHIST _IOW('a',ATMIOC_SARPRV+4,struct atmif_sioc) + /* get a history of timer + differences */ + +struct zatm_pool_info { + int ref_count; /* free buffer pool usage counters */ + int low_water,high_water; /* refill parameters */ + int rqa_count,rqu_count; /* queue condition counters */ + int offset,next_off; /* alignment optimizations: offset */ + int next_cnt,next_thres; /* repetition counter and threshold */ +}; + +struct zatm_pool_req { + int pool_num; /* pool number */ + struct zatm_pool_info info; /* actual information */ +}; + +struct zatm_thist { + struct timeval real; /* real (wall-clock) time */ + struct timeval expected; /* expected real time */ +}; + + +#define ZATM_OAM_POOL 0 /* free buffer pool for OAM cells */ +#define ZATM_AAL0_POOL 1 /* free buffer pool for AAL0 cells */ +#define ZATM_AAL5_POOL_BASE 2 /* first AAL5 free buffer pool */ +#define ZATM_LAST_POOL ZATM_AAL5_POOL_BASE+10 /* max. 64 kB */ + +#define ZATM_TIMER_HISTORY_SIZE 16 /* number of timer adjustments to + record; must be 2^n */ + +#endif diff -ur --new-file old/linux/include/linux/atmdev.h new/linux/include/linux/atmdev.h --- old/linux/include/linux/atmdev.h Fri Apr 4 22:49:45 1997 +++ new/linux/include/linux/atmdev.h Fri Apr 4 22:50:17 1997 @@ -128,7 +128,6 @@ #define ATM_VF_SCRX ATM_SC_RX /* 1024; allow single-copy in the RX dir. */ #define ATM_VF_SCTX ATM_SC_TX /* 2048; allow single-copy in the TX dir. */ - struct atm_vcc { unsigned short flags; /* VCC flags (ATM_VF_*) */ unsigned char family; /* address family; 0 if unused */ diff -ur --new-file old/linux/net/atm/atmarp.c new/linux/net/atm/atmarp.c --- old/linux/net/atm/atmarp.c Fri Apr 4 22:49:48 1997 +++ new/linux/net/atm/atmarp.c Fri Apr 4 22:50:17 1997 @@ -18,17 +18,11 @@ #include #include /* for net/route.h */ #include /* for struct sockaddr_in */ +#include /* for IFF_UP */ #include /* for struct rtable and ip_rt_route */ #include /* for HZ */ #include /* for htons etc. */ - - -/* - * WARNING: This code will eventually become full ATMARP support as defined in - * RFC1577 (actually, the plan is to move on quickly to RFC1577+), but - * right now it's certainly full of bugs and severe design errors. - * Don't use it as a reference for anything. - */ +#include /* save/restore_flags */ #include "common.h" @@ -127,13 +121,13 @@ } -static void remove(struct atmarp_entry *entry) /* @@@ ugly ! */ +static void remove(struct atmarp_entry *entry) { struct atmarp_entry **walk; for (walk = &PRIV(entry->dev)->table; *walk; walk = &(*walk)->next) if (*walk == entry) { - *walk = entry->next; + *walk = entry->next; /* atomic */ return; } printk(KERN_CRIT "ATMARP: remove failed (0x%08lx)\n", @@ -170,7 +164,10 @@ struct device *itf; struct atmarp_entry **entry; unsigned long expire; + unsigned long flags; + save_flags(flags); + cli(); idle_timer.expires = UINT_MAX; for (itf = clip_devs; itf; itf = PRIV(itf)->next) { entry = &PRIV(itf)->table; @@ -191,6 +188,7 @@ idle_timer.expires = jiffies+CLIP_CHECK_INTERVAL*HZ; del_timer(&idle_timer); add_timer(&idle_timer); + restore_flags(flags); } @@ -304,6 +302,9 @@ entry->next = PRIV(dev)->table; PRIV(dev)->table = entry; idle_timer_check(0); + /* this new entry may have the soonest timeout, so we need + to re-compute the expiration interval. Expired entries + may be timed out as a side-effect. */ return 0; } if (!entry->vcc || !(entry->vcc->flags & ATM_VF_READY)) { @@ -358,6 +359,7 @@ struct atmarp_entry **walk,**next,*succ; struct rtable *route; struct sk_buff *queued; + unsigned long flags; DPRINTK("SETENTRY 0x%lx\n",ip); if (vcc->push != atm_push_ip) { @@ -385,6 +387,8 @@ return 0; } DPRINTK("setentry: add\n"); + save_flags(flags); + cli(); queued = NULL; for (walk = &PRIV(AE(vcc)->dev)->table; *walk; walk = next) { next = &(*walk)->next; @@ -397,18 +401,23 @@ printk(KERN_CRIT "atmarp: bad news - " "more than one skb queued\n"); queued = (*walk)->queued; + /* + * We don't need to reset ->queued to NULL now, + * because in all cases, where ->queued is used, + * ->vcc is tested first. + */ } succ = (*walk)->next; kfree(*walk); *walk = succ; next = walk; - continue; } } DPRINTK("(adding)\n"); AE(vcc)->ip = ip; - AE(vcc)->next = PRIV(AE(vcc)->dev)->table; + AE(vcc)->next = PRIV(AE(vcc)->dev)->table; PRIV(AE(vcc)->dev)->table = AE(vcc); + restore_flags(flags); if (queued) clip_xmit(queued,route->rt_dev); return 0; } @@ -589,6 +598,8 @@ int atm_init_atmarp(struct atm_vcc *vcc) { + struct device *dev; + if (atmarpd) return -EADDRINUSE; if (start_timer) { start_timer = 0; @@ -606,5 +617,8 @@ vcc->pop = NULL; /* crash */ vcc->push_oam = NULL; /* crash */ register_netdevice_notifier(&clip_dev_notifier); + for (dev = clip_devs; dev; dev = PRIV(dev)->next) + if (dev->flags & IFF_UP) + (void) send_demon(act_up,PRIV(dev)->number,0,NULL,0); return 0; } diff -ur --new-file old/linux/net/atm/ipcommon.c new/linux/net/atm/ipcommon.c --- old/linux/net/atm/ipcommon.c Fri Apr 4 22:49:48 1997 +++ new/linux/net/atm/ipcommon.c Fri Apr 4 22:50:17 1997 @@ -78,9 +78,9 @@ GFP_ATOMIC); if (skb) { DPRINTK("data before: 0x%p\n",skb->data); - skb->data = (unsigned char *) (((unsigned long) skb-> - data+header_size+PAGE_SIZE-1) & ~(PAGE_SIZE-1))- - header_size; + skb_reserve(skb,(unsigned char *) (((unsigned long) + skb->data+header_size+PAGE_SIZE-1) & + ~(PAGE_SIZE-1))-header_size-skb->data); DPRINTK("data after: 0x%p\n",skb->data); } } diff -ur --new-file old/linux/net/atm/raw.c new/linux/net/atm/raw.c --- old/linux/net/atm/raw.c Fri Apr 4 22:49:49 1997 +++ new/linux/net/atm/raw.c Fri Apr 4 22:50:17 1997 @@ -77,9 +77,9 @@ skb = alloc_skb(((pdu_size+3) & ~3)+PAGE_SIZE-1, GFP_ATOMIC); if (skb) { - skb->data = (unsigned char *) + skb_reserve(skb,(unsigned char *) (((unsigned long) skb->data+PAGE_SIZE-1) & - ~(PAGE_SIZE-1)); + ~(PAGE_SIZE-1))-skb->data); DPRINTK("PEEK: data at 0x%p\n",skb->data); return skb; } diff -ur --new-file old/linux/net/ipv4/tcp_input.c new/linux/net/ipv4/tcp_input.c --- old/linux/net/ipv4/tcp_input.c Fri Apr 4 22:49:49 1997 +++ new/linux/net/ipv4/tcp_input.c Fri Apr 4 22:50:18 1997 @@ -578,8 +578,9 @@ if (sk->user_mss) newsk->mtu = sk->user_mss; else if (rt) - newsk->mtu = sk->ip_route_cache->rt_mtu - sizeof(struct iphdr) - - sizeof(struct tcphdr); /* changed for Arequipa's MSS hack */ + newsk->mtu = newsk->ip_route_cache->rt_mtu - + sizeof(struct iphdr) - sizeof(struct tcphdr); + /* changed for Arequipa's MSS hack */ else newsk->mtu = 576 - sizeof(struct iphdr) - sizeof(struct tcphdr); .