]> git.neil.brown.name Git - history.git/commitdiff
Linux 2.2.15pre11 2.2.15pre11
authorAlan Cox <alan@lxorguk.ukuu.org.uk>
Fri, 23 Nov 2007 20:20:56 +0000 (15:20 -0500)
committerAlan Cox <alan@lxorguk.ukuu.org.uk>
Fri, 23 Nov 2007 20:20:56 +0000 (15:20 -0500)
o Fix i2o pci to depend on pci bus (Arjan van de Ven)
o TSC based udelay [Yes bogomip values changed (Philipp Rumpf, Alan Cox)
\ but they are bogus anyway remember]
o Update version info on cyclades (Cyclades)
o Removed illegal use of FPU in lmc driver (Philipp Rumpf)
o Fix FPU usage bug in the ixj driver (Philipp Rumpf)
o Fix NFSCTL_LOCKD for Sparc64 (Dave Miller)
o Fix small protocol error in the irda code (Dag Brattli)
o Sparc64 mmap corruption fix (Dave Miller)
o Blacklist entry for the Mitsumi cd-r (Erik Tews)
o SMB was making socket calls in wrong context (Manfred Spraul)
o ALS100/200 doc improvement (Dave Forrest)
o Thunderlan driver minor updates (Torben Mathiasen)
o Fix memory leak in lance driver (Ivan Kokshaysky)
o Fix ppc compile error (Robert Walsh)
o PPP/SMP locking fixes (Paul Mackerras)
o Hopefully fix tcp/fasync race (Alexey Kuznetsov et al)

42 files changed:
Documentation/sound/ALS007
Documentation/video4linux/CQcam.txt
MAINTAINERS
Makefile
arch/i386/kernel/time.c
arch/i386/lib/delay.c
arch/ppc/kernel/gemini_setup.c
arch/sparc64/kernel/ptrace.c
arch/sparc64/kernel/sparc64_ksyms.c
arch/sparc64/kernel/sys_sparc32.c
arch/sparc64/mm/init.c
arch/sparc64/mm/ultra.S
drivers/char/cyclades.c
drivers/i2o/Config.in
drivers/net/eepro100.c
drivers/net/lance.c
drivers/net/lmc/lmc_main.c
drivers/net/ppp.c
drivers/net/tlan.c
drivers/scsi/scsi.c
drivers/telephony/ixj.c
fs/buffer.c
fs/fat/mmap.c
fs/nfs/read.c
fs/romfs/inode.c
fs/smbfs/file.c
fs/smbfs/sock.c
include/asm-alpha/pgtable.h
include/asm-arm/pgtable.h
include/asm-i386/delay.h
include/asm-i386/pgtable.h
include/asm-m68k/pgtable.h
include/asm-mips/pgtable.h
include/asm-ppc/keyboard.h
include/asm-ppc/pgtable.h
include/asm-s390/pgtable.h
include/asm-sparc/pgtable.h
include/asm-sparc64/floppy.h
include/asm-sparc64/pgtable.h
include/linux/if_pppvar.h
net/irda/iriap_event.c
net/socket.c

index 69a264815ffab085261aeb757178e3aa0f3469c9..c62e2419a9c6ec8097662d065560049071caec75 100644 (file)
@@ -1,18 +1,19 @@
-ALS-007 based sound cards
+ALS-007/ALS-100/ALS-200 based sound cards
 =========================
 
-Support for sound cards based around the Avance Logic ALS-007 chip is
-included.  The ALS-007 is a single chip PnP sound solution which is mostly
-hardware compatible with the Sound Blaster 16 card, with most differences
-occurring in the use of the mixer registers.  For this reason the ALS-007 
-code is integrated as part of the Sound Blaster 16 driver (adding only 800
-bytes to the SB16 driver).
+Support for sound cards based around the Avance Logic
+ALS-007/ALS-100/ALS-200 chip is included.  These chips are a single
+chip PnP sound solution which is mostly hardware compatible with the
+Sound Blaster 16 card, with most differences occurring in the use of
+the mixer registers.  For this reason the ALS code is integrated
+as part of the Sound Blaster 16 driver (adding only 800 bytes to the
+SB16 driver).
 
-To use an ALS-007 sound card under Linux, enable the following options in the
+To use an ALS sound card under Linux, enable the following options in the
 sound configuration section of the kernel config:
   - 100% Sound Blaster compatibles (SB16/32/64, ESS, Jazz16) support
   - FM synthesizer (YM3812/OPL-3) support 
-Since the ALS-007 is a PnP card, the sound driver probably should be
+Since the ALS-007/100/200 is a PnP card, the sound driver probably should be
 compiled as a module, with the isapnptools used to wake up the sound card.
 Set the "I/O base for SB", "Sound Blaster IRQ" and "Sound Blaster DMA" (8 bit -
 either 0, 1 or 3) to the values used in your particular installation (they
@@ -38,3 +39,5 @@ The resulting sound driver will provide the following capabilities:
 Jonathan Woithe
 jwoithe@physics.adelaide.edu.au
 30 March 1998
+
+Modified 2000-02-26 by Dave Forrest, drf5n@virginia.edu to add ALS100/ALS200
index 7f00e93585a01ffbe7a900e5a5dc92be8664c7c7..6d54c07c0443630a901cab9741b223f07cd311bc 100644 (file)
@@ -76,7 +76,7 @@ parameters.  Do read ../modules.txt, and understand that entries
 in /etc/modules.conf of:
 
    alias parport_lowlevel parport_pc
-   alias parport_pc io=0x378 irq=none
+   options parport_pc io=0x378 irq=none
    alias char-major-81 videodev
    alias char-major-81-0 c-qcam
 
index 8e2bcabc38e820a6f1a41e435fae34114d139993..cddb56077cd361cffc926377bc091556c25d5c5f 100644 (file)
@@ -250,9 +250,9 @@ S:  Maintained
 
 DIGI INTL. EPCA DRIVER
 P:      Daniel Taylor
-M:      support@dgii.com
-M:      danielt@dgii.com
-L:      digilnux@dgii.com
+M:      support@digi.com
+M:      danielt@digi.com
+L:      digilnux@digi.com
 S:      Maintained
 
 DIGI RIGHTSWITCH NETWORK DRIVER
index 7d645e5633b07eaf54f9c8591d5a15be86131b53..9c70163c174e0b9816f02431eb8ed752300b1178 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 2
 SUBLEVEL = 15
-EXTRAVERSION = pre10
+EXTRAVERSION = pre11
 
 ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
 
index 0befceb479474b682c68bdaedd65a31ece399c08..d8c6e2359fdde018ccbd9ae13557dbd34ea6f86a 100644 (file)
@@ -612,6 +612,8 @@ bad_ctc:
        return 0;
 }
 
+extern int x86_udelay_tsc;
+
 __initfunc(void time_init(void))
 {
        xtime.tv_sec = get_cmos_time();
@@ -649,6 +651,11 @@ __initfunc(void time_init(void))
                if (tsc_quotient) {
                        fast_gettimeoffset_quotient = tsc_quotient;
                        use_tsc = 1;
+                       /*
+                        *      We should be more selective here I suspect
+                        *      and just enable this for the new intel chips ?
+                        */
+                       x86_udelay_tsc = 1;
 #ifndef do_gettimeoffset
                        do_gettimeoffset = do_fast_gettimeoffset;
 #endif
index 6918451a6b024b026e4c4519be268b8537b4f395..b76e33daa43c7d17a0cd2dfe4c28af59cb75b26b 100644 (file)
 #include <linux/sched.h>
 #include <linux/delay.h>
 
+#include <asm/delay.h>
 #ifdef __SMP__
 #include <asm/smp.h>
 #endif
 
-void __delay(unsigned long loops)
+int x86_udelay_tsc;
+       
+/*
+ *     Do a udelay using the TSC for any CPU that happens
+ *     to have one that we trust. This could be optimised to avoid
+ *     the multiply per loop but its a delay loop so who are we kidding...
+ */
+
+static void __rdtsc_delay(unsigned long loops)
+{
+       unsigned long bclock, now;
+       
+       rdtscl(bclock);
+       do
+       {
+               rdtscl(now);
+       }
+       while((now-bclock) < loops);
+}
+
+/*
+ *     Non TSC based delay loop for 386, 486, MediaGX
+ */
+static void __loop_delay(unsigned long loops)
 {
        int d0;
        __asm__ __volatile__(
@@ -30,7 +55,15 @@ void __delay(unsigned long loops)
                :"0" (loops));
 }
 
-inline void __const_udelay(unsigned long xloops)
+void __delay(unsigned long loops)
+{
+       if(x86_udelay_tsc)
+               __rdtsc_delay(loops);
+       else
+               __loop_delay(loops);
+}
+
+void __const_udelay(unsigned long xloops)
 {
        int d0;
        __asm__("mull %0"
@@ -39,7 +72,15 @@ inline void __const_udelay(unsigned long xloops)
         __delay(xloops);
 }
 
+/*
+ *     Do a udelay using the delay/jump loop. This won't work on 
+ *     the next intel CPU's and isnt ideal on anything with APM
+ */
+
 void __udelay(unsigned long usecs)
 {
        __const_udelay(usecs * 0x000010c6);  /* 2**32 / 1000000 */
 }
+
+
index de49c235d3ee1c7680e8f43d0e71bc909d9d7019..b06b0b4ffdbbc459bab9000b30592e81359e3881 100644 (file)
@@ -571,6 +571,6 @@ void __init gemini_init(unsigned long r3, unsigned long r4, unsigned long r5,
        ppc_md.kbd_leds = NULL;
        ppc_md.kbd_init_hw = NULL;
 #ifdef CONFIG_MAGIC_SYSRQ
-       ppc_md.ppc_kbd_sysrq_xlate = NULL;
+       ppc_md.kbd_sysrq_xlate = NULL;
 #endif
 }
index 7e453413d77394befe8f59ea814fba4748a32ce8..9faca032d3adb43f643a8dc1420fa220f64baaf1 100644 (file)
@@ -120,16 +120,14 @@ static __inline__ unsigned int read_user_int(unsigned long kvaddr)
 
 static __inline__ void write_user_long(unsigned long kvaddr, unsigned long val)
 {
-       __asm__ __volatile__("stxa %0, [%1] %2"
-                            : /* no outputs */
-                            : "r" (val), "r" (__pa(kvaddr)), "i" (ASI_PHYS_USE_EC));
+       *(unsigned long *)kvaddr = val;
+       flush_dcache_page(kvaddr & PAGE_MASK);
 }
 
 static __inline__ void write_user_int(unsigned long kvaddr, unsigned int val)
 {
-       __asm__ __volatile__("stwa %0, [%1] %2"
-                            : /* no outputs */
-                            : "r" (val), "r" (__pa(kvaddr)), "i" (ASI_PHYS_USE_EC));
+       *(unsigned int *)kvaddr = val;
+       flush_dcache_page(kvaddr & PAGE_MASK);
 }
 
 static inline unsigned long get_long(struct task_struct * tsk,
@@ -164,11 +162,6 @@ static inline void put_long(struct task_struct * tsk, struct vm_area_struct * vm
 
                pgaddr = page + (addr & ~PAGE_MASK);
                write_user_long(pgaddr, data);
-
-               __asm__ __volatile__("
-               membar  #StoreStore
-               flush   %0
-"              : : "r" (pgaddr & ~7) : "memory");
        }
 /* we're bypassing pagetables, so we have to set the dirty bit ourselves */
 /* this should also re-instate whatever read-only mode there was before */
@@ -209,11 +202,6 @@ static inline void put_int(struct task_struct * tsk, struct vm_area_struct * vma
 
                pgaddr = page + (addr & ~PAGE_MASK);
                write_user_int(pgaddr, data);
-
-               __asm__ __volatile__("
-               membar  #StoreStore
-               flush   %0
-"              : : "r" (pgaddr & ~7) : "memory");
        }
 /* we're bypassing pagetables, so we have to set the dirty bit ourselves */
 /* this should also re-instate whatever read-only mode there was before */
index 95376a54df8dbc32c7280cbebc06f78d3d86bafe..251785a3e23aab08886068604a6d59082db1d6d2 100644 (file)
@@ -162,6 +162,8 @@ EXPORT_SYMBOL(disable_irq);
 
 EXPORT_SYMBOL_PRIVATE(flushw_user);
 
+EXPORT_SYMBOL(flush_dcache_page);
+
 EXPORT_SYMBOL(mstk48t02_regs);
 EXPORT_SYMBOL(request_fast_irq);
 EXPORT_SYMBOL(sparc_alloc_io);
index 4f0e4a29e65df10fe516de11d8ee1eb198ba0843..3cb037e3821891a1f67e80f3d1fc5e56350e889b 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: sys_sparc32.c,v 1.107.2.7 2000/01/24 11:36:50 jj Exp $
+/* $Id: sys_sparc32.c,v 1.107.2.8 2000/02/28 04:09:49 davem Exp $
  * sys_sparc32.c: Conversion between 32bit and 64bit native syscalls.
  *
  * Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
@@ -3688,6 +3688,10 @@ int asmlinkage sys32_nfsservctl(int cmd, struct nfsctl_arg32 *arg32, union nfsct
        case NFSCTL_GETFH:
                err = nfs_getfh32_trans(karg, arg32);
                break;
+       case NFSCTL_LOCKD:
+               /* No arguments, no translations... */
+               err = 0;
+               break;
        default:
                err = -EINVAL;
                break;
index 645f9de755724a788b86fb4bf9ee3bfb58d7a1c5..6a85988a598a71466eddf246a1d4e06937ba764d 100644 (file)
@@ -989,13 +989,11 @@ void prom_reload_locked(void)
 
 void __flush_dcache_range(unsigned long start, unsigned long end)
 {
-       unsigned long va;
-       int n = 0;
-
-       for (va = start; va < end; va += 32) {
-               spitfire_put_dcache_tag(va & 0x3fe0, 0x0);
-               if (++n >= 512)
-                       break;
+       start &= PAGE_MASK;
+       end = PAGE_ALIGN(end);
+       while (start < end) {
+               flush_dcache_page(start);
+               start += PAGE_SIZE;
        }
 }
 
index b2b0d4a32074e53bb8ec2971cf7850ac0010f20d..26240eb73ae0a57ab7ddb32541f385b65840fdec 100644 (file)
@@ -167,6 +167,29 @@ iflush2:stxa               %g0, [%o1 + %o2] ASI_IC_TAG
        ba,pt           %xcc, 3b
         flush          %g6
 
+       .align          64
+       .globl          flush_dcache_page
+flush_dcache_page:
+       sub             %o0, %g4, %o0
+       clr             %o1
+       srlx            %o0, 11, %o0
+       sethi           %hi(1 << 14), %o2
+1:     ldxa            [%o1] ASI_DCACHE_TAG, %o3
+       andn            %o3, 0x3, %o3
+       cmp             %o0, %o3
+       bne,pt          %xcc, 2f
+        nop
+       stxa            %g0, [%o1] ASI_DCACHE_TAG
+2:     add             %o1, (1 << 5), %o1
+       cmp             %o1, %o2
+       bne,pt          %xcc, 1b
+        nop
+       /* The I-cache does not snoop local stores so we
+        * better flush that too.
+        */
+       ba,pt           %xcc, flush_icache_page
+        sllx           %o0, 11, %o0
+
 #ifdef __SMP__
        /* These are all called by the slaves of a cross call, at
         * trap level 1, with interrupts fully disabled.
index e88f717f64ec8b53252ffb19bcfd70a77a4bfbba..eba36b4c4fabdcb628a83a9f037c683ea87346ce 100644 (file)
@@ -1,7 +1,7 @@
 #undef BLOCKMOVE
 #define        Z_WAKE
 static char rcsid[] =
-"$Revision: 2.3.2.4 $$Date: 2000/01/17 09:19:40 $";
+"$Revision: 2.3.2.5 $$Date: 2000/01/19 14:35:33 $";
 
 /*
  *  linux/drivers/char/cyclades.c
@@ -31,6 +31,9 @@ static char rcsid[] =
  *   void cleanup_module(void);
  *
  * $Log: cyclades.c,v $
+ * Revision 2.3.2.5   2000/01/19 14:35:33 ivan
+ * Fixed bug in cy_set_termios on CRTSCTS flag turnoff.
+ *
  * Revision 2.3.2.4   2000/01/17 09:19:40 ivan
  * Fixed SMP locking in Cyclom-Y interrupt handler.
  *
index d8e7e3431a27e7f4183f6792373d352e98eb580c..c47472d38277db3d90b70f8d415850776f88b547 100644 (file)
@@ -3,7 +3,7 @@ comment 'I2O device support'
 
 tristate 'I2O support' CONFIG_I2O
 
-dep_tristate '  I2O PCI support' CONFIG_I2O_PCI $CONFIG_I2O
+dep_tristate '  I2O PCI support' CONFIG_I2O_PCI $CONFIG_I2O $CONFIG_PCI
 dep_tristate '  I2O Block OSM' CONFIG_I2O_BLOCK $CONFIG_I2O
 dep_tristate '  I2O SCSI OSM' CONFIG_I2O_SCSI $CONFIG_I2O $CONFIG_SCSI
 
index 43ca69d1d7994788529bfefd33bcf830b8b0b9d6..5e89f10cf7c3177f9c0d28597144cde3ce0a7aa9 100644 (file)
@@ -29,7 +29,7 @@
 
 static const char *version =
 "eepro100.c:v1.09j-t 9/29/99 Donald Becker http://cesdis.gsfc.nasa.gov/linux/drivers/eepro100.html\n"
-"eepro100.c: $Revision: 1.18 $ 1999/12/29 Modified by Andrey V. Savochkin <saw@msu.ru>\n";
+"eepro100.c: $Revision: 1.20 $ 1999/12/29 Modified by Andrey V. Savochkin <saw@msu.ru>\n";
 
 /* A few user-configurable values that apply to all boards.
    First set is undocumented and spelled per Intel recommendations. */
@@ -360,19 +360,16 @@ enum commands {
        CmdIntr = 0x20000000,           /* Interrupt after completion. */
        CmdTxFlex = 0x00080000,         /* Use "Flexible mode" for CmdTx command. */
 };
-/* Clear CmdSuspend (1<<30) atomically.
-   Otherwise the command status in the lower 16 bits may be reset after
-   an asynchronous change.  Previous driver version used separate 16 bit fields
-   for commands and statuses.  --SAW
+/* Clear CmdSuspend (1<<30) avoiding interference with the card access to the
+   status bits.  Previous driver versions used separate 16 bit fields for
+   commands and statuses.  --SAW
  */
-#ifdef __i386__
-#define speedo_fool_gcc(x) (*(volatile struct { int a[100]; } *)x)
-#define speedo_clear_mask(mask, addr) \
-__asm__ __volatile__("lock; andl %0,%1" \
-: : "r" (~(mask)),"m" (speedo_fool_gcc(addr)) : "memory")
-#define clear_suspend(cmd)  speedo_clear_mask(CmdSuspend, &(cmd)->cmd_status)
+#if defined(__LITTLE_ENDIAN)
+#define clear_suspend(cmd)  ((__u16 *)&(cmd)->cmd_status)[1] &= ~0x4000
+#elif defined(__BIG_ENDIAN)
+#define clear_suspend(cmd)  ((__u16 *)&(cmd)->cmd_status)[0] &= ~0x4000
 #else
-#define clear_suspend(cmd)     (cmd)->cmd_status &= cpu_to_le32(~CmdSuspend)
+#error Unsupported byteorder
 #endif
 
 enum SCBCmdBits {
index 65d3b69be50faf42776216866c22764afa36bbc2..91cd040bc255f699961d85f379dae7d0c3131cc9 100644 (file)
@@ -780,11 +780,19 @@ lance_open(struct device *dev)
 */
 
 static void 
-lance_purge_tx_ring(struct device *dev)
+lance_purge_ring(struct device *dev)
 {
        struct lance_private *lp = (struct lance_private *)dev->priv;
        int i;
 
+       /* Free all the skbuffs in the Rx and Tx queues. */
+       for (i = 0; i < RX_RING_SIZE; i++) {
+               struct sk_buff *skb = lp->rx_skbuff[i];
+               lp->rx_skbuff[i] = 0;
+               lp->rx_ring[i].base = 0;                /* Not owned by LANCE chip. */
+               if (skb)
+                       dev_kfree_skb(skb);
+       }
        for (i = 0; i < TX_RING_SIZE; i++) {
                if (lp->tx_skbuff[i]) {
                        dev_kfree_skb(lp->tx_skbuff[i]);
@@ -845,7 +853,7 @@ lance_restart(struct device *dev, unsigned int csr0_bits, int must_reinit)
 
        if (must_reinit ||
                (chip_table[lp->chip_version].flags & LANCE_MUST_REINIT_RING)) {
-               lance_purge_tx_ring(dev);
+               lance_purge_ring(dev);
                lance_init_ring(dev, GFP_ATOMIC);
        }
        outw(0x0000,    dev->base_addr + LANCE_ADDR);
@@ -870,7 +878,7 @@ static int lance_start_xmit(struct sk_buff *skb, struct device *dev)
                outw(0x0004, ioaddr+LANCE_DATA);
                lp->stats.tx_errors++;
 #ifndef final_version
-               {
+               if (lance_debug > 3) {
                        int i;
                        printk(" Ring data dump: dirty_tx %d cur_tx %d%s cur_rx %d.",
                                   lp->dirty_tx, lp->cur_tx, lp->tx_full ? " (full)" : "",
@@ -891,7 +899,7 @@ static int lance_start_xmit(struct sk_buff *skb, struct device *dev)
                dev->tbusy=0;
                dev->trans_start = jiffies;
 
-               return 0;
+               return 1;
        }
 
        if (lance_debug > 3) {
@@ -1206,19 +1214,7 @@ lance_close(struct device *dev)
        }
        free_irq(dev->irq, dev);
 
-       /* Free all the skbuffs in the Rx and Tx queues. */
-       for (i = 0; i < RX_RING_SIZE; i++) {
-               struct sk_buff *skb = lp->rx_skbuff[i];
-               lp->rx_skbuff[i] = 0;
-               lp->rx_ring[i].base = 0;                /* Not owned by LANCE chip. */
-               if (skb)
-                       dev_kfree_skb(skb);
-       }
-       for (i = 0; i < TX_RING_SIZE; i++) {
-               if (lp->tx_skbuff[i])
-                       dev_kfree_skb(lp->tx_skbuff[i]);
-               lp->tx_skbuff[i] = 0;
-       }
+       lance_purge_ring(dev);
 
        MOD_DEC_USE_COUNT;
        return 0;
index 711bcab44b1ef4efa950202fbdf27416d3f8d782..67fbb277225abeb778b01c650566214578aaad33 100644 (file)
@@ -1410,7 +1410,7 @@ static int lmc_rx (struct device *dev) /*fold00*/
          * them into a new buffer??
          */
         
-        if(len > LMC_MTU * 0.75){
+        if(len > (3*LMC_MTU)/4){
             /*
              * If it's a large packet don't copy it just hand it up
              */
index 1e40bd8840dd29889a041dc8265fb9a316bb1482..f93caaea5d051c2e42e995aa29db851d82874ccd 100644 (file)
@@ -4,7 +4,7 @@
  *  Al Longyear <longyear@netcom.com>
  *  Extensively rewritten by Paul Mackerras <paulus@cs.anu.edu.au>
  *
- *  ==FILEVERSION 990510==
+ *  ==FILEVERSION 20000223==
  *
  *  NOTE TO MAINTAINERS:
  *     If you modify this file at all, please set the number above to the
@@ -175,6 +175,27 @@ static char szVersion[]            = PPP_VERSION;
 EXPORT_SYMBOL(ppp_register_compressor);
 EXPORT_SYMBOL(ppp_unregister_compressor);
 
+/* Bits in ppp->state */
+#define PUSHING                0       /* currently executing in ppp_tty_push */
+#define WAKEUP         1       /* someone else wants to also */
+#define XMITFULL       2       /* someone owns ppp->tpkt */
+#define FLUSHING       3       /* discard output */
+
+/* Non-blocking locking. */
+static inline int xmit_trylock(struct ppp *ppp)
+{
+       wmb();
+       if (test_and_set_bit(PUSHING, &ppp->state))
+               return 0;
+       return 1;
+}
+
+static inline void xmit_unlock(struct ppp *ppp)
+{
+       wmb();
+       clear_bit(PUSHING, &ppp->state);
+}
+
 /*************************************************************
  * LINE DISCIPLINE SUPPORT
  *    The following code implements the PPP line discipline
@@ -323,7 +344,7 @@ ppp_async_init(struct ppp *ppp)
 {
        ppp->escape = 0;
        ppp->toss   = 0xE0;
-       ppp->tty_pushing = 0;
+       ppp->state = 0;
 
        memset (ppp->xmit_async_map, 0, sizeof (ppp->xmit_async_map));
        ppp->xmit_async_map[0] = 0xffffffff;
@@ -838,7 +859,7 @@ ppp_sync_send(struct ppp *ppp, struct sk_buff *skb)
        
        CHECK_PPP(0);
 
-       if (ppp->tpkt != NULL)
+       if (test_and_set_bit(XMITFULL, &ppp->state))
                return -1;
        ppp->tpkt = skb;
 
@@ -886,67 +907,52 @@ ppp_sync_send(struct ppp *ppp, struct sk_buff *skb)
 static int
 ppp_tty_sync_push(struct ppp *ppp)
 {
-       int sent;
-       struct tty_struct *tty = ppp2tty(ppp);
-       unsigned long flags;
+       int sent, done = 0;
+       struct tty_struct *tty;
                
        CHECK_PPP(0);
 
-       if (ppp->tpkt == NULL)
-               return 0;
-               
-       /* prevent reentrancy with tty_pushing flag */          
-       save_flags(flags);
-       cli();
-       if (ppp->tty_pushing) {
-               /* record wakeup attempt so we don't lose */
-               /* a wakeup call while doing push processing */
-               ppp->woke_up=1;
-               restore_flags(flags);
+       set_bit(WAKEUP, &ppp->state);
+       if (!xmit_trylock(ppp))
                return 0;
-       }
-       ppp->tty_pushing = 1;
-       restore_flags(flags);
-       
-       if (tty == NULL || tty->disc_data != (void *) ppp)
-               goto flush;
-               
-       for(;;){
-               ppp->woke_up=0;
-               
+
+ again:
+       clear_bit(WAKEUP, &ppp->state);
+
+       if (ppp->tpkt != 0) {
                /* Note: Sync driver accepts complete frame or nothing */
-               tty->flags |= (1 << TTY_DO_WRITE_WAKEUP);
-               sent = tty->driver.write(tty, 0, ppp->tpkt->data, ppp->tpkt->len);
-               if (sent < 0) {
+               tty = ppp2tty(ppp);
+               sent = -1;
+               if (test_bit(FLUSHING, &ppp->state))
+                       sent = ppp->tpkt->len;
+               else if (tty != NULL && tty->disc_data == (void *) ppp) {
+                       tty->flags |= (1 << TTY_DO_WRITE_WAKEUP);
+                       sent = tty->driver.write(tty, 0, ppp->tpkt->data, ppp->tpkt->len);
+               }
+               if (sent < 0)
                        /* write error (possible loss of CD) */
                        /* record error and discard current packet */
                        ppp->stats.ppp_oerrors++;
-                       break;
-               }
-               ppp->stats.ppp_obytes += sent;
-               if (sent < ppp->tpkt->len) {
-                       /* driver unable to accept frame just yet */
-                       save_flags(flags);
-                       cli();
-                       if (ppp->woke_up) {
-                               /* wake up called while processing */
-                               /* try to send the frame again */
-                               restore_flags(flags);
-                               continue;
-                       }
-                       /* wait for wakeup callback to try send again */
-                       ppp->tty_pushing = 0;
-                       restore_flags(flags);
-                       return 0;
+               else
+                       ppp->stats.ppp_obytes += sent;
+               if (sent < 0 || sent >= ppp->tpkt->len) {
+                       /* driver accepted the frame or we got an error */
+                       kfree_skb(ppp->tpkt);
+                       ppp->tpkt = 0;
+                       wmb();
+                       clear_bit(XMITFULL, &ppp->state);
+                       done = 1;
                }
-               break;
        }
-flush: 
-       /* done with current packet (sent or discarded) */
-       kfree_skb(ppp->tpkt);
-       ppp->tpkt = 0;
-       ppp->tty_pushing = 0;
-       return 1;
+       if (ppp->tpkt == 0)
+               clear_bit(FLUSHING, &ppp->state);
+
+       xmit_unlock(ppp);
+       if (test_and_clear_bit(WAKEUP, &ppp->state))
+               if (xmit_trylock(ppp))
+                       goto again;
+
+       return done;
 }
 
 /*
@@ -964,10 +970,11 @@ ppp_async_send(struct ppp *ppp, struct sk_buff *skb)
 
        ppp_tty_push(ppp);
 
-       if (ppp->tpkt != NULL)
+       if (test_and_set_bit(XMITFULL, &ppp->state))
                return -1;
-       ppp->tpkt = skb;
        ppp->tpkt_pos = 0;
+       wmb();
+       ppp->tpkt = skb;
 
        return ppp_tty_push(ppp);
 }
@@ -980,58 +987,62 @@ static int
 ppp_tty_push(struct ppp *ppp)
 {
        int avail, sent, done = 0;
-       struct tty_struct *tty = ppp2tty(ppp);
-       
+       struct tty_struct *tty;
+
        if (ppp->flags & SC_SYNC) 
                return ppp_tty_sync_push(ppp);
 
        CHECK_PPP(0);
-       if (ppp->tty_pushing) {
-               ppp->woke_up = 1;
+
+       set_bit(WAKEUP, &ppp->state);
+       if (!xmit_trylock(ppp))
                return 0;
-       }
-       if (tty == NULL || tty->disc_data != (void *) ppp)
-               goto flush;
-       while (ppp->optr < ppp->olim || ppp->tpkt != 0) {
-               ppp->tty_pushing = 1;
-               mb();
-               ppp->woke_up = 0;
-               avail = ppp->olim - ppp->optr;
-               if (avail > 0) {
+
+ again:
+       clear_bit(WAKEUP, &ppp->state);
+
+       avail = ppp->olim - ppp->optr;
+       if (avail > 0) {
+               tty = ppp2tty(ppp);
+               sent = -1;
+               if (test_bit(FLUSHING, &ppp->state)) {
+                       sent = avail;
+               } else if (tty != NULL && tty->disc_data == (void *) ppp) {
                        tty->flags |= (1 << TTY_DO_WRITE_WAKEUP);
                        sent = tty->driver.write(tty, 0, ppp->optr, avail);
-                       if (sent < 0)
-                               goto flush;     /* error, e.g. loss of CD */
-                       ppp->stats.ppp_obytes += sent;
-                       ppp->optr += sent;
-                       if (sent < avail) {
+               }
+               if (sent < 0) {
+                       /* error, e.g. loss of CD */
+                       ppp->stats.ppp_oerrors++;
+                       ppp->optr = ppp->olim;
+                       if (ppp->tpkt != 0) {
+                               kfree_skb(ppp->tpkt);
+                               ppp->tpkt = 0;
                                wmb();
-                               ppp->tty_pushing = 0;
-                               mb();
-                               if (ppp->woke_up)
-                                       continue;
-                               return done;
+                               clear_bit(XMITFULL, &ppp->state);
+                               done = 1;
                        }
+               } else {
+                       ppp->stats.ppp_obytes += sent;
+                       ppp->optr += sent;
                }
-               if (ppp->tpkt != 0)
-                       done = ppp_async_encode(ppp);
-               wmb();
-               ppp->tty_pushing = 0;
        }
-       return done;
 
-flush:
-       ppp->tty_pushing = 1;
-       mb();
-       ppp->stats.ppp_oerrors++;
-       if (ppp->tpkt != 0) {
-               kfree_skb(ppp->tpkt);
-               ppp->tpkt = 0;
-               done = 1;
+       if (ppp->optr == ppp->olim) {
+               if (ppp->tpkt != 0) {
+                       done |= ppp_async_encode(ppp);
+                       goto again;
+               } else {
+                       /* buffers are empty */
+                       clear_bit(FLUSHING, &ppp->state);
+               }
        }
-       ppp->optr = ppp->olim;
-       wmb();
-       ppp->tty_pushing = 0;
+
+       xmit_unlock(ppp);
+       if (test_and_clear_bit(WAKEUP, &ppp->state))
+               if (xmit_trylock(ppp))
+                       goto again;
+
        return done;
 }
 
@@ -1132,6 +1143,8 @@ ppp_async_encode(struct ppp *ppp)
 
                kfree_skb(ppp->tpkt);
                ppp->tpkt = 0;
+               wmb();
+               clear_bit(XMITFULL, &ppp->state);
                return 1;
        }
 
@@ -1152,22 +1165,10 @@ static void
 ppp_tty_flush_output(struct ppp *ppp)
 {
        struct sk_buff *skb;
-       int done = 0;
 
+       set_bit(FLUSHING, &ppp->state);
        while ((skb = skb_dequeue(&ppp->xmt_q)) != NULL)
                kfree_skb(skb);
-       ppp->tty_pushing = 1;
-       mb();
-       ppp->optr = ppp->olim;
-       if (ppp->tpkt != NULL) {
-               kfree_skb(ppp->tpkt);
-               ppp->tpkt = 0;
-               done = 1;
-       }
-       wmb();
-       ppp->tty_pushing = 0;
-       if (done)
-               ppp_output_wakeup(ppp);
 }
 
 /*
@@ -2711,7 +2712,7 @@ ppp_dev_xmit(struct sk_buff *skb, struct device *dev)
        }
 
        /*
-        * The dev->tbusy field acts as a lock to allow only
+        * The ppp->xmit_busy field acts as a lock to allow only
         * one packet to be processed at a time.  If we can't
         * get the lock, try again later.
         * We deliberately queue as little as possible inside
index dd680195fc4c4662d963b98b3cafa1a43133ede3..a3ad602b29148dffa34b5a9cc844fd2fb90037df 100644 (file)
@@ -42,7 +42,8 @@
  *                               to overwrite timers like TLAN_TIMER_ACTIVITY
  *                               Patch from John Cagle <john.cagle@compaq.com>
  *                             - Removed dependency of HZ being 100.
- *
+ *                             - Statistics is now fixed.
+ *                             - Minor stuff.
  ********************************************************************************/
 
 
@@ -304,7 +305,7 @@ extern int init_module(void)
        u8              irq;
        u8              rev;
 
-       printk( "TLAN driver, v%d.%d, (C) 1997-8 Caldera, Inc.\n",
+       printk(KERN_INFO "TLAN driver, v%d.%d, (C) 1997-8 Caldera, Inc.\n",
                TLanVersionMajor,
                TLanVersionMinor
              );
@@ -360,7 +361,7 @@ extern int init_module(void)
                        priv->nextDevice = TLanDevices;
                        TLanDevices = dev;
                        TLanDevicesInstalled++;
-                       printk("TLAN:  %s irq=%2d io=%04x, %s, Rev. %d\n",
+                       printk(KERN_INFO "TLAN:  %s irq=%2d io=%04x, %s, Rev. %d\n",
                                dev->name,
                                (int) dev->irq,
                                (int) dev->base_addr,
@@ -499,7 +500,7 @@ extern int tlan_probe( struct device *dev )
        priv->debug =      dev->mem_end;
 
 
-       printk("TLAN %d.%d:  %s irq=%2d io=%04x, %s, Rev. %d\n",
+       printk(KERN_INFO "TLAN %d.%d:  %s irq=%2d io=%04x, %s, Rev. %d\n",
                TLanVersionMajor,
                TLanVersionMinor,
                dev->name, 
@@ -1990,13 +1991,13 @@ TLan_FinishReset( struct device *dev )
 
        if ( ( priv->adapter->flags & TLAN_ADAPTER_UNMANAGED_PHY ) || ( priv->aui ) ) {
                status = MII_GS_LINK;
-               printk( "TLAN:  %s: Link forced.\n", dev->name );
+               printk(KERN_INFO "TLAN:  %s: Link forced.\n", dev->name );
        } else {
                TLan_MiiReadReg( dev, phy, MII_GEN_STS, &status );
                udelay( 1000 );
                TLan_MiiReadReg( dev, phy, MII_GEN_STS, &status );
                if ( status & MII_GS_LINK ) {
-                       printk( "TLAN:  %s: Link active.\n", dev->name );
+                       printk(KERN_INFO "TLAN:  %s: Link active.\n", dev->name );
                        TLan_DioWrite8( dev->base_addr, TLAN_LED_REG, TLAN_LED_LINK );
                }
        }
@@ -2020,7 +2021,7 @@ TLan_FinishReset( struct device *dev )
                outl( virt_to_bus( priv->rxList ), dev->base_addr + TLAN_CH_PARM );
                outl( TLAN_HC_GO | TLAN_HC_RT, dev->base_addr + TLAN_HOST_CMD );
        } else {
-               printk( "TLAN:  %s: Link inactive, will retry in 10 secs...\n", dev->name );
+               printk(KERN_INFO "TLAN:  %s: Link inactive, will retry in 10 secs...\n", dev->name );
                TLan_SetTimer( dev, (10*HZ), TLAN_TIMER_FINISH_RESET );
                return;
        }
@@ -2304,7 +2305,7 @@ void TLan_PhyStartLink( struct device *dev )
                 * but the card need additional time to start AN.
                 * .5 sec should be plenty extra.
                 */
-               printk( "TLAN:  %s: Starting autonegotiation.\n", dev->name );
+               printk(KERN_INFO "TLAN:  %s: Starting autonegotiation.\n", dev->name );
                TLan_SetTimer( dev, (4*HZ), TLAN_TIMER_PHY_FINISH_AN );
                return;
        }
@@ -2313,7 +2314,7 @@ void TLan_PhyStartLink( struct device *dev )
                priv->phyNum = 0;
                data = TLAN_NET_CFG_1FRAG | TLAN_NET_CFG_1CHAN | TLAN_NET_CFG_PHY_EN;
                TLan_DioWrite16( dev->base_addr, TLAN_NET_CONFIG, data );
-               TLan_SetTimer( dev, (4*(HZ/1000)), TLAN_TIMER_PHY_PDOWN );
+               TLan_SetTimer( dev, (40*HZ/1000), TLAN_TIMER_PHY_PDOWN );
                return;
        } else if ( priv->phyNum == 0 ) {
                TLan_MiiReadReg( dev, phy, TLAN_TLPHY_CTL, &tctl );
@@ -2361,12 +2362,12 @@ void TLan_PhyFinishAutoNeg( struct device *dev )
                /* Wait for 8 sec to give the process
                 * more time.  Perhaps we should fail after a while.
                 */
-               printk( "TLAN:  Giving autonegotiation more time.\n" );
+               printk(KERN_INFO "TLAN:  Giving autonegotiation more time.\n" );
                TLan_SetTimer( dev, (8*HZ), TLAN_TIMER_PHY_FINISH_AN );
                return;
        }
 
-       printk( "TLAN:  %s: Autonegotiation complete.\n", dev->name );
+       printk(KERN_INFO "TLAN:  %s: Autonegotiation complete.\n", dev->name );
        TLan_MiiReadReg( dev, phy, MII_AN_ADV, &an_adv );
        TLan_MiiReadReg( dev, phy, MII_AN_LPA, &an_lpa );
        mode = an_adv & an_lpa & 0x03E0;
@@ -2380,17 +2381,17 @@ void TLan_PhyFinishAutoNeg( struct device *dev )
                priv->phyNum = 0;
                data = TLAN_NET_CFG_1FRAG | TLAN_NET_CFG_1CHAN | TLAN_NET_CFG_PHY_EN;
                TLan_DioWrite16( dev->base_addr, TLAN_NET_CONFIG, data );
-               TLan_SetTimer( dev, (400*(HZ/1000)), TLAN_TIMER_PHY_PDOWN );
+               TLan_SetTimer( dev, (400*HZ/1000), TLAN_TIMER_PHY_PDOWN );
                return;
        }
 
        if ( priv->phyNum == 0 ) {
                if ( ( priv->duplex == TLAN_DUPLEX_FULL ) || ( an_adv & an_lpa & 0x0040 ) ) {
                        TLan_MiiWriteReg( dev, phy, MII_GEN_CTL, MII_GC_AUTOENB | MII_GC_DUPLEX );
-                       printk( "TLAN:  Starting internal PHY with DUPLEX\n" );
+                       printk(KERN_INFO "TLAN:  Starting internal PHY with DUPLEX\n" );
                } else {
                        TLan_MiiWriteReg( dev, phy, MII_GEN_CTL, MII_GC_AUTOENB );
-                       printk( "TLAN:  Starting internal PHY with HALF-DUPLEX\n" );
+                       printk(KERN_INFO "TLAN:  Starting internal PHY with HALF-DUPLEX\n" );
                }
        }
 
index 4b5ca3a1907ed07cdca589b1a3a3f73a29aa0ec4..6447d544028757c5fbfe7d973fbec19bfc9c6a90 100644 (file)
@@ -279,6 +279,7 @@ static struct dev_info device_list[] =
 {"YAMAHA","CDR102","1.00", BLIST_NOLUN},       /* Locks up if polled for lun != 0 */
 {"YAMAHA","CRW8424S","1.0", BLIST_NOLUN},      /* Locks up if polled for lun != 0 */
 {"YAMAHA","CRW6416S","1.0c", BLIST_NOLUN},     /* Locks up if polled for lun != 0 */
+{"MITSUMI", "CD-R CR-2201CS", "6119", BLIST_NOLUN}, /* Locks up if polled for lun != 0 */
 {"RELISYS", "Scorpio", "*", BLIST_NOLUN},      /* responds to all LUN */
 
 /*
index bc7e76130d41a883b5def073354a7b186b0dc06c..731b1853386b3ebe34264b1531031fabfbb3db84 100644 (file)
@@ -507,7 +507,7 @@ static void ixj_timeout(unsigned long ptr)
                                        j->flags.cringing = 0;
                                        ixj_ring_off(board);
                                } else {
-                                       if (jiffies - j->ring_cadence_jif >= (.5 * hertz)) {
+                                       if (jiffies - j->ring_cadence_jif >= (hertz/2)) {
                                                j->ring_cadence_t--;
                                                if (j->ring_cadence_t == -1)
                                                        j->ring_cadence_t = 15;
index 06e48bc869d44c60211495adc63fd74fc7bc679a..d0d600fcac9cbd22137dc454b98fe3618523d812 100644 (file)
@@ -43,6 +43,7 @@
 #include <asm/uaccess.h>
 #include <asm/io.h>
 #include <asm/bitops.h>
+#include <asm/pgtable.h>
 
 #define NR_SIZES 7
 static char buffersize_index[65] =
@@ -1258,7 +1259,7 @@ bad_count:
 int brw_page(int rw, struct page *page, kdev_t dev, int b[], int size, int bmap)
 {
        struct buffer_head *bh, *prev, *next, *arr[MAX_BUF_PER_PAGE];
-       int block, nr;
+       int block, nr, need_dcache_flush;
 
        if (!PageLocked(page))
                panic("brw_page: page not locked for I/O");
@@ -1277,6 +1278,7 @@ int brw_page(int rw, struct page *page, kdev_t dev, int b[], int size, int bmap)
                return -ENOMEM;
        }
        nr = 0;
+       need_dcache_flush = 0;
        next = bh;
        do {
                struct buffer_head * tmp;
@@ -1303,9 +1305,10 @@ int brw_page(int rw, struct page *page, kdev_t dev, int b[], int size, int bmap)
                                        ll_rw_block(READ, 1, &tmp);
                                wait_on_buffer(tmp);
                        }
-                       if (rw == READ) 
+                       if (rw == READ) {
                                memcpy(next->b_data, tmp->b_data, size);
-                       else {
+                               need_dcache_flush = 1;
+                       } else {
                                memcpy(tmp->b_data, next->b_data, size);
                                mark_buffer_dirty(tmp, 0);
                        }
@@ -1319,6 +1322,8 @@ int brw_page(int rw, struct page *page, kdev_t dev, int b[], int size, int bmap)
                        set_bit(BH_Dirty, &next->b_state);
                arr[nr++] = next;
        } while (prev = next, (next = next->b_this_page) != NULL);
+       if (need_dcache_flush)
+               flush_dcache_page(page_address(page));
        prev->b_this_page = bh;
        
        if (nr) {
index 0494ad013605323f46fc82ae26ac7d4a94bde5ec..381a310b21ff053cf879d0da3756cbe196839297 100644 (file)
@@ -23,6 +23,7 @@
 
 #include <asm/uaccess.h>
 #include <asm/system.h>
+#include <asm/pgtable.h>
 
 /*
  * Fill in the supplied page for mmap
@@ -123,8 +124,12 @@ int fat_readpage(struct file *file, struct page * page)
        struct dentry * dentry = file->f_dentry;
        struct inode * inode = dentry->d_inode;
        if (MSDOS_SB(inode->i_sb)->cvf_format &&
-           MSDOS_SB(inode->i_sb)->cvf_format->cvf_readpage)
-               return MSDOS_SB(inode->i_sb)->cvf_format->cvf_readpage(inode,page);
+           MSDOS_SB(inode->i_sb)->cvf_format->cvf_readpage) {
+               int ret = MSDOS_SB(inode->i_sb)->cvf_format->cvf_readpage(inode,page);
+
+               flush_dcache_page(page_address(page));
+               return ret;
+       }
            
        printk("fat_readpage called with no handler (shouldn't happen)\n");
        return -1;
index f606b76e46be4d6ea28ed6f9b8a33ce4570eae8f..5d26cac22455712f299cf5595d6790badf2e0d94 100644 (file)
@@ -29,6 +29,7 @@
 
 #include <asm/segment.h>
 #include <asm/system.h>
+#include <asm/pgtable.h>
 
 #define NFSDBG_FACILITY                NFSDBG_PAGECACHE
 
@@ -111,6 +112,7 @@ nfs_readpage_sync(struct dentry *dentry, struct inode *inode, struct page *page)
        } while (count);
 
        memset(buffer, 0, count);
+       flush_dcache_page(page_address(page));
        set_bit(PG_uptodate, &page->flags);
        result = 0;
 
@@ -146,6 +148,7 @@ nfs_readpage_result(struct rpc_task *task)
                        memset((char *) address + result, 0, PAGE_SIZE - result);
                }
                nfs_refresh_inode(req->ra_inode, &req->ra_fattr);
+               flush_dcache_page(address);
                set_bit(PG_uptodate, &page->flags);
                succ++;
        } else {
index fd374842eeaff2b952277bca04a3ed3007b31dbc..4088b6b20e6c6904e9838bbb7e7b180ab42bbb8e 100644 (file)
@@ -59,6 +59,7 @@
 #include <linux/init.h>
 
 #include <asm/uaccess.h>
+#include <asm/pgtable.h>
 
 static int inline min(int a, int b)
 {
@@ -403,6 +404,7 @@ romfs_readpage(struct file * file, struct page * page)
                        if (readlen < PAGE_SIZE) {
                                memset((void *)(buf+readlen),0,PAGE_SIZE-readlen);
                        }
+                       flush_dcache_page(page_address(page));
                        set_bit(PG_uptodate, &page->flags);
                        result = 0;
                }
index aff45ef9b713dc581ec290c49655028595d81e28..fe7eab9ba306d4e45a9a891c1e8c5299a7564dad 100644 (file)
@@ -17,6 +17,7 @@
 
 #include <asm/uaccess.h>
 #include <asm/system.h>
+#include <asm/pgtable.h>
 
 #include <linux/smbno.h>
 #include <linux/smb_fs.h>
@@ -93,6 +94,7 @@ dentry->d_parent->d_name.name, dentry->d_name.name, result);
        } while (count);
 
        memset(buffer, 0, count);
+       flush_dcache_page(page_address(page));
        set_bit(PG_uptodate, &page->flags);
        result = 0;
 
index 5d8ddc96243912969e16044adf78f626dee0f16e..207ec099be3cb0ad18d4aaad8d7a5a51053811ea 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/net.h>
 #include <linux/mm.h>
 #include <linux/netdevice.h>
+#include <linux/smp_lock.h>
 #include <net/scm.h>
 #include <net/ip.h>
 
@@ -79,13 +80,31 @@ _send(struct socket *socket, const void *buff, int len)
        return err;
 }
 
+struct data_callback {
+       struct tq_struct cb;
+       struct sock *sk;
+};
 /*
  * N.B. What happens if we're in here when the socket closes??
  */
 static void
-smb_data_callback(struct sock *sk, int len)
+found_data(struct sock *sk)
 {
-       struct socket *socket = sk->socket;
+       /*
+        * FIXME: copied from sock_def_readable, it should be a call to
+        * server->data_ready();
+        */
+       if(!sk->dead) {
+               wake_up_interruptible(sk->sleep);
+               sock_wake_async(sk->socket,1);
+       }
+}
+
+static void
+smb_data_callback(void* ptr)
+{
+       struct data_callback* job=ptr;
+       struct socket *socket = job->sk->socket;
        unsigned char peek_buf[4];
        int result;
        mm_segment_t fs;
@@ -93,10 +112,11 @@ smb_data_callback(struct sock *sk, int len)
        fs = get_fs();
        set_fs(get_ds());
 
+       lock_kernel();
        while (1)
        {
                result = -EIO;
-               if (sk->dead)
+               if (job->sk->dead)
                {
 #ifdef SMBFS_PARANOIA
                        printk("smb_data_callback: sock dead!\n");
@@ -120,12 +140,30 @@ smb_data_callback(struct sock *sk, int len)
                if (result == -EAGAIN)
                        break;
        }
+       unlock_kernel();
        set_fs(fs);
 
        if (result != -EAGAIN)
-       {
-               wake_up_interruptible(sk->sleep);
+               found_data(job->sk);
+       kfree(ptr);
+}
+
+static void
+smb_data_ready(struct sock *sk, int len)
+{
+       struct data_callback* job;
+       job = kmalloc(sizeof(struct data_callback),GFP_ATOMIC);
+       if(job == 0) {
+               printk("smb_data_ready(): lost SESSION KEEPALIVE due to OOM.\n");
+               found_data(sk);
+               return;
        }
+       job->cb.next = NULL;
+       job->cb.sync = 0;
+       job->cb.routine = smb_data_callback;
+       job->cb.data = job;
+       job->sk = sk;
+       queue_task(&job->cb, &tq_scheduler);
 }
 
 int
@@ -182,8 +220,8 @@ smb_catch_keepalive(struct smb_sb_info *server)
        /*
         * Install the callback atomically to avoid races ...
         */
-       data_ready = xchg(&sk->data_ready, smb_data_callback);
-       if (data_ready != smb_data_callback)
+       data_ready = xchg(&sk->data_ready, smb_data_ready);
+       if (data_ready != smb_data_ready)
        {
                server->data_ready = data_ready;
                error = 0;
@@ -232,10 +270,10 @@ smb_dont_catch_keepalive(struct smb_sb_info *server)
         */
        data_ready = xchg(&sk->data_ready, server->data_ready);
        server->data_ready = NULL;
-       if (data_ready != smb_data_callback)
+       if (data_ready != smb_data_ready)
        {
                printk("smb_dont_catch_keepalive: "
-                      "sk->data_callback != smb_data_callback\n");
+                      "sk->data_ready != smb_data_ready\n");
        }
        error = 0;
 out:
@@ -256,7 +294,7 @@ smb_close_socket(struct smb_sb_info *server)
 printk("smb_close_socket: closing socket %p\n", server_sock(server));
 #endif
 #ifdef SMBFS_PARANOIA
-if (server_sock(server)->sk->data_ready == smb_data_callback)
+if (server_sock(server)->sk->data_ready == smb_data_ready)
 printk("smb_close_socket: still catching keepalives!\n");
 #endif
                server->sock_file = NULL;
index 9f12af06c094314e995a8a5094b71fb7863d15c5..41ced4b6cbf718a0d1dea847d268590ed3dbb2f5 100644 (file)
@@ -24,6 +24,7 @@
 #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)
 
 /*
  * Use a few helper functions to hide the ugly broken ASN
index 084999561f7b33173a7d3c4e543983ca068c8848..edfbab2533d402a4943d626d56fd80acf018073f 100644 (file)
@@ -9,6 +9,8 @@
 
 extern int do_check_pgt_cache(int, int);
 
+#define flush_dcache_page(page)                        do { } while (0)
+
 /* Needs to be defined here and not in linux/mm.h, as it is arch dependent */
 #define PageSkip(page)                 (0)
 #define kern_addr_valid(addr)          (1)
index 2166c4c6deeb64a4f348b60ce8bd30bb195aba58..b3e77c85a1b2076ac0a3e6db3f4e60e0c6a2f1b6 100644 (file)
@@ -7,12 +7,13 @@
  * Delay routines calling functions in arch/i386/lib/delay.c
  */
  
-extern void __udelay(unsigned long usecs);
 extern void __const_udelay(unsigned long usecs);
+extern void __udelay(unsigned long usecs);
 extern void __delay(unsigned long loops);
 
+
 #define udelay(n) (__builtin_constant_p(n) ? \
        __const_udelay((n) * 0x10c6ul) : \
        __udelay(n))
-
+       
 #endif /* defined(_I386_DELAY_H) */
index 7dc8ea026be10645911137d5db55e330f309bbff..c859e9f9860298df024e5fc95539bd8feff48b2c 100644 (file)
@@ -24,6 +24,7 @@
 #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)
 
 /*
  * TLB flushing:
index e00ff1aed6cf089750fc9b11ec0039fd83f8d558..54f411c67d447493deb2ac38ff8cdbfa3f1e3995 100644 (file)
@@ -161,6 +161,7 @@ extern inline void flush_icache_range (unsigned long address,
     }
 }
 
+#define flush_dcache_page(page)                        do { } while (0)
 
 /*
  * flush all user-space atc entries.
index 612e477c01b0ac7083e9a413e0a598489f48dd7e..749ad5eba065866a2b379f7d5d14b7499e428d9f 100644 (file)
@@ -33,6 +33,7 @@ extern void (*flush_cache_page)(struct vm_area_struct *vma, unsigned long page);
 extern void (*flush_cache_sigtramp)(unsigned long addr);
 extern void (*flush_page_to_ram)(unsigned long page);
 #define flush_icache_range(start, end) flush_cache_all()
+#define flush_dcache_page(page)                        do { } while (0)
 
 /* TLB flushing:
  *
index 385935507c39aecfeb44fd1a4121aa0ff8520a1f..2f4c21e48010a8a991a16df09d4bb52d7f9ec918 100644 (file)
@@ -71,9 +71,9 @@ static inline void kbd_init_hw(void)
                ppc_md.kbd_init_hw();
 }
 
-#define kbd_sysrq_xlate        (ppc_md.ppc_kbd_sysrq_xlate)
+#define kbd_sysrq_xlate        (ppc_md.kbd_sysrq_xlate)
 
-extern unsigned long SYSRQ_KEY;
+#define SYSRQ_KEY 0x54
 
 /* resource allocation */
 #define kbd_request_region()
index 36dfc68c78972b982635e042c9ac9dd7741b0f39..3ae6989a2c389ed428b6e2bbc991970f0cce8b5f 100644 (file)
@@ -34,6 +34,7 @@ extern void local_flush_tlb_range(struct mm_struct *mm, unsigned long start,
 
 extern void flush_icache_range(unsigned long, unsigned long);
 extern void flush_page_to_ram(unsigned long);
+#define flush_dcache_page(page)                        do { } while (0)
 
 extern unsigned long va_to_phys(unsigned long address);
 extern pte_t *va_to_pte(struct task_struct *tsk, unsigned long address);
index 16fd5335db867216a08b9bd52f4fe5f6e35744b8..1612112c3f6c45068035efcd02005e59d9568b75 100644 (file)
@@ -33,6 +33,7 @@
 #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)
 
 /*
  * TLB flushing:
index 41d18bf5518d07f7143aadea2b705842ad09b700..b49f3868c49caace4ba06dd7a8bae6189a79f788 100644 (file)
@@ -461,6 +461,7 @@ BTFIXUPDEF_CALL(void, flush_cache_page, struct vm_area_struct *, unsigned long)
 #define flush_cache_range(mm,start,end) BTFIXUP_CALL(flush_cache_range)(mm,start,end)
 #define flush_cache_page(vma,addr) BTFIXUP_CALL(flush_cache_page)(vma,addr)
 #define flush_icache_range(start, end)         do { } while (0)
+#define flush_dcache_page(page)                        do { } while (0)
 
 BTFIXUPDEF_CALL(void, flush_tlb_all, void)
 BTFIXUPDEF_CALL(void, flush_tlb_mm, struct mm_struct *)
index 4507be2f0cc7c00c50b0fdf532346bca84657c31..055e17c818a3ebb93130a3f1551e9a7a6f9897a2 100644 (file)
@@ -183,6 +183,8 @@ static void sun_fd_disable_dma(void)
        doing_pdma = 0;
        if (pdma_base) {
                mmu_unlockarea(pdma_base, pdma_areasize);
+               __flush_dcache_range((unsigned long)pdma_base,
+                                    (unsigned long)pdma_base + pdma_areasize);
                pdma_base = 0;
        }
 }
index 4ec01823d57a21bbf3dab2538d0d66fe10550d00..1d6ff0815cfbcdf2317bf07a224346156bb42b82 100644 (file)
@@ -174,6 +174,7 @@ extern void *sparc_init_alloc(unsigned long *kbrk, unsigned long size);
 /* These operations are unnecessary on the SpitFire since D-CACHE is write-through. */
 #define flush_icache_range(start, end)         do { } while (0)
 #define flush_page_to_ram(page)                        do { } while (0)
+extern void flush_dcache_page(unsigned long page);
 
 extern void __flush_dcache_range(unsigned long start, unsigned long end);
 
index d6cd0c25bb17397d9619b8ea01cac8a7dc901055..0c6a92ab5235327463a416ad4fb8a815a4c8ebf8 100644 (file)
@@ -42,7 +42,7 @@
  */
 
 /*
- *  ==FILEVERSION 990325==
+ *  ==FILEVERSION 20000223==
  *
  *  NOTE TO MAINTAINERS:
  *   If you modify this file at all, please set the above date.
@@ -86,10 +86,9 @@ struct ppp {
        /* Information specific to using ppp on async serial lines. */
        struct tty_struct *tty;         /* ptr to TTY structure */
        struct tty_struct *backup_tty;  /* TTY to use if tty gets closed */
+       unsigned long   state;          /* state flags, use atomic ops  */
        __u8            escape;         /* 0x20 if prev char was PPP_ESC */
        __u8            toss;           /* toss this frame              */
-       volatile __u8   tty_pushing;    /* internal state flag          */
-       volatile __u8   woke_up;        /* internal state flag          */
        __u32           xmit_async_map[8]; /* 1 bit means that given control 
                                           character is quoted on output*/
        __u32           recv_async_map; /* 1 bit means that given control 
index eb8463b73f610baff1186b05ea237a32d98bf2c4..e774cc2a322a301a99a20d8c8c548d40db821b95 100644 (file)
@@ -6,10 +6,10 @@
  * Status:        Experimental.
  * Author:        Dag Brattli <dagb@cs.uit.no>
  * Created at:    Thu Aug 21 00:02:07 1997
- * Modified at:   Sat Dec 25 21:09:47 1999
+ * Modified at:   Sat Feb 26 09:52:55 2000
  * Modified by:   Dag Brattli <dagb@cs.uit.no>
  * 
- *     Copyright (c) 1997, 1999 Dag Brattli <dagb@cs.uit.no>, 
+ *     Copyright (c) 1997-2000 Dag Brattli <dagb@cs.uit.no>, 
  *     All Rights Reserved.
  *     
  *     This program is free software; you can redistribute it and/or 
@@ -294,8 +294,8 @@ static void state_s_outstanding(struct iriap_cb *self, IRIAP_EVENT event,
 
        switch (event) {
        case IAP_RECV_F_LST:
-               iriap_send_ack(self);
-               /*LM_Idle_request(idle); */
+               /* iriap_send_ack(self); */
+               /* LM_Idle_request(idle); */
 
                iriap_next_call_state(self, S_WAIT_FOR_CALL);
                break;
index 181effb791a08b6cf6528c7ce46ef9f602fdd97c..31608bb9b7d3693d8a4f38e57e889cb5b67a1da3 100644 (file)
@@ -521,6 +521,7 @@ static int sock_fasync(int fd, struct file *filp, int on)
                if(fa!=NULL)
                {
                        fa->fa_fd=fd;
+                       synchronize_irq();
                        kfree_s(fna,sizeof(struct fasync_struct));
                        release_sock(sock->sk); 
                        return 0;
@@ -536,6 +537,7 @@ static int sock_fasync(int fd, struct file *filp, int on)
                if (fa!=NULL)
                {
                        *prev=fa->fa_next;
+                       synchronize_irq();
                        kfree_s(fa,sizeof(struct fasync_struct));
                }
        }