diff -ur --new-file old/atm/BUGS new/atm/BUGS --- old/atm/BUGS Thu Oct 1 21:59:54 1998 +++ new/atm/BUGS Mon Oct 5 10:01:23 1998 @@ -1,4 +1,4 @@ -Known bugs and restrictions in version 0.45 +Known bugs and restrictions in version 0.46 =========================================== - 2.1.117 kernel may not compile properly with sound enabled @@ -9,7 +9,6 @@ - MPOA may fail on RedHat 5.x with "mpcd: changed_fds = ...", due to what seems to be a bug in RedHat's glibc - CLIP interfaces must not be reconfigured while "up" - - the "new" atmsigd leaks memory when tracing - swc show only displays manually configured VCs - invoking a queuing discipline that overwrites skb->cb from within sch_atm will yield unpredictable results if CONFIG_ATM_SKB is enabled diff -ur --new-file old/atm/CHANGES new/atm/CHANGES --- old/atm/CHANGES Thu Oct 1 21:46:57 1998 +++ new/atm/CHANGES Mon Oct 5 19:21:51 1998 @@ -1,3 +1,34 @@ +Version 0.45 to 0.46 (5-OCT-1998) +==================== + +Bug fixes +--------- + + - ENI and ZATM driver used to read IRQ directly from PCI configuration, + bypassing any fixups (reported by Richard Gooch) + - atmsigd.new: removed "Known bug" memory leak (when tracing) + - led/lec_ctrl.c: signalling bug fixed, max_sdu now has correct value instead + of 1 (by Heikki Vatiainen, reported by Josh Baratz + and Wolfgang Platzer ) + - lots of MPOA bug fixes and other changes, see atm/mpoa/CHANGELOG (by Heikki + Vatiainen) + - atmsigd reported "Q.2931.1" when configured to support Q.2963.1 + +New features +------------ + + - atmsigd.new now supports run-time configuration of the signaling protocol + version (via atmsigd.conf) + +Other changes +------------- + + - added 16W bursts to ENI burst size configuration (NB: 16W may actually be + *slower* than 8W) + - lec_ctrl.c: zeppelin now uses LE_REGISTER protocol when TLVs are associated + with client's MAC address (by Heikki Vatiainen) + + Version 0.44 to 0.45 (1-OCT-1998) ==================== diff -ur --new-file old/atm/Makefile new/atm/Makefile --- old/atm/Makefile Thu Aug 20 23:19:56 1998 +++ new/atm/Makefile Mon Oct 5 17:09:30 1998 @@ -3,7 +3,7 @@ # "maint" must appear after "qgen" DIRS=lib test debug qgen saal sigd maint arpd ilmid aqd man led lane mpoad \ - switch sigd.new # tcd extra + switch sigd.new # extra all: for n in $(DIRS); do $(MAKE) -C $$n || exit; done diff -ur --new-file old/atm/README new/atm/README --- old/atm/README Thu Oct 1 19:57:50 1998 +++ new/atm/README Mon Oct 5 09:39:15 1998 @@ -1,4 +1,4 @@ -ATM on Linux, release 0.45 (alpha) by Werner Almesberger, EPFL ICA +ATM on Linux, release 0.46 (alpha) by Werner Almesberger, EPFL ICA ============================================== Werner.Almesberger@epfl.ch This is experimental software. There are known major bugs and certainly diff -ur --new-file old/atm/Rules.make new/atm/Rules.make --- old/atm/Rules.make Thu Oct 1 20:05:21 1998 +++ new/atm/Rules.make Mon Oct 5 19:23:40 1998 @@ -19,7 +19,12 @@ # specified in Q.2963.1 with # # STANDARDS=-DUNI40 -DQ2963_1 -# +# +# When using atmsigd.new, the UNI version is configured at run time. Enable +# this with (note that this probably breaks the old atmsigd) +# +# STANDARDS=-DDYNAMIC_UNI +# # If you're using a Cisco LS100 or LS7010 switch, you should add the following # line to work around a bug in their point-to-multipoint signaling (it got # confused when receiving a CALL PROCEEDING, so we don't send it, which of diff -ur --new-file old/atm/USAGE new/atm/USAGE --- old/atm/USAGE Thu Oct 1 22:03:40 1998 +++ new/atm/USAGE Mon Oct 5 19:23:08 1998 @@ -1,4 +1,4 @@ -Usage instructions - ATM on Linux, release 0.45 +Usage instructions - ATM on Linux, release 0.46 ------------------------------------------------- For updates of ATM on Linux, please check the Web page at @@ -17,7 +17,7 @@ In order to install this package, you need - the package itself - ftp://lrcftp.epfl.ch/pub/linux/atm/dist/atm-0.45.tar.gz + ftp://lrcftp.epfl.ch/pub/linux/atm/dist/atm-0.46.tar.gz - the Linux kernel, version 2.1.117, e.g. from ftp://ftp.kernel.org/pub/linux/kernel/v2.1/linux-2.1.117.tar.gz - Perl, version 4 or 5 @@ -33,7 +33,7 @@ all the files listed above there. Then extract the ATM on Linux distribution: -tar xfz atm-0.45.tar.gz +tar xfz atm-0.46.tar.gz and the kernel source: @@ -93,9 +93,11 @@ Efficient Networks ENI155P (CONFIG_ATM_ENI) Enable extended debugging (CONFIG_ATM_ENI_DEBUG) Fine-tune burst settings (CONFIG_ATM_ENI_TUNE_BURST) + Enable 16W TX bursts (discouraged) (CONFIG_ATM_ENI_BURST_TX_16W) Enable 8W TX bursts (recommended) (CONFIG_ATM_ENI_BURST_TX_8W) Enable 4W TX bursts (optional) (CONFIG_ATM_ENI_BURST_TX_4W) Enable 2W TX bursts (optional) (CONFIG_ATM_ENI_BURST_TX_2W) + Enable 16W RX bursts (discouraged) (CONFIG_ATM_ENI_BURST_RX_16W) Enable 8W RX bursts (discouraged) (CONFIG_ATM_ENI_BURST_RX_8W) Enable 4W RX bursts (recommended) (CONFIG_ATM_ENI_BURST_RX_4W) Enable 2W RX bursts (optional) (CONFIG_ATM_ENI_BURST_RX_2W) diff -ur --new-file old/atm/VERSION new/atm/VERSION --- old/atm/VERSION Thu Oct 1 20:09:08 1998 +++ new/atm/VERSION Mon Oct 5 15:39:50 1998 @@ -1 +1 @@ -0.45 +0.46 diff -ur --new-file old/atm/atm.patch new/atm/atm.patch --- old/atm/atm.patch Thu Oct 1 22:19:49 1998 +++ new/atm/atm.patch Mon Oct 5 19:22:26 1998 @@ -20,8 +20,8 @@ if [ -f FS_MODULES ]; then inst_mod FS_MODULES fs; fi; \ if [ -f NLS_MODULES ]; then inst_mod NLS_MODULES fs; fi; \ --- ref/Documentation/Configure.help Wed Aug 19 23:37:58 1998 -+++ work/Documentation/Configure.help Thu Oct 1 17:21:27 1998 -@@ -3166,6 +3166,150 @@ ++++ work/Documentation/Configure.help Mon Oct 5 11:48:14 1998 +@@ -3166,6 +3166,164 @@ This is a backward compatibility option, choose Y for now. This option will be removed soon. @@ -107,6 +107,15 @@ + throughput is lower than when using only the largest available burst + size. + ++ Also, sometimes larger bursts lead to lower throughput, e.g. on an ++ Intel 440FX board, a drop from 135 Mbps to 103 Mbps was observed when ++ going from 8W to 16W bursts. ++ ++Enable 16W TX bursts (discouraged) ++CONFIG_ATM_ENI_BURST_TX_16W ++ Burst sixteed words at once in the send direction. This may work with ++ recent PCI chipsets, but is known to fail with older chipsets. ++ +Enable 8W TX bursts (recommended) +CONFIG_ATM_ENI_BURST_TX_8W + Burst eight words at once in the send direction. This is the default @@ -124,6 +133,11 @@ + if you have disabled 4W and 8W bursts. Enabling 2W if 4W or 8W are also + set may or may not improve throughput. + ++Enable 16W RX bursts (discouraged) ++CONFIG_ATM_ENI_BURST_RX_16W ++ Burst sixteen words at once in the receive direction. This may work with ++ recent PCI chipsets, but is known to fail with older chipsets. ++ +Enable 8W RX bursts (discouraged) +CONFIG_ATM_ENI_BURST_RX_8W + Burst eight words at once in the receive direction. This may work with @@ -227,8 +241,8 @@ ifeq ($(CONFIG_AP1000),y) --- /dev/null Tue Jan 1 05:00:00 1980 -+++ work/drivers/atm/Config.in Mon Sep 28 16:51:29 1998 -@@ -0,0 +1,32 @@ ++++ work/drivers/atm/Config.in Mon Oct 5 10:36:52 1998 +@@ -0,0 +1,34 @@ +# +# ATM device configuration +# @@ -242,9 +256,11 @@ + bool ' Enable extended debugging' CONFIG_ATM_ENI_DEBUG n + bool ' Fine-tune burst settings' CONFIG_ATM_ENI_TUNE_BURST n + if [ "$CONFIG_ATM_ENI_TUNE_BURST" = "y" ]; then ++ bool ' Enable 16W TX bursts (discouraged)' CONFIG_ATM_ENI_BURST_TX_16W n + bool ' Enable 8W TX bursts (recommended)' CONFIG_ATM_ENI_BURST_TX_8W y + bool ' Enable 4W TX bursts (optional)' CONFIG_ATM_ENI_BURST_TX_4W n + bool ' Enable 2W TX bursts (optional)' CONFIG_ATM_ENI_BURST_TX_2W n ++ bool ' Enable 16W RX bursts (discouraged)' CONFIG_ATM_ENI_BURST_RX_16W n + bool ' Enable 8W RX bursts (discouraged)' CONFIG_ATM_ENI_BURST_RX_8W n + bool ' Enable 4W RX bursts (recommended)' CONFIG_ATM_ENI_BURST_RX_4W y + bool ' Enable 2W RX bursts (optional)' CONFIG_ATM_ENI_BURST_RX_2W n @@ -715,8 +731,8 @@ +#endif + --- /dev/null Tue Jan 1 05:00:00 1980 -+++ work/drivers/atm/eni.c Thu Oct 1 23:22:02 1998 -@@ -0,0 +1,2187 @@ ++++ work/drivers/atm/eni.c Mon Oct 5 12:04:10 1998 +@@ -0,0 +1,2250 @@ +/* drivers/atm/eni.c - Efficient Networks ENI155P device driver */ + +/* Written 1995-1998 by Werner Almesberger, EPFL LRC/ICA */ @@ -1102,6 +1118,16 @@ + paddr += init << 2; + words -= init; + } ++#ifdef CONFIG_ATM_ENI_BURST_RX_16W /* may work with some PCI chipsets ... */ ++ if (words & ~15) { ++ dma[j++] = MID_DT_16W | ((words >> 4) << ++ MID_DMA_COUNT_SHIFT) | (vcc->vci << ++ MID_DMA_VCI_SHIFT); ++ dma[j++] = virt_to_bus((void *) paddr); ++ paddr += (words & ~15) << 2; ++ words &= 15; ++ } ++#endif +#ifdef CONFIG_ATM_ENI_BURST_RX_8W /* works only with *some* PCI chipsets ... */ + if (words & ~7) { + dma[j++] = MID_DT_8W | ((words >> 3) << @@ -1122,7 +1148,7 @@ + words &= 3; + } +#endif -+#ifdef CONFIG_ATM_ENI_BURST_RX_2W /* probably useless if RX_4W or RX_8W */ ++#ifdef CONFIG_ATM_ENI_BURST_RX_2W /* probably useless if RX_4W, RX_8W, ... */ + if (words & ~1) { + dma[j++] = MID_DT_2W | ((words >> 1) << + MID_DMA_COUNT_SHIFT) | (vcc->vci << @@ -1645,6 +1671,17 @@ + paddr += init << 2; + words -= init; + } ++#ifdef CONFIG_ATM_ENI_BURST_TX_16W /* may work with some PCI chipsets ... */ ++ if (words & ~15) { ++ DPRINTK("put_dma: %lx DMA: %d*16/%d words\n",paddr,words >> 4, ++ words); ++ dma[(*j)++] = MID_DT_16W | ((words >> 4) << MID_DMA_COUNT_SHIFT) ++ | (chan << MID_DMA_CHAN_SHIFT); ++ dma[(*j)++] = virt_to_bus((void *) paddr); ++ paddr += (words & ~15) << 2; ++ words &= 15; ++ } ++#endif +#ifdef CONFIG_ATM_ENI_BURST_TX_8W /* recommended */ + if (words & ~7) { + DPRINTK("put_dma: %lx DMA: %d*8/%d words\n",paddr,words >> 3, @@ -1656,7 +1693,7 @@ + words &= 7; + } +#endif -+#ifdef CONFIG_ATM_ENI_BURST_TX_4W /* probably useless if TX_8W */ ++#ifdef CONFIG_ATM_ENI_BURST_TX_4W /* probably useless if TX_8W or TX_16W */ + if (words & ~3) { + DPRINTK("put_dma: %lx DMA: %d*4/%d words\n",paddr,words >> 2, + words); @@ -1667,7 +1704,7 @@ + words &= 3; + } +#endif -+#ifdef CONFIG_ATM_ENI_BURST_TX_2W /* probably useless if TX_4W or TX_8W */ ++#ifdef CONFIG_ATM_ENI_BURST_TX_2W /* probably useless if TX_4W, TX_8W, ... */ + if (words & ~1) { + DPRINTK("put_dma: %lx DMA: %d*2/%d words\n",paddr,words >> 1, + words); @@ -2339,8 +2376,8 @@ +{ + struct midway_eprom *eprom; + struct eni_dev *eni_dev; ++ struct pci_dev *pci_dev; + unsigned int real_base,base; -+ unsigned short command; + unsigned char revision; + int error,i,last; + @@ -2348,18 +2385,16 @@ + dev->ci_range.vpi_bits = 0; + dev->ci_range.vci_bits = NR_VCI_LD; + eni_dev = ENI_DEV(dev); -+ if ((error = pci_read_config_word(eni_dev->pci_dev,PCI_COMMAND, -+ &command)) || (error = pci_read_config_dword(eni_dev->pci_dev, -+ PCI_BASE_ADDRESS_0,&real_base)) || -+ (error = pci_read_config_byte(eni_dev->pci_dev,PCI_INTERRUPT_LINE, -+ &eni_dev->irq)) || (error = pci_read_config_byte(eni_dev->pci_dev, -+ PCI_REVISION_ID,&revision))) { ++ pci_dev = eni_dev->pci_dev; ++ real_base = pci_dev->base_address[0] & MEM_VALID; /* strip flags */ ++ eni_dev->irq = pci_dev->irq; ++ error = pci_read_config_byte(pci_dev,PCI_REVISION_ID,&revision); ++ if (error) { + printk(KERN_ERR DEV_LABEL "(itf %d): init error 0x%02x\n", + dev->number,error); + return -EINVAL; + } -+ real_base &= MEM_VALID; /* strip flags */ -+ if ((error = pci_write_config_word(eni_dev->pci_dev,PCI_COMMAND, ++ if ((error = pci_write_config_word(pci_dev,PCI_COMMAND, + PCI_COMMAND_MEMORY | + (eni_dev->asic ? PCI_COMMAND_PARITY | PCI_COMMAND_SERR : 0)))) { + printk(KERN_ERR DEV_LABEL "(itf %d): can't enable memory " @@ -2769,6 +2804,50 @@ + return sprintf(page,DEV_LABEL "(itf %d) signal %s, %dkB, " + "%d cps remaining\n",dev->number,signal[(int) dev->signal], + eni_dev->mem >> 10,eni_dev->tx_bw); ++ left--; ++ if (!left) ++ return sprintf(page,"Bursts: TX" ++#if !defined(CONFIG_ATM_ENI_BURST_TX_16W) && \ ++ !defined(CONFIG_ATM_ENI_BURST_TX_8W) && \ ++ !defined(CONFIG_ATM_ENI_BURST_TX_4W) && \ ++ !defined(CONFIG_ATM_ENI_BURST_TX_2W) ++ " none" ++#endif ++#ifdef CONFIG_ATM_ENI_BURST_TX_16W ++ " 16W" ++#endif ++#ifdef CONFIG_ATM_ENI_BURST_TX_8W ++ " 8W" ++#endif ++#ifdef CONFIG_ATM_ENI_BURST_TX_4W ++ " 4W" ++#endif ++#ifdef CONFIG_ATM_ENI_BURST_TX_2W ++ " 2W" ++#endif ++ ", RX" ++#if !defined(CONFIG_ATM_ENI_BURST_RX_16W) && \ ++ !defined(CONFIG_ATM_ENI_BURST_RX_8W) && \ ++ !defined(CONFIG_ATM_ENI_BURST_RX_4W) && \ ++ !defined(CONFIG_ATM_ENI_BURST_RX_2W) ++ " none" ++#endif ++#ifdef CONFIG_ATM_ENI_BURST_RX_16W ++ " 16W" ++#endif ++#ifdef CONFIG_ATM_ENI_BURST_RX_8W ++ " 8W" ++#endif ++#ifdef CONFIG_ATM_ENI_BURST_RX_4W ++ " 4W" ++#endif ++#ifdef CONFIG_ATM_ENI_BURST_RX_2W ++ " 2W" ++#endif ++#ifndef CONFIG_ATM_ENI_TUNE_BURST ++ " (default)" ++#endif ++ "\n"); + for (i = 0; i < NR_CHAN; i++) { + struct eni_tx *tx = eni_dev->tx+i; + @@ -11346,8 +11425,8 @@ + +#endif --- /dev/null Tue Jan 1 05:00:00 1980 -+++ work/drivers/atm/zatm.c Thu Oct 1 17:01:40 1998 -@@ -0,0 +1,1877 @@ ++++ work/drivers/atm/zatm.c Mon Oct 5 11:53:41 1998 +@@ -0,0 +1,1875 @@ +/* drivers/atm/zatm.c - ZeitNet ZN122x device driver */ + +/* Written 1995-1998 by Werner Almesberger, EPFL LRC/ICA */ @@ -12726,6 +12805,7 @@ +__initfunc(static int zatm_init(struct atm_dev *dev)) +{ + struct zatm_dev *zatm_dev; ++ struct pci_dev *pci_dev; + unsigned short command; + unsigned char revision; + int error,i,last; @@ -12733,19 +12813,16 @@ + + DPRINTK(">zatm_init\n"); + zatm_dev = ZATM_DEV(dev); -+ if ((error = pci_read_config_word(zatm_dev->pci_dev,PCI_COMMAND, -+ &command)) || (error = pci_read_config_dword(zatm_dev->pci_dev, -+ PCI_BASE_ADDRESS_0,&zatm_dev->base)) || -+ (error = pci_read_config_byte(zatm_dev->pci_dev,PCI_INTERRUPT_LINE, -+ &zatm_dev->irq)) || -+ (error = pci_read_config_byte(zatm_dev->pci_dev,PCI_REVISION_ID, -+ &revision))) { ++ pci_dev = zatm_dev->pci_dev; ++ zatm_dev->base = pci_dev->base_address[0] & PCI_BASE_ADDRESS_IO_MASK; ++ zatm_dev->irq = pci_dev->irq; ++ if ((error = pci_read_config_word(pci_dev,PCI_COMMAND,&command)) || ++ (error = pci_read_config_byte(pci_dev,PCI_REVISION_ID,&revision))) { + printk(KERN_ERR DEV_LABEL "(itf %d): init error 0x%02x\n", + dev->number,error); + return -EINVAL; + } -+ zatm_dev->base &= PCI_BASE_ADDRESS_IO_MASK; -+ if ((error = pci_write_config_word(zatm_dev->pci_dev,PCI_COMMAND, ++ if ((error = pci_write_config_word(pci_dev,PCI_COMMAND, + command | PCI_COMMAND_IO | PCI_COMMAND_MASTER))) { + printk(KERN_ERR DEV_LABEL "(itf %d): can't enable IO (0x%02x)" + "\n",dev->number,error); @@ -14447,8 +14524,8 @@ +}; +#endif /* _ATMLEC_H_ */ --- /dev/null Tue Jan 1 05:00:00 1980 -+++ work/include/linux/atmmpc.h Fri Aug 21 00:52:28 1998 -@@ -0,0 +1,98 @@ ++++ work/include/linux/atmmpc.h Mon Oct 5 13:18:01 1998 +@@ -0,0 +1,99 @@ +#ifndef _ATMMPC_H_ +#define _ATMMPC_H_ + @@ -14490,6 +14567,7 @@ + +struct k_message{ + uint16_t type; ++ uint32_t ip_mask; + uint8_t MPS_ctrl[ATM_ESA_LEN]; + union { + in_ctrl_info in_info; @@ -17881,8 +17959,8 @@ + +#endif --- /dev/null Tue Jan 1 05:00:00 1980 -+++ work/net/atm/lec.c Thu Oct 1 16:33:04 1998 -@@ -0,0 +1,1977 @@ ++++ work/net/atm/lec.c Mon Oct 5 13:19:34 1998 +@@ -0,0 +1,1992 @@ +/* + * lec.c: Lan Emulation driver + * Marko Kiiskila carnil@cs.tut.fi @@ -17926,6 +18004,8 @@ + * 2 = Whole packet + */ + ++#define LEC_UNRES_QUE_LEN 8 ++ +static int lec_open(struct device *dev); +static int lec_send_packet(struct sk_buff *skb, struct device *dev); +static int lec_close(struct device *dev); @@ -18005,14 +18085,16 @@ + * If we get here, some higher level has decided we are broken. + * There should really be a "kick me" function call instead. + */ ++#if 0 /* 24.8.1998 hessu@cs.tut.fi */ + priv->stats.tx_dropped++; + printk("%s: lec_send_packet: transmit timed out, dropping packet...\n", dev->name); + dev_kfree_skb(skb); + dev->tbusy=0; + return 0; -+#if 0 -+ dev->tbusy = 1; -+ return 1; ++#endif ++#if 1 /* 24.8.1998 hessu@cs.tut.fi */ ++ printk("%s: transmit timed out\n", dev->name); ++ dev->tbusy = 0; +#endif + } + @@ -18056,12 +18138,23 @@ + DPRINTK("%s:send_vcc:%p vcc_flags:%x\n", dev->name, + send_vcc, send_vcc?send_vcc->flags:0); + if (!send_vcc || !(send_vcc->flags & ATM_VF_READY)) { ++#if 0 /* 24.8.1998 hessu@cs.tut.fi */ + priv->stats.tx_dropped++; + printk("%s:lec_send_packet: bad vcc, dropping packet...\n", + dev->name); -+ dev_kfree_skb(skb); /* like in clip.c */ ++ dev_kfree_skb(skb); + dev->tbusy=0; + return 0; ++#endif ++#if 1 /* 26.8.1998 hessu@cs.tut.fi */ ++ priv->stats.tx_errors++; ++ printk("%s:lec_send_packet: handing back ", dev->name); ++ printk("MAC address 0x%02x:%02x:%02x:%02x:%02x:%02x\n", ++ lec_h->h_dest[0], lec_h->h_dest[1], lec_h->h_dest[2], ++ lec_h->h_dest[3], lec_h->h_dest[4], lec_h->h_dest[5]); ++ dev->tbusy = 1; ++ return 1; ++#endif + } else { +#if DUMP_PACKETS > 0 + printk("%s:sending to vpi:%d vci:%d\n", dev->name, @@ -20122,10 +20215,8 @@ + +#endif --- /dev/null Tue Jan 1 05:00:00 1980 -+++ work/net/atm/mpc.c Thu Oct 1 16:33:25 1998 -@@ -0,0 +1,1410 @@ -+/* mpc.c */ -+ ++++ work/net/atm/mpc.c Mon Oct 5 13:19:34 1998 +@@ -0,0 +1,1455 @@ +#include +#include +#include @@ -20326,7 +20417,7 @@ + if (entry == NULL) return 0; + if (entry == qos_head) { + qos_head = qos_head->next; -+ kfree(qos_head); ++ kfree(entry); + return 1; + } + @@ -20352,13 +20443,13 @@ + + qos = qos_head; + *len += sprintf(page + *len, "QoS entries for shortcuts:\n"); -+ *len += sprintf(page + *len, "IP address TX:max_pcr pcr min_pcr max_cdv max_sdu RX:max_pcr pcr min_pcr max_cdv max_sdu\n"); ++ *len += sprintf(page + *len, "IP address\n TX:max_pcr pcr min_pcr max_cdv max_sdu\n RX:max_pcr pcr min_pcr max_cdv max_sdu\n"); + + ipaddr[sizeof(ipaddr)-1] = '\0'; + while (qos != NULL) { + ip = (unsigned char *)&qos->ipaddr; + sprintf(ipaddr, "%d.%d.%d.%d", ip[0], ip[1], ip[2], ip[3]); -+ *len += sprintf(page + *len, "%-16s %-7d %-7d %-7d %-7d %-7d %-7d %-7d %-7d %-7d %-7d\n", ++ *len += sprintf(page + *len, "%-16s\n %-7d %-7d %-7d %-7d %-7d\n %-7d %-7d %-7d %-7d %-7d\n", + ipaddr, + qos->qos.txtp.max_pcr, qos->qos.txtp.pcr, qos->qos.txtp.min_pcr, qos->qos.txtp.max_cdv, qos->qos.txtp.max_sdu, + qos->qos.rxtp.max_pcr, qos->qos.rxtp.pcr, qos->qos.rxtp.min_pcr, qos->qos.rxtp.max_cdv, qos->qos.rxtp.max_sdu); @@ -20392,8 +20483,16 @@ +#endif + mpc->next = mpcs; + atm_mpoa_init_cache(mpc); -+ mpcs = mpc; + ++ mpc->parameters.mpc_p1 = MPC_P1; ++ mpc->parameters.mpc_p2 = MPC_P2; ++ memset(mpc->parameters.mpc_p3,0,sizeof(mpc->parameters.mpc_p3)); ++ mpc->parameters.mpc_p4 = MPC_P4; ++ mpc->parameters.mpc_p5 = MPC_P5; ++ mpc->parameters.mpc_p6 = MPC_P6; ++ ++ mpcs = mpc; ++ + return mpc; +} + @@ -20486,7 +20585,7 @@ + mpoa_device_type = number_of_mps_macs = 0; /* silence gcc */ + dprintk("mpoa: (%s) lane2_assoc_ind: received TLV(s), ", dev->name); + dprintk("total length of all TLVs %d\n", sizeoftlvs); -+ ++ mpc = find_mpc_by_lec(dev); /* Sampo-Fix: moved here from below */ + end_of_tlvs = tlvs + sizeoftlvs; + while (end_of_tlvs - tlvs >= 5) { + type = (tlvs[0] << 24) | (tlvs[1] << 16) | (tlvs[2] << 8) | tlvs[3]; @@ -20498,6 +20597,37 @@ + printk("mpoa: (%s) lane2_assoc_ind: TLV type was 0, returning\n", dev->name); + return; + } ++ /* Sampo-Add: start */ ++ switch(type){ ++ case TLV_SC_SETUP_FRAME_COUNT: ++ mpc->parameters.mpc_p1 = (*(tlvs+1)<<8) | (*tlvs); ++ printk("mpoa: lane2_assoc_ind(): MPC_p1 = %d\n",mpc->parameters.mpc_p1); ++ break; ++ case TLV_SC_SETUP_FRAME_TIME: ++ mpc->parameters.mpc_p2 = (*(tlvs+1)<<8) | (*tlvs); ++ printk("mpoa: lane2_assoc_ind(): MPC_p2 = %d\n",mpc->parameters.mpc_p2); ++ break; ++ case TLV_FLOW_DETECTION_PROTOCOLS: ++ memcpy(mpc->parameters.mpc_p3, tlvs, length); ++ printk("mpoa: lane2_assoc_ind(): MPC_p3 = %s\n",mpc->parameters.mpc_p3); ++ break; ++ case TLV_MPC_ININTIAL_RETRY_TIME: ++ mpc->parameters.mpc_p4 = (*(tlvs+1)<<8) | (*tlvs); ++ printk("mpoa: lane2_assoc_ind(): MPC_p4 = %d\n",mpc->parameters.mpc_p4); ++ break; ++ case TLV_MPC_RETRY_TIME_MAXIMUM: ++ mpc->parameters.mpc_p5 = (*(tlvs+1)<<8) | (*tlvs); ++ printk("mpoa: lane2_assoc_ind(): MPC_p5 = %d\n",mpc->parameters.mpc_p5); ++ break; ++ case TLV_HOLD_DOWN_TIME: ++ mpc->parameters.mpc_p6 = (*(tlvs+1)<<8) | (*tlvs); ++ printk("mpoa: lane2_assoc_ind(): MPC_p6 = %d\n",mpc->parameters.mpc_p6); ++ break; ++ default: ++ break; ++ ++ } ++ /* Sampo-Add: end */ + + if (type != TLV_MPOA_DEVICE_TYPE) { + tlvs += length; @@ -20530,7 +20660,6 @@ + printk("this MPS has %d MAC addresses\n", number_of_mps_macs); + + /* ok, now we can go and tell our daemon the control address of MPS */ -+ mpc = find_mpc_by_lec(dev); + skb = alloc_skb(sizeof(struct k_message), GFP_ATOMIC); + if (skb == NULL) { + printk("mpoa: (%s) lane2_assoc_ind: alloc_skb()\n", dev->name); @@ -20553,9 +20682,14 @@ + return; + } + } -+ while (number_of_mps_macs > 0) { -+ memcpy(mpc->mps_macs, tlvs, ETH_ALEN); -+ tlvs += ETH_ALEN; number_of_mps_macs--; ++ ++ /* be careful not to ze .