Commit b94d6187 authored by Linus Torvalds's avatar Linus Torvalds

Import 1.3.35

parent 85eadbf3
This diff is collapsed.
......@@ -50,6 +50,7 @@ SLIP_MAGIC 0x5302 struct slip drivers/net/slip.h
Ioctl Include File Comments
========================================================
0x00 fd.h
0x01 random.h subcodes starting at 0x080000
0x03 hdreg.h
0x06 lp.h
0x12 fs.h
......
VERSION = 1
PATCHLEVEL = 3
SUBLEVEL = 34
SUBLEVEL = 35
ARCH = i386
......@@ -134,6 +134,10 @@ symlinks:
oldconfig: symlinks
$(CONFIG_SHELL) scripts/Configure -d arch/$(ARCH)/config.in
xconfig: symlinks
( cd scripts ; make kconfig.tk)
./scripts/kconfig.tk
config: symlinks
$(CONFIG_SHELL) scripts/Configure arch/$(ARCH)/config.in
......@@ -243,6 +247,7 @@ mrproper: clean
rm -f drivers/scsi/aic7xxx_asm drivers/scsi/aic7xxx_seq.h
rm -f drivers/char/uni_hash.tbl drivers/char/conmakehash
rm -f .version .config* config.in config.old
rm -f scripts/tkparse scripts/kconfig.tk
rm -f include/asm
rm -f .depend `find . -name .depend -print`
rm -f .hdepend
......
......@@ -2,7 +2,9 @@
# For a description of the syntax of this configuration file,
# see the Configure script.
#
mainmenu_name "Kernel configuration of Linux for Alpha machines"
mainmenu_option next_comment
comment 'General setup'
if [ "`uname`" != "Linux" ]; then
......@@ -63,6 +65,7 @@ comment 'Loadable module support'
bool 'Set version information on all symbols for modules' CONFIG_MODVERSIONS n
if [ "$CONFIG_NET" = "y" ]; then
mainmenu_option next_comment
comment 'Networking options'
bool 'TCP/IP networking' CONFIG_INET y
if [ "$CONFIG_INET" = "y" ]; then
......@@ -94,6 +97,7 @@ if [ "$CONFIG_AX25" = "y" ]; then
fi
fi
mainmenu_option next_comment
comment 'SCSI support'
tristate 'SCSI support' CONFIG_SCSI y
......@@ -115,6 +119,7 @@ comment 'Some SCSI devices (e.g. CD jukebox) support multiple LUNs'
bool 'Probe all LUNs on each SCSI device' CONFIG_SCSI_MULTI_LUN n
mainmenu_option next_comment
comment 'SCSI low-level drivers'
dep_tristate 'Adaptec AHA152X support' CONFIG_SCSI_AHA152X n $CONFIG_SCSI
......@@ -144,6 +149,7 @@ fi
if [ "$CONFIG_NET" = "y" ]; then
mainmenu_option next_comment
comment 'Network device support'
bool 'Network device support' CONFIG_NETDEVICES y
......@@ -237,6 +243,7 @@ tristate 'Arcnet support' CONFIG_ARCNET n
fi
fi
mainmenu_option next_comment
comment 'CD-ROM drivers (not for SCSI or IDE/ATAPI drives)'
bool 'Support non-SCSI/IDE/ATAPI drives' CONFIG_CD_NO_IDESCSI n
......@@ -262,6 +269,7 @@ if [ "$CONFIG_CD_NO_IDESCSI" = "y" ]; then
bool 'Experimental Sanyo H94A CDROM support' CONFIG_SJCD n
fi
mainmenu_option next_comment
comment 'Filesystems'
tristate 'Standard (minix) fs support' CONFIG_MINIX_FS y
......@@ -281,6 +289,7 @@ tristate 'OS/2 HPFS filesystem support (read only)' CONFIG_HPFS_FS n
tristate 'System V and Coherent filesystem support' CONFIG_SYSV_FS n
tristate 'SMB filesystem (to mount WfW shares etc..) support' CONFIG_SMB_FS n
mainmenu_option next_comment
comment 'character devices'
bool 'Cyclades async mux support' CONFIG_CYCLADES n
......@@ -314,10 +323,12 @@ if [ "$CONFIG_FTAPE" = "y" ]; then
int ' number of ftape buffers' NR_FTAPE_BUFFERS 3
fi
mainmenu_option next_comment
comment 'Sound'
bool 'Sound card support' CONFIG_SOUND n
mainmenu_option next_comment
comment 'Kernel hacking'
#bool 'Debug kmalloc/kfree' CONFIG_DEBUG_MALLOC n
......
......@@ -17,6 +17,7 @@
#include <linux/signal.h>
#include <linux/sched.h>
#include <linux/interrupt.h>
#include <linux/random.h>
#include <asm/system.h>
#include <asm/io.h>
......@@ -322,10 +323,8 @@ static inline void device_interrupt(int irq, int ack, struct pt_regs * regs)
kstat.interrupts[irq]++;
action = irq_action + irq;
#ifdef CONFIG_RANDOM
if (action->flags & SA_SAMPLE_RANDOM)
add_interrupt_randomness(irq);
#endif
/* quick interrupts get executed with no extra overhead */
if (action->flags & SA_INTERRUPT) {
action->handler(irq, regs);
......
......@@ -2,7 +2,9 @@
# For a description of the syntax of this configuration file,
# see the Configure script.
#
mainmenu_name "Linux Kernel Configuration"
mainmenu_option next_comment
comment 'General setup'
bool 'Kernel math emulation' CONFIG_MATH_EMULATION n
......@@ -42,10 +44,12 @@ bool 'Use -m486 flag for 486-specific optimizations' CONFIG_M486 y
#fi
bool 'SMP Kernel (experimental - gcc2.5.8 only: see Documentation/SMP.txt)' CONFIG_SMP n
mainmenu_option next_comment
comment 'Loadable module support'
bool 'Set version information on all symbols for modules' CONFIG_MODVERSIONS n
if [ "$CONFIG_NET" = "y" ]; then
mainmenu_option next_comment
comment 'Networking options'
bool 'TCP/IP networking' CONFIG_INET y
if [ "$CONFIG_INET" = "y" ]; then
......@@ -81,6 +85,7 @@ if [ "$CONFIG_NETLINK" = "y" ]; then
fi
fi
mainmenu_option next_comment
comment 'SCSI support'
tristate 'SCSI support' CONFIG_SCSI n
......@@ -102,6 +107,7 @@ comment 'Some SCSI devices (e.g. CD jukebox) support multiple LUNs'
bool 'Probe all LUNs on each SCSI device' CONFIG_SCSI_MULTI_LUN n
mainmenu_option next_comment
comment 'SCSI low-level drivers'
dep_tristate 'Adaptec AHA152X support' CONFIG_SCSI_AHA152X n $CONFIG_SCSI
......@@ -132,6 +138,7 @@ fi
if [ "$CONFIG_NET" = "y" ]; then
mainmenu_option next_comment
comment 'Network device support'
bool 'Network device support' CONFIG_NETDEVICES y
......@@ -225,6 +232,7 @@ tristate 'Arcnet support' CONFIG_ARCNET n
fi
fi
mainmenu_option next_comment
comment 'CD-ROM drivers (not for SCSI or IDE/ATAPI drives)'
bool 'Support non-SCSI/IDE/ATAPI drives' CONFIG_CD_NO_IDESCSI n
......@@ -247,9 +255,10 @@ if [ "$CONFIG_CD_NO_IDESCSI" = "y" ]; then
tristate 'Goldstar R420 CDROM support' CONFIG_GSCD n
tristate 'Philips/LMS CM206 CDROM support' CONFIG_CM206 n
tristate 'Experimental Optics Storage DOLPHIN 8000AT CDROM support' CONFIG_OPTCD n
bool 'Experimental Sanyo H94A CDROM support' CONFIG_SJCD n
tristate 'Experimental Sanyo H94A CDROM support' CONFIG_SJCD n
fi
mainmenu_option next_comment
comment 'Filesystems'
tristate 'Standard (minix) fs support' CONFIG_MINIX_FS y
......@@ -269,6 +278,7 @@ tristate 'OS/2 HPFS filesystem support (read only)' CONFIG_HPFS_FS n
tristate 'System V and Coherent filesystem support' CONFIG_SYSV_FS n
tristate 'SMB filesystem (to mount WfW shares etc..) support' CONFIG_SMB_FS n
mainmenu_option next_comment
comment 'character devices'
bool 'Cyclades async mux support' CONFIG_CYCLADES n
......@@ -302,10 +312,12 @@ comment '>>> Which is available from ftp://ftp.funet.fi/pub/OS/Linux/BETA/QIC-02
fi
fi
mainmenu_option next_comment
comment 'Sound'
tristate 'Sound card support' CONFIG_SOUND n
mainmenu_option next_comment
comment 'Kernel hacking'
#bool 'Debug kmalloc/kfree' CONFIG_DEBUG_MALLOC n
......
......@@ -214,10 +214,8 @@ asmlinkage void do_IRQ(int irq, struct pt_regs * regs)
#endif
kstat.interrupts[irq]++;
#ifdef CONFIG_RANDOM
if (action->flags & SA_SAMPLE_RANDOM)
add_interrupt_randomness(irq);
#endif
action->handler(irq, regs);
}
......@@ -236,10 +234,8 @@ asmlinkage void do_fast_IRQ(int irq)
#endif
kstat.interrupts[irq]++;
#ifdef CONFIG_RANDOM
if (action->flags & SA_SAMPLE_RANDOM)
add_interrupt_randomness(irq);
#endif
action->handler(irq, NULL);
}
......@@ -258,6 +254,8 @@ int request_irq(unsigned int irq, void (*handler)(int, struct pt_regs *),
return -EBUSY;
if (!handler)
return -EINVAL;
if (irqflags & SA_SAMPLE_RANDOM)
rand_initialize_irq(irq);
save_flags(flags);
cli();
action->handler = handler;
......
......@@ -8,10 +8,12 @@
# For a description of the syntax of this configuration file,
# see the Configure script.
#
mainmenu_name 'Sparc Linux Kernel Configuration'
echo "#define CONFIG_SPARCDEVS 1" >> $CONFIG_H
echo "CONFIG_SPARCDEVS=y" >> $CONFIG
mainmenu_option next_comment
comment 'Sparc Kernel setup'
bool 'Sun floppy controller support' CONFIG_BLK_DEV_SUNFD n
......@@ -21,6 +23,7 @@ bool 'System V IPC' CONFIG_SYSVIPC y
bool 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF y
if [ "$CONFIG_NET" = "y" ]; then
mainmenu_option next_comment
comment 'Networking options'
bool 'TCP/IP networking' CONFIG_INET y
if [ "$CONFIG_INET" "=" "y" ]; then
......@@ -38,6 +41,7 @@ bool 'The IPX protocol' CONFIG_IPX n
#bool 'Amateur Radio AX.25 Level 2' CONFIG_AX25 n
fi
mainmenu_option next_comment
comment 'SCSI support'
bool 'SCSI support?' CONFIG_SCSI n
......@@ -64,6 +68,7 @@ fi
if [ "$CONFIG_NET" = "y" ]; then
mainmenu_option next_comment
comment 'Network device support'
bool 'Network device support?' CONFIG_NETDEVICES y
......@@ -86,6 +91,7 @@ bool 'Sun Intel Ethernet support' CONFIG_SUN_INTEL n
fi
fi
mainmenu_option next_comment
comment 'Filesystems'
bool 'Standard (minix) fs support' CONFIG_MINIX_FS n
......@@ -106,6 +112,7 @@ bool 'OS/2 HPFS filesystem support (read only)' CONFIG_HPFS_FS n
bool 'System V and Coherent filesystem support' CONFIG_SYSV_FS n
mainmenu_option next_comment
comment 'character devices'
bool 'Zilog serial support' CONFIG_SUN_ZS n
......@@ -114,6 +121,7 @@ comment 'Sound'
bool 'Sun Audio support' CONFIG_SUN_AUDIO n
mainmenu_option next_comment
comment 'Kernel hacking'
bool 'Debug kmalloc/kfree' CONFIG_DEBUG_MALLOC n
......
......@@ -15,8 +15,11 @@ ifdef CONFIG_PCI
SUB_DIRS += pci
endif
# If CONFIG_SCSI is set, the core of scsi support will be added to the kernel,
# but some of the low-level things may also be modules.
ifeq ($(CONFIG_SCSI),y)
SUB_DIRS += scsi
MOD_SUB_DIRS += scsi
else
ifeq ($(CONFIG_SCSI),m)
MOD_SUB_DIRS += scsi
......
......@@ -114,10 +114,10 @@ endif #CONFIG_OPTCD
ifeq ($(CONFIG_SJCD),y)
L_OBJS += sjcd.o
#else
# ifeq ($(CONFIG_SJCD),m)
# M_OBJS += sjcd.o
# endif
else
ifeq ($(CONFIG_SJCD),m)
M_OBJS += sjcd.o
endif
endif #CONFIG_SJCD
ifeq ($(CONFIG_BLK_DEV_HD),y)
......
$Id: README.aztcd,v 1.70 1995/08/19 16:21:05 root Exp root $
$Id: README.aztcd,v 1.80 1995/10/11 19:37:49 root Exp root $
Readme-File README.aztcd
for Aztech CD-ROM CDA268-01A, ORCHID CD-3110, OKANO/WEARNES CDD110
CD-ROM Driver
......@@ -15,6 +15,7 @@ NOTE: THIS DRIVER WILL WORK WITH THE CD-ROM DRIVES LISTED, WHICH HAVE
THE STANDARD-KERNEL 1.2.x NOW ALSO SUPPORTS IDE-CDROM-DRIVES, SEE THE
HARDDISK (!) SECTION OF make config, WHEN COMPILING A NEW KERNEL!!!
----------------------------------------------------------------------------
Contents of this file:
1. NOTE
2. INSTALLATION
......
......@@ -6,7 +6,7 @@
Once started, training can not be stopped...
(StarWars)
This is the README for the sjcd cdrom driver, version 1.3.
This is the README for the sjcd cdrom driver, version 1.5.
This file is meant as a tips & tricks edge for the usage of the SANYO CDR-H94A
cdrom drive. It will grow as the questions arise. ;-)
......@@ -21,8 +21,8 @@ The suggestion to configure the ISP16 soundcard by booting DOS and
a warm reboot to boot Linux somehow doesn't work, at least not
on Eric's machine (IPC P90), with the version of the ISP16
card he has (there appear to be at least two versions: Eric's card with
no jumpered IDE support and Vadim's version with a jumper to enable
IDE support).
no jumpered IDE support and OPTi 82C928 chip, and Vadim's version
with a jumper to enable IDE support, probably with a OPTi 82C929 chip).
Therefore detection and configuration of the ISP16 interfaces is included
in the driver.
If we should support any other interfaces (which cannot be configured
......@@ -30,13 +30,18 @@ through DOS) or if there are any more ISP16 types, please let us
know (maarel@marin.nl) and we'll see.
Otherwise, you should boot DOS once (and by this, run the "configuration driver")
and then switch to Linux by use of CTL-ALT-DEL. Each use of the RESET
and then switch to Linux by use of CTRL-ALT-DEL. Each use of the RESET
button or the power switch makes this procedure necessary again.
If no ISP16 is detected, there's no harm done; a card configured trough DOS
may still work as expected.
As of version 1.4 sound through the speakers is supported; only for MSS-mode
and no volume controle yet.
PAUSE and STOP ioctl commands don't seem to work yet.
ISP16 configuration routines reside at Vadim's server
rbrf.msk.su:/linux/mediamagic/
ftp.rbrf.ru:/linux/mediamagic/
and at Eberhard's mirror
ftp.gwdg.de:/pub/linux/cdrom/drivers/sanyo/
......@@ -51,13 +56,13 @@ This, and any related stuff may be found by anonymous ftp at
The device major for sjcd is 18, and minor is 0. Create a block special
file in your /dev directory (e.g., /dev/sjcd) with these numbers.
(For those who don't know, being root and the following should do the trick:
(For those who don't know, being root and doing the following should do the trick:
mknod -m 644 /dev/sjcd b 18 0
and mount the cdrom by /dev/sjcd).
The default configuration parameters are:
base address 0x340
irq 10
no irq
no dma
As of version 1.2, setting base address, irq and dma at boot time is supported
through the use of command line options: type at the "boot:" prompt:
......@@ -65,7 +70,7 @@ through the use of command line options: type at the "boot:" prompt:
(where your kernel is assumed to be called by saying "linux" to
the boot manager).
If something is wrong, e-mail to vadim@rbrf.msk.su
If something is wrong, e-mail to vadim@rbrf.ru
or vadim@ipsun.ras.ru
or model@cecmow.enet.dec.com
......
#define AZT_VERSION "1.70"
/* $Id: aztcd.c,v 1.70 1995/08/19 16:16:39 root Exp root $
#define AZT_VERSION "1.80"
/* $Id: aztcd.c,v 1.80 1995/10/11 19:35:03 root Exp root $
linux/drivers/block/aztcd.c - AztechCD268 CDROM driver
Copyright (C) 1994,1995 Werner Zimmermann (zimmerma@rz.fht-esslingen.de)
......@@ -130,6 +130,10 @@
enough testing done. If you can test it, please contact me. For
details please read README.aztcd.
Werner Zimmermann, August 19, 1995
V1.80 Modification to suit the new kernel boot procedure introduced
with kernel 1.3.33. Will definitely not work with older kernels.
Programming done by Linus himself.
Werner Zimmermann, October 11, 1995
NOTE:
Points marked with ??? are questionable !
*/
......
/*
* linux/drivers/block/ide.c Version 5.14 Sep 14, 1995
* linux/drivers/block/ide.c Version 5.15 Oct 13, 1995
*
* Copyright (C) 1994, 1995 Linus Torvalds & authors (see below)
*/
......@@ -14,6 +14,22 @@
* Tertiary i/f: ide2: major=33; (hde) minor=0; (hdf) minor=64
* Quaternary i/f: ide3: major=34; (hdg) minor=0; (hdh) minor=64
*
* It is easy to extend ide.c to handle more than four interfaces:
*
* Change the MAX_HWIFS constant in ide.h.
*
* Define some new major numbers (in major.h), and insert them into
* the ide_hwif_to_major table in ide.c.
*
* Fill in the extra values for the new interfaces into the two tables
* inside ide.c: default_io_base[] and default_irqs[].
*
* Create the new request handlers by cloning "do_ide3_request()"
* for each new interface, and add them to the switch statement
* in the ide_init() function in ide.c.
*
* Recompile, create the new /dev/ entries, and it will probably work.
*
* From hd.c:
* |
* | It traverses the request-list, using interrupts to jump between functions.
......@@ -145,6 +161,8 @@
* Version 5.14 fixes to cmd640 support.. maybe it works now(?)
* added & tested full EZ-DRIVE support -- don't use LILO!
* don't enable 2nd CMD640 PCI port during init - conflict
* Version 5.15 bug fix in init_cmd640_vlb()
* bug fix in interrupt sharing code
*
* Driver compile-time options are in ide.h
*
......@@ -2400,6 +2418,7 @@ void init_cmd640_vlb (void)
if (reg == 0xff || (reg & 0x90) != 0x90) {
#if TRY_CMD640_VLB_AT_0x78
port = 0x78;
reg = read_cmd640_vlb(port, 0x50);
if (reg == 0xff || (reg & 0x90) != 0x90)
#endif
{
......@@ -2735,17 +2754,17 @@ static int init_irq (ide_hwif_t *hwif)
*/
save_flags(flags);
cli();
if (request_irq(hwif->irq, ide_intr,
SA_INTERRUPT|SA_SAMPLE_RANDOM, hwif->name)) {
restore_flags(flags);
printk(" -- FAILED!");
return 1;
}
/*
* Got the irq, now set everything else up
*/
if ((hwgroup = irq_to_hwgroup[hwif->irq]) == NULL) {
if (request_irq(hwif->irq, ide_intr,
SA_INTERRUPT|SA_SAMPLE_RANDOM, hwif->name)) {
restore_flags(flags);
printk(" -- FAILED!");
return 1;
}
/*
* Got the irq, now set everything else up
*/
hwgroup = kmalloc (sizeof(ide_hwgroup_t), GFP_KERNEL);
irq_to_hwgroup[hwif->irq] = hwgroup;
hwgroup->hwif = hwif->next = hwif;
......
This diff is collapsed.
/*
* linux/drivers/block/triton.c Version 1.01 Aug 28, 1995
* linux/drivers/block/triton.c Version 1.02 Oct 13, 1995
*
* Copyright (c) 1995 Mark Lord
* May be copied or modified under the terms of the GNU General Public License
......@@ -109,8 +109,13 @@ const char *good_dma_drives[] = {"Micropolis 2112A"};
* Note that the driver reverts to PIO mode for individual requests that exceed
* this limit (possible with 512 byte blocksizes, eg. MSDOS f/s), so handling
* 100% of all crazy scenarios here is not necessary.
*
* As it turns out, though, we must allocate a full 4KB page for this,
* so the two PRD tables (ide0 & ide1) will each get half of that,
* allowing each to have about 256 entries (8 bytes each) from this.
*/
#define PRD_ENTRIES 128 /* max memory area count per DMA */
#define PRD_BYTES 8
#define PRD_ENTRIES (PAGE_SIZE / (2 * PRD_BYTES))
/*
* dma_intr() is the handler for disk read/write DMA interrupts
......@@ -298,6 +303,7 @@ void ide_init_triton (byte bus, byte fn)
int rc = 0, h;
unsigned short bmiba, pcicmd;
unsigned int timings;
unsigned char *dmatable = NULL;
extern ide_hwif_t ide_hwifs[];
/*
......@@ -351,13 +357,22 @@ void ide_init_triton (byte bus, byte fn)
if (check_region(base, 8)) {
printk(" -- ERROR, PORTS ALREADY IN USE");
} else {
unsigned long *table;
request_region(base, 8, hwif->name);
hwif->dma_base = base;
table = (void *) __get_dma_pages(GFP_KERNEL, 0);
hwif->dmatable = table;
outl(virt_to_bus(table), base + 4);
hwif->dmaproc = &triton_dmaproc;
hwif->dma_base = base;
if (dmatable == NULL) {
/*
* Since we know we are on a PCI bus, we could
* actually use __get_free_pages() here instead
* of __get_dma_pages() -- no ISA limitations.
*/
dmatable = (void *) __get_dma_pages(GFP_KERNEL, 0);
}
if (dmatable != NULL) {
hwif->dmatable = (unsigned long *) dmatable;
dmatable += (PRD_ENTRIES * PRD_BYTES);
outl(virt_to_bus(hwif->dmatable), base + 4);
hwif->dmaproc = &triton_dmaproc;
}
}
printk("\n %s timing: (0x%04x) sample_CLKs=%d, recovery_CLKs=%d\n",
hwif->name, time, ((~time>>12)&3)+2, ((~time>>8)&3)+1);
......
// 950824: note -- I will upload the new version 1.9 to ftp.ucsd.edu
// 950913: note -- I will upload the new version 1.9a to ftp.ucsd.edu
// as soon as possible...
//
// ******
......@@ -7,13 +7,22 @@
//
// please remake /dev/sc*:
//
// mknod /dev/sc1 c 34 0
// mknod /dev/sc2 c 34 1
// mknod /dev/sc3 c 34 2
// mknod /dev/sc4 c 34 3
// mknod /dev/scc0 c 34 0
// mknod /dev/scc1 c 34 1
// mknod /dev/scc2 c 34 2
// mknod /dev/scc3 c 34 3
//
// (and so on...)
//
// If you want to use the old device naming scheme use:
//
// ln -f /dev/scc0 /dev/sc1
// ln -f /dev/scc1 /dev/sc2
// ln -f /dev/scc2 /dev/sc3
// ln -f /dev/scc3 /dev/sc4
//
// (you get the idea...)
//
// -dl1bke-
......
......@@ -26,6 +26,7 @@ char kernel_version[] = UTS_RELEASE;
#include <linux/signal.h>
#include <linux/errno.h>
#include <linux/mouse.h>
#include <linux/random.h>
#include <asm/io.h>
#include <asm/segment.h>
......@@ -89,6 +90,7 @@ void mouse_interrupt(int irq, struct pt_regs * regs)
outb(ATIXL_MSE_READ_BUTTONS, ATIXL_MSE_CONTROL_PORT); /* Select IR0 - Button Status */
buttons = inb( ATIXL_MSE_DATA_PORT);
if (dx != 0 || dy != 0 || buttons != mouse.latch_buttons) {
add_mouse_randomness((buttons << 16) + (dy << 8) + dx);
mouse.latch_buttons |= buttons;
mouse.dx += dx;
mouse.dy += dy;
......
......@@ -46,6 +46,7 @@ char kernel_version[] = UTS_RELEASE;
#include <linux/errno.h>
#include <linux/mm.h>
#include <linux/mouse.h>
#include <linux/random.h>
#include <asm/io.h>
#include <asm/segment.h>
......@@ -78,6 +79,7 @@ static void mouse_interrupt(int irq, struct pt_regs *regs)
dy |= (buttons & 0xf) << 4;
buttons = ((buttons >> 5) & 0x07);
if (dx != 0 || dy != 0 || buttons != mouse.buttons) {
add_mouse_randomness((buttons << 16) + (dy << 8) + dx);
mouse.buttons = buttons;
mouse.dx += dx;
mouse.dy -= dy;
......
......@@ -373,9 +373,7 @@ static void keyboard_interrupt(int irq, struct pt_regs *regs)
prev_scancode = 0;
goto end_kbd_intr;
}
#ifdef CONFIG_RANDOM
add_keyboard_randomness(scancode);
#endif
tty = ttytab[fg_console];
kbd = kbd_table + fg_console;
......
......@@ -233,7 +233,6 @@ static int memory_lseek(struct inode * inode, struct file * file, off_t offset,
#define mmap_kmem mmap_mem
#define zero_lseek null_lseek
#define write_zero write_null
#define write_random write_null
static struct file_operations ram_fops = {
memory_lseek,
......@@ -324,15 +323,14 @@ static struct file_operations full_fops = {
NULL /* no special release code */
};
#ifdef CONFIG_RANDOM
static struct file_operations random_fops = {
memory_lseek,
read_random,
write_random,
NULL, /* full_readdir */
NULL, /* full_select */
NULL, /* full_ioctl */
NULL, /* full_mmap */
NULL, /* random_readdir */
NULL, /* random_select */
random_ioctl,
NULL, /* random_mmap */
NULL, /* no special open code */
NULL /* no special release code */
};
......@@ -341,14 +339,13 @@ static struct file_operations urandom_fops = {
memory_lseek,
read_random_unlimited,
write_random,
NULL, /* full_readdir */
NULL, /* full_select */
NULL, /* full_ioctl */
NULL, /* full_mmap */
NULL, /* urandom_readdir */
NULL, /* urandom_select */
random_ioctl,
NULL, /* urandom_mmap */
NULL, /* no special open code */
NULL /* no special release code */
};
#endif
static int memory_open(struct inode * inode, struct file * filp)
{
......@@ -374,14 +371,12 @@ static int memory_open(struct inode * inode, struct file * filp)
case 7:
filp->f_op = &full_fops;
break;
#ifdef CONFIG_RANDOM
case 8:
filp->f_op = &random_fops;
break;
case 9:
filp->f_op = &urandom_fops;
break;
#endif
default:
return -ENODEV;
}
......@@ -407,9 +402,7 @@ int chr_dev_init(void)
{
if (register_chrdev(MEM_MAJOR,"mem",&memory_fops))
printk("unable to get major %d for memory devs\n", MEM_MAJOR);
#ifdef CONFIG_RANDOM
rand_initialize();
#endif
tty_init();
#ifdef CONFIG_PRINTER
lp_init();
......
......@@ -48,6 +48,7 @@ char kernel_version[] = UTS_RELEASE;
#include <linux/signal.h>
#include <linux/errno.h>
#include <linux/mouse.h>
#include <linux/random.h>
#include <asm/io.h>
#include <asm/segment.h>
......@@ -77,6 +78,7 @@ static void ms_mouse_interrupt(int irq, struct pt_regs * regs)
outb((inb(MS_MSE_DATA_PORT) & 0xdf), MS_MSE_DATA_PORT);
if (dx != 0 || dy != 0 || buttons != mouse.buttons || ((~buttons) & 0x07)) {
add_mouse_randomness((buttons << 16) + (dy << 8) + dx);
mouse.buttons = buttons;
mouse.dx += dx;
mouse.dy += dy;
......
......@@ -46,6 +46,7 @@
#include <linux/timer.h>
#include <linux/malloc.h>
#include <linux/mouse.h>
#include <linux/random.h>
#include <asm/io.h>
#include <asm/segment.h>
......@@ -221,7 +222,7 @@ static void aux_interrupt(int cpl, struct pt_regs * regs)
if ((inb(AUX_STATUS) & AUX_OBUF_FULL) != AUX_OBUF_FULL)
return;
queue->buf[head] = inb(AUX_INPUT_PORT);
add_mouse_randomness(queue->buf[head] = inb(AUX_INPUT_PORT));
if (head != maxhead) {
head++;
head &= AUX_BUF_SIZE-1;
......@@ -244,7 +245,7 @@ static void qp_interrupt(int cpl, struct pt_regs * regs)
int head = queue->head;
int maxhead = (queue->tail-1) & (AUX_BUF_SIZE-1);
queue->buf[head] = inb(qp_data);
add_mouse_randomness(queue->buf[head] = inb(qp_data));
if (head != maxhead) {
head++;
head &= AUX_BUF_SIZE-1;
......
This diff is collapsed.
......@@ -406,6 +406,7 @@ void lance_probe1(int ioaddr)
/* Make certain the data structures used by the LANCE are aligned and DMAble. */
lp = (struct lance_private *) kmalloc(sizeof(*lp), GFP_DMA | GFP_KERNEL);
memset(lp, 0, sizeof(*lp));
dev->priv = lp;
lp->name = chipname;
lp->rx_buffs = (unsigned long) kmalloc(PKT_BUF_SZ*RX_RING_SIZE, GFP_DMA | GFP_KERNEL);
......
......@@ -3143,8 +3143,8 @@ ppp_dev_xmit (sk_buff *skb, struct device *dev)
* Validate the tty linkage
*/
if (ppp->flags & SC_DEBUG)
printk (KERN_DEBUG "ppp_dev_xmit [%s]: skb %X\n",
dev->name, (int) skb);
printk (KERN_DEBUG "ppp_dev_xmit [%s]: skb %p\n",
dev->name, skb);
/*
* Validate the tty interface
*/
......
......@@ -1198,7 +1198,24 @@ int aha1542_reset(Scsi_Cmnd * SCpnt)
* we do this? Try this first, and we can add that later
* if it turns out to be useful.
*/
outb(SCRST, CONTROL(SCpnt->host->io_port));
outb(HRST | SCRST, CONTROL(SCpnt->host->io_port));
/*
* Wait for the thing to settle down a bit. Unfortunately
* this is going to basically lock up the machine while we
* wait for this to complete. To be 100% correct, we need to
* check for timeout, and if we are doing something like this
* we are pretty desperate anyways.
*/
WAIT(STATUS(SCpnt->host->io_port),
STATMASK, INIT|IDLE, STST|DIAGF|INVDCMD|DF|CDF);
/*
* We need to do this too before the 1542 can interact with
* us again.
*/
setup_mailboxes(SCpnt->host->io_port, SCpnt->host);
/*
* Now try and pick up the pieces. Restart all commands
* that are currently active on the bus, and reset all of
......@@ -1226,6 +1243,12 @@ int aha1542_reset(Scsi_Cmnd * SCpnt)
* then report SUCCESS.
*/
return (SCSI_RESET_SUCCESS | SCSI_RESET_BUS_RESET);
fail:
printk("aha1542.c: Unable to perform hard reset.\n");
printk("Power cycle machine to reset\n");
return (SCSI_RESET_ERROR | SCSI_RESET_BUS_RESET);
}
else
{
......
......@@ -181,28 +181,16 @@ int eata_proc_info(char *buffer, char **start, off_t offset, int length,
scmd.channel = 0;
scmd.use_sg = 0;
/* Used for mutex if loading devices after boot */
scmd.request.sem = NULL;
scmd.request.rq_status = RQ_SCSI_BUSY;
scsi_do_cmd (&scmd, cmnd, buff + 0x144, 0x66,
eata_scsi_done, 1 * HZ, 1);
/*
* Wait for command to finish. Use simple wait if we are
* booting, else do it right and use a mutex
* Do the command and wait for it to finish.
*/
if (current->pid == 0) {
while (scmd.request.rq_status != RQ_SCSI_DONE)
barrier();
} else if (scmd.request.rq_status != RQ_SCSI_DONE) {
{
struct semaphore sem = MUTEX_LOCKED;
scmd.request.rq_status = RQ_SCSI_BUSY;
scmd.request.sem = &sem;
scsi_do_cmd (&scmd, cmnd, buff + 0x144, 0x66,
eata_scsi_done, 1 * HZ, 1);
down(&sem);
/* Hmm.. Have to ask about this one */
while (scmd.request.rq_status != RQ_SCSI_DONE)
schedule();
}
size = sprintf(buffer + len, "IRQ: %2d, %s triggered\n", cc->interrupt,
......@@ -321,30 +309,18 @@ int eata_proc_info(char *buffer, char **start, off_t offset, int length,
scmd.cmd_len = 10;
/* Used for mutex if loading devices after boot */
scmd.request.sem = NULL;
scmd.request.rq_status = RQ_SCSI_BUSY; /* Mark busy */
scsi_do_cmd (&scmd, cmnd, buff2, 0x144,
eata_scsi_done, 1 * HZ, 1);
/*
* Wait for command to finish. Use simple wait if we are
* booting, else do it right and use a mutex
* Do the command and wait for it to finish.
*/
if (current->pid == 0)
while (scmd.request.rq_status != RQ_SCSI_DONE)
barrier();
else if (scmd.request.rq_status != RQ_SCSI_DONE) {
{
struct semaphore sem = MUTEX_LOCKED;
scmd.request.rq_status = RQ_SCSI_BUSY;
scmd.request.sem = &sem;
scsi_do_cmd (&scmd, cmnd, buff2, 0x144,
eata_scsi_done, 1 * HZ, 1);
down(&sem);
/* Hmm.. Have to ask about this one */
while (scmd.request.rq_status != RQ_SCSI_DONE)
schedule();
}
swap_statistics(buff2);
rhcs = (hst_cmd_stat *)(buff2 + 0x2c);
whcs = (hst_cmd_stat *)(buff2 + 0x8c);
......
This diff is collapsed.
......@@ -113,18 +113,14 @@ static int ioctl_internal_command(Scsi_Device *dev, char * cmd)
Scsi_Cmnd * SCpnt;
SCpnt = allocate_device(NULL, dev, 1);
scsi_do_cmd(SCpnt, cmd, NULL, 0,
scsi_ioctl_done, MAX_TIMEOUT,
MAX_RETRIES);
if (SCpnt->request.rq_status != RQ_SCSI_DONE){
{
struct semaphore sem = MUTEX_LOCKED;
SCpnt->request.sem = &sem;
scsi_do_cmd(SCpnt, cmd, NULL, 0,
scsi_ioctl_done, MAX_TIMEOUT,
MAX_RETRIES);
down(&sem);
/* Hmm.. Have to ask about this one */
while (SCpnt->request.rq_status != RQ_SCSI_DONE)
schedule();
};
}
if(driver_byte(SCpnt->result) != 0)
switch(SCpnt->sense_buffer[2] & 0xf) {
......@@ -248,20 +244,15 @@ static int ioctl_command(Scsi_Device *dev, void *buffer)
#ifndef DEBUG_NO_CMD
SCpnt = allocate_device(NULL, dev, 1);
scsi_do_cmd(SCpnt, cmd, buf, needed, scsi_ioctl_done, MAX_TIMEOUT,
MAX_RETRIES);
if (SCpnt->request.rq_status != RQ_SCSI_DONE){
{
struct semaphore sem = MUTEX_LOCKED;
SCpnt->request.sem = &sem;
scsi_do_cmd(SCpnt, cmd, buf, needed, scsi_ioctl_done, MAX_TIMEOUT,
MAX_RETRIES);
down(&sem);
/* Hmm.. Have to ask about this one */
while (SCpnt->request.rq_status != RQ_SCSI_DONE)
schedule();
}
/*
* If there was an error condition, pass the info back to the user.
*/
......
......@@ -112,6 +112,22 @@ static int sd_open(struct inode * inode, struct file * filp)
if(rscsi_disks[target].device->removable) {
check_disk_change(inode->i_rdev);
/*
* If the drive is empty, just let the open fail.
*/
if ( !rscsi_disks[target].ready ) {
return -ENXIO;
}
/*
* Similarily, if the device has the write protect tab set,
* have the open fail if the user expects to be able to write
* to the thing.
*/
if ( (rscsi_disks[target].write_prot) && (filp->f_mode & 2) ) {
return -EROFS;
}
if(!rscsi_disks[target].device->access_count)
sd_ioctl(inode, NULL, SCSI_IOCTL_DOORLOCK, 0);
};
......@@ -904,11 +920,20 @@ static int check_scsidisk_media_change(kdev_t full_dev){
* and we will figure it out later once the drive is
* available again. */
rscsi_disks[target].ready = 0;
rscsi_disks[target].device->changed = 1;
return 1; /* This will force a flush, if called from
* check_disk_change */
};
/*
* for removable scsi disk ( FLOPTICAL ) we have to recognise the
* presence of disk in the drive. This is kept in the Scsi_Disk
* struct and tested at open ! Daniel Roche ( dan@lectra.fr )
*/
rscsi_disks[target].ready = 1; /* FLOPTICAL */
retval = rscsi_disks[target].device->changed;
if(!flag) rscsi_disks[target].device->changed = 0;
return retval;
......@@ -945,7 +970,7 @@ static int sd_init_onedisk(int i)
spintime = 0;
/* Spin up drives, as required. Only do this at boot time */
if (current->pid == 0){
if (!MODULE_FLAG){
do{
retries = 0;
while(retries < 3)
......@@ -953,18 +978,22 @@ static int sd_init_onedisk(int i)
cmd[0] = TEST_UNIT_READY;
cmd[1] = (rscsi_disks[i].device->lun << 5) & 0xe0;
memset ((void *) &cmd[2], 0, 8);
SCpnt->request.rq_status = RQ_SCSI_BUSY; /* Mark as really busy again */
SCpnt->cmd_len = 0;
SCpnt->sense_buffer[0] = 0;
SCpnt->sense_buffer[2] = 0;
scsi_do_cmd (SCpnt,
(void *) cmd, (void *) buffer,
512, sd_init_done, SD_TIMEOUT,
MAX_RETRIES);
while(SCpnt->request.rq_status != RQ_SCSI_DONE) barrier();
{
struct semaphore sem = MUTEX_LOCKED;
/* Mark as really busy again */
SCpnt->request.rq_status = RQ_SCSI_BUSY;
SCpnt->request.sem = &sem;
scsi_do_cmd (SCpnt,
(void *) cmd, (void *) buffer,
512, sd_init_done, SD_TIMEOUT,
MAX_RETRIES);
down(&sem);
}
the_result = SCpnt->result;
retries++;
if( the_result == 0
......@@ -984,22 +1013,24 @@ static int sd_init_onedisk(int i)
cmd[1] |= 1; /* Return immediately */
memset ((void *) &cmd[2], 0, 8);
cmd[4] = 1; /* Start spin cycle */
/* Mark as really busy again */
SCpnt->request.rq_status = RQ_SCSI_BUSY;
SCpnt->cmd_len = 0;
SCpnt->sense_buffer[0] = 0;
SCpnt->sense_buffer[2] = 0;
scsi_do_cmd (SCpnt,
(void *) cmd, (void *) buffer,
512, sd_init_done, SD_TIMEOUT,
MAX_RETRIES);
while(SCpnt->request.rq_status != RQ_SCSI_DONE)
barrier();
{
struct semaphore sem = MUTEX_LOCKED;
/* Mark as really busy again */
SCpnt->request.rq_status = RQ_SCSI_BUSY;
SCpnt->request.sem = &sem;
scsi_do_cmd (SCpnt,
(void *) cmd, (void *) buffer,
512, sd_init_done, SD_TIMEOUT,
MAX_RETRIES);
down(&sem);
}
spintime = jiffies;
};
}
time1 = jiffies;
while(jiffies < time1 + HZ); /* Wait 1 second for next try */
......@@ -1012,7 +1043,7 @@ static int sd_init_onedisk(int i)
else
printk( "ready\n" );
}
}; /* current->pid == 0 */
}; /* !MODULE_FLAG */
retries = 3;
......@@ -1021,28 +1052,20 @@ static int sd_init_onedisk(int i)
cmd[1] = (rscsi_disks[i].device->lun << 5) & 0xe0;
memset ((void *) &cmd[2], 0, 8);
memset ((void *) buffer, 0, 8);
SCpnt->request.rq_status = RQ_SCSI_BUSY; /* Mark as really busy again */
SCpnt->cmd_len = 0;
SCpnt->sense_buffer[0] = 0;
SCpnt->sense_buffer[2] = 0;
scsi_do_cmd (SCpnt,
(void *) cmd, (void *) buffer,
8, sd_init_done, SD_TIMEOUT,
MAX_RETRIES);
if (current->pid == 0) {
while(SCpnt->request.rq_status != RQ_SCSI_DONE)
barrier();
} else {
if (SCpnt->request.rq_status != RQ_SCSI_DONE){
struct semaphore sem = MUTEX_LOCKED;
SCpnt->request.sem = &sem;
down(&sem);
/* Hmm.. Have to ask about this one.. */
while (SCpnt->request.rq_status != RQ_SCSI_DONE)
schedule();
}
{
struct semaphore sem = MUTEX_LOCKED;
/* Mark as really busy again */
SCpnt->request.rq_status = RQ_SCSI_BUSY;
SCpnt->request.sem = &sem;
scsi_do_cmd (SCpnt,
(void *) cmd, (void *) buffer,
8, sd_init_done, SD_TIMEOUT,
MAX_RETRIES);
down(&sem); /* sleep until it is ready */
}
the_result = SCpnt->result;
......@@ -1100,6 +1123,11 @@ static int sd_init_onedisk(int i)
}
else
{
/*
* FLOPTICAL , if read_capa is ok , drive is assumed to be ready
*/
rscsi_disks[i].ready = 1;
rscsi_disks[i].capacity = (buffer[0] << 24) |
(buffer[1] << 16) |
(buffer[2] << 8) |
......@@ -1144,6 +1172,57 @@ static int sd_init_onedisk(int i)
rscsi_disks[i].capacity >>= 1; /* Change into 512 byte sectors */
}
/*
* Unless otherwise specified, this is not write protected.
*/
rscsi_disks[i].write_prot = 0;
if ( rscsi_disks[i].device->removable && rscsi_disks[i].ready ) {
/* FLOPTICAL */
/*
* for removable scsi disk ( FLOPTICAL ) we have to recognise
* the Write Protect Flag. This flag is kept in the Scsi_Disk struct
* and tested at open !
* Daniel Roche ( dan@lectra.fr )
*/
memset ((void *) &cmd[0], 0, 8);
cmd[0] = MODE_SENSE;
cmd[1] = (rscsi_disks[i].device->lun << 5) & 0xe0;
cmd[2] = 1; /* page code 1 ?? */
cmd[4] = 12;
SCpnt->cmd_len = 0;
SCpnt->sense_buffer[0] = 0;
SCpnt->sense_buffer[2] = 0;
/* same code as READCAPA !! */
{
struct semaphore sem = MUTEX_LOCKED;
SCpnt->request.rq_status = RQ_SCSI_BUSY; /* Mark as really busy again */
SCpnt->request.sem = &sem;
scsi_do_cmd (SCpnt,
(void *) cmd, (void *) buffer,
512, sd_init_done, SD_TIMEOUT,
MAX_RETRIES);
down(&sem);
}
the_result = SCpnt->result;
SCpnt->request.rq_status = RQ_INACTIVE; /* Mark as not busy */
wake_up(&SCpnt->device->device_wait);
if ( the_result ) {
printk ("sd%c: test WP failed, assume Write Protected\n",i+'a');
rscsi_disks[i].write_prot = 1;
} else {
rscsi_disks[i].write_prot = ((buffer[2] & 0x80) != 0);
printk ("sd%c: Write Protect is %s\n",i+'a',
rscsi_disks[i].write_prot ? "on" : "off");
}
} /* check for write protect */
rscsi_disks[i].ten = 1;
rscsi_disks[i].remap = 1;
scsi_free(buffer, 512);
......
......@@ -29,6 +29,8 @@ typedef struct scsi_disk {
unsigned capacity; /* size in blocks */
unsigned sector_size; /* size in bytes */
Scsi_Device *device;
unsigned char ready; /* flag ready for FLOPTICAL */
unsigned char write_prot; /* flag write_protect for rmvable dev */
unsigned char sector_bit_size; /* sector_size = 2 to the bit size power */
unsigned char sector_bit_shift; /* power of 2 sectors per FS block */
unsigned ten:1; /* support ten byte read / write */
......
......@@ -989,24 +989,17 @@ static void get_sectorsize(int i){
SCpnt->cmd_len = 0;
memset(buffer, 0, 8);
scsi_do_cmd (SCpnt,
(void *) cmd, (void *) buffer,
512, sr_init_done, SR_TIMEOUT,
MAX_RETRIES);
if (current->pid == 0)
while(SCpnt->request.rq_status != RQ_SCSI_DONE)
barrier();
else
if (SCpnt->request.rq_status != RQ_SCSI_DONE){
struct semaphore sem = MUTEX_LOCKED;
SCpnt->request.sem = &sem;
down(&sem);
/* Hmm.. Have to ask about this */
while (SCpnt->request.rq_status != RQ_SCSI_DONE)
schedule();
};
/* Do the command and wait.. */
{
struct semaphore sem = MUTEX_LOCKED;
SCpnt->request.sem = &sem;
scsi_do_cmd (SCpnt,
(void *) cmd, (void *) buffer,
512, sr_init_done, SR_TIMEOUT,
MAX_RETRIES);
down(&sem);
}
the_result = SCpnt->result;
retries--;
......
......@@ -44,21 +44,16 @@ static int do_ioctl(int target, unsigned char * sr_cmd, void * buffer, unsigned
{
Scsi_Cmnd * SCpnt;
int result;
SCpnt = allocate_device(NULL, scsi_CDs[target].device, 1);
scsi_do_cmd(SCpnt,
(void *) sr_cmd, buffer, buflength, sr_ioctl_done,
IOCTL_TIMEOUT, IOCTL_RETRIES);
if (SCpnt->request.rq_status != RQ_SCSI_DONE){
{
struct semaphore sem = MUTEX_LOCKED;
SCpnt->request.sem = &sem;
scsi_do_cmd(SCpnt,
(void *) sr_cmd, buffer, buflength, sr_ioctl_done,
IOCTL_TIMEOUT, IOCTL_RETRIES);
down(&sem);
/* Hmm.. Have to ask about this */
while (SCpnt->request.rq_status != RQ_SCSI_DONE)
schedule();
};
}
result = SCpnt->result;
......
......@@ -1171,6 +1171,9 @@ sb_dsp_init (long mem_start, struct address_info *hw_config)
ess_minor & 0x0f);
}
if (snd_set_irq_handler (sbc_irq, sbintr, "SoundBlaster", sb_osp) < 0)
printk ("sb_dsp: Can't allocate IRQ\n");;
#ifndef EXCLUDE_SBPRO
if (sbc_major >= 3)
mixer_type = sb_mixer_init (sbc_major);
......@@ -1247,8 +1250,6 @@ sb_dsp_init (long mem_start, struct address_info *hw_config)
}
}
#endif
if (snd_set_irq_handler (sbc_irq, sbintr, "SoundBlaster", sb_osp) < 0)
printk ("sb_dsp: Can't allocate IRQ\n");;
}
else
printk ("SB: Too many DSP devices available\n");
......
......@@ -210,13 +210,28 @@ static unsigned int load_elf_interp(struct elfhdr * interp_elf_ex,
elf_phdata = (struct elf_phdr *)
kmalloc(sizeof(struct elf_phdr) * interp_elf_ex->e_phnum, GFP_KERNEL);
if(!elf_phdata) return 0xffffffff;
if(!elf_phdata)
return 0xffffffff;
/*
* If the size of this structure has changed, then punt, since
* we will be doing the wrong thing.
*/
if( interp_elf_ex->e_phentsize != 32 )
{
kfree(elf_phdata);
return 0xffffffff;
}
retval = read_exec(interpreter_inode, interp_elf_ex->e_phoff, (char *) elf_phdata,
sizeof(struct elf_phdr) * interp_elf_ex->e_phnum, 1);
elf_exec_fileno = open_inode(interpreter_inode, O_RDONLY);
if (elf_exec_fileno < 0) return 0xffffffff;
if (elf_exec_fileno < 0) {
kfree(elf_phdata);
return 0xffffffff;
}
file = current->files->fd[elf_exec_fileno];
eppnt = elf_phdata;
......@@ -425,8 +440,18 @@ load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs)
for(i=0;i < elf_ex.e_phnum; i++){
if(elf_ppnt->p_type == PT_INTERP) {
/* This is the program interpreter used for shared libraries -
for now assume that this is an a.out format binary */
if( elf_interpreter != NULL )
{
kfree (elf_phdata);
kfree(elf_interpreter);
MOD_DEC_USE_COUNT;
return -EINVAL;
}
/* This is the program interpreter used for
* shared libraries - for now assume that this
* is an a.out format binary
*/
elf_interpreter = (char *) kmalloc(elf_ppnt->p_filesz,
GFP_KERNEL);
......@@ -475,12 +500,7 @@ load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs)
/* Some simple consistency checks for the interpreter */
if(elf_interpreter){
interpreter_type = INTERPRETER_ELF | INTERPRETER_AOUT;
if(retval < 0) {
kfree(elf_interpreter);
kfree(elf_phdata);
MOD_DEC_USE_COUNT;
return -ELIBACC;
}
/* Now figure out which format our binary is */
if((N_MAGIC(interp_ex) != OMAGIC) &&
(N_MAGIC(interp_ex) != ZMAGIC) &&
......@@ -569,6 +589,7 @@ load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs)
kfree(elf_interpreter);
if(elf_entry == 0xffffffff) {
set_fs(old_fs);
printk("Unable to load interpreter\n");
kfree(elf_phdata);
send_sig(SIGSEGV, current, 0);
......@@ -600,7 +621,7 @@ load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs)
if(k > start_code) start_code = k;
k = elf_ppnt->p_vaddr + elf_ppnt->p_filesz;
if(k > elf_bss) elf_bss = k;
if((elf_ppnt->p_flags | PROT_WRITE) && end_code < k)
if((elf_ppnt->p_flags | PF_W) && end_code < k)
end_code = k;
if(end_data < k) end_data = k;
k = elf_ppnt->p_vaddr + elf_ppnt->p_memsz;
......
/* $Id: aztcd.h,v 1.70 1995/08/19 16:16:45 root Exp root $
/* $Id: aztcd.h,v 1.80 1995/10/11 19:39:18 root Exp root $
*
* Definitions for a AztechCD268 CD-ROM interface
* Copyright (C) 1994, 1995 Werner Zimmermann
......@@ -58,6 +58,7 @@
/*---------------------------------------------------------------------------*/
/*-----nothing to be configured for normal applications below this line------*/
/* Increase this if you get lots of timeouts; if you get kernel panic, replace
STEN_LOW_WAIT by STEN_LOW in the source code */
#define AZT_STATUS_DELAY 400 /*for timer wait, STEN_LOW_WAIT*/
......
......@@ -39,7 +39,7 @@
* 19 - cyclades /dev/ttyC*
* 20 - cyclades /dev/cub* mitsumi (mcdx) cdrom
* 21 - scsi generic
* 22 - Z8530 driver ide1
* 22 - ide1
* 23 - mitsumi cdrom
* 24 - sony535 cdrom
* 25 - matsushita cdrom minors 0..3
......@@ -49,7 +49,7 @@
* 29 - aztech/orchid/okano/wearnes cdrom
* 32 - philips/lms cm206 cdrom
* 33 - ide2
* 34 - ide3
* 34 - z8530 driver ide3
*/
#define UNNAMED_MAJOR 0
......@@ -79,7 +79,7 @@
#define CYCLADESAUX_MAJOR 20
#define MITSUMI_X_CDROM_MAJOR 20
#define SCSI_GENERIC_MAJOR 21
#define Z8530_MAJOR 22
#define Z8530_MAJOR 34
#define IDE1_MAJOR 22
#define MITSUMI_CDROM_MAJOR 23
#define CDU535_CDROM_MAJOR 24
......
......@@ -4,33 +4,44 @@
* Include file for the random number generator.
*/
/*
* We should always include the random number generator, since it's
* relatively small, and it's most useful when application developers
* can assume that all Linux systems have it. (Ideally, it would be
* best if we could assume that all Unix systems had it, but oh
* well....)
*
* Also, many kernel routines will have a use for good random numbers,
* for example, for truely random TCP sequence numbers, which prevent
* certain forms of TCP spoofing attacks.
*/
#define CONFIG_RANDOM
#ifndef _LINUX_RANDOM_H
#define _LINUX_RANDOM_H
/* ioctl()'s for the random number generator */
#define RNDGETENTCNT 0x01080000
#define RNDADDTOENTCNT 0x01080001
#define RNDGETPOOL 0x01080002
struct rand_pool_state {
int entropy_count;
int pool_size;
__u32 pool[0];
};
/* Exported functions */
#ifdef CONFIG_RANDOM
#ifdef __KERNEL__
void rand_initialize(void);
void rand_initialize_irq(int irq);
void rand_initialize_blkdev(int irq);
void add_keyboard_randomness(unsigned char scancode);
void add_mouse_randomness(__u32 mouse_data);
void add_interrupt_randomness(int irq);
void add_blkdev_randomness(int major);
void get_random_bytes(void *buf, int nbytes);
int read_random(struct inode * inode, struct file * file,
char * buf, int nbytes);
int read_random_unlimited(struct inode * inode, struct file * file,
char * buf, int nbytes);
#else
#define add_keyboard_randomness(x)
#define add_interrupt_randomness(x)
#endif
int write_random(struct inode * inode, struct file * file,
const char * buffer, int count);
int random_ioctl(struct inode * inode, struct file * file,
unsigned int cmd, unsigned long arg);
#endif /* __KERNEL___ */
#endif /* _LINUX_RANDOM_H */
......@@ -31,7 +31,7 @@ struct rpc_wait {
int *buf;
int len;
char gotit;
u32 xid;
__u32 xid;
};
struct rpc_sock {
......
/* -- sjcd.h
*
* Definitions for a Sanyo CD-ROM interface
/*
* Definitions for a Sanyo CD-ROM interface.
*
* Copyright (C) 1995 Vadim V. Model
* model@cecmow.enet.dec.com
* vadim@rbrf.msk.su
* vadim@ipsun.ras.ru
* Eric van der Maarel
* maarel@marin.nl
*
* This information is based on mcd.c from M. Harriss and sjcd102.lst from
* E. Moenkeberg.
*
* model@cecmow.enet.dec.com
* vadim@rbrf.msk.su
* vadim@ipsun.ras.ru
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __SJCD_H__
#define __SJCD_H__
/*
* Change this to set the I/O port address.
* Change this to set the I/O port address as default. More flexibility
* come with setup implementation.
*/
#define SJCD_BASE_ADDR 0x340
/*
* Change this to set the irq.
* Change this to set the irq as default. Really SANYO do not use interrupts
* at all.
*/
#define SJCD_INTR_NR 10
#define SJCD_INTR_NR 0
/*
* Change this to set the dma channel.
* Change this to set the dma as default value. really SANYO does not use
* direct memory access at all.
*/
#define SJCD_DMA 0
#define SJCD_DMA_NR 0
/*
* port access macros
* Macros which allow us to find out the status of the drive.
*/
#define SJCDPORT( x ) ( sjcd_port + ( x ) )
#define SJCD_STATUS_AVAILABLE( x ) (((x)&0x02)==0)
#define SJCD_DATA_AVAILABLE( x ) (((x)&0x01)==0)
/* status bits */
/*
* Port access macro. Three ports are available: S-data port (command port),
* status port (read only) and D-data port (read only).
*/
#define SJCDPORT( x ) ( sjcd_port + ( x ) )
#define SJCD_STATUS_PORT SJCDPORT( 1 )
#define SJCD_S_DATA_PORT SJCDPORT( 0 )
#define SJCD_COMMAND_PORT SJCDPORT( 0 )
#define SJCD_D_DATA_PORT SJCDPORT( 2 )
#define SST_NOT_READY 0x10 /* no disk in the drive */
/*
* Drive info bits. Drive info available as first (mandatory) byte of
* command completion status.
*/
#define SST_NOT_READY 0x10 /* no disk in the drive (???) */
#define SST_MEDIA_CHANGED 0x20 /* disk is changed */
#define SST_DOOR_OPENED 0x40 /* door is open */
/* flag bits */
/* commands */
#define SCMD_EJECT_TRAY 0xD0 /* eject tray if not locked */
......@@ -52,7 +82,7 @@
#define SCMD_GET_STATUS 0x80
#define SCMD_GET_VERSION 0xCC
#define SCMD_DATA_READ 0xA0
#define SCMD_DATA_READ 0xA0 /* are the same, depend on mode&args */
#define SCMD_SEEK 0xA0
#define SCMD_PLAY 0xA0
......@@ -60,24 +90,32 @@
#define SCMD_SET_MODE 0xC4
#define SCMD_MODE_PLAY 0xE0
#define SCMD_MODE_COOKED 0xF8
#define SCMD_MODE_COOKED (0xF8 & ~0x20)
#define SCMD_MODE_RAW 0xF9
#define SCMD_MODE_x20_BIT 0x20
#define SCMD_MODE_x20_BIT 0x20 /* What is it for ? */
#define SCMD_SET_VOLUME 0xAE
#define SCMD_PAUSE 0xE0
#define SCMD_STOP 0xE0
#define SCMD_GET_DISK_INFO 0xAA
/*
* Some standard arguments for SCMD_GET_DISK_INFO.
*/
#define SCMD_GET_1_TRACK 0xA0 /* get the first track information */
#define SCMD_GET_L_TRACK 0xA1 /* get the last track information */
#define SCMD_GET_D_SIZE 0xA2 /* get the whole disk information */
/*
* borrowed from hd.c
* Borrowed from hd.c. Allows to optimize multiple port read commands.
*/
#define S_READ_DATA( port, buf, nr ) insb( port, buf, nr )
/*
* We assume that there are no audio disks with TOC lenght more than this
* number (I personally have never seen disks with morethan 20 fragments).
*/
#define SJCD_MAX_TRACKS 100
struct msf {
......@@ -124,6 +162,8 @@ struct sjcd_toc {
struct msf disk_time;
};
#if defined( SJCD_GATHER_STAT )
struct sjcd_stat {
int ticks;
int tticks[ 8 ];
......@@ -137,3 +177,5 @@ struct sjcd_stat {
};
#endif
#endif
......@@ -529,6 +529,8 @@ int get_module_list(char *buf)
if (p - buf > 4096 - 100)
break; /* avoid overflowing buffer */
q = mp->name;
if (*q == '\0' && mp->size == 0 && mp->ref == NULL)
continue; /* don't list modules for kernel syms */
i = 20;
while (*q) {
*p++ = *q++;
......
......@@ -16,6 +16,10 @@
#
# 030995 (storner@osiris.ping.dk) - added support for tri-state answers,
# for selecting modules to compile.
#
# 180995 Bernhard Kaindl (bkaindl@ping.at) - added dummy functions for
# use with a config.in modified for make menuconfig.
#
#
# Make sure we're really running bash.
......@@ -30,6 +34,16 @@
# Enable function cacheing.
set -f -h
#
# Dummy functions for use with a config.in modified for menuconf
#
function mainmenu_option () {
:
}
function mainmenu_name () {
:
}
#
# readln reads a line into $ans.
#
......
HEADER=header.tk
TAIL=tail.tk
kconfig.tk: ../arch/${ARCH}/config.in tkparse ${HEADER} ${TAIL}
./tkparse < ../arch/${ARCH}/config.in > kconfig.tmp
cp ${HEADER} ./kconfig.tk
cat kconfig.tmp >> kconfig.tk
rm -f kconfig.tmp
cat ${TAIL} >> kconfig.tk
chmod 755 kconfig.tk
tkparse: tkparse.o tkcond.o tkgen.o
${HOSTCC} -o tkparse tkparse.o tkcond.o tkgen.o
tkparse.o: tkparse.c tkparse.h
$(HOSTCC) $(HOSTCFLAGS) -c -o tkparse.o tkparse.c
tkcond.o: tkcond.c tkparse.h
$(HOSTCC) $(HOSTCFLAGS) -c -o tkcond.o tkcond.c
tkgen.o: tkgen.c tkparse.h
$(HOSTCC) $(HOSTCFLAGS) -c -o tkgen.o tkgen.c
clean:
rm -f kconfig.tk *.o parse
include $(TOPDIR)/Rules.make
This diff is collapsed.
pack .header -side top -padx 10 -pady 10
pack .f0 -side top -padx 15 -pady 10
#
# Misc buttons to save/restore state and so forth.
#
frame .f0r_bot
frame .f0l_bot
#
# Read the users settings from .config. These wil override whatever is
# in config.in. Don't do this if the user specified a -D to force
# the defaults.
#
if { [file readable .config] == 1} then {
if { $argc > 0 } then {
if { [lindex $argv 0] != "-D" } then {
read_config .config
}
} else {
read_config .config
}
}
button .f0r_bot.save -text "Write Configuration" -width 25 -command {
writeconfig .config include/linux/autoconf.h; wrapup .wrap }
button .f0r_bot.quit -text "Quit" -command { exit } -width 25 \
-activebackground red -activeforeground white
button .f0l_bot.store -text "Store Configuration to file" -width 25 -command {
load_configfile .load "Store Configuration" write_config_file
}
button .f0l_bot.load -text "Load Configuration" -width 25 -command {
load_configfile .load "Load Configuration" read_config_file
}
pack .f0r_bot.save .f0r_bot.quit -padx 25 -ipadx 10 -ipady 2 -anchor w
pack .f0l_bot.load .f0l_bot.store -padx 25 -ipadx 10 -ipady 2 -anchor w
pack .f0r_bot .f0l_bot -side left -padx 15 -pady 10 -anchor w
#
# If we cannot write our config files, disable the write button.
#
if { [file exists .config] == 1 } then {
if { [file writable .config] == 0 } then {
.f0r_bot.save configure -state disabled
}
} else {
if { [file writable .] == 0 } then {
.f0r_bot.save configure -state disabled
}
}
if { [file exists include/linux/autoconf.h] == 1 } then {
if { [file writable include/linux/autoconf.h] == 0 } then {
.f0r_bot.save configure -state disabled
}
} else {
if { [file writable include/linux/] == 0 } then {
.f0r_bot.save configure -state disabled
}
}
if { [file writable .config] == 0 || [file writable include/linux/autoconf.h ] == 0 } then {
.f0r_bot.save configure -state disabled
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
enum token {
tok_menuname,
tok_menuoption,
tok_comment,
tok_bool,
tok_tristate,
tok_dep_tristate,
tok_nop,
tok_if,
tok_else,
tok_fi,
tok_int,
tok_unknown
};
enum operator {
op_eq,
op_neq,
op_and,
op_or,
op_bang,
op_lparen,
op_rparen,
op_variable,
op_kvariable,
op_constant,
op_nuked
};
union var
{
char * str;
struct kconfig * cfg;
};
struct condition
{
struct condition * next;
enum operator op;
union var variable;
};
#define GLOBAL_WRITTEN 1
struct kconfig
{
struct kconfig * next;
int flags;
enum token tok;
char menu_number;
char menu_line;
char submenu_start;
char submenu_end;
char * optionname;
char * dflt;
char * label;
union var depend;
struct condition * cond;
};
extern struct kconfig * config;
extern struct kconfig * clast;
extern struct kconfig * koption;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment