Commit 1a9f55d9 authored by Linus Torvalds's avatar Linus Torvalds

Import 2.1.63

parent a14e97bf
......@@ -643,12 +643,13 @@ S: CV5 8BZ
S: United Kingdom
N: Ron Holt
E: ron@novell.com
E: ron@caldera.com
W: http://www.holt.org/
D: Kernel development
D: Contributed to kernel Wabi/Wine support
S: Novell, Inc.
S: 1700 South 122 East, Mailstop CP-1
S: Provo, Utah 84606
D: Minor kernel modifications to support Wabi and Wine
S: Caldera, Inc.
S: 240 West Center St.
S: Orem, Utah 84059-1920
S: USA
N: Rob W. W. Hooft
......@@ -868,6 +869,12 @@ S: Am Muehlenweg 38
S: D53424 Remagen
S: Germany
N: Achim Leubner
E: achim@vortex.de
D: GDT SCSI Disk Array Controller driver
S: ICP vortex Computersysteme GmbH
S: Flein, Germany
N: Phil Lewis
E: beans@bucket.ualr.edu
D: Promised to send money if I would put his name in the source tree.
......
......@@ -419,6 +419,33 @@ CONFIG_MD_STRIPED
here and read Documentation/modules.txt. The module will be called
raid0.o. If unsure, say Y.
RAID-1 (mirroring) mode
CONFIG_MD_MIRRORING
A RAID-1 set consists of several disk drives which are exact copies
of each other. In the event of a mirror failure, the RAID driver
will continue to use the operational mirrors in the set, providing
an error free MD device to the higher levels of the kernel. In
a set with N drives, the available space is the capacity of a single
drive, and the set protects against a failure of (N - 1) drives.
raidtools, a set of user-space tools which create and maintain
RAID1/4/5 sets, is available at:
ftp://ftp.kernel.org/pub/linux/daemons/raid
http://luthien.nuclecu.unam.mx/~miguel/raid
RAID-4/RAID-5 mode
CONFIG_MD_RAID5
A RAID-5 set of N drives with a capacity of C MB per drive provides
the capacity of C * (N - 1) drives, and protects against a failure
of a single drive. For a given sector (row) number, (N - 1) drives
contain data sectors, and one drive contains the parity protection.
For a RAID-4 set, the parity blocks are present on a single drive,
while a RAID-5 set distributes the parity accross the drives in one
of the available parity distribution methods.
raidtools, a set of user-space tools which create and maintain
RAID1/4/5 sets, is available at:
ftp://ftp.kernel.org/pub/linux/daemons/raid
http://luthien.nuclecu.unam.mx/~miguel/raid
Support for Deskstation RPC44
CONFIG_DESKSTATION_RPC44
This is a machine with a R4400 100 MHz CPU. To compile a Linux
......@@ -2302,6 +2329,15 @@ CONFIG_SCSI_AM53C974
and read Documentation/modules.txt. The module will be called
AM53C974.o.
GDT SCSI Disk Array Controller support
CONFIG_SCSI_GDTH
This is a driver for all SCSI Disk Array Controllers (EISA/ISA/PCI)
manufactured by ICP vortex. It is documented in the kernel source in
drivers/scsi/gdth.c and drivers/scsi/gdth.h. This driver is also
available as a module ( = code which can be inserted in and removed
from the running kernel whenever you want). If you want to compile
it as a module, say M here and read Documentation/modules.txt.
IOMEGA Parallel Port ZIP drive SCSI support
CONFIG_SCSI_PPA
This driver supports the parallel port version of IOMEGA's ZIP drive
......@@ -5220,6 +5256,26 @@ CONFIG_JOYSTICK
be called joystick.o. If you want to compile it as a module, say M
here and read Documentation/modules.txt.
Radio support
CONFIG_MISC_RADIO
If you have a radio card (you will probably know if you do!), then
you will want to say "y" here and make a character device file
(usually /dev/radio) with major number 10 and minor 129 using mknod
("man mknod"). And then, don't forget to pick up some useful tools
to use said device (you _might_ find something at ftp.lmh.ox.ac.uk:
/users/weejock/linux/radio/, but I haven't written anything too
useful yet...)
AIMSlab RadioTrack card
CONFIG_RADIO_RTRACK
Choose "y" here if you have one of these, and then fill in the port
address below.
RadioTrack i/o port
CONFIG_RADIO_RTRACK_PORT
Enter either 0x30f or 0x20f here. The card default is 0x30f, if you
haven't changed the jumper setting on the card.
ARC console time
CONFIG_RTC_ARC
If you boot your Alpha using the ARC firmware, say Y here. This option
......
......@@ -4,6 +4,8 @@
% pages to print... :-) If you're actually putting this in print, you
% may wish to change these.
%
% $Id: devices.tex,v 1.3 1997/11/10 01:29:35 hpa Exp $
%
\oddsidemargin=0in
\textwidth=6.5in
\topmargin=0in
......@@ -43,39 +45,29 @@ foo \kill}%
{\end{tabbing}}
%
% If you reformat this document, *please* make sure this information
% gets included!
% gets included! This list changes frequently, so it is crucial to
% know the date of the revision.
%
\title{{\bf Linux Allocated Devices}}
\author{Maintained by H. Peter Anvin $<$hpa@zytor.com$>$}
\date{Last revised: September 11, 1997}
\date{Last revised: November 9, 1997}
\maketitle
%
\noindent
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
is a registry of allocated major device numbers, as well as the
recommended {\file /dev} directory nodes for these devices.
This list is the Linux Device List, the official registry of allocated
device numbers and {\file /dev} directory nodes for the Linux
operating system.
The latest version of this list is included with the Linux kernel
sources in \LaTeX\ and ASCII form. It is also available separate from
{\url ftp://ftp.kernel.org/pub/linux/docs/device-list/}. In case of
discrepancy, the \LaTeX\ version is authoritative.
sources in \LaTeX\ and ASCII form. It is also available separately
from {\url ftp://ftp.kernel.org/pub/linux/docs/device-list/}. In case
of discrepancy between the text and \LaTeX\ versions, the \LaTeX\
version is authoritative.
This document is included by reference into the Linux Filesystem
Standard (FSSTND). The FSSTND is available from
{\url ftp://tsx-11.mit.edu/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 with the
appropriate device information. I {\em very\/} much appreciate if you
send me a device description in the same format as the ones already in
this file. 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.
NOTE: When sending me mail, {\em please\/} include the word ``device''
in the subject so your mail won't accidentally get buried!
Allocations marked (68k/Amiga) apply to Linux/68k on the Amiga
platform only. Allocations marked (68k/Atari) apply to Linux/68k on
the Atari platform only.
......@@ -92,6 +84,28 @@ I do not have any information about these devices beyond what appears
on this list. Any such information requests will be deleted without
reply.
\section{How to submit a device entry}
To have a major number allocated, or a minor number in situations
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.
I do, however, make two requests about the nature of your report.
This is necessary for me to be able to keep this list up to date and
correct in a timely manner. First of all, {\em please\/} include the
word ``device'' in the subject so your mail won't accidentally get
buried! I receive hundreds of email messages a day, so mail sent with
other subjects may very well get lost in the avalanche.
Second, please include a description of the device {\em in the same
format as this list\/}. The reason for this is that it is the only
way I have found to ensure I have all the requisite information to
publish your device and avoid conflicts.
Your cooperation is appreciated.
\section{Major numbers}
\begin{devicelist}
......@@ -221,7 +235,12 @@ reply.
\major{88}{}{char }{COMX synchronous serial card}
\major{89}{}{char }{I$^2$C bus interface}
\major{90}{}{char }{Memory Technology Device (RAM, ROM, Flash)}
\major{91}{--119}{}{Unallocated}
\major{91}{}{char }{CAN-Bus devices}
\major{92}{}{char }{Reserved for ith Kommunikationstechnik MIC ISDN card}
\major{93}{}{char }{IBM Smart Capture Card frame grabber}
\major{94}{}{char }{miroVIDEO DC10/30 capture/playback device}
\major{95}{}{char }{IP Filter}
\major{96}{--119}{}{Unallocated}
\major{120}{--127}{}{Local/experimental use}
\major{128}{--239}{}{Unallocated}
\major{240}{--254}{}{Local/experimental use}
......@@ -1506,7 +1525,43 @@ on {\url http://home.pages.de/~videotext/\/}.
\end{devicelist}
\begin{devicelist}
\major{91}{--119}{}{Unallocated}
\major{91}{}{char }{CAN-Bus controller}
\minor{0}{/dev/can0}{First CAN-Bus controller}
\minor{1}{/dev/can1}{Second CAN-Bus controller}
\minordots
\end{devicelist}
\begin{devicelist}
\major{92}{}{char }{Reserved for ith Kommunikationstechnik MIC ISDN card}
\end{devicelist}
\begin{devicelist}
\major{93}{}{char }{IBM Smart Capture Card frame grabber}
\minor{0}{/dev/iscc0}{First Smart Capture Card}
\minor{1}{/dev/iscc1}{Second Smart Capture Card}
\minordots
\minor{128}{/dev/isccctl0}{First Smart Capture Card control}
\minor{129}{/dev/isccctl1}{Second Smart Capture Card control}
\minordots
\end{devicelist}
\begin{devicelist}
\major{94}{}{char }{miroVIDEO DC10/30 capture/playback device}
\minor{0}{/dev/dcxx0}{First capture card}
\minor{1}{/dev/dcxx1}{Second capture card}
\minordots
\end{devicelist}
\begin{devicelist}
\major{95}{}{char }{IP filter}
\minor{0}{/dev/ipl}{Filter control device/log file}
\minor{1}{/dev/ipnat}{NAT control device/log file}
\minor{2}{/dev/ipstate}{State information log file}
\minor{3}{/dev/ipauth}{Authentication control device/log file}
\end{devicelist}
\begin{devicelist}
\major{96}{--119}{}{Unallocated}
\end{devicelist}
\begin{devicelist}
......@@ -1593,11 +1648,11 @@ For SCSI devices, {\file /dev/tape} and {\file /dev/cdrom} should
point to the ``cooked'' devices ({\file /dev/st*} and {\file
/dev/sr*}, respectively), whereas {\file /dev/cdwriter} and {\file
/dev/scanner} should point to the appropriate generic SCSI devices
({\file /dev/sg*}.)
({\file /dev/sg*}).
{\file /dev/mouse} may point to a primary serial TTY device, a
hardware mouse device, or a socket for a mouse driver program
(e.g. {\file /dev/gpmdata}.)
(e.g. {\file /dev/gpmdata}).
\subsection{Sockets and pipes}
......
This diff is collapsed.
......@@ -204,6 +204,13 @@ M: mike@i-Connect.Net
L: linux-eata@i-connect.net, linux-scsi@vger.rutgers.edu
S: Maintained
GDT SCSI DISK ARRAY CONTROLLER DRIVER
P: Achim Leubner
M: achim@vortex.de
L: linux-scsi@vger.rutgers.edu
W: http://www.icp-vortex.com/
S: Supported
FILE LOCKING (flock() and fcntl()/lockf())
P: Andy Walker
M: andy@lysaker.kvaerner.no
......
VERSION = 2
PATCHLEVEL = 1
SUBLEVEL = 62
SUBLEVEL = 63
ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/)
......
......@@ -50,8 +50,6 @@ static int set_rtc_mmss(unsigned long);
*/
#define FIX_SHIFT 48
static unsigned long round_ticks;
/* lump static variables together for more efficient access: */
static struct {
__u32 last_time; /* cycle counter last time it got invoked */
......@@ -81,7 +79,12 @@ void timer_interrupt(int irq, void *dev, struct pt_regs * regs)
now = rpcc();
delta = now - state.last_time;
state.last_time = now;
nticks = ((delta * state.scaled_ticks_per_cycle+round_ticks) >> FIX_SHIFT);
if(hwrpb->cycle_freq) {
nticks = (delta * state.scaled_ticks_per_cycle) >> (FIX_SHIFT-1);
nticks = (nticks+1) >> 1;
}
else nticks=1; /* No way to estimate lost ticks if we don't know
the cycle frequency. */
for (i = 0; i < nticks; ++i) {
do_timer(regs);
}
......@@ -147,14 +150,15 @@ void time_init(void)
/* read RTC exactly on falling edge of update flag */
/* Wait for rise.... (may take up to 1 second) */
while(!(CMOS_READ(RTC_FREQ_SELECT) & RTC_UIP));
do {} while(!(CMOS_READ(RTC_FREQ_SELECT) & RTC_UIP));
/* Wait for fall.... */
/* Jay Estabook <jestabro@amt.tay1.dec.com>:
* Wait for the Update Done Interrupt bit (0x10) in reg C (12) to be set,
* which (hopefully) indicates that the update is really done.
*/
while(CMOS_READ(RTC_FREQ_SELECT) & RTC_UIP);
do {} while(!CMOS_READ(RTC_REG_C) & RTC_UIP);
__delay(1000000);
sec = CMOS_READ(RTC_SECONDS);
min = CMOS_READ(RTC_MINUTES);
hour = CMOS_READ(RTC_HOURS);
......@@ -189,8 +193,8 @@ void time_init(void)
__you_loose();
}
state.last_time = rpcc();
if(hwrpb->cycle_freq)
state.scaled_ticks_per_cycle = ((unsigned long) HZ << FIX_SHIFT) / hwrpb->cycle_freq;
round_ticks=(unsigned long) 1 << (FIX_SHIFT-1);
state.last_rtc_update = 0;
#ifdef CONFIG_RTC
......
......@@ -137,11 +137,15 @@ CONFIG_SCSI_OMIT_FLASHPOINT=y
# CONFIG_SCSI_EATA_PIO is not set
# CONFIG_SCSI_EATA is not set
# CONFIG_SCSI_FUTURE_DOMAIN is not set
# CONFIG_SCSI_GDTH is not set
# CONFIG_SCSI_GENERIC_NCR5380 is not set
# CONFIG_SCSI_NCR53C406A is not set
# CONFIG_SCSI_NCR53C7xx is not set
# CONFIG_SCSI_NCR53C8XX is not set
# CONFIG_SCSI_PAS16 is not set
# CONFIG_SCSI_PCI2000 is not set
# CONFIG_SCSI_PCI2220I is not set
# CONFIG_SCSI_PSI240I is not set
# CONFIG_SCSI_QLOGIC_FAS is not set
# CONFIG_SCSI_QLOGIC_ISP is not set
# CONFIG_SCSI_SEAGATE is not set
......@@ -247,6 +251,7 @@ CONFIG_82C710_MOUSE=y
# CONFIG_RTC is not set
# CONFIG_NVRAM is not set
# CONFIG_JOYSTICK is not set
# CONFIG_MISC_RADIO is not set
#
# Sound
......
......@@ -75,17 +75,15 @@ unsigned int *stack;
* code.
*/
asmlinkage int sys_iopl(long ebx,long ecx,long edx,
long esi, long edi, long ebp, long eax, long ds,
long es, long orig_eax, long eip, long cs,
long eflags, long esp, long ss)
asmlinkage int sys_iopl(unsigned long unused)
{
unsigned int level = ebx;
struct pt_regs * regs = (struct pt_regs *) &unused;
unsigned int level = regs->ebx;
if (level > 3)
return -EINVAL;
if (!suser())
return -EPERM;
*(&eflags) = (eflags & 0xffffcfff) | (level << 12);
regs->eflags = (regs->eflags & 0xffffcfff) | (level << 12);
return 0;
}
......@@ -42,6 +42,7 @@ char x86_model = 0; /* set by kernel/head.S */
char x86_mask = 0; /* set by kernel/head.S */
int x86_capability = 0; /* set by kernel/head.S */
int fdiv_bug = 0; /* set if Pentium(TM) with FP bug */
int pentium_f00f_bug = 0; /* set if Pentium(TM) with F00F bug */
int have_cpuid = 0; /* set if CPUID instruction works */
char x86_vendor_id[13] = "unknown";
......@@ -359,6 +360,7 @@ int get_cpuinfo(char * buffer)
"fdiv_bug\t: %s\n"
"hlt_bug\t\t: %s\n"
"sep_bug\t\t: %s\n"
"pentium_f00f_bug\t\t: %s\n"
"fpu\t\t: %s\n"
"fpu_exception\t: %s\n"
"cpuid\t\t: %s\n"
......@@ -367,6 +369,7 @@ int get_cpuinfo(char * buffer)
CD(fdiv_bug) ? "yes" : "no",
CD(hlt_works_ok) ? "no" : "yes",
sep_bug ? "yes" : "no",
pentium_f00f_bug ? "yes" : "no",
CD(hard_math) ? "yes" : "no",
(CD(hard_math) && ignore_irq13)
? "yes" : "no",
......
......@@ -413,6 +413,51 @@ asmlinkage void math_emulate(long arg)
#endif /* CONFIG_MATH_EMULATION */
static struct
{
short limit __attribute__((packed));
void * addr __attribute__((packed));
short __pad __attribute__((packed));
} idt_d;
void * idt2;
__initfunc(void trap_init_f00f_bug(void))
{
pgd_t * pgd;
pmd_t * pmd;
pte_t * pte;
unsigned long twopage;
printk("moving IDT ... ");
twopage = (unsigned long) vmalloc (2*PAGE_SIZE);
idt2 = (void *)(twopage + 4096-7*8);
memcpy(idt2,&idt,sizeof(idt));
idt_d.limit = 256*8-1;
idt_d.addr = idt2;
idt_d.__pad = 0;
__asm__ __volatile__("\tlidt %0": "=m" (idt_d));
/*
* Unmap lower page:
*/
pgd = pgd_offset(current->mm, twopage);
pmd = pmd_offset(pgd, twopage);
pte = pte_offset(pmd, twopage);
pte_clear(pte);
flush_tlb_all();
printk(" ... done\n");
}
__initfunc(void trap_init(void))
{
int i;
......
......@@ -74,6 +74,25 @@ int __verify_write(const void * addr, unsigned long size)
return 0;
}
asmlinkage void divide_error(void);
asmlinkage void debug(void);
asmlinkage void nmi(void);
asmlinkage void int3(void);
asmlinkage void overflow(void);
asmlinkage void bounds(void);
asmlinkage void invalid_op(void);
asmlinkage void do_divide_error (struct pt_regs *, unsigned long);
asmlinkage void do_debug (struct pt_regs *, unsigned long);
asmlinkage void do_nmi (struct pt_regs *, unsigned long);
asmlinkage void do_int3 (struct pt_regs *, unsigned long);
asmlinkage void do_overflow (struct pt_regs *, unsigned long);
asmlinkage void do_bounds (struct pt_regs *, unsigned long);
asmlinkage void do_invalid_op (struct pt_regs *, unsigned long);
extern int * idt2;
extern int pentium_f00f_bug;
/*
* This routine handles page faults. It determines the address,
* and the problem, and then passes it off to one of the appropriate
......@@ -170,6 +189,46 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code)
goto out;
}
printk("<%p/%p>\n", idt2, (void *)address);
/*
* Pentium F0 0F C7 C8 bug workaround:
*/
if ( pentium_f00f_bug && (address >= (unsigned long)idt2) &&
(address < (unsigned long)idt2+256*8) ) {
void (*handler) (void);
int nr = (address-(unsigned long)idt2)/8;
unsigned long low, high;
low = idt[nr].a;
high = idt[nr].b;
handler = (void (*) (void)) ((low&0x0000ffff) | (high&0xffff0000));
printk("<handler %p... ", handler);
unlock_kernel();
if (handler==divide_error)
do_divide_error(regs,error_code);
else if (handler==debug)
do_debug(regs,error_code);
else if (handler==nmi)
do_nmi(regs,error_code);
else if (handler==int3)
do_int3(regs,error_code);
else if (handler==overflow)
do_overflow(regs,error_code);
else if (handler==bounds)
do_bounds(regs,error_code);
else if (handler==invalid_op)
do_invalid_op(regs,error_code);
else {
printk("INVALID HANDLER!\n");
for (;;) __cli();
}
printk("... done>\n");
goto out;
}
/* Are we prepared to handle this kernel fault? */
if ((fixup = search_exception_table(regs->eip)) != 0) {
printk(KERN_DEBUG "%s: Exception at [<%lx>] cr2=%lx (fixup: %lx)\n",
......@@ -193,6 +252,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code)
flush_tlb();
goto out;
}
if (address < PAGE_SIZE)
printk(KERN_ALERT "Unable to handle kernel NULL pointer dereference");
else
......
......@@ -68,7 +68,8 @@ bool 'Multiple devices driver support' CONFIG_BLK_DEV_MD
if [ "$CONFIG_BLK_DEV_MD" = "y" ]; then
tristate ' Linear (append) mode' CONFIG_MD_LINEAR
tristate ' RAID-0 (striping) mode' CONFIG_MD_STRIPED
# tristate ' RAID-1 (mirroring) mode' CONFIG_MD_MIRRORING
tristate ' RAID-1 (mirroring) mode' CONFIG_MD_MIRRORING
tristate ' RAID-4/RAID-5 mode' CONFIG_MD_RAID5
fi
tristate 'RAM disk support' CONFIG_BLK_DEV_RAM
......
......@@ -53,6 +53,8 @@ bool 'Multiple devices driver support' CONFIG_BLK_DEV_MD
if [ "$CONFIG_BLK_DEV_MD" = "y" ]; then
tristate ' Linear (append) mode' CONFIG_MD_LINEAR
tristate ' RAID-0 (striping) mode' CONFIG_MD_STRIPED
tristate ' RAID-1 (mirroring) mode' CONFIG_MD_MIRRORING
tristate ' RAID-4/RAID-5 mode' CONFIG_MD_RAID5
fi
tristate 'RAM disk support' CONFIG_BLK_DEV_RAM
if [ "$CONFIG_BLK_DEV_RAM" = "y" ]; then
......
......@@ -200,25 +200,21 @@ else
endif
endif
#ifeq ($(CONFIG_MD_RAID1),y)
#L_OBJS += raid1.o
#else
# ifeq ($(CONFIG_MD_SUPPORT_RAID1),y)
# ifeq ($(CONFIG_MD_RAID1),m)
# M_OBJS += raid1.o
# endif
# endif
#endif
#
#ifeq ($(CONFIG_MD_RAID5),y)
#L_OBJS += raid5.o
#else
# ifeq ($(CONFIG_MD_SUPPORT_RAID5),y)
# ifeq ($(CONFIG_MD_RAID5),m)
# M_OBJS += raid5.o
# endif
# endif
#endif
ifeq ($(CONFIG_MD_MIRRORING),y)
L_OBJS += raid1.o
else
ifeq ($(CONFIG_MD_MIRRORING),m)
M_OBJS += raid1.o
endif
endif
ifeq ($(CONFIG_MD_RAID5),y)
L_OBJS += raid5.o
else
ifeq ($(CONFIG_MD_RAID5),m)
M_OBJS += raid5.o
endif
endif
endif
......
......@@ -163,6 +163,7 @@ static int linear_status (char *page, int minor, struct md_dev *mddev)
sz+=sprintf (page+sz, "\n");
#endif
sz+=sprintf (page+sz, " %dk rounding", 1<<FACTOR_SHIFT(FACTOR(mddev)));
return sz;
}
......@@ -171,6 +172,8 @@ static struct md_personality linear_personality=
{
"linear",
linear_map,
NULL,
NULL,
linear_run,
linear_stop,
linear_status,
......
......@@ -82,6 +82,11 @@ int * blksize_size[MAX_BLKDEV] = { NULL, NULL, };
*/
int * hardsect_size[MAX_BLKDEV] = { NULL, NULL, };
/*
* The following tunes the read-ahead algorithm in mm/filemap.c
*/
int * max_readahead[MAX_BLKDEV] = { NULL, NULL, };
static inline struct request **get_queue(kdev_t dev)
{
int major = MAJOR(dev);
......@@ -295,7 +300,27 @@ void add_request(struct blk_dev_struct * dev, struct request * req)
sti();
}
static void make_request(int major,int rw, struct buffer_head * bh)
#define MAX_SECTORS 244
static inline void attempt_merge (struct request *req)
{
struct request *next = req->next;
if (!next)
return;
if (req->sector + req->nr_sectors != next->sector)
return;
if (next->sem || req->cmd != next->cmd || req->rq_dev != next->rq_dev || req->nr_sectors + next->nr_sectors >= MAX_SECTORS)
return;
req->bhtail->b_reqnext = next->bh;
req->bhtail = next->bhtail;
req->nr_sectors += next->nr_sectors;
next->rq_status = RQ_INACTIVE;
req->next = next->next;
wake_up (&wait_for_request);
}
void make_request(int major,int rw, struct buffer_head * bh)
{
unsigned int sector, count;
struct request * req;
......@@ -313,7 +338,7 @@ static void make_request(int major,int rw, struct buffer_head * bh)
if (blk_size[major])
if (blk_size[major][MINOR(bh->b_rdev)] < (sector + count)>>1) {
bh->b_state &= (1 << BH_Lock) | (1 << BH_FreeOnIO);
bh->b_state &= (1 << BH_Lock);
/* This may well happen - the kernel calls bread()
without checking the size of the device, e.g.,
when mounting a device. */
......@@ -323,8 +348,7 @@ static void make_request(int major,int rw, struct buffer_head * bh)
kdevname(bh->b_rdev), rw,
(sector + count)>>1,
blk_size[major][MINOR(bh->b_rdev)]);
unlock_buffer(bh);
return;
goto end_io;
}
rw_ahead = 0; /* normal case; gets changed below for READA/WRITEA */
......@@ -333,10 +357,8 @@ static void make_request(int major,int rw, struct buffer_head * bh)
rw_ahead = 1;
rw = READ; /* drop into READ */
case READ:
if (buffer_uptodate(bh)) {
unlock_buffer(bh); /* Hmmph! Already have it */
return;
}
if (buffer_uptodate(bh)) /* Hmmph! Already have it */
goto end_io;
kstat.pgpgin++;
max_req = NR_REQUEST; /* reads take precedence */
break;
......@@ -344,10 +366,8 @@ static void make_request(int major,int rw, struct buffer_head * bh)
rw_ahead = 1;
rw = WRITE; /* drop into WRITE */
case WRITE:
if (!buffer_dirty(bh)) {
unlock_buffer(bh); /* Hmmph! Nothing to write */
return;
}
if (!buffer_dirty(bh)) /* Hmmph! Nothing to write */
goto end_io;
/* We don't allow the write-requests to fill up the
* queue completely: we want some room for reads,
* as they take precedence. The last third of the
......@@ -359,8 +379,7 @@ static void make_request(int major,int rw, struct buffer_head * bh)
default:
printk(KERN_ERR "make_request: bad block dev cmd,"
" must be R/W/RA/WA\n");
unlock_buffer(bh);
return;
goto end_io;
}
/* look for a free request. */
......@@ -409,7 +428,7 @@ static void make_request(int major,int rw, struct buffer_head * bh)
continue;
if (req->cmd != rw)
continue;
if (req->nr_sectors >= 244)
if (req->nr_sectors >= MAX_SECTORS)
continue;
if (req->rq_dev != bh->b_rdev)
continue;
......@@ -417,6 +436,9 @@ static void make_request(int major,int rw, struct buffer_head * bh)
if (req->sector + req->nr_sectors == sector) {
req->bhtail->b_reqnext = bh;
req->bhtail = bh;
req->nr_sectors += count;
/* Can we now merge this req with the next? */
attempt_merge(req);
/* or to the beginning? */
} else if (req->sector - count == sector) {
bh->b_reqnext = req->bh;
......@@ -424,10 +446,10 @@ static void make_request(int major,int rw, struct buffer_head * bh)
req->buffer = bh->b_data;
req->current_nr_sectors = count;
req->sector = sector;
req->nr_sectors += count;
} else
continue;
req->nr_sectors += count;
mark_buffer_clean(bh);
sti();
return;
......@@ -440,10 +462,8 @@ static void make_request(int major,int rw, struct buffer_head * bh)
/* if no request available: if rw_ahead, forget it; otherwise try again blocking.. */
if (!req) {
if (rw_ahead) {
unlock_buffer(bh);
return;
}
if (rw_ahead)
goto end_io;
req = __get_request_wait(max_req, bh->b_rdev);
}
......@@ -459,6 +479,10 @@ static void make_request(int major,int rw, struct buffer_head * bh)
req->bhtail = bh;
req->next = NULL;
add_request(major+blk_dev,req);
return;
end_io:
bh->b_end_io(bh, test_bit(BH_Uptodate, &bh->b_state));
}
/* This function can be used to request a number of buffers from a block
......@@ -530,6 +554,12 @@ void ll_rw_block(int rw, int nr, struct buffer_head * bh[])
for (i = 0; i < nr; i++) {
if (bh[i]) {
set_bit(BH_Req, &bh[i]->b_state);
#ifdef CONFIG_BLK_DEV_MD
if (MAJOR(bh[i]->b_dev) == MD_MAJOR) {
md_make_request(MINOR (bh[i]->b_dev), rw, bh[i]);
continue;
}
#endif
make_request(MAJOR(bh[i]->b_rdev), rw, bh[i]);
}
}
......@@ -654,6 +684,7 @@ __initfunc(int blk_dev_init(void))
req->next = NULL;
}
memset(ro_bits,0,sizeof(ro_bits));
memset(max_readahead, 0, sizeof(max_readahead));
#ifdef CONFIG_AMIGA_Z2RAM
z2_init();
#endif
......
This diff is collapsed.
......@@ -250,6 +250,7 @@ static int raid0_status (char *page, int minor, struct md_dev *mddev)
data->strip_zone[j].size);
}
#endif
sz+=sprintf (page+sz, " %dk chunks", 1<<FACTOR_SHIFT(FACTOR(mddev)));
return sz;
}
......@@ -258,11 +259,17 @@ static struct md_personality raid0_personality=
{
"raid0",
raid0_map,
NULL, /* no special make_request */
NULL, /* no special end_request */
raid0_run,
raid0_stop,
raid0_status,
NULL, /* no ioctls */
0
0,
NULL, /* no error_handler */
NULL, /* hot_add_disk */
NULL, /* hot_remove_disk */
NULL /* mark_spare */
};
......
This diff is collapsed.
This diff is collapsed.
......@@ -109,4 +109,11 @@ if [ "$CONFIG_PPC" = "y" ]; then
fi
tristate '/dev/nvram support' CONFIG_NVRAM
tristate 'PC joystick support' CONFIG_JOYSTICK
bool 'Radio Device Support' CONFIG_MISC_RADIO
if [ "$CONFIG_MISC_RADIO" != "n" ]; then
bool ' AIMSlab RadioTrack (aka RadioReveal) support' CONFIG_RADIO_RTRACK
if [ "$CONFIG_RADIO_RTRACK" != "n" ]; then
hex ' RadioTrack i/o port (0x20f or 0x30f)' CONFIG_RADIO_RTRACK_PORT 0x20f
fi
fi
endmenu
......@@ -281,6 +281,13 @@ else
endif
endif
ifeq ($(CONFIG_MISC_RADIO),y)
L_OBJS += radio.o
ifeq ($(CONFIG_RADIO_RTRACK),y)
L_OBJS += rtrack.o
endif
endif
ifeq ($(CONFIG_QIC02_TAPE),y)
L_OBJS += tpqic02.o
else
......
The Cyclades-Z must have firmware loaded onto the card before it will
operate. This operation should be performed during system startup,
The firmware, loader program and the latest device driver code are
available from Cyclades at
ftp://ftp.cyclades.com/pub/cyclades/cyclades-z/linux/
......@@ -159,8 +159,8 @@ static int open_mouse(struct inode * inode, struct file * file)
* writes are disallowed
*/
static long write_mouse(struct inode * inode, struct file * file,
const char * buffer, unsigned long count)
static ssize_t write_mouse(struct file * file,
const char * buffer, size_t count, loff_t *ppos)
{
return -EINVAL;
}
......@@ -169,8 +169,8 @@ static long write_mouse(struct inode * inode, struct file * file,
* read mouse data. Currently never blocks.
*/
static long read_mouse(struct inode * inode, struct file * file,
char * buffer, unsigned long count)
static ssize_t read_mouse(struct file * file,
char * buffer, size_t count, loff_t *ppos)
{
int r;
int dx;
......
This diff is collapsed.
......@@ -47,6 +47,9 @@ VERSION INFO:
compatibility.
Better ioctl names. Kept binary compatibility.
Removed 'save_busy'. Just set busy to 1.
11/03/97 Brian Gerst 0.9.1: Fixed bug which caused driver to always time out
but never report a timeout (broken while loop).
Fixed js_read for new VFS code.
*/
#include <linux/module.h>
......@@ -227,20 +230,21 @@ static int js_release (struct inode *inode, struct file *file)
* one shots to clear.
*/
static long js_read (struct inode *inode, struct file *file, char *buf, unsigned long count)
static ssize_t js_read (struct file *file, char *buf,
size_t count, loff_t *ppos)
{
int j, chk, jsmask;
int t0, t_x0, t_y0, t_x1, t_y1;
unsigned int minor, minor2;
unsigned int minor;
int buttons;
struct inode *inode=file->f_dentry->d_inode;
if (count != JS_RETURN)
return -EINVAL;
minor = MINOR (inode->i_rdev);
minor = MINOR (inode->i_rdev);
inode->i_atime = CURRENT_TIME;
if (jiffies >= js_data[minor].js_expiretime)
{
minor2 = minor << 1;
j = js_data[minor].js_timeout;
for (; (js_exist & inb (JS_PORT)) && j; j--);
if (j == 0)
......@@ -262,8 +266,8 @@ static long js_read (struct inode *inode, struct file *file, char *buf, unsigned
/*get init timestamp*/
t_x0 = t_y0 = t_x1 = t_y1 = t0 = get_timer0 ();
/*wait for an axis' bit to clear or timeout*/
while (j-- && (chk = (inb (JS_PORT) & js_exist ) | jsmask))
{
do {
chk = (inb (JS_PORT) & js_exist) | jsmask;
if (!(chk & JS_X_0)) {
t_x0 = get_timer0();
jsmask |= JS_X_0;
......@@ -280,7 +284,7 @@ static long js_read (struct inode *inode, struct file *file, char *buf, unsigned
t_y1 = get_timer0();
jsmask |= JS_Y_1;
}
}
} while (--j && jsmask != js_exist);
sti(); /* allow interrupts */
js_read_semaphore = 0; /* allow other reads to progress */
......
......@@ -76,6 +76,7 @@ extern void pcwatchdog_init(void);
extern int rtc_init(void);
extern int dsp56k_init(void);
extern int nvram_init(void);
extern int radio_init(void);
extern void hfmodem_init(void);
#ifdef CONFIG_PROC_FS
......@@ -257,6 +258,9 @@ __initfunc(int misc_init(void))
#ifdef CONFIG_NVRAM
nvram_init();
#endif
#ifdef CONFIG_MISC_RADIO
radio_init();
#endif
#ifdef CONFIG_HFMODEM
hfmodem_init();
#endif
......
......@@ -227,11 +227,11 @@ static long long nvram_llseek(struct file *file,loff_t offset, int origin )
return( (offset >= 0) ? (file->f_pos = offset) : -EINVAL );
}
static long nvram_read( struct inode * inode, struct file * file,
char * buf, unsigned long count )
static ssize_t nvram_read( struct file * file,
char * buf, size_t count, loff_t *ppos )
{
unsigned long flags;
unsigned i = file->f_pos;
unsigned i = *ppos;
char *tmp = buf;
save_flags(flags);
......@@ -244,17 +244,16 @@ static long nvram_read( struct inode * inode, struct file * file,
for( ; count-- > 0 && i < NVRAM_BYTES; ++i, ++tmp )
put_user( nvram_read_int(i), tmp );
file->f_pos = i;
*ppos = i;
restore_flags(flags);
return( tmp - buf );
}
static long nvram_write( struct inode * inode, struct file * file,
const char * buf, unsigned long count )
static ssize_t nvram_write( struct file * file, const char * buf, size_t count, loff_t *ppos )
{
unsigned long flags;
unsigned i = file->f_pos;
unsigned i = *ppos;
const char *tmp = buf;
char c;
......@@ -271,7 +270,7 @@ static long nvram_write( struct inode * inode, struct file * file,
nvram_write_int( c, i );
}
nvram_set_checksum_int();
file->f_pos = i;
*ppos = i;
restore_flags(flags);
return( tmp - buf );
......
......@@ -29,6 +29,7 @@
* 961118 Changed some verbiage on some of the output, tidied up
* code bits, and added compatibility to 2.1.x.
* 970912 Enabled board on open and disable on close.
* 971107 Took account of recent VFS changes (broke read).
*/
#include <linux/module.h>
......@@ -222,7 +223,7 @@ static void pcwd_send_heartbeat(void)
}
static int pcwd_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg)
unsigned int cmd, unsigned long arg)
{
int i, cdat, rv;
static struct watchdog_info ident=
......@@ -359,8 +360,12 @@ static int pcwd_ioctl(struct inode *inode, struct file *file,
return 0;
}
static long pcwd_write(struct inode *inode, struct file *file, const char *buf, unsigned long len)
static ssize_t pcwd_write(struct file *file, const char *buf, size_t len,
loff_t *ppos)
{
/* Can't seek (pwrite) on this device */
if (ppos != &file->f_pos)
return -ESPIPE;
if (len)
{
pcwd_send_heartbeat();
......@@ -381,13 +386,16 @@ static int pcwd_open(struct inode *ino, struct file *filep)
return(0);
}
static long pcwd_read(struct inode *inode, struct file *file, char *buf,
unsigned long count)
static ssize_t pcwd_read(struct file *file, char *buf, size_t count,
loff_t *ppos)
{
unsigned short c = inb(current_readport);
unsigned char cp;
switch(MINOR(inode->i_rdev))
/* Can't seek (pread) on this device */
if (ppos != &file->f_pos)
return -ESPIPE;
switch(MINOR(file->f_dentry->d_inode->i_rdev))
{
case TEMP_MINOR:
cp = c;
......@@ -489,11 +497,16 @@ static struct file_operations pcwd_fops = {
pcwd_read, /* Read */
pcwd_write, /* Write */
NULL, /* Readdir */
NULL, /* Select */
NULL, /* Poll */
pcwd_ioctl, /* IOctl */
NULL, /* MMAP */
pcwd_open, /* Open */
pcwd_close /* Close */
pcwd_close, /* Release */
NULL, /* Fsync */
NULL, /* Fasync */
NULL, /* CheckMediaChange */
NULL, /* Revalidate */
NULL, /* Lock */
};
static struct miscdevice pcwd_miscdev = {
......
This diff is collapsed.
This diff is collapsed.
/* RadioTrack (RadioReveal) include file.
* (c) 1997 M. Kirkwood
*
* Not in include/linux/ because there's no need for anyone
* to know about these details, I reckon.
*/
#ifndef __RTRACK_H
#define __RTRACK_H
#include <linux/radio.h>
void radiotrack_init(void);
int rt_setvol(struct radio_device *dev, int vol);
int rt_setband(struct radio_device *dev, int vol);
int rt_setfreq(struct radio_device *dev, int vol);
int rt_getsigstr(struct radio_device *dev);
/* frequency encoding stuff... */
/* we have to careful not to introduce fp stuff here */
#define RTRACK_ENCODE(x) (((((x)*2)/5)-(40*88))+0xf6c)
#define RTRACK_DECODE(x) (((((x)-0xf6c)+(40*88))*5)/2)
/* we shouldn't actually need the decode macro (or the excessive bracketing :-) */
#endif /* __RTRACK_H */
This diff is collapsed.
......@@ -176,7 +176,7 @@ int dgrs_spantree = -1;
int dgrs_hashexpire = -1;
uchar dgrs_ipaddr[4] = { 0xff, 0xff, 0xff, 0xff};
uchar dgrs_iptrap[4] = { 0xff, 0xff, 0xff, 0xff};
long dgrs_ipxnet = -1;
__u32 dgrs_ipxnet = -1;
int dgrs_nicmode = 0;
/*
......@@ -1507,7 +1507,7 @@ static int hashexpire = -1;
static int spantree = -1;
static int ipaddr[4] = { -1 };
static int iptrap[4] = { -1 };
static long ipxnet = -1;
static __u32 ipxnet = -1;
static int nicmode = -1;
MODULE_PARM(debug, "i");
......
......@@ -78,6 +78,8 @@ pci_clone_list[] __initdata = {
{PCI_VENDOR_ID_WINBOND2, PCI_DEVICE_ID_WINBOND2_89C940},
{PCI_VENDOR_ID_COMPEX, PCI_DEVICE_ID_COMPEX_RL2000},
{PCI_VENDOR_ID_KTI, PCI_DEVICE_ID_KTI_ET32P2},
{PCI_VENDOR_ID_NETVIN, PCI_DEVICE_ID_NETVIN_NV5000SC},
{PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C926},
{0,}
};
#endif
......
......@@ -49,6 +49,7 @@ dep_tristate 'EATA ISA/EISA/PCI (DPT and generic EATA/DMA-compliant boards) supp
int ' maximum number of queued commands' CONFIG_SCSI_EATA_MAX_TAGS 16
fi
dep_tristate 'Future Domain 16xx SCSI/AHA 2920 support' CONFIG_SCSI_FUTURE_DOMAIN $CONFIG_SCSI
dep_tristate 'GDT SCSI Disk Array Controller support' CONFIG_SCSI_GDTH $CONFIG_SCSI
dep_tristate 'Generic NCR5380/53c400 SCSI support' CONFIG_SCSI_GENERIC_NCR5380 $CONFIG_SCSI
if [ "$CONFIG_SCSI_GENERIC_NCR5380" != "n" ]; then
bool ' Enable NCR53c400 extensions' CONFIG_SCSI_GENERIC_NCR53C400
......@@ -95,6 +96,9 @@ if [ "$CONFIG_PARPORT" != "n" ]; then
fi
fi
dep_tristate 'PAS16 SCSI support' CONFIG_SCSI_PAS16 $CONFIG_SCSI
dep_tristate 'PCI2000 support' CONFIG_SCSI_PCI2000 $CONFIG_SCSI
dep_tristate 'PCI2220i support' CONFIG_SCSI_PCI2220I $CONFIG_SCSI
dep_tristate 'PSI240i support' CONFIG_SCSI_PSI240I $CONFIG_SCSI
dep_tristate 'Qlogic FAS SCSI support' CONFIG_SCSI_QLOGIC_FAS $CONFIG_SCSI
if [ "$CONFIG_PCI" = "y" ]; then
dep_tristate 'Qlogic ISP SCSI support' CONFIG_SCSI_QLOGIC_ISP $CONFIG_SCSI
......
This diff is collapsed.
......@@ -470,6 +470,7 @@ struct signature {
{ "Future Domain Corp. V1.0008/18/93", 5, 33, 3, 4, 0 },
{ "Future Domain Corp. V1.0008/18/93", 26, 33, 3, 4, 1 },
{ "Adaptec AHA-2920 PCI-SCSI Card", 42, 31, 3, -1, 1 },
{ "IBM F1 P264/32", 5, 14, 3, -1, 1 },
/* This next signature may not be a 3.5 bios */
{ "Future Domain Corp. V2.0108/18/93", 5, 33, 3, 5, 0 },
{ "FUTURE DOMAIN CORP. V3.5008/18/93", 5, 34, 3, 5, 0 },
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#ifndef _GDTH_PROC_H
#define _GDTH_PROC_H
/* gdth_proc.h
* $Id: gdth_proc.h,v 1.2 1997/02/21 08:08:51 achim Exp $
*/
static int gdth_set_info(char *buffer,int length,int vh,int hanum,int busnum);
static int gdth_set_asc_info(char *buffer,int length,int hanum,Scsi_Cmnd scp);
static int gdth_set_bin_info(char *buffer,int length,int hanum,Scsi_Cmnd scp);
static int gdth_get_info(char *buffer,char **start,off_t offset,
int length,int vh,int hanum,int busnum);
static int gdth_ioctl_alloc(int hanum, ushort size);
static void gdth_ioctl_free(int hanum, int id);
static void gdth_wait_completion(int hanum, int busnum, int id);
static void gdth_stop_timeout(int hanum, int busnum, int id);
static void gdth_start_timeout(int hanum, int busnum, int id);
static int gdth_update_timeout(Scsi_Cmnd *scp, int timeout);
void gdth_scsi_done(Scsi_Cmnd *scp);
#endif
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.
......@@ -498,8 +498,7 @@ static Scsi_Cmnd * end_scsi_request(Scsi_Cmnd * SCpnt, int uptodate, int sectors
req->nr_sectors -= bh->b_size >> 9;
req->sector += bh->b_size >> 9;
bh->b_reqnext = NULL;
mark_buffer_uptodate(bh, uptodate);
unlock_buffer(bh);
bh->b_end_io(bh, uptodate);
sectors -= bh->b_size >> 9;
if ((bh = req->bh) != NULL) {
req->current_nr_sectors = bh->b_size >> 9;
......
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.
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.
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.
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.
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.
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