]> git.neil.brown.name Git - history.git/commitdiff
Import 2.1.13 2.1.13
authorLinus Torvalds <torvalds@linuxfoundation.org>
Fri, 23 Nov 2007 20:12:42 +0000 (15:12 -0500)
committerLinus Torvalds <torvalds@linuxfoundation.org>
Fri, 23 Nov 2007 20:12:42 +0000 (15:12 -0500)
80 files changed:
Makefile
arch/alpha/defconfig
arch/alpha/kernel/bios32.c
arch/alpha/lib/checksum.c
drivers/net/ibmtr.c
drivers/scsi/sr.c
drivers/sound/.blurb
drivers/sound/.objects
drivers/sound/.version
drivers/sound/CHANGELOG
drivers/sound/Makefile
drivers/sound/Makefile.old [new file with mode: 0644]
drivers/sound/Readme
drivers/sound/Readme.cards
drivers/sound/ad1848.c
drivers/sound/ad1848_mixer.h
drivers/sound/dev_table.h
drivers/sound/dmabuf.c
drivers/sound/gus_midi.c
drivers/sound/gus_wave.c
drivers/sound/ics2101.c
drivers/sound/lowlevel/awe_wave.c
drivers/sound/midi_synth.c
drivers/sound/midi_synth.h
drivers/sound/mpu401.c
drivers/sound/opl3.c
drivers/sound/os.h
drivers/sound/pas2_midi.c
drivers/sound/pas2_mixer.c
drivers/sound/pas2_pcm.c
drivers/sound/patmgr.c [deleted file]
drivers/sound/sb_common.c
drivers/sound/sb_mixer.c
drivers/sound/sequencer.c
drivers/sound/sound_calls.h
drivers/sound/sound_timer.c
drivers/sound/soundvers.h
drivers/sound/sscape.c
drivers/sound/sys_timer.c
drivers/sound/uart6850.c
drivers/sound/vivo.c [new file with mode: 0644]
include/asm-alpha/checksum.h
include/asm-alpha/socket.h
include/linux/ctype.h
include/linux/kdev_t.h
include/linux/net.h
include/linux/skbuff.h
include/linux/socket.h
include/linux/soundcard.h
include/linux/stddef.h
include/linux/swap.h
include/linux/swapctl.h
include/linux/wait.h
include/net/inet_common.h
include/net/sock.h
include/net/tcp.h
include/net/transp_v6.h
include/net/udp.h
init/main.c
kernel/fork.c
lib/ctype.c
mm/filemap.c
mm/swapfile.c
net/appletalk/ddp.c
net/ax25/af_ax25.c
net/core/skbuff.c
net/ipv4/af_inet.c
net/ipv4/packet.c
net/ipv4/tcp_ipv4.c
net/ipv4/tcp_output.c
net/ipv4/udp.c
net/ipv6/af_inet6.c
net/ipv6/tcp_ipv6.c
net/ipv6/udp.c
net/ipx/af_ipx.c
net/netrom/af_netrom.c
net/rose/af_rose.c
net/rose/rose_out [deleted file]
net/socket.c
net/unix/af_unix.c

index dd25f9b2ddb07eb4fa936143f66fba41451ed6bf..cc6f1b3d148c752bb6ba70354418bacf3495f42c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
 VERSION = 2
 PATCHLEVEL = 1
-SUBLEVEL = 12
+SUBLEVEL = 13
 
 ARCH = i386
 
index 0e4a4313420e91296cc3165ba2178cecfa810c8d..6108b393b8ddcc96759a783331ce5a9273d23eb5 100644 (file)
@@ -67,6 +67,7 @@ CONFIG_BLK_DEV_RAM=y
 #
 # Networking options
 #
+# CONFIG_NETLINK is not set
 # CONFIG_FIREWALL is not set
 # CONFIG_NET_ALIAS is not set
 CONFIG_INET=y
@@ -89,7 +90,6 @@ CONFIG_SKB_LARGE=y
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
 # CONFIG_AX25 is not set
-# CONFIG_NETLINK is not set
 
 #
 # SCSI support
@@ -145,12 +145,9 @@ CONFIG_SCSI_QLOGIC_ISP=y
 # Network device support
 #
 CONFIG_NETDEVICES=y
+# CONFIG_ARCNET is not set
 CONFIG_DUMMY=m
 # CONFIG_EQUALIZER is not set
-# CONFIG_PLIP is not set
-# CONFIG_PPP is not set
-# CONFIG_SLIP is not set
-# CONFIG_NET_RADIO is not set
 CONFIG_NET_ETHERNET=y
 # CONFIG_NET_VENDOR_3COM is not set
 # CONFIG_LANCE is not set
@@ -162,8 +159,12 @@ CONFIG_DE4X5=y
 # CONFIG_DEC_ELCP is not set
 # CONFIG_DGRS is not set
 # CONFIG_NET_POCKET is not set
+# CONFIG_FDDI is not set
+# CONFIG_PLIP is not set
+# CONFIG_PPP is not set
+# CONFIG_NET_RADIO is not set
+# CONFIG_SLIP is not set
 # CONFIG_TR is not set
-# CONFIG_ARCNET is not set
 
 #
 # ISDN subsystem
index 37f03b3549c80617788628bfae95cfe2b88b0573..67c3c4f7a687373de17cf9e2de084d6f2fad4d9f 100644 (file)
 
 int pcibios_present(void)
 {
-        return 0;
+       return 0;
 }
 asmlinkage int sys_pciconfig_read()
 {
-        return 0;
+       return 0;
 }
 asmlinkage int sys_pciconfig_write()
 {
-        return 0;
+       return 0;
 }
 
 #else /* CONFIG_PCI */
@@ -56,7 +56,7 @@ asmlinkage int sys_pciconfig_write()
 
 #include <asm/hwrpb.h>
 #include <asm/io.h>
-#include <asm/segment.h>
+#include <asm/uaccess.h>
 
 
 #define KB             1024
@@ -133,10 +133,10 @@ static void disable_dev(struct pci_dev *dev)
         * HACK: the PCI-to-EISA bridge does not seem to identify
         *       itself as a bridge... :-(
         */
-        if (dev->vendor == 0x8086 && dev->device == 0x0482) {
-          DBG_DEVS(("disable_dev: ignoring PCEB...\n"));
-          return;
-        }
+       if (dev->vendor == 0x8086 && dev->device == 0x0482) {
+         DBG_DEVS(("disable_dev: ignoring PCEB...\n"));
+         return;
+       }
 #endif
 
        bus = dev->bus;
@@ -165,10 +165,10 @@ static void layout_dev(struct pci_dev *dev)
         * HACK: the PCI-to-EISA bridge does not seem to identify
         *       itself as a bridge... :-(
         */
-        if (dev->vendor == 0x8086 && dev->device == 0x0482) {
-          DBG_DEVS(("layout_dev: ignoring PCEB...\n"));
-          return;
-        }
+       if (dev->vendor == 0x8086 && dev->device == 0x0482) {
+         DBG_DEVS(("layout_dev: ignoring PCEB...\n"));
+         return;
+       }
 #endif
 
        bus = dev->bus;
@@ -287,7 +287,7 @@ static void layout_dev(struct pci_dev *dev)
                        pcibios_write_config_dword(bus->number, dev->devfn,
                                                   reg, base);
                }
-        }
+       }
        /* enable device: */
        if (dev->class >> 8 == PCI_CLASS_NOT_DEFINED ||
            dev->class >> 8 == PCI_CLASS_NOT_DEFINED_VGA ||
@@ -339,7 +339,7 @@ static void layout_bus(struct pci_bus *bus)
         */
        for (dev = bus->devices; dev; dev = dev->sibling) {
                if (dev->class >> 16 != PCI_BASE_CLASS_BRIDGE) {
-                       disable_dev(dev) ;
+                       disable_dev(dev) ;
                }
        }
 
@@ -360,7 +360,7 @@ static void layout_bus(struct pci_bus *bus)
 
        for (child = bus->children; child; child = child->next) {
                layout_bus(child);
-        }
+       }
        /*
         * Align the current bases on 4K and 1MB boundaries:
         */
@@ -417,7 +417,7 @@ int pcibios_find_device (unsigned short vendor, unsigned short device_id,
                         unsigned short index, unsigned char *bus,
                         unsigned char *devfn)
 {
-        unsigned int curr = 0;
+       unsigned int curr = 0;
        struct pci_dev *dev;
 
        for (dev = pci_devices; dev; dev = dev->next) {
@@ -441,7 +441,7 @@ int pcibios_find_device (unsigned short vendor, unsigned short device_id,
 int pcibios_find_class (unsigned int class_code, unsigned short index,
                        unsigned char *bus, unsigned char *devfn)
 {
-        unsigned int curr = 0;
+       unsigned int curr = 0;
        struct pci_dev *dev;
 
        for (dev = pci_devices; dev; dev = dev->next) {
@@ -460,7 +460,7 @@ int pcibios_find_class (unsigned int class_code, unsigned short index,
 
 int pcibios_present(void)
 {
-        return 1;
+       return 1;
 }
 
 
@@ -537,8 +537,8 @@ static inline void enable_ide(long ide_base)
  */
 static inline unsigned char bridge_swizzle(unsigned char pin, unsigned int slot) 
 {
-        /* swizzle */
-        return (((pin-1) + slot) % 4) + 1 ;
+       /* swizzle */
+       return (((pin-1) + slot) % 4) + 1 ;
 }
 
 /*
@@ -559,14 +559,14 @@ static inline void common_fixup(long min_idsel, long max_idsel, long irqs_per_sl
         * Go through all devices, fixing up irqs as we see fit:
         */
        for (dev = pci_devices; dev; dev = dev->next) {
-               if (dev->class >> 16 != PCI_BASE_CLASS_BRIDGE
+               if (dev->class >> 16 != PCI_BASE_CLASS_BRIDGE
 #if defined(CONFIG_ALPHA_MIKASA) || defined(CONFIG_ALPHA_ALCOR)
                    /* PCEB (PCI to EISA bridge) does not identify
                       itself as a bridge... :-( */
                    && !((dev->vendor==0x8086) && (dev->device==0x482))
 #endif
                    ) {
-                       dev->irq = 0;
+                       dev->irq = 0;
                        /*
                         * This device is not on the primary bus, we need to figure out which
                         * interrupt pin it will come in on.   We know which slot it will come
@@ -575,7 +575,7 @@ static inline void common_fixup(long min_idsel, long max_idsel, long irqs_per_sl
                         * (see the inline static routine above).
                         */
                        if (dev->bus->number != 0) {
-                               struct pci_dev *curr = dev ;
+                               struct pci_dev *curr = dev ;
                                /* read the pin and do the PCI-PCI bridge interrupt pin swizzle */
                                pcibios_read_config_byte(dev->bus->number, dev->devfn,
                                                         PCI_INTERRUPT_PIN, &pin);
@@ -583,16 +583,16 @@ static inline void common_fixup(long min_idsel, long max_idsel, long irqs_per_sl
                                if (pin == 0) pin = 1 ;
                                /* follow the chain of bridges, swizzling as we go */
                                do {
-                                       /* swizzle */
-                                       pin = bridge_swizzle(pin, PCI_SLOT(curr->devfn)) ;
+                                       /* swizzle */
+                                       pin = bridge_swizzle(pin, PCI_SLOT(curr->devfn)) ;
                                        /* move up the chain of bridges */
                                        curr = curr->bus->self ;
                                } while (curr->bus->self) ;
                                /* The slot is the slot of the last bridge. */
                                slot = PCI_SLOT(curr->devfn) ;
                        } else {
-                               /* work out the slot */
-                               slot = PCI_SLOT(dev->devfn) ;
+                               /* work out the slot */
+                               slot = PCI_SLOT(dev->devfn) ;
                                /* read the pin */
                                pcibios_read_config_byte(dev->bus->number,
                                                         dev->devfn,
@@ -600,7 +600,7 @@ static inline void common_fixup(long min_idsel, long max_idsel, long irqs_per_sl
                                                         &pin);
                        }
                        if (irq_tab[slot - min_idsel][pin] != -1)
-                               dev->irq = irq_tab[slot - min_idsel][pin];
+                               dev->irq = irq_tab[slot - min_idsel][pin];
 #if PCI_MODIFY
                        /* tell the device: */
                        pcibios_write_config_byte(dev->bus->number, dev->devfn,
@@ -1041,7 +1041,7 @@ static inline void sio_fixup(void)
         */
        level_bits = 0;
        for (dev = pci_devices; dev; dev = dev->next) {
-               if (dev->class >> 16 == PCI_BASE_CLASS_BRIDGE)
+               if (dev->class >> 16 == PCI_BASE_CLASS_BRIDGE)
                        continue;
                dev->irq = 0;
                if (dev->bus->number != 0) {
@@ -1169,7 +1169,7 @@ unsigned long pcibios_fixup(unsigned long mem_start, unsigned long mem_end)
 #endif
 
 #ifdef CONFIG_TGA_CONSOLE
-        tga_console_init();
+       tga_console_init();
 #endif /* CONFIG_TGA_CONSOLE */
 
        return mem_start;
@@ -1178,28 +1178,28 @@ unsigned long pcibios_fixup(unsigned long mem_start, unsigned long mem_end)
 
 const char *pcibios_strerror (int error)
 {
-        static char buf[80];
+       static char buf[80];
 
-        switch (error) {
-                case PCIBIOS_SUCCESSFUL:
-                        return "SUCCESSFUL";
+       switch (error) {
+               case PCIBIOS_SUCCESSFUL:
+                       return "SUCCESSFUL";
 
-                case PCIBIOS_FUNC_NOT_SUPPORTED:
-                        return "FUNC_NOT_SUPPORTED";
+               case PCIBIOS_FUNC_NOT_SUPPORTED:
+                       return "FUNC_NOT_SUPPORTED";
 
-                case PCIBIOS_BAD_VENDOR_ID:
-                        return "SUCCESSFUL";
+               case PCIBIOS_BAD_VENDOR_ID:
+                       return "SUCCESSFUL";
 
-                case PCIBIOS_DEVICE_NOT_FOUND:
-                        return "DEVICE_NOT_FOUND";
+               case PCIBIOS_DEVICE_NOT_FOUND:
+                       return "DEVICE_NOT_FOUND";
 
-                case PCIBIOS_BAD_REGISTER_NUMBER:
-                        return "BAD_REGISTER_NUMBER";
+               case PCIBIOS_BAD_REGISTER_NUMBER:
+                       return "BAD_REGISTER_NUMBER";
 
-                default:
-                        sprintf (buf, "UNKNOWN RETURN 0x%x", error);
-                        return buf;
-        }
+               default:
+                       sprintf (buf, "UNKNOWN RETURN 0x%x", error);
+                       return buf;
+       }
 }
 
 asmlinkage int sys_pciconfig_read(
@@ -1209,35 +1209,35 @@ asmlinkage int sys_pciconfig_read(
        unsigned long len,
        unsigned char *buf)
 {
-        unsigned char ubyte;
-        unsigned short ushort;
-        unsigned int uint;
+       unsigned char ubyte;
+       unsigned short ushort;
+       unsigned int uint;
        long err = 0;
 
        switch (len) {
            case 1:
-               err = pcibios_read_config_byte(bus, dfn, off, &ubyte);
+               err = pcibios_read_config_byte(bus, dfn, off, &ubyte);
                if (err != PCIBIOS_SUCCESSFUL)
                    ubyte = 0xff;
                put_user(ubyte, buf);
                break;
            case 2:
-               err = pcibios_read_config_word(bus, dfn, off, &ushort);
+               err = pcibios_read_config_word(bus, dfn, off, &ushort);
                if (err != PCIBIOS_SUCCESSFUL)
                    ushort = 0xffff;
                put_user(ushort, (unsigned short *)buf);
                break;
            case 4:
-               err = pcibios_read_config_dword(bus, dfn, off, &uint);
+               err = pcibios_read_config_dword(bus, dfn, off, &uint);
                if (err != PCIBIOS_SUCCESSFUL)
                    uint = 0xffffffff;
                put_user(uint, (unsigned int *)buf);
                break;
            default:
-               err = -EINVAL;
-               break;
+               err = -EINVAL;
+               break;
        }
-        return err;
+       return err;
 }
 asmlinkage int sys_pciconfig_write(
        unsigned long bus,
@@ -1246,37 +1246,43 @@ asmlinkage int sys_pciconfig_write(
        unsigned long len,
        unsigned char *buf)
 {
-        unsigned char ubyte;
-        unsigned short ushort;
-        unsigned int uint;
-        long err = 0;
+       unsigned char ubyte;
+       unsigned short ushort;
+       unsigned int uint;
+       long err = 0;
 
        switch (len) {
            case 1:
-                ubyte = get_user(buf);
-                err = pcibios_write_config_byte(bus, dfn, off, ubyte);
-                if (err != PCIBIOS_SUCCESSFUL) {
+               err = get_user(ubyte, buf);
+               if (err)
+                       break;
+               err = pcibios_write_config_byte(bus, dfn, off, ubyte);
+               if (err != PCIBIOS_SUCCESSFUL) {
                        err = -EFAULT;
                }
                break;
            case 2:
-                ushort = get_user((unsigned short *)buf);
-                err = pcibios_write_config_word(bus, dfn, off, ushort);
-                if (err != PCIBIOS_SUCCESSFUL) {
+               err = get_user(ushort, (unsigned short *)buf);
+               if (err)
+                       break;
+               err = pcibios_write_config_word(bus, dfn, off, ushort);
+               if (err != PCIBIOS_SUCCESSFUL) {
                        err = -EFAULT;
                }
                break;
            case 4:
-                uint = get_user((unsigned int *)buf);
-                err = pcibios_write_config_dword(bus, dfn, off, uint);
-                if (err != PCIBIOS_SUCCESSFUL) {
+               err = get_user(uint, (unsigned int *)buf);
+               if (err)
+                       break;
+               err = pcibios_write_config_dword(bus, dfn, off, uint);
+               if (err != PCIBIOS_SUCCESSFUL) {
                        err = -EFAULT;
                }
                break;
            default:
-               err = -EINVAL;
-               break;
+               err = -EINVAL;
+               break;
        }
-        return err;
+       return err;
 }
 #endif /* CONFIG_PCI */
index 78667c7e3e1da12b36ade472fd957a38245fabf9..f95b535ca4fca9bf9d594d06151568ca55948b9c 100644 (file)
@@ -44,7 +44,7 @@ unsigned short int csum_tcpudp_magic(unsigned long saddr,
  * inner loop could be unrolled a bit further, and there are better
  * ways to do the carry, but this is reasonable.
  */
-static inline unsigned long do_csum(unsigned char * buff, int len)
+static inline unsigned long do_csum(const unsigned char * buff, int len)
 {
        int odd, count;
        unsigned long result = 0;
@@ -127,7 +127,7 @@ unsigned short ip_fast_csum(unsigned char * iph, unsigned int ihl)
  *
  * it's best to have buff aligned on a 32-bit boundary
  */
-unsigned int csum_partial(unsigned char * buff, int len, unsigned int sum)
+unsigned int csum_partial(const unsigned char * buff, int len, unsigned int sum)
 {
        unsigned long result = do_csum(buff, len);
 
index 1b51ecf3b7e4f703b307b70daddbfeaff2c82f1c..1238a9da9022a9af3487a895710a79625ace758d 100644 (file)
@@ -110,9 +110,6 @@ static char mcchannelid[]={0x04, 0x0d, 0x04, 0x01,
 #include <linux/sched.h>
 #include <linux/timer.h>
 #include <linux/in.h>
-#include <asm/io.h>
-#include <asm/system.h>
-#include <asm/bitops.h>
 #include <linux/ioport.h>
 #include <linux/errno.h>
 #include <linux/string.h>
@@ -121,7 +118,12 @@ static char mcchannelid[]={0x04, 0x0d, 0x04, 0x01,
 #include <linux/delay.h>
 #include <linux/netdevice.h>
 #include <linux/trdevice.h>
-#include <stddef.h>
+#include <linux/stddef.h>
+
+#include <asm/io.h>
+#include <asm/system.h>
+#include <asm/bitops.h>
+
 #include "ibmtr.h"
 
 
index 1f4d53cff09adfef8a3f46f98140fc963bffa4d2..72b207501c20a29a7891c7de3668feccf6f4fcc4 100644 (file)
@@ -35,6 +35,7 @@
 #include <linux/interrupt.h>
 #include <linux/config.h>
 #include <asm/system.h>
+#include <asm/io.h>
 
 #define MAJOR_NR SCSI_CDROM_MAJOR
 #include <linux/blk.h>
@@ -617,7 +618,7 @@ void requeue_sr_request (Scsi_Cmnd * SCpnt)
                    if (count+1 != SCpnt->use_sg) panic("Bad sr request list");
                    break;
                };
-               if (((long) sgpnt[count].address) + sgpnt[count].length - 1 >
+               if (virt_to_phys(sgpnt[count].address) + sgpnt[count].length - 1 >
                    ISA_DMA_THRESHOLD && SCpnt->host->unchecked_isa_dma) {
                    sgpnt[count].alt_address = sgpnt[count].address;
                    /* We try to avoid exhausting the DMA pool, since it is easier
@@ -681,7 +682,7 @@ void requeue_sr_request (Scsi_Cmnd * SCpnt)
            {
            this_count -= this_count % 4;
            buffer = (unsigned char *) SCpnt->request.buffer;
-           if (((long) buffer) + (this_count << 9) > ISA_DMA_THRESHOLD &&
+           if (virt_to_phys(buffer) + (this_count << 9) > ISA_DMA_THRESHOLD &&
                SCpnt->host->unchecked_isa_dma)
                buffer = (unsigned char *) scsi_malloc(this_count << 9);
            }
index cdb6f9e9052859706ad7728394bd1564f286b7ff..5203d3fbe24d5e7893fdb6d4af68a9a506096028 100644 (file)
@@ -1,10 +1,10 @@
 *********************************************************
 * Readme.cards (this directory) contains some card     *
 * specific instructions.                               *
-* See http://www.4front-tech.com/usslite for most up    *
+* See http://www.4front-tech.com/ossfree for most up    *
 * to date info.                                         *
 * (European mirror http://personal.eunet.fi/pp/voxware) *
 *                                                      *
-* DON'T USE PROGRAMS FROM SND_UTIL PACKAGE EARLIER THAN *
+* DON'T USE PROGRAMS FROM snd-util PACKAGE EARLIER THAN *
 * snd-util-3.5 WITH THIS SOUND DRIVER VERSION.          *
 *********************************************************
index df5184e6de0157ffa632e26aabd9052a4d3428e1..20f44261f3043cc4f9f3c672bcd6becaffb377ec 100644 (file)
@@ -56,10 +56,6 @@ ifdef CONFIG_PAS
        OBJS := $(OBJS)  pas2_card.o pas2_midi.o pas2_mixer.o pas2_pcm.o
 endif
 
-ifdef CONFIG_SEQUENCER
-       OBJS := $(OBJS)  patmgr.o
-endif
-
 ifdef CONFIG_PSS
        OBJS := $(OBJS)  pss.o
 endif
@@ -72,6 +68,7 @@ ifdef CONFIG_SEQUENCER
        OBJS := $(OBJS)  sequencer.o
 endif
 
+
 ifdef CONFIG_SEQUENCER
        OBJS := $(OBJS)  sound_timer.o
 endif
index 08b3451796cc902725362b9c52dbf9eb3a8641c7..d2bf6cccaeb207cd01fba3611145c593ec671ef4 100644 (file)
@@ -1,2 +1,2 @@
-3.7-beta6
-0x030701
+3.7-beta12
+0x030707
index e383ff1d986d86b631fcf632afae4203b5124ec3..c1437820f4e5eda694a529de7fc70f3ac491a7a5 100644 (file)
@@ -1,5 +1,9 @@
-Changelog for version 3.7-beta5
--------------------------------
+Changelog for version 3.7-beta10
+--------------------------------
+
+Since 3.5-beta5
+- Disabled MIDI input with GUS PnP (Interwave). There seems to be constant
+stream of received 0x00 bytes when the MIDI receiver is enabled.
 
 Since 3.5
 - Changes almost everywhere.
index fb0ab87e33976c4427513321072ef640ba5c5f19..499521c9f73b235ba1de7ca83ef3766cecfe6fac 100644 (file)
@@ -148,10 +148,10 @@ modules: local.h sound.o
 
 
 lowlevel/lowlevel.o: dummy
-               cd lowlevel;make
+               cd lowlevel;make CC="$(CC)" CFLAGS="$(CFLAGS)"
 
 contrib:
-               cd lowlevel;make clean;make module CFLAGS="$(CFLAGS)"
+               cd lowlevel;make clean;make module "CC=$(CC)" CFLAGS="$(CFLAGS)"
 
 ifdef USE_DEPEND
 #
diff --git a/drivers/sound/Makefile.old b/drivers/sound/Makefile.old
new file mode 100644 (file)
index 0000000..6f070e6
--- /dev/null
@@ -0,0 +1,164 @@
+# Makefile for the Linux sound card driver
+#
+# Note 2! The CFLAGS definitions are now inherited from the
+# parent makes. (hopefully)
+#
+#
+
+.PHONY: dummy
+SUB_DIRS       = lowlevel
+VERSION                = `head -1 .version`
+TARGET_OS      = linux
+USRINCDIR      = /usr/include
+MODULEDIR      = /lib/modules/misc
+
+FIXEDOBJS      = soundcard.o dev_table.o sound_switch.o
+
+ifndef NO_LOWLEVEL
+       FIXEDOBJS := $(FIXEDOBJS) lowlevel/lowlevel.o
+endif
+
+ifeq (.defines,$(wildcard .defines))
+include .defines
+include .objects
+endif
+
+ifndef TOPDIR
+TOPDIR=/usr/src/linux
+endif
+
+
+ifndef HOSTCC
+build:
+       @echo Compiling modularized sound driver
+       @make sound.o
+       @echo Sound module compiled.
+
+install:       sound.o
+       cp sound.o $(MODULEDIR)
+endif
+
+.c.o:
+       $(CC) $(CFLAGS) -c $<
+
+ifeq ($(CONFIG_SOUND),y)
+
+all:   local.h sound.a
+
+OBJS += $(FIXEDOBJS)
+
+else
+all:
+endif
+
+ifndef HOSTCC
+#
+#      Running outside the kernel build.
+#
+CC     = gcc
+HOSTCC = gcc
+CFLAGS = -O2 -D__KERNEL__ -DMODULE -I/usr/src/linux/include -Wall -Wstrict-prototypes -fomit-frame-pointer -pipe -m486
+USE_DEPEND=y
+else
+include $(TOPDIR)/Rules.make
+endif
+
+sound.a: $(OBJS) 
+       -rm -f sound.a
+       $(AR) rcs sound.a $(OBJS)
+       sync
+
+clean:
+       rm -f core core.* *.o *.a tmp_make *~ x y z *%
+       rm -f configure
+       cd lowlevel;make clean
+       cd vivo;make clean
+
+indent:
+       for n in *.c;do echo indent $$n;indent $$n;done
+
+local.h: 
+       $(MAKE) clean
+       $(MAKE) setup
+       $(MAKE) oldconfig
+       $(MAKE) dep
+       @echo
+       @echo
+       @echo
+       @echo NOTE! Object file dependencies may not be up to date. Run
+       @echo make again if kernel/driver doesn''t link properly. Restarting
+       @echo it now may save some time.
+       @echo
+       @echo
+
+config: configure
+       @$(MAKE) setup
+       @./configure > local.h
+       @echo \#define SOUND_CONFIG_DATE \"`date`\" >> local.h
+       @echo \#define SOUND_CONFIG_BY \"`whoami`\" >> local.h
+#      @echo \#define SOUND_CONFIG_HOST \"`hostname`\" >> local.h 2>/dev/null
+#      @echo \#define SOUND_CONFIG_DOMAIN \"`hostname -d`\" >> local.h 2>/dev/null
+       @echo \#define SOUND_UNAME_A \"`uname -a`\" >> local.h
+
+oldconfig: setup configure
+       @./configure -o > local.h
+       @echo \#define SOUND_CONFIG_DATE \"`date`\" >> local.h
+       @echo \#define SOUND_CONFIG_BY \"`whoami`\" >> local.h
+#      @echo \#define SOUND_CONFIG_HOST \"`hostname`\" >> local.h 2>/dev/null
+#      @echo \#define SOUND_CONFIG_DOMAIN \"`hostname -d`\" >> local.h 2>/dev/null
+       @echo \#define SOUND_UNAME_A \"`uname -a`\" >> local.h
+
+kernelconfig: setup
+       rm -f configure
+       $(HOSTCC) -o configure configure.c
+       ./configure fixedlocal > local.h
+       ./configure fixeddefines > .defines
+       @echo \#define SOUND_CONFIG_DATE \"`date`\" >> local.h
+       @echo \#define SOUND_CONFIG_BY \"`whoami`\" >> local.h
+#      @echo \#define SOUND_CONFIG_HOST \"`hostname`\" >> local.h 2>/dev/null
+#      @echo \#define SOUND_CONFIG_DOMAIN \"`hostname -d`\" >> local.h 2>/dev/null
+       @echo \#define SOUND_UNAME_A \"`uname -a`\" >> local.h
+
+mkscript: setup
+       rm -f configure
+       $(HOSTCC) -o configure configure.c
+       ./configure script > Config.in
+       cat lowlevel/Config.tmpl >> Config.in
+       ./configure fixedlocal > local.h
+       ./configure fixeddefines > .defines
+
+clrconf:
+       rm -f local.h .depend synth-ld.h trix_boot.h smw-midi0001.h maui_boot.h .defines
+
+configure: configure.c
+       $(HOSTCC) -o configure configure.c
+       @cat .blurb
+
+dep:
+       $(CPP) -M $(CFLAGS) -I. *.c > .depend
+
+setup:
+       @echo Compiling Sound Driver v $(VERSION) for Linux
+
+sound.o: local.h $(FIXEDOBJS) sound.a
+       -rm -f sound.o
+       $(LD) -r -o sound.o $(FIXEDOBJS) sound.a
+
+modules: local.h sound.o
+       ln -fs `pwd`/sound.o $(TOPDIR)/modules/sound.o
+
+
+lowlevel/lowlevel.o: dummy
+               cd lowlevel;make CC="$(CC)" CFLAGS="$(CFLAGS)"
+
+contrib:
+               cd lowlevel;make clean;make module "CC=$(CC)" CFLAGS="$(CFLAGS)"
+
+ifdef USE_DEPEND
+#
+# include a dependency file if one exists
+#
+ifeq (.depend,$(wildcard .depend))
+include .depend
+endif
+endif
index 16f7746cb5eac205a4c45c3ca2a47c24c7240226..0658b0128ab5abd26af67031429c08dea650ad94 100644 (file)
@@ -19,7 +19,7 @@ check http://www.4front-tech.com/pguide for more info.
 -  THIS VERSION ____REQUIRES____ Linux 2.1.5 OR LATER.
    ====================================================
 
-Packages "snd-util-3.5.tar.gz" and "snd-data-0.1.tar.Z"
+Packages "snd-util-3.7.tar.gz" and "snd-data-0.1.tar.Z"
 contain useful utilities to be used with this driver.
 See http://www.4front-tech.com/ossfree/getting.html for
 download instructions.
index 25fd775de5964b8be0aca13864a26b4b0c00b84d..25afef2ac0d9243b238cc01dbe6df041c1e8dc66 100644 (file)
@@ -85,7 +85,9 @@ support for PnP cards. There are bugs in setting DMA channels in earlier
 versions of isapnptools so at least version 1.6 is required with soundcards.
 
 Yet another way to use PnP cards is to use (commercial) OSS/Linux drivers.
-See http://www.4front-tech.com/linux.html for more info.
+See http://www.4front-tech.com/linux.html for more info. This is the way
+you propably like to do it if you don't waste hours of time in recompiling
+kernel and the required tools.
 
 Read this before trying to configure the driver
 -----------------------------------------------
index 5556718f432c87897ee14949dde79b0eb9633f3f..d40e4eb855439f3a8fd54c299e1a7c6141314b1e 100644 (file)
@@ -74,6 +74,7 @@ typedef struct
     int             timer_running;
     int             irq_ok;
     mixer_ents     *mix_devices;
+    int             mixer_output_port;
   }
 
 ad1848_info;
@@ -509,6 +510,11 @@ ad1848_mixer_reset (ad1848_info * devc)
     if (devc->supported_devices & (1 << i))
       ad1848_mixer_set (devc, i, devc->levels[i]);
   ad1848_set_recmask (devc, SOUND_MASK_MIC);
+  devc->mixer_output_port = devc->levels[31] | AUDIO_HEADPHONE | AUDIO_LINE_OUT;
+  if (devc->mixer_output_port & AUDIO_SPEAKER)
+    ad_write (devc, 26, ad_read (devc, 26) & ~0x40);   /* Unmute mono out */
+  else
+    ad_write (devc, 26, ad_read (devc, 26) | 0x40);    /* Mute mono out */
 }
 
 static int
@@ -516,6 +522,29 @@ ad1848_mixer_ioctl (int dev, unsigned int cmd, caddr_t arg)
 {
   ad1848_info    *devc = mixer_devs[dev]->devc;
 
+  if (cmd == SOUND_MIXER_PRIVATE1)
+    {
+      int             val;
+
+      get_user (val, (int *) arg);
+
+      if (val == 0xffff)
+       return ioctl_out (arg, devc->mixer_output_port);
+
+      val &= (AUDIO_SPEAKER | AUDIO_HEADPHONE | AUDIO_LINE_OUT);
+
+      devc->mixer_output_port = val;
+      val |= AUDIO_HEADPHONE | AUDIO_LINE_OUT; /* Always on */
+      devc->mixer_output_port = val;
+
+      if (val & AUDIO_SPEAKER)
+       ad_write (devc, 26, ad_read (devc, 26) & ~0x40);        /* Unmute mono out */
+      else
+       ad_write (devc, 26, ad_read (devc, 26) | 0x40);         /* Mute mono out */
+
+      return ioctl_out (arg, devc->mixer_output_port);
+    }
+
   if (((cmd >> 8) & 0xff) == 'M')
     {
       int             val;
@@ -961,25 +990,26 @@ ad1848_prepare_for_output (int dev, int bsize, int bcount)
   ad1848_info    *devc = (ad1848_info *) audio_devs[dev]->devc;
 
   ad_mute (devc);
-  {
+  if (devc->model != MD_4232)
+    {
 /*
  * This code fragment ensures that the playback FIFO is empty before
  * setting the codec for playback. Enabling playback for a moment should
  * be enough to do that.
  */
-    int             tmout;
+      int             tmout;
 
-    ad_write (devc, 9, ad_read (devc, 9) | 0x01);      /* Enable playback */
-    disable_dma (audio_devs[dev]->dmachan1);
-    for (tmout = 0; tmout < 1000000; tmout++)
-      if (ad_read (devc, 11) & 0x10)   /* DRQ active */
-       if (tmout > 10000)
-         break;
-    ad_write (devc, 9, ad_read (devc, 9) & ~0x01);     /* Stop playback */
+      ad_write (devc, 9, ad_read (devc, 9) | 0x01);    /* Enable playback */
+      disable_dma (audio_devs[dev]->dmachan1);
+      for (tmout = 0; tmout < 1000000; tmout++)
+       if (ad_read (devc, 11) & 0x10)  /* DRQ active */
+         if (tmout > 10000)
+           break;
+      ad_write (devc, 9, ad_read (devc, 9) & ~0x01);   /* Stop playback */
 
-    enable_dma (audio_devs[dev]->dmachan1);
-    devc->audio_mode &= ~PCM_ENABLE_OUTPUT;
-  }
+      enable_dma (audio_devs[dev]->dmachan1);
+      devc->audio_mode &= ~PCM_ENABLE_OUTPUT;
+    }
 
   return ad1848_prepare_for_IO (dev, bsize, bcount);
 }
@@ -1415,7 +1445,7 @@ ad1848_detect (int io_base, int *ad_flags, int *osp)
   for (i = 0; i < 16; i++)
     if ((tmp1 = ad_read (devc, i)) != (tmp2 = ad_read (devc, i + 16)))
       {
-       DDB (printk ("ad1848 detect step F(%d/%x/%x) - OPTi chip?\n", i, tmp1, tmp2));
+       DDB (printk ("ad1848 detect step F(%d/%x/%x) - OPTi chip???\n", i, tmp1, tmp2));
        if (!ad1847_flag)
          optiC930 = 1;
        break;
@@ -1511,6 +1541,12 @@ ad1848_detect (int io_base, int *ad_flags, int *osp)
                  devc->model = MD_4232;
                  break;
 
+               case 0x03:
+               case 0x83:
+                 devc->chip_name = "CS4236";
+                 devc->model = MD_4232;
+                 break;
+
                case 0x80:
                  {
                    /* 
@@ -1539,6 +1575,7 @@ ad1848_detect (int io_base, int *ad_flags, int *osp)
                  break;
 
                default:        /* Assume CS4231 or OPTi 82C930 */
+                 DDB (printk ("ad1848: I25 = %02x\n", ad_read (devc, 25)));
                  if (optiC930)
                    {
                      devc->chip_name = "82C930";
index 809b858bb39951cd0bfa2508fb0c8568766b0370..25b7455a6edab8cff55cd73cf146accf58931cc0 100644 (file)
@@ -166,3 +166,13 @@ static int default_mixer_levels[32] =
 
 #define LEFT_CHN       0
 #define RIGHT_CHN      1
+
+/*
+ * Channel enable bits for ioctl(SOUND_MIXER_PRIVATE1)
+ */
+
+#ifndef AUDIO_SPEAKER
+#define        AUDIO_SPEAKER           0x01    /* Enable mono output */
+#define        AUDIO_HEADPHONE         0x02    /* Sparc only */
+#define        AUDIO_LINE_OUT          0x04    /* Sparc only */
+#endif
index 84dd114863aba6b091bcef45282858826244b236..b07f9168bc27b642717085018a8e929214f3bea4 100644 (file)
@@ -210,7 +210,6 @@ struct synth_operations {
        void (*controller) (int dev, int voice, int ctrl_num, int value);
        void (*panning) (int dev, int voice, int value);
        void (*volume_method) (int dev, int mode);
-       int (*pmgr_interface) (int dev, struct patmgr_info *info);
        void (*bender) (int dev, int chn, int value);
        int (*alloc_voice) (int dev, int chn, int note, struct voice_alloc_info *alloc);
        void (*setup_voice) (int dev, int voice, int chn);
index bca21d0232ce2ad1c0113f832e5ed0c31f60cb9a..28aa8e836479813d6a5ba5d013e1366dc6281e0f 100644 (file)
@@ -203,7 +203,10 @@ open_dmap (int dev, int mode, struct dma_buffparms *dmap, int chan)
   }
 
   if (dmap->raw_buf == NULL)
-    return -ENOSPC;            /* Memory allocation failed during boot */
+    {
+      printk ("Sound: DMA buffers not available\n");
+      return -ENOSPC;          /* Memory allocation failed during boot */
+    }
 
   if (sound_open_dma (chan, audio_devs[dev]->name))
     {
@@ -452,6 +455,9 @@ launch_output (int dev, struct dma_buffparms *dmap)
 
   dmap->dma_mode |= DMODE_OUTPUT;
 
+  if (dmap->counts[dmap->qhead] == 0)
+    dmap->counts[dmap->qhead] = dmap->fragment_size;
+
   audio_devs[dev]->d->output_block (dev, dmap->raw_buf_phys +
                                    dmap->qhead * dmap->fragment_size,
                                    dmap->counts[dmap->qhead], 0,
@@ -870,7 +876,7 @@ get_buffer_pointer (int dev, int chan, struct dma_buffparms *dmap)
       pos = get_dma_residue (chan);
       if (chan > 3)            /* Word count */
        pos *= 2;
-      pos = dmap->bytes_in_use - pos;
+      pos = dmap->bytes_in_use - pos - 1;
       if (pos < 0)
        pos = 0;
       if (pos > dmap->bytes_in_use)
@@ -1605,6 +1611,9 @@ DMAbuf_outputintr (int dev, int event_type)
 
       if (!(audio_devs[dev]->flags & DMA_AUTOMODE))
        {
+         if (dmap->counts[dmap->qhead] == 0)
+           dmap->counts[dmap->qhead] = dmap->fragment_size;
+
          audio_devs[dev]->d->output_block (dev, dmap->raw_buf_phys +
                                          dmap->qhead * dmap->fragment_size,
                                            dmap->counts[dmap->qhead], 1,
index 89fb3be2caa2d406ea1da12872e9bee075d14cb5..f09edd6937a0d0a7c880206e23b0c081258f1b2d 100644 (file)
@@ -27,6 +27,7 @@ static volatile unsigned char gus_midi_control;
 static void     (*midi_input_intr) (int dev, unsigned char data);
 
 static unsigned char tmp_queue[256];
+extern int      gus_pnp_flag;
 static volatile int qlen;
 static volatile unsigned char qhead, qtail;
 extern int      gus_base, gus_irq, gus_dma;
@@ -58,10 +59,11 @@ gus_midi_open (int dev, int mode,
   input_opened = 0;
 
   if (mode == OPEN_READ || mode == OPEN_READWRITE)
-    {
-      gus_midi_control |= MIDI_ENABLE_RCV;
-      input_opened = 1;
-    }
+    if (!gus_pnp_flag)
+      {
+       gus_midi_control |= MIDI_ENABLE_RCV;
+       input_opened = 1;
+      }
 
 
   outb ((gus_midi_control), u_MidiControl);    /* Enable */
index 7166556382fe0defe967d2d7a207d3016247664e..a4caf4f8aa2c62a770b38575ec14b68994d8b6a3 100644 (file)
@@ -1749,9 +1749,6 @@ guswave_load_patch (int dev, int format, const char *addr,
 
   count -= sizeof_patch;
 
-  if (gus_mem_size == 0)
-    return -ENOSPC;
-
   if (free_sample >= MAX_SAMPLE)
     {
       printk ("GUS: Sample table full\n");
@@ -1765,6 +1762,12 @@ guswave_load_patch (int dev, int format, const char *addr,
 
   copy_from_user (&((char *) &patch)[offs], &(addr)[offs], sizeof_patch - offs);
 
+  if (patch.mode & WAVE_ROM)
+    return -EINVAL;
+  if (gus_mem_size == 0)
+
+    return -ENOSPC;
+
   instr = patch.instr_no;
 
   if (instr < 0 || instr > MAX_PATCH)
@@ -1993,8 +1996,6 @@ guswave_load_patch (int dev, int format, const char *addr,
 
   free_mem_ptr += patch.len;
 
-  if (!pmgr_flag)
-    pmgr_inform (dev, PM_E_PATCH_LOADED, instr, free_sample, 0, 0);
   free_sample++;
   return 0;
 }
@@ -2275,40 +2276,6 @@ gus_audio_ioctl (int dev, unsigned int cmd, caddr_t arg, int local)
       return ioctl_out (arg, -EINVAL);
       break;
 
-/* This is just a temporary hack used for reading the ROM patch set. */
-
-    case SNDCTL_PMGR_ACCESS:
-      {
-       copr_msg       *buf;
-       int             i, pos;
-
-       buf = (copr_msg *) vmalloc (sizeof (copr_msg));
-       if (buf == NULL)
-         return -ENOSPC;
-
-       copy_from_user ((char *) buf, &((char *) arg)[0], sizeof (*buf));
-
-       pos = buf->len;
-
-       gus_write8 (0x53, gus_look8 (0x53) | 0x02);     /* Select ROM I/O access */
-
-       for (i = 0; i < 2048; i++)
-         {
-           buf->data[i] = gus_peek (pos + i);
-         }
-       gus_write8 (0x53, gus_look8 (0x53) & ~0x02);    /* Select DRAM I/O access */
-       buf->len = 2048;        /* feed back number of WORDs sent */
-       {
-         char           *fixit = (char *) buf;
-
-         copy_to_user (&((char *) arg)[0], fixit, sizeof (*buf));
-       };
-       vfree (buf);
-
-       return 0;
-      }
-      break;
-
     }
   return -EINVAL;
 }
@@ -2810,189 +2777,6 @@ guswave_bender (int dev, int voice, int value)
   restore_flags (flags);
 }
 
-static int
-guswave_patchmgr (int dev, struct patmgr_info *rec)
-{
-  int             i, n;
-
-  switch (rec->command)
-    {
-    case PM_GET_DEVTYPE:
-      rec->parm1 = PMTYPE_WAVE;
-      return 0;
-      break;
-
-    case PM_GET_NRPGM:
-      rec->parm1 = MAX_PATCH;
-      return 0;
-      break;
-
-    case PM_GET_PGMMAP:
-      rec->parm1 = MAX_PATCH;
-
-      for (i = 0; i < MAX_PATCH; i++)
-       {
-         int             ptr = patch_table[i];
-
-         rec->data.data8[i] = 0;
-
-         while (ptr >= 0 && ptr < free_sample && ptr != NOT_SAMPLE)
-           {
-             rec->data.data8[i]++;
-             ptr = samples[ptr].key;   /* Follow link */
-           }
-       }
-      return 0;
-      break;
-
-    case PM_GET_PGM_PATCHES:
-      {
-       int             ptr = patch_table[rec->parm1];
-
-       n = 0;
-
-       while (ptr >= 0 && ptr < free_sample && ptr != NOT_SAMPLE)
-         {
-           rec->data.data32[n++] = ptr;
-           ptr = samples[ptr].key;     /* Follow link */
-         }
-      }
-      rec->parm1 = n;
-      return 0;
-      break;
-
-    case PM_GET_PATCH:
-      {
-       int             ptr = rec->parm1;
-       struct patch_info *pat;
-
-       if (ptr < 0 || ptr >= free_sample)
-         return -EINVAL;
-
-       memcpy (rec->data.data8, (char *) &samples[ptr],
-               sizeof (struct patch_info));
-
-       pat = (struct patch_info *) rec->data.data8;
-
-       pat->key = GUS_PATCH;   /* Restore patch type */
-       rec->parm1 = sample_ptrs[ptr];  /* DRAM location */
-       rec->parm2 = sizeof (struct patch_info);
-      }
-      return 0;
-      break;
-
-    case PM_SET_PATCH:
-      {
-       int             ptr = rec->parm1;
-       struct patch_info *pat;
-
-       if (ptr < 0 || ptr >= free_sample)
-         return -EINVAL;
-
-       pat = (struct patch_info *) rec->data.data8;
-
-       if (pat->len > samples[ptr].len)        /* Cannot expand sample */
-         return -EINVAL;
-
-       pat->key = samples[ptr].key;    /* Ensure the link is correct */
-
-       memcpy ((char *) &samples[ptr], rec->data.data8,
-               sizeof (struct patch_info));
-
-       pat->key = GUS_PATCH;
-      }
-      return 0;
-      break;
-
-    case PM_READ_PATCH:        /* Returns a block of wave data from the DRAM */
-      {
-       int             sample = rec->parm1;
-       int             n;
-       long            offs = rec->parm2;
-       int             l = rec->parm3;
-
-       if (sample < 0 || sample >= free_sample)
-         return -EINVAL;
-
-       if (offs < 0 || offs >= samples[sample].len)
-         return -EINVAL;       /* Invalid offset */
-
-       n = samples[sample].len - offs;         /* Num of bytes left */
-
-       if (l > n)
-         l = n;
-
-       if (l > sizeof (rec->data.data8))
-         l = sizeof (rec->data.data8);
-
-       if (l <= 0)
-         return -EINVAL;       /*
-                                  * Was there a bug?
-                                */
-
-       offs += sample_ptrs[sample];    /*
-                                        * Begin offset + offset to DRAM
-                                        */
-
-       for (n = 0; n < l; n++)
-         rec->data.data8[n] = gus_peek (offs++);
-       rec->parm1 = n;         /*
-                                * Nr of bytes copied
-                                */
-      }
-      return 0;
-      break;
-
-    case PM_WRITE_PATCH:       /*
-                                * Writes a block of wave data to the DRAM
-                                */
-      {
-       int             sample = rec->parm1;
-       int             n;
-       long            offs = rec->parm2;
-       int             l = rec->parm3;
-
-       if (sample < 0 || sample >= free_sample)
-         return -EINVAL;
-
-       if (offs < 0 || offs >= samples[sample].len)
-         return -EINVAL;       /*
-                                  * Invalid offset
-                                */
-
-       n = samples[sample].len - offs;         /*
-                                                  * Nr of bytes left
-                                                */
-
-       if (l > n)
-         l = n;
-
-       if (l > sizeof (rec->data.data8))
-         l = sizeof (rec->data.data8);
-
-       if (l <= 0)
-         return -EINVAL;       /*
-                                  * Was there a bug?
-                                */
-
-       offs += sample_ptrs[sample];    /*
-                                        * Begin offsets + offset to DRAM
-                                        */
-
-       for (n = 0; n < l; n++)
-         gus_poke (offs++, rec->data.data8[n]);
-       rec->parm1 = n;         /*
-                                * Nr of bytes copied
-                                */
-      }
-      return 0;
-      break;
-
-    default:
-      return -EINVAL;
-    }
-}
-
 static int
 guswave_alloc (int dev, int chn, int note, struct voice_alloc_info *alloc)
 {
@@ -3058,7 +2842,6 @@ static struct synth_operations guswave_operations =
   guswave_controller,
   guswave_panning,
   guswave_volume_method,
-  guswave_patchmgr,
   guswave_bender,
   guswave_alloc,
   guswave_setup_voice
@@ -3440,8 +3223,8 @@ gus_wave_init (struct address_info *hw_config)
     }
 
   conf_printf (tmp2, hw_config);
-  strncpy (gus_info.name, tmp2, sizeof (tmp2));
-  gus_info.name[sizeof (tmp2) - 1] = 0;
+  tmp2[sizeof (gus_info.name) - 1] = 0;
+  strncpy (gus_info.name, tmp2, strlen (tmp2));
 
   if (num_synths >= MAX_SYNTH_DEV)
     printk ("GUS Error: Too many synthesizers\n");
index ab04953a451b0ed3f7ed81945d7c4d3e6f1cb1d5..732c1c431fb40fd02a12d36d9e0a2e5c4de3193a 100644 (file)
@@ -121,35 +121,41 @@ ics2101_mixer_ioctl (int dev, unsigned int cmd, caddr_t arg)
   if (((cmd >> 8) & 0xff) == 'M')
     {
       if (_IOC_DIR (cmd) & _IOC_WRITE)
-       switch (cmd & 0xff)
-         {
-         case SOUND_MIXER_RECSRC:
-           return gus_default_mixer_ioctl (dev, cmd, arg);
-           break;
+       {
+         int             val;
 
-         case SOUND_MIXER_MIC:
-           return ioctl_out (arg, set_volumes (DEV_MIC, ioctl_in (arg)));
-           break;
+         get_user (val, (int *) arg);
 
-         case SOUND_MIXER_CD:
-           return ioctl_out (arg, set_volumes (DEV_CD, ioctl_in (arg)));
-           break;
+         switch (cmd & 0xff)
+           {
+           case SOUND_MIXER_RECSRC:
+             return gus_default_mixer_ioctl (dev, cmd, arg);
+             break;
 
-         case SOUND_MIXER_LINE:
-           return ioctl_out (arg, set_volumes (DEV_LINE, ioctl_in (arg)));
-           break;
+           case SOUND_MIXER_MIC:
+             return ioctl_out (arg, set_volumes (DEV_MIC, val));
+             break;
 
-         case SOUND_MIXER_SYNTH:
-           return ioctl_out (arg, set_volumes (DEV_GF1, ioctl_in (arg)));
-           break;
+           case SOUND_MIXER_CD:
+             return ioctl_out (arg, set_volumes (DEV_CD, val));
+             break;
 
-         case SOUND_MIXER_VOLUME:
-           return ioctl_out (arg, set_volumes (DEV_VOL, ioctl_in (arg)));
-           break;
+           case SOUND_MIXER_LINE:
+             return ioctl_out (arg, set_volumes (DEV_LINE, val));
+             break;
 
-         default:
-           return -EINVAL;
-         }
+           case SOUND_MIXER_SYNTH:
+             return ioctl_out (arg, set_volumes (DEV_GF1, val));
+             break;
+
+           case SOUND_MIXER_VOLUME:
+             return ioctl_out (arg, set_volumes (DEV_VOL, val));
+             break;
+
+           default:
+             return -EINVAL;
+           }
+       }
       else
        switch (cmd & 0xff)     /*
                                 * Return parameters
index e44d5a2210ecb99cdf4d035ddda00763c0f0b77a..7b49e9ada31a0c3fca77a5ae0881db5b73edd9bd 100644 (file)
@@ -245,7 +245,6 @@ static void awe_aftertouch(int dev, int voice, int pressure);
 static void awe_controller(int dev, int voice, int ctrl_num, int value);
 static void awe_panning(int dev, int voice, int value);
 static void awe_volume_method(int dev, int mode);
-static int awe_patchmgr(int dev, struct patmgr_info *rec);
 static void awe_bender(int dev, int voice, int value);
 static int awe_alloc(int dev, int chn, int note, struct voice_alloc_info *alloc);
 static void awe_setup_voice(int dev, int voice, int chn);
@@ -374,7 +373,6 @@ static struct synth_operations awe_operations =
        awe_controller,
        awe_panning,
        awe_volume_method,
-       awe_patchmgr,
        awe_bender,
        awe_alloc,
        awe_setup_voice
@@ -2544,15 +2542,6 @@ awe_volume_method(int dev, int mode)
 }
 
 
-/* patch manager */
-static int
-awe_patchmgr(int dev, struct patmgr_info *rec)
-{
-       FATALERR(printk("AWE32 Warning: patch manager control not supported\n"));
-       return 0;
-}
-
-
 /* pitch wheel change: 0-16384 */
 static void
 awe_bender(int dev, int voice, int value)
index 64cde661a97aafe94ba0313591b3beb1ba719bf6..4e26b3464da73a6ffc3b54c764c22b19ea87470e 100644 (file)
@@ -652,12 +652,6 @@ midi_synth_controller (int dev, int channel, int ctrl_num, int value)
   midi_outc (orig_dev, value & 0x7f);
 }
 
-int
-midi_synth_patchmgr (int dev, struct patmgr_info *rec)
-{
-  return -EINVAL;
-}
-
 void
 midi_synth_bender (int dev, int channel, int value)
 {
index a2c812b30c22278f35532fee256b6271c3863aed..e29618fd542a6603b5dd6a472a47f880b1cf0bd5 100644 (file)
@@ -12,7 +12,6 @@ int midi_synth_load_patch (int dev, int format, const char * addr,
 void midi_synth_panning (int dev, int channel, int pressure);
 void midi_synth_aftertouch (int dev, int channel, int pressure);
 void midi_synth_controller (int dev, int channel, int ctrl_num, int value);
-int midi_synth_patchmgr (int dev, struct patmgr_info *rec);
 void midi_synth_bender (int dev, int chn, int value);
 void midi_synth_setup_voice (int dev, int voice, int chn);
 int midi_synth_send_sysex(int dev, unsigned char *bytes,int len);
@@ -40,7 +39,6 @@ static struct synth_operations std_midi_synth =
   midi_synth_controller,
   midi_synth_panning,
   NULL,
-  midi_synth_patchmgr,
   midi_synth_bender,
   NULL,        /* alloc_voice */
   midi_synth_setup_voice,
index 132d63e20ac652ef45c32b7a49ab36736bdfbdc5..9256685ce9640c583d74742000fbe22c7b9ecdab 100644 (file)
@@ -21,8 +21,6 @@
 #if (defined(CONFIG_MPU401) || defined(CONFIG_MPU_EMU)) && defined(CONFIG_MIDI)
 #include "coproc.h"
 
-static int      init_sequence[20];     /* NOTE! pos 0 = len, start pos 1. */
-
 
 #ifdef CONFIG_SEQUENCER
 static int      timer_mode = TMR_INTERNAL, timer_caps = TMR_INTERNAL;
@@ -775,23 +773,20 @@ static int
 mpu401_ioctl (int dev, unsigned cmd, caddr_t arg)
 {
   struct mpu_config *devc;
+  int             val;
 
   devc = &dev_conf[dev];
 
   switch (cmd)
     {
-    case 1:
-      copy_from_user ((char *) init_sequence, &((char *) arg)[0], sizeof (init_sequence));
-      return 0;
-      break;
-
     case SNDCTL_MIDI_MPUMODE:
       if (!(devc->capabilities & MPU_CAP_INTLG))       /* No intelligent mode */
        {
          printk ("MPU-401: Intelligent mode not supported by the HW\n");
          return -EINVAL;
        }
-      set_uart_mode (dev, devc, !ioctl_in (arg));
+      get_user (val, (int *) arg);
+      set_uart_mode (dev, devc, !val);
       return 0;
       break;
 
@@ -976,7 +971,6 @@ static struct synth_operations mpu401_synth_proto =
   midi_synth_controller,
   midi_synth_panning,
   NULL,
-  midi_synth_patchmgr,
   midi_synth_bender,
   NULL,                                /* alloc */
   midi_synth_setup_voice,
@@ -1639,8 +1633,9 @@ mpu_timer_ioctl (int dev,
 
     case SNDCTL_TMR_TIMEBASE:
       {
-       int             val = (int) ioctl_in (arg);
+       int             val;
 
+       get_user (val, (int *) arg);
        if (val)
          set_timebase (midi_dev, val);
 
@@ -1650,9 +1645,11 @@ mpu_timer_ioctl (int dev,
 
     case SNDCTL_TMR_TEMPO:
       {
-       int             val = (int) ioctl_in (arg);
+       int             val;
        int             ret;
 
+       get_user (val, (int *) arg);
+
        if (val)
          {
            if (val < 8)
@@ -1673,10 +1670,15 @@ mpu_timer_ioctl (int dev,
       break;
 
     case SNDCTL_SEQ_CTRLRATE:
-      if (ioctl_in (arg) != 0) /* Can't change */
-       return -EINVAL;
+      {
+       int             val;
+
+       get_user (val, (int *) arg);
+       if (val != 0)           /* Can't change */
+         return -EINVAL;
 
-      return ioctl_out (arg, ((curr_tempo * curr_timebase) + 30) / 60);
+       return ioctl_out (arg, ((curr_tempo * curr_timebase) + 30) / 60);
+      }
       break;
 
     case SNDCTL_SEQ_GETTIME:
@@ -1684,7 +1686,7 @@ mpu_timer_ioctl (int dev,
       break;
 
     case SNDCTL_TMR_METRONOME:
-      metronome_mode = (int) ioctl_in (arg);
+      get_user (metronome_mode, (int *) arg);
       setup_metronome (midi_dev);
       return 0;
       break;
index c501cc7c06830365a2cd3e9f174150a97534a8a3..afd19317fd03fb3a3a4ded0de26ac9a9710061b2 100644 (file)
@@ -127,7 +127,6 @@ opl3_ioctl (int dev,
            return -EINVAL;
          }
 
-       pmgr_inform (dev, PM_E_PATCH_LOADED, ins.channel, 0, 0, 0);
        return store_instr (ins.channel, &ins);
       }
       break;
@@ -1015,12 +1014,6 @@ opl3_controller (int dev, int voice, int ctrl_num, int value)
     }
 }
 
-static int
-opl3_patchmgr (int dev, struct patmgr_info *rec)
-{
-  return -EINVAL;
-}
-
 static void
 opl3_bender (int dev, int voice, int value)
 {
@@ -1131,7 +1124,6 @@ static struct synth_operations opl3_operations =
   opl3_controller,
   opl3_panning,
   opl3_volume_method,
-  opl3_patchmgr,
   opl3_bender,
   opl3_alloc_voice,
   opl3_setup_voice
index 04a79fbbd5633d5b561d7a288df79bc6fcffbac7..d07f6735c42455c2313743cd5d6ea288951033c9 100644 (file)
@@ -1,3 +1,9 @@
+
+#define ALLOW_SELECT
+#undef NO_INLINE_ASM
+#define SHORT_BANNERS
+#define MANUAL_PNP
+
 #ifdef MODULE
 #define __NO_VERSION__
 #include <linux/module.h>
@@ -6,6 +12,9 @@
 #include <linux/modversions.h>
 #endif
 #endif
+#if LINUX_VERSION_CODE > 131328
+#define LINUX21X
+#endif
 
 #include <linux/param.h>
 #include <linux/types.h>
 #include <linux/sched.h>
 #include <linux/ctype.h>
 #include <asm/io.h>
-#include <asm/uaccess.h>
+#include <asm/segment.h>
 #include <asm/system.h>
 #include <asm/dma.h>
 #include <linux/wait.h>
 #include <linux/malloc.h>
 #include <linux/vmalloc.h>
+#include <asm/uaccess.h>
 #include <linux/string.h>
 #include <linux/ioport.h>
 #include <linux/utsname.h>
@@ -32,6 +42,8 @@
 #define FALSE  0
 #define TRUE   1
 
+
+
 struct snd_wait {
          int opts;
        };
@@ -41,5 +53,11 @@ extern int sound_open_dma(int chn, char *deviceID);
 extern void sound_free_dma(int chn);
 extern void sound_close_dma(int chn);
 
+#define RUNTIME_DMA_ALLOC
+
 extern caddr_t sound_mem_blocks[1024];
 extern int sound_nblocks;
+
+#undef PSEUDO_DMA_AUTOINIT
+#define ALLOW_BUFFER_MAPPING
+
index 974443c9611cd5254b821916541ce55704ea9a76..74d04750e432a7151d845e7a8f3033e308afc4e0 100644 (file)
@@ -3,9 +3,17 @@
  *
  * The low level driver for the PAS Midi Interface.
  */
+/*
+ * Copyright (C) by Hannu Savolainen 1993-1996
+ *
+ * OSS/Free for Linux is distributed under the GNU GENERAL PUBLIC LICENSE (GPL)
+ * Version 2 (June 1991). See the "COPYING" file distributed with this software
+ * for more info.
+ */
+#include <linux/config.h>
+
 
 #include "sound_config.h"
-#include <linux/config.h>
 
 #if defined(CONFIG_PAS) && defined(CONFIG_MIDI)
 
index 0e05d9b8bd3e571737f5f1068b3b2c405240a35d..917d37809e4869a779f25f74e2de48ecfc2bbe2c 100644 (file)
@@ -6,7 +6,15 @@
  * Mixer routines for the Pro Audio Spectrum cards.
  */
 
+/*
+ * Copyright (C) by Hannu Savolainen 1993-1996
+ *
+ * OSS/Free for Linux is distributed under the GNU GENERAL PUBLIC LICENSE (GPL)
+ * Version 2 (June 1991). See the "COPYING" file distributed with this software
+ * for more info.
+ */
 #include <linux/config.h>
+
 #include "sound_config.h"
 
 #if defined(CONFIG_PAS)
@@ -296,8 +304,12 @@ pas_mixer_ioctl (int dev, unsigned int cmd, caddr_t arg)
 
   if (((cmd >> 8) & 0xff) == 'M')
     {
+      int             v;
+
+      get_user (v, (int *) arg);
+
       if (_IOC_DIR (cmd) & _IOC_WRITE)
-       return ioctl_out (arg, pas_mixer_set (cmd & 0xff, ioctl_in (arg)));
+       return ioctl_out (arg, pas_mixer_set (cmd & 0xff, v));
       else
        {                       /*
                                 * Read parameters
index 11639299f27ea99d73a2330e3d72449ce7b91626..63f6762a563583f57b3faf634e184bcbc7a30f81 100644 (file)
@@ -148,6 +148,8 @@ pcm_set_bits (int arg)
 static int
 pas_audio_ioctl (int dev, unsigned int cmd, caddr_t arg, int local)
 {
+  int             val;
+
   DEB (printk ("pas2_pcm.c: static int pas_audio_ioctl(unsigned int cmd = %X, unsigned int arg = %X)\n", cmd, arg));
 
   switch (cmd)
@@ -155,7 +157,8 @@ pas_audio_ioctl (int dev, unsigned int cmd, caddr_t arg, int local)
     case SOUND_PCM_WRITE_RATE:
       if (local)
        return pcm_set_speed ((int) arg);
-      return ioctl_out (arg, pcm_set_speed (ioctl_in (arg)));
+      get_user (val, (int *) arg);
+      return ioctl_out (arg, pcm_set_speed (val));
       break;
 
     case SOUND_PCM_READ_RATE:
@@ -167,13 +170,15 @@ pas_audio_ioctl (int dev, unsigned int cmd, caddr_t arg, int local)
     case SNDCTL_DSP_STEREO:
       if (local)
        return pcm_set_channels ((int) arg + 1) - 1;
-      return ioctl_out (arg, pcm_set_channels (ioctl_in (arg) + 1) - 1);
+      get_user (val, (int *) arg);
+      return ioctl_out (arg, pcm_set_channels (val + 1) - 1);
       break;
 
     case SOUND_PCM_WRITE_CHANNELS:
       if (local)
        return pcm_set_channels ((int) arg);
-      return ioctl_out (arg, pcm_set_channels (ioctl_in (arg)));
+      get_user (val, (int *) arg);
+      return ioctl_out (arg, pcm_set_channels (val));
       break;
 
     case SOUND_PCM_READ_CHANNELS:
@@ -185,7 +190,8 @@ pas_audio_ioctl (int dev, unsigned int cmd, caddr_t arg, int local)
     case SNDCTL_DSP_SETFMT:
       if (local)
        return pcm_set_bits ((int) arg);
-      return ioctl_out (arg, pcm_set_bits (ioctl_in (arg)));
+      get_user (val, (int *) arg);
+      return ioctl_out (arg, pcm_set_bits (val));
       break;
 
     case SOUND_PCM_READ_BITS:
@@ -196,9 +202,10 @@ pas_audio_ioctl (int dev, unsigned int cmd, caddr_t arg, int local)
     case SOUND_PCM_WRITE_FILTER:       /*
                                         * NOT YET IMPLEMENTED
                                         */
-      if (ioctl_in (arg) > 1)
+      get_user (val, (int *) arg);
+      if (val > 1)
        return -EINVAL;
-      pcm_filter = ioctl_in (arg);
+      pcm_filter = val;
       break;
 
     case SOUND_PCM_READ_FILTER:
diff --git a/drivers/sound/patmgr.c b/drivers/sound/patmgr.c
deleted file mode 100644 (file)
index 95c49dc..0000000
+++ /dev/null
@@ -1,292 +0,0 @@
-/*
- * sound/patmgr.c
- *
- * The patch manager interface for the /dev/sequencer
- */
-/*
- * Copyright (C) by Hannu Savolainen 1993-1996
- *
- * OSS/Free for Linux is distributed under the GNU GENERAL PUBLIC LICENSE (GPL)
- * Version 2 (June 1991). See the "COPYING" file distributed with this software
- * for more info.
- */
-#include <linux/config.h>
-
-
-#define PATMGR_C
-#include "sound_config.h"
-
-#if defined(CONFIG_SEQUENCER)
-
-static struct wait_queue *server_procs[MAX_SYNTH_DEV] =
-{NULL};
-static volatile struct snd_wait server_wait_flag[MAX_SYNTH_DEV] =
-{
-  {0}};
-
-static struct patmgr_info *mbox[MAX_SYNTH_DEV] =
-{NULL};
-static volatile int msg_direction[MAX_SYNTH_DEV] =
-{0};
-
-static int      pmgr_opened[MAX_SYNTH_DEV] =
-{0};
-
-#define A_TO_S 1
-#define S_TO_A         2
-
-static struct wait_queue *appl_proc = NULL;
-static volatile struct snd_wait appl_wait_flag =
-{0};
-
-int
-pmgr_open (int dev)
-{
-  if (dev < 0 || dev >= num_synths)
-    return -ENXIO;
-
-  if (pmgr_opened[dev])
-    return -EBUSY;
-  pmgr_opened[dev] = 1;
-
-  server_wait_flag[dev].opts = WK_NONE;
-
-  return 0;
-}
-
-void
-pmgr_release (int dev)
-{
-
-  if (mbox[dev])               /*
-                                * Killed in action. Inform the client
-                                */
-    {
-
-      mbox[dev]->key = PM_ERROR;
-      mbox[dev]->parm1 = -EIO;
-
-      if ((appl_wait_flag.opts & WK_SLEEP))
-       {
-         appl_wait_flag.opts = WK_WAKEUP;
-         wake_up (&appl_proc);
-       };
-    }
-
-  pmgr_opened[dev] = 0;
-}
-
-int
-pmgr_read (int dev, struct fileinfo *file, char *buf, int count)
-{
-  unsigned long   flags;
-  int             ok = 0;
-
-  if (count != sizeof (struct patmgr_info))
-    {
-      printk ("PATMGR%d: Invalid read count\n", dev);
-      return -EIO;
-    }
-
-  while (!ok && !(current->signal & ~current->blocked))
-    {
-      save_flags (flags);
-      cli ();
-
-      while (!(mbox[dev] && msg_direction[dev] == A_TO_S) &&
-            !(current->signal & ~current->blocked))
-       {
-
-         server_wait_flag[dev].opts = WK_SLEEP;
-         interruptible_sleep_on (&server_procs[dev]);
-         server_wait_flag[dev].opts &= ~WK_SLEEP;;
-       }
-
-      if (mbox[dev] && msg_direction[dev] == A_TO_S)
-       {
-         {
-           char           *fixit = (char *) mbox[dev];
-
-           copy_to_user (&(buf)[0], fixit, count);
-         };
-         msg_direction[dev] = 0;
-         ok = 1;
-       }
-
-      restore_flags (flags);
-
-    }
-
-  if (!ok)
-    return -EINTR;
-  return count;
-}
-
-int
-pmgr_write (int dev, struct fileinfo *file, const char *buf, int count)
-{
-  unsigned long   flags;
-
-  if (count < 4)
-    {
-      printk ("PATMGR%d: Write count < 4\n", dev);
-      return -EIO;
-    }
-
-  copy_from_user ((char *) mbox[dev], &(buf)[0], 4);
-
-  if (*(unsigned char *) mbox[dev] == SEQ_FULLSIZE)
-    {
-      int             tmp_dev;
-
-      tmp_dev = ((unsigned short *) mbox[dev])[2];
-      if (tmp_dev != dev)
-       return -ENXIO;
-
-      return synth_devs[dev]->load_patch (dev, *(unsigned short *) mbox[dev],
-                                         buf, 4, count, 1);
-    }
-
-  if (count != sizeof (struct patmgr_info))
-    {
-      printk ("PATMGR%d: Invalid write count\n", dev);
-      return -EIO;
-    }
-
-  /*
-   * If everything went OK, there should be a preallocated buffer in the
-   * mailbox and a client waiting.
-   */
-
-  save_flags (flags);
-  cli ();
-
-  if (mbox[dev] && !msg_direction[dev])
-    {
-      copy_from_user (&((char *) mbox[dev])[4], &(buf)[4], count - 4);
-      msg_direction[dev] = S_TO_A;
-
-      if ((appl_wait_flag.opts & WK_SLEEP))
-       {
-         {
-           appl_wait_flag.opts = WK_WAKEUP;
-           wake_up (&appl_proc);
-         };
-       }
-    }
-
-  restore_flags (flags);
-
-  return count;
-}
-
-int
-pmgr_access (int dev, struct patmgr_info *rec)
-{
-  unsigned long   flags;
-  int             err = 0;
-
-  save_flags (flags);
-  cli ();
-
-  if (mbox[dev])
-    printk ("  PATMGR: Server %d mbox full. Why?\n", dev);
-  else
-    {
-      rec->key = PM_K_COMMAND;
-      mbox[dev] = rec;
-      msg_direction[dev] = A_TO_S;
-
-      if ((server_wait_flag[dev].opts & WK_SLEEP))
-       {
-         {
-           server_wait_flag[dev].opts = WK_WAKEUP;
-           wake_up (&server_procs[dev]);
-         };
-       }
-
-
-      appl_wait_flag.opts = WK_SLEEP;
-      interruptible_sleep_on (&appl_proc);
-      appl_wait_flag.opts &= ~WK_SLEEP;;
-
-      if (msg_direction[dev] != S_TO_A)
-       {
-         rec->key = PM_ERROR;
-         rec->parm1 = -EIO;
-       }
-      else if (rec->key == PM_ERROR)
-       {
-         err = rec->parm1;
-         if (err > 0)
-           err = -err;
-       }
-
-      mbox[dev] = NULL;
-      msg_direction[dev] = 0;
-    }
-
-  restore_flags (flags);
-
-  return err;
-}
-
-int
-pmgr_inform (int dev, int event, unsigned long p1, unsigned long p2,
-            unsigned long p3, unsigned long p4)
-{
-  unsigned long   flags;
-  int             err = 0;
-
-  struct patmgr_info *tmp_mbox;
-
-  if (!pmgr_opened[dev])
-    return 0;
-
-  tmp_mbox = (struct patmgr_info *) vmalloc (sizeof (struct patmgr_info));
-
-  if (tmp_mbox == NULL)
-    {
-      printk ("pmgr: Couldn't allocate memory for a message\n");
-      return 0;
-    }
-
-  save_flags (flags);
-  cli ();
-
-  if (mbox[dev])
-    printk ("  PATMGR: Server %d mbox full. Why?\n", dev);
-  else
-    {
-
-      mbox[dev] = tmp_mbox;
-      mbox[dev]->key = PM_K_EVENT;
-      mbox[dev]->command = event;
-      mbox[dev]->parm1 = p1;
-      mbox[dev]->parm2 = p2;
-      mbox[dev]->parm3 = p3;
-      msg_direction[dev] = A_TO_S;
-
-      if ((server_wait_flag[dev].opts & WK_SLEEP))
-       {
-         {
-           server_wait_flag[dev].opts = WK_WAKEUP;
-           wake_up (&server_procs[dev]);
-         };
-       }
-
-
-      appl_wait_flag.opts = WK_SLEEP;
-      interruptible_sleep_on (&appl_proc);
-      appl_wait_flag.opts &= ~WK_SLEEP;;
-      mbox[dev] = NULL;
-      msg_direction[dev] = 0;
-    }
-
-  restore_flags (flags);
-  vfree (tmp_mbox);
-
-  return err;
-}
-
-#endif
index dc6d0e7e75104d3325489f5f2fbff008a40e9df1..f449286e5b6c608ccf13d4b5e11be897ee07e78c 100644 (file)
@@ -191,6 +191,8 @@ sb_dsp_reset (sb_devc * devc)
 {
   int             loopc;
 
+  DDB (printk ("Entered sb_dsp_reset()\n"));
+
   if (devc->model == MDL_ESS)
     outb ((3), DSP_RESET);     /* Reset FIFO too */
   else
@@ -205,11 +207,15 @@ sb_dsp_reset (sb_devc * devc)
   for (loopc = 0; loopc < 1000 && !(inb (DSP_DATA_AVAIL) & 0x80); loopc++);
 
   if (inb (DSP_READ) != 0xAA)
-    return 0;                  /* Sorry */
+    {
+      DDB (printk ("sb: No response to RESET\n"));
+      return 0;                        /* Sorry */
+    }
 
   if (devc->model == MDL_ESS)
     sb_dsp_command (devc, 0xc6);       /* Enable extended mode */
 
+  DDB (printk ("sb_dsp_reset() OK\n"));
   return 1;
 }
 
@@ -220,6 +226,7 @@ dsp_get_vers (sb_devc * devc)
 
   unsigned long   flags;
 
+  DDB (printk ("Entered dsp_get_vers()\n"));
   save_flags (flags);
   cli ();
   devc->major = devc->minor = 0;
@@ -238,6 +245,7 @@ dsp_get_vers (sb_devc * devc)
            }
        }
     }
+  DDB (printk ("DSP version %d.%d\n", devc->major, devc->minor));
   restore_flags (flags);
 }
 
@@ -897,6 +905,7 @@ sb_getmixer (sb_devc * devc, unsigned int port)
   tenmicrosec (devc->osp);
   val = inb (MIXER_DATA);
   tenmicrosec (devc->osp);
+  tenmicrosec (devc->osp);
   restore_flags (flags);
 
   return val;
index ae562fd6909be15d99257353c66c12e4cd958a7d..0c156753955ebfb297ecb4c644b615bbe292256c 100644 (file)
@@ -304,6 +304,19 @@ sb_mixer_ioctl (int dev, unsigned int cmd, caddr_t arg)
   sb_devc        *devc = mixer_devs[dev]->devc;
   int             val;
 
+/*
+ * Use ioctl(fd, SOUND_MIXER_PRIVATE1, &mode) to turn AGC off (0) or on (1).
+ */
+  if (cmd == SOUND_MIXER_PRIVATE1 && devc->model == MDL_SB16)
+    {
+      int             tmp;
+
+      get_user (tmp, (int *) arg);
+
+      sb_setmixer (devc, 0x43, (~tmp) & 0x01);
+      return 0;
+    }
+
   if (((cmd >> 8) & 0xff) == 'M')
     {
       if (_IOC_DIR (cmd) & _IOC_WRITE)
index 6b4717c8e23514865556495cd9cc8b946e7b5b23..e5faa37a0157d517f58bbf2b7dfcbb062af22e96 100644 (file)
@@ -77,8 +77,6 @@ static int      seq_queue (unsigned char *note, char nonblock);
 static void     seq_startplay (void);
 static int      seq_sync (void);
 static void     seq_reset (void);
-static int      pmgr_present[MAX_SYNTH_DEV] =
-{0};
 
 #if MAX_SYNTH_DEV > 15
 #error Too many synthesizer devices enabled.
@@ -95,11 +93,6 @@ sequencer_read (int dev, struct fileinfo *file, char *buf, int count)
 
   ev_len = seq_mode == SEQ_1 ? 4 : 8;
 
-  if (dev)                     /*
-                                * Patch manager device
-                                */
-    return pmgr_read (dev - 1, file, buf, count);
-
   save_flags (flags);
   cli ();
   if (!iqlen)
@@ -264,9 +257,6 @@ sequencer_write (int dev, struct fileinfo *file, const char *buf, int count)
   if (mode == OPEN_READ)
     return -EIO;
 
-  if (dev)
-    return pmgr_write (dev - 1, file, buf, count);
-
   c = count;
 
   while (c >= 4)
@@ -1087,9 +1077,8 @@ sequencer_open (int dev, struct fileinfo *file)
       return -ENXIO;
     }
 
-  if (dev)                     /* Patch manager device */
+  if (dev)                     /* Patch manager device (obsolete) */
     {
-      printk ("Patch manager interface is currently broken. Sorry\n");
       return -ENXIO;
     }
 
@@ -1209,10 +1198,6 @@ sequencer_open (int dev, struct fileinfo *file)
   midi_sleep_flag.opts = WK_NONE;
   output_threshold = SEQ_MAX_QUEUE / 2;
 
-  for (i = 0; i < num_synths; i++)
-    if (pmgr_present[i])
-      pmgr_inform (i, PM_E_OPENED, 0, 0, 0, 0);
-
   return 0;
 }
 
@@ -1273,16 +1258,6 @@ sequencer_release (int dev, struct fileinfo *file)
 
   DEB (printk ("sequencer_release(dev=%d)\n", dev));
 
-  if (dev)                     /*
-                                * Patch manager device
-                                */
-    {
-      dev--;
-      pmgr_release (dev);
-      pmgr_present[dev] = 0;
-      return;
-    }
-
   /*
    * * Wait until the queue is empty (if we don't have nonblock)
    */
@@ -1318,10 +1293,6 @@ sequencer_release (int dev, struct fileinfo *file)
          }
     }
 
-  for (i = 0; i < num_synths; i++)
-    if (pmgr_present[i])
-      pmgr_inform (i, PM_E_CLOSED, 0, 0, 0, 0);
-
   for (i = 0; i < max_mididev; i++)
     {
       if (midi_opened[i])
@@ -1523,7 +1494,7 @@ int
 sequencer_ioctl (int dev, struct fileinfo *file,
                 unsigned int cmd, caddr_t arg)
 {
-  int             midi_dev, orig_dev;
+  int             midi_dev, orig_dev, val;
   int             mode = file->mode & O_ACCMODE;
 
   orig_dev = dev = dev >> 4;
@@ -1537,8 +1508,6 @@ sequencer_ioctl (int dev, struct fileinfo *file,
     case SNDCTL_TMR_CONTINUE:
     case SNDCTL_TMR_METRONOME:
     case SNDCTL_TMR_SOURCE:
-      if (dev)                 /* Patch manager */
-       return -EIO;
 
       if (seq_mode != SEQ_2)
        return -EINVAL;
@@ -1546,8 +1515,6 @@ sequencer_ioctl (int dev, struct fileinfo *file,
       break;
 
     case SNDCTL_TMR_SELECT:
-      if (dev)                 /* Patch manager */
-       return -EIO;
 
       if (seq_mode != SEQ_2)
        return -EINVAL;
@@ -1567,10 +1534,6 @@ sequencer_ioctl (int dev, struct fileinfo *file,
       break;
 
     case SNDCTL_SEQ_SYNC:
-      if (dev)                 /*
-                                * Patch manager
-                                */
-       return -EIO;
 
       if (mode == OPEN_READ)
        return 0;
@@ -1583,23 +1546,14 @@ sequencer_ioctl (int dev, struct fileinfo *file,
       break;
 
     case SNDCTL_SEQ_RESET:
-      if (dev)                 /*
-                                * Patch manager
-                                */
-       return -EIO;
 
       seq_reset ();
       return 0;
       break;
 
     case SNDCTL_SEQ_TESTMIDI:
-      if (dev)                 /*
-                                * Patch manager
-                                */
-       return -EIO;
-
       get_user (midi_dev, (int *) arg);
-      if (midi_dev >= max_mididev)
+      if (midi_dev < 0 || midi_dev >= max_mididev)
        return -ENXIO;
 
       if (!midi_opened[midi_dev])
@@ -1619,11 +1573,6 @@ sequencer_ioctl (int dev, struct fileinfo *file,
       break;
 
     case SNDCTL_SEQ_GETINCOUNT:
-      if (dev)                 /*
-                                * Patch manager
-                                */
-       return -EIO;
-
       if (mode == OPEN_WRITE)
        return 0;
       return ioctl_out (arg, iqlen);
@@ -1644,16 +1593,14 @@ sequencer_ioctl (int dev, struct fileinfo *file,
       break;
 
     case SNDCTL_SEQ_CTRLRATE:
-      if (dev)                 /* Patch manager */
-       return -EIO;
-
       /*
        * If *arg == 0, just return the current rate
        */
       if (seq_mode == SEQ_2)
        return tmr->ioctl (tmr_no, cmd, arg);
 
-      if (ioctl_in (arg) != 0)
+      get_user (val, (int *) arg);
+      if (val != 0)
        return -EINVAL;
 
       return ioctl_out (arg, HZ);
@@ -1674,9 +1621,6 @@ sequencer_ioctl (int dev, struct fileinfo *file,
            return -EBUSY;
          }
 
-       if (!orig_dev && pmgr_present[dev])
-         pmgr_inform (dev, PM_E_PATCH_RESET, 0, 0, 0, 0);
-
        err = synth_devs[dev]->ioctl (dev, cmd, arg);
        return err;
       }
@@ -1708,7 +1652,9 @@ sequencer_ioctl (int dev, struct fileinfo *file,
 
     case SNDCTL_FM_4OP_ENABLE:
       {
-       int             dev = ioctl_in (arg);
+       int             dev;
+
+       get_user (dev, (int *) arg);
 
        if (dev < 0 || dev >= num_synths)
          return -ENXIO;
@@ -1777,98 +1723,11 @@ sequencer_ioctl (int dev, struct fileinfo *file,
       }
       break;
 
-    case SNDCTL_PMGR_IFACE:
-      {
-       struct patmgr_info *inf;
-       int             dev, err;
-
-       if ((inf = (struct patmgr_info *) vmalloc (sizeof (*inf))) == NULL)
-         {
-           printk ("patmgr: Can't allocate memory for a message\n");
-           return -EIO;
-         }
-
-       copy_from_user ((char *) inf, &((char *) arg)[0], sizeof (*inf));
-       dev = inf->device;
-
-       if (dev < 0 || dev >= num_synths)
-         {
-           vfree (inf);
-           return -ENXIO;
-         }
-
-       if (!synth_devs[dev]->pmgr_interface)
-         {
-           vfree (inf);
-           return -ENXIO;
-         }
-
-       if ((err = synth_devs[dev]->pmgr_interface (dev, inf)) == -1)
-         {
-           vfree (inf);
-           return err;
-         }
-
-       {
-         char           *fixit = (char *) inf;
-
-         copy_to_user (&((char *) arg)[0], fixit, sizeof (*inf));
-       };
-       vfree (inf);
-       return 0;
-      }
-      break;
-
-    case SNDCTL_PMGR_ACCESS:
-      {
-       struct patmgr_info *inf;
-       int             dev, err;
-
-       if ((inf = (struct patmgr_info *) vmalloc (sizeof (*inf))) == NULL)
-         {
-           printk ("patmgr: Can't allocate memory for a message\n");
-           return -EIO;
-         }
-
-       copy_from_user ((char *) inf, &((char *) arg)[0], sizeof (*inf));
-       dev = inf->device;
-
-       if (dev < 0 || dev >= num_synths)
-         {
-           vfree (inf);
-           return -ENXIO;
-         }
-
-       if (!pmgr_present[dev])
-         {
-           vfree (inf);
-           return -ESRCH;
-         }
-
-       if ((err = pmgr_access (dev, inf)) < 0)
-         {
-           vfree (inf);
-           return err;
-         }
-
-       {
-         char           *fixit = (char *) inf;
-
-         copy_to_user (&((char *) arg)[0], fixit, sizeof (*inf));
-       };
-       vfree (inf);
-       return 0;
-      }
-      break;
-
     case SNDCTL_SEQ_THRESHOLD:
       {
-       int             tmp = ioctl_in (arg);
+       int             tmp;
 
-       if (dev)                /*
-                                * Patch manager
-                                */
-         return -EIO;
+       get_user (tmp, (int *) arg);
 
        if (tmp < 1)
          tmp = 1;
@@ -1881,7 +1740,9 @@ sequencer_ioctl (int dev, struct fileinfo *file,
 
     case SNDCTL_MIDI_PRETIME:
       {
-       int             val = ioctl_in (arg);
+       int             val;
+
+       get_user (val, (int *) arg);
 
        if (val < 0)
          val = 0;
@@ -1893,11 +1754,6 @@ sequencer_ioctl (int dev, struct fileinfo *file,
       break;
 
     default:
-      if (dev)                 /*
-                                * Patch manager
-                                */
-       return -EIO;
-
       if (mode == OPEN_READ)
        return -EIO;
 
index ad51adf671a7671aaac67a071e030c97427257d2..0d943c6a28842a222f9d16ace4fa7bc6fb753387 100644 (file)
@@ -182,15 +182,6 @@ int probe_uart6850(struct address_info *hw_config);
 /*     From opl3.c */
 void enable_opl3_mode(int left, int right, int both);
 
-/*     From patmgr.c */
-int pmgr_open(int dev);
-void pmgr_release(int dev);
-int pmgr_read (int dev, struct fileinfo *file, char * buf, int count);
-int pmgr_write (int dev, struct fileinfo *file, const char * buf, int count);
-int pmgr_access(int dev, struct patmgr_info *rec);
-int pmgr_inform(int dev, int event, unsigned long parm1, unsigned long parm2,
-                                   unsigned long parm3, unsigned long parm4);
-
 /*     From ics2101.c */
 void ics2101_mixer_init(void);
 
index 6195c132f48766e035ed4223e0f8f1bf167daaf9..eea01c3fe80937d9a926ff9f432ec6a3a400f444 100644 (file)
@@ -190,6 +190,8 @@ static int
 timer_ioctl (int dev,
             unsigned int cmd, caddr_t arg)
 {
+  int             val;
+
   switch (cmd)
     {
     case SNDCTL_TMR_SOURCE:
@@ -213,49 +215,43 @@ timer_ioctl (int dev,
       break;
 
     case SNDCTL_TMR_TIMEBASE:
-      {
-       int             val;
-
-       get_user (val, (int *) arg);
-
-       if (val)
-         {
-           if (val < 1)
-             val = 1;
-           if (val > 1000)
-             val = 1000;
-           curr_timebase = val;
-         }
-
-       return ioctl_out (arg, curr_timebase);
-      }
+      get_user (val, (int *) arg);
+
+      if (val)
+       {
+         if (val < 1)
+           val = 1;
+         if (val > 1000)
+           val = 1000;
+         curr_timebase = val;
+       }
+
+      return ioctl_out (arg, curr_timebase);
       break;
 
     case SNDCTL_TMR_TEMPO:
-      {
-       int             val;
-
-       get_user (val, (int *) arg);
-
-       if (val)
-         {
-           if (val < 8)
-             val = 8;
-           if (val > 250)
-             val = 250;
-           tmr_offs = tmr_ctr;
-           ticks_offs += tmr2ticks (tmr_ctr);
-           tmr_ctr = 0;
-           curr_tempo = val;
-           reprogram_timer ();
-         }
-
-       return ioctl_out (arg, curr_tempo);
-      }
+      get_user (val, (int *) arg);
+
+      if (val)
+       {
+         if (val < 8)
+           val = 8;
+         if (val > 250)
+           val = 250;
+         tmr_offs = tmr_ctr;
+         ticks_offs += tmr2ticks (tmr_ctr);
+         tmr_ctr = 0;
+         curr_tempo = val;
+         reprogram_timer ();
+       }
+
+      return ioctl_out (arg, curr_tempo);
       break;
 
     case SNDCTL_SEQ_CTRLRATE:
-      if (ioctl_in (arg) != 0) /* Can't change */
+      get_user (val, (int *) arg);
+
+      if (val != 0)            /* Can't change */
        return -EINVAL;
 
       return ioctl_out (arg, ((curr_tempo * curr_timebase) + 30) / 60);
index 5a8c4c8cd1e64f9098d42a65b287a968b334908d..7c6870d25c2b5635da94725731555be7050267e2 100644 (file)
@@ -1,2 +1,2 @@
-#define SOUND_VERSION_STRING "3.7-beta6-961029"
-#define SOUND_INTERNAL_VERSION 0x030701
+#define SOUND_VERSION_STRING "3.7-beta12-961115"
+#define SOUND_INTERNAL_VERSION 0x030707
index 0cf0ed26ec72ae89523e12b25f8967c16ff887c4..644e25934fdc568b1d645fdd58007d4a692ab326 100644 (file)
@@ -813,18 +813,14 @@ attach_sscape (struct address_info *hw_config)
   devc->failed = 0;
 }
 
-int
-probe_sscape (struct address_info *hw_config)
+static int
+detect_ga (sscape_info * devc)
 {
   unsigned char   save;
 
-  devc->base = hw_config->io_base;
-  devc->irq = hw_config->irq;
-  devc->dma = hw_config->dma;
-
-  devc->failed = 1;
+  DDB (printk ("Entered Soundscape detect_ga(%x)\n", devc->base));
 
-  if (sscape_detected != 0 && sscape_detected != hw_config->io_base)
+  if (check_region (devc->base, 8))
     return 0;
 
   /*
@@ -877,6 +873,25 @@ probe_sscape (struct address_info *hw_config)
       return 0;
     }
 
+  return 1;
+}
+
+int
+probe_sscape (struct address_info *hw_config)
+{
+
+  devc->base = hw_config->io_base;
+  devc->irq = hw_config->irq;
+  devc->dma = hw_config->dma;
+
+  if (sscape_detected != 0 && sscape_detected != hw_config->io_base)
+    return 0;
+
+  devc->failed = 1;
+
+  if (!detect_ga (devc))
+    return 0;
+
 #ifdef SSCAPE_DEBUG1
   /*
      * Temporary debugging aid. Print contents of the registers before
index 8904e9fd01816f014dbed8df5363acc3953fc1b4..bec7445880e5a57f63d7fb658179a302bdb997e6 100644 (file)
@@ -253,10 +253,15 @@ def_tmr_ioctl (int dev,
       break;
 
     case SNDCTL_SEQ_CTRLRATE:
-      if (ioctl_in (arg) != 0) /* Can't change */
-       return -EINVAL;
+      {
+       int             val;
 
-      return ioctl_out (arg, ((curr_tempo * curr_timebase) + 30) / 60);
+       get_user (val, (int *) arg);
+       if (val != 0)           /* Can't change */
+         return -EINVAL;
+
+       return ioctl_out (arg, ((curr_tempo * curr_timebase) + 30) / 60);
+      }
       break;
 
     case SNDCTL_SEQ_GETTIME:
index f86b1389543735c53986b7589528884cfbaa048e..1043cfcb362907ef504be15d26705cd6a9f3be61 100644 (file)
@@ -14,6 +14,7 @@
  *      added 6850 support, used with COVOX SoundMaster II and custom cards.
  */
 
+#include <linux/config.h>
 #include "sound_config.h"
 
 #if defined(CONFIG_UART6850) && defined(CONFIG_MIDI)
diff --git a/drivers/sound/vivo.c b/drivers/sound/vivo.c
new file mode 100644 (file)
index 0000000..d329606
--- /dev/null
@@ -0,0 +1,19 @@
+
+/*
+ * sound/vivo.c
+ *
+ * Support routines for Ensoniq Soundscape VIVO. The actual driver is
+ * in the vivo subdirectory.
+ */
+/*
+ * Copyright (C) by Hannu Savolainen 1993-1996
+ *
+ * OSS/Free for Linux is distributed under the GNU GENERAL PUBLIC LICENSE (GPL)
+ * Version 2 (June 1991). See the "COPYING" file distributed with this software
+ * for more info.
+ */
+
+#include "sound_config.h"
+
+extern void     otto_init (int options);
+extern void     synth_init (void);
index ff42ed9f858c5d3e66164f9c2276480b797741f5..26c67252122d878737a345ed28cb2fb3967250c1 100644 (file)
@@ -39,7 +39,7 @@ extern unsigned int csum_partial(const unsigned char * buff, int len, unsigned i
  * here even more important to align src and dst on a 32-bit (or even
  * better 64-bit) boundary
  */
-unsigned int csum_partial_copy( const char *src, char *dst, int len, int sum);
+unsigned int csum_partial_copy(const char *src, char *dst, int len, unsigned int sum);
 
 /*
  * the same as csum_partial, but copies from user space (but on the alpha
index 47bdbf7ce8183b02904e33c85bcae21129671e1a..a35c31dd237ead9d2390a26a225a6ad68423c4ca 100644 (file)
 #define SO_ERROR       0x1007
 #define SO_SNDBUF      0x1001
 #define SO_RCVBUF      0x1002
+#define        SO_RCVLOWAT     0x1010
+#define        SO_SNDLOWAT     0x1011
+#define        SO_RCVTIMEO     0x1012
+#define        SO_SNDTIMEO     0x1013
 
 /* linux-specific, might as well be the same as on i386 */
 #define SO_NO_CHECK    11
index 838ef933d16c574caa4c7e931df7e6cce1bc7e83..bac58b52f1eb9670ae6e7d0803958828c6407173 100644 (file)
@@ -1,6 +1,11 @@
 #ifndef _LINUX_CTYPE_H
 #define _LINUX_CTYPE_H
 
+/*
+ * NOTE! This ctype does not handle EOF like the standarc C
+ * library is required to.
+ */
+
 #define _U     0x01    /* upper */
 #define _L     0x02    /* lower */
 #define _D     0x04    /* digit */
 #define _SP    0x80    /* hard space (0x20) */
 
 extern unsigned char _ctype[];
-extern char _ctmp;
-
-#define isalnum(c) ((_ctype+1)[c]&(_U|_L|_D))
-#define isalpha(c) ((_ctype+1)[c]&(_U|_L))
-#define iscntrl(c) ((_ctype+1)[c]&(_C))
-#define isdigit(c) ((_ctype+1)[c]&(_D))
-#define isgraph(c) ((_ctype+1)[c]&(_P|_U|_L|_D))
-#define islower(c) ((_ctype+1)[c]&(_L))
-#define isprint(c) ((_ctype+1)[c]&(_P|_U|_L|_D|_SP))
-#define ispunct(c) ((_ctype+1)[c]&(_P))
-#define isspace(c) ((_ctype+1)[c]&(_S))
-#define isupper(c) ((_ctype+1)[c]&(_U))
-#define isxdigit(c) ((_ctype+1)[c]&(_D|_X))
-
-#define isascii(c) (((unsigned) c)<=0x7f)
-#define toascii(c) (((unsigned) c)&0x7f)
-
-#define tolower(c) (_ctmp=c,isupper(_ctmp)?_ctmp-('A'-'a'):_ctmp)
-#define toupper(c) (_ctmp=c,islower(_ctmp)?_ctmp-('a'-'A'):_ctmp)
+
+#define __ismask(x) (_ctype[(int)(unsigned char)(x)])
+
+#define isalnum(c)     ((__ismask(c)&(_U|_L|_D)) != 0)
+#define isalpha(c)     ((__ismask(c)&(_U|_L)) != 0)
+#define iscntrl(c)     ((__ismask(c)&(_C)) != 0)
+#define isdigit(c)     ((__ismask(c)&(_D)) != 0)
+#define isgraph(c)     ((__ismask(c)&(_P|_U|_L|_D)) != 0)
+#define islower(c)     ((__ismask(c)&(_L)) != 0)
+#define isprint(c)     ((__ismask(c)&(_P|_U|_L|_D|_SP)) != 0)
+#define ispunct(c)     ((__ismask(c)&(_P)) != 0)
+#define isspace(c)     ((__ismask(c)&(_S)) != 0)
+#define isupper(c)     ((__ismask(c)&(_U)) != 0)
+#define isxdigit(c)    ((__ismask(c)&(_D|_X)) != 0)
+
+#define isascii(c) (((unsigned char)(c))<=0x7f)
+#define toascii(c) (((unsigned char)(c))&0x7f)
+
+static inline unsigned char __tolower(unsigned char c)
+{
+       if (isupper(c))
+               c -= 'A'-'a';
+       return c;
+}
+
+static inline unsigned char __toupper(unsigned char c)
+{
+       if (islower(c))
+               c -= 'a'-'A';
+       return c;
+}
+
+#define tolower(c) __tolower(c)
+#define toupper(c) __toupper(c)
 
 #endif
index 0497ea8cc1987e22c184a8870e52c5f25dd763d5..a06cdb9ed193223241267b164584926d92bd3f97 100644 (file)
@@ -62,13 +62,13 @@ aeb - 950811
    However, everything runs fine with an arbitrary kdev_t type. */
 
 #define MINORBITS      8
-#define MINORMASK      ((1<<MINORBITS) - 1)
+#define MINORMASK      ((1U << MINORBITS) - 1)
 
 typedef unsigned short kdev_t;
 
-#define MAJOR(dev)     ((dev) >> MINORBITS)
-#define MINOR(dev)     ((dev) & MINORMASK)
-#define HASHDEV(dev)   (dev)
+#define MAJOR(dev)     ((unsigned int) ((dev) >> MINORBITS))
+#define MINOR(dev)     ((unsigned int) ((dev) & MINORMASK))
+#define HASHDEV(dev)   ((unsigned int) (dev))
 #define NODEV          0
 #define MKDEV(ma,mi)   (((ma) << MINORBITS) | (mi))
 #define B_FREE         0xffff          /* yuk */
index 5673b7e42077c1e9c45874f0952ccabea9cb1c9c..a338a8efda66e553a78d1aca58092f61d9cf963b 100644 (file)
@@ -92,14 +92,14 @@ struct proto_ops {
   int  (*dup)          (struct socket *newsock, struct socket *oldsock);
   int  (*release)      (struct socket *sock, struct socket *peer);
   int  (*bind)         (struct socket *sock, struct sockaddr *umyaddr,
-                        size_t sockaddr_len);
+                        int sockaddr_len);
   int  (*connect)      (struct socket *sock, struct sockaddr *uservaddr,
-                        size_t sockaddr_len, int flags);
+                        int sockaddr_len, int flags);
   int  (*socketpair)   (struct socket *sock1, struct socket *sock2);
   int  (*accept)       (struct socket *sock, struct socket *newsock,
                         int flags);
   int  (*getname)      (struct socket *sock, struct sockaddr *uaddr,
-                        size_t *usockaddr_len, int peer);
+                        int *usockaddr_len, int peer);
   int  (*select)       (struct socket *sock, int sel_type,
                         select_table *wait);
   int  (*ioctl)        (struct socket *sock, unsigned int cmd,
index 342e5a3352a904711577f9ef845d80ca1755e444..da7763da33186cbd82049b0d912a629c231f0156 100644 (file)
@@ -88,8 +88,8 @@ struct sk_buff
 
        struct neighbour *nexthop;
 #endif         
-       unsigned long   len;                    /* Length of actual data                        */
-       unsigned long   csum;                   /* Checksum                                     */
+       unsigned int    len;                    /* Length of actual data                        */
+       unsigned int    csum;                   /* Checksum                                     */
        __u32           saddr;                  /* IP source address                            */
        __u32           daddr;                  /* IP target address                            */
        __u32           raddr;                  /* IP next hop address                          */
@@ -171,13 +171,13 @@ extern void                       skb_device_lock(struct sk_buff *skb);
 extern void                    skb_device_unlock(struct sk_buff *skb);
 extern void                    dev_kfree_skb(struct sk_buff *skb, int mode);
 extern int                     skb_device_locked(struct sk_buff *skb);
-extern unsigned char *         skb_put(struct sk_buff *skb, int len);
-extern unsigned char *         skb_push(struct sk_buff *skb, int len);
-extern unsigned char *         skb_pull(struct sk_buff *skb, int len);
+extern unsigned char *         skb_put(struct sk_buff *skb, unsigned int len);
+extern unsigned char *         skb_push(struct sk_buff *skb, unsigned int len);
+extern unsigned char *         skb_pull(struct sk_buff *skb, unsigned int len);
 extern int                     skb_headroom(struct sk_buff *skb);
 extern int                     skb_tailroom(struct sk_buff *skb);
-extern void                    skb_reserve(struct sk_buff *skb, int len);
-extern void                    skb_trim(struct sk_buff *skb, int len);
+extern void                    skb_reserve(struct sk_buff *skb, unsigned int len);
+extern void                    skb_trim(struct sk_buff *skb, unsigned int len);
 
 extern __inline__ int skb_queue_empty(struct sk_buff_head *list)
 {
@@ -410,7 +410,7 @@ extern __inline__ void skb_unlink(struct sk_buff *skb)
  *     Add data to an sk_buff
  */
  
-extern __inline__ unsigned char *skb_put(struct sk_buff *skb, int len)
+extern __inline__ unsigned char *skb_put(struct sk_buff *skb, unsigned int len)
 {
        extern char *skb_put_errstr;
        unsigned char *tmp=skb->tail;
@@ -425,7 +425,7 @@ here:
        return tmp;
 }
 
-extern __inline__ unsigned char *skb_push(struct sk_buff *skb, int len)
+extern __inline__ unsigned char *skb_push(struct sk_buff *skb, unsigned int len)
 {
        extern char *skb_push_errstr;
        skb->data-=len;
@@ -439,9 +439,9 @@ here:
        return skb->data;
 }
 
-extern __inline__ unsigned char * skb_pull(struct sk_buff *skb, int len)
+extern __inline__ unsigned char * skb_pull(struct sk_buff *skb, unsigned int len)
 {
-       if(len > skb->len)
+       if (len > skb->len)
                return NULL;
        skb->data+=len;
        skb->len-=len;
@@ -458,18 +458,17 @@ extern __inline__ int skb_tailroom(struct sk_buff *skb)
        return skb->end-skb->tail;
 }
 
-extern __inline__ void skb_reserve(struct sk_buff *skb, int len)
+extern __inline__ void skb_reserve(struct sk_buff *skb, unsigned int len)
 {
        skb->data+=len;
        skb->tail+=len;
 }
 
-extern __inline__ void skb_trim(struct sk_buff *skb, int len)
+extern __inline__ void skb_trim(struct sk_buff *skb, unsigned int len)
 {
-       if(skb->len>len)
-       {
-               skb->len=len;
-               skb->tail=skb->data+len;
+       if (skb->len > len) {
+               skb->len = len;
+               skb->tail = skb->data+len;
        }
 }
 
index 9c8e228dc2ff9eb7f4fd54c2822b9ed2e3173dd1..4c3db533967d08d8d4a992a5e8d01ebbcf14d62f 100644 (file)
@@ -31,7 +31,7 @@ struct linger {
 struct msghdr 
 {
        void    *       msg_name;       /* Socket name                  */
-       size_t          msg_namelen;    /* Length of name               */
+       int             msg_namelen;    /* Length of name               */
        struct iovec *  msg_iov;        /* Data blocks                  */
        size_t          msg_iovlen;     /* Number of blocks             */
        void    *       msg_control;    /* Per protocol magic (eg BSD file descriptor passing) */
index 6254c2440cde004a33c9e8dec0bef7aa8e9c04b5..3b6af75fa41229b4bd80fd3feac0b8ef20629698 100644 (file)
 #define SNDCTL_SEQ_GETOUTCOUNT         _SIOR ('Q', 4, int)
 #define SNDCTL_SEQ_GETINCOUNT          _SIOR ('Q', 5, int)
 #define SNDCTL_SEQ_PERCMODE            _SIOW ('Q', 6, int)
-#define SNDCTL_FM_LOAD_INSTR           _SIOW ('Q', 7, struct sbi_instrument)   /* Valid for FM only */
+#define SNDCTL_FM_LOAD_INSTR           _SIOW ('Q', 7, struct sbi_instrument)   /* Obsolete */
 #define SNDCTL_SEQ_TESTMIDI            _SIOW ('Q', 8, int)
 #define SNDCTL_SEQ_RESETSAMPLES                _SIOW ('Q', 9, int)
 #define SNDCTL_SEQ_NRSYNTHS            _SIOR ('Q',10, int)
 #define SNDCTL_SEQ_NRMIDIS             _SIOR ('Q',11, int)
 #define SNDCTL_MIDI_INFO               _SIOWR('Q',12, struct midi_info)
 #define SNDCTL_SEQ_THRESHOLD           _SIOW ('Q',13, int)
-#define SNDCTL_SEQ_TRESHOLD            SNDCTL_SEQ_THRESHOLD    /* there was once a typo */
 #define SNDCTL_SYNTH_MEMAVL            _SIOWR('Q',14, int)     /* in=dev#, out=memsize */
 #define SNDCTL_FM_4OP_ENABLE           _SIOW ('Q',15, int)     /* in=dev# */
-#define SNDCTL_PMGR_ACCESS             _SIOWR('Q',16, struct patmgr_info)
 #define SNDCTL_SEQ_PANIC               _SIO  ('Q',17)
 #define SNDCTL_SEQ_OUTOFBAND           _SIOW ('Q',18, struct seq_event_rec)
 #define SNDCTL_SEQ_GETTIME             _SIOR ('Q',19, int)
@@ -197,6 +195,9 @@ struct patch_info {
 #define WAVE_TREMOLO   0x00020000      /* The tremolo info is valid */
 #define WAVE_SCALE     0x00040000      /* The scaling info is valid */
 #define WAVE_FRACTIONS 0x00080000      /* Fraction information is valid */
+/* Reserved bits */
+#define WAVE_ROM       0x40000000      /* For future use */
+#define WAVE_MULAW     0x20000000      /* For future use */
 /* Other bits must be zeroed */
 
                int len;        /* Size of the wave data in bytes */
@@ -250,7 +251,8 @@ struct patch_info {
        
                int             volume;
                int             fractions;
-               int             spare[3];
+               int             reserved1;
+               int             spare[2];
                char data[1];   /* The waveform data starts here */
        };
 
@@ -263,90 +265,6 @@ struct sysex_info {
                unsigned char data[1];  /* Sysex data starts here */
        };
 
-/*
- * Patch management interface (/dev/sequencer, /dev/patmgr#)
- * Don't use these calls if you want to maintain compatibility with
- * the future versions of the driver.
- */
-
-#define        PS_NO_PATCHES           0       /* No patch support on device */
-#define                PS_MGR_NOT_OK           1       /* Plain patch support (no mgr) */
-#define                PS_MGR_OK               2       /* Patch manager supported */
-#define                PS_MANAGED              3       /* Patch manager running */
-
-#define SNDCTL_PMGR_IFACE              _SIOWR('P', 1, struct patmgr_info)
-
-/*
- * The patmgr_info is a fixed size structure which is used for two
- * different purposes. The intended use is for communication between
- * the application using /dev/sequencer and the patch manager daemon
- * associated with a synthesizer device (ioctl(SNDCTL_PMGR_ACCESS)).
- *
- * This structure is also used with ioctl(SNDCTL_PGMR_IFACE) which allows
- * a patch manager daemon to read and write device parameters. This
- * ioctl available through /dev/sequencer also. Avoid using it since it's
- * extremely hardware dependent. In addition access trough /dev/sequencer 
- * may confuse the patch manager daemon.
- */
-
-struct patmgr_info {
-         unsigned int key;     /* Don't worry. Reserved for communication
-                                  between the patch manager and the driver. */
-#define PM_K_EVENT             1 /* Event from the /dev/sequencer driver */
-#define PM_K_COMMAND           2 /* Request from an application */
-#define PM_K_RESPONSE          3 /* From patmgr to application */
-#define PM_ERROR               4 /* Error returned by the patmgr */
-         int device;
-         int command;
-
-/* 
- * Commands 0x000 to 0xfff reserved for patch manager programs 
- */
-#define PM_GET_DEVTYPE 1       /* Returns type of the patch mgr interface of dev */
-#define                PMTYPE_FM2      1       /* 2 OP fm */
-#define                PMTYPE_FM4      2       /* Mixed 4 or 2 op FM (OPL-3) */
-#define                PMTYPE_WAVE     3       /* Wave table synthesizer (GUS) */
-#define PM_GET_NRPGM   2       /* Returns max # of midi programs in parm1 */
-#define PM_GET_PGMMAP  3       /* Returns map of loaded midi programs in data8 */
-#define PM_GET_PGM_PATCHES 4   /* Return list of patches of a program (parm1) */
-#define PM_GET_PATCH   5       /* Return patch header of patch parm1 */
-#define PM_SET_PATCH   6       /* Set patch header of patch parm1 */
-#define PM_READ_PATCH  7       /* Read patch (wave) data */
-#define PM_WRITE_PATCH 8       /* Write patch (wave) data */
-
-/*
- * Commands 0x1000 to 0xffff are for communication between the patch manager
- * and the client
- */
-#define _PM_LOAD_PATCH 0x100
-
-/* 
- * Commands above 0xffff reserved for device specific use
- */
-
-         int parm1;
-         int parm2;
-         int parm3;
-
-         union {
-               unsigned char data8[4000];
-               unsigned short data16[2000];
-               unsigned int data32[1000];
-               struct patch_info patch;
-         } data;
-       };
-
-/*
- * When a patch manager daemon is present, it will be informed by the
- * driver when something important happens. For example when the
- * /dev/sequencer is opened or closed. A record with key == PM_K_EVENT is
- * returned. The command field contains the event type:
- */
-#define PM_E_OPENED            1       /* /dev/sequencer opened */
-#define PM_E_CLOSED            2       /* /dev/sequencer closed */
-#define PM_E_PATCH_RESET       3       /* SNDCTL_RESETSAMPLES called */
-#define PM_E_PATCH_LOADED      4       /* A patch has been loaded by appl */
-
 /*
  * /dev/sequencer input events.
  *
@@ -1036,7 +954,6 @@ void seqbuf_dump(void);    /* This function must be provided by programs */
 #define SEQ_DEFINEBUF(len)             unsigned char _seqbuf[len]; int _seqbuflen = len;int _seqbufptr = 0
 #define SEQ_USE_EXTBUF()               extern unsigned char _seqbuf[]; extern int _seqbuflen;extern int _seqbufptr
 #define SEQ_DECLAREBUF()               SEQ_USE_EXTBUF()
-#define SEQ_PM_DEFINES                 struct patmgr_info _pm_info
 #define _SEQ_NEEDBUF(len)              if ((_seqbufptr+(len)) > _seqbuflen) seqbuf_dump()
 #define _SEQ_ADVBUF(len)               _seqbufptr += len
 #define SEQ_DUMPBUF                    seqbuf_dump
@@ -1058,15 +975,6 @@ void seqbuf_dump(void);   /* This function must be provided by programs */
 #define _SEQ_NEEDBUF(len)      /* empty */
 #endif
 
-#define PM_LOAD_PATCH(dev, bank, pgm)  (SEQ_DUMPBUF(), _pm_info.command = _PM_LOAD_PATCH, \
-                                       _pm_info.device=dev, _pm_info.data.data8[0]=pgm, \
-                                       _pm_info.parm1 = bank, _pm_info.parm2 = 1, \
-                                       ioctl(seqfd, SNDCTL_PMGR_ACCESS, &_pm_info))
-#define PM_LOAD_PATCHES(dev, bank, pgm) (SEQ_DUMPBUF(), _pm_info.command = _PM_LOAD_PATCH, \
-                                       _pm_info.device=dev, memcpy(_pm_info.data.data8, pgm, 128), \
-                                       _pm_info.parm1 = bank, _pm_info.parm2 = 128, \
-                                       ioctl(seqfd, SNDCTL_PMGR_ACCESS, &_pm_info))
-
 #define SEQ_VOLUME_MODE(dev, mode)     {_SEQ_NEEDBUF(8);\
                                        _seqbuf[_seqbufptr] = SEQ_EXTENDED;\
                                        _seqbuf[_seqbufptr+1] = SEQ_VOLMODE;\
index c6221e7126af1af5ff4796d21ab98d4d3a9cb027..39da8088d9429b0c0b5d7eca6de8193c0703b85d 100644 (file)
@@ -1,11 +1,6 @@
 #ifndef _LINUX_STDDEF_H
 #define _LINUX_STDDEF_H
 
-#ifndef _SIZE_T
-#define _SIZE_T
-typedef unsigned int size_t;
-#endif
-
 #undef NULL
 #define NULL ((void *)0)
 
index 6cfb7df0bb9da3aa7b9a9cf41e9c9b24c56c4e1c..18fe74e8eff44c3af16bf5f14d83c6b5baedfb75 100644 (file)
@@ -22,10 +22,10 @@ struct swap_info_struct {
        struct inode * swap_file;
        unsigned char * swap_map;
        unsigned char * swap_lockmap;
-       int lowest_bit;
-       int highest_bit;
-       int cluster_next;
-       int cluster_nr;
+       unsigned int lowest_bit;
+       unsigned int highest_bit;
+       unsigned int cluster_next;
+       unsigned int cluster_nr;
        int prio;                       /* swap priority */
        int pages;
        unsigned long max;
@@ -70,7 +70,7 @@ extern unsigned long init_swap_cache(unsigned long, unsigned long);
 extern void swap_duplicate(unsigned long);
 
 /* linux/mm/swapfile.c */
-extern int nr_swapfiles;
+extern unsigned int nr_swapfiles;
 extern struct swap_info_struct swap_info[];
 void si_swapinfo(struct sysinfo *);
 unsigned long get_swap_page(void);
index 896910de829adb2b0fe9f94b2f27e74fcdafa6cd..c85aa6c248026c14c9fdb94531d63a389c305719 100644 (file)
@@ -11,21 +11,21 @@ enum RCL_POLICY {RCL_ROUND_ROBIN, RCL_BUFF_FIRST, RCL_PERSIST};
 
 typedef struct swap_control_v5
 {
-       int     sc_max_page_age;
-       int     sc_page_advance;
-       int     sc_page_decline;
-       int     sc_page_initial_age;
-       int     sc_max_buff_age;
-       int     sc_buff_advance;
-       int     sc_buff_decline;
-       int     sc_buff_initial_age;
-       int     sc_age_cluster_fract;
-       int     sc_age_cluster_min;
-       int     sc_pageout_weight;
-       int     sc_bufferout_weight;
-       int     sc_buffer_grace;
-       int     sc_nr_buffs_to_free;
-       int     sc_nr_pages_to_free;
+       unsigned int    sc_max_page_age;
+       unsigned int    sc_page_advance;
+       unsigned int    sc_page_decline;
+       unsigned int    sc_page_initial_age;
+       unsigned int    sc_max_buff_age;
+       unsigned int    sc_buff_advance;
+       unsigned int    sc_buff_decline;
+       unsigned int    sc_buff_initial_age;
+       unsigned int    sc_age_cluster_fract;
+       unsigned int    sc_age_cluster_min;
+       unsigned int    sc_pageout_weight;
+       unsigned int    sc_bufferout_weight;
+       unsigned int    sc_buffer_grace;
+       unsigned int    sc_nr_buffs_to_free;
+       unsigned int    sc_nr_pages_to_free;
        enum RCL_POLICY sc_policy;
 } swap_control_v5;
 typedef struct swap_control_v5 swap_control_t;
@@ -33,22 +33,22 @@ extern swap_control_t swap_control;
 
 typedef struct kswapd_control_v1
 {
-       int     maxpages;
-       int     pages_buff;
-       int     pages_shm;
-       int     pages_mmap;
-       int     pages_swap;
+       unsigned int    maxpages;
+       unsigned int    pages_buff;
+       unsigned int    pages_shm;
+       unsigned int    pages_mmap;
+       unsigned int    pages_swap;
 } kswapd_control_v1;
 typedef kswapd_control_v1 kswapd_control_t;
 extern kswapd_control_t kswapd_ctl;
 
 typedef struct swapstat_v1
 {
-       int     wakeups;
-       int     pages_reclaimed;
-       int     pages_shm;
-       int     pages_mmap;
-       int     pages_swap;
+       unsigned int    wakeups;
+       unsigned int    pages_reclaimed;
+       unsigned int    pages_shm;
+       unsigned int    pages_mmap;
+       unsigned int    pages_swap;
 } swapstat_v1;
 typedef swapstat_v1 swapstat_t;
 extern swapstat_t swapstats;
@@ -94,7 +94,7 @@ extern int min_free_pages, free_pages_low, free_pages_high;
  * scan the resource list. */
 static inline int AGE_CLUSTER_SIZE(int resources)
 {
-       int n = (resources * AGE_CLUSTER_FRACT) >> 10;
+       unsigned int n = (resources * AGE_CLUSTER_FRACT) >> 10;
        if (n < AGE_CLUSTER_MIN)
                return AGE_CLUSTER_MIN;
        else
index 46f1e4f19106d7d830d86513cd59918c6349e9d2..be24fa2423a801f07c2f6d4043871947a07a3e90 100644 (file)
@@ -8,6 +8,8 @@
 
 #ifdef __KERNEL__
 
+#include <asm/page.h>
+
 struct wait_queue {
        struct task_struct * task;
        struct wait_queue * next;
@@ -32,11 +34,11 @@ struct select_table_entry {
 };
 
 typedef struct select_table_struct {
-       int nr;
+       unsigned int nr;
        struct select_table_entry * entry;
 } select_table;
 
-#define __MAX_SELECT_TABLE_ENTRIES (4096 / sizeof (struct select_table_entry))
+#define __MAX_SELECT_TABLE_ENTRIES (PAGE_SIZE / sizeof (struct select_table_entry))
 
 #endif /* __KERNEL__ */
 
index 7fa56112d0dd14346ae42afd43ca2cffe96090e1..c72c7533336bf2955e6ebb599ac20d9adbb02509 100644 (file)
@@ -17,7 +17,7 @@ extern int                    inet_release(struct socket *sock,
                                             struct socket *peer);
 extern int                     inet_connect(struct socket *sock, 
                                             struct sockaddr * uaddr,
-                                            size_t addr_len, int flags);
+                                            int addr_len, int flags);
 extern int                     inet_accept(struct socket *sock, 
                                            struct socket *newsock, int flags);
 extern int                     inet_recvmsg(struct socket *sock, 
index 10aa486d474a0b7f5f16a1e86e6567e077b2605b..055aae19cb17bd970f198aab0eadbdee0692cc2e 100644 (file)
@@ -517,7 +517,7 @@ struct proto
                                        unsigned long timeout);
        int                     (*connect)(struct sock *sk,
                                        struct sockaddr *uaddr, 
-                                       size_t addr_len);
+                                       int addr_len);
 
        struct sock *           (*accept) (struct sock *sk, int flags);
        void                    (*retransmit)(struct sock *sk, int all);
@@ -543,7 +543,7 @@ struct proto
                                        int len, int noblock, int flags, 
                                        int *addr_len);
        int                     (*bind)(struct sock *sk, 
-                                       struct sockaddr *uaddr, size_t addr_len);
+                                       struct sockaddr *uaddr, int addr_len);
 
        int                     (*backlog_rcv) (struct sock *sk, 
                                                struct sk_buff *skb);
index aa1e74bb2b22e1e556283209c6834504ff854401..23fd545018f827706d86339a88c4480a5e85d61d 100644 (file)
@@ -316,7 +316,7 @@ extern int                  tcp_v4_backlog_rcv(struct sock *sk,
                                                   struct sk_buff *skb);
 extern int                     tcp_v4_connect(struct sock *sk,
                                               struct sockaddr *uaddr,
-                                              size_t addr_len);
+                                              int addr_len);
 
 
 extern void tcp_read_wakeup(struct sock *);
index 2bce60f38fef2194bea92f83b20eaa7141ea0c60..412943e4d1bc9ff91e7f9f0fa7bc28c55493b23e 100644 (file)
@@ -19,7 +19,7 @@ extern void                           tcpv6_init(void);
 
 extern int                             udpv6_connect(struct sock *sk,
                                                      struct sockaddr *uaddr,
-                                                     size_t addr_len);
+                                                     int addr_len);
 
 extern int                     datagram_recv_ctl(struct sock *sk,
                                                  struct msghdr *msg,
index 5a86f93fc7f5fa8561ef7baee06f36cedf2e5e8c..d834feb6d5e735320596bbe833cbea34ad318773 100644 (file)
@@ -37,7 +37,7 @@ extern void   udp_err(int type, int code, unsigned char *header,
 extern void    udp_send_check(struct udphdr *uh, __u32 saddr, 
                        __u32 daddr, int len, struct sock *sk);
 extern int     udp_connect(struct sock *sk,
-                           struct sockaddr *usin, size_t addr_len);
+                           struct sockaddr *usin, int addr_len);
 
 extern int     udp_sendmsg(struct sock *sk, struct msghdr *msg,
                            int len, int noblock, int flags);
index 2119f0e12ffbbec300fcefc7c598f31e805adccf..310afe82f5dcc96cf358558deaaa092c26bcd131 100644 (file)
@@ -482,8 +482,7 @@ unsigned long loops_per_sec = (1<<12);
 
 void calibrate_delay(void)
 {
-       int ticks;
-       int loopbit;
+       unsigned long ticks, loopbit;
        int lps_precision = LPS_PREC;
 
        loops_per_sec = (1<<12);
index 617e7d3ed18012a69984137b177557d3d3226480..864bc52e8497d326f8630133f72fe444cccaccb0 100644 (file)
@@ -15,7 +15,6 @@
 #include <linux/sched.h>
 #include <linux/kernel.h>
 #include <linux/mm.h>
-#include <linux/stddef.h>
 #include <linux/unistd.h>
 #include <linux/ptrace.h>
 #include <linux/malloc.h>
index c5be264127aff3f5ad694e290d357704ce16e645..b5f72a5763ac6388657ed3215f59c07b6bbef228 100644 (file)
@@ -6,8 +6,7 @@
 
 #include <linux/ctype.h>
 
-char _ctmp;
-unsigned char _ctype[] = {0x00,                        /* EOF */
+unsigned char _ctype[] = {
 _C,_C,_C,_C,_C,_C,_C,_C,                       /* 0-7 */
 _C,_C|_S,_C|_S,_C|_S,_C|_S,_C|_S,_C,_C,                /* 8-15 */
 _C,_C,_C,_C,_C,_C,_C,_C,                       /* 16-23 */
index bc785801c238c91fb3f9a022ca4ae15c218bf406..d5cca2d86ad30d69134625b4de0faecdffb1b88d 100644 (file)
@@ -127,7 +127,7 @@ repeat:
 
 int shrink_mmap(int priority, int dma)
 {
-       static int clock = 0;
+       static unsigned long clock = 0;
        struct page * page;
        unsigned long limit = max_mapnr;
        struct buffer_head *tmp, *bh;
index c35a7ffc1e13b02bf0aa56fdc00f5a6d875f6b52..fe3bc0b9157287093d9612fcf6a296d50d219f2b 100644 (file)
@@ -25,7 +25,8 @@
 #include <asm/bitops.h>
 #include <asm/pgtable.h>
 
-int nr_swapfiles = 0;
+unsigned int nr_swapfiles = 0;
+
 static struct {
        int head;       /* head of priority-ordered swapfile list */
        int next;       /* swapfile to be used next */
@@ -36,7 +37,7 @@ struct swap_info_struct swap_info[MAX_SWAPFILES];
 
 static inline int scan_swap_map(struct swap_info_struct *si)
 {
-       int offset;
+       unsigned long offset;
        /* 
         * We try to cluster swap pages by allocating them
         * sequentially in swap.  Once we've allocated
index 24758530a71b6ebc67d46e697dea06602b9087d1..211842144074e1ea7e0f6ffc3f1bb4d3607d5681 100644 (file)
@@ -1234,7 +1234,7 @@ static int atalk_autobind(atalk_socket *sk)
  *     Set the address 'our end' of the connection.
  */
  
-static int atalk_bind(struct socket *sock, struct sockaddr *uaddr,size_t addr_len)
+static int atalk_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
 {
        atalk_socket *sk;
        struct sockaddr_at *addr=(struct sockaddr_at *)uaddr;
@@ -1289,7 +1289,7 @@ static int atalk_bind(struct socket *sock, struct sockaddr *uaddr,size_t addr_le
  */
  
 static int atalk_connect(struct socket *sock, struct sockaddr *uaddr,
-       size_t addr_len, int flags)
+       int addr_len, int flags)
 {
        atalk_socket *sk=(atalk_socket *)sock->data;
        struct sockaddr_at *addr;
@@ -1350,7 +1350,7 @@ static int atalk_accept(struct socket *sock, struct socket *newsock, int flags)
  */
  
 static int atalk_getname(struct socket *sock, struct sockaddr *uaddr,
-       size_t *uaddr_len, int peer)
+       int *uaddr_len, int peer)
 {
        struct sockaddr_at sat;
        atalk_socket *sk;
index d5c8322bab5899bc35a6de4b1a16b706dd817495..7d08fed107c41cd839fb3e132aaa9b17beb99b5b 100644 (file)
@@ -1368,7 +1368,7 @@ static int ax25_release(struct socket *sock, struct socket *peer)
  *     BSD 4.4 ADDIFADDR type support. It is however small and trivially backward
  *     compatible 8)
  */
-static int ax25_bind(struct socket *sock, struct sockaddr *uaddr,size_t addr_len)
+static int ax25_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
 {
        struct sock *sk;
        struct full_sockaddr_ax25 *addr = (struct full_sockaddr_ax25 *)uaddr;
@@ -1431,7 +1431,7 @@ static int ax25_bind(struct socket *sock, struct sockaddr *uaddr,size_t addr_len
 }
 
 static int ax25_connect(struct socket *sock, struct sockaddr *uaddr,
-       size_t addr_len, int flags)
+       int addr_len, int flags)
 {
        struct sock *sk = (struct sock *)sock->data;
        struct sockaddr_ax25 *addr = (struct sockaddr_ax25 *)uaddr;
@@ -1608,7 +1608,7 @@ static int ax25_accept(struct socket *sock, struct socket *newsock, int flags)
 }
 
 static int ax25_getname(struct socket *sock, struct sockaddr *uaddr,
-       size_t *uaddr_len, int peer)
+       int *uaddr_len, int peer)
 {
        struct full_sockaddr_ax25 *sax = (struct full_sockaddr_ax25 *)uaddr;
        struct sock *sk;
index 0fb11f1178e88f134a13fb41794a877ecc25d609..a4c3cc6fa768364e09d4027a476e622cde1bd177 100644 (file)
@@ -505,7 +505,7 @@ void __skb_unlink(struct sk_buff *skb)
  *     Add data to an sk_buff
  */
  
-unsigned char *skb_put(struct sk_buff *skb, int len)
+unsigned char *skb_put(struct sk_buff *skb, unsigned int len)
 {
        unsigned char *tmp=skb->tail;
        IS_SKB(skb);
@@ -517,7 +517,7 @@ unsigned char *skb_put(struct sk_buff *skb, int len)
        return tmp;
 }
 
-unsigned char *skb_push(struct sk_buff *skb, int len)
+unsigned char *skb_push(struct sk_buff *skb, unsigned int len)
 {
        IS_SKB(skb);
        skb->data-=len;
@@ -528,7 +528,7 @@ unsigned char *skb_push(struct sk_buff *skb, int len)
        return skb->data;
 }
 
-unsigned char * skb_pull(struct sk_buff *skb, int len)
+unsigned char * skb_pull(struct sk_buff *skb, unsigned int len)
 {
        IS_SKB(skb);
        if(len>skb->len)
@@ -550,7 +550,7 @@ int skb_tailroom(struct sk_buff *skb)
        return skb->end-skb->tail;
 }
 
-void skb_reserve(struct sk_buff *skb, int len)
+void skb_reserve(struct sk_buff *skb, unsigned int len)
 {
        IS_SKB(skb);
        skb->data+=len;
@@ -562,7 +562,7 @@ void skb_reserve(struct sk_buff *skb, int len)
        IS_SKB(skb);
 }
 
-void skb_trim(struct sk_buff *skb, int len)
+void skb_trim(struct sk_buff *skb, unsigned int len)
 {
        IS_SKB(skb);
        if(skb->len>len)
index b28fc1e0c764c2bf26c63db9a26d13637223b279..34379849d5ccc3051a687a014df5e1ad7b86d5b5 100644 (file)
@@ -767,7 +767,7 @@ int inet_release(struct socket *sock, struct socket *peer)
 
 
 static int inet_bind(struct socket *sock, struct sockaddr *uaddr,
-              size_t addr_len)
+              int addr_len)
 {
        struct sockaddr_in *addr=(struct sockaddr_in *)uaddr;
        struct sock *sk=(struct sock *)sock->data, *sk2;
@@ -923,7 +923,7 @@ static int inet_bind(struct socket *sock, struct sockaddr *uaddr,
  */
  
 int inet_connect(struct socket *sock, struct sockaddr * uaddr,
-                size_t addr_len, int flags)
+                int addr_len, int flags)
 {
        struct sock *sk=(struct sock *)sock->data;
        int err;
@@ -1090,7 +1090,7 @@ int inet_accept(struct socket *sock, struct socket *newsock, int flags)
  */
  
 static int inet_getname(struct socket *sock, struct sockaddr *uaddr,
-                size_t *uaddr_len, int peer)
+                int *uaddr_len, int peer)
 {
        struct sockaddr_in *sin=(struct sockaddr_in *)uaddr;
        struct sock *sk;
index 66f79cc446eb91653ffd8d7c626e0c2743b1621e..89dd6549e7e3e81bd0777747c1cbe78ca2a573a7 100644 (file)
@@ -282,7 +282,7 @@ int packet_attach(struct sock *sk, struct device *dev)
  *     Bind a packet socket to a device
  */
 
-static int packet_bind(struct sock *sk, struct sockaddr *uaddr, size_t addr_len)
+static int packet_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len)
 {
        char name[15];
        struct device *dev;
index fcc139056631129d46889fed9cd2627a518ea06a..a36860c7a447d315e47c00f17d312b640dd02433 100644 (file)
@@ -127,7 +127,7 @@ static int tcp_unique_address(u32 saddr, u16 snum, u32 daddr, u16 dnum)
  *     This will initiate an outgoing connection. 
  */
  
-int tcp_v4_connect(struct sock *sk, struct sockaddr *uaddr, size_t addr_len)
+int tcp_v4_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len)
 {
        struct sk_buff *buff;
        struct sk_buff *skb1;
index 2dff0b6d8e8385d90c58273bbf227426749279e3..016cee54ceaa56d806bef141b2252d6743502b3b 100644 (file)
@@ -110,7 +110,7 @@ int tcp_send_skb(struct sock *sk, struct sk_buff *skb)
         
        if (size < sizeof(struct tcphdr) || size > skb->len) 
        {
-               printk("tcp_send_skb: bad skb (skb = %p, data = %p, th = %p, len = %lu)\n",
+               printk("tcp_send_skb: bad skb (skb = %p, data = %p, th = %p, len = %u)\n",
                        skb, skb->data, th, skb->len);
                kfree_skb(skb, FREE_WRITE);
                return 0;
index af592b412017582d55ca50c621e898011a192a2f..29e44e88a15f15984dfd14f50f85d2bcdc54e493 100644 (file)
@@ -599,7 +599,7 @@ int udp_recvmsg(struct sock *sk, struct msghdr *msg, int len,
        return(copied);
 }
 
-int udp_connect(struct sock *sk, struct sockaddr *uaddr, size_t addr_len)
+int udp_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len)
 {
        struct sockaddr_in *usin = (struct sockaddr_in *) uaddr;
        struct rtable *rt;
index 8dc0a7c567f80c215027d67799b63897d26b090f..41d1c4e9001da512efbdeb86de8cfc4bb39b59eb 100644 (file)
@@ -254,7 +254,7 @@ static int inet6_dup(struct socket *newsock, struct socket *oldsock)
  */
 
 static int inet6_bind(struct socket *sock, struct sockaddr *uaddr,
-                     size_t addr_len)
+                     int addr_len)
 {
        struct sockaddr_in6 *addr=(struct sockaddr_in6 *)uaddr;
        struct sock *sk=(struct sock *)sock->data, *sk2;
@@ -434,7 +434,7 @@ static int inet6_socketpair(struct socket *sock1, struct socket *sock2)
  */
  
 static int inet6_getname(struct socket *sock, struct sockaddr *uaddr,
-                size_t *uaddr_len, int peer)
+                int *uaddr_len, int peer)
 {
        struct sockaddr_in6 *sin=(struct sockaddr_in6 *)uaddr;
        struct sock *sk;
index 11a542c206e2b47514bfb93b9442eed2bc9d3b7c..bb03b34dd49646f323b3e02708e6bc011e475dc6 100644 (file)
@@ -85,7 +85,7 @@ static __u32 tcp_v6_init_sequence(struct sock *sk, struct sk_buff *skb)
 }
 
 static int tcp_v6_connect(struct sock *sk, struct sockaddr *uaddr, 
-                         size_t addr_len)
+                         int addr_len)
 {
        struct sockaddr_in6 *usin = (struct sockaddr_in6 *) uaddr;
        struct ipv6_pinfo *np = &sk->net_pinfo.af_inet6;
index 595529d161abd41e22c547d1130856ec13e7dd44..380122210f08a50169c2bc7657d2d9301db79903 100644 (file)
@@ -47,7 +47,7 @@ struct udp_mib udp_stats_in6;
  *
  */
 
-int udpv6_connect(struct sock *sk, struct sockaddr *uaddr, size_t addr_len)
+int udpv6_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len)
 {
        struct sockaddr_in6     *usin = (struct sockaddr_in6 *) uaddr;
        struct in6_addr         *daddr;
index 721ef622164112ef03279f16492438b1e36c8f35..82a85f68551260a8650b3bf2964d5616269b048c 100644 (file)
@@ -1792,7 +1792,7 @@ ipx_first_free_socketnum(ipx_interface *intrfc)
        return  ntohs(socketNum);
 }
        
-static int ipx_bind(struct socket *sock, struct sockaddr *uaddr,size_t addr_len)
+static int ipx_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
 {
        ipx_socket *sk;
        ipx_interface *intrfc;
@@ -1893,7 +1893,7 @@ static int ipx_bind(struct socket *sock, struct sockaddr *uaddr,size_t addr_len)
 }
 
 static int ipx_connect(struct socket *sock, struct sockaddr *uaddr,
-       size_t addr_len, int flags)
+       int addr_len, int flags)
 {
        ipx_socket *sk=(ipx_socket *)sock->data;
        struct sockaddr_ipx *addr;
@@ -1949,7 +1949,7 @@ static int ipx_accept(struct socket *sock, struct socket *newsock, int flags)
 }
 
 static int ipx_getname(struct socket *sock, struct sockaddr *uaddr,
-       size_t *uaddr_len, int peer)
+       int *uaddr_len, int peer)
 {
        ipx_address *addr;
        struct sockaddr_ipx sipx;
index 3f86be2ee27d29f5f9e9e0cdc4f3c608d5ae3619..6eac7e8a83ac59965ac556348d828f53bf88041f 100644 (file)
@@ -780,7 +780,7 @@ static int nr_release(struct socket *sock, struct socket *peer)
        return 0;
 }
 
-static int nr_bind(struct socket *sock, struct sockaddr *uaddr, size_t addr_len)
+static int nr_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
 {
        struct sock *sk;
        struct full_sockaddr_ax25 *addr = (struct full_sockaddr_ax25 *)uaddr;
@@ -834,7 +834,7 @@ static int nr_bind(struct socket *sock, struct sockaddr *uaddr, size_t addr_len)
 }
 
 static int nr_connect(struct socket *sock, struct sockaddr *uaddr,
-       size_t addr_len, int flags)
+       int addr_len, int flags)
 {
        struct sock *sk = (struct sock *)sock->data;
        struct sockaddr_ax25 *addr = (struct sockaddr_ax25 *)uaddr;
@@ -985,7 +985,7 @@ static int nr_accept(struct socket *sock, struct socket *newsock, int flags)
 }
 
 static int nr_getname(struct socket *sock, struct sockaddr *uaddr,
-       size_t *uaddr_len, int peer)
+       int *uaddr_len, int peer)
 {
        struct full_sockaddr_ax25 *sax = (struct full_sockaddr_ax25 *)uaddr;
        struct sock *sk;
index 0c845f2680d2419ee4638c45a1fc80d891ffc357..c5280efa64d041d58ad17a2a61f732e82cfca3d0 100644 (file)
@@ -765,7 +765,7 @@ static int rose_release(struct socket *sock, struct socket *peer)
        return 0;
 }
 
-static int rose_bind(struct socket *sock, struct sockaddr *uaddr, size_t addr_len)
+static int rose_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
 {
        struct sock *sk;
        struct sockaddr_rose *addr = (struct sockaddr_rose *)uaddr;
@@ -813,7 +813,7 @@ static int rose_bind(struct socket *sock, struct sockaddr *uaddr, size_t addr_le
        return 0;
 }
 
-static int rose_connect(struct socket *sock, struct sockaddr *uaddr, size_t addr_len, int flags)
+static int rose_connect(struct socket *sock, struct sockaddr *uaddr, int addr_len, int flags)
 {
        struct sock *sk = (struct sock *)sock->data;
        struct sockaddr_rose *addr = (struct sockaddr_rose *)uaddr;
@@ -963,7 +963,7 @@ static int rose_accept(struct socket *sock, struct socket *newsock, int flags)
 }
 
 static int rose_getname(struct socket *sock, struct sockaddr *uaddr,
-       size_t *uaddr_len, int peer)
+       int *uaddr_len, int peer)
 {
        struct sockaddr_rose *srose = (struct sockaddr_rose *)uaddr;
        struct sock *sk;
diff --git a/net/rose/rose_out b/net/rose/rose_out
deleted file mode 100644 (file)
index 745cb5a..0000000
+++ /dev/null
@@ -1,254 +0,0 @@
-/*
- *     Rose release 001
- *
- *     This is ALPHA test software. This code may break your machine, randomly fail to work with new 
- *     releases, misbehave and/or generally screw up. It might even work. 
- *
- *     This code REQUIRES 2.1.0 or higher/ NET3.029
- *
- *     This module:
- *             This module is free software; you can redistribute it and/or
- *             modify it under the terms of the GNU General Public License
- *             as published by the Free Software Foundation; either version
- *             2 of the License, or (at your option) any later version.
- *
- *     History
- *     Rose 001        Jonathan(G4KLX) Cloned from nr_out.c
- */
-
-#include <linux/config.h>
-#if defined(CONFIG_ROSE) || defined(CONFIG_ROSE_MODULE)
-#include <linux/errno.h>
-#include <linux/types.h>
-#include <linux/socket.h>
-#include <linux/in.h>
-#include <linux/kernel.h>
-#include <linux/sched.h>
-#include <linux/timer.h>
-#include <linux/string.h>
-#include <linux/sockios.h>
-#include <linux/net.h>
-#include <net/ax25.h>
-#include <linux/inet.h>
-#include <linux/netdevice.h>
-#include <linux/skbuff.h>
-#include <net/sock.h>
-#include <asm/segment.h>
-#include <asm/system.h>
-#include <linux/fcntl.h>
-#include <linux/mm.h>
-#include <linux/interrupt.h>
-#include <net/rose.h>
-
-/*
- *     This is where all Rose frames pass;
- */
-void rose_output(struct sock *sk, struct sk_buff *skb)
-{
-       struct sk_buff *skbn;
-       unsigned char header[ROSE_MIN_LEN];
-       int err, frontlen, len;
-
-       if (skb->len - ROSE_MIN_LEN > ROSE_PACLEN) {
-               /* Save a copy of the Header */
-               memcpy(header, skb->data, ROSE_MIN_LEN);
-               skb_pull(skb, ROSE_MIN_LEN);
-
-               frontlen = skb_headroom(skb);
-
-               while (skb->len > 0) {
-                       if ((skbn = sock_alloc_send_skb(sk, frontlen + ROSE_PACLEN, 0, 0, &err)) == NULL)
-                               return;
-
-                       skbn->sk   = sk;
-                       skbn->free = 1;
-                       skbn->arp  = 1;
-
-                       skb_reserve(skbn, frontlen);
-
-                       len = (ROSE_PACLEN > skb->len) ? skb->len : ROSE_PACLEN;
-
-                       /* Copy the user data */
-                       memcpy(skb_put(skbn, len), skb->data, len);
-                       skb_pull(skb, len);
-
-                       /* Duplicate the Header */
-                       skb_push(skbn, ROSE_MIN_LEN);
-                       memcpy(skbn->data, header, ROSE_MIN_LEN);
-
-                       if (skb->len > 0)
-                               skbn->data[2] |= M_BIT;
-               
-                       skb_queue_tail(&sk->write_queue, skbn); /* Throw it on the queue */
-               }
-               
-               skb->free = 1;
-               kfree_skb(skb, FREE_WRITE);
-       } else {
-               skb_queue_tail(&sk->write_queue, skb);          /* Throw it on the queue */
-       }
-
-       if (sk->protinfo.rose->state == ROSE_STATE_3)
-               rose_kick(sk);
-}
-
-/* 
- *     This procedure is passed a buffer descriptor for an iframe. It builds
- *     the rest of the control part of the frame and then writes it out.
- */
-static void rose_send_iframe(struct sock *sk, struct sk_buff *skb, int last)
-{
-       if (skb == NULL)
-               return;
-
-       if (last)
-               skb->data[0] |= D_BIT;
-
-       skb->data[2] |= (sk->protinfo.rose->vr << 5) & 0xE0;
-       skb->data[2] |= (sk->protinfo.rose->vs << 1) & 0x0E;
-
-       rose_transmit_buffer(sk, skb);  
-}
-
-void rose_send_nak_frame(struct sock *sk)
-{
-       struct sk_buff *skb, *skbn;
-       
-       if ((skb = skb_peek(&sk->protinfo.rose->ack_queue)) == NULL)
-               return;
-               
-       if ((skbn = skb_clone(skb, GFP_ATOMIC)) == NULL)
-               return;
-
-       skbn->data[2] = sk->protinfo.rose->va;
-       skbn->data[3] = sk->protinfo.rose->vr;
-
-       if (sk->protinfo.rose->condition & OWN_RX_BUSY_CONDITION)
-               skbn->data[4] |= NR_CHOKE_FLAG;
-
-       rose_transmit_buffer(sk, skbn);
-
-       sk->protinfo.rose->condition &= ~ACK_PENDING_CONDITION;
-       sk->protinfo.rose->vl      = sk->protinfo.rose->vr;
-       sk->protinfo.rose->t1timer = 0;
-}
-
-void rose_kick(struct sock *sk)
-{
-       struct sk_buff *skb, *skbn;
-       int last = 1;
-       unsigned short start, end, next;
-
-       del_timer(&sk->timer);
-
-       start = (skb_peek(&sk->protinfo.rose->ack_queue) == NULL) ? sk->protinfo.rose->va : sk->protinfo.rose->vs;
-       end   = (sk->protinfo.rose->va + sk->window) % ROSE_MODULUS;
-
-       if (!(sk->protinfo.rose->condition & PEER_RX_BUSY_CONDITION) &&
-           start != end                                  &&
-           skb_peek(&sk->write_queue) != NULL) {
-
-               sk->protinfo.rose->vs = start;
-
-               /*
-                * Transmit data until either we're out of data to send or
-                * the window is full.
-                */
-
-               /*
-                * Dequeue the frame and copy it.
-                */
-               skb  = skb_dequeue(&sk->write_queue);
-
-               do {
-                       if ((skbn = skb_clone(skb, GFP_ATOMIC)) == NULL) {
-                               skb_queue_head(&sk->write_queue, skb);
-                               break;
-                       }
-
-                       next = (sk->protinfo.rose->vs + 1) % ROSE_MODULUS;
-                       last = (next == end);
-
-                       /*
-                        * Transmit the frame copy.
-                        */
-                       rose_send_iframe(sk, skbn, last);
-
-                       sk->protinfo.rose->vs = next;
-
-                       /*
-                        * Requeue the original data frame.
-                        */
-                       skb_queue_tail(&sk->protinfo.rose->ack_queue, skb);
-
-               } while (!last && (skb = skb_dequeue(&sk->write_queue)) != NULL);
-
-               sk->protinfo.rose->vl = sk->protinfo.rose->vr;
-               sk->protinfo.rose->condition &= ~ACK_PENDING_CONDITION;
-       }
-
-       rose_set_timer(sk);
-}
-
-void rose_transmit_buffer(struct sock *sk, struct sk_buff *skb)
-{
-       unsigned char *dptr;
-
-       dptr  = skb_push(skb, 1);
-       *dptr = AX25_P_ROSE;
-
-       skb->arp = 1;
-
-       if (!ax25_send_frame(skb, (ax25_address *)sk->protinfo.rose->neighbour->dev->dev_addr, &sk->protinfo.rose->neighbour->callsign, sk->protinfo.rose->neighbour->digipeat, sk->protinfo.rose->neighbour->dev)) {
-               kfree_skb(skb, FREE_WRITE);
-
-               sk->state = TCP_CLOSE;
-               sk->err   = ENETUNREACH;
-               if (!sk->dead)
-                       sk->state_change(sk);
-               sk->dead  = 1;
-       }
-}
-
-/*
- * The following routines are taken from page 170 of the 7th ARRL Computer
- * Networking Conference paper, as is the whole state machine.
- */
-
-void rose_establish_data_link(struct sock *sk)
-{
-       sk->protinfo.rose->condition = 0x00;
-
-       rose_write_internal(sk, ROSE_CALL_REQUEST);
-
-       sk->protinfo.rose->t1timer = sk->protinfo.rose->t1;
-}
-
-/*
- * Never send a NAK when we are CHOKEd.
- */
-void rose_enquiry_response(struct sock *sk)
-{
-       int frametype = NR_INFOACK;
-       
-       if (sk->protinfo.rose->condition & OWN_RX_BUSY_CONDITION)
-               frametype |= NR_CHOKE_FLAG;
-       
-       rose_write_internal(sk, frametype);
-
-       sk->protinfo.rose->vl = sk->protinfo.rose->vr;
-       sk->protinfo.rose->condition &= ~ACK_PENDING_CONDITION;
-}
-
-void rose_check_iframes_acked(struct sock *sk, unsigned short nr)
-{
-       if (sk->protinfo.rose->vs == nr) {
-               rose_frames_acked(sk, nr);
-       } else {
-               if (sk->protinfo.rose->va != nr) {
-                       rose_frames_acked(sk, nr);
-               }
-       }
-}
-
-#endif
index 0e00aa9306fd566125dd9411e4f6218289897a80..e96ec9d052a62e1257814419b2f07bc5d45247b0 100644 (file)
@@ -806,7 +806,7 @@ asmlinkage int sys_accept(int fd, struct sockaddr *upeer_sockaddr, int *upeer_ad
  *     include the -EINPROGRESS status for such sockets.
  */
  
-asmlinkage int sys_connect(int fd, struct sockaddr *uservaddr, size_t addrlen)
+asmlinkage int sys_connect(int fd, struct sockaddr *uservaddr, int addrlen)
 {
        struct socket *sock;
        struct file *file;
@@ -857,7 +857,7 @@ asmlinkage int sys_connect(int fd, struct sockaddr *uservaddr, size_t addrlen)
  *     name to user space.
  */
 
-asmlinkage int sys_getsockname(int fd, struct sockaddr *usockaddr, size_t *usockaddr_len)
+asmlinkage int sys_getsockname(int fd, struct sockaddr *usockaddr, int *usockaddr_len)
 {
        struct socket *sock;
        char address[MAX_SOCK_ADDR];
@@ -882,7 +882,7 @@ asmlinkage int sys_getsockname(int fd, struct sockaddr *usockaddr, size_t *usock
  *     name to user space.
  */
  
-asmlinkage int sys_getpeername(int fd, struct sockaddr *usockaddr, size_t *usockaddr_len)
+asmlinkage int sys_getpeername(int fd, struct sockaddr *usockaddr, int *usockaddr_len)
 {
        struct socket *sock;
        char address[MAX_SOCK_ADDR];
@@ -942,7 +942,7 @@ asmlinkage int sys_send(int fd, void * buff, size_t len, unsigned flags)
  */
 
 asmlinkage int sys_sendto(int fd, void * buff, size_t len, unsigned flags,
-          struct sockaddr *addr, size_t addr_len)
+          struct sockaddr *addr, int addr_len)
 {
        struct socket *sock;
        struct file *file;
@@ -1025,7 +1025,7 @@ asmlinkage int sys_recv(int fd, void * ubuf, size_t size, unsigned flags)
  */
 
 asmlinkage int sys_recvfrom(int fd, void * ubuf, size_t size, unsigned flags,
-            struct sockaddr *addr, size_t *addr_len)
+            struct sockaddr *addr, int *addr_len)
 {
        struct socket *sock;
        struct file *file;
index aaddee6beb6a0a685a238f45813a42ef5d308b9e..aeb752d96d6f82ba4a380e2d15b42ad748f0e67d 100644 (file)
@@ -397,7 +397,7 @@ static unix_socket *unix_find_other(char *path, int *error)
 }
 
 
-static int unix_bind(struct socket *sock, struct sockaddr *uaddr, size_t addr_len)
+static int unix_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
 {
        struct sockaddr_un *sunaddr=(struct sockaddr_un *)uaddr;
        unix_socket *sk=sock->data;
@@ -444,7 +444,7 @@ static int unix_bind(struct socket *sock, struct sockaddr *uaddr, size_t addr_le
        
 }
 
-static int unix_connect(struct socket *sock, struct sockaddr *uaddr, size_t addr_len, int flags)
+static int unix_connect(struct socket *sock, struct sockaddr *uaddr, int addr_len, int flags)
 {
        unix_socket *sk=sock->data;
        struct sockaddr_un *sunaddr=(struct sockaddr_un *)uaddr;
@@ -669,7 +669,7 @@ static int unix_accept(struct socket *sock, struct socket *newsock, int flags)
        return 0;
 }
 
-static int unix_getname(struct socket *sock, struct sockaddr *uaddr, size_t *uaddr_len, int peer)
+static int unix_getname(struct socket *sock, struct sockaddr *uaddr, int *uaddr_len, int peer)
 {
        unix_socket *sk=sock->data;
        struct sockaddr_un *sunaddr=(struct sockaddr_un *)uaddr;