From fd25c5f95b63f269f3e7bd4423d4380931c4fbef Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Fri, 23 Nov 2007 15:10:53 -0500 Subject: [PATCH] Import 1.3.95 --- CREDITS | 16 +-- Documentation/Configure.help | 157 +++++++++++++++++---------- Documentation/devices.txt | 2 +- Documentation/isdn/README.pcbit | 6 +- Documentation/isdn/syncPPP.FAQ | 10 +- Makefile | 2 +- README | 8 +- arch/alpha/defconfig | 1 + arch/alpha/kernel/entry.S | 81 ++++++++++++-- arch/alpha/kernel/ksyms.c | 5 + arch/alpha/lib/Makefile | 3 + arch/alpha/lib/memset.S | 106 +++++++++++++++++++ arch/alpha/lib/memset.c | 46 -------- arch/i386/defconfig | 1 + arch/m68k/fpsp040/README | 30 ++++++ arch/sparc/boot/README | 2 +- arch/sparc/kernel/auxio.c | 2 +- arch/sparc/kernel/entry.S | 6 +- arch/sparc/kernel/etrap.S | 6 +- arch/sparc/kernel/head.S | 6 +- arch/sparc/kernel/idprom.c | 2 +- arch/sparc/kernel/ioport.c | 8 +- arch/sparc/kernel/irq.c | 2 +- arch/sparc/kernel/process.c | 2 +- arch/sparc/kernel/sclow.S | 2 +- arch/sparc/kernel/setup.c | 2 +- arch/sparc/kernel/smp.c | 4 +- arch/sparc/kernel/sparc-stub.c | 4 +- arch/sparc/kernel/sun4c_irq.c | 2 +- arch/sparc/kernel/sun4m_irq.c | 4 +- arch/sparc/kernel/sunos_ioctl.c | 2 +- arch/sparc/kernel/sys_sparc.c | 2 +- arch/sparc/kernel/sys_sunos.c | 12 +-- arch/sparc/kernel/systbls.S | 2 +- arch/sparc/kernel/wuf.S | 4 +- arch/sparc/lib/strlen.S | 2 +- arch/sparc/mm/fault.c | 2 +- arch/sparc/mm/generic.c | 2 +- arch/sparc/mm/init.c | 2 +- arch/sparc/mm/srmmu.c | 8 +- arch/sparc/mm/sun4c.c | 8 +- arch/sparc/prom/memory.c | 8 +- arch/sparc/prom/palloc.c | 2 +- drivers/block/ide-tape.c | 11 +- drivers/block/ide.c | 123 +++++++++++----------- drivers/block/ll_rw_blk.c | 11 +- drivers/block/loop.c | 2 + drivers/char/ChangeLog | 15 +++ drivers/char/README.stallion | 56 ++-------- drivers/char/cyclades.c | 2 +- drivers/char/istallion.c | 181 ++++++++++++-------------------- drivers/char/misc.c | 2 +- drivers/char/n_tty.c | 4 +- drivers/char/pty.c | 42 +++++--- drivers/char/stallion.c | 11 +- drivers/char/suncons.c | 18 ++-- drivers/char/sunmouse.c | 4 +- drivers/char/tty_io.c | 2 +- drivers/isdn/pcbit/callbacks.c | 14 +-- drivers/isdn/pcbit/callbacks.h | 2 +- drivers/isdn/pcbit/capi.c | 10 +- drivers/isdn/pcbit/capi.h | 2 +- drivers/isdn/pcbit/drv.c | 10 +- drivers/isdn/pcbit/edss1.c | 16 +-- drivers/isdn/pcbit/edss1.h | 6 +- drivers/isdn/pcbit/layer2.c | 14 +-- drivers/isdn/pcbit/layer2.h | 2 +- drivers/isdn/pcbit/module.c | 2 +- drivers/isdn/pcbit/pcbit.h | 4 +- drivers/isdn/teles/isdnl3.c | 2 +- drivers/net/depca.c | 7 +- drivers/net/ewrk3.c | 7 +- drivers/net/ppp.c | 2 +- drivers/sbus/dvma.c | 2 +- drivers/scsi/esp.h | 2 +- drivers/scsi/scsi.c | 16 +-- drivers/scsi/st.c | 25 ++++- drivers/sound/ad1848.c | 2 +- fs/buffer.c | 14 +-- fs/ext2/super.c | 2 +- fs/locks.c | 48 +++++---- fs/pipe.c | 2 + fs/ufs/ufs_super.c | 2 + fs/ufs/ufs_symlink.c | 4 +- include/asm-alpha/io.h | 19 +--- include/asm-i386/pgtable.h | 4 +- include/asm-sparc/asi.h | 2 +- include/asm-sparc/auxio.h | 2 +- include/asm-sparc/bsderrno.h | 2 +- include/asm-sparc/cache.h | 2 +- include/asm-sparc/cypress.h | 2 +- include/asm-sparc/dma.h | 2 +- include/asm-sparc/ecc.h | 2 +- include/asm-sparc/fbio.h | 2 +- include/asm-sparc/floppy.h | 2 +- include/asm-sparc/head.h | 4 +- include/asm-sparc/irq.h | 2 +- include/asm-sparc/mbus.h | 2 +- include/asm-sparc/memreg.h | 2 +- include/asm-sparc/mman.h | 2 +- include/asm-sparc/mostek.h | 2 +- include/asm-sparc/mpmbox.h | 2 +- include/asm-sparc/mxcc.h | 2 +- include/asm-sparc/oplib.h | 4 +- include/asm-sparc/pconf.h | 4 +- include/asm-sparc/pgtsrmmu.h | 2 +- include/asm-sparc/signal.h | 2 +- include/asm-sparc/smp.h | 2 +- include/asm-sparc/solerrno.h | 4 +- include/asm-sparc/traps.h | 2 +- include/asm-sparc/unistd.h | 2 +- include/asm-sparc/vac-ops.h | 2 +- include/asm-sparc/vaddrs.h | 2 +- include/asm-sparc/viking.h | 2 +- include/linux/blkdev.h | 1 + include/linux/fs.h | 4 + include/linux/istallion.h | 1 + include/linux/net.h | 3 - include/linux/tty.h | 2 +- kernel/exit.c | 25 ++--- kernel/sched.c | 40 ++----- lib/string.c | 12 +++ mm/filemap.c | 7 +- net/ipv4/ip_output.c | 9 +- 124 files changed, 830 insertions(+), 648 deletions(-) create mode 100644 arch/alpha/lib/memset.S delete mode 100644 arch/alpha/lib/memset.c create mode 100644 arch/m68k/fpsp040/README diff --git a/CREDITS b/CREDITS index 742e99f18f4c..918ed4877179 100644 --- a/CREDITS +++ b/CREDITS @@ -410,6 +410,13 @@ N: Philip Gladstone E: philipg@onsett.com D: Kernel / timekeeping stuff +N: Dmitry S. Gorodchanin +E: begemot@bgm.rosprint.net +D: RISCom/8 driver, misc kernel fixes. +S: 6/1 M.Koneva bl, apt #125 +S: Poltava 314023 +S: Ukraine + N: Grant Guenther E: grant@torque.net D: Iomega PPA / ZIP driver @@ -555,7 +562,7 @@ S: RG6 2NU S: United Kingdom N: Michael K. Johnson -E: johnsonm@sunsite.unc.edu +E: johnsonm@redhat.com D: The Linux Documentation Project D: Kernel Hackers' Guide D: Procps @@ -1365,10 +1372,3 @@ D: Miscellaneous kernel fixes S: 3078 Sulphur Spring Court S: San Jose, California 95148 S: USA - -N: Dmitry S. Gorodchanin -E: begemot@bgm.rosprint.net -D: RISCom/8 driver, misc kernel fixes. -S: 6/1 M.Koneva bl, apt #125 -S: Poltava 314023 -S: Ukraine diff --git a/Documentation/Configure.help b/Documentation/Configure.help index 5514508b6167..9cdc643e1d0e 100644 --- a/Documentation/Configure.help +++ b/Documentation/Configure.help @@ -16,7 +16,7 @@ # does, only the first occurrence will be used by Configure. The lines # in a help text should be indented two positions. Lines starting with # `#' are ignored. To be nice to menuconfig, limit your lines to 70 -# chars. Use emacs' kfill.el to edit this file or you lose. +# characters. Use emacs' kfill.el to edit this file or you lose. # # If you add a help text to this file, please try to be as gentle as # possible. Don't use unexplained acronyms and generally write for the @@ -24,7 +24,7 @@ # installed Linux and is now recompiling the kernel for the first # time. Tell them what to do if they're unsure. Technical information # should go in a README in the Documentation directory. Mention all -# the relevant READMEs in the help text. +# the relevant READMEs and HOWTOs in the help text. # # All this was shamelessly stolen from several different sources. Many # thanks to all the contributors. Feel free to use these help texts @@ -557,7 +557,9 @@ CONFIG_BINFMT_ELF newer 1.3 kernel or one of the stable 1.2 versions. If you want to compile this as a module ( = code which can be inserted in and removed from the running kernel whenever you want), say M here and - read Documentation/modules.txt. + read Documentation/modules.txt. Saying M or N here is dangerous + because some crucial programs on your system might be in ELF + format. Compile kernel as ELF - if your GCC is ELF-GCC CONFIG_KERNEL_ELF @@ -585,7 +587,8 @@ CONFIG_BINFMT_AOUT this older executable format. If you don't know what to answer at this point then answer Y. You may answer M for module support and later load the module when you find a program which needs a.out - format. + format. Saying M or N here is dangerous, because some crucial + programs on your system might be in A.OUT format. Processor type CONFIG_M386 @@ -655,9 +658,12 @@ CONFIG_KERNELD by itself, together with the user level daemon "kerneld". Note that "kerneld" will also automatically unload all unused modules, so you don't have to use "rmmod" either. - There are some other "kernel callouts" that will be available - later on, such as a user level "beeper" and a generic screen blanker. - The "kerneld" daemon is included in "modules-1.2.8" and later. + kerneld will also provide support for different user-level beeper + and screen blanker programs later on. + The "kerneld" daemon is included in the package "modules-1.2.8" and + later. You will probably want to read the kerneld mini-HOWTO, + available via ftp (user: anonymous) from + sunsite.unc.edu:/pub/Linux/docs/HOWTO/mini. If unsure, say Y. ARP daemon support CONFIG_ARPD @@ -1048,10 +1054,20 @@ CONFIG_BPQETHER Bridging (test) CONFIG_BRIDGE - Enables bridge mode support in the box. This allows you to use a Linux - box (suitably configured) as an ethernet bridge including 802.1 spanning - tree support. This is in test. There are a small batch of changes before - final release but it should work nicely. + If you enable this, your Linux box will be able to act as an + ethernet bridge, which means that the different ethernet segments it + is connected to will appear as one ethernet to the + participants. Several such bridges can work together to create even + larger networks of ethernets using a cool spanning tree + algorithm. Note that if your box acts as a bridge, it probably + contains several ethernet devices, but the kernel is not able to + recognize more than one at boot time without help; for details read + the Multiple-Ethernet-mini-HOWTO, available via ftp (user: + anonymous) in sunsite.unc.edu:/pub/Linux/docs/HOWTO/mini. The + Bridging code is still in test. If unsure, say N. +### +### How to use? +### Kernel/User network link driver(ALPHA) CONFIG_NETLINK @@ -1213,19 +1229,29 @@ CONFIG_SCSI_AIC7XXX BusLogic SCSI support CONFIG_SCSI_BUSLOGIC This is support for BusLogic MultiMaster SCSI Host Adaptors. - Consult the documentation in drivers/scsi/README.BusLogic for more - information. BusLogic FlashPoint SCSI Host Adapters are not - supported by this driver. If this driver does not work correctly - without modification, please consult the author. This driver may - also be built as a module, but only a single instance may be loaded. - You might also want to read the SCSI-HOWTO, available via anonymous - ftp from sunsite.unc.edu:/pub/Linux/docs/HOWTO. - + Consult the SCSI-HOWTO, available via anonymous ftp from + sunsite.unc.edu:/pub/Linux/docs/HOWTO and the file + drivers/scsi/README.BusLogic for more information. BusLogic + FlashPoint SCSI Host Adapters are not supported by this driver, but + BusLogic has initiated an upgrade program which allows you to get a + better adaptor for few $$. Read about it in + drivers/scsi/README.FlashPoint. If this driver does not work + correctly without modification, please contact the author. You can + build this driver also as a module ( = code which can be inserted in + and removed from the running kernel whenever you want), but only a + single instance may be loaded. If you want to compile it as a + module, say M here and read Documentation/modules.txt. + DTC3180/3280 SCSI support CONFIG_SCSI_DTC3280 - This is support for DTC 3180/3280 SCSI Host Adaptors. It does not - use IRQ's. It does not support parity on the SCSI bus. - + This is support for DTC 3180/3280 SCSI Host Adaptors. Please read + the SCSI-HOWTO, available via ftp (user: anonymous) at + sunsite.unc.edu:/pub/Linux/docs/HOWTO and the file + drivers/scsi/README.dtc3x80. This driver is also available as a + module (= code which can be inserted in and removed from the running + kernel whenever you want). If you want to compile it as a module, + say M here and read Documentation/modules.txt. + EATA-DMA (DPT, NEC, ATT, Olivetti for ISA, EISA, PCI) support CONFIG_SCSI_EATA_DMA This is support for the EATA-DMA protocol compliant SCSI Host Adaptors @@ -1328,6 +1354,12 @@ CONFIG_SCSI_NCR53C7xx_FAST adaptor. Some systems have problems with that speed, so it's safest to say N here. +allow DISCONNECT +CONFIG_SCSI_NCR53C7xx_DISCONNECT +### +### Dunno +### + Always IN2000 SCSI support (test release) CONFIG_SCSI_IN2000 Believe it or not, there is a SCSI host adaptor of that name. It is @@ -1588,6 +1620,14 @@ CONFIG_STRIP think you might get a Metricom radio in the future, there is no harm in saying yes to STRIP now, except that it makes the kernel a bit bigger. +WIC (Radio IP bridge) +CONFIG_WIC + Don't know what this is; has something to do with the parallel + port. Say N and that's that. But if you want to compile it as a + module ( = code which can be inserted in and removed from the + running kernel whenever you want), say M here and read + Documentation/modules.txt. :-) + Z8530 SCC kiss emulation driver for AX.2 CONFIG_SCC These cards are used to connect your Linux box to an amateur radio @@ -1813,12 +1853,12 @@ CONFIG_EL2 3c505 support CONFIG_ELPLUS Information about this network (ethernet) card can be found in - drivers/net/README.3c505. If you have a card of this type, say Y and - read the Ethernet-HOWTO, available via ftp (user: anonymous) in - sunsite.unc.edu:/pub/Linux/docs/HOWTO. If you want to compile this - as a module ( = code which can be inserted in and removed from the - running kernel whenever you want), say M here and read - Documentation/modules.txt as well as + Documentation/networking/3c505.txt. If you have a card of this type, + say Y and read the Ethernet-HOWTO, available via ftp (user: + anonymous) in sunsite.unc.edu:/pub/Linux/docs/HOWTO. If you want to + compile this as a module ( = code which can be inserted in and + removed from the running kernel whenever you want), say M here and + read Documentation/modules.txt as well as Documentation/networking/net-modules.txt. If you plan to use more than one network card under linux, read the Multiple-Ethernet-mini-HOWTO, available from @@ -2199,19 +2239,18 @@ CONFIG_DE4X5 DECchip Tulip (dc21x4x) PCI support CONFIG_DEC_ELCP This driver is developed for the SMC EtherPower series ethernet - cards and also works with the DECchip 21040/21041/21140 - (Tulip series) based other cards. If you have a network card of - this type, say Y and read the Ethernet-HOWTO, available via ftp - (user: anonymous) in sunsite.unc.edu:/pub/Linux/docs/HOWTO. More - specific information is contained in - Documentation/networking/tulip.txt. This driver is also available - as a module ( = code which can be inserted in and removed from - the running kernel whenever you want). If you want to compile + cards and also works with cards based on the DECchip + 21040/21041/21140 (Tulip series) chips. (If your card is NOT SMC + EtherPower 10/100 PCI (smc9332dst), you can also try the driver from + "DE425, DE434, DE435 support", above.) However, most people with a + network card of this type will say Y here. Do read the + Ethernet-HOWTO, available via ftp (user: anonymous) in + sunsite.unc.edu:/pub/Linux/docs/HOWTO. More specific information is + contained in Documentation/networking/tulip.txt. This driver is also + available as a module ( = code which can be inserted in and removed + from the running kernel whenever you want). If you want to compile it as a module, say M here and read Documentation/modules.txt as well as Documentation/networking/net-modules.txt. - ****************************************************************** - If your card is NOT SMC EtherPower 10/100 PCI (smc9332dst), - you can try the de4x5.c driver. Digi Intl. RightSwitch support CONFIG_DGRS @@ -2478,14 +2517,13 @@ CONFIG_ISP16_CDI N.B. options are case sensitive. Read Documentation/cdrom/isp16 for details. - Quota support CONFIG_QUOTA If you say Y here, you will be able to set per user limits for disk usage (also called diskquotas). Currently, it works only for the ext2 filesystem; you need the software available via ftp (user: - anonymous) from - sunsite.unc.edu:/pub/Linux/system/Admin/quota_acct.tar.gz in order to + anonymous) in + ftp.funet.fi:/pub/Linux/People/Linux/subsystems/quota/ in order to use it. Probably this is only useful for multi user systems. If unsure, say N. @@ -3023,7 +3061,7 @@ CONFIG_APM_CPU_IDLE the CPU becomes idle. (On machines with more than one CPU, this option does nothing.) -Black display +Enable console blanking using APM CONFIG_APM_DISPLAY_BLANK Enable console blanking using the APM. Some laptops can use this to turn off the LCD backlight when the VC screen blanker blanks the @@ -3089,16 +3127,17 @@ CONFIG_SOFT_WATCHDOG Enhanced Real Time Clock Support CONFIG_RTC If you enable this option and create a character special file - /dev/rtc with major number 10 and minor number 135 using mknod - ("man mknod"), you will get access to the real time clock built - into your computer. It can be used to generate signals from as - low as 1Hz up to 8192Hz, and can also be used as a 24 hour alarm. - It reports status information via the file /proc/rtc and its - behaviour is set by various ioctls on /dev/rtc. People running - SMP versions of Linux should enable this option to read and set - the RTC clock in a SMP compatible fashion. If you think you - have a use for such a device (such as periodic data sampling), then - say Y here, and go read the file Documentation/rtc.txt for details. + /dev/rtc with major number 10 and minor number 135 using mknod ("man + mknod"), you will get access to the real time clock built into your + computer. Every PC has such a clock built in. It can be used to + generate signals from as low as 1Hz up to 8192Hz, and can also be + used as a 24 hour alarm. It reports status information via the file + /proc/rtc and its behaviour is set by various ioctls on + /dev/rtc. People running SMP (= multiprocessor) versions of Linux + should enable this option to read and set the RTC clock in a SMP + compatible fashion. If you think you have a use for such a device + (such as periodic data sampling), then say Y here, and go read the + file Documentation/rtc.txt for details. Sound card support CONFIG_SOUND @@ -3148,7 +3187,7 @@ CONFIG_ISDN modem emulator. Network devices support autodial, channel-bundling, callback and caller-authentication without having a daemon running. A reduced T.70 protocol is supported with tty's suitable - for German BTX. Currently Cards by Teles and compatibles and ICN are + for German BTX. Currently cards by Teles and compatibles and ICN are supported. On D-Channel, the protocols EDSS1 and 1TR6 are supported. See Documentation/isdn/README for more information. @@ -3212,7 +3251,7 @@ CONFIG_AP1000 # LocalWords: unc edu docs emu README kB BLK DEV FD Thinkpad fd MFM RLL IDE gz # LocalWords: cdrom harddisk diskless netboot nfs xzvf ATAPI MB harddrives ide # LocalWords: HD harddisks CDROMs IDECD NEC MITSUMI filesystem XT XD PCI bios -# LocalWords: ISA EISA Microchannel VESA BIOSes IPC SYSVIPC ipc Ctrl +# LocalWords: ISA EISA Microchannel VESA BIOSes IPC SYSVIPC ipc Ctrl dmesg hlt # LocalWords: BINFMT Linkable http ac uk jo html GCC Sparc AVANTI CABRIOLET EB # LocalWords: netscape gcc LD CC toplevel MODVERSIONS insmod rmmod modprobe IP # LocalWords: genksyms INET loopback gatewaying ethernet internet PPP ARP Arp @@ -3249,12 +3288,12 @@ CONFIG_AP1000 # LocalWords: pppd Zilog ZS soundcards SRM bootloader ez mainmenu rarp ipfwadm # LocalWords: RTNETLINK mknod xos MTU lwared Macs mac netatalk macs cs Wolff # LocalWords: dartmouth flowerpt MultiMaster FlashPoint tudelft etherexpress -# LocalWords: ICL EtherTeam ETH IDESCSI TXC SmartRAID SmartCache +# LocalWords: ICL EtherTeam ETH IDESCSI TXC SmartRAID SmartCache httpd sjc dlp # LocalWords: thesphere TwoServers BOOTP DHCP ncpfs BPQETHER BPQ chipsets MG # LocalWords: bsd comp Sparcstation le SunOS ie Gracilis PackeTwin PT pt LU FX # LocalWords: FX TEAC SoundBlaster CR CreativeLabs LCS mS ramdisk IDETAPE cmd # LocalWords: Vertos Genoa Funai hsfs NCP NetWare tgz APM apm ioctls UltraLite -# LocalWords: TravelMate CDT LCD backlight VC RPC Mips DECStation AXP +# LocalWords: TravelMate CDT LCD backlight VC RPC Mips DECStation AXP barlow # LocalWords: PMAX MILO Alphas Multia Tseng linuxelf endian mipsel mips drv HT # LocalWords: KERNELD kerneld callouts AdvanSys advansys diskquotas Admin WDT # LocalWords: wdt hdb hdc bugfix SiS vlb Acculogic CSA DTC dtc Holtek ht QDI @@ -3270,4 +3309,6 @@ CONFIG_AP1000 # LocalWords: FC DC dc PPA IOMEGA's ppa RNFS FMV Fujitsu ARPD arpd loran layes # LocalWords: FRAD indiana framerelay DLCI DCLIs Sangoma SDLA mrouted sync sec # LocalWords: Starmode Metricom MosquitoNet mosquitonet kbit nfsroot Digiboard -# LocalWords: DIGI Xe Xeve digiboard UMISC touchscreens +# LocalWords: DIGI Xe Xeve digiboard UMISC touchscreens mtu ethernets HBAs MEX +# LocalWords: Shifflett netcom js jshiffle WIC DECchip ELCP EtherPower dst RTC +# LocalWords: rtc SMP diff --git a/Documentation/devices.txt b/Documentation/devices.txt index a29f4d1213c6..a2dad5f937b9 100644 --- a/Documentation/devices.txt +++ b/Documentation/devices.txt @@ -9,7 +9,7 @@ he stopped maintaining when he got busy with other things in 1993. It is a registry of allocated major device numbers, as well as the recommended /dev directory nodes for these devices. -The lastest version of this list is included with the Linux kernel +The latest version of this list is included with the Linux kernel sources in LaTeX and ASCII form. In case of discrepancy, the LaTeX version is authoritative. diff --git a/Documentation/isdn/README.pcbit b/Documentation/isdn/README.pcbit index 2b6b4792083f..e93562b2c33b 100644 --- a/Documentation/isdn/README.pcbit +++ b/Documentation/isdn/README.pcbit @@ -5,12 +5,12 @@ The PCBIT is a Euro ISDN adapter manufactured in Portugal by Octal and developed in cooperation with Portugal Telecom and Inesc. The driver interfaces with the standard kernel isdn facilities -originaly developed by Fritz Elfert in the isdn4linux project. +originally developed by Fritz Elfert in the isdn4linux project. The common versions of the pcbit board require a firmware that is distributed (and copyrighted) by the manufacturer. To load this -firmware you need "pcbitctl" availiable on the standard isdn4k-utils -package or in the pcbit package availiable in: +firmware you need "pcbitctl" available on the standard isdn4k-utils +package or in the pcbit package available in: ftp://ftp.di.fc.ul.pt/pub/systems/Linux/isdn diff --git a/Documentation/isdn/syncPPP.FAQ b/Documentation/isdn/syncPPP.FAQ index 32b56834fd80..5743f6a42253 100644 --- a/Documentation/isdn/syncPPP.FAQ +++ b/Documentation/isdn/syncPPP.FAQ @@ -2,16 +2,16 @@ simple isdn4linux PPP FAQ .. to be continued .. not 'debugged' Q: pppd,ipppd, syncPPP , asyncPPP .. what is that ? what should I use? -A: The pppd is for asynchronous PPP .. asynchron means +A: The pppd is for asynchronous PPP .. asynchronous means here, the framing is character based. (e.g when using ttyI* or tty* devices) The ipppd handles PPP packets coming in HDLC frames (bit based protocol) ... The PPP driver -in isdn4linux pushs all IP packets direct +in isdn4linux pushes all IP packets direct to the network layer and all PPP protocol frames to the /dev/ippp* device. -So, the ipppd is a simple externel network +So, the ipppd is a simple external network protocol handler. If you login into a remote machine using the @@ -23,7 +23,7 @@ frames ... you probably connect to a syncPPP machine .. use the network device part of isdn4linux with the 'syncppp' encapsulation and make sure, that the ipppd is running and -conneted to at least one /dev/ippp*. Check the +connected to at least one /dev/ippp*. Check the isdn4linux manual on how to configure a network device. Q: when I start the ipppd .. I only get the @@ -42,7 +42,7 @@ A: Maybe you have compiled the ipppd with another Q: when I list the netdevices with ifconfig I see, that my ISDN interface has a HWaddr and IRQ=0 and Base address = 0 -A: The device is a fake ethernetdevice .. ignore IRQ and baseaddr +A: The device is a fake ethernet device .. ignore IRQ and baseaddr You need the HWaddr only for ethernet encapsulation. diff --git a/Makefile b/Makefile index 32c381528cd0..19718a2e015c 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ VERSION = 1 PATCHLEVEL = 3 -SUBLEVEL = 94 +SUBLEVEL = 95 ARCH = i386 diff --git a/README b/README index f5f0d10c0605..d95913c5990e 100644 --- a/README +++ b/README @@ -139,14 +139,10 @@ CONFIGURING the kernel: COMPILING the kernel: - - make sure you have gcc-2.5.8 or newer available. It seems older gcc + - make sure you have gcc-2.6.3 or newer available. It seems older gcc versions can have problems compiling newer versions of linux. If you upgrade your compiler, remember to get the new binutils package too - (for as/ld/nm and company). Do not use gcc-2.6.0; it has a few serious - bugs. Some problems have been reported occasionally with 2.6.3 as well, - so use that version at your own risk. Specifying "-fno-strength-reduce" - in the CFLAGS of the main Makefile may help to work around a known - bug in gcc. + (for as/ld/nm and company). - do a "make zImage" to create a compressed kernel image. If you want to make a bootdisk (without root filesystem or lilo), insert a floppy diff --git a/arch/alpha/defconfig b/arch/alpha/defconfig index d0381d34e06c..26031b05ab87 100644 --- a/arch/alpha/defconfig +++ b/arch/alpha/defconfig @@ -180,6 +180,7 @@ CONFIG_NFS_FS=y CONFIG_ISO9660_FS=y # CONFIG_HPFS_FS is not set # CONFIG_SYSV_FS is not set +# CONFIG_AFFS_FS is not set # CONFIG_UFS_FS is not set # diff --git a/arch/alpha/kernel/entry.S b/arch/alpha/kernel/entry.S index 24150570835d..1eb9c84169b8 100644 --- a/arch/alpha/kernel/entry.S +++ b/arch/alpha/kernel/entry.S @@ -428,13 +428,13 @@ entUnaUser: .globl sys_fork .ent sys_fork sys_fork: - br $1,do_switch_stack + bsr $1,do_switch_stack bis $31,SIGCHLD,$16 bis $31,$31,$17 bis $30,$30,$18 lda $27,alpha_clone jsr $26,($27),alpha_clone - br $1,undo_switch_stack + bsr $1,undo_switch_stack ret $31,($26),1 .end sys_fork @@ -442,12 +442,12 @@ sys_fork: .globl sys_clone .ent sys_clone sys_clone: - br $1,do_switch_stack + bsr $1,do_switch_stack /* arg1 and arg2 come from the user */ bis $30,$30,$18 lda $27,alpha_clone jsr $26,($27),alpha_clone - br $1,undo_switch_stack + bsr $1,undo_switch_stack ret $31,($26),1 .end sys_clone @@ -455,9 +455,9 @@ sys_clone: .globl alpha_switch_to .ent alpha_switch_to alpha_switch_to: - br $1,do_switch_stack + bsr $1,do_switch_stack call_pal PAL_swpctx - br $1,undo_switch_stack + bsr $1,undo_switch_stack ret $31,($26),1 .end alpha_switch_to @@ -477,6 +477,13 @@ entSys: stq $17,32($30) stq $18,40($30) SAVE_ALL + /* FIXME: optimize */ + lda $1,current_set + ldq $2,0($1) + ldq $3,TASK_FLAGS($2) + and $3,PF_PTRACED,$3 + bne $3,strace + /* end of strace */ lda $1,NR_SYSCALLS($31) lda $2,sys_call_table lda $27,do_entSys @@ -523,6 +530,68 @@ ret_from_reschedule: restore_all: RESTORE_ALL rti + + +/* PTRACE syscall handler */ +.align 3 +strace: + /* set up signal stack, call syscall_trace */ + bsr $1,do_switch_stack + lda $27,syscall_trace + jsr $26,($27),syscall_trace + bsr $1,undo_switch_stack + + /* get the system call number and the argments back.. */ + ldq $0,0($30) + ldq $16,SP_OFF+24($30) + ldq $17,SP_OFF+32($30) + ldq $18,SP_OFF+40($30) + ldq $19,72($30) + ldq $20,80($30) + ldq $21,88($30) + + /* get the system call pointer.. */ + lda $1,NR_SYSCALLS($31) + lda $2,sys_call_table + lda $27,do_entSys + cmpult $0,$1,$1 + s8addq $0,$2,$2 + beq $1,1f + ldq $27,0($2) +1: jsr $26,($27),do_entSys + + /* check return.. */ + blt $0,strace_error /* the call failed */ + stq $31,72($30) /* a3=0 => no error */ +strace_success: + stq $0,0($30) /* save return value */ + + bsr $1,do_switch_stack + lda $27,syscall_trace + jsr $26,($27),syscall_trace + bsr $1,undo_switch_stack + br $31,ret_from_sys_call + + .align 3 +strace_error: + ldq $9,0($30) /* old syscall nr (zero if success) */ + beq $9,strace_success + ldq $10,72($30) /* .. and this a3 */ + + subq $31,$0,$0 /* with error in v0 */ + addq $31,1,$1 /* set a3 for errno return */ + stq $0,0($30) + stq $1,72($30) /* a3 for return */ + + bsr $1,do_switch_stack + lda $27,syscall_trace + jsr $26,($27),syscall_trace + bsr $1,undo_switch_stack + + bis $31,$31,$26 /* tell "ret_from_sys_call" that we can restart */ + bis $9,$9,$19 /* .. old syscall nr */ + bis $10,$10,$20 /* .. old a3 */ + br $31,ret_from_sys_call .align 3 handle_bottom_half: diff --git a/arch/alpha/kernel/ksyms.c b/arch/alpha/kernel/ksyms.c index 41d2bf2b375e..a1f962e50a85 100644 --- a/arch/alpha/kernel/ksyms.c +++ b/arch/alpha/kernel/ksyms.c @@ -27,6 +27,7 @@ extern void __remqu (void); static struct symbol_table arch_symbol_table = { #include /* platform dependent support */ + X(_inb), X(_inw), X(_inl), @@ -47,6 +48,10 @@ static struct symbol_table arch_symbol_table = { X(__remlu), X(__divqu), X(__remqu), + X(insl), + X(insw), + X(outsl), + X(outsw), X(strcat), X(strcmp), X(strcpy), diff --git a/arch/alpha/lib/Makefile b/arch/alpha/lib/Makefile index 62aac5316af3..1babf3f29172 100644 --- a/arch/alpha/lib/Makefile +++ b/arch/alpha/lib/Makefile @@ -8,6 +8,9 @@ OBJS = __divqu.o __remqu.o __divlu.o __remlu.o memset.o memcpy.o io.o \ lib.a: $(OBJS) $(AR) rcs lib.a $(OBJS) +memset.o: memset.S + $(CC) -c -o memset.o memset.S + __divqu.o: divide.S $(CC) -DDIV -c -o __divqu.o divide.S diff --git a/arch/alpha/lib/memset.S b/arch/alpha/lib/memset.S new file mode 100644 index 000000000000..5472741684ef --- /dev/null +++ b/arch/alpha/lib/memset.S @@ -0,0 +1,106 @@ +/* + * linux/arch/alpha/memset.S + * + * This is an efficient (and small) implementation of the C library "memset()" + * function for the alpha. + * + * (C) Copyright 1996 Linus Torvalds + * + * This routine is "moral-ware": you are free to use it any way you wish, and + * the only obligation I put on you is a moral one: if you make any improvements + * to the routine, please send me your improvements for me to use similarly. + * + * The scheduling comments are according to the EV5 documentation (and done by + * hand, so they might well be incorrect, please do tell me about it..) + */ + + .set noat + .set noreorder +.text + .globl __memset + .globl __constant_c_memset + .ent __memset +.align 5 +__memset: + .frame $30,0,$26,0 + .prologue 0 + + zapnot $17,1,$17 /* E0 */ + sll $17,8,$1 /* E1 (p-c latency, next cycle) */ + bis $17,$1,$17 /* E0 (p-c latency, next cycle) */ + sll $17,16,$1 /* E1 (p-c latency, next cycle) */ + + bis $17,$1,$17 /* E0 (p-c latency, next cycle) */ + sll $17,32,$1 /* E1 (p-c latency, next cycle) */ + bis $17,$1,$17 /* E0 (p-c latency, next cycle) */ + ldq_u $31,0($30) /* .. E1 */ + +.align 5 +__constant_c_memset: + addq $18,$16,$6 /* E0 */ + bis $16,$16,$0 /* .. E1 */ + xor $16,$6,$1 /* E0 */ + ble $18,end /* .. E1 */ + + bic $1,7,$1 /* E0 */ + beq $1,within_one_quad /* .. E1 (note EV5 zero-latency forwarding) */ + and $16,7,$3 /* E0 */ + beq $3,aligned /* .. E1 (note EV5 zero-latency forwarding) */ + + ldq_u $4,0($16) /* E0 */ + bis $16,$16,$5 /* .. E1 */ + insql $17,$16,$2 /* E0 */ + subq $3,8,$3 /* .. E1 */ + + addq $18,$3,$18 /* E0 $18 is new count ($3 is negative) */ + mskql $4,$16,$4 /* .. E1 (and possible load stall) */ + subq $16,$3,$16 /* E0 $16 is new aligned destination */ + bis $2,$4,$1 /* .. E1 */ + + bis $31,$31,$31 /* E0 */ + ldq_u $31,0($30) /* .. E1 */ + stq_u $1,0($5) /* E0 */ + bis $31,$31,$31 /* .. E1 */ + +.align 4 +aligned: + sra $18,3,$3 /* E0 */ + and $18,7,$18 /* .. E1 */ + bis $16,$16,$5 /* E0 */ + beq $3,no_quad /* .. E1 */ + +.align 3 +loop: + stq $17,0($5) /* E0 */ + subq $3,1,$3 /* .. E1 */ + addq $5,8,$5 /* E0 */ + bne $3,loop /* .. E1 */ + +no_quad: + bis $31,$31,$31 /* E0 */ + beq $18,end /* .. E1 */ + ldq $7,0($5) /* E0 */ + mskqh $7,$6,$2 /* .. E1 (and load stall) */ + + insqh $17,$6,$4 /* E0 */ + bis $2,$4,$1 /* .. E1 */ + stq $1,0($5) /* E0 */ + ret $31,($26),1 /* .. E1 */ + +.align 3 +within_one_quad: + ldq_u $1,0($16) /* E0 */ + insql $17,$16,$2 /* E1 */ + mskql $1,$16,$4 /* E0 (after load stall) */ + bis $2,$4,$2 /* E0 */ + + mskql $2,$6,$4 /* E0 */ + mskqh $1,$6,$2 /* .. E1 */ + bis $2,$4,$1 /* E0 */ + stq_u $1,0($16) /* E0 */ + +end: + ret $31,($26),1 /* E1 */ + .end __memset + +.weakext memset, __memset diff --git a/arch/alpha/lib/memset.c b/arch/alpha/lib/memset.c deleted file mode 100644 index 4d86833b90a8..000000000000 --- a/arch/alpha/lib/memset.c +++ /dev/null @@ -1,46 +0,0 @@ -/* - * linux/arch/alpha/lib/memset.c - * - * Copyright (C) 1995 Linus Torvalds - */ - -/* - * These are only slightly optimized so far.. - */ - -#include - -inline void * __constant_c_memset(void * s, unsigned long c, long count) -{ - unsigned long xs = (unsigned long) s; - - /* - * the first and last parts could be done with just one - * unaligned load/store, but I don't want to think about it - */ - while (count > 0 && (xs & 7)) { - *(char *) xs = c; - count--; xs++; - } - while (count > 7) { - *(unsigned long *) xs = c; - count -=8; xs += 8; - } - while (count > 0) { - *(char *) xs = c; - count--; xs++; - } - return s; -} - -void * __memset(void * s,char c,size_t count) -{ - __constant_c_memset(s,0x0101010101010101UL * (unsigned char) c, count); - return s; -} - -/* - * gcc-2.7.1 and newer generate calls to memset and memcpy. So we - * need to define that here: - */ -asm (".weakext memset, __memset"); diff --git a/arch/i386/defconfig b/arch/i386/defconfig index b0630b0cbecb..bc4b04906fd7 100644 --- a/arch/i386/defconfig +++ b/arch/i386/defconfig @@ -138,6 +138,7 @@ CONFIG_NFS_FS=y CONFIG_ISO9660_FS=y # CONFIG_HPFS_FS is not set # CONFIG_SYSV_FS is not set +# CONFIG_AFFS_FS is not set # CONFIG_UFS_FS is not set # diff --git a/arch/m68k/fpsp040/README b/arch/m68k/fpsp040/README new file mode 100644 index 000000000000..5446a71e8242 --- /dev/null +++ b/arch/m68k/fpsp040/README @@ -0,0 +1,30 @@ + +MOTOROLA MICROPROCESSOR & MEMORY TECHNOLOGY GROUP +M68000 Hi-Performance Microprocessor Division +M68040 Software Package + +M68040 Software Package Copyright (c) 1993, 1994 Motorola Inc. +All rights reserved. + +THE SOFTWARE is provided on an "AS IS" basis and without warranty. +To the maximum extent permitted by applicable law, +MOTOROLA DISCLAIMS ALL WARRANTIES WHETHER EXPRESS OR IMPLIED, +INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A +PARTICULAR PURPOSE and any warranty against infringement with +regard to the SOFTWARE (INCLUDING ANY MODIFIED VERSIONS THEREOF) +and any accompanying written materials. + +To the maximum extent permitted by applicable law, +IN NO EVENT SHALL MOTOROLA BE LIABLE FOR ANY DAMAGES WHATSOEVER +(INCLUDING WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS +PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR +OTHER PECUNIARY LOSS) ARISING OF THE USE OR INABILITY TO USE THE +SOFTWARE. Motorola assumes no responsibility for the maintenance +and support of the SOFTWARE. + +You are hereby granted a copyright license to use, modify, and +distribute the SOFTWARE so long as this entire notice is retained +without alteration in any modified and/or redistributed versions, +and that such modified versions are clearly identified as such. +No licenses are granted by implication, estoppel or otherwise +under any patents or trademarks of Motorola, Inc. diff --git a/arch/sparc/boot/README b/arch/sparc/boot/README index 77f34dacc180..48c93ddbe10d 100644 --- a/arch/sparc/boot/README +++ b/arch/sparc/boot/README @@ -17,5 +17,5 @@ our data area either way because we can be dual purpose. More will come.... Hopefully I can write this such that it will work on almost all SUN -machines in existance. We'll see ;( +machines in existence. We'll see ;( diff --git a/arch/sparc/kernel/auxio.c b/arch/sparc/kernel/auxio.c index ba37f425d507..db2509f6d810 100644 --- a/arch/sparc/kernel/auxio.c +++ b/arch/sparc/kernel/auxio.c @@ -31,7 +31,7 @@ auxio_probe(void) /* Map the register both read and write */ auxio_register = (unsigned char *) sparc_alloc_io(auxregs[0].phys_addr, 0, auxregs[0].reg_size, - "auxilliaryIO", + "auxiliaryIO", auxregs[0].which_io, 0x0); /* Fix the address on sun4m and sun4c. */ if((((unsigned long) auxregs[0].phys_addr) & 3) == 3 || diff --git a/arch/sparc/kernel/entry.S b/arch/sparc/kernel/entry.S index 97cc1f7e06cd..2028470c9c6c 100644 --- a/arch/sparc/kernel/entry.S +++ b/arch/sparc/kernel/entry.S @@ -413,7 +413,7 @@ rie_checkbh: LEAVE_IRQ RESTORE_ALL - /* This routine handles illegal isntructions and privileged + /* This routine handles illegal instructions and privileged * instruction attempts from user code. */ .align 4 @@ -728,7 +728,7 @@ linux_trap_nmi_sun4c: ENTER_SYSCALL /* Ugh, we need to clear the IRQ line. This is now - * a very sun4c specific trap hanler... + * a very sun4c specific trap handler... */ sethi %hi(C_LABEL(interrupt_enable)), %l5 ld [%l5 + %lo(C_LABEL(interrupt_enable))], %l5 @@ -847,7 +847,7 @@ linux_trap_ipi15_sun4m: be 1f nop - /* Asyncronous fault, why you little ?!#&%@... */ + /* Asynchronous fault, why you little ?!#&%@... */ sethi %hi(0x80000000), %o2 st %o2, [%l5 + 0xc] WRITE_PAUSE diff --git a/arch/sparc/kernel/etrap.S b/arch/sparc/kernel/etrap.S index cc4faddb2773..71928330fca5 100644 --- a/arch/sparc/kernel/etrap.S +++ b/arch/sparc/kernel/etrap.S @@ -65,7 +65,7 @@ tsetup_7win_patch6: and %g2, 0x7f, %g2 * T == Window entered when trap occurred * S == Window we will need to save if (1< (IOBASE_VADDR + IOBASE_LEN)) { - prom_printf("alloc_io: Mapping ouside IOBASE area\n"); + prom_printf("alloc_io: Mapping outside IOBASE area\n"); prom_halt(); } if(check_region ((vaddr | offset), len)) { @@ -84,11 +84,11 @@ void *sparc_alloc_io (void *address, void *virtual, int len, char *name, return (void *) (base_address | offset); } -/* Does DVMA allocations with PAGE_SIZE granulatity. How this basically +/* Does DVMA allocations with PAGE_SIZE granularity. How this basically * works is that the ESP chip can do DVMA transfers at ANY address with - * certain size and boundry restrictions. But other devices that are + * certain size and boundary restrictions. But other devices that are * attached to it and would like to do DVMA have to set things up in - * a special way, if the DVMA see's a device attached to it transfer data + * a special way, if the DVMA sees a device attached to it transfer data * at addresses above DVMA_VADDR it will grab them, this way it does not * now have to know the peculiarities of where to read the Lance data * from. (for example) diff --git a/arch/sparc/kernel/irq.c b/arch/sparc/kernel/irq.c index 3b858f0490cd..a00f93831562 100644 --- a/arch/sparc/kernel/irq.c +++ b/arch/sparc/kernel/irq.c @@ -150,7 +150,7 @@ void free_irq(unsigned int irq, void *dev_id) } if (action->flags & SA_STATIC_ALLOC) { - /* This interrupt is marked as specially allocted + /* This interrupt is marked as specially allocated * so it is a bad idea to free it. */ printk("Attempt to free statically allocated IRQ%d (%s)\n", diff --git a/arch/sparc/kernel/process.c b/arch/sparc/kernel/process.c index e3433c0fe337..26b2dd02204b 100644 --- a/arch/sparc/kernel/process.c +++ b/arch/sparc/kernel/process.c @@ -215,7 +215,7 @@ void flush_thread(void) * Parent --> %o0 == childs pid, %o1 == 0 * Child --> %o0 == parents pid, %o1 == 1 * - * NOTE: We have a seperate fork kpsr/kwim because + * NOTE: We have a separate fork kpsr/kwim because * the parent could change these values between * sys_fork invocation and when we reach here * if the parent should sleep while trying to diff --git a/arch/sparc/kernel/sclow.S b/arch/sparc/kernel/sclow.S index 91e3e11e0b8b..3cacaccd8fa9 100644 --- a/arch/sparc/kernel/sclow.S +++ b/arch/sparc/kernel/sclow.S @@ -1,5 +1,5 @@ /* sclow.S: Low level special syscall handling. - * Basically these are cases where we can completly + * Basically these are cases where we can completely * handle the system call without saving any state * because we know that the process will not sleep. * diff --git a/arch/sparc/kernel/setup.c b/arch/sparc/kernel/setup.c index 7027600a1242..bf6fbc844f61 100644 --- a/arch/sparc/kernel/setup.c +++ b/arch/sparc/kernel/setup.c @@ -55,7 +55,7 @@ unsigned long bios32_init(unsigned long memory_start, unsigned long memory_end) return memory_start; } -/* Typing sync at the prom promptcalls the function pointed to by +/* Typing sync at the prom prompt calls the function pointed to by * romvec->pv_synchook which I set to the following function. * This should sync all filesystems and return, for now it just * prints out pretty messages and returns. diff --git a/arch/sparc/kernel/smp.c b/arch/sparc/kernel/smp.c index 4ce0add854b2..60c538bb1ea8 100644 --- a/arch/sparc/kernel/smp.c +++ b/arch/sparc/kernel/smp.c @@ -50,8 +50,8 @@ static volatile int smp_msg_id; volatile int cpu_number_map[NR_CPUS]; volatile int cpu_logical_map[NR_CPUS]; -/* The only guarenteed locking primitive available on all Sparc - * processors is 'ldstub [%reg + immediate], %dest_reg' which atomicly +/* The only guaranteed locking primitive available on all Sparc + * processors is 'ldstub [%reg + immediate], %dest_reg' which atomically * places the current byte at the effective address into dest_reg and * places 0xff there afterwards. Pretty lame locking primitive * compared to the Alpha and the intel no? Most Sparcs have 'swap' diff --git a/arch/sparc/kernel/sparc-stub.c b/arch/sparc/kernel/sparc-stub.c index 436a65f85d38..9e18e53e60c6 100644 --- a/arch/sparc/kernel/sparc-stub.c +++ b/arch/sparc/kernel/sparc-stub.c @@ -4,7 +4,7 @@ * Modifications to run under Linux * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) * - * This file origionally came from the gdb sources, and the + * This file originally came from the gdb sources, and the * copyright notices have been retained below. */ @@ -439,7 +439,7 @@ hexToInt(char **ptr, int *intValue) } /* - * This function does all command procesing for interfacing to gdb. It + * This function does all command processing for interfacing to gdb. It * returns 1 if you should skip the instruction at the trap address, 0 * otherwise. */ diff --git a/arch/sparc/kernel/sun4c_irq.c b/arch/sparc/kernel/sun4c_irq.c index e20871b62784..96a57780d914 100644 --- a/arch/sparc/kernel/sun4c_irq.c +++ b/arch/sparc/kernel/sun4c_irq.c @@ -1,7 +1,7 @@ /* sun4c_irq.c * arch/sparc/kernel/sun4c_irq.c: * - * djhr: Hacked out of irq.c into a CPU dependant version. + * djhr: Hacked out of irq.c into a CPU dependent version. * * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) * Copyright (C) 1995 Miguel de Icaza (miguel@nuclecu.unam.mx) diff --git a/arch/sparc/kernel/sun4m_irq.c b/arch/sparc/kernel/sun4m_irq.c index bca4a2880020..1832d72b3fa7 100644 --- a/arch/sparc/kernel/sun4m_irq.c +++ b/arch/sparc/kernel/sun4m_irq.c @@ -1,7 +1,7 @@ /* sun4m_irq.c * arch/sparc/kernel/sun4m_irq.c: * - * djhr: Hacked out of irq.c into a CPU dependant version. + * djhr: Hacked out of irq.c into a CPU dependent version. * * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) * Copyright (C) 1995 Miguel de Icaza (miguel@nuclecu.unam.mx) @@ -307,7 +307,7 @@ void sun4m_init_IRQ(void) if (linux_num_cpus > 1) { /* system wide interrupts go to cpu 0, this should always - * be safe because it is guarenteed to be fitted or OBP doesn't + * be safe because it is guaranteed to be fitted or OBP doesn't * come up * * Not sure, but writing here on SLAVIO systems may puke diff --git a/arch/sparc/kernel/sunos_ioctl.c b/arch/sparc/kernel/sunos_ioctl.c index a77dbb128ea7..5e523bf8f2b5 100644 --- a/arch/sparc/kernel/sunos_ioctl.c +++ b/arch/sparc/kernel/sunos_ioctl.c @@ -53,7 +53,7 @@ asmlinkage int sunos_ioctl (int fd, unsigned long cmd, unsigned long arg) } } - /* Binary compatability is good American knowhow fuckin' up. */ + /* Binary compatibility is good American knowhow fuckin' up. */ if(cmd == TIOCNOTTY) return sys_setsid(); diff --git a/arch/sparc/kernel/sys_sparc.c b/arch/sparc/kernel/sys_sparc.c index dd1d7b84c5ad..da7d187d03dd 100644 --- a/arch/sparc/kernel/sys_sparc.c +++ b/arch/sparc/kernel/sys_sparc.c @@ -27,7 +27,7 @@ asmlinkage unsigned long sys_getpagesize(void) /* * sys_pipe() is the normal C calling standard for creating - * a pipe. It's not the way unix tranditionally does this, though. + * a pipe. It's not the way unix traditionally does this, though. */ asmlinkage int sparc_pipe(struct pt_regs *regs) { diff --git a/arch/sparc/kernel/sys_sunos.c b/arch/sparc/kernel/sys_sunos.c index 1ea96bd71730..8f3e2c05f8fc 100644 --- a/arch/sparc/kernel/sys_sunos.c +++ b/arch/sparc/kernel/sys_sunos.c @@ -1,5 +1,5 @@ /* $Id: sys_sunos.c,v 1.37 1996/04/19 16:52:38 miguel Exp $ - * sys_sunos.c: SunOS specific syscall compatability support. + * sys_sunos.c: SunOS specific syscall compatibility support. * * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) * Copyright (C) 1995 Miguel de Icaza (miguel@nuclecu.unam.mx) @@ -193,7 +193,7 @@ asmlinkage unsigned long sunos_sbrk(int increment) } /* XXX Completely undocumented, and completely magic... - * XXX I belive it is to increase the size of the stack by + * XXX I believe it is to increase the size of the stack by * XXX argument 'increment' and return the new end of stack * XXX area. Wheee... */ @@ -262,7 +262,7 @@ asmlinkage void sunos_madvise(unsigned long address, unsigned long len, * low-bit is one == Page is currently residing in core * All other bits are undefined within the character so there... * Also, if you try to get stats on an area outside of the user vm area - * *or* the passed base address is not aligned on a page boundry you + * *or* the passed base address is not aligned on a page boundary you * get an error. */ asmlinkage int sunos_mincore(unsigned long addr, unsigned long len, char *array) @@ -301,7 +301,7 @@ asmlinkage int sunos_mincore(unsigned long addr, unsigned long len, char *array) } /* This just wants the soft limit (ie. rlim_cur element) of the RLIMIT_NOFILE - * resource limit and is for backwards compatability with older sunos + * resource limit and is for backwards compatibility with older sunos * revs. */ asmlinkage long sunos_getdtablesize(void) @@ -413,7 +413,7 @@ asmlinkage int sunos_getdents(unsigned int fd, void * dirent, int cnt) return cnt - buf.count; } -/* Old sunos getdirentries, severely broken compatability stuff here. */ +/* Old sunos getdirentries, severely broken compatibility stuff here. */ struct sunos_direntry { unsigned long d_ino; unsigned short d_reclen; @@ -701,7 +701,7 @@ asmlinkage int sunos_nfs_mount(char *dir_name, int linux_flags, void *data) return error; /* Ok, here comes the fun part: Linux's nfs mount needs a * socket connection to the server, but SunOS mount does not - * requiere this, so we use the information on the destination + * require this, so we use the information on the destination * address to create a socket and bind it to a reserved * port on this system */ diff --git a/arch/sparc/kernel/systbls.S b/arch/sparc/kernel/systbls.S index 0640aa821f79..7816f53f232d 100644 --- a/arch/sparc/kernel/systbls.S +++ b/arch/sparc/kernel/systbls.S @@ -1,5 +1,5 @@ /* $Id: systbls.S,v 1.38 1996/04/20 08:43:26 davem Exp $ - * systbls.S: System call entry point tables for OS compatability. + * systbls.S: System call entry point tables for OS compatibility. * The native Linux system call table lives here also. * * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) diff --git a/arch/sparc/kernel/wuf.S b/arch/sparc/kernel/wuf.S index 08672ef0e9df..cb92857d378f 100644 --- a/arch/sparc/kernel/wuf.S +++ b/arch/sparc/kernel/wuf.S @@ -234,7 +234,7 @@ fwin_user_finish_up: * check routines in wof.S, these routines are free to use * any of the local registers they want to as this window * does not belong to anyone at this point, however the - * outs and ins are still verbotten as they are part of + * outs and ins are still verboten as they are part of * 'someone elses' window possibly. */ @@ -345,7 +345,7 @@ C_LABEL(srmmu_fwin_stackchk): be fwin_user_finish_up nop - /* Did I ever tell you about my window labotomy? + /* Did I ever tell you about my window lobotomy? * anyways... fwin_user_stack_is_bolixed expects * to be in window 'W' so make it happy or else * we watchdog badly. diff --git a/arch/sparc/lib/strlen.S b/arch/sparc/lib/strlen.S index 3037d802fbd4..c30d14b00a94 100644 --- a/arch/sparc/lib/strlen.S +++ b/arch/sparc/lib/strlen.S @@ -42,7 +42,7 @@ scan_words: sethi %hi(LO_MAGIC),%g3 or %g3,%lo(LO_MAGIC),%o2 next_word: - ld [%o0],%g2 ! no dependancies + ld [%o0],%g2 ! no dependencies next_word_preloaded: sub %g2,%o2,%g2 ! lots of locks here andcc %g2,%o3,%g0 ! and I dont like it... diff --git a/arch/sparc/mm/fault.c b/arch/sparc/mm/fault.c index c4a6fc805f75..16b085d34815 100644 --- a/arch/sparc/mm/fault.c +++ b/arch/sparc/mm/fault.c @@ -86,7 +86,7 @@ int prom_probe_memory (void) sp_banks[i].base_addr = 0xdeadbeef; sp_banks[i].num_bytes = 0; - /* Now mask all bank sizes on a page boundry, it is all we can + /* Now mask all bank sizes on a page boundary, it is all we can * use anyways. */ for(i=0; sp_banks[i].num_bytes != 0; i++) diff --git a/arch/sparc/mm/generic.c b/arch/sparc/mm/generic.c index 8387eda05381..7a9093246d4a 100644 --- a/arch/sparc/mm/generic.c +++ b/arch/sparc/mm/generic.c @@ -1,4 +1,4 @@ -/* generic.c: Generic Sparc mm routines that are not dependant upon +/* generic.c: Generic Sparc mm routines that are not dependent upon * MMU type but are Sparc specific. * * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) diff --git a/arch/sparc/mm/init.c b/arch/sparc/mm/init.c index 423770579ccc..9e0203457cbc 100644 --- a/arch/sparc/mm/init.c +++ b/arch/sparc/mm/init.c @@ -131,7 +131,7 @@ unsigned long paging_init(unsigned long start_mem, unsigned long end_mem) }; /* Initialize the protection map with non-constant values - * MMU dependant values. + * MMU dependent values. */ protection_map[0] = PAGE_NONE; protection_map[1] = PAGE_READONLY; diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c index 44267a773139..c7b7f4c446b3 100644 --- a/arch/sparc/mm/srmmu.c +++ b/arch/sparc/mm/srmmu.c @@ -483,7 +483,7 @@ void srmmu_mapioaddr(unsigned long physaddr, unsigned long virt_addr, int bus_ty ptep = srmmu_pte_offset(pmdp, virt_addr); tmp = (physaddr >> 4) | SRMMU_ET_PTE; - /* I need to test whether this is consistant over all + /* I need to test whether this is consistent over all * sun4m's. The bus_type represents the upper 4 bits of * 36-bit physical address on the I/O space lines... */ @@ -614,7 +614,7 @@ static void tsunami_flush_page_for_dma(unsigned long page) /* TLB flushes seem to upset the tsunami sometimes, I can't figure out * what the hell is going on. All I see is a tlb flush (page or whole, - * there is no consistant pattern) and then total local variable corruption + * there is no consistent pattern) and then total local variable corruption * in the procedure who called us after return. Usually triggerable * by "cool" programs like crashme and bonnie. I played around a bit * and adding a bunch of forced nops seems to make the problems all @@ -1695,7 +1695,7 @@ static void srmmu_map_kernel(unsigned long start, unsigned long end) start += PAGE_SIZE; tmp = (srmmu_hwprobe(start) & SRMMU_PTE_PMASK) << 4; - /* Never a cross bank boundry, thank you. */ + /* Never a cross bank boundary, thank you. */ if(tmp != last_page + PAGE_SIZE) break; last_page = tmp; @@ -2114,7 +2114,7 @@ void poke_swift(void) mreg |= (SWIFT_IE | SWIFT_DE); /* I & D caches on */ /* The Swift branch folding logic is completely broken. At - * trap time, if things are just right, if can mistakedly + * trap time, if things are just right, if can mistakenly * think that a trap is coming from kernel mode when in fact * it is coming from user mode (it mis-executes the branch in * the trap code). So you see things like crashme completely diff --git a/arch/sparc/mm/sun4c.c b/arch/sparc/mm/sun4c.c index 81c6fcbc3ad4..591c46829b74 100644 --- a/arch/sparc/mm/sun4c.c +++ b/arch/sparc/mm/sun4c.c @@ -495,7 +495,7 @@ static inline void sun4c_demap_one(struct sun4c_mmu_ring *crp, unsigned char ctx } /* Using this method to free up mmu entries eliminates a lot of - * potention races since we have a kernel that incurs tlb + * potential races since we have a kernel that incurs tlb * replacement faults. There may be performance penalties. */ static inline struct sun4c_mmu_entry *sun4c_user_strategy(void) @@ -580,8 +580,8 @@ static void sun4c_update_mmu_cache(struct vm_area_struct *vma, unsigned long add /* READ THIS: If you put any diagnostic printing code in any of the kernel * fault handling code you will lose badly. This is the most * delicate piece of code in the entire kernel, atomicity of - * kernel tlb replacement must be guarenteed. This is why we - * have seperate user and kernel allocation rings to alleviate + * kernel tlb replacement must be guaranteed. This is why we + * have separate user and kernel allocation rings to alleviate * as many bad interactions as possible. * * XXX Someday make this into a fast in-window trap handler to avoid @@ -1035,7 +1035,7 @@ static void sun4c_flush_cache_page(struct vm_area_struct *vma, unsigned long pag int octx; struct mm_struct *mm = vma->vm_mm; - /* Sun4c has no seperate I/D caches so cannot optimize for non + /* Sun4c has no separate I/D caches so cannot optimize for non * text page flushes. */ #ifndef __SMP__ diff --git a/arch/sparc/prom/memory.c b/arch/sparc/prom/memory.c index 3e0cd4e4565d..82dfa6d70bdd 100644 --- a/arch/sparc/prom/memory.c +++ b/arch/sparc/prom/memory.c @@ -10,12 +10,12 @@ #include #include -/* This routine, for consistancy, returns the ram parameters in the - * V0 prom memory descriptor format. I choose this format becuase I +/* This routine, for consistency, returns the ram parameters in the + * V0 prom memory descriptor format. I choose this format because I * think it was the easiest to work with. I feel the religious * arguments now... ;) Also, I return the linked lists sorted to - * prevent paging_init() upset stomache as I have not yet written - * the pepto-bismal kernel module yet. + * prevent paging_init() upset stomach as I have not yet written + * the pepto-bismol kernel module yet. */ struct linux_prom_registers prom_reg_memlist[64]; diff --git a/arch/sparc/prom/palloc.c b/arch/sparc/prom/palloc.c index c90b2c59dad9..388f71a3c59f 100644 --- a/arch/sparc/prom/palloc.c +++ b/arch/sparc/prom/palloc.c @@ -18,7 +18,7 @@ /* Allocate a chunk of memory of size 'num_bytes' giving a suggestion * of virtual_hint as the preferred virtual base address of this chunk. - * There are no guarentees that you will get the allocation, or that + * There are no guarantees that you will get the allocation, or that * the prom will abide by your "hint". So check your return value. */ char * diff --git a/drivers/block/ide-tape.c b/drivers/block/ide-tape.c index 980437170ff2..5f4e64e572b3 100644 --- a/drivers/block/ide-tape.c +++ b/drivers/block/ide-tape.c @@ -1,5 +1,5 @@ /* - * linux/drivers/block/ide-tape.c Version 1.3 - ALPHA Feb 9, 1996 + * linux/drivers/block/ide-tape.c Version 1.5 - ALPHA Apr 12, 1996 * * Copyright (C) 1995, 1996 Gadi Oxman * @@ -181,6 +181,9 @@ * block device interface. For more info, read the * comments in triton.c. * Ver 1.4 Mar 13 96 Fixed serialize support. + * Ver 1.5 Apr 12 96 Fixed shared interface operation, broken in 1.3.85. + * Fixed pipelined read mode inefficiency. + * Fixed nasty null dereferencing bug. * * We are currently in an *alpha* stage. The driver is not complete and not * much tested. I would strongly suggest to: @@ -1244,7 +1247,8 @@ void idetape_setup (ide_drive_t *drive) tape->request_status=0; tape->chrdev_direction=idetape_direction_none; tape->reset_issued=0; - + tape->pc=&(tape->pc_stack [0]); + #if IDETAPE_PIPELINE tape->max_number_of_stages=IDETAPE_MIN_PIPELINE_STAGES; printk ("ide-tape: Operating in pipelined (fast and tricky) operation mode.\n"); @@ -3154,7 +3158,6 @@ void idetape_wait_for_request (struct request *rq) } #endif /* IDETAPE_DEBUG_BUGS */ - run_task_queue(&tq_disk); rq->sem=&sem; down (&sem); } @@ -3213,7 +3216,7 @@ int idetape_add_chrdev_read_request (ide_drive_t *drive,int blocks,char *buffer) rq.sector = tape->block_address; rq.nr_sectors = rq.current_nr_sectors = blocks; - if (tape->current_number_of_stages < 0.5*tape->max_number_of_stages) { + if (tape->active_data_request != NULL || tape->current_number_of_stages <= 0.25*tape->max_number_of_stages) { new_stage=idetape_kmalloc_stage (drive); while (new_stage != NULL) { new_stage->rq=rq; diff --git a/drivers/block/ide.c b/drivers/block/ide.c index 60eae1befad0..c4a3ea6fee73 100644 --- a/drivers/block/ide.c +++ b/drivers/block/ide.c @@ -225,6 +225,8 @@ * fix cli() problem in try_to_identify() * Version 5.36 fixes to optional PCMCIA support * Version 5.37 don't use DMA when "noautotune" is specified + * Version 5.37a (go) fix shared irq probing (was broken in kernel 1.3.72) + * call unplug_device() from ide_do_drive_cmd() * * Some additional driver compile-time options are in ide.h * @@ -1737,6 +1739,7 @@ int ide_do_drive_cmd (ide_drive_t *drive, struct request *rq, ide_action_t actio rq->rq_dev = MKDEV(major,(drive->select.b.unit)<sem = &sem; + unplug_device(bdev); save_flags(flags); cli(); @@ -1762,10 +1765,8 @@ int ide_do_drive_cmd (ide_drive_t *drive, struct request *rq, ide_action_t actio rq->next = cur_rq->next; cur_rq->next = rq; } - if (action == ide_wait && rq->rq_status != RQ_INACTIVE) { - run_task_queue(&tq_disk); + if (action == ide_wait && rq->rq_status != RQ_INACTIVE) down(&sem); /* wait for it to be serviced */ - } restore_flags(flags); return rq->errors ? -EIO : 0; /* return -EIO if errors */ } @@ -2503,6 +2504,56 @@ static inline byte probe_for_drive (ide_drive_t *drive) return 1; /* drive was found */ } +/* + * We query CMOS about hard disks : it could be that we have a SCSI/ESDI/etc + * controller that is BIOS compatible with ST-506, and thus showing up in our + * BIOS table, but not register compatible, and therefore not present in CMOS. + * + * Furthermore, we will assume that our ST-506 drives are the primary + * drives in the system -- the ones reflected as drive 1 or 2. The first + * drive is stored in the high nibble of CMOS byte 0x12, the second in the low + * nibble. This will be either a 4 bit drive type or 0xf indicating use byte + * 0x19 for an 8 bit type, drive 1, 0x1a for drive 2 in CMOS. A non-zero value + * means we have an AT controller hard disk for that drive. + * + * Of course, there is no guarantee that either drive is actually on the + * "primary" IDE interface, but we don't bother trying to sort that out here. + * If a drive is not actually on the primary interface, then these parameters + * will be ignored. This results in the user having to supply the logical + * drive geometry as a boot parameter for each drive not on the primary i/f. + * + * The only "perfect" way to handle this would be to modify the setup.[cS] code + * to do BIOS calls Int13h/Fn08h and Int13h/Fn48h to get all of the drive info + * for us during initialization. I have the necessary docs -- any takers? -ml + */ +static void probe_cmos_for_drives (ide_hwif_t *hwif) +{ +#ifdef __i386__ + extern struct drive_info_struct drive_info; + byte cmos_disks, *BIOS = (byte *) &drive_info; + int unit; + +#ifdef CONFIG_BLK_DEV_PROMISE + if (hwif->is_promise2) + return; +#endif /* CONFIG_BLK_DEV_PROMISE */ + outb_p(0x12,0x70); /* specify CMOS address 0x12 */ + cmos_disks = inb_p(0x71); /* read the data from 0x12 */ + /* Extract drive geometry from CMOS+BIOS if not already setup */ + for (unit = 0; unit < MAX_DRIVES; ++unit) { + ide_drive_t *drive = &hwif->drives[unit]; + if ((cmos_disks & (0xf0 >> (unit*4))) && !drive->present) { + drive->cyl = drive->bios_cyl = *(unsigned short *)BIOS; + drive->head = drive->bios_head = *(BIOS+2); + drive->sect = drive->bios_sect = *(BIOS+14); + drive->ctl = *(BIOS+8); + drive->present = 1; + } + BIOS += 16; + } +#endif +} + /* * This routine only knows how to look for drive units 0 and 1 * on an interface, so any setting of MAX_DRIVES > 2 won't work here. @@ -2511,6 +2562,10 @@ static void probe_hwif (ide_hwif_t *hwif) { unsigned int unit; + if (hwif->noprobe) + return; + if (hwif->io_base == HD_DATA) + probe_cmos_for_drives (hwif); #if CONFIG_BLK_DEV_PROMISE if (!hwif->is_promise2 && (check_region(hwif->io_base,8) || check_region(hwif->ctl_port,1))) { @@ -2924,56 +2979,6 @@ int ide_xlate_1024 (kdev_t i_rdev, int xparm, const char *msg) return 1; } -/* - * We query CMOS about hard disks : it could be that we have a SCSI/ESDI/etc - * controller that is BIOS compatible with ST-506, and thus showing up in our - * BIOS table, but not register compatible, and therefore not present in CMOS. - * - * Furthermore, we will assume that our ST-506 drives are the primary - * drives in the system -- the ones reflected as drive 1 or 2. The first - * drive is stored in the high nibble of CMOS byte 0x12, the second in the low - * nibble. This will be either a 4 bit drive type or 0xf indicating use byte - * 0x19 for an 8 bit type, drive 1, 0x1a for drive 2 in CMOS. A non-zero value - * means we have an AT controller hard disk for that drive. - * - * Of course, there is no guarantee that either drive is actually on the - * "primary" IDE interface, but we don't bother trying to sort that out here. - * If a drive is not actually on the primary interface, then these parameters - * will be ignored. This results in the user having to supply the logical - * drive geometry as a boot parameter for each drive not on the primary i/f. - * - * The only "perfect" way to handle this would be to modify the setup.[cS] code - * to do BIOS calls Int13h/Fn08h and Int13h/Fn48h to get all of the drive info - * for us during initialization. I have the necessary docs -- any takers? -ml - */ - -static void probe_cmos_for_drives (ide_hwif_t *hwif) -{ -#ifdef __i386__ - extern struct drive_info_struct drive_info; - byte cmos_disks, *BIOS = (byte *) &drive_info; - int unit; - -#ifdef CONFIG_BLK_DEV_PROMISE - if (hwif->is_promise2) - return; -#endif /* CONFIG_BLK_DEV_PROMISE */ - outb_p(0x12,0x70); /* specify CMOS address 0x12 */ - cmos_disks = inb_p(0x71); /* read the data from 0x12 */ - /* Extract drive geometry from CMOS+BIOS if not already setup */ - for (unit = 0; unit < MAX_DRIVES; ++unit) { - ide_drive_t *drive = &hwif->drives[unit]; - if ((cmos_disks & (0xf0 >> (unit*4))) && !drive->present) { - drive->cyl = drive->bios_cyl = *(unsigned short *)BIOS; - drive->head = drive->bios_head = *(BIOS+2); - drive->sect = drive->bios_sect = *(BIOS+14); - drive->ctl = *(BIOS+8); - drive->present = 1; - } - BIOS += 16; - } -#endif -} /* * This routine sets up the irq for an ide interface, and creates a new @@ -3153,15 +3158,8 @@ static int hwif_init (int h) ide_hwif_t *hwif = &ide_hwifs[h]; void (*rfn)(void); - if (hwif->noprobe) + if (!hwif->present) return 0; - else { - if (hwif->io_base == HD_DATA) - probe_cmos_for_drives (hwif); - probe_hwif (hwif); - if (!hwif->present) - return 0; - } if (!hwif->irq) { if (!(hwif->irq = default_irqs[h])) { printk("%s: DISABLED, NO IRQ\n", hwif->name); @@ -3221,6 +3219,8 @@ int ide_init (void) /* * Probe for drives in the usual way.. CMOS/BIOS, then poke at ports */ + for (index = 0; index < MAX_HWIFS; ++index) + probe_hwif (&ide_hwifs[index]); for (index = 0; index < MAX_HWIFS; ++index) hwif_init (index); @@ -3250,6 +3250,7 @@ int ide_register(int io_base, int ctl_port, int irq) hwif->ctl_port = ctl_port; hwif->irq = irq; hwif->noprobe = 0; + probe_hwif(hwif); if (!hwif_init(index)) break; for (i = 0; i < hwif->gd->nr_real; i++) diff --git a/drivers/block/ll_rw_blk.c b/drivers/block/ll_rw_blk.c index 7278e9ab621a..36eb4bc0afe4 100644 --- a/drivers/block/ll_rw_blk.c +++ b/drivers/block/ll_rw_blk.c @@ -84,16 +84,19 @@ int * hardsect_size[MAX_BLKDEV] = { NULL, NULL, }; /* * remove the plug and let it rip.. */ -static void unplug_device(void * data) +void unplug_device(void * data) { struct blk_dev_struct * dev = (struct blk_dev_struct *) data; unsigned long flags; save_flags(flags); cli(); - dev->current_request = dev->plug.next; - dev->plug.next = NULL; - (dev->request_fn)(); + if (dev->current_request == &dev->plug) { + dev->current_request = dev->plug.next; + dev->plug.next = NULL; + if (dev->current_request) + (dev->request_fn)(); + } restore_flags(flags); } diff --git a/drivers/block/loop.c b/drivers/block/loop.c index 1f32436a3f7b..3c8bfa597469 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c @@ -20,6 +20,8 @@ #include #include +#include + #ifdef DES_AVAILABLE #include "des.h" #endif diff --git a/drivers/char/ChangeLog b/drivers/char/ChangeLog index 07cd8a5044a4..4a5e82bd0141 100644 --- a/drivers/char/ChangeLog +++ b/drivers/char/ChangeLog @@ -1,3 +1,18 @@ +Tue Apr 23 22:56:07 1996 + + * tty_io.c (init_dev): Change return code when user attempts to + open master pty which is already open from EAGAIN to EIO, + to match with BSD expectations. EIO is more correct + anyway, since EAGAIN implies that retrying will be + successful --- which it might be.... Eventually!! + + * pty.c (pty_open, pty_close): Fix wait loop so that we don't + busy loop while waiting for the master side to open. + Fix tty opening/closing logic. TTY_SLAVE_CLOSED was + renamed to TTY_OTHER_CLOSED, so that the name is more + descriptive. Also fixed code so that the tty flag + actually works correctly now.... + Mon Apr 1 10:22:01 1996 * serial.c (rs_close): Cleaned up modularization changes. diff --git a/drivers/char/README.stallion b/drivers/char/README.stallion index 4ca1af88aa44..361e3a95dbe4 100644 --- a/drivers/char/README.stallion +++ b/drivers/char/README.stallion @@ -2,8 +2,8 @@ Stallion Multiport Serial Drivers --------------------------------- -Version: 1.0.8 -Date: 25MAR96 +Version: 1.1.3 +Date: 23APR96 Author: Greg Ungerer (gerg@stallion.oz.au) @@ -26,9 +26,9 @@ These boards cannot be used without this. The following ftp sites (and their mirrors) definitely have the stallion driver utility package: ftp.stallion.com, tsx-11.mit.edu, sunsite.unc.edu. -ftp.stallion.com:/drivers/ata5/Linux/stallion-1.1.0.tar.gz -tsx-11.mit.edu:/pub/linux/BETA/serial/stallion/stallion-1.1.0.tar.gz -sunsite.unc.edu:/pub/Linux/kernel/patches/serial/stallion-1.1.0.tar.gz +ftp.stallion.com:/drivers/ata5/Linux/stallion-1.1.2.tar.gz +tsx-11.mit.edu:/pub/linux/BETA/serial/stallion/stallion-1.1.2.tar.gz +sunsite.unc.edu:/pub/Linux/kernel/patches/serial/stallion-1.1.2.tar.gz If you are using the EasyIO or EasyConnection 8/32 boards then you don't need this package. Although it does have a handy script to create the @@ -128,48 +128,10 @@ ISA and the Stallion boards can be programmed to use memory addresses up to ONboard/E can be programmed for memory addresses up to 4Gb (the EISA bus addressing limit). -The istallion intelligent driver does offer support for these higher memory -addresses with a couple of limitations. The higher memory support can only -be used in the loadable module form of the driver, since the kernel memory -management routines it relies on can not be run from the drivers static -kernel init routine. +The higher than 1Mb memory addresses are fully supported by this driver. +Just enter the address as you normally would for a lower than 1Mb address +(in the drivers board configuration structure). -By default, support for these higher memory addresses is not compiled into -the driver. This is because it relies on kernel functions that are not -normally exported as part of the Linux loadable module system. - -To add the appropriate symbols into the kernel export code you need to: - -1. cd /usr/src/linux/kernel - (assuming your Linux kernel code is in /usr/src/linux) -2. vi ksyms.c - - find the line that reads - X(vfree), - - after this line insert the following line - X(remap_page_range), - - save and exit -3. cd .. -4. build a new kernel (usually just make) - -This will export the "remap_page_range" function for loadable modules -which is required for the higher memory support code. - -Finally you need to enable the code in the istallion driver. To do this -edit the istallion.c file and search for the symbol STLI_HIMEMORY. It is -near the top of the file in a line that looks like: - -#define STLI_HIMEMORY 0 - -Change the "0" to a "1". This enables the high memory support code in -the driver. You will then need to rebuild the module or rebuild the -kernel to incorporate the change. You will also need to modify -the board resource configuration information to use a higher memory -address. - -Once these changes are in place the driver will work as it did before. -Note that the physical memory address range is software programmed on the -EasyConnection 8/64-EI and ONboards, but must be set via DIP switches on -the original Stallion boards. 2.3 TROUBLE SHOOTING @@ -304,7 +266,7 @@ ranges is the best option. Typically the 2Gb range is convenient for them, and gets them well out of the way. The ports of the EasyIO-8M board do not have DCD or DTR signals. So these -ports cannot be used as real modem devices. Generally when using these +ports cannot be used as real modem devices. Generally, when using these ports you should only use the cueX devices. The driver utility package contains a couple of very useful programs. One diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c index 6d2694a3cb80..baab385b15b6 100644 --- a/drivers/char/cyclades.c +++ b/drivers/char/cyclades.c @@ -2784,7 +2784,7 @@ cy_init(void) cy_serial_driver.magic = TTY_DRIVER_MAGIC; cy_serial_driver.name = "ttyC"; cy_serial_driver.major = CYCLADES_MAJOR; - cy_serial_driver.minor_start = 32; + cy_serial_driver.minor_start = 0; cy_serial_driver.num = NR_PORTS; cy_serial_driver.type = TTY_DRIVER_TYPE_SERIAL; cy_serial_driver.subtype = SERIAL_TYPE_NORMAL; diff --git a/drivers/char/istallion.c b/drivers/char/istallion.c index d2a80c08bf58..2cb6fd0cd753 100644 --- a/drivers/char/istallion.c +++ b/drivers/char/istallion.c @@ -124,24 +124,6 @@ static stlconf_t stli_brdconf[] = { static int stli_nrbrds = sizeof(stli_brdconf) / sizeof(stlconf_t); -/* - * Code support is offered for boards to use the above 1Mb memory - * ranges for those boards which support this (supported on the ONboard - * and ECP-EI hardware). The following switch should be enabled. The only - * catch is that the kernel functions required to do this are not - * normally exported symbols, so you will have to do some extra work - * for this to be used in the loadable module form of the driver. - * Unfortunately this doesn't work either if you linked the driver into - * the kernel, since the memory management code is not set up early - * enough (before our initialization routine is run). - */ -#define STLI_HIMEMORY 0 - -#if STLI_HIMEMORY -#include -#include -#endif - /* * There is some experimental EISA board detection code in this driver. * By default it is disabled, but for those that want to try it out, @@ -175,7 +157,7 @@ static int stli_nrbrds = sizeof(stli_brdconf) / sizeof(stlconf_t); * all the local structures required by a serial tty driver. */ static char *stli_drvname = "Stallion Intelligent Multiport Serial Driver"; -static char *stli_drvversion = "1.1.1"; +static char *stli_drvversion = "1.1.3"; static char *stli_serialname = "ttyE"; static char *stli_calloutname = "cue"; @@ -310,19 +292,14 @@ static char *stli_brdnames[] = { * the 1Gb, 2Gb and 3Gb areas as well... */ static unsigned long stli_eisamemprobeaddrs[] = { - 0xc0000, 0xd0000, 0xe0000, 0xf0000, + 0xc0000, 0xd0000, 0xe0000, 0xf0000, 0x80000000, 0x80010000, 0x80020000, 0x80030000, 0x40000000, 0x40010000, 0x40020000, 0x40030000, 0xc0000000, 0xc0010000, 0xc0020000, 0xc0030000, 0xff000000, 0xff010000, 0xff020000, 0xff030000, }; -#if STLI_HIMEMORY static int stli_eisamempsize = sizeof(stli_eisamemprobeaddrs) / sizeof(unsigned long); -#else -static int stli_eisamempsize = 4; -#endif - int stli_eisaprobe = STLI_EISAPROBE; /*****************************************************************************/ @@ -407,11 +384,8 @@ int stli_eisaprobe = STLI_EISAPROBE; #define ONB_ATADDRMASK 0xff0000 #define ONB_ATADDRSHFT 16 -#if STLI_HIMEMORY -#define ONB_HIMEMENAB 0x02 -#else -#define ONB_HIMEMENAB 0 -#endif +#define ONB_MEMENABLO 0 +#define ONB_MEMENABHI 0x02 /* * Important defines for the EISA class of ONboard board. @@ -627,10 +601,6 @@ static void stli_stalreset(stlibrd_t *brdp); static stliport_t *stli_getport(int brdnr, int panelnr, int portnr); -#if STLI_HIMEMORY -static void *stli_mapbrdmem(unsigned long physaddr, unsigned int size); -#endif - /*****************************************************************************/ /* @@ -750,10 +720,8 @@ void cleanup_module() } } -#if STLI_HIMEMORY - if (((unsigned long) brdp->membase) >= 0x100000) + if (brdp->memaddr >= 0x100000) vfree(brdp->membase); -#endif if ((brdp->brdtype == BRD_ECP) || (brdp->brdtype == BRD_ECPE) || (brdp->brdtype == BRD_ECPMC)) release_region(brdp->iobase, ECP_IOSIZE); else @@ -3083,7 +3051,7 @@ static void stli_onbenable(stlibrd_t *brdp) #if DEBUG printk("stli_onbenable(brdp=%x)\n", (int) brdp); #endif - outb((ONB_ATENABLE | ONB_HIMEMENAB), (brdp->iobase + ONB_ATCONFR)); + outb((brdp->enabval | ONB_ATENABLE), (brdp->iobase + ONB_ATCONFR)); } /*****************************************************************************/ @@ -3093,7 +3061,7 @@ static void stli_onbdisable(stlibrd_t *brdp) #if DEBUG printk("stli_onbdisable(brdp=%x)\n", (int) brdp); #endif - outb(ONB_ATDISABLE, (brdp->iobase + ONB_ATCONFR)); + outb((brdp->enabval | ONB_ATDISABLE), (brdp->iobase + ONB_ATCONFR)); } /*****************************************************************************/ @@ -3346,40 +3314,6 @@ static void stli_stalreset(stlibrd_t *brdp) /*****************************************************************************/ -#if STLI_HIMEMORY - -#define PAGE_IOMEM __pgprot(_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_PCD) - -/* - * To support shared memory addresses outside of the lower 1 Mb region - * we will need to pull some tricks with memory management to map the - * higher range into kernel virtual address space... Radical stuff... - */ - -static void *stli_mapbrdmem(unsigned long physaddr, unsigned int size) -{ - void *virtaddr; - int rc; - -#if DEBUG - printk("stli_mapbrdmem(physaddr=%x,size=%x)\n", (int) physaddr, size); -#endif - - if ((virtaddr = vmalloc(size)) == (char *) NULL) { - printk("STALLION: failed to allocate virtual address space, size=%x\n", size); - return((void *) NULL); - } - if ((rc = remap_page_range((TASK_SIZE + ((unsigned long) virtaddr)), physaddr, size, PAGE_IOMEM))) { - printk("STALLION: failed to map physical address=%x, errno=%d\n", (int) physaddr, rc); - return((void *) NULL); - } - return(virtaddr); -} - -#endif - -/*****************************************************************************/ - /* * Try to find an ECP board and initialize it. This handles only ECP * board types. @@ -3459,13 +3393,11 @@ static int stli_initecp(stlibrd_t *brdp) */ EBRDINIT(brdp); -#if STLI_HIMEMORY if (brdp->memaddr > 0x100000) { - brdp->membase = stli_mapbrdmem(brdp->memaddr, brdp->memsize); + brdp->membase = vremap(brdp->memaddr, brdp->memsize); if (brdp->membase == (void *) NULL) return(-ENOMEM); } -#endif /* * Now that all specific code is set up, enable the shared memory and @@ -3558,6 +3490,10 @@ static int stli_initonb(stlibrd_t *brdp) brdp->getmemptr = stli_onbgetmemptr; brdp->intr = stli_ecpintr; brdp->reset = stli_onbreset; + if (brdp->memaddr > 0x100000) + brdp->enabval = ONB_MEMENABHI; + else + brdp->enabval = ONB_MEMENABLO; break; case BRD_ONBOARDE: @@ -3613,13 +3549,11 @@ static int stli_initonb(stlibrd_t *brdp) */ EBRDINIT(brdp); -#if STLI_HIMEMORY if (brdp->memaddr > 0x100000) { - brdp->membase = stli_mapbrdmem(brdp->memaddr, brdp->memsize); + brdp->membase = vremap(brdp->memaddr, brdp->memsize); if (brdp->membase == (void *) NULL) return(-ENOMEM); } -#endif /* * Now that all specific code is set up, enable the shared memory and @@ -3880,13 +3814,11 @@ static int stli_eisamemprobe(stlibrd_t *brdp) for (i = 0; (i < stli_eisamempsize); i++) { brdp->memaddr = stli_eisamemprobeaddrs[i]; brdp->membase = (void *) brdp->memaddr; -#if STLI_HIMEMORY if (brdp->memaddr > 0x100000) { - brdp->membase = stli_mapbrdmem(brdp->memaddr, brdp->memsize); + brdp->membase = vremap(brdp->memaddr, brdp->memsize); if (brdp->membase == (void *) NULL) continue; } -#endif if (brdp->brdtype == BRD_ECPE) { ecpsigp = (cdkecpsig_t *) stli_ecpeigetmemptr(brdp, CDK_SIGADDR, __LINE__); memcpy(&ecpsig, ecpsigp, sizeof(cdkecpsig_t)); @@ -3899,10 +3831,8 @@ static int stli_eisamemprobe(stlibrd_t *brdp) (onbsig.magic2 == ONB_MAGIC2) && (onbsig.magic3 == ONB_MAGIC3)) foundit = 1; } -#if STLI_HIMEMORY if (brdp->memaddr >= 0x100000) vfree(brdp->membase); -#endif if (foundit) break; } @@ -4292,8 +4222,12 @@ static int stli_getportstats(stliport_t *portp, comstats_t *cp) if (brdp == (stlibrd_t *) NULL) return(-ENODEV); - if ((rc = stli_cmdwait(brdp, portp, A_GETSTATS, &stli_cdkstats, sizeof(asystats_t), 1)) < 0) - return(rc); + if (brdp->state & BST_STARTED) { + if ((rc = stli_cmdwait(brdp, portp, A_GETSTATS, &stli_cdkstats, sizeof(asystats_t), 1)) < 0) + return(rc); + } else { + memset(&stli_cdkstats, 0, sizeof(asystats_t)); + } memset(&stli_comstats, 0, sizeof(comstats_t)); stli_comstats.brd = portp->brdnr; @@ -4364,8 +4298,10 @@ static int stli_clrportstats(stliport_t *portp, comstats_t *cp) if (brdp == (stlibrd_t *) NULL) return(-ENODEV); - if ((rc = stli_cmdwait(brdp, portp, A_CLEARSTATS, 0, 0, 0)) < 0) - return(rc); + if (brdp->state & BST_STARTED) { + if ((rc = stli_cmdwait(brdp, portp, A_CLEARSTATS, 0, 0, 0)) < 0) + return(rc); + } memset(&stli_comstats, 0, sizeof(comstats_t)); stli_comstats.brd = portp->brdnr; @@ -4426,14 +4362,57 @@ static int stli_getbrdstruct(unsigned long arg) static int stli_memioctl(struct inode *ip, struct file *fp, unsigned int cmd, unsigned long arg) { stlibrd_t *brdp; - int brdnr, rc; + int brdnr, rc, done; #if DEBUG printk("stli_memioctl(ip=%x,fp=%x,cmd=%x,arg=%x)\n", (int) ip, (int) fp, cmd, (int) arg); #endif +/* + * First up handle the board independent ioctls. + */ + done = 0; + rc = 0; + + switch (cmd) { + case COM_GETPORTSTATS: + if ((rc = verify_area(VERIFY_WRITE, (void *) arg, sizeof(comstats_t))) == 0) + rc = stli_getportstats((stliport_t *) NULL, (comstats_t *) arg); + done++; + break; + case COM_CLRPORTSTATS: + if ((rc = verify_area(VERIFY_WRITE, (void *) arg, sizeof(comstats_t))) == 0) + rc = stli_clrportstats((stliport_t *) NULL, (comstats_t *) arg); + done++; + break; + case COM_GETBRDSTATS: + if ((rc = verify_area(VERIFY_WRITE, (void *) arg, sizeof(combrd_t))) == 0) + rc = stli_getbrdstats((combrd_t *) arg); + done++; + break; + case COM_READPORT: + if ((rc = verify_area(VERIFY_WRITE, (void *) arg, sizeof(stliport_t))) == 0) + rc = stli_getportstruct(arg); + done++; + break; + case COM_READBOARD: + if ((rc = verify_area(VERIFY_WRITE, (void *) arg, sizeof(stlibrd_t))) == 0) + rc = stli_getbrdstruct(arg); + done++; + break; + default: + break; + } + + if (done) + return(rc); + +/* + * Now handle the board specific ioctls. These all depend on the + * minor number of the device they were called from. + */ brdnr = MINOR(ip->i_rdev); - if (brdnr >= stli_nrbrds) + if (brdnr >= STL_MAXBRDS) return(-ENODEV); brdp = stli_brds[brdnr]; if (brdp == (stlibrd_t *) NULL) @@ -4441,8 +4420,6 @@ static int stli_memioctl(struct inode *ip, struct file *fp, unsigned int cmd, un if (brdp->state == 0) return(-ENODEV); - rc = 0; - switch (cmd) { case STL_BINTR: EBRDINTR(brdp); @@ -4461,26 +4438,6 @@ static int stli_memioctl(struct inode *ip, struct file *fp, unsigned int cmd, un (* brdp->reenable)(brdp); } break; - case COM_GETPORTSTATS: - if ((rc = verify_area(VERIFY_WRITE, (void *) arg, sizeof(comstats_t))) == 0) - rc = stli_getportstats((stliport_t *) NULL, (comstats_t *) arg); - break; - case COM_CLRPORTSTATS: - if ((rc = verify_area(VERIFY_WRITE, (void *) arg, sizeof(comstats_t))) == 0) - rc = stli_clrportstats((stliport_t *) NULL, (comstats_t *) arg); - break; - case COM_GETBRDSTATS: - if ((rc = verify_area(VERIFY_WRITE, (void *) arg, sizeof(combrd_t))) == 0) - rc = stli_getbrdstats((combrd_t *) arg); - break; - case COM_READPORT: - if ((rc = verify_area(VERIFY_WRITE, (void *) arg, sizeof(stliport_t))) == 0) - rc = stli_getportstruct(arg); - break; - case COM_READBOARD: - if ((rc = verify_area(VERIFY_WRITE, (void *) arg, sizeof(stlibrd_t))) == 0) - rc = stli_getbrdstruct(arg); - break; default: rc = -ENOIOCTLCMD; break; diff --git a/drivers/char/misc.c b/drivers/char/misc.c index 5da7254a3d8f..738845ec874e 100644 --- a/drivers/char/misc.c +++ b/drivers/char/misc.c @@ -188,7 +188,7 @@ int misc_init(void) #ifdef CONFIG_PROC_FS proc_register_dynamic(&proc_root, &(struct proc_dir_entry) { 0, 4, "misc", - S_IRUGO, 1, 0, 0, + S_IFREG | S_IRUGO, 1, 0, 0, 0, NULL /* ops -- default to array */, &proc_misc_read /* get_info */, }); diff --git a/drivers/char/n_tty.c b/drivers/char/n_tty.c index 74ef76cbc91d..67bc1ab57d03 100644 --- a/drivers/char/n_tty.c +++ b/drivers/char/n_tty.c @@ -826,7 +826,7 @@ do_it_again: tty->minimum_to_wake = (minimum - (b - buf)); if (!input_available_p(tty, 0)) { - if (tty->flags & (1 << TTY_SLAVE_CLOSED)) { + if (tty->flags & (1 << TTY_OTHER_CLOSED)) { retval = -EIO; break; } @@ -985,7 +985,7 @@ static int normal_select(struct tty_struct * tty, struct inode * inode, case SEL_EX: if (tty->packet && tty->link->ctrl_status) return 1; - if (tty->flags & (1 << TTY_SLAVE_CLOSED)) + if (tty->flags & (1 << TTY_OTHER_CLOSED)) return 1; if (tty_hung_up_p(file)) return 1; diff --git a/drivers/char/pty.c b/drivers/char/pty.c index 79e0d0bc916c..c262b85ab4fe 100644 --- a/drivers/char/pty.c +++ b/drivers/char/pty.c @@ -78,12 +78,10 @@ static void pty_close(struct tty_struct * tty, struct file * filp) return; wake_up_interruptible(&tty->link->read_wait); wake_up_interruptible(&tty->link->write_wait); + set_bit(TTY_OTHER_CLOSED, &tty->link->flags); if (tty->driver.subtype == PTY_TYPE_MASTER) { tty_hangup(tty->link); - set_bit(TTY_SLAVE_CLOSED, &tty->flags); - } else { - start_tty(tty); - set_bit(TTY_SLAVE_CLOSED, &tty->link->flags); + set_bit(TTY_OTHER_CLOSED, &tty->flags); } } @@ -183,6 +181,8 @@ static void pty_flush_buffer(struct tty_struct *tty) int pty_open(struct tty_struct *tty, struct file * filp) { + struct wait_queue wait = { current, NULL }; + int retval; int line; struct pty_struct *pty; @@ -204,18 +204,36 @@ int pty_open(struct tty_struct *tty, struct file * filp) free_page(page); } - if (tty->driver.subtype == PTY_TYPE_SLAVE) - clear_bit(TTY_SLAVE_CLOSED, &tty->link->flags); + clear_bit(TTY_OTHER_CLOSED, &tty->link->flags); wake_up_interruptible(&pty->open_wait); set_bit(TTY_THROTTLED, &tty->flags); if (filp->f_flags & O_NDELAY) return 0; - while (test_bit(TTY_SLAVE_CLOSED, &tty->link->flags) && - !(current->signal & ~current->blocked)) - interruptible_sleep_on(&pty->open_wait); - if (!tty->link->count) - return -ERESTARTSYS; - return 0; + /* + * If we're opening the master pty, just return. If we're + * trying to open the slave pty, then we have to wait for the + * master pty to open. + */ + if (tty->driver.subtype == PTY_TYPE_MASTER) + return 0; + add_wait_queue(&pty->open_wait, &wait); + retval = 0; + while (1) { + if (current->signal & ~current->blocked) { + retval = -ERESTARTSYS; + break; + } + /* + * Block until the master is open... + */ + if (tty->link->count && + !test_bit(TTY_OTHER_CLOSED, &tty->flags)) + break; + schedule(); + } + current->state = TASK_RUNNING; + remove_wait_queue(&pty->open_wait, &wait); + return retval; } int pty_init(void) diff --git a/drivers/char/stallion.c b/drivers/char/stallion.c index 8414e3c334a1..2e0195b82d75 100644 --- a/drivers/char/stallion.c +++ b/drivers/char/stallion.c @@ -140,7 +140,7 @@ static int stl_nrbrds = sizeof(stl_brdconf) / sizeof(stlconf_t); * all the local structures required by a serial tty driver. */ static char *stl_drvname = "Stallion Multiport Serial Driver"; -static char *stl_drvversion = "1.1.1"; +static char *stl_drvversion = "1.1.3"; static char *stl_serialname = "ttyE"; static char *stl_calloutname = "cue"; @@ -3065,20 +3065,15 @@ static int stl_getbrdstruct(unsigned long arg) static int stl_memioctl(struct inode *ip, struct file *fp, unsigned int cmd, unsigned long arg) { - stlbrd_t *brdp; - int brdnr, rc; + int brdnr, rc; #if DEBUG printk("stl_memioctl(ip=%x,fp=%x,cmd=%x,arg=%x)\n", (int) ip, (int) fp, cmd, (int) arg); #endif brdnr = MINOR(ip->i_rdev); - if (brdnr >= stl_nrbrds) - return(-ENODEV); - brdp = stl_brds[brdnr]; - if (brdp == (stlbrd_t *) NULL) + if (brdnr >= STL_MAXBRDS) return(-ENODEV); - rc = 0; switch (cmd) { diff --git a/drivers/char/suncons.c b/drivers/char/suncons.c index d21fe88bea34..da70ff440a1f 100644 --- a/drivers/char/suncons.c +++ b/drivers/char/suncons.c @@ -25,7 +25,7 @@ * * We try to make everything a power of two if possible to * speed up the bit blit. Doing multiplies, divides, and - * remainer routines end up calling software library routines + * remainder routines end up calling software library routines * since not all Sparcs have the hardware to do it. * * TODO: @@ -38,7 +38,7 @@ */ -/* Define thie one if you are debugging something in X, it will not disable the console output */ +/* Define this one if you are debugging something in X, it will not disable the console output */ /* #define DEBUGGING_X */ /* See also: sparc/keyboard.c: CODING_NEW_DRIVER */ @@ -87,7 +87,7 @@ extern int serial_console; /* Based upon what the PROM tells us, we can figure out where * the console is currently located. The situation can be either - * of the following two scenerios: + * of the following two scenarios: * * 1) Console i/o is done over the serial line, ttya or ttyb * 2) Console output on frame buffer (video card) and input @@ -115,7 +115,7 @@ static int skip_bytes; /* number of bytes we skip for the y margin */ static int x_margin, y_margin; /* the x and y margins */ static int bytes_per_row; /* bytes used by one screen line (of 16 scan lines) */ -/* Functions used by the SPARC dependant console code +/* Functions used by the SPARC dependent console code * to perform the restore_palette function. */ static void (*restore_palette)(void); @@ -142,10 +142,10 @@ void set_palette (void); /* First for MONO displays. */ #define SCREEN_WIDTH 1152 /* Screen width in pixels */ #define SCREEN_HEIGHT 900 /* Screen height in pixels */ -#define CHARS_PER_LINE 144 /* Make this imperical for speed */ +#define CHARS_PER_LINE 144 /* Make this empirical for speed */ #define NICE_Y_MARGIN 18 /* We skip 18 y-pixels at top/bottom */ #define NICE_X_MARGIN 8 /* We skip 64 x-pixels at left/right */ -#define FBUF_TOP_SKIP 2592 /* Imperical, (CHARS_PER_LINE * NICE_Y_MARGIN) */ +#define FBUF_TOP_SKIP 2592 /* Empirical, (CHARS_PER_LINE * NICE_Y_MARGIN) */ #define CHAR_HEIGHT 16 #define ONE_ROW 2304 /* CHARS_PER_LINE * CHAR_HEIGHT */ @@ -220,7 +220,7 @@ hide_cursor(void) /* The idea is the following: * we only use the colors in the range 0..15, and we only * setup the palette on that range, so we better keep the - * pixel inverion using those colors, that's why we have + * pixel inversion using those colors, that's why we have * those constants below. */ inline static void @@ -1076,7 +1076,7 @@ cg3_loadcmap (void *fbinfo, int index, int count) bt->color_map = *i++; } -/* The cg3 is pressumed to emulate a cg4, I guess older programs will want that */ +/* The cg3 is presumed to emulate a cg4, I guess older programs will want that */ /* addresses above 0x4000000 are for cg3, below that it's cg4 emulation */ static int cg3_mmap (struct inode *inode, struct file *file, struct vm_area_struct *vma, long base, void *xx) @@ -1428,7 +1428,7 @@ sparc_console_probe(void) return 0; /* success */ } -/* video init code, called from withing the SBUS bus scanner at +/* video init code, called from within the SBUS bus scanner at * boot time. */ void diff --git a/drivers/char/sunmouse.c b/drivers/char/sunmouse.c index a226fcc8a80c..9b32cf59a076 100644 --- a/drivers/char/sunmouse.c +++ b/drivers/char/sunmouse.c @@ -7,7 +7,7 @@ * Johan Myreen. * * Dec/19/95 Added SunOS mouse ioctls - miguel. - * Jan/5/96 Added VUID support, sigio supprot - miguel. + * Jan/5/96 Added VUID support, sigio support - miguel. * Mar/5/96 Added proper mouse stream support - miguel. */ @@ -200,7 +200,7 @@ sun_mouse_inbyte(unsigned char byte, unsigned char status) printk("DY2<%d>", mvalue); #endif sunmouse.delta_y += mvalue; - sunmouse.byte = 69; /* Some rediculious value */ + sunmouse.byte = 69; /* Some ridiculous value */ break; case 69: /* Until we get the (0x80 -> 0x87) value we aren't diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index 131fde8cd455..39defe00b53b 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c @@ -818,7 +818,7 @@ static int init_dev(kdev_t device, struct tty_struct **ret_tty) ltp_loc = &driver->termios_locked[idx]; repeat: - retval = -EAGAIN; + retval = -EIO; if (driver->type == TTY_DRIVER_TYPE_PTY && driver->subtype == PTY_TYPE_MASTER && *tty_loc && (*tty_loc)->count) diff --git a/drivers/isdn/pcbit/callbacks.c b/drivers/isdn/pcbit/callbacks.c index 374238c15afc..67b46bbcca2f 100644 --- a/drivers/isdn/pcbit/callbacks.c +++ b/drivers/isdn/pcbit/callbacks.c @@ -1,7 +1,7 @@ /* * Copyright (C) 1996 Universidade de Lisboa * - * Writen by Pedro Roque Marques (roque@di.fc.ul.pt) + * Written by Pedro Roque Marques (roque@di.fc.ul.pt) * * This software may be used and distributed according to the terms of * the GNU Public License, incorporated herein by reference. @@ -125,8 +125,8 @@ void cb_out_2(struct pcbit_dev * dev, struct pcbit_chan* chan, /* - * Disconnect received (actualy RELEASE COMPLETE) - * This means we where not hable to establish connection with remote + * Disconnect received (actually RELEASE COMPLETE) + * This means we were not able to establish connection with remote * Inform the big boss above */ void cb_out_3(struct pcbit_dev * dev, struct pcbit_chan* chan, @@ -142,7 +142,7 @@ void cb_out_3(struct pcbit_dev * dev, struct pcbit_chan* chan, /* - * Incomming call received + * Incoming call received * inform user */ @@ -195,7 +195,7 @@ void cb_in_1(struct pcbit_dev * dev, struct pcbit_chan* chan, } /* - * user has replyed + * user has replied * open the channel * send CONNECT message CONNECT_ACTIVE_REQ in CAPI */ @@ -278,7 +278,7 @@ void cb_disc_1(struct pcbit_dev * dev, struct pcbit_chan* chan, /* - * User HANGUP on active/call proceding state + * User HANGUP on active/call proceeding state * send disc.req */ void cb_disc_2(struct pcbit_dev * dev, struct pcbit_chan* chan, @@ -344,7 +344,7 @@ void cb_selp_1(struct pcbit_dev * dev, struct pcbit_chan* chan, } /* - * Inform User that the B-channel is availiable + * Inform User that the B-channel is available */ void cb_open(struct pcbit_dev * dev, struct pcbit_chan* chan, struct callb_data *data) diff --git a/drivers/isdn/pcbit/callbacks.h b/drivers/isdn/pcbit/callbacks.h index 55ca14b0ee7f..62e296deeca3 100644 --- a/drivers/isdn/pcbit/callbacks.h +++ b/drivers/isdn/pcbit/callbacks.h @@ -1,7 +1,7 @@ /* * Copyright (C) 1996 Universidade de Lisboa * - * Writen by Pedro Roque Marques (roque@di.fc.ul.pt) + * Written by Pedro Roque Marques (roque@di.fc.ul.pt) * * This software may be used and distributed according to the terms of * the GNU Public License, incorporated herein by reference. diff --git a/drivers/isdn/pcbit/capi.c b/drivers/isdn/pcbit/capi.c index 9f0f416e6121..80bb215b87a1 100644 --- a/drivers/isdn/pcbit/capi.c +++ b/drivers/isdn/pcbit/capi.c @@ -1,7 +1,7 @@ /* * Copyright (C) 1996 Universidade de Lisboa * - * Writen by Pedro Roque Marques (roque@di.fc.ul.pt) + * Written by Pedro Roque Marques (roque@di.fc.ul.pt) * * This software may be used and distributed according to the terms of * the GNU Public License, incorporated herein by reference. @@ -90,12 +90,12 @@ int capi_conn_req(const char * calledPN, struct sk_buff **skb) *((ushort*) skb_put(*skb, 2)) = AppInfoMask; - /* Bearer Capbility - Mandatory*/ + /* Bearer Capability - Mandatory*/ *(skb_put(*skb, 1)) = 2; /* BC0.Length */ *(skb_put(*skb, 1)) = 0x88; /* BC0.Octect3 - Digital Information */ *(skb_put(*skb, 1)) = 0x90; /* BC0.Octect4 - */ - /* Bearer Capbility - Optional*/ + /* Bearer Capability - Optional*/ *(skb_put(*skb, 1)) = 0; /* BC1.Length = 0 */ *(skb_put(*skb, 1)) = 1; /* ChannelID.Length = 1 */ @@ -414,7 +414,7 @@ int capi_decode_conn_ind(struct pcbit_chan * chan, skb_pull(skb, CIlen + 1); /* Calling Party Number */ - /* An "aditional service" as far as Portugal Telecom is concerned */ + /* An "additional service" as far as Portugal Telecom is concerned */ len = skb->data[0]; @@ -504,7 +504,7 @@ int capi_decode_conn_conf(struct pcbit_chan * chan, struct sk_buff *skb, skb_pull(skb, 1); /* FIX ME */ - /* This is actualy a firmware bug */ + /* This is actually a firmware bug */ if (!*complete) { printk(KERN_DEBUG "complete=%02x\n", *complete); diff --git a/drivers/isdn/pcbit/capi.h b/drivers/isdn/pcbit/capi.h index 083959a0affa..1b550b13c069 100644 --- a/drivers/isdn/pcbit/capi.h +++ b/drivers/isdn/pcbit/capi.h @@ -1,7 +1,7 @@ /* * Copyright (C) 1996 Universidade de Lisboa * - * Writen by Pedro Roque Marques (roque@di.fc.ul.pt) + * Written by Pedro Roque Marques (roque@di.fc.ul.pt) * * This software may be used and distributed according to the terms of * the GNU Public License, incorporated herein by reference. diff --git a/drivers/isdn/pcbit/drv.c b/drivers/isdn/pcbit/drv.c index 174623c746e0..5e76e6301b55 100644 --- a/drivers/isdn/pcbit/drv.c +++ b/drivers/isdn/pcbit/drv.c @@ -1,7 +1,7 @@ /* * Copyright (C) 1996 Universidade de Lisboa * - * Writen by Pedro Roque Marques (roque@di.fc.ul.pt) + * Written by Pedro Roque Marques (roque@di.fc.ul.pt) * * This software may be used and distributed according to the terms of * the GNU Public License, incorporated herein by reference. @@ -251,7 +251,7 @@ int pcbit_command(isdn_ctrl* ctl) pcbit_fsm_event(dev, chan, EV_USR_SETUP_RESP, NULL); break; case ISDN_CMD_ACCEPTB: - printk("ISDN_CMD_ACCEPTB - not realy needed\n"); + printk("ISDN_CMD_ACCEPTB - not really needed\n"); break; case ISDN_CMD_HANGUP: pcbit_fsm_event(dev, chan, EV_USR_RELEASE_REQ, NULL); @@ -354,7 +354,7 @@ int pcbit_xmit(int driver, int chnum, struct sk_buff *skb) { #ifdef DEBUG_QUEUE printk(KERN_DEBUG - "pcbit: %d packets allready in queue - write fails\n", + "pcbit: %d packets already in queue - write fails\n", chan->queued); #endif /* @@ -768,7 +768,7 @@ int pcbit_stat(u_char* buf, int len, int user) if (stat_count < 0) stat_count = STATBUF_LEN - stat_st + stat_end; - /* FIXME: should we sleep and wait for more cockies ? */ + /* FIXME: should we sleep and wait for more cookies ? */ if (len > stat_count) len = stat_count; @@ -1025,7 +1025,7 @@ static int pcbit_ioctl(isdn_ctrl* ctl) dev->unack_seq = 0; break; default: - printk("error: unkown ioctl\n"); + printk("error: unknown ioctl\n"); break; }; return 0; diff --git a/drivers/isdn/pcbit/edss1.c b/drivers/isdn/pcbit/edss1.c index 1e654f25bd01..f37906d54b58 100644 --- a/drivers/isdn/pcbit/edss1.c +++ b/drivers/isdn/pcbit/edss1.c @@ -1,7 +1,7 @@ /* * Copyright (C) 1996 Universidade de Lisboa * - * Writen by Pedro Roque Marques (roque@di.fc.ul.pt) + * Written by Pedro Roque Marques (roque@di.fc.ul.pt) * * This software may be used and distributed according to the terms of * the GNU Public License, incorporated herein by reference. @@ -105,7 +105,7 @@ struct CauseValue { {0x1b,"Destination out of order"}, {0x1c,"Invalid number format (address incomplete)"}, {0x1d,"Facility rejected"}, - {0x1e,"Response to Status enuiry"}, + {0x1e,"Response to Status enquiry"}, {0x1f,"Normal, unspecified"}, {0x22,"No circuit/channel available"}, {0x26,"Network out of order"}, @@ -121,7 +121,7 @@ struct CauseValue { {0x32,"Requested facility not subscribed"}, {0x35,"Outgoing calls barred within CUG"}, {0x37,"Incoming calls barred within CUG"}, - {0x39,"Bearer capability not auhorized"}, + {0x39,"Bearer capability not authorized"}, {0x3a,"Bearer capability not presently available"}, {0x3e,"Inconsistency in designated outgoing access information and subscriber class"}, {0x3f,"Service or option not available, unspecified"}, @@ -166,10 +166,10 @@ static struct isdn_event_desc { {EV_USR_RELEASE_REQ, "CC->L3: Release Request"}, {EV_NET_SETUP, "NET->TE: setup "}, - {EV_NET_CALL_PROC, "NET->TE: call proceding"}, - {EV_NET_SETUP_ACK, "NET->TE: setup acknowlegde (more info needed)"}, + {EV_NET_CALL_PROC, "NET->TE: call proceeding"}, + {EV_NET_SETUP_ACK, "NET->TE: setup acknowledge (more info needed)"}, {EV_NET_CONN, "NET->TE: connect"}, - {EV_NET_CONN_ACK, "NET->TE: connect aknowlegde"}, + {EV_NET_CONN_ACK, "NET->TE: connect acknowledge"}, {EV_NET_DISC, "NET->TE: disconnect indication"}, {EV_NET_RELEASE, "NET->TE: release"}, {EV_NET_RELEASE_COMP, "NET->TE: release complete"}, @@ -217,7 +217,7 @@ static struct fsm_entry fsm_table[] = { {ST_CALL_PROC, ST_NULL, EV_NET_DISC, cb_disc_1}, {ST_CALL_PROC, ST_DISC_REQ, EV_USR_RELEASE_REQ, cb_disc_2}, - /* Incomming */ + /* Incoming */ {ST_NULL, ST_CALL_PRES, EV_NET_SETUP, NULL}, {ST_CALL_PRES, ST_INCM_PROC, EV_USR_PROCED_REQ, cb_in_1}, @@ -270,7 +270,7 @@ static void pcbit_fsm_timer(unsigned long data) dev = chan2dev(chan); if (dev == NULL) { - printk(KERN_WARNING "pcbit: timer for unkown device\n"); + printk(KERN_WARNING "pcbit: timer for unknown device\n"); return; } diff --git a/drivers/isdn/pcbit/edss1.h b/drivers/isdn/pcbit/edss1.h index 02fd9f119f73..1bf554dd5c4f 100644 --- a/drivers/isdn/pcbit/edss1.h +++ b/drivers/isdn/pcbit/edss1.h @@ -1,7 +1,7 @@ /* * Copyright (C) 1996 Universidade de Lisboa * - * Writen by Pedro Roque Marques (roque@di.fc.ul.pt) + * Written by Pedro Roque Marques (roque@di.fc.ul.pt) * * This software may be used and distributed according to the terms of * the GNU Public License, incorporated herein by reference. @@ -19,11 +19,11 @@ #define ST_NULL 0 #define ST_CALL_INIT 1 /* Call initiated */ #define ST_OVER_SEND 2 /* Overlap sending - Requests More Info 4 call */ -#define ST_CALL_PROC 3 /* Call Procceding */ +#define ST_CALL_PROC 3 /* Call Proceeding */ #define ST_CALL_DELV 4 #define ST_CALL_PRES 6 /* Call Present - Received CONN.IND */ #define ST_CALL_RECV 7 /* Alerting sent */ -#define ST_CONN_REQ 8 /* Answered - wainting 4 CONN.CONF */ +#define ST_CONN_REQ 8 /* Answered - waiting 4 CONN.CONF */ #define ST_INCM_PROC 9 #define ST_ACTIVE 10 #define ST_DISC_REQ 11 diff --git a/drivers/isdn/pcbit/layer2.c b/drivers/isdn/pcbit/layer2.c index 802e97310237..275ddd5b8d1e 100644 --- a/drivers/isdn/pcbit/layer2.c +++ b/drivers/isdn/pcbit/layer2.c @@ -1,7 +1,7 @@ /* * Copyright (C) 1996 Universidade de Lisboa * - * Writen by Pedro Roque Marques (roque@di.fc.ul.pt) + * Written by Pedro Roque Marques (roque@di.fc.ul.pt) * * This software may be used and distributed according to the terms of * the GNU Public License, incorporated herein by reference. @@ -288,7 +288,7 @@ static void pcbit_transmit(struct pcbit_dev * dev) frame->copied += cp_len; } - /* bookeeping */ + /* bookkeeping */ dev->free -= flen; pcbit_tx_update(dev, flen); @@ -461,18 +461,18 @@ static void pcbit_receive(struct pcbit_dev * dev) return; } - /* miminum frame read */ + /* minimum frame read */ frame->skb = dev_alloc_skb(frame->hdr_len + frame->dt_len + ((frame->hdr_len + 15) & ~15)); if (!frame->skb) { - printk(KERN_DEBUG "pcbit_receive: out of memmory\n"); + printk(KERN_DEBUG "pcbit_receive: out of memory\n"); kfree(frame); return; } - /* 16 byte aligment for IP */ + /* 16 byte alignment for IP */ if (frame->dt_len) skb_reserve(frame->skb, (frame->hdr_len + 15) & ~15); @@ -485,7 +485,7 @@ static void pcbit_receive(struct pcbit_dev * dev) if (!(frame = dev->read_frame)) { printk("Type 1 frame and no frame queued\n"); #if 1 - /* usualy after an error: toss frame */ + /* usually after an error: toss frame */ dev->readptr += tt; if (dev->readptr > dev->sh_mem + BANK2 + BANKLEN) dev->readptr -= BANKLEN; @@ -533,7 +533,7 @@ static void pcbit_receive(struct pcbit_dev * dev) /* * The board sends 0 sized frames * They are TDATA_CONFs that get messed up somehow - * gotta send a fake acknowledment to the upper layer somehow + * gotta send a fake acknowledgment to the upper layer somehow */ static __inline__ void pcbit_fake_conf(struct pcbit_dev *dev, struct pcbit_chan * chan) diff --git a/drivers/isdn/pcbit/layer2.h b/drivers/isdn/pcbit/layer2.h index 48d7bf6d269b..df449551a625 100644 --- a/drivers/isdn/pcbit/layer2.h +++ b/drivers/isdn/pcbit/layer2.h @@ -1,7 +1,7 @@ /* * Copyright (C) 1996 Universidade de Lisboa * - * Writen by Pedro Roque Marques (roque@di.fc.ul.pt) + * Written by Pedro Roque Marques (roque@di.fc.ul.pt) * * This software may be used and distributed according to the terms of * the GNU Public License, incorporated herein by reference. diff --git a/drivers/isdn/pcbit/module.c b/drivers/isdn/pcbit/module.c index 5320c7ecf045..001ba93c7856 100644 --- a/drivers/isdn/pcbit/module.c +++ b/drivers/isdn/pcbit/module.c @@ -1,7 +1,7 @@ /* * Copyright (C) 1996 Universidade de Lisboa * - * Writen by Pedro Roque Marques (roque@di.fc.ul.pt) + * Written by Pedro Roque Marques (roque@di.fc.ul.pt) * * This software may be used and distributed according to the terms of * the GNU Public License, incorporated herein by reference. diff --git a/drivers/isdn/pcbit/pcbit.h b/drivers/isdn/pcbit/pcbit.h index 731e436fcec4..89a608904d7d 100644 --- a/drivers/isdn/pcbit/pcbit.h +++ b/drivers/isdn/pcbit/pcbit.h @@ -1,7 +1,7 @@ /* * Copyright (C) 1996 Universidade de Lisboa * - * Writen by Pedro Roque Marques (roque@di.fc.ul.pt) + * Written by Pedro Roque Marques (roque@di.fc.ul.pt) * * This software may be used and distributed according to the terms of * the GNU Public License, incorporated herein by reference. @@ -24,7 +24,7 @@ struct pcbit_chan { unsigned short id; unsigned short callref; /* Call Reference */ - unsigned char proto; /* layer2protol */ + unsigned char proto; /* layer2protocol */ unsigned char queued; /* unacked data messages */ unsigned char layer2link; /* used in TData */ unsigned char snum; /* used in TData */ diff --git a/drivers/isdn/teles/isdnl3.c b/drivers/isdn/teles/isdnl3.c index 143bee7c74e3..b4088d14b60c 100644 --- a/drivers/isdn/teles/isdnl3.c +++ b/drivers/isdn/teles/isdnl3.c @@ -293,7 +293,7 @@ l3s12(struct PStack *st, byte pr, void *arg) if (bcfound) { if (st->pa->info != 7) { - printk(KERN_WARNING "non-dgital call: %s -> %s\n", + printk(KERN_WARNING "non-digital call: %s -> %s\n", st->pa->calling, st->pa->called); } diff --git a/drivers/net/depca.c b/drivers/net/depca.c index b5b4384f5884..bf52aa9cbd8c 100644 --- a/drivers/net/depca.c +++ b/drivers/net/depca.c @@ -200,11 +200,12 @@ Both above from a suggestion by . Add new multicasting code. + 0.421 22-Apr-96 Fix alloc_device() bug ========================================================================= */ -static const char *version = "depca.c:v0.42 95/12/27 davies@wanton.lkg.dec.com\n"; +static const char *version = "depca.c:v0.421 96/4/22 davies@wanton.lkg.dec.com\n"; #include @@ -1336,7 +1337,7 @@ static struct device *alloc_device(struct device *dev, u_long iobase) ** and initialize it (name, I/O address, next device (NULL) and ** initialisation probe routine). */ - dev->name = (char *)(dev + sizeof(struct device)); + dev->name = (char *)(dev + 1); if (num_eth > 9999) { sprintf(dev->name,"eth????"); /* New device name */ } else { @@ -1375,7 +1376,7 @@ static struct device *alloc_device(struct device *dev, u_long iobase) ** and initialize it (name, I/O address, next device (NULL) and ** initialisation probe routine). */ - tmp->name = (char *)(tmp + sizeof(struct device)); + tmp->name = (char *)(tmp + 1); if (num_eth > 9999) { sprintf(tmp->name,"eth????"); /* New device name */ } else { diff --git a/drivers/net/ewrk3.c b/drivers/net/ewrk3.c index c4a6fe9fe161..ec76ea55f8f3 100644 --- a/drivers/net/ewrk3.c +++ b/drivers/net/ewrk3.c @@ -132,11 +132,12 @@ Add new multicasting code. 0.41 20-Jan-96 Fix IRQ set up problem reported by . + 0.42 22-Apr-96 Fix alloc_device() bug ========================================================================= */ -static const char *version = "ewrk3.c:v0.41 96/1/20 davies@wanton.lkg.dec.com\n"; +static const char *version = "ewrk3.c:v0.42 96/4/22 davies@wanton.lkg.dec.com\n"; #include @@ -1415,7 +1416,7 @@ static struct device *alloc_device(struct device *dev, u_long iobase) ** and initialize it (name, I/O address, next device (NULL) and ** initialisation probe routine). */ - dev->name = (char *)(dev + sizeof(struct device)); + dev->name = (char *)(dev + 1); if (num_eth > 9999) { sprintf(dev->name,"eth????"); /* New device name */ } else { @@ -1454,7 +1455,7 @@ static struct device *alloc_device(struct device *dev, u_long iobase) ** and initialize it (name, I/O address, next device (NULL) and ** initialisation probe routine). */ - tmp->name = (char *)(tmp + sizeof(struct device)); + tmp->name = (char *)(tmp + 1); if (num_eth > 9999) { sprintf(tmp->name,"eth????"); /* New device name */ } else { diff --git a/drivers/net/ppp.c b/drivers/net/ppp.c index 11f0f60dccb4..08625d50945f 100644 --- a/drivers/net/ppp.c +++ b/drivers/net/ppp.c @@ -2613,7 +2613,7 @@ ppp_tty_select (struct tty_struct *tty, struct inode *inode, */ case SEL_EX: /* Is this a pty link and the remote disconnected? */ - if (tty->flags & (1 << TTY_SLAVE_CLOSED)) + if (tty->flags & (1 << TTY_OTHER_CLOSED)) break; /* Is this a local link and the modem disconnected? */ diff --git a/drivers/sbus/dvma.c b/drivers/sbus/dvma.c index 1b5939ab14ff..f6bd027a0d6f 100644 --- a/drivers/sbus/dvma.c +++ b/drivers/sbus/dvma.c @@ -78,7 +78,7 @@ dvma_init(struct linux_sbus *sbus, unsigned long memory_start) dma->SBus_dev->reg_addrs[0].which_io, 0x0); dma->node = dma->SBus_dev->prom_node; - dma->running=0; /* No tranfers going on as of yet */ + dma->running=0; /* No transfers going on as of yet */ dma->allocated=0; /* No one has allocated us yet */ switch((dma->regs->cond_reg)&DMA_DEVICE_ID) { case DMA_VERS0: diff --git a/drivers/scsi/esp.h b/drivers/scsi/esp.h index 3d09b2e54b37..91171bba95b5 100644 --- a/drivers/scsi/esp.h +++ b/drivers/scsi/esp.h @@ -246,7 +246,7 @@ struct Sparc_ESP { /* The status register can be masked with ESP_STAT_PMASK and compared * with the following values to determine the current phase the ESP - * (at least thinks it) is in. For our pusposes we also add our own + * (at least thinks it) is in. For our purposes we also add our own * software 'done' bit for our phase management engine. */ #define ESP_DOP (0) /* Data Out */ diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c index 46e43da3b887..72957c487c7e 100644 --- a/drivers/scsi/scsi.c +++ b/drivers/scsi/scsi.c @@ -23,6 +23,10 @@ * Added request_module("scsi_hostadapter") for kerneld: * (Put an "alias scsi_hostadapter your_hostadapter" in /etc/conf.modules) * Bjorn Ekwall + * + * Major improvements to the timeout, abort, and reset processing, + * as well as performance modifications for large queue depths by + * Leonard N. Zubkoff */ /* @@ -2122,12 +2126,12 @@ int scsi_reset (Scsi_Cmnd * SCpnt, unsigned int reset_flags) */ if( temp & SCSI_RESET_BUS_RESET ) { - SCpnt1 = host->host_queue; - while(SCpnt1) { - if( SCpnt->request.rq_status != RQ_INACTIVE - && SCpnt1 != SCpnt) - scsi_request_sense (SCpnt); - SCpnt1 = SCpnt1->next; + SCpnt1 = host->host_queue; + while(SCpnt1) { + if (SCpnt1->request.rq_status != RQ_INACTIVE + && SCpnt1 != SCpnt) + scsi_request_sense (SCpnt1); + SCpnt1 = SCpnt1->next; } } return 0; diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c index e3bb950a3e0e..e6e51c610405 100644 --- a/drivers/scsi/st.c +++ b/drivers/scsi/st.c @@ -11,7 +11,7 @@ Copyright 1992 - 1996 Kai Makisara email Kai.Makisara@metla.fi - Last modified: Sun Apr 21 22:03:50 1996 by root@kai.makisara.fi + Last modified: Wed Apr 24 09:53:23 1996 by root@kai.makisara.fi Some small formal changes - aeb, 950809 */ @@ -1230,9 +1230,28 @@ st_read(struct inode * inode, struct file * filp, char * buf, int count) (STp->buffer)->buffer_bytes = bytes - transfer; } else { - printk(KERN_NOTICE "st%d: Incorrect block size.\n", dev); SCpnt->request.rq_status = RQ_INACTIVE; /* Mark as not busy */ - return (-EIO); + if (transfer == blks) { /* We did not get anything, signal error */ + printk(KERN_NOTICE "st%d: Incorrect block size.\n", dev); + if (STp->drv_block >= 0) + STp->drv_block += blks - transfer + 1; + st_int_ioctl(inode, filp, MTBSR, 1); + return (-EIO); + } + /* We have some data, deliver it */ + (STp->buffer)->buffer_bytes = (blks - transfer) * STp->block_size; +#if DEBUG + if (debugging) + printk(ST_DEB_MSG "st%d: ILI but enough data received %d %d.\n", + dev, count - total, (STp->buffer)->buffer_bytes); +#endif + if (count - total > (STp->buffer)->buffer_bytes) + count = total + (STp->buffer)->buffer_bytes; + if (STp->drv_block >= 0) + STp->drv_block += 1; + if (st_int_ioctl(inode, filp, MTBSR, 1)) + return (-EIO); + SCpnt = NULL; } } else if (SCpnt->sense_buffer[2] & 0x40) { diff --git a/drivers/sound/ad1848.c b/drivers/sound/ad1848.c index 307f7eb00c07..9c8478a1d59b 100644 --- a/drivers/sound/ad1848.c +++ b/drivers/sound/ad1848.c @@ -390,7 +390,7 @@ ad1848_mixer_set (ad1848_info * devc, int dev, int value) if (mix_devices[dev][RIGHT_CHN].nbits == 0) /* Mono control */ right = left; - retvol = left | (left << 8); + retvol = left | (right << 8); /* Scale volumes */ left = mix_cvt[left]; diff --git a/fs/buffer.c b/fs/buffer.c index ad2dc2dd4cbe..241698709aab 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -721,17 +721,11 @@ repeat0: /* Too bad, that was not enough. Try a little harder to grow some. */ - if (nr_free_pages > min_free_pages + 5) { - if (grow_buffers(GFP_BUFFER, size)) { - needed -= PAGE_SIZE; - goto repeat0; - }; + if (grow_buffers(GFP_ATOMIC, size)) { + needed -= PAGE_SIZE; + goto repeat0; } - - /* and repeat until we find something good */ - if (!grow_buffers(GFP_ATOMIC, size)) - wakeup_bdflush(1); - needed -= PAGE_SIZE; + wakeup_bdflush(1); goto repeat0; } diff --git a/fs/ext2/super.c b/fs/ext2/super.c index da2db6619509..bb755710d6e9 100644 --- a/fs/ext2/super.c +++ b/fs/ext2/super.c @@ -651,7 +651,7 @@ int ext2_remount (struct super_block * sb, int * flags, char * data) /* * Allow the "check" option to be passed as a remount option. */ - set_opt (new_mount_opt, CHECK_NORMAL); + new_mount_opt = EXT2_MOUNT_CHECK_NORMAL; if (!parse_options (data, &tmp, &resuid, &resgid, &new_mount_opt)) return -EINVAL; diff --git a/fs/locks.c b/fs/locks.c index 57e53dc6d2f9..fd5aa6a2bf49 100644 --- a/fs/locks.c +++ b/fs/locks.c @@ -68,6 +68,9 @@ * see if system call should be rejected. Ref. HP-UX/SunOS/Solaris Reference * Manual, Section 2. * Andy Walker (andy@lysaker.kvaerner.no), April 09, 1996. + * + * Tidied up block list handling. + * Andy Walker (andy@lysaker.kvaerner.no), April 24, 1996. */ #include @@ -105,10 +108,10 @@ static void locks_delete_lock(struct file_lock **fl, unsigned int wait); static struct file_lock *file_lock_table = NULL; /* Free lock not inserted in any queue */ -static inline void locks_free_lock(struct file_lock **fl) +static inline void locks_free_lock(struct file_lock *fl) { - kfree(*fl); - *fl = NULL; /* Just in case */ + kfree(fl); + return; } /* Add lock fl to the blocked list pointed to by block. @@ -125,34 +128,33 @@ static inline void locks_free_lock(struct file_lock **fl) * so they are inlined now. -- Dmitry Gorodchanin 02/09/96. */ -static inline void locks_insert_block(struct file_lock **block, +static inline void locks_insert_block(struct file_lock *bfl, struct file_lock *fl) { - struct file_lock *bfl; - - while ((bfl = *block) != NULL) { - block = &bfl->fl_block; + while (bfl->fl_block != NULL) { + bfl = bfl->fl_block; } - *block = fl; + bfl->fl_block = fl; fl->fl_block = NULL; return; } -static inline void locks_delete_block(struct file_lock **block, +static inline void locks_delete_block(struct file_lock *bfl, struct file_lock *fl) { - struct file_lock *bfl; + struct file_lock *tfl; - while ((bfl = *block) != NULL) { - if (bfl == fl) { - *block = fl->fl_block; + while ((tfl = bfl->fl_block) != NULL) { + if (tfl == fl) { + bfl->fl_block = fl->fl_block; fl->fl_block = NULL; return; } - block = &bfl->fl_block; + bfl = tfl; } + return; } /* flock() system call entry point. Apply a FLOCK style lock to @@ -271,6 +273,9 @@ int fcntl_setlk(unsigned int fd, unsigned int cmd, struct flock *l) break; case F_SHLCK : case F_EXLCK : + printk(KERN_WARNING + "fcntl_setlk() called by process %d with broken flock() emulation\n", + current->pid); if (!(filp->f_mode & 3)) return (-EBADF); break; @@ -612,10 +617,10 @@ static int flock_lock_file(struct file *filp, struct file_lock *caller, * instead of locks_delete_lock() * Dmitry Gorodchanin 09/02/96. */ - locks_free_lock(&new_fl); + locks_free_lock(new_fl); return (-ERESTARTSYS); } - locks_insert_block(&fl->fl_block, new_fl); + locks_insert_block(fl, new_fl); interruptible_sleep_on(&new_fl->fl_wait); wake_up(&new_fl->fl_wait); if (current->signal & ~current->blocked) { @@ -626,14 +631,14 @@ static int flock_lock_file(struct file *filp, struct file_lock *caller, * Dmitry Gorodchanin 09/02/96. */ - locks_delete_block(&fl->fl_block, new_fl); - locks_free_lock(&new_fl); + locks_delete_block(fl, new_fl); + locks_free_lock(new_fl); return (-ERESTARTSYS); } goto repeat; } - locks_free_lock(&new_fl); + locks_free_lock(new_fl); return (-EAGAIN); } locks_insert_lock(&filp->f_inode->i_flock, new_fl); @@ -874,9 +879,8 @@ static void locks_delete_lock(struct file_lock **fl_p, unsigned int wait) if (pfl != NULL) pfl->fl_nextlink = nfl; - else { + else file_lock_table = nfl; - } while ((nfl = fl->fl_block) != NULL) { fl->fl_block = nfl->fl_block; diff --git a/fs/pipe.c b/fs/pipe.c index ed8cf97cea55..2b88747f4569 100644 --- a/fs/pipe.c +++ b/fs/pipe.c @@ -422,6 +422,7 @@ int do_pipe(int *fd) if (!(f[j] = get_empty_filp())) break; if (j < 2) { + iput(inode); iput(inode); if (j) f[0]->f_count--; @@ -434,6 +435,7 @@ int do_pipe(int *fd) j++; } if (j<2) { + iput(inode); iput(inode); f[0]->f_count--; f[1]->f_count--; diff --git a/fs/ufs/ufs_super.c b/fs/ufs/ufs_super.c index 9fb6ce70dd49..340336c021bf 100644 --- a/fs/ufs/ufs_super.c +++ b/fs/ufs/ufs_super.c @@ -16,6 +16,8 @@ #include #include +#include + struct super_block * ufs_read_super(struct super_block * sb, void * data, int silent); void ufs_put_super (struct super_block * sb); void ufs_statfs(struct super_block * sb, struct statfs * buf, int bufsize); diff --git a/fs/ufs/ufs_symlink.c b/fs/ufs/ufs_symlink.c index 9b63b198df09..b31a6f8cb96a 100644 --- a/fs/ufs/ufs_symlink.c +++ b/fs/ufs/ufs_symlink.c @@ -13,6 +13,8 @@ #include #include +#include + static int ufs_readlink(struct inode * inode, char * buffer, int buflen) { @@ -39,7 +41,7 @@ ufs_readlink(struct inode * inode, char * buffer, int buflen) if (inode->i_sb->u.ufs_sb.s_flags &(UFS_DEBUG|UFS_DEBUG_LINKS)) { printk("ufs_readlink: bmap got %lu for ino %lu\n", block, inode->i_ino); -} + } bh = bread(inode->i_dev, block, BLOCK_SIZE); if (!bh) { iput (inode); diff --git a/include/asm-alpha/io.h b/include/asm-alpha/io.h index 2bf3166a62b2..c33658ea5b64 100644 --- a/include/asm-alpha/io.h +++ b/include/asm-alpha/io.h @@ -5,6 +5,10 @@ #include +/* We don't use IO slowdowns on the alpha, but.. */ +#define __SLOW_DOWN_IO do { } while (0) +#define SLOW_DOWN_IO do { } while (0) + /* * The hae (hardware address extension) register is used to * access high IO addresses. To avoid doing an external cycle @@ -134,6 +138,7 @@ extern void _writel(unsigned int b, unsigned long addr); #ifndef inl_p # define inl_p inl #endif + #ifndef outb_p # define outb_p outb #endif @@ -144,20 +149,6 @@ extern void _writel(unsigned int b, unsigned long addr); # define outl_p outl #endif -#ifndef inw_p -# define inw_p inw -#endif -#ifndef outw_p -# define outw_p outw -#endif - -#ifndef inl_p -# define inl_p inl -#endif -#ifndef outl_p -# define outl_p outl -#endif - /* * The "address" in IO memory space is not clearly either a integer or a * pointer. We will accept both, thus the casts. diff --git a/include/asm-i386/pgtable.h b/include/asm-i386/pgtable.h index 14119c533ec7..3617029c7b0f 100644 --- a/include/asm-i386/pgtable.h +++ b/include/asm-i386/pgtable.h @@ -40,7 +40,7 @@ */ #define __flush_tlb() \ -__asm__ __volatile__("movl %%cr3,%%eax\n\tmovl %%eax,%%cr3": : :"ax") +do { unsigned long tmpreg; __asm__ __volatile__("movl %%cr3,%0\n\tmovl %0,%%cr3":"=r" (tmpreg) : :"memory"); } while (0) #ifdef CONFIG_M386 #define __flush_tlb_one(addr) flush_tlb() @@ -290,7 +290,7 @@ extern pte_t * __bad_pagetable(void); do { \ (tsk)->tss.cr3 = (unsigned long) (pgdir); \ if ((tsk) == current) \ - __asm__ __volatile__("movl %0,%%cr3": :"a" (pgdir)); \ + __asm__ __volatile__("movl %0,%%cr3": :"r" (pgdir)); \ } while (0) extern inline int pte_none(pte_t pte) { return !pte_val(pte); } diff --git a/include/asm-sparc/asi.h b/include/asm-sparc/asi.h index 63136c29dfac..653776c37bfc 100644 --- a/include/asm-sparc/asi.h +++ b/include/asm-sparc/asi.h @@ -101,7 +101,7 @@ #define ASI_M_IC_FLCLEAR 0x36 #define ASI_M_DC_FLCLEAR 0x37 -#define ASI_M_DCDR 0x39 /* Data Cache Diagnostics Registerl rw, ss */ +#define ASI_M_DCDR 0x39 /* Data Cache Diagnostics Register rw, ss */ #define ASI_M_ACTION 0x4c /* Breakpoint Action Register (GNU/Viking) */ diff --git a/include/asm-sparc/auxio.h b/include/asm-sparc/auxio.h index 4578cd20329c..619f3b225745 100644 --- a/include/asm-sparc/auxio.h +++ b/include/asm-sparc/auxio.h @@ -1,5 +1,5 @@ /* $Id: auxio.h,v 1.10 1996/01/03 03:52:58 davem Exp $ - * auxio.h: Definitons and code for the Auxiliary I/O register. + * auxio.h: Definitions and code for the Auxiliary I/O register. * * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) */ diff --git a/include/asm-sparc/bsderrno.h b/include/asm-sparc/bsderrno.h index d5aa64fe2504..663b61d1a2b9 100644 --- a/include/asm-sparc/bsderrno.h +++ b/include/asm-sparc/bsderrno.h @@ -1,5 +1,5 @@ /* $Id: bsderrno.h,v 1.2 1995/11/25 02:31:17 davem Exp $ - * bsderrno.h: Error numbers for NetBSD binary compatability + * bsderrno.h: Error numbers for NetBSD binary compatibility * * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) */ diff --git a/include/asm-sparc/cache.h b/include/asm-sparc/cache.h index 1326f87fed9f..9ad2ad54264e 100644 --- a/include/asm-sparc/cache.h +++ b/include/asm-sparc/cache.h @@ -14,7 +14,7 @@ * alternate address space. The IDC bit must be off in the ICCR on * HyperSparcs for these accesses to work. The code below does not do * any checking, the caller must do so. These routines are for - * diagnostics only, but coule end up being useful. Use with care. + * diagnostics only, but could end up being useful. Use with care. * Also, you are asking for trouble if you execute these in one of the * three instructions following a %asr/%psr access or modification. */ diff --git a/include/asm-sparc/cypress.h b/include/asm-sparc/cypress.h index a7ac8cace805..0b58c7486086 100644 --- a/include/asm-sparc/cypress.h +++ b/include/asm-sparc/cypress.h @@ -24,7 +24,7 @@ * BM: Boot Mode -- 0 = not in boot mode, 1 = in boot mode * C: Cacheable -- Indicates whether accesses are cacheable while * the MMU is off. 0=no 1=yes - * MR: MemoryReflection -- Indicates whether the bus attacted to the + * MR: MemoryReflection -- Indicates whether the bus attached to the * MBus supports memory reflection. 0=no 1=yes (605 only) * CM: CacheMode -- Indicates whether the cache is operating in write * through or copy-back mode. 0=write-through 1=copy-back diff --git a/include/asm-sparc/dma.h b/include/asm-sparc/dma.h index e10f326e93ea..29bb7c9d3924 100644 --- a/include/asm-sparc/dma.h +++ b/include/asm-sparc/dma.h @@ -96,7 +96,7 @@ extern unsigned long dvma_init(struct linux_sbus *, unsigned long); #define DMA_RST_ENET DMA_RST_SCSI /* Reset the ENET controller */ #define DMA_ST_WRITE 0x00000100 /* write from device to memory */ #define DMA_ENABLE 0x00000200 /* Fire up DMA, handle requests */ -#define DMA_PEND_READ 0x00000400 /* DMA_VERS1/0/PLUS Pendind Read */ +#define DMA_PEND_READ 0x00000400 /* DMA_VERS1/0/PLUS Pending Read */ #define DMA_DSBL_RD_DRN 0x00001000 /* No EC drain on slave reads */ #define DMA_BCNT_ENAB 0x00002000 /* If on, use the byte counter */ #define DMA_TERM_CNTR 0x00004000 /* Terminal counter */ diff --git a/include/asm-sparc/ecc.h b/include/asm-sparc/ecc.h index d804231da3af..1bd3e0bc5935 100644 --- a/include/asm-sparc/ecc.h +++ b/include/asm-sparc/ecc.h @@ -101,7 +101,7 @@ * 31-18 17 16 15-8 7-4 3 2 1 0 * * C2E: A C2 graphics error occurred. 0=no 1=yes (SS10 only) - * MULT: Multiple errors occurres ;-O 0=no 1=prom_panic(yes) + * MULT: Multiple errors occurred ;-O 0=no 1=prom_panic(yes) * SYNDROME: Controller is mentally unstable. * DWORD: * UNC: Uncorrectable error. 0=no 1=yes diff --git a/include/asm-sparc/fbio.h b/include/asm-sparc/fbio.h index 0ab7fbecef4d..b77ed2929730 100644 --- a/include/asm-sparc/fbio.h +++ b/include/asm-sparc/fbio.h @@ -72,7 +72,7 @@ struct fbgattr { int emu_types[FB_ATTR_NEMUTYPES]; /* supported emulations */ }; #define FBIOSATTR _IOW('F', 5, struct fbgattr) /* Unsupported: */ -#define FBIOGATTR _IOR('F', 6, struct fbgattr) /* supporoted */ +#define FBIOGATTR _IOR('F', 6, struct fbgattr) /* supported */ #define FBIOSVIDEO _IOW('F', 7, int) #define FBIOGVIDEO _IOR('F', 8, int) diff --git a/include/asm-sparc/floppy.h b/include/asm-sparc/floppy.h index 81c3354b5239..c807f7ffb9ab 100644 --- a/include/asm-sparc/floppy.h +++ b/include/asm-sparc/floppy.h @@ -93,7 +93,7 @@ static int FDC2=-1; #define N_FDC 1 #define N_DRIVE 8 -/* No 64k boundry crossing problems on the Sparc. */ +/* No 64k boundary crossing problems on the Sparc. */ #define CROSS_64KB(a,s) (0) /* Routines unique to each controller type on a Sun. */ diff --git a/include/asm-sparc/head.h b/include/asm-sparc/head.h index ba02a00acdf1..19e6113b3504 100644 --- a/include/asm-sparc/head.h +++ b/include/asm-sparc/head.h @@ -8,7 +8,7 @@ #define SRMMU_L1_KBASE_OFFSET ((KERNBASE>>24)<<2) /* Used in boot remapping. */ #define INTS_ENAB 0x01 /* entry.S uses this. */ -#define NCPUS 4 /* Architectual limit of sun4m. */ +#define NCPUS 4 /* Architectural limit of sun4m. */ #define SUN4_PROM_VECTOR 0xFFE81000 /* To safely die on a SUN4 */ #define SUN4_PRINTF 0x84 /* Offset into SUN4_PROM_VECTOR */ @@ -82,7 +82,7 @@ /* NMI's (Non Maskable Interrupts) are special, you can't keep them * from coming in, and basically if you get one, the shows over. ;( - * On the sun4c they are usually asyncronous memory errors, on the + * On the sun4c they are usually asynchronous memory errors, on the * the sun4m they could be either due to mem errors or a software * initiated interrupt from the prom/kern on an SMP box saying "I * command you to do CPU tricks, read your mailbox for more info." diff --git a/include/asm-sparc/irq.h b/include/asm-sparc/irq.h index 163080153c5e..0344433856bf 100644 --- a/include/asm-sparc/irq.h +++ b/include/asm-sparc/irq.h @@ -15,7 +15,7 @@ /* Dave Redman (djhr@tadpole.co.uk) * changed these to function pointers.. it saves cycles and will allow - * the irq dependancies to be split into different files at a later date + * the irq dependencies to be split into different files at a later date * sun4c_irq.c, sun4m_irq.c etc so we could reduce the kernel size. */ extern void (*disable_irq)(unsigned int); diff --git a/include/asm-sparc/mbus.h b/include/asm-sparc/mbus.h index 4d9a59fa941d..52d34944e402 100644 --- a/include/asm-sparc/mbus.h +++ b/include/asm-sparc/mbus.h @@ -45,7 +45,7 @@ extern unsigned int viking_rev, swift_rev, cypress_rev; extern unsigned int hwbug_bitmask; /* First the module type values. To find out which you have, just load - * the mmu control register from ASI_M_MMUREG alternate adress space and + * the mmu control register from ASI_M_MMUREG alternate address space and * shift the value right 28 bits. */ /* IMPL field means the company which produced the chip. */ diff --git a/include/asm-sparc/memreg.h b/include/asm-sparc/memreg.h index 71442dd24bd4..6f9adf6ba2d0 100644 --- a/include/asm-sparc/memreg.h +++ b/include/asm-sparc/memreg.h @@ -16,7 +16,7 @@ #define SUN4C_SYNC_SIZE 0x0002 /* bad access size? whuz this? */ #define SUN4C_SYNC_PARITY 0x0008 /* bad ram chips caused a parity error */ #define SUN4C_SYNC_SBUS 0x0010 /* the SBUS had some problems... */ -#define SUN4C_SYNC_NOMEM 0x0020 /* translation to non-existant ram */ +#define SUN4C_SYNC_NOMEM 0x0020 /* translation to non-existent ram */ #define SUN4C_SYNC_PROT 0x0040 /* access violated pte protections */ #define SUN4C_SYNC_NPRESENT 0x0080 /* pte said that page was not present */ #define SUN4C_SYNC_BADWRITE 0x8000 /* while writing something went bogus */ diff --git a/include/asm-sparc/mman.h b/include/asm-sparc/mman.h index b4968bdaf079..2198ef59af24 100644 --- a/include/asm-sparc/mman.h +++ b/include/asm-sparc/mman.h @@ -18,7 +18,7 @@ #define MAP_NORESERVE 0x40 /* don't reserve swap pages */ #define MAP_INHERIT 0x80 /* SunOS doesn't do this, but... */ #define MAP_LOCKED 0x100 /* lock the mapping */ -#define _MAP_NEW 0x80000000 /* Binary compatability is fun... */ +#define _MAP_NEW 0x80000000 /* Binary compatibility is fun... */ #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ diff --git a/include/asm-sparc/mostek.h b/include/asm-sparc/mostek.h index 27d792a9df50..e90aa01132a7 100644 --- a/include/asm-sparc/mostek.h +++ b/include/asm-sparc/mostek.h @@ -29,7 +29,7 @@ extern struct mostek48t02 *mstk48t02_regs; /* Control register values. */ #define MSTK_CREG_WRITE 0x80 /* Must set this before placing values. */ #define MSTK_CREG_READ 0x40 /* Stop the clock, I want to fetch values. */ -#define MSTK_CREG_SIGN 0x20 /* Grrr... whats this??? */ +#define MSTK_CREG_SIGN 0x20 /* Grrr... what's this??? */ #define MSTK_YR_ZERO 1968 /* If year reg has zero, it is 1968 */ #define MSTK_CVT_YEAR(yr) ((yr) + MSTK_YR_ZERO) diff --git a/include/asm-sparc/mpmbox.h b/include/asm-sparc/mpmbox.h index 9bece9fb40d3..a8fa3240f335 100644 --- a/include/asm-sparc/mpmbox.h +++ b/include/asm-sparc/mpmbox.h @@ -38,7 +38,7 @@ */ #define MAILBOX_BPT_SPIN 0xfd -/* Oh geese, some other nitwit got a damn watchdog reset. The partys +/* Oh geese, some other nitwit got a damn watchdog reset. The party's * over so go call prom_stopcpu(). */ #define MAILBOX_WDOG_STOP 0xfe diff --git a/include/asm-sparc/mxcc.h b/include/asm-sparc/mxcc.h index cdbd1cb4591e..63c31b6f2b28 100644 --- a/include/asm-sparc/mxcc.h +++ b/include/asm-sparc/mxcc.h @@ -51,7 +51,7 @@ * 31 30 29 28 27 26 25 24-15 14-7 6 5-3 2-0 * * ME: Multiple Errors have occurred - * CE: Cache consistancy Error + * CE: Cache consistency Error * PEW: Parity Error during a Write operation * PEE: Parity Error involving the External cache * ASE: ASynchronous Error diff --git a/include/asm-sparc/oplib.h b/include/asm-sparc/oplib.h index 5bac9311e4b0..51b2dc83d191 100644 --- a/include/asm-sparc/oplib.h +++ b/include/asm-sparc/oplib.h @@ -15,7 +15,7 @@ extern struct linux_romvec *romvec; /* Enumeration to describe the prom major version we have detected. */ enum prom_major_version { - PROM_V0, /* Origional sun4c V0 prom */ + PROM_V0, /* Original sun4c V0 prom */ PROM_V2, /* sun4c and early sun4m V2 prom */ PROM_V3, /* sun4m and later, up to sun4d/sun4e machines V3 */ PROM_P1275, /* IEEE compliant ISA based Sun PROM, only sun4u */ @@ -84,7 +84,7 @@ extern void prom_seek(int device_handle, unsigned int seek_hival, * entries. One for the total amount of physical ram on the machine, one * for the amount of physical ram available, and one describing the virtual * areas which are allocated by the prom. So, in a sense the physical - * available is a calculation of the total physical minus the physcial mapped + * available is a calculation of the total physical minus the physical mapped * by the prom with virtual mappings. * * These lists are returned pre-sorted, this should make your life easier diff --git a/include/asm-sparc/pconf.h b/include/asm-sparc/pconf.h index bbbda73b2652..84cc8dd242da 100644 --- a/include/asm-sparc/pconf.h +++ b/include/asm-sparc/pconf.h @@ -1,6 +1,6 @@ /* $Id: pconf.h,v 1.2 1995/11/25 02:32:20 davem Exp $ * pconf.h: pathconf() and fpathconf() defines for SunOS - * system call compatability. + * system call compatibility. * * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) */ @@ -13,7 +13,7 @@ #define _PCONF_LINK 1 /* Max number of links to an object */ #define _PCONF_CANON 2 /* TTY input buffer line size */ -#define _PCONF_INPUT 3 /* Biggest packet a tty can inbibe at once */ +#define _PCONF_INPUT 3 /* Biggest packet a tty can imbibe at once */ #define _PCONF_NAME 4 /* Filename length max */ #define _PCONF_PATH 5 /* Max size of a pathname */ #define _PCONF_PIPE 6 /* Buffer size for a pipe */ diff --git a/include/asm-sparc/pgtsrmmu.h b/include/asm-sparc/pgtsrmmu.h index 71c080cb481c..4ec29493e3c5 100644 --- a/include/asm-sparc/pgtsrmmu.h +++ b/include/asm-sparc/pgtsrmmu.h @@ -165,7 +165,7 @@ extern inline unsigned int srmmu_get_faddr(void) return retval; } -/* This is guarenteed on all SRMMU's. */ +/* This is guaranteed on all SRMMU's. */ extern inline void srmmu_flush_whole_tlb(void) { __asm__ __volatile__("sta %%g0, [%0] %1\n\t": : diff --git a/include/asm-sparc/signal.h b/include/asm-sparc/signal.h index b666e865d590..ee8295d3b875 100644 --- a/include/asm-sparc/signal.h +++ b/include/asm-sparc/signal.h @@ -123,7 +123,7 @@ struct sigstack { * * DJHR * SA_STATIC_ALLOC is used for the SPARC system to indicate that this - * interupt handler's irq structure should be statically allocated + * interrupt handler's irq structure should be statically allocated * by the request_irq routine. * The alternative is that arch/sparc/kernel/irq.c has carnal knowledge * of interrupt usage and that sucks. Also without a flag like this diff --git a/include/asm-sparc/smp.h b/include/asm-sparc/smp.h index 98ef2f039a98..1c5ab02a864b 100644 --- a/include/asm-sparc/smp.h +++ b/include/asm-sparc/smp.h @@ -143,7 +143,7 @@ extern inline volatile int read_smp_counter(volatile int *ctr) #define MSG_CAPTURE 0x0004 /* Park a processor. */ #define MSG_CROSS_CALL 0x0005 /* run func on cpus */ -/* Imperical PROM processor mailbox constants. If the per-cpu mailbox +/* Empirical PROM processor mailbox constants. If the per-cpu mailbox * contains something other than one of these then the ipi is from * Linux's active_kernel_processor. This facility exists so that * the boot monitor can capture all the other cpus when one catches diff --git a/include/asm-sparc/solerrno.h b/include/asm-sparc/solerrno.h index fe2a83f65345..6a388efc11fa 100644 --- a/include/asm-sparc/solerrno.h +++ b/include/asm-sparc/solerrno.h @@ -1,5 +1,5 @@ /* $Id: solerrno.h,v 1.4 1996/03/23 02:40:09 davem Exp $ - * solerrno.h: Solaris error return codes for compatability. + * solerrno.h: Solaris error return codes for compatibility. * * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) */ @@ -41,7 +41,7 @@ #define SOL_EPIPE 32 /* Call a plumber */ #define SOL_EDOM 33 /* Argument was out of fct domain */ #define SOL_ERANGE 34 /* Could not represent math result */ -#define SOL_ENOMSG 35 /* Message of req type doesnt exist */ +#define SOL_ENOMSG 35 /* Message of req type doesn't exist */ #define SOL_EIDRM 36 /* Identifier has been removed */ #define SOL_ECHRNG 37 /* Req channel number out of range */ #define SOL_EL2NSYNC 38 /* Could not sync at run level 2 */ diff --git a/include/asm-sparc/traps.h b/include/asm-sparc/traps.h index 5093779fb109..8bdc39f3c17c 100644 --- a/include/asm-sparc/traps.h +++ b/include/asm-sparc/traps.h @@ -67,7 +67,7 @@ extern __inline__ unsigned long get_tbr(void) /* First, hardware traps. */ #define SP_TRAP_TFLT 0x1 /* Text fault */ #define SP_TRAP_II 0x2 /* Illegal Instruction */ -#define SP_TRAP_PI 0x3 /* Priviledged Instruction */ +#define SP_TRAP_PI 0x3 /* Privileged Instruction */ #define SP_TRAP_FPD 0x4 /* Floating Point Disabled */ #define SP_TRAP_WOVF 0x5 /* Window Overflow */ #define SP_TRAP_WUNF 0x6 /* Window Underflow */ diff --git a/include/asm-sparc/unistd.h b/include/asm-sparc/unistd.h index b2692b731d34..2de3db6cbdcc 100644 --- a/include/asm-sparc/unistd.h +++ b/include/asm-sparc/unistd.h @@ -11,7 +11,7 @@ * * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) * - * SunOS compatability based upon preliminary work which is: + * SunOS compatibility based upon preliminary work which is: * * Copyright (C) 1995 Adrian M. Rodriguez (adrian@remus.rutgers.edu) */ diff --git a/include/asm-sparc/vac-ops.h b/include/asm-sparc/vac-ops.h index 4971177e5de5..800ce142cf70 100644 --- a/include/asm-sparc/vac-ops.h +++ b/include/asm-sparc/vac-ops.h @@ -67,7 +67,7 @@ /* The indexing of cache lines creates a problem. Because the line * field of a virtual address extends past the page offset within * the virtual address it is possible to have what are called - * 'bad aliases' which will create inconsistancies. So we must make + * 'bad aliases' which will create inconsistencies. So we must make * sure that within a context that if a physical page is mapped * more than once, that 'extra' line bits are the same. If this is * not the case, and thus is a 'bad alias' we must turn off the diff --git a/include/asm-sparc/vaddrs.h b/include/asm-sparc/vaddrs.h index 459f12c5ca09..c7deddc72a79 100644 --- a/include/asm-sparc/vaddrs.h +++ b/include/asm-sparc/vaddrs.h @@ -23,7 +23,7 @@ #define DVMA_LEN 0x00040000 /* Size of the DVMA address space */ #define DVMA_END 0xfff40000 -/* IOMMU Mapping area, must be on a 16MB boundry! Note this +/* IOMMU Mapping area, must be on a 16MB boundary! Note this * doesn't count the DVMA areas, the prom lives between the * iommu mapping area (for scsi transfer buffers) and the * dvma upper range (for lance packet ring buffers). diff --git a/include/asm-sparc/viking.h b/include/asm-sparc/viking.h index 4f413142e992..be3bf654df1e 100644 --- a/include/asm-sparc/viking.h +++ b/include/asm-sparc/viking.h @@ -36,7 +36,7 @@ * SP: SnooP Enable -- 0 = bus snooping off, 1 = bus snooping on * * This enables snooping on the GNU/Viking bus. This must be on - * for the hardware cache consistancy mechanisms of the GNU/Viking + * for the hardware cache consistency mechanisms of the GNU/Viking * to work at all. On non-mxcc GNU/Viking modules the split I/D * caches will snoop regardless of whether they are enabled, this * takes care of the case where the I or D or both caches are turned diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index b0c8c4bac2a8..e0f578f9b481 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -49,6 +49,7 @@ extern struct sec_size * blk_sec[MAX_BLKDEV]; extern struct blk_dev_struct blk_dev[MAX_BLKDEV]; extern struct wait_queue * wait_for_request; extern void resetup_one_dev(struct gendisk *dev, int drive); +extern void unplug_device(void * data); /* md needs this function to remap requests */ extern int md_map (int minor, kdev_t *rdev, unsigned long *rsector, unsigned long size); diff --git a/include/linux/fs.h b/include/linux/fs.h index 59c96e969063..a0aaf4ff0945 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -224,6 +224,7 @@ static inline int buffer_protected(struct buffer_head * bh) #include #include #include +#include #include /* @@ -312,6 +313,7 @@ struct inode { struct nfs_inode_info nfs_i; struct xiafs_inode_info xiafs_i; struct sysv_inode_info sysv_i; + struct affs_inode_info affs_i; struct ufs_inode_info ufs_i; struct socket socket_i; void * generic_ip; @@ -402,6 +404,7 @@ extern int fasync_helper(struct inode *, struct file *, int, struct fasync_struc #include #include #include +#include #include struct super_block { @@ -430,6 +433,7 @@ struct super_block { struct nfs_sb_info nfs_sb; struct xiafs_sb_info xiafs_sb; struct sysv_sb_info sysv_sb; + struct affs_sb_info affs_sb; struct ufs_sb_info ufs_sb; void *generic_sbp; } u; diff --git a/include/linux/istallion.h b/include/linux/istallion.h index 6ece7f4eb310..1cf916ad47a4 100644 --- a/include/linux/istallion.h +++ b/include/linux/istallion.h @@ -108,6 +108,7 @@ typedef struct stlibrd { int hostoffset; int slaveoffset; int bitsize; + int enabval; int panels[STL_MAXPANELS]; int panelids[STL_MAXPANELS]; void (*init)(struct stlibrd *brdp); diff --git a/include/linux/net.h b/include/linux/net.h index 68e9158680a0..a338a8efda66 100644 --- a/include/linux/net.h +++ b/include/linux/net.h @@ -22,9 +22,6 @@ #include #include - -#define NSOCKETS 2000 /* Dynamic, this is MAX LIMIT */ -#define NSOCKETS_UNIX 128 /* unix domain static limit */ #define NPROTO 16 /* should be enough for now.. */ diff --git a/include/linux/tty.h b/include/linux/tty.h index 2939322c4548..2d6602982d6d 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h @@ -261,7 +261,7 @@ struct tty_struct { */ #define TTY_THROTTLED 0 #define TTY_IO_ERROR 1 -#define TTY_SLAVE_CLOSED 2 +#define TTY_OTHER_CLOSED 2 #define TTY_EXCLUSIVE 3 #define TTY_DEBUG 4 #define TTY_DO_WRITE_WAKEUP 5 diff --git a/kernel/exit.c b/kernel/exit.c index bc28e367e8d4..f8e6c439dfc8 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -433,18 +433,19 @@ static inline void exit_mm(void) struct mm_struct * mm = current->mm; /* Set us up to use the kernel mm state */ - flush_cache_mm(mm); - flush_tlb_mm(mm); - init_mm.count++; - current->mm = &init_mm; - current->swappable = 0; - SET_PAGE_DIR(current, swapper_pg_dir); - - /* free the old state - not used any more */ - if (!--mm->count) { - exit_mmap(mm); - free_page_tables(mm); - kfree(mm); + if (mm != &init_mm) { + flush_cache_mm(mm); + flush_tlb_mm(mm); + current->mm = &init_mm; + current->swappable = 0; + SET_PAGE_DIR(current, swapper_pg_dir); + + /* free the old state - not used any more */ + if (!--mm->count) { + exit_mmap(mm); + free_page_tables(mm); + kfree(mm); + } } } diff --git a/kernel/sched.c b/kernel/sched.c index 543176afd963..f1059dc15632 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -546,40 +546,20 @@ void add_timer(struct timer_list * timer) int del_timer(struct timer_list * timer) { - unsigned long flags; -#if SLOW_BUT_DEBUGGING_TIMERS - struct timer_list * p; - - p = &timer_head; - save_flags(flags); - cli(); - while ((p = p->next) != &timer_head) { - if (p == timer) { - timer->next->prev = timer->prev; - timer->prev->next = timer->next; + int ret = 0; + if (timer->next) { + unsigned long flags; + struct timer_list * next; + save_flags(flags); + cli(); + if ((next = timer->next) != NULL) { + (next->prev = timer->prev)->next = next; timer->next = timer->prev = NULL; - restore_flags(flags); - return 1; + ret = 1; } + restore_flags(flags); } - if (timer->next || timer->prev) - printk("del_timer() called from %p with timer not initialized\n", - __builtin_return_address(0)); - restore_flags(flags); - return 0; -#else - struct timer_list * next; - int ret = 0; - save_flags(flags); - cli(); - if ((next = timer->next) != NULL) { - (next->prev = timer->prev)->next = next; - timer->next = timer->prev = NULL; - ret = 1; - } - restore_flags(flags); return ret; -#endif } static inline void run_timer_list(void) diff --git a/lib/string.c b/lib/string.c index c08671121be5..27d20153bcaf 100644 --- a/lib/string.c +++ b/lib/string.c @@ -112,6 +112,18 @@ char * strchr(const char * s, int c) } #endif +#ifndef __HAVE_ARCH_STRRCHR +char * strrchr(const char * s, int c) +{ + const char *p = s + strlen(s); + do { + if (*p == (char)c) + return (char *)p; + } while (--p >= s); + return NULL; +} +#endif + #ifndef __HAVE_ARCH_STRLEN size_t strlen(const char * s) { diff --git a/mm/filemap.c b/mm/filemap.c index e103755c619f..c8616b7ba98c 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -686,8 +686,11 @@ new_page: */ read_page: error = inode->i_op->readpage(inode, page); - if (!error) - goto found_page; + if (!error) { + if (!PageError(page)) + goto found_page; + error = -EIO; + } free_page(addr); break; } diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index 4af27193ae9d..1bd4d37bd483 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c @@ -642,9 +642,10 @@ int ip_build_xmit(struct sock *sk, * choice RAW frames within 20 bytes of maximum size(rare) to the long path */ - length += sizeof(struct iphdr); - if (!sk->ip_hdrincl && opt) - length += opt->optlen; + if (!sk->ip_hdrincl) { + length += sizeof(struct iphdr); + if(opt) length += opt->optlen; + } if(length <= dev->mtu && !MULTICAST(daddr) && daddr!=0xFFFFFFFF && daddr!=dev->pa_brdaddr) { @@ -708,7 +709,7 @@ int ip_build_xmit(struct sock *sk, getfrag(frag,saddr,((char *)iph)+iph->ihl*4,0, length-iph->ihl*4); } else - getfrag(frag,saddr,(void *)iph,0,length-20); + getfrag(frag,saddr,(void *)iph,0,length); dev_unlock_list(); #ifdef CONFIG_FIREWALL if(call_out_firewall(PF_INET, skb->dev, iph)< FW_ACCEPT) -- 2.39.5