Commit 34b2a5d2 authored by Linus Torvalds's avatar Linus Torvalds

Import pre2.0.3

parent 18a8b1c2
......@@ -755,7 +755,8 @@ D: SLS distribution
D: Initial implementation of VC's, pty's and select()
N: James B. MacLean
E: jmaclean@fox.nstn.ns.ca
E: macleajb@ednet.ns.ca
W: http://www.ednet.ns.ca/~macleajb/dosemu.html
D: Coordinator of DOSEMU releases
D: Program in DOSEMU
S: PO BOX 220, HFX. CENTRAL
......@@ -1007,7 +1008,7 @@ D: Author, Emacs VC and GUD modes
N: Stefan Reinauer
E: stepan@home.culture.mipt.ru
W: http://home.culture.mipt.ru/~stepan
D: Modulized affs and ufs. Minor fixes.
D: Modularized affs and ufs. Minor fixes.
S: Rebmannsweg 34h
S: 79539 Loerrach
S: Germany
......
This diff is collapsed.
This diff is collapsed.
......@@ -42,7 +42,7 @@ foo \kill}%
%
\title{{\bf Linux Allocated Devices}}
\author{Maintained by H. Peter Anvin $<$hpa@zytor.com$>$}
\date{Last revised: May 9, 1996}
\date{Last revised: May 12, 1996}
\maketitle
%
\noindent
......@@ -61,9 +61,10 @@ tsx-11.mit.edu in the directory {\file
/pub/linux/docs/linux-standards/fsstnd}.
To have a major number allocated, or a minor number in situations
where that applies (e.g.\ busmice), please contact me. Also, if you
have additional information regarding any of the devices listed below,
or if I have made a mistake, I would greatly appreciate a note.
where that applies (e.g.\ busmice), please contact me with the
appropriate device information. Also, if you have additional
information regarding any of the devices listed below, or if I have
made a mistake, I would greatly appreciate a note.
Allocations marked (68k/Amiga) apply to Linux/68k on the Amiga
platform only. Allocations marked (68k/Atari) apply to Linux/68k on
......@@ -389,13 +390,38 @@ disk.
\begin{devicelist}
\major{ 9}{}{char }{SCSI tape devices}
\minor{0}{/dev/st0}{First SCSI tape}
\minor{1}{/dev/st1}{Second SCSI tape}
\minor{0}{/dev/st0}{First SCSI tape, mode 0}
\minor{1}{/dev/st1}{Second SCSI tape, mode 0}
\minordots
\minor{128}{/dev/nst0}{First SCSI tape, no rewind-on-close}
\minor{129}{/dev/nst1}{Second SCSI tape, no rewind-on-close}
\minor{32}{/dev/st0l}{First SCSI tape, mode 1}
\minor{33}{/dev/st1l}{Second SCSI tape, mode 1}
\minordots
\\
\minor{64}{/dev/st0m}{First SCSI tape, mode 2}
\minor{65}{/dev/st1m}{Second SCSI tape, mode 2}
\minordots
\minor{96}{/dev/st0a}{First SCSI tape, mode 3}
\minor{97}{/dev/st1a}{Second SCSI tape, mode 4}
\minordots
\minor{128}{/dev/nst0}{First SCSI tape, mode 0, no rewind}
\minor{129}{/dev/nst1}{Second SCSI tape, mode 0, no rewind}
\minordots
\minor{160}{/dev/nst0l}{First SCSI tape, mode 1, no rewind}
\minor{161}{/dev/nst1l}{Second SCSI tape, mode 1, no rewind}
\minordots
\minor{192}{/dev/nst0m}{First SCSI tape, mode 2, no rewind}
\minor{193}{/dev/nst1m}{Second SCSI tape, mode 2, no rewind}
\minordots
\minor{224}{/dev/nst0a}{First SCSI tape, mode 3, no rewind}
\minor{225}{/dev/nst1a}{Second SCSI tape, mode 3, no rewind}
\minordots
\end{devicelist}
\noindent
``No rewind'' refers to the omission of the default automatic rewind
on device close. The {\file MTREW} or {\file MTOFFL} ioctl()s can be
used to rewind the tape regardless of the device used to access it.
\begin{devicelist}
\major{ }{}{block}{Metadisk (RAID) devices}
\minor{0}{/dev/md0}{First metadisk group}
\minor{1}{/dev/md1}{Second metadisk group}
......
......@@ -2,7 +2,7 @@
Maintained by H. Peter Anvin <hpa@zytor.com>
Last revised: May 9, 1996
Last revised: May 12, 1996
This list is the successor to Rick Miller's Linux Device List, which
he stopped maintaining when he got busy with other things in 1993. It
......@@ -18,9 +18,10 @@ Standard (FSSTND). The FSSTND is available via FTP from
tsx-11.mit.edu in the directory /pub/linux/docs/linux-standards/fsstnd.
To have a major number allocated, or a minor number in situations
where that applies (e.g. busmice), please contact me. Also, if you
have additional information regarding any of the devices listed below,
or if I have made a mistake, I would greatly appreciate a note.
where that applies (e.g. busmice), please contact me with the
appropriate device information. Also, if you have additional
information regarding any of the devices listed below, or if I have
made a mistake, I would greatly appreciate a note.
Allocations marked (68k/Amiga) apply to Linux/68k on the Amiga
platform only. Allocations marked (68k/Atari) apply to Linux/68k on
......@@ -214,12 +215,36 @@ least not without contacting me first.
partitions is 15.
9 char SCSI tape devices
0 = /dev/st0 First SCSI tape
1 = /dev/st1 Second SCSI tape
0 = /dev/st0 First SCSI tape, mode 0
1 = /dev/st1 Second SCSI tape, mode 0
...
128 = /dev/nst0 First SCSI tape, no rewind-on-close
129 = /dev/nst1 Second SCSI tape, no rewind-on-close
32 = /dev/st0l First SCSI tape, mode 1
33 = /dev/st1l Second SCSI tape, mode 1
...
64 = /dev/st0m First SCSI tape, mode 2
65 = /dev/st1m Second SCSI tape, mode 2
...
96 = /dev/st0a First SCSI tape, mode 3
97 = /dev/st1a Second SCSI tape, mode 3
...
128 = /dev/nst0 First SCSI tape, mode 0, no rewind
129 = /dev/nst1 Second SCSI tape, mode 0, no rewind
...
160 = /dev/nst0l First SCSI tape, mode 1, no rewind
161 = /dev/nst1l Second SCSI tape, mode 1, no rewind
...
192 = /dev/nst0m First SCSI tape, mode 2, no rewind
193 = /dev/nst1m Second SCSI tape, mode 2, no rewind
...
224 = /dev/nst0a First SCSI tape, mode 3, no rewind
225 = /dev/nst1a Second SCSI tape, mode 3, no rewind
...
"No rewind" refers to the omission of the default
automatic rewind on device close. The MTREW or MTOFFL
ioctl()'s can be used to rewind the tape regardless of
the device used to access it.
block Metadisk (RAID) devices
0 = /dev/md0 First metadisk group
1 = /dev/md1 Second metadisk group
......
JAVA Binary Kernel Support for Linux v1.01
------------------------------------------
Java(tm) Binary Kernel Support for Linux v1.01
----------------------------------------------
Linux beats them ALL! While all other OS's are TALKING about direct
support of Java Binaries in the OS, Linux is doing it!
......@@ -14,9 +14,15 @@ small details:
ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/Java-HOWTO
If you install the JDK in a location other than the suggested
directory of /usr/local/java, then you will need to edit the
kernel's fs/binfmt_java.c file and make the needed change to the
_PATH_JAVA definition at the top of that file.
directory of /usr/local/java, then you will need to tell the
kernel where you put the Java interpreter.
There are two ways to do this.
One, edit fs/binfmt_java.c file and make the needed change to
the _PATH_JAVA definition at the top of that file.
Two, as root, issue the command:
echo "/path/to/java/interpreter" > /proc/sys/kernel/java-interpreter
(Currently, this does not work if you're using a module for
Java support.)
2) You must chmod the '*.class' files you wish to execute with
the execute bit. This is not normally (till now) done with
......@@ -30,7 +36,6 @@ small details:
as a loadable module. If a module, load it with insmod or
kerneld.
To test your new setup, enter in the following simple Java app, and name
it "HelloWorld.java":
......@@ -75,9 +80,15 @@ demo/Blink/example1.html file), and:
with all known browsers.
2) If you install the JDK in a location other than the suggested
directory of /usr/local/java, then you will need to edit the
kernel's fs/binfmt_java.c file and make the needed change to the
_PATH_APPLET definition at the top of that file.
directory of /usr/local/java, then you will need to tell the
kernel where you put the Java appletviewer.
There are two ways to do this.
One, edit fs/binfmt_java.c file and make the needed change to
the _PATH_APPLET definition at the top of that file.
Two, as root, issue the command:
echo "/path/to/java/appletviewer" > /proc/sys/kernel/java-appletviewer
(Currently, this does not work if you're using a module for
Java support.)
3) You must chmod the '*.html' files you wish to execute with
the execute bit. This is not normally (till now) done with
......@@ -86,6 +97,7 @@ demo/Blink/example1.html file), and:
4) And then execute it.
Brian A. Lantz
brian@lantz.com
(/proc/sys/kernel/java-* support by Mike Shaver (shaver@ingenia.com))
Video Mode Selection Support 2.7
Video Mode Selection Support 2.9
(c) 1995, 1996 Martin Mares, <mj@k332.feld.cvut.cz>
--------------------------------------------------------------------------------
......@@ -243,3 +243,4 @@ this must be done manually -- no autodetection mechanisms are available.
- Screen store/restore fixed.
2.8 (14-Apr-96) - Previous release was not compilable without CONFIG_VIDEO_SVGA.
- Better recognition of text modes during mode scan.
2.9 (12-May-96) - Ignored VESA modes 0x80 - 0xff (more VESA BIOS bugs!)
......@@ -2,14 +2,14 @@
Alan Cox <alan@lxorguk.ukuu.org.uk>
Custom Linux Driver And Program Development
Custom Linux Driver And Program Development
The following watchdog drivers are currently implemented:
IMS WDT501-P
INS WDT501-P (no fan tachometer)
IMS WDT500-P
ICS WDT501-P
ICS WDT501-P (no fan tachometer)
ICS WDT500-P
Software Only
All four interfaces provide /dev/watchdog, which when open must be written
......@@ -40,6 +40,7 @@ Power Over X o o
Overheat X o o
The external event interfaces on the WDT boards are not currently supported.
Minor numbers are however allocated for it.
Example Watchdog Driver
......@@ -65,11 +66,17 @@ int main(int argc, const char *argv[])
}
> People keep asking about the WDT watchdog timer hardware: The phone contacts
> for Industrial Computer Source are:
>
> US: 619 677 0898 (sales) 0895 (general)
> UK: 01243 533900
> France (1) 69.18.74.30
>
> and please mention Linux when enquiring.
Contact Information
People keep asking about the WDT watchdog timer hardware: The phone contacts
for Industrial Computer Source are:
US: 619 677 0877 (sales) 0895 (fax)
UK: 01243 533900
France (1) 69.18.74.30
Industrial Computer Source
9950 Barnes Canyon Road
San Diego, CA
and please mention Linux when enquiring.
VERSION = 1
PATCHLEVEL = 99
SUBLEVEL = 2
SUBLEVEL = 3
ARCH = i386
......
......@@ -69,7 +69,6 @@ CONFIG_INET=y
# CONFIG_INET_PCTCP is not set
# CONFIG_INET_RARP is not set
# CONFIG_NO_PATH_MTU_DISCOVERY is not set
# CONFIG_TCP_NAGLE_OFF is not set
CONFIG_IP_NOSR=y
CONFIG_SKB_LARGE=y
......@@ -164,6 +163,7 @@ CONFIG_DE4X5=y
# Filesystems
#
# CONFIG_QUOTA is not set
# CONFIG_LOCK_MANDATORY is not set
# CONFIG_MINIX_FS is not set
# CONFIG_EXT_FS is not set
CONFIG_EXT2_FS=y
......
!
! Display adapter & video mode setup, version 2.8 (14-Apr-96)
! Display adapter & video mode setup, version 2.9 (12-May-96)
!
! Copyright (C) 1995, 1996 Martin Mares <mj@k332.feld.cvut.cz>
! Based on the original setup.S code (C) Linus Torvalds
......@@ -879,8 +879,8 @@ vesa1: seg gs ! Get next mode in the list
jz vesar
cmp ax,#0x0080 ! Check validity of mode ID
jc vesa2
or ah,ah ! Valid ID's are 0x0000-0x007f
jz vesae ! and 0x0100-0x07ff.
or ah,ah ! Valid ID's are 0x0000-0x007f and 0x0100-0x07ff
jz vesan ! [Certain BIOSes errorneously report 0x80-0xff]
cmp ax,#0x0800
jnc vesae
vesa2: push cx
......
......@@ -33,7 +33,9 @@ fi
bool 'System V IPC' CONFIG_SYSVIPC
tristate 'Kernel support for a.out binaries' CONFIG_BINFMT_AOUT
tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF
tristate 'Kernel support for JAVA binaries' CONFIG_BINFMT_JAVA
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
tristate 'Kernel support for JAVA binaries' CONFIG_BINFMT_JAVA
fi
bool 'Compile kernel as ELF - if your GCC is ELF-GCC' CONFIG_KERNEL_ELF
choice 'Processor type' \
......
......@@ -24,7 +24,6 @@ CONFIG_PCI=y
CONFIG_SYSVIPC=y
CONFIG_BINFMT_AOUT=y
CONFIG_BINFMT_ELF=y
# CONFIG_BINFMT_JAVA is not set
CONFIG_KERNEL_ELF=y
# CONFIG_M386 is not set
# CONFIG_M486 is not set
......@@ -69,7 +68,6 @@ CONFIG_INET=y
# CONFIG_INET_PCTCP is not set
# CONFIG_INET_RARP is not set
# CONFIG_NO_PATH_MTU_DISCOVERY is not set
# CONFIG_TCP_NAGLE_OFF is not set
CONFIG_IP_NOSR=y
CONFIG_SKB_LARGE=y
......@@ -124,6 +122,7 @@ CONFIG_EL3=y
# Filesystems
#
# CONFIG_QUOTA is not set
# CONFIG_LOCK_MANDATORY is not set
CONFIG_MINIX_FS=y
# CONFIG_EXT_FS is not set
CONFIG_EXT2_FS=y
......
......@@ -534,8 +534,10 @@ void smp_commence(void)
void smp_callin(void)
{
extern void calibrate_delay(void);
int cpuid=GET_APIC_ID(apic_read(APIC_ID));
unsigned long l;
/*
* Activate our APIC
*/
......
......@@ -213,7 +213,7 @@ static void extended_partition(struct gendisk *hd, kdev_t dev)
* Create devices for BSD partitions listed in a disklabel, under a
* dos-like partition. See extended_partition() for more information.
*/
static void bsd_disklabel_partition(struct gendisk *hd, int dev)
static void bsd_disklabel_partition(struct gendisk *hd, kdev_t dev)
{
struct buffer_head *bh;
struct bsd_disklabel *l;
......@@ -470,7 +470,7 @@ static int osf_partition(struct gendisk *hd, unsigned int dev, unsigned long fir
#ifdef CONFIG_SUN_PARTITION
static int sun_partition(struct gendisk *hd, unsigned int dev, unsigned long first_sector)
static int sun_partition(struct gendisk *hd, kdev_t dev, unsigned long first_sector)
{
int i, csum;
unsigned short *ush;
......@@ -512,13 +512,15 @@ static int sun_partition(struct gendisk *hd, unsigned int dev, unsigned long fir
: (__u32)(x))
if(!(bh = bread(dev, 0, 1024))) {
printk("Dev %d: unable to read partition table\n", dev);
printk("Dev %s: unable to read partition table\n",
kdevname(dev));
return -1;
}
label = (struct sun_disklabel *) bh->b_data;
p = label->partitions;
if (label->magic != SUN_LABEL_MAGIC && label->magic != SUN_LABEL_MAGIC_SWAPPED) {
printk("Dev %d Sun disklabel: bad magic %04x\n", dev, label->magic);
printk("Dev %s Sun disklabel: bad magic %04x\n",
kdevname(dev), label->magic);
brelse(bh);
return 0;
}
......@@ -528,7 +530,8 @@ static int sun_partition(struct gendisk *hd, unsigned int dev, unsigned long fir
for(csum = 0; ush >= ((unsigned short *) label);)
csum ^= *ush--;
if(csum) {
printk("Dev %d Sun disklabel: Csum bad, label corrupted\n", dev);
printk("Dev %s Sun disklabel: Csum bad, label corrupted\n",
kdevname(dev));
brelse(bh);
return 0;
}
......
......@@ -128,7 +128,8 @@ static int linear_map (struct md_dev *mddev, kdev_t *rdev,
tmp_dev=hash->dev0;
if (block >= (tmp_dev->size + tmp_dev->offset) || block < tmp_dev->offset)
printk ("Block %ld out of bounds on dev %04x size %d offset %d\n", block, tmp_dev->dev, tmp_dev->size, tmp_dev->offset);
printk ("Block %ld out of bounds on dev %s size %d offset %d\n",
block, kdevname(tmp_dev->dev), tmp_dev->size, tmp_dev->offset);
*rdev=tmp_dev->dev;
*rsector=(block-(tmp_dev->offset)) << 1;
......
......@@ -28,7 +28,7 @@ int cdrom_open(struct inode *ip, struct file *fp);
void cdrom_release(struct inode *ip, struct file *fp);
int cdrom_ioctl(struct inode *ip, struct file *fp,
unsigned int cmd, unsigned long arg);
int cdrom_media_changed(dev_t dev);
int cdrom_media_changed(kdev_t dev);
struct file_operations cdrom_fops =
{
......@@ -107,11 +107,11 @@ int unregister_cdrom(int major, char *name)
* is in their own interest: device control becomes a lot easier
* this way.
*/
int open_for_data(struct cdrom_device_ops *, int);
int open_for_data(struct cdrom_device_ops *, kdev_t);
int cdrom_open(struct inode *ip, struct file *fp)
{
dev_t dev = ip->i_rdev;
kdev_t dev = ip->i_rdev;
struct cdrom_device_ops *cdo = cdromdevs[MAJOR(dev)];
int purpose = !!(fp->f_flags & O_NONBLOCK);
......@@ -126,7 +126,7 @@ int cdrom_open(struct inode *ip, struct file *fp)
return open_for_data(cdo, dev);
}
int open_for_data(struct cdrom_device_ops * cdo, int dev)
int open_for_data(struct cdrom_device_ops * cdo, kdev_t dev)
{
int ret;
if (cdo->drive_status != NULL) {
......@@ -163,7 +163,7 @@ int open_for_data(struct cdrom_device_ops * cdo, int dev)
/* Admittedly, the logic below could be performed in a nicer way. */
void cdrom_release(struct inode *ip, struct file *fp)
{
dev_t dev = ip->i_rdev;
kdev_t dev = ip->i_rdev;
struct cdrom_device_ops *cdo = cdromdevs[MAJOR(dev)];
if (cdo == NULL || MINOR(dev) >= cdo->minors)
......@@ -192,7 +192,7 @@ void cdrom_release(struct inode *ip, struct file *fp)
* in the lower 16 bits, queue 1 in the higher 16 bits.
*/
int media_changed(dev_t dev, int queue)
int media_changed(kdev_t dev, int queue)
{
unsigned int major = MAJOR(dev);
unsigned int minor = MINOR(dev);
......@@ -212,7 +212,7 @@ int media_changed(dev_t dev, int queue)
return ret;
}
int cdrom_media_changed(dev_t dev)
int cdrom_media_changed(kdev_t dev)
{
struct cdrom_device_ops *cdo = cdromdevs[MAJOR(dev)];
if (cdo == NULL || MINOR(dev) >= cdo->minors)
......@@ -290,7 +290,7 @@ void sanitize_format(union cdrom_addr *addr,
int cdrom_ioctl(struct inode *ip, struct file *fp,
unsigned int cmd, unsigned long arg)
{
dev_t dev = ip->i_rdev;
kdev_t dev = ip->i_rdev;
struct cdrom_device_ops *cdo = cdromdevs[MAJOR(dev)];
if (cdo == NULL || MINOR(dev) >= cdo->minors)
......
......@@ -580,7 +580,7 @@ void get_disc_status(void)
/* The new open. The real opening strategy is defined in cdrom.c. */
static int cm206_open(dev_t dev, int purpose)
static int cm206_open(kdev_t dev, int purpose)
{
if (!cd->openfiles) { /* reset only first time */
cd->background=0;
......@@ -593,7 +593,7 @@ static int cm206_open(dev_t dev, int purpose)
return 0;
}
static void cm206_release(dev_t dev)
static void cm206_release(kdev_t dev)
{
if (cd->openfiles==1) {
if (cd->background) {
......@@ -885,7 +885,7 @@ void get_toc_entry(struct cdrom_tocentry * ep)
* upon success. Memory checking has been done by cdrom_ioctl(), the
* calling function, as well as LBA/MSF sanitization.
*/
int cm206_audio_ioctl(dev_t dev, unsigned int cmd, void * arg)
int cm206_audio_ioctl(kdev_t dev, unsigned int cmd, void * arg)
{
switch (cmd) {
case CDROMREADTOCHDR:
......@@ -930,7 +930,7 @@ int cm206_audio_ioctl(dev_t dev, unsigned int cmd, void * arg)
some driver statistics accessible through ioctl calls.
*/
static int cm206_ioctl(dev_t dev, unsigned int cmd, unsigned long arg)
static int cm206_ioctl(kdev_t dev, unsigned int cmd, unsigned long arg)
{
switch (cmd) {
#ifdef STATISTICS
......@@ -947,7 +947,7 @@ static int cm206_ioctl(dev_t dev, unsigned int cmd, unsigned long arg)
}
}
int cm206_media_changed(dev_t dev)
int cm206_media_changed(kdev_t dev)
{
if (cd != NULL) {
int r;
......@@ -963,14 +963,14 @@ int cm206_media_changed(dev_t dev)
the logic should be in cdrom.c */
/* returns number of times device is in use */
int cm206_open_files(dev_t dev)
int cm206_open_files(kdev_t dev)
{
if (cd) return cd->openfiles;
return -1;
}
/* controls tray movement */
int cm206_tray_move(dev_t dev, int position)
int cm206_tray_move(kdev_t dev, int position)
{
if (position) { /* 1: eject */
type_0_command(c_open_tray,1);
......@@ -981,7 +981,7 @@ int cm206_tray_move(dev_t dev, int position)
}
/* gives current state of the drive */
int cm206_drive_status(dev_t dev)
int cm206_drive_status(kdev_t dev)
{
get_drive_status();
if (cd->dsb & dsb_tray_not_closed) return CDS_TRAY_OPEN;
......@@ -991,7 +991,7 @@ int cm206_drive_status(dev_t dev)
}
/* gives current state of disc in drive */
int cm206_disc_status(dev_t dev)
int cm206_disc_status(kdev_t dev)
{
uch xa;
get_drive_status();
......@@ -1009,7 +1009,7 @@ int cm206_disc_status(dev_t dev)
}
/* locks or unlocks door lock==1: lock; return 0 upon success */
int cm206_lock_door(dev_t dev, int lock)
int cm206_lock_door(kdev_t dev, int lock)
{
uch command = (lock) ? c_lock_tray : c_unlock_tray;
type_0_command(command, 1); /* wait and get dsb */
......@@ -1020,7 +1020,7 @@ int cm206_lock_door(dev_t dev, int lock)
/* Although a session start should be in LBA format, we return it in
MSF format because it is slightly easier, and the new generic ioctl
will take care of the necessary conversion. */
int cm206_get_last_session(dev_t dev, struct cdrom_multisession * mssp)
int cm206_get_last_session(kdev_t dev, struct cdrom_multisession * mssp)
{
if (!FIRST_TRACK) get_disc_status();
if (mssp != NULL) {
......@@ -1038,7 +1038,7 @@ int cm206_get_last_session(dev_t dev, struct cdrom_multisession * mssp)
return 0;
}
int cm206_get_upc(dev_t dev, struct cdrom_mcn * mcn)
int cm206_get_upc(kdev_t dev, struct cdrom_mcn * mcn)
{
uch upc[10];
char * ret = mcn->medium_catalog_number;
......@@ -1054,7 +1054,7 @@ int cm206_get_upc(dev_t dev, struct cdrom_mcn * mcn)
return 0;
}
int cm206_reset(dev_t dev)
int cm206_reset(kdev_t dev)
{
stop_read();
reset_cm260();
......
This diff is collapsed.
......@@ -9,11 +9,11 @@
* Also for the TEAC CD-55A drive.
* Also for the ECS-AT "Vertos 100" drive.
* Not for Sanyo drives (but for the H94A, sjcd is there...).
* Not for any other Funai drives than the CD200 types
* (sometimes labelled E2550UA or MK4015 or E2880UA).
* Not for any other Funai drives than the CD200 types (sometimes
* labelled E2550UA or MK4015 or 2800F).
*/
#define VERSION "v4.2 Eberhard Moenkeberg <emoenke@gwdg.de>"
#define VERSION "v4.3 Eberhard Moenkeberg <emoenke@gwdg.de>"
/* Copyright (C) 1993, 1994, 1995 Eberhard Moenkeberg <emoenke@gwdg.de>
*
......@@ -274,6 +274,11 @@
* is user-configurable (even at runtime), but to get aware of this, one
* needs a special mental quality: the ability to read.
*
* 4.3 CD200F does not like to receive a command while the drive is
* reading the ToC; still trying to solve it.
* Removed some redundant verify_area calls (yes, Heiko Eissfeldt
* is visiting all the Linux CDROM drivers ;-).
*
*
* TODO
*
......@@ -728,6 +733,12 @@ static struct timer_list audio_timer = { NULL, NULL, 0, 0, mark_timeout_audio};
*/
static void msg(int level, const char *fmt, ...)
{
#if DISTRIBUTION
#define MSG_LEVEL KERN_NOTICE
#else
#define MSG_LEVEL KERN_INFO
#endif DISTRIBUTION
char buf[256];
va_list args;
......@@ -735,7 +746,7 @@ static void msg(int level, const char *fmt, ...)
msgnum++;
if (msgnum>99) msgnum=0;
sprintf(buf, KERN_NOTICE "%s-%d [%02d]: ", major_name, d, msgnum);
sprintf(buf, MSG_LEVEL "%s-%d [%02d]: ", major_name, d, msgnum);
va_start(args, fmt);
vsprintf(&buf[18], fmt, args);
va_end(args);
......@@ -1645,7 +1656,7 @@ static int cc_SetSpeed(u_char speed, u_char x1, u_char x2)
drvcmd[2]=0;
drvcmd[3]=150;
}
flags_cmd_out=f_putcmd|f_ResponseStatus;
flags_cmd_out=f_putcmd|f_ResponseStatus|f_obey_p_check;
}
else if (famT_drive)
{
......@@ -3975,7 +3986,7 @@ static int sbpcd_ioctl(struct inode *inode, struct file *file, u_int cmd,
case CDROMREADTOCENTRY: /* Read an entry in the table of contents */
msg(DBG_IOC,"ioctl: CDROMREADTOCENTRY entered.\n");
st=verify_area(VERIFY_READ, (void *) arg, sizeof(struct cdrom_tocentry));
st=verify_area(VERIFY_WRITE,(void *) arg, sizeof(struct cdrom_tocentry));
if (st) return (st);
memcpy_fromfs(&tocentry, (void *) arg, sizeof(struct cdrom_tocentry));
i=tocentry.cdte_track;
......@@ -3993,8 +4004,6 @@ static int sbpcd_ioctl(struct inode *inode, struct file *file, u_int cmd,
else if (tocentry.cdte_format==CDROM_LBA) /* blk required */
tocentry.cdte_addr.lba=msf2blk(D_S[d].TocBuffer[i].address);
else return (-EINVAL);
st=verify_area(VERIFY_WRITE,(void *) arg, sizeof(struct cdrom_tocentry));
if (st) return (st);
memcpy_tofs((void *) arg, &tocentry, sizeof(struct cdrom_tocentry));
return (0);
......@@ -4069,8 +4078,6 @@ static int sbpcd_ioctl(struct inode *inode, struct file *file, u_int cmd,
}
st=verify_area(VERIFY_WRITE, (void *) arg, sizeof(struct cdrom_subchnl));
if (st) return (st);
st=verify_area(VERIFY_READ, (void *) arg, sizeof(struct cdrom_subchnl));
if (st) return (st);
memcpy_fromfs(&SC, (void *) arg, sizeof(struct cdrom_subchnl));
switch (D_S[d].audio_state)
{
......@@ -4355,7 +4362,7 @@ static int sbpcd_ioctl(struct inode *inode, struct file *file, u_int cmd,
case CDROMMULTISESSION: /* tell start-of-last-session */
msg(DBG_IOC,"ioctl: CDROMMULTISESSION entered.\n");
st=verify_area(VERIFY_READ, (void *) arg, sizeof(struct cdrom_multisession));
st=verify_area(VERIFY_WRITE,(void *) arg, sizeof(struct cdrom_multisession));
if (st) return (st);
memcpy_fromfs(&ms_info, (void *) arg, sizeof(struct cdrom_multisession));
if (ms_info.addr_format==CDROM_MSF) /* MSF-bin requested */
......@@ -4365,8 +4372,6 @@ static int sbpcd_ioctl(struct inode *inode, struct file *file, u_int cmd,
else return (-EINVAL);
if (D_S[d].f_multisession) ms_info.xa_flag=1; /* valid redirection address */
else ms_info.xa_flag=0; /* invalid redirection address */
st=verify_area(VERIFY_WRITE,(void *) arg, sizeof(struct cdrom_multisession));
if (st) return (st);
memcpy_tofs((void *) arg, &ms_info, sizeof(struct cdrom_multisession));
msg(DBG_MUL,"ioctl: CDROMMULTISESSION done (%d, %08X).\n",
ms_info.xa_flag, ms_info.addr.lba);
......
......@@ -52,13 +52,13 @@ bool 'Watchdog Timer Support' CONFIG_WATCHDOG
if [ "$CONFIG_WATCHDOG" != "n" ]; then
bool ' Disable watchdog shutdown on close' CONFIG_WATCHDOG_NOWAYOUT
tristate ' WDT Watchdog timer' CONFIG_WDT
if [ "$CONFIG_WDT" = "y" ]; then
if [ "$CONFIG_WDT" != "n" ]; then
bool ' WDT501 features' CONFIG_WDT_501
if [ "$CONFIG_WDT_501" = "y" ]; then
bool ' Fan Tachometer' CONFIG_WDT_501_FAN
fi
else
bool ' Software Watchdog' CONFIG_SOFT_WATCHDOG
tristate ' Software Watchdog' CONFIG_SOFT_WATCHDOG
fi
fi
bool 'Enhanced Real Time Clock Support' CONFIG_RTC
......
......@@ -127,10 +127,14 @@ ifeq ($(CONFIG_UMISC),y)
M = y
endif
ifdef CONFIG_SOFT_WATCHDOG
L_OBJS += softdog.o
ifeq ($(CONFIG_SOFT_WATCHDOG),y)
M = y
# This is not modularized, so if configured then "misc.c" will be resident
L_OBJS += softdog.o
else
ifeq ($(CONFIG_SOFT_WATCHDOG),m)
M_OBJS += softdog.o
MM = m
endif
endif
ifdef CONFIG_SUN_MOUSE
......
......@@ -173,7 +173,7 @@ static inline void kb_wait(void)
for (i=0; i<0x100000; i++)
if ((inb_p(0x64) & 0x02) == 0)
return;
printk("Keyboard timed out\n");
printk(KERN_WARNING "Keyboard timed out\n");
}
static inline void send_cmd(unsigned char c)
......@@ -361,7 +361,7 @@ static void keyboard_interrupt(int irq, void *dev_id, struct pt_regs *regs)
if (!(status & 0x21)) { /* neither ODS nor OBF */
scancode = inb(0x60); /* read data anyway */
#if 0
printk("keyboard: status 0x%x mask 0x%x data 0x%x\n",
printk(KERN_DEBUG "keyboard: status 0x%x mask 0x%x data 0x%x\n",
status, kbd_read_mask, scancode);
#endif
}
......@@ -383,12 +383,13 @@ static void keyboard_interrupt(int irq, void *dev_id, struct pt_regs *regs)
/* strange ... */
reply_expected = 1;
#if 0
printk("keyboard reply expected - got %02x\n", scancode);
printk(KERN_DEBUG "keyboard reply expected - got %02x\n",
scancode);
#endif
}
if (scancode == 0) {
#ifdef KBD_REPORT_ERR
printk("keyboard buffer overflow\n");
printk(KERN_INFO "keyboard buffer overflow\n");
#endif
prev_scancode = 0;
goto end_kbd_intr;
......@@ -412,7 +413,7 @@ static void keyboard_interrupt(int irq, void *dev_id, struct pt_regs *regs)
#ifndef KBD_IS_FOCUS_9000
#ifdef KBD_REPORT_ERR
if (!raw_mode)
printk("keyboard error\n");
printk(KERN_DEBUG "keyboard error\n");
#endif
#endif
prev_scancode = 0;
......@@ -445,7 +446,7 @@ static void keyboard_interrupt(int irq, void *dev_id, struct pt_regs *regs)
} else {
#ifdef KBD_REPORT_UNKN
if (!raw_mode)
printk("keyboard: unknown e1 escape sequence\n");
printk(KERN_INFO "keyboard: unknown e1 escape sequence\n");
#endif
prev_scancode = 0;
goto end_kbd_intr;
......@@ -473,7 +474,8 @@ static void keyboard_interrupt(int irq, void *dev_id, struct pt_regs *regs)
else {
#ifdef KBD_REPORT_UNKN
if (!raw_mode)
printk("keyboard: unknown scancode e0 %02x\n", scancode);
printk(KERN_INFO "keyboard: unknown scancode e0 %02x\n",
scancode);
#endif
goto end_kbd_intr;
}
......@@ -494,8 +496,8 @@ static void keyboard_interrupt(int irq, void *dev_id, struct pt_regs *regs)
if (!keycode) {
if (!raw_mode) {
#ifdef KBD_REPORT_UNKN
printk("keyboard: unrecognized scancode (%02x) - ignored\n"
, scancode);
printk(KERN_INFO "keyboard: unrecognized scancode (%02x)"
" - ignored\n", scancode);
#endif
}
goto end_kbd_intr;
......@@ -796,7 +798,7 @@ static void do_spec(unsigned char value, char up_flag)
static void do_lowercase(unsigned char value, char up_flag)
{
printk("keyboard.c: do_lowercase was called - impossible\n");
printk(KERN_ERR "keyboard.c: do_lowercase was called - impossible\n");
}
static void do_self(unsigned char value, char up_flag)
......@@ -878,7 +880,7 @@ static void do_fn(unsigned char value, char up_flag)
if (func_table[value])
puts_queue(func_table[value]);
} else
printk("do_fn called with value=%d\n", value);
printk(KERN_ERR "do_fn called with value=%d\n", value);
}
static void do_pad(unsigned char value, char up_flag)
......@@ -1313,7 +1315,8 @@ static int initialize_kbd(void)
*/
kbd_write(KBD_CNTL_REG, KBD_SELF_TEST);
if (kbd_wait_for_input() != 0x55) {
printk("initialize_kbd: keyboard failed self test.\n");
printk(KERN_WARNING "initialize_kbd: "
"keyboard failed self test.\n");
restore_flags(flags);
return(-1);
}
......@@ -1325,7 +1328,8 @@ static int initialize_kbd(void)
*/
kbd_write(KBD_CNTL_REG, KBD_SELF_TEST2);
if (kbd_wait_for_input() != 0x00) {
printk("initialize_kbd: keyboard failed self test 2.\n");
printk(KERN_WARNING "initialize_kbd: "
"keyboard failed self test 2.\n");
restore_flags(flags);
return(-1);
}
......@@ -1341,13 +1345,15 @@ static int initialize_kbd(void)
*/
kbd_write(KBD_DATA_REG, KBD_RESET);
if (kbd_wait_for_input() != KBD_ACK) {
printk("initialize_kbd: reset kbd failed, no ACK.\n");
printk(KERN_WARNING "initialize_kbd: "
"reset kbd failed, no ACK.\n");
restore_flags(flags);
return(-1);
}
if (kbd_wait_for_input() != KBD_POR) {
printk("initialize_kbd: reset kbd failed, not POR.\n");
printk(KERN_WARNING "initialize_kbd: "
"reset kbd failed, not POR.\n");
restore_flags(flags);
return(-1);
}
......@@ -1357,7 +1363,8 @@ static int initialize_kbd(void)
*/
kbd_write(KBD_DATA_REG, KBD_DISABLE);
if (kbd_wait_for_input() != KBD_ACK) {
printk("initialize_kbd: disable kbd failed, no ACK.\n");
printk(KERN_WARNING "initialize_kbd: "
"disable kbd failed, no ACK.\n");
restore_flags(flags);
return(-1);
}
......@@ -1375,7 +1382,8 @@ static int initialize_kbd(void)
*/
kbd_write(KBD_DATA_REG, KBD_ENABLE);
if (kbd_wait_for_input() != KBD_ACK) {
printk("initialize_kbd: keyboard enable failed.\n");
printk(KERN_WARNING "initialize_kbd: "
"keyboard enable failed.\n");
restore_flags(flags);
return(-1);
}
......
/*
* SoftDog 0.02: A Software Watchdog Device
* SoftDog 0.04: A Software Watchdog Device
*
* (c) Copyright 1995 Alan Cox <alan@lxorguk.ukuu.org.uk>
*
......@@ -16,8 +16,15 @@
*
* Software only watchdog driver. Unlike its big brother the WDT501P
* driver this won't always recover a failed machine.
*
* 03/96: Angelo Haritsis <ah@doc.ic.ac.uk> :
* Modularised.
* Added soft_margin; use upon insmod to change the timer delay.
* NB: uses same minor as wdt (WATCHDOG_MINOR); we could use separate
* minors.
*/
#include <linux/module.h>
#include <linux/config.h>
#include <linux/types.h>
#include <linux/kernel.h>
......@@ -26,7 +33,9 @@
#include <linux/miscdevice.h>
#define WATCHDOG_MINOR 130
#define TIMER_MARGIN (60*HZ) /* Allow 1 minute */
#define TIMER_MARGIN 60 /* (secs) Default is 1 minute */
static int soft_margin = TIMER_MARGIN; /* in seconds */
/*
* Our timer
......@@ -43,8 +52,13 @@ static int timer_alive = 0;
static void watchdog_fire(unsigned long data)
{
extern void hard_reset_now(void);
#ifdef ONLY_TESTING
printk(KERN_CRIT "SOFTDOG: Would Reboot.\n");
#else
printk(KERN_CRIT "SOFTDOG: Initiating system reboot.\n");
hard_reset_now();
printk("WATCHDOG: Reboot didn't ?????\n");
#endif
}
/*
......@@ -55,10 +69,11 @@ static int softdog_open(struct inode *inode, struct file *file)
{
if(timer_alive)
return -EBUSY;
MOD_INC_USE_COUNT;
/*
* Activate timer
*/
watchdog_ticktock.expires=jiffies+TIMER_MARGIN;
watchdog_ticktock.expires=jiffies + (soft_margin * HZ);
add_timer(&watchdog_ticktock);
timer_alive++;
return 0;
......@@ -68,11 +83,13 @@ static void softdog_release(struct inode *inode, struct file *file)
{
/*
* Shut off the timer.
* Lock it in if it's a module and we defined ...NOWAYOUT
*/
#ifndef CONFIG_WATCHDOG_NOWAYOUT
del_timer(&watchdog_ticktock);
#endif
MOD_DEC_USE_COUNT;
timer_alive=0;
#endif
}
static int softdog_write(struct inode *inode, struct file *file, const char *data, int len)
......@@ -81,39 +98,50 @@ static int softdog_write(struct inode *inode, struct file *file, const char *dat
* Refresh the timer.
*/
del_timer(&watchdog_ticktock);
watchdog_ticktock.expires=jiffies+TIMER_MARGIN;
watchdog_ticktock.expires=jiffies + (soft_margin * HZ);
add_timer(&watchdog_ticktock);
return 1;
}
/*
* The mouse stuff ought to be renamed misc_register etc before 1.4...
*/
void watchdog_init(void)
static struct file_operations softdog_fops=
{
NULL, /* Seek */
NULL, /* Read */
softdog_write, /* Write */
NULL, /* Readdir */
NULL, /* Select */
NULL, /* Ioctl */
NULL, /* MMap */
softdog_open,
softdog_release,
NULL,
NULL /* Fasync */
};
static struct miscdevice softdog_miscdev=
{
static struct file_operations softdog_fops=
{
NULL, /* Seek */
NULL, /* Read */
softdog_write, /* Write */
NULL, /* Readdir */
NULL, /* Select */
NULL, /* Ioctl */
NULL, /* MMap */
softdog_open,
softdog_release,
NULL,
NULL /* Fasync */
};
static struct miscdevice softdog_mouse={
WATCHDOG_MINOR,
"softdog",
&softdog_fops
};
WATCHDOG_MINOR,
"softdog",
&softdog_fops
};
misc_register(&softdog_mouse);
void watchdog_init(void)
{
misc_register(&softdog_miscdev);
init_timer(&watchdog_ticktock);
watchdog_ticktock.function=watchdog_fire;
printk("Software Watchdog Timer: 0.03\n");
printk("Software Watchdog Timer: 0.04, timer margin: %d sec\n", soft_margin);
}
#ifdef MODULE
int init_module(void)
{
watchdog_init();
return 0;
}
void cleanup_module(void)
{
misc_deregister(&softdog_miscdev);
}
#endif
......@@ -236,6 +236,7 @@ int vt_ioctl(struct tty_struct *tty, struct file * file,
* If the time is zero, turn off sound ourselves.
*/
ticks = HZ * ((arg >> 16) & 0xffff) / 1000;
if ((arg & 0xffff) == 0 ) arg |= 1; /* jp: huh? */
count = ticks ? (1193180 / (arg & 0xffff)) : 0;
kd_mksound(count, ticks);
return 0;
......@@ -700,7 +701,7 @@ int vt_ioctl(struct tty_struct *tty, struct file * file,
if (!perm)
return -EPERM;
i = verify_area(VERIFY_WRITE, (void *)vtmode, sizeof(struct vt_mode));
i = verify_area(VERIFY_READ, (void *)vtmode, sizeof(struct vt_mode));
if (i)
return i;
mode = get_user(&vtmode->mode);
......
......@@ -219,7 +219,7 @@ void isdn_tty_modem_hup(modem_info * info)
}
}
static inline int isdn_tty_paranoia_check(modem_info * info, dev_t device, const char *routine)
static inline int isdn_tty_paranoia_check(modem_info * info, kdev_t device, const char *routine)
{
#ifdef MODEM_PARANOIA_CHECK
if (!info) {
......
......@@ -20,6 +20,7 @@ tristate 'SLIP (serial line) support' CONFIG_SLIP
if [ "$CONFIG_SLIP" != "n" ]; then
bool ' CSLIP compressed headers' CONFIG_SLIP_COMPRESSED
bool ' Keepalive and linefill' CONFIG_SLIP_SMART
bool ' Six bit SLIP encapsulation' CONFIG_SLIP_MODE_SLIP6
fi
bool 'Radio network interfaces' CONFIG_NET_RADIO
if [ "$CONFIG_NET_RADIO" != "n" ]; then
......
......@@ -56,9 +56,6 @@
#include <linux/config.h>
#include <linux/module.h>
/* Undef this, if you don't need 6bit encapsulation code in the driver */
#define CONFIG_SLIP_MODE_SLIP6
#include <asm/system.h>
#include <asm/segment.h>
#include <asm/bitops.h>
......
......@@ -951,7 +951,7 @@ int ultrastor_abort(Scsi_Cmnd *SCpnt)
return SCSI_ABORT_SUCCESS;
}
int ultrastor_reset(Scsi_Cmnd * SCpnt)
int ultrastor_reset(Scsi_Cmnd * SCpnt, unsigned int reset_flags)
{
int flags;
register int i;
......@@ -1044,7 +1044,7 @@ static void ultrastor_interrupt(int irq, void *dev_id, struct pt_regs *regs)
printk("Ux4F interrupt: bad MSCP address %x\n", (unsigned int) mscp);
/* A command has been lost. Reset and report an error
for all commands. */
ultrastor_reset(NULL);
ultrastor_reset(NULL, 0);
return;
}
#endif
......
......@@ -18,7 +18,7 @@ int ultrastor_detect(Scsi_Host_Template *);
const char *ultrastor_info(struct Scsi_Host * shpnt);
int ultrastor_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
int ultrastor_abort(Scsi_Cmnd *);
int ultrastor_reset(Scsi_Cmnd *);
int ultrastor_reset(Scsi_Cmnd *, unsigned int);
int ultrastor_biosparam(Disk *, kdev_t, int *);
......
......@@ -5,6 +5,7 @@ mainmenu_option next_comment
comment 'Filesystems'
bool 'Quota support' CONFIG_QUOTA
bool 'Mandatory lock support' CONFIG_LOCK_MANDATORY
tristate 'Minix fs support' CONFIG_MINIX_FS
tristate 'Extended fs support' CONFIG_EXT_FS
tristate 'Second extended fs support' CONFIG_EXT2_FS
......
......@@ -14,7 +14,10 @@
#define _PATH_JAVA "/usr/bin/java"
#define _PATH_APPLET "/usr/bin/appletviewer"
#define _PATH_SH "/bin/sh"
#define _PATH_SH "/bin/bash"
char binfmt_java_interpreter[65] = _PATH_JAVA;
char binfmt_java_appletviewer[65] = _PATH_APPLET;
static int do_load_script(struct linux_binprm *bprm,struct pt_regs *regs)
{
......@@ -47,7 +50,7 @@ static int do_load_script(struct linux_binprm *bprm,struct pt_regs *regs)
bprm->p = copy_strings(1, &i_name, bprm->page, bprm->p, 2);
bprm->argc++;
strcpy (bprm->buf, _PATH_JAVA);
strcpy (bprm->buf, binfmt_java_interpreter);
cp = bprm->buf;
bprm->p = copy_strings(1, &cp, bprm->page, bprm->p, 2);
bprm->argc++;
......@@ -102,12 +105,12 @@ static int do_load_applet(struct linux_binprm *bprm,struct pt_regs *regs)
bprm->p = copy_strings(1, &i_name, bprm->page, bprm->p, 2);
bprm->argc++;
strcpy (bprm->buf, _PATH_APPLET);
strcpy (bprm->buf, binfmt_java_appletviewer);
cp = bprm->buf;
bprm->p = copy_strings(1, &cp, bprm->page, bprm->p, 2);
bprm->argc++;
strcpy (bprm->buf, _PATH_BSHELL);
strcpy (bprm->buf, _PATH_SH);
interp = bprm->buf;
if ((i_name = strrchr (bprm->buf, '/')) != NULL)
i_name++;
......
......@@ -25,7 +25,7 @@
/* serial module kerneld load support */
struct tty_driver *get_tty_driver(kdev_t device);
#define isa_tty_dev(ma) (ma == TTY_MAJOR || ma == TTYAUX_MAJOR)
#define need_serial(ma,mi) (get_tty_driver(to_kdev_t(MKDEV(ma,mi))) == NULL)
#define need_serial(ma,mi) (get_tty_driver(MKDEV(ma,mi)) == NULL)
#endif
struct device_struct {
......
......@@ -904,7 +904,8 @@ int dquot_transfer(struct inode *inode, struct iattr *iattr, char direction)
void dquot_init(void)
{
printk("VFS: Diskquotas version %s initialized\r\n", __DQUOT_VERSION__);
printk(KERN_NOTICE "VFS: Diskquotas version %s initialized\r\n",
__DQUOT_VERSION__);
memset(hash_table, 0, sizeof(hash_table));
memset((caddr_t)&dqstats, 0, sizeof(dqstats));
first_dquot = NODQUOT;
......
......@@ -124,7 +124,7 @@ struct file * get_empty_filp(void)
#ifdef CONFIG_QUOTA
void add_dquot_ref(dev_t dev, short type)
void add_dquot_ref(kdev_t dev, short type)
{
struct file *filp;
int cnt;
......@@ -139,7 +139,7 @@ void add_dquot_ref(dev_t dev, short type)
}
}
void reset_dquot_ptrs(dev_t dev, short type)
void reset_dquot_ptrs(kdev_t dev, short type)
{
struct file *filp;
int cnt;
......
......@@ -75,8 +75,14 @@
* Fixed deadlock condition for pathological code that mixes calls to
* flock() and fcntl().
* Andy Walker (andy@lysaker.kvaerner.no), April 29, 1996.
*
* BUG: MUST DISALLOW MANDATORY LOCK ON NFS/SMB/NCP FILE SYSTEM
* TO MATCH SYS5.4 SEMANTICS.
*
*/
#include <linux/config.h>
#include <linux/malloc.h>
#include <linux/sched.h>
#include <linux/kernel.h>
......@@ -336,6 +342,7 @@ int locks_verify_locked(struct inode *inode)
int locks_mandatory_locked(struct inode *inode)
{
#ifdef CONFIG_LOCK_MANDATORY
struct file_lock *fl;
/* Search the lock list for this inode for any POSIX locks.
......@@ -344,6 +351,7 @@ int locks_mandatory_locked(struct inode *inode)
if ((fl->fl_flags & F_POSIX) && (fl->fl_owner != current))
return (-EAGAIN);
}
#endif
return (0);
}
......@@ -353,16 +361,19 @@ int locks_verify_area(int read_write, struct inode *inode, struct file *filp,
/* Candidates for mandatory locking have the setgid bit set
* but no group execute bit - an otherwise meaningless combination.
*/
#ifdef CONFIG_LOCK_MANDATORY
if ((inode->i_mode & (S_ISGID | S_IXGRP)) == S_ISGID)
return (locks_mandatory_area(read_write, inode, filp, offset,
count));
#endif
return (0);
}
int locks_mandatory_area(int read_write, struct inode *inode,
struct file *filp, unsigned int offset,
unsigned int count)
{
#ifdef CONFIG_LOCK_MANDATORY
struct file_lock *fl;
repeat:
......@@ -401,6 +412,7 @@ int locks_mandatory_area(int read_write, struct inode *inode,
goto repeat;
}
}
#endif
return (0);
}
......@@ -936,8 +948,8 @@ static char *lock_get_status(struct file_lock *fl, char *p, int id, char *pfx)
p += sprintf(p, "FLOCK ADVISORY ");
}
p += sprintf(p, "%s ", (fl->fl_type == F_RDLCK) ? "READ " : "WRITE");
p += sprintf(p, "%d %04x:%ld %ld %ld ",
fl->fl_owner->pid, fl->fl_file->f_inode->i_dev,
p += sprintf(p, "%d %s:%ld %ld %ld ",
fl->fl_owner->pid, kdevname(fl->fl_file->f_inode->i_dev),
fl->fl_file->f_inode->i_ino, fl->fl_start,
fl->fl_end);
p += sprintf(p, "%08lx %08lx %08lx %08lx %08lx\n%d:%s",
......
......@@ -185,7 +185,7 @@ void ufs_read_inode(struct inode * inode)
if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode)) {
/* XXX - should be ui_db[1] on little endian ufs filesystems */
inode->i_rdev = ufsip->ui_db[0];
inode->i_rdev = to_kdev_t(ufsip->ui_db[0]);
}
/* XXX - implement fast and slow symlinks */
......
......@@ -56,7 +56,7 @@
dc_mask_transmit_ready)
/* now some constants related to the cm206 */
/* another drive status byte, echoed by the cm206 on most commmands */
/* another drive status byte, echoed by the cm206 on most commands */
#define dsb_error_condition 0x1
#define dsb_play_in_progress 0x4
......
/*
* Definitions for the Mitsumi CDROM interface
* Copyright (C) 1995 Heiko Schlittermann <heiko@lotte.sax.de>
* VERSION: 1.9
* VERSION: 2.2
*
* 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
......@@ -32,167 +32,102 @@
*
*/
#ifndef __MCDX_H
#define __MCDX_H
/*
* The following lines are for user configuration
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* PLEASE CONFIGURE THIS ACCORIDNG TO YOURS HARDWARE/JUMPER SETTINGS.
*
* {0|1} -- 1 if you want the driver detect your drive, may crash and
* needs a long time to seek. The higher the address the longer the
* seek.
* o MCDX_NDRIVES : number of used entries of the following table
* o MCDX_DRIVEMAP : table of {i/o base, irq} per controller
*
* WARNING: AUTOPROBE doesn't work.
* NOTE: I didn't get a drive at irq 9(2) working. Not even alone.
*/
#define MCDX_AUTOPROBE 0
/*
* Drive specific settings according to the jumpers on the controller
* board(s).
* o MCDX_NDRIVES : number of used entries of the following table
* o MCDX_DRIVEMAP : table of {i/o base, irq} per controller
*
* NOTE: I didn't get a drive at irq 9(2) working. Not even alone.
*/
#if MCDX_AUTOPROBE == 0
#define MCDX_NDRIVES 1
#define MCDX_DRIVEMAP { \
{0x300, 11}, \
/* #define I_WAS_IN_MCDX_H */
#define MCDX_NDRIVES 1
#define MCDX_DRIVEMAP { {0x300, 11}, \
{0x304, 05}, \
{0x000, 00}, \
{0x000, 00}, \
{0x000, 00}, \
}
#else
#error Autoprobing is not implemented yet.
#endif
#ifndef MCDX_QUIET
#define MCDX_QUIET 1
#endif
#ifndef MCDX_DEBUG
#define MCDX_DEBUG 0
#endif
/* *** make the following line uncommented, if you're sure,
* *** all configuration is done */
/* #define I_WAS_HERE */
}
/*
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!NO USER INTERVENTION NEEDED BELOW
* If You are shure that all configuration is done, please uncomment the
* line below.
*/
/* The name of the device */
#define MCDX "mcdx"
#undef MCDX_DEBUG /* This is *REALLY* only for developement! */
#if MCDX_QUIET == 1
#define INFO(x)
#define xinfo(fmt, args...)
#ifdef MCDX_DEBUG
#define MCDX_TRACE(x) printk x
#define MCDX_TRACE_IOCTL(x) printk x
#else
#define INFO(x) warn x
#define xinfo(fmt, args...) _warn(fmt, ## args)
#define MCDX_TRACE(x)
#define MCDX_TRACE_IOCTL(x)
#endif
#define WARN(x) warn x
#define xwarn(fmt, args...) _warn(fmt, ## args)
#define _warn warn
#if MCDX_DEBUG == 1
#define TRACE(x) trace x
#define INIT 0
#define MALLOC 0
#define IOCTL 0
#define PLAYTRK 0
#define SUBCHNL 0
#define TOCHDR 0
#define MS 0
#define PLAYMSF 0
#define READTOC 0
#define OPENCLOSE 0
#define HW 0
#define TALK 0
#define IRQ 0
#define TRANSFER 0
#define REQUEST 0
#define SLEEP 0
#else
#define TRACE(x)
#endif
/* The name of the device */
#define MCDX "mcdx"
/* The following addresses are taken from the Mitsumi Reference
* and describe the possible i/o range for the controller.
/*
* Per controller 4 bytes i/o are needed.
*/
#define MCDX_IO_BEGIN ((char*) 0x300) /* first base of i/o addr */
#define MCDX_IO_END ((char*) 0x3fc) /* last base of i/o addr */
/* Per controller 4 bytes i/o are needed. */
#define MCDX_IO_SIZE 4
/*
* Bits
/*
* Masks for the status byte, returned from every command, set if
* the description is true
*/
/* The status byte, returned from every command, set if
* the description is true */
#define MCDX_RBIT_OPEN 0x80 /* door is open */
#define MCDX_RBIT_DISKSET 0x40 /* disk set (recognised) */
#define MCDX_RBIT_CHANGED 0x20 /* disk was changed */
#define MCDX_RBIT_CHECK 0x10 /* disk rotates, servo is on */
#define MCDX_RBIT_AUDIOTR 0x08 /* current track is audio */
#define MCDX_RBIT_AUDIOTR 0x08 /* current track is audio */
#define MCDX_RBIT_RDERR 0x04 /* read error, refer SENSE KEY */
#define MCDX_RBIT_AUDIOBS 0x02 /* currently playing audio */
#define MCDX_RBIT_CMDERR 0x01 /* command, param or format error */
/* The I/O Register holding the h/w status of the drive,
* can be read at i/o base + 1 */
/*
* The I/O Register holding the h/w status of the drive,
* can be read at i/o base + 1
*/
#define MCDX_RBIT_DOOR 0x10 /* door is open */
#define MCDX_RBIT_STEN 0x04 /* if 0, i/o base contains drive status */
#define MCDX_RBIT_DTEN 0x02 /* if 0, i/o base contains data */
/*
* The commands.
* The commands.
*/
#define OPCODE 1 /* offset of opcode */
#define MCDX_CMD_REQUEST_TOC 1, 0x10
#define MCDX_CMD_REQUEST_STATUS 1, 0x40
#define MCDX_CMD_RESET 1, 0x60
#define MCDX_CMD_REQUEST_DRIVE_MODE 1, 0xc2
#define MCDX_CMD_SET_INTERLEAVE 2, 0xc8, 0
#define MCDX_CMD_DATAMODE_SET 2, 0xa0, 0
#define MCDX_DATAMODE1 0x01
#define MCDX_DATAMODE2 0x02
#define MCDX_CMD_LOCK_DOOR 2, 0xfe, 0
#define MCDX_CMD_GET_TOC 0x10
#define MCDX_CMD_GET_MDISK_INFO 0x11
#define MCDX_CMD_GET_SUBQ_CODE 0x20
#define MCDX_CMD_GET_STATUS 0x40
#define MCDX_CMD_SET_DRIVE_MODE 0x50
#define MCDX_CMD_RESET 0x60
#define MCDX_CMD_HOLD 0x70
#define MCDX_CMD_CONFIG 0x90
#define MCDX_CMD_SET_ATTENATOR 0xae
#define MCDX_CMD_PLAY 0xc0
#define MCDX_CMD_PLAY_2X 0xc1
#define MCDX_CMD_GET_DRIVE_MODE 0xc2
#define MCDX_CMD_SET_INTERLEAVE 0xc8
#define MCDX_CMD_GET_FIRMWARE 0xdc
#define MCDX_CMD_SET_DATA_MODE 0xa0
#define MCDX_CMD_STOP 0xf0
#define MCDX_CMD_EJECT 0xf6
#define MCDX_CMD_CLOSE_DOOR 0xf8
#define MCDX_CMD_LOCK_DOOR 0xfe
#define READ_AHEAD 4 /* 8 Sectors (4K) */
/* Useful macros */
#define e_door(x) ((x) & MCDX_RBIT_OPEN)
#define e_check(x) (~(x) & MCDX_RBIT_CHECK)
#define e_notset(x) (~(x) & MCDX_RBIT_DISKSET)
#define e_changed(x) ((x) & MCDX_RBIT_CHANGED)
#define e_audio(x) ((x) & MCDX_RBIT_AUDIOTR)
#define e_audiobusy(x) ((x) & MCDX_RBIT_AUDIOBS)
#define e_cmderr(x) ((x) & MCDX_RBIT_CMDERR)
#define e_readerr(x) ((x) & MCDX_RBIT_RDERR)
/** no drive specific */
#define MCDX_CDBLK 2048 /* 2048 cooked data each blk */
#define MCDX_DATA_TIMEOUT (HZ/10) /* 0.1 second */
/*
* Access to the msf array
*/
#define MSF_MIN 0 /* minute */
#define MSF_SEC 1 /* second */
#define MSF_FRM 2 /* frame */
/*
* Errors
*/
#define MCDX_E 1 /* unspec error */
#define MCDX_ST_EOM 0x0100 /* end of media */
#define MCDX_ST_DRV 0x00ff /* mask to query the drive status */
#define MCDX_DATA_TIMEOUT (HZ/10) /* 0.1 second */
#ifndef I_WAS_HERE
#ifndef I_WAS_IN_MCDX_H
#warning You have not edited mcdx.h
#warning Perhaps irq and i/o settings are wrong.
#endif
/* ex:set ts=4 sw=4: */
#endif /* __MCDX_H */
\ No newline at end of file
......@@ -110,7 +110,7 @@ struct sk_buff
unsigned char *data; /* Data head pointer */
unsigned char *tail; /* Tail pointer */
unsigned char *end; /* End pointer */
void (*destructor)(struct sk_buff *this); /* Destruct function */
void (*destructor)(struct sk_buff *); /* Destruct function */
};
#ifdef CONFIG_SKB_LARGE
......
......@@ -59,6 +59,8 @@ struct __sysctl_args {
#define KERN_REALROOTDEV 16 /* real root device to mount after initrd */
#define KERN_NFSRNAME 17 /* NFS root name */
#define KERN_NFSRADDRS 18 /* NFS root addresses */
#define KERN_JAVA_INTERPRETER 19 /* path to Java(tm) interpreter */
#define KERN_JAVA_APPLETVIEWER 20 /* path to Java(tm) appletviewer */
/* CTL_VM names: */
#define VM_SWAPCTL 1 /* struct: Set vm swapping control */
......
This diff is collapsed.
#ifndef __LINUX_NET_AFUNIX_H
#define __LINUX_NET_AFUNIX_H
extern void unix_proto_init(struct net_proto *pro);
extern struct proto_ops unix_proto_ops;
extern void unix_inflight(struct file *fp);
extern void unix_notinflight(struct file *fp);
typedef struct sock unix_socket;
extern void unix_gc(void);
unix_socket *unix_socket_list;
extern unix_socket *unix_socket_list;
#define UNIX_MAX_FD 8
#endif
......@@ -74,6 +74,8 @@ extern int sys_tz;
extern int request_dma(unsigned int dmanr, char * deviceID);
extern void free_dma(unsigned int dmanr);
extern void hard_reset_now(void);
struct symbol_table symbol_table = {
#include <linux/symtab_begin.h>
#ifdef MODVERSIONS
......@@ -292,6 +294,7 @@ struct symbol_table symbol_table = {
X(simple_strtoul),
X(system_utsname),
X(sys_call_table),
X(hard_reset_now),
/* Signal interfaces */
X(send_sig),
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -30,6 +30,6 @@ comment '(it is safe to leave these untouched)'
bool 'IP: PC/TCP compatibility mode' CONFIG_INET_PCTCP
tristate 'IP: Reverse ARP' CONFIG_INET_RARP
bool 'IP: Disable Path MTU Discovery (normally enabled)' CONFIG_NO_PATH_MTU_DISCOVERY
bool 'IP: Disable NAGLE algorithm (normally enabled)' CONFIG_TCP_NAGLE_OFF
#bool 'IP: Disable NAGLE algorithm (normally enabled)' CONFIG_TCP_NAGLE_OFF
bool 'IP: Drop source routed frames' CONFIG_IP_NOSR
bool 'IP: Allow large windows (not recommended if <16Mb of memory)' CONFIG_SKB_LARGE
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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