VERSION = 2
PATCHLEVEL = 2
SUBLEVEL = 15
-EXTRAVERSION = pre17
+EXTRAVERSION = pre18
ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
EXPORT_SYMBOL(flush_tlb_mm);
EXPORT_SYMBOL(flush_tlb_page);
EXPORT_SYMBOL(flush_tlb_range);
+EXPORT_SYMBOL(smp_imb);
EXPORT_SYMBOL(cpu_data);
EXPORT_SYMBOL(cpu_number_map);
EXPORT_SYMBOL(global_bh_lock);
);
SMC37c669_enable_device( FLOPPY_0 );
+ /* Wake up sometimes forgotten floppy, especially on DP264. */
+ outb(0xc, 0x3f2);
+
SMC37c669_disable_device( IDE_0 );
#if SMC_DEBUG
hwpcb->res1 = hwpcb->res2 = 0;
DBGS(("KSP 0x%lx PTBR 0x%lx VPTBR 0x%lx UNIQUE 0x%lx\n",
- hwpcb->ksp, hwpcb->ptbr, hwrpb->vptb, hwcpb->unique));
+ hwpcb->ksp, hwpcb->ptbr, hwrpb->vptb, hwpcb->unique));
DBGS(("Starting secondary cpu %d: state 0x%lx pal_flags 0x%lx\n",
cpuid, idle->state, idle->tss.pal_flags));
unsigned long *pending_ipis = &ipi_data[this_cpu].bits;
unsigned long ops;
- DBGS(("handle_ipi: on CPU %d ops 0x%x PC 0x%lx\n",
+ DBGS(("handle_ipi: on CPU %d ops 0x%lx PC 0x%lx\n",
this_cpu, *pending_ipis, regs->pc));
mb(); /* Order interrupt and bit testing. */
return 0;
}
+static void
+ipi_imb(void *ignored)
+{
+ imb();
+}
+
+void
+smp_imb(void)
+{
+ /* Must wait for other processors to flush their icache
+ before continuing. */
+ if (smp_call_function(ipi_imb, NULL, 1, 1))
+ printk(KERN_CRIT "smp_imb: timed out\n");
+
+ imb();
+}
+
static void
ipi_flush_tlb_all(void *ignored)
{
{
unsigned ret;
-#ifndef CONFIG_MODULE
+#ifndef CONFIG_MODULES
/* There is only the kernel to search. */
ret = search_one_table(__start___ex_table, __stop___ex_table - 1,
addr - gp);
return hwif; /* pick an unused entry */
}
}
- for (h = 0; h < 2; ++h) {
+ for (h = 0; h < ((MAX_HWIFS >= 2) ? 2 : MAX_HWIFS); ++h) {
hwif = ide_hwifs + h;
if (hwif->chipset == ide_unknown)
return hwif; /* pick an unused entry */
Typically this takes 0 ticks. */
static inline void wait_for_cmd_done(long cmd_ioaddr)
{
- int wait = 100;
+ int wait = 1000;
do ;
while(inb(cmd_ioaddr) && --wait >= 0);
}
if (status & (PCSTimeout)) tp->stats.rx_length_errors++;
if (status & (RxUnderrun|RxFIFOOver)) tp->stats.rx_fifo_errors++;
+
+ if (status & RxFIFOOver) {
+ tp->cur_rx = 0;
+ outb(CmdTxEnb, ioaddr + ChipCmd);
+ outb(CmdRxEnb | CmdTxEnb, ioaddr + ChipCmd);
+ outl((RX_FIFO_THRESH << 13) | (RX_BUF_LEN_IDX << 11) |
+ (RX_DMA_BURST<<8), ioaddr + RxConfig);
+ }
+
if (status & RxOverflow) {
tp->stats.rx_over_errors++;
tp->cur_rx = inw(ioaddr + RxBufAddr) % RX_BUF_LEN;
#include <asm/spinlock.h> /* For the task lock */
-/* Caches aren't brain-dead on the Alpha. */
-#define flush_cache_all() do { } while (0)
+/* The icache is not coherent with the dcache on an Alpha, thus before
+ running self modified code we must always issue an imb(). Actually
+ flush_cache_all() is real overkill as it's recalled from vmalloc() before
+ accessing pagetables and on the Alpha we are not required to flush the
+ icache before doing that, but the semantic of flush_cache_all() requires
+ us to flush _all_ the caches and so we must be correct here. It's instead
+ vmalloc that should be changed to use a more finegrained cache flush
+ operation (I suspect that also other archs doesn't need an icache flush
+ while handling pagetables). OTOH vmalloc is not a performance critical
+ path so after all we can live with it for now. */
+
+#define flush_cache_all() flush_icache_range(0, 0)
#define flush_cache_mm(mm) do { } while (0)
#define flush_cache_range(mm, start, end) do { } while (0)
#define flush_cache_page(vma, vmaddr) do { } while (0)
#define flush_page_to_ram(page) do { } while (0)
-#define flush_icache_range(start, end) do { } while (0)
#define flush_dcache_page(page) do { } while (0)
+#ifndef __SMP__
+#define flush_icache_range(start, end) imb()
+#else
+#define flush_icache_range(start, end) smp_imb()
+extern void smp_imb(void);
+#endif
/*
* Use a few helper functions to hide the ugly broken ASN
NET_IPV4_ICMP_ECHOREPLY_RATE=63,
NET_IPV4_ICMP_IGNORE_BOGUS_ERROR_RESPONSES=64,
NET_IPV4_IGMP_MAX_MEMBERSHIPS=65,
- NET_IPV4_ALWAYS_DEFRAG=67
+ NET_IPV4_ALWAYS_DEFRAG=67,
+ NET_IPV4_IP_MASQ_UDP_DLOOSE=68
};
enum {
#define HOLD_TIME 1
/* broacast/multicast storm limitation. This per source. */
-#define MAX_MCAST_PER_PERIOD 4
+#define MAX_MCAST_PER_PERIOD 32
#define MCAST_HOLD_TIME (10*HZ/100)
#define Default_path_cost 10
--- /dev/null
+# This is a patch for linux-2.2.15pre16 to update it to linux-2.2.15pre16.masq
+#
+# To apply this patch:
+# STEP 1: Chdir to the source directory.
+# STEP 2: Run the 'applypatch' program with this patch file as input.
+#
+# If you do not have 'applypatch', it is part of the 'makepatch' package
+# that you can fetch from the Comprehensive Perl Archive Network:
+# http://www.perl.com/CPAN/authors/Johan_Vromans/makepatch-x.y.tar.gz
+# In the above URL, 'x' should be 2 or higher.
+#
+# To apply this patch without the use of 'applypatch':
+# STEP 1: Chdir to the source directory.
+# STEP 2: Run the 'patch' program with this file as input.
+#
+#### End of Preamble ####
+
+#### Patch data follows ####
+diff -u 'linux-2.2.15pre16/Documentation/Configure.help' 'linux-2.2.15pre16.masq/Documentation/Configure.help'
+Index: ./Documentation/Configure.help
+--- ./Documentation/Configure.help Fri Mar 31 09:34:45 2000
++++ ./Documentation/Configure.help Fri Mar 31 09:50:34 2000
+@@ -2550,6 +2550,20 @@
+ kernel whenever you want; read Documentation/modules.txt for
+ details.
+
++IP: UDP masquerading loose checking
++CONFIG_IP_MASQUERADE_UDP_LOOSE
++ Whether UDP masquerading does address checking in a loose fashion.
++
++ If you say Y here, then UDP masqueraded connections will allow
++ any external system to be connect back through the firewall to the
++ port on the internal machine. However it will allow the more
++ efficient use of masqueraded ports, and may be required for some
++ gaming uses.
++
++ You should only say Y here if you understand the consequences since
++ it will open your internal network to external probing and potential
++ attacks. In all other cases choose N
++
+ IP: ICMP masquerading
+ CONFIG_IP_MASQUERADE_ICMP
+ The basic masquerade code described for "IP: masquerading" above
+diff -u 'linux-2.2.15pre16/net/ipv4/Config.in' 'linux-2.2.15pre16.masq/net/ipv4/Config.in'
+Index: ./net/ipv4/Config.in
+--- ./net/ipv4/Config.in Fri Mar 31 09:34:03 2000
++++ ./net/ipv4/Config.in Fri Mar 31 09:52:26 2000
+@@ -41,6 +41,7 @@
+ bool 'IP: masquerading' CONFIG_IP_MASQUERADE
+ if [ "$CONFIG_IP_MASQUERADE" != "n" ]; then
+ comment 'Protocol-specific masquerading support will be built as modules.'
++ bool 'IP: UDP masquerading loose checking' CONFIG_IP_MASQUERADE_UDP_LOOSE
+ bool 'IP: ICMP masquerading' CONFIG_IP_MASQUERADE_ICMP
+ comment 'Protocol-specific masquerading support will be built as modules.'
+ if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
+diff -u 'linux-2.2.15pre16/net/ipv4/ip_masq.c' 'linux-2.2.15pre16.masq/net/ipv4/ip_masq.c'
+Index: ./net/ipv4/ip_masq.c
+Prereq: 1.34.2.2
+--- ./net/ipv4/ip_masq.c Fri Mar 31 09:34:19 2000
++++ ./net/ipv4/ip_masq.c Fri Mar 31 14:38:17 2000
+@@ -412,12 +412,6 @@
+ #define MASQ_DPORT_PASS (IP_MASQ_F_NO_DPORT|IP_MASQ_F_DLOOSE)
+
+ /*
+- * By default enable dest loose semantics
+- */
+-#define CONFIG_IP_MASQ_LOOSE_DEFAULT 1
+-
+-
+-/*
+ * Set masq expiration (deletion) and adds timer,
+ * if timeout==0 cancel expiration.
+ * Warning: it does not check/delete previous timer!
+@@ -937,7 +931,7 @@
+ atomic_set(&ms->refcnt,0);
+
+ if (proto == IPPROTO_UDP && !mport)
+-#ifdef CONFIG_IP_MASQ_LOOSE_DEFAULT
++#ifdef CONFIG_IP_MASQUERADE_UDP_LOOSE
+ /*
+ * Flag this tunnel as "dest loose"
+ *
+#### End of Patch data ####
+
+#### ApplyPatch data follows ####
+# Data version : 1.0
+# Date generated : Fri Mar 31 14:38:26 2000
+# Generated by : makepatch 2.00
+# Recurse directories : Yes
+# p 'Documentation/Configure.help' 565235 954492634 0100644
+# p 'net/ipv4/Config.in' 3618 954492746 0100644
+# p 'net/ipv4/ip_masq.c' 65999 954509897 0100644
+#### End of ApplyPatch data ####
+
+#### End of Patch kit [created: Fri Mar 31 14:38:26 2000] ####
+#### Checksum: 95 3735 33457 ####
unsigned long flags;
int hash;
struct atalk_iface *ifa;
+ int func;
/*
return 0;
}
- ea->function=ntohs(ea->function);
+ func=ntohs(ea->function);
/*
* Sanity check fields.
*/
- if(ea->function<AARP_REQUEST || ea->function > AARP_PROBE || ea->hw_len != ETH_ALEN || ea->pa_len != AARP_PA_ALEN ||
+ if(func<AARP_REQUEST || func > AARP_PROBE || ea->hw_len != ETH_ALEN || ea->pa_len != AARP_PA_ALEN ||
ea->pa_src_zero != 0 || ea->pa_dst_zero != 0)
{
kfree_skb(skb);
return 1;
}
- switch(ea->function)
+ switch(func)
{
case AARP_REPLY:
if(unresolved_count==0) /* Speed up */
ma = &da;
}
- if(ea->function==AARP_PROBE)
+ if(func==AARP_PROBE)
{
/* A probe implies someone trying to get an
address. So as a precaution flush any
#include <net/tcp.h>
#include <net/udp.h>
#include <net/checksum.h>
+#include <net/sock.h>
#include <net/ip_masq.h>
#ifdef CONFIG_IP_MASQUERADE_MOD
#include <linux/ip_masq.h>
int sysctl_ip_masq_debug = 0;
+int sysctl_ip_masq_udp_dloose = 0;
/*
* Exported wrapper
atomic_set(&ms->n_control,0);
atomic_set(&ms->refcnt,0);
- if (proto == IPPROTO_UDP && !mport)
-#ifdef CONFIG_IP_MASQUERADE_UDP_LOOSE
- /*
- * Flag this tunnel as "dest loose"
- *
- */
- ms->flags |= IP_MASQ_F_DLOOSE;
-#else
- ms->flags |= IP_MASQ_F_NO_DADDR;
-#endif
+ if (proto == IPPROTO_UDP && !mport) {
+ switch( sysctl_ip_masq_udp_dloose ) {
+ case 2:
+ /*
+ * Flag this tunnel as "dest loose"
+ *
+ */
+ ms->flags |= IP_MASQ_F_DLOOSE;
+ break;
+ case 1:
+ if( ntohs(sport) < PROT_SOCK ) {
+ ms->flags |= IP_MASQ_F_NO_DADDR;
+ }
+ else {
+ ms->flags |= IP_MASQ_F_DLOOSE;
+ }
+ break;
+ default:
+ ms->flags |= IP_MASQ_F_NO_DADDR;
+ break;
+ }
+ }
/* get masq address from rif */
ms->maddr = maddr;
/* From ip_masq.c */
extern int sysctl_ip_masq_debug;
+extern int sysctl_ip_masq_udp_dloose;
extern int sysctl_tcp_timestamps;
extern int sysctl_tcp_window_scaling;
#ifdef CONFIG_IP_MASQUERADE
{NET_IPV4_IP_MASQ_DEBUG, "ip_masq_debug",
&sysctl_ip_masq_debug, sizeof(int), 0644, NULL, &proc_dointvec},
+ {NET_IPV4_IP_MASQ_UDP_DLOOSE, "ip_masq_udp_dloose",
+ &sysctl_ip_masq_udp_dloose, sizeof(int), 0644, NULL, &proc_dointvec},
#endif
{NET_IPV4_IPFRAG_TIME, "ipfrag_time",
&sysctl_ipfrag_time, sizeof(int), 0644, NULL, &proc_dointvec_jiffies,