Commit 18a8b1c2 authored by Linus Torvalds's avatar Linus Torvalds

Import pre2.0.2

parent 0351166f
......@@ -123,6 +123,10 @@ E: hennus@sky.ow.nl [My uucp-fed Linux box at home]
D: Author and maintainer of the QIC-02 tape driver
S: The Netherlands
N: Ross Biro
E: bir7@leland.Stanford.Edu
D: Original author of the Linux networking code
N: Thomas Bogendoerfer
E: tsbogend@bigbug.franken.de
D: Lance32 driver
......@@ -131,10 +135,6 @@ S: Baumgartenweg 5
S: 91452 Wilhermsdorf
S: Germany
N: Ross Biro
E: bir7@leland.Stanford.Edu
D: Original author of the Linux networking code
N: Bill Bogstad
E: bogstad@cs.jhu.edu
D: Wrote /proc/self patch
......@@ -320,6 +320,16 @@ S: 2255 Spruce
S: Boulder, Colorado 80302
S: USA
N: Heiko Eissfeldt
E: heiko@colossus.escape.de heiko@unifix.de
D: verify_area stuff, generic scsi fixes
D: SCSI Programming HOWTO
D: POSIX.1 compliance testing
S: Unifix Software GmbH
S: Bueltenweg 27a
S: D-38106 Braunschweig
S: Germany
N: Bjorn Ekwall
E: bj0rn@blox.se
W: http://www.pi.se/blox/
......@@ -583,6 +593,14 @@ S: 201 Howell Street, Apartment 1C
S: Chapel Hill, North Carolina 27514-4818
S: USA
N: Bernhard Kaindl
E: bartelt@computerhaus.at
D: Author of a menu based configuration tool, kmenu, which
D: is the predecessor of 'make menuconfig' and 'make xconfig'.
S: Tallak 95
S: 8103 Rein
S: Austria
N: Fred N. van Kempen
E: waltje@uwalt.nl.mugnet.org
D: NET-2
......@@ -633,6 +651,13 @@ N: Rudolf Koenig
E: rfkoenig@immd4.informatik.uni-erlangen.de
D: The Linux Support Team Erlangen
N: Gero Kuhlmann
E: gero@gkminix.han.de
D: mounting root via NFS
S: Donarweg 4
S: D-30657 Hannover
S: Germany
N: Markus Kuhn
E: mskuhn@cip.informatik.uni-erlangen.de
W: http://wwwcip.informatik.uni-erlangen.de/user/mskuhn
......@@ -641,13 +666,6 @@ S: Schlehenweg 9
S: D-91080 Uttenreuth
S: Germany
N: Gero Kuhlmann
E: gero@gkminix.han.de
D: mounting root via NFS
S: Donarweg 4
S: D-30657 Hannover
S: Germany
N: Bas Laarhoven
E: bas@vimec.nl
D: Loadable modules and ftape driver
......@@ -986,14 +1004,6 @@ D: Instigator, FHS standard
D: Keeper of the Jargon File and curator of the Retrocomputing Museum
D: Author, Emacs VC and GUD modes
N: Bernhard Kaindl
E: bartelt@computerhaus.at
D: Author of a menu based configuration tool, kmenu, which
D: is the predecessor of 'make menuconfig' and 'make xconfig'.
S: Tallak 95
S: 8103 Rein
S: Austria
N: Stefan Reinauer
E: stepan@home.culture.mipt.ru
W: http://home.culture.mipt.ru/~stepan
......@@ -1315,14 +1325,6 @@ S: Breeburgsingel 12
S: 2135 CN Hoofddorp
S: The Netherlands
N: Stephen D. Williams
E: sdw@lig.net
E: sdw@meaddata.com
D: Consultant, entrepreneur, developer
S: 2464 Rosina Drive
S: Dayton, Ohio 45342-6430
S: USA
N: G\"unter Windau
E: gunter@mbfys.kun.nl
D: Some bug fixes in the polling printer driver (lp.c)
......
......@@ -89,7 +89,7 @@ Procps utilities
In the latest 1.3.x kernel releases the /proc file system structure
was changed, so you need to upgrade the procps package to version
0.99a. In the very latest kernels, /proc has changed again. There's
not yet an officially updated version of procps, so make due with
not yet an officially updated version of procps, so make do with
0.99a; you might want to look for one of the patches floating around to
update 0.99a for use with 1.3.94 and later kernels.
......
......@@ -53,7 +53,7 @@ underlying hardware. Any structure is lost.
Apart from the somewhat unstructured interfacing with software, the
actual execution of the commands is different for most of the
different drivers: e.g., some drivers close the tray if an $open()$ call
occurs while the tray is unloaded, others not. Some drivers lock the
occurs while the tray is unloaded, while others do not. Some drivers lock the
door upon opening the device, to prevent an incoherent file system,
but others don't, to allow software ejection. Undoubtedly, the
capabilities of the different drives vary, but even when two drives have
......@@ -272,7 +272,7 @@ $$
\subsection{$Disc_status(dev_t\ dev)$}
\label{disc status}
As a complement to $drive_status()$, this functions can provide the
As a complement to $drive_status()$, this function can provide the
general \cdrom-routines with information about the current disc that is
inserted in the drive represented by $dev$. The history of development
of the CD's use as a carrier medium for various digital information
......@@ -288,7 +288,7 @@ CDS_XA_2_1& mixed data (XA), mode 2, form 1 (2048 user bytes)\cr
CDS_XA_2_2& mixed data (XA), mode 2, form 1 (2324 user bytes)\cr
}
$$
As far as I know, \cdrom's are always of type $CDS_DATA_1$. For
As far as I know, \cdrom s are always of type $CDS_DATA_1$. For
some information concerning frame layout of the various disc types, see
a recent version of {\tt cdrom.h}.
......@@ -347,8 +347,8 @@ If the drive can store multiple discs (a juke-box), it is likely that
a disc selection can be made by software. This function should perform
disc selection. It should return the number of the selected disc on
success, a negative value on error. Currently, none of the \linux\
\cdrom\ drivers appear to support such functionality, but it defined
here for future purpose.
\cdrom\ drivers appears to support such functionality, but it is defined
here for future purposes.
\subsection{$Get_last_session(dev_t\ dev, struct\ cdrom_multisession *
ms_info)$}
......@@ -418,12 +418,13 @@ supported, it should be done through the VFS and not via $ioctl$s. A
problem here could be the fact that audio-frames are 2352 bytes long,
so either the audio-file-system should ask for 75264 bytes at once
(the least common multiple of 512 and 2352), or the drivers should
bend their backs to cope with this incoherence (to which I would
oppose, this code then should be standardized in \cdromc).
bend their backs to cope with this incoherence (to which I would be
opposed). Once this question is resolved, this code should be standardized in
\cdromc.
Because there are so many $ioctl$s that seem to be introduced to
satisfy certain drivers,\footnote{Is there software around that actually uses
these? I 'd be interested!} any `non-standard' $ioctl$s are routed through
these? I'd be interested!} any `non-standard' $ioctl$s are routed through
the call $dev_ioctl()$. In principle, `private' $ioctl$s should be
numbered after the device's major number, and not the general \cdrom\
$ioctl$ number, {\tt 0x53}. Currently the non-supported $ioctl$s are:
......@@ -450,8 +451,8 @@ CDC_MEDIA_CHANGED& can report if disc has changed\cr
CDC_PLAY_AUDIO& can perform audio-functions (play, pause, etc)\cr
}
$$
The capability flag is declared $const$, to prevent drivers to
accidentally tamper with the contents. However, upon registration,
The capability flag is declared $const$, to prevent drivers from
accidentally tampering with the contents. However, upon registration,
some (claimed) capability flags may be cleared if the supporting
function has not been implemented (see $register_cdrom()$ in
\cdromc).
......@@ -464,17 +465,17 @@ $$\it
if\ (cdo\rightarrow capability \mathrel\& \mathord{\sim} cdo\rightarrow mask
\mathrel{\&} CDC_<capability>) \ldots
$$
The $mask$ could be set in the low-level driver code do disable
The $mask$ could be set in the low-level driver code to disable
certain capabilities for special brands of the device that can't
perform the actions. However, there is not (yet) and $ioctl$ to set
perform the actions. However, there is not (yet) an $ioctl$ to set
the mask\dots The reason is that I think it is better to control the
{\em behavior\/} rather than the {\em capabilities}.
\subsection{Options}
A final flag register controls the {\em behavior\/} of the \cdrom\
drives, in order to satisfy the different users's wishes, hopefully
independently of the ideas of the respectable author that happened to
drives, in order to satisfy different users' wishes, hopefully
independently of the ideas of the respective author who happened to
have made the drive's support available to the \linux\ community. The
current behavior options are:
$$
......@@ -537,7 +538,7 @@ behavior of the $open()$ call. Audio use simply wants to open the
device in order to get a file handle which is needed for issuing
$ioctl$ commands, while data use wants to open for correct and
reliable data transfer. The only way user programs can indicate what
their {\em purpose\/} of opening the device is, is trough the $flags$
their {\em purpose\/} of opening the device is, is through the $flags$
parameter (see {\tt open(2)}). For \cdrom\ devices, these flags aren't
implemented (some drivers implement checking for write-related flags,
but this is not strictly necessary if the device file has correct
......@@ -545,11 +546,11 @@ permission flags). Most option flags simply don't make sense to
\cdrom\ devices: $O_CREAT$, $O_NOCTTY$, $O_TRUNC$, $O_APPEND$, and
$O_SYNC$ have no meaning to a \cdrom.
We therefore propose to use the flag $O_NONBLOCK$ as an indication
We therefore propose to use the flag $O_NONBLOCK$ to indicate
that the device is opened just for issuing $ioctl$
commands. Strictly, the meaning of $O_NONBLOCK$ is that opening and
subsequent calls to the device don't cause the calling process to
wait. We could interpret this as ``don't wait until someone has been
wait. We could interpret this as ``don't wait until someone has
inserted some valid data-\cdrom.'' Thus, our proposal of the
implementation for the $open()$ call for \cdrom s is:
\begin{itemize}
......@@ -564,7 +565,7 @@ no actions whatsoever.
\subsection{And what about standards?}
You might hesitate to accept this proposal as is comes from the
You might hesitate to accept this proposal as it comes from the
\linux\ community, and not from some standardizing institute. What
about SUN, SGI, HP and all those other Unix and hardware vendors?
Well, these companies are in the lucky position that they generally
......@@ -583,8 +584,8 @@ implement such a user-program for \linux, I came across the
differences in behavior of the various drivers, and the need for an
$ioctl$ informing about media changes.}
We believe that using $O_NONBLOCK$ as indication for opening a device
for $ioctl$ commanding only, can be easily introduced in the \linux\
We believe that using $O_NONBLOCK$ to indicate that a device is being opened
for $ioctl$ commands only can be easily introduced in the \linux\
community. All the CD-player authors will have to be informed, we can
even send in our own patches to the programs. The use of $O_NONBLOCK$
has most likely no influence on the behavior of the CD-players on
......@@ -594,7 +595,7 @@ CDO_USE_FFLAGS)$.
\subsection{The preferred strategy of $open()$}
The routines in \cdromc\ are designed in such way, that a run-time
The routines in \cdromc\ are designed in such a way that a run-time
configuration of the behavior of \cdrom\ devices (of {\em any\/} type)
can be carried out, by the $CDROM_SET/CLEAR_OPTIONS$ $ioctls$. Thus, various
modes of operation can be set:
......@@ -734,7 +735,7 @@ cdrom_volctrl *{}$.
The following $ioctl$s have been introduced to allow user programs to
control the behavior of individual \cdrom\ devices. New $ioctl$
commands an be identified by their underscores in the name.
commands can be identified by the underscores in their names.
\begin{description}
\item[CDROM_SET_OPTIONS] Set options specified by $arg$. Returns the
option flag register after modification. Use $arg = \rm0$ for reading
......@@ -757,7 +758,7 @@ the current flags.
\item[CDROM_DRIVE_STATUS] Returns the status of the drive by a call to
$drive_status()$. Return values are as defined in section~\ref{drive
status}. Note that this call doesn't return information on the
current playing activity of the drive, this can be polled through an
current playing activity of the drive; this can be polled through an
$ioctl$ call to $CDROMSUBCHNL$.
\item[CDROM_DISC_STATUS] Returns the type of the disc currently in the
drive by a call to $disc_status()$. Return values are as defined in
......@@ -802,10 +803,10 @@ the code in a large part, and you may just have to adapt the prototype
and return values.
\item Rename your $<device>_ioctl()$ function to $audio_ioctl$ and
change the prototype a little. Remove entries listed in the first part
in section~\ref{cdrom-ioctl}, if your code was OK, this are just calls
in section~\ref{cdrom-ioctl}, if your code was OK, these are just calls
to the routines you adapted in the previous step.
\item You may remove all remaining memory checking code in the
$audio_ioctl()$ function that deal with audio commands (these are
$audio_ioctl()$ function that deals with audio commands (these are
listed in the second part of section~\ref{cdrom-ioctl}). There is no
need for memory allocation either, so most $case$s in the $switch$
statement look similar to:
......@@ -828,8 +829,8 @@ way.
Thanks to all the people involved. Thanks to Thomas Quinot, Jon Tombs,
Ken Pizzini, Eberhard M\"onkeberg and Andrew Kroll, the \linux\
\cdrom\ device driver developers that were kind enough to give
sugestions and criticisms during the writing. Finally of course, I
\cdrom\ device driver developers who were kind enough to give
suggestions and criticisms during the writing. Finally of course, I
want to thank Linus Torvalds for making this possible in the first
place.
......
......@@ -6,7 +6,7 @@ cm206 in combination with the cm260 host adapter card.
Changes since version 0.99
--------------------------
- Interfacing to the kernel is routed though an extra interface layer,
cdrom.c. This allows runtime-configurable `bahavior' of the cdrom-drive,
cdrom.c. This allows runtime-configurable `behavior' of the cdrom-drive,
independent of the driver.
Features since version 0.33
......@@ -70,7 +70,7 @@ the module when you upgrade the kernel to a new version.
Since version 0.96, much of the functionality has been transferred to
a generic cdrom interface in the file cdrom.c. The module cm206.o
depends on cdrom.o. If the latter is not compiled in in the kernel,
depends on cdrom.o. If the latter is not compiled into the kernel,
you must explicitly load it before cm206.o:
insmod /usr/src/linux/modules/cdrom.o
......@@ -84,7 +84,7 @@ line to be used, e.g.
insmod /usr/src/linux/modules/cm206.o cm206=0x300,11
The order of base port and irq line don't matter; you may specify only
The order of base port and irq line doesn't matter; you may specify only
one, the other will have the value of the compiled-in default. You
may also have to install the file-system module `iso9660.o', if you
didn't compile that into the kernel.
......@@ -181,5 +181,5 @@ The copyright of the cm206 driver for Linux is
(c) 1995 David A. van Leeuwen
The driver is released under the conditions of the GNU general public
license, that can be found in the file COPYING in the root of this
license, which can be found in the file COPYING in the root of this
source tree.
This diff is collapsed.
This diff is collapsed.
......@@ -311,6 +311,11 @@ M: Bob Frey <bobf@advansys.com>
W: http://www.advansys.com/linux
S: Maintained
CREDITS FILE
P: John A. Martin
M: jam@acm.org
S: Maintained
REST:
P: Linus Torvalds
S: Buried alive in email
VERSION = 1
PATCHLEVEL = 99
SUBLEVEL = 1
SUBLEVEL = 2
ARCH = i386
......
This diff is collapsed.
/*
* linux/drivers/block/ide.c Version 5.41 May 9, 1996
* linux/drivers/block/ide.c Version 5.42 May 12, 1996
*
* Copyright (C) 1994-1996 Linus Torvalds & authors (see below)
*/
#define _IDE_C /* needed by <linux/blk.h> */
/*
* Maintained by Mark Lord <mlord@pobox.com>
* and Gadi Oxman <gadio@netvision.net.il>
*
* This is the multiple IDE interface driver, as evolved from hd.c.
* It supports up to four IDE interfaces, on one or more IRQs (usually 14 & 15).
* There can be up to two drives per interface, as per the ATA-2 spec.
*
* Primary i/f: ide0: major=3; (hda) minor=0; (hdb) minor=64
* Secondary i/f: ide1: major=22; (hdc or hd1a) minor=0; (hdd or hd1b) minor=64
* Tertiary i/f: ide2: major=33; (hde) minor=0; (hdf) minor=64
* Quaternary i/f: ide3: major=34; (hdg) minor=0; (hdh) minor=64
* Primary: ide0, port 0x1f0; major=3; hda is minor=0; hdb is minor=64
* Secondary: ide1, port 0x170; major=22; hdc is minor=0; hdd is minor=64
* Tertiary: ide2, port 0x???; major=33; hde is minor=0; hdf is minor=64
* Quaternary: ide3, port 0x???; major=34; hdg is minor=0; hdh is minor=64
*
* It is easy to extend ide.c to handle more than four interfaces:
*
......@@ -51,11 +54,8 @@
*
* Mark Lord (mlord@pobox.com) (IDE Perf.Pkg)
* Delman Lee (delman@mipg.upenn.edu) ("Mr. atdisk2")
* Petri Mattila (ptjmatti@kruuna.helsinki.fi) (EIDE stuff)
* Scott Snyder (snyder@fnald0.fnal.gov) (ATAPI IDE cd-rom)
*
* Maintained by Mark Lord (mlord@pobox.com): ide.c, ide.h, triton.c, hd.c, ..
*
* This was a rewrite of just about everything from hd.c, though some original
* code is still sprinkled about. Think of it as a major evolution, with
* inspiration from lots of linux users, esp. hamish@zot.apana.org.au
......@@ -235,6 +235,8 @@
* help sharing by masking device irq after probing
* Version 5.41 more fixes to irq sharing/serialize detection
* disable io_32bit by default on drive reset
* Version 5.42 simplify irq-masking after probe
* fix NULL pointer deref in save_match()
*
* Some additional driver compile-time options are in ide.h
*
......@@ -2419,12 +2421,11 @@ static int try_to_identify (ide_drive_t *drive, byte cmd)
} else
rc = 2; /* drive refused ID */
if (!HWIF(drive)->irq) {
OUT_BYTE(drive->ctl|2,IDE_CONTROL_REG); /* mask device irq */
udelay(5);
irqs = probe_irq_off(irqs); /* get our irq number */
if (irqs > 0) {
HWIF(drive)->irq = irqs; /* save it for later */
irqs = probe_irq_on(); /* grab irqs, to ignore next edge */
OUT_BYTE(drive->ctl|2,IDE_CONTROL_REG); /* mask device irq */
(void) probe_irq_off(irqs); /* restore irqs again */
} else { /* Mmmm.. multiple IRQs.. don't know which was ours */
printk("%s: IRQ probe failed (%d)\n", drive->name, irqs);
#ifdef CONFIG_BLK_DEV_CMD640
......@@ -3032,7 +3033,7 @@ static void save_match (ide_hwif_t *hwif, ide_hwif_t *new, ide_hwif_t **match)
return;
printk("%s: potential irq problem with %s and %s\n", hwif->name, new->name, m->name);
}
if (m->irq != hwif->irq) /* don't undo a prior perfect match */
if (!m || m->irq != hwif->irq) /* don't undo a prior perfect match */
*match = new;
}
#endif /* MAX_HWIFS > 1 */
......
......@@ -87,6 +87,7 @@ static struct ide_pio_info {
{ "QUANTUM LPS365A", 3 },
{ "QUANTUM LPS540A", 3 },
{ "QUANTUM LIGHTNING 540A", 3 },
{ "QUANTUM LIGHTNING 730A", 3 },
{ "QUANTUM FIREBALL", 3 }, /* For models 540/640/1080/1280 */
/* 1080A works fine in mode4 with triton */
{ NULL, 0 }
......
......@@ -99,12 +99,12 @@ int unregister_cdrom(int major, char *name)
#define ENOMEDIUM EAGAIN /* no medium in removable device */
/* We use the open-option O_NONBLOCK as in indicator of that the
/* We use the open-option O_NONBLOCK to indicate that the
* purpose of opening is only for subsequent ioctl() calls; no device
* integrity checks are performed.
*
* We hope that all cd-player programs will adopt this convention. It
* is in their own advantage: device conotrol becomes a lot easier
* is in their own interest: device control becomes a lot easier
* this way.
*/
int open_for_data(struct cdrom_device_ops *, int);
......@@ -261,7 +261,7 @@ void sanitize_format(union cdrom_addr *addr,
/* All checking and format change makes this code really hard to read!
* So let's make some check and memory move macros. These macros are
* a little inenficient when used both in the same piece of code, as
* a little inefficient when both used in the same piece of code, as
* verify_area is used twice, but who cares, as ioctl() calls
* shouldn't be in inner loops.
*/
......@@ -280,8 +280,8 @@ void sanitize_format(union cdrom_addr *addr,
* in parenthesis): CDROMREADMODE1 (2+ide), CDROMREADMODE2 (2+ide),
* CDROMREADAUDIO (2+ide), CDROMREADRAW (2), CDROMREADCOOKED (2),
* CDROMSEEK (2), CDROMPLAYBLK (scsi), CDROMREADALL (1). Read-audio,
* OK (although i guess the record companies aren't too hapy with
* this, most drives therefor refuse to transport audio data). But
* OK (although i guess the record companies aren't too happy with
* this, most drives therefore refuse to transport audio data). But
* why are there 5 different READs defined? For now, these functions
* are left over to the device-specific ioctl routine,
* cdo->dev_ioctl. Note that as a result of this, no
......
......@@ -77,7 +77,7 @@
Upgrade to Linux kernel 1.3.78.
11 apr 1996 0.98 Upgrade to Linux kernel 1.3.85
More uniformization stuff.
Made it more uniform.
*
* Parts of the code are based upon lmscd.c written by Kai Petzke,
* sbpcd.c written by Eberhard Moenkeberg, and mcd.c by Martin
......@@ -92,7 +92,7 @@
* with `cm206' in it, as this stuff is too series-dependent.
*
* Currently, my limited knowledge is based on:
* - The Linux Kernel Hacker's guide, v. 0.5, by Michael J. Johnson
* - The Linux Kernel Hacker's guide, v. 0.5, by Michael K. Johnson
* - Linux Kernel Programmierung, by Michael Beck and others
* - Philips/LMS cm206 and cm226 product specification
* - Philips/LMS cm260 product specification
......@@ -176,7 +176,7 @@ struct cm206_struct {
uch intr_ur; /* uart receive buffer */
uch dsb, cc; /* drive status byte and condition (error) code */
uch fool;
int command; /* command to be written to te uart */
int command; /* command to be written to the uart */
int openfiles;
ush sector[READ_AHEAD*RAW_SECTOR_SIZE/2]; /* buffered cd-sector */
int sector_first, sector_last; /* range of these sector */
......@@ -296,7 +296,7 @@ static void cm206_interrupt(int sig, void *dev_id, struct pt_regs * regs)
stats(sync_error);
}
else if (cd->intr_ds & ds_toc_ready) {
/* do something appropiate */
/* do something appropriate */
}
/* couldn't see why this interrupt, maybe due to init */
else {
......@@ -578,7 +578,7 @@ void get_disc_status(void)
}
}
/* The new open. The real opeining strategy is defined in cdrom.c. */
/* The new open. The real opening strategy is defined in cdrom.c. */
static int cm206_open(dev_t dev, int purpose)
{
......@@ -622,7 +622,7 @@ void empty_buffer(int sectors)
cd->sector_last=cd->adapter_first; /* update the buffer sector */
}
/* try_adapter. This function determines if the requested sector is is
/* try_adapter. This function determines if the requested sector is
in adapter memory, or will appear there soon. Returns 0 upon
success */
int try_adapter(int sector)
......@@ -883,7 +883,7 @@ void get_toc_entry(struct cdrom_tocentry * ep)
/* Audio ioctl. Ioctl commands connected to audio are in such an
* idiosyncratic i/o format, that we leave these untouched. Return 0
* upon success. Memory checking has been done by cdrom_ioctl(), the
* calling function, as well as LBA/MSF sanatization.
* calling function, as well as LBA/MSF sanitization.
*/
int cm206_audio_ioctl(dev_t dev, unsigned int cmd, void * arg)
{
......@@ -896,7 +896,7 @@ int cm206_audio_ioctl(dev_t dev, unsigned int cmd, void * arg)
case CDROMPLAYMSF:
play_from_to_msf((struct cdrom_msf *) arg);
return 0;
case CDROMPLAYTRKIND: /* admittedly, not particulary beautiful */
case CDROMPLAYTRKIND: /* admittedly, not particularly beautiful */
play_from_to_track(((struct cdrom_ti *)arg)->cdti_trk0,
((struct cdrom_ti *)arg)->cdti_trk1);
return 0;
......@@ -959,7 +959,7 @@ int cm206_media_changed(dev_t dev)
else return -EIO;
}
/* The new generic cdrom support. Routines should be consice, most of
/* The new generic cdrom support. Routines should be concise, most of
the logic should be in cdrom.c */
/* returns number of times device is in use */
......
......@@ -370,11 +370,14 @@ printk ( "GSCD: open\n" );
if (gscdPresent == 0)
return -ENXIO; /* no hardware */
MOD_INC_USE_COUNT;
get_status ();
st = disk_state & (ST_NO_DISK | ST_DOOR_OPEN);
if ( st )
{
printk ( "GSCD: no disk or door open\n" );
MOD_DEC_USE_COUNT;
return -ENXIO;
}
......@@ -382,8 +385,6 @@ printk ( "GSCD: open\n" );
return -EIO;
*/
MOD_INC_USE_COUNT;
return 0;
}
......
......@@ -1201,7 +1201,7 @@ int kbd_init(void)
ttytab = console_driver.table;
request_irq(KEYBOARD_IRQ, keyboard_interrupt, 0, "keyboard", NULL);
request_region(0x60,16,"kbd");
request_region(0x60,16,"keyboard");
#ifdef INIT_KBD
initialize_kbd();
#endif
......
......@@ -41,7 +41,7 @@
*
* -- Daniel M. Eischen, deischen@iworks.InterWorks.org, 04/03/95
*
* $Id: aic7xxx.c,v 3.0 1996/04/16 09:11:53 deang Exp $
* $Id: aic7xxx.c,v 3.2 1996/05/12 17:28:23 deang Exp $
*-M*************************************************************************/
#ifdef MODULE
......@@ -74,7 +74,7 @@ struct proc_dir_entry proc_scsi_aic7xxx = {
S_IFDIR | S_IRUGO | S_IXUGO, 2
};
#define AIC7XXX_C_VERSION "$Revision: 3.0 $"
#define AIC7XXX_C_VERSION "$Revision: 3.2 $"
#define NUMBER(arr) (sizeof(arr) / sizeof(arr[0]))
#define MIN(a,b) ((a < b) ? a : b)
......@@ -1069,8 +1069,7 @@ aic7xxx_length(Scsi_Cmnd *cmd, int sg_last)
*-F*************************************************************************/
static void
aic7xxx_scsirate(struct aic7xxx_host *p, unsigned char *scsirate,
short period, unsigned char offset,
int target, char channel)
short period, unsigned char offset, int target, char channel)
{
int i;
......@@ -1367,8 +1366,7 @@ aic7xxx_done_aborted_scbs (struct aic7xxx_host *p)
* Add this SCB to the head of the "waiting for selection" list.
*-F*************************************************************************/
static void
aic7xxx_add_waiting_scb(u_long base,
struct aic7xxx_scb *scb)
aic7xxx_add_waiting_scb(u_long base, struct aic7xxx_scb *scb)
{
unsigned char next;
unsigned char curscb;
......@@ -1393,7 +1391,7 @@ aic7xxx_add_waiting_scb(u_long base,
*-F*************************************************************************/
static unsigned char
aic7xxx_abort_waiting_scb(struct aic7xxx_host *p, struct aic7xxx_scb *scb,
unsigned char prev, unsigned char timedout_scb)
unsigned char prev, unsigned char timedout_scb)
{
unsigned char curscb, next;
int target = (scb->target_channel_lun >> 4) & 0x0F;
......@@ -1457,7 +1455,7 @@ aic7xxx_abort_waiting_scb(struct aic7xxx_host *p, struct aic7xxx_scb *scb,
*-F*************************************************************************/
static int
aic7xxx_reset_device(struct aic7xxx_host *p, int target, char channel,
unsigned char timedout_scb)
unsigned char timedout_scb)
{
int base = p->base;
struct aic7xxx_scb *scb;
......@@ -1602,7 +1600,7 @@ aic7xxx_reset_current_bus(int base)
*-F*************************************************************************/
static int
aic7xxx_reset_channel(struct aic7xxx_host *p, char channel,
unsigned char timedout_scb, int initiate_reset)
unsigned char timedout_scb, int initiate_reset)
{
int base = p->base;
unsigned char sblkctl;
......@@ -1686,7 +1684,10 @@ aic7xxx_reset_channel(struct aic7xxx_host *p, char channel,
{
aic7xxx_reset_current_bus(base);
}
/* Ensure we don't get a RSTI interrupt from this. */
/*
* Ensure we don't get a RSTI interrupt from this.
*/
outb(CLRSCSIRSTI | CLRSELTIMEO, CLRSINT1 + base);
outb(CLRSCSIINT, CLRINT + base);
outb(sblkctl, SBLKCTL + base);
......@@ -1706,7 +1707,9 @@ aic7xxx_reset_channel(struct aic7xxx_host *p, char channel,
{
aic7xxx_reset_current_bus(base);
}
/* Ensure we don't get a RSTI interrupt from this. */
/*
* Ensure we don't get a RSTI interrupt from this.
*/
outb(CLRSCSIRSTI | CLRSELTIMEO, CLRSINT1 + base);
outb(CLRSCSIINT, CLRINT + base);
......@@ -3121,7 +3124,7 @@ detect_maxscb(struct aic7xxx_host_config *config)
*-F*************************************************************************/
static int
aic7xxx_register(Scsi_Host_Template *template,
struct aic7xxx_host_config *config)
struct aic7xxx_host_config *config)
{
int i;
unsigned char sblkctl;
......@@ -3327,7 +3330,7 @@ aic7xxx_register(Scsi_Host_Template *template,
* so we default it to 100%.
*/
config->bus_speed = DFTHRSH_100;
scsi_conf = config->scsi_id | DFTHRSH_100;
scsi_conf = config->scsi_id | config->bus_speed;
#if 0
if (config->parity == AIC_ENABLED)
{
......@@ -3335,18 +3338,11 @@ aic7xxx_register(Scsi_Host_Template *template,
}
#endif
outb(scsi_conf, SCSICONF + base);
outb(DFTHRSH_100, DSPCISTATUS + base);
outb(config->bus_speed, DSPCISTATUS + base);
/*
* In case we are a wide card...
*/
/*
* Try the following:
*
* 1) outb(config->scsi_id, SCSICONF + base + 1);
* 2) outb(scsiconf, SCSICONF + base + 1);
*
*/
outb(config->scsi_id, SCSICONF + base + 1);
printk("aic7xxx: Extended translation %sabled.\n",
......@@ -3737,7 +3733,7 @@ aic7xxx_register(Scsi_Host_Template *template,
* 2s compliment of SCBCOUNT
*/
i = p->maxscb;
outb(-i & 0xff, COMP_SCBCOUNT + base);
outb(-i & 0xFF, COMP_SCBCOUNT + base);
/*
* Set the QCNT (queue count) mask to deal with broken aic7850s that
......@@ -3788,7 +3784,9 @@ aic7xxx_register(Scsi_Host_Template *template,
udelay(1000);
outb(0, SCSISEQ + base);
/* Ensure we don't get a RSTI interrupt from this. */
/*
* Ensure we don't get a RSTI interrupt from this.
*/
outb(CLRSCSIRSTI, CLRSINT1 + base);
outb(CLRSCSIINT, CLRINT + base);
......@@ -3802,7 +3800,9 @@ aic7xxx_register(Scsi_Host_Template *template,
udelay(1000);
outb(0, SCSISEQ + base);
/* Ensure we don't get a RSTI interrupt from this. */
/*
* Ensure we don't get a RSTI interrupt from this.
*/
outb(CLRSCSIRSTI, CLRSINT1 + base);
outb(CLRSCSIINT, CLRINT + base);
......@@ -3970,7 +3970,7 @@ aic7xxx_detect(Scsi_Host_Template *template)
case AIC_7872: /* 3940 */
case AIC_7882: /* 3940-Ultra */
config.chan_num = number_of_39xxs & 0x1; /* Has 2 controllers */
config.chan_num = number_of_39xxs & 0x01; /* Has 2 controllers */
number_of_39xxs++;
if (number_of_39xxs == 2)
{
......@@ -3980,7 +3980,7 @@ aic7xxx_detect(Scsi_Host_Template *template)
case AIC_7873: /* 3985 */
case AIC_7883: /* 3985-Ultra */
config.chan_num = number_of_39xxs & 0x3; /* Has 3 controllers */
config.chan_num = number_of_39xxs & 0x03; /* Has 3 controllers */
number_of_39xxs++;
if (number_of_39xxs == 3)
{
......@@ -4013,7 +4013,8 @@ aic7xxx_detect(Scsi_Host_Template *template)
*/
csize_lattime |= 8;
}
if((csize_lattime & LATTIME) == 0)
if ((csize_lattime & LATTIME) == 0)
{
/*
* Default to 64 PCLKS (is this a good value?)
......@@ -4049,7 +4050,7 @@ aic7xxx_detect(Scsi_Host_Template *template)
* The first bit of PCI_BASE_ADDRESS_0 is always set, so
* we mask it off.
*/
base = io_port & 0xfffffffe;
base = io_port & 0xFFFFFFFE;
/*
* I don't think we need to bother with allowing
......@@ -4115,9 +4116,8 @@ aic7xxx_detect(Scsi_Host_Template *template)
* Build a SCB.
*-F*************************************************************************/
static void
aic7xxx_buildscb(struct aic7xxx_host *p,
Scsi_Cmnd *cmd,
struct aic7xxx_scb *scb)
aic7xxx_buildscb(struct aic7xxx_host *p, Scsi_Cmnd *cmd,
struct aic7xxx_scb *scb)
{
void *addr;
unsigned short mask;
......@@ -4638,7 +4638,7 @@ aic7xxx_abort(Scsi_Cmnd *cmd)
* the SCSI bus reset line.
*-F*************************************************************************/
int
aic7xxx_reset(Scsi_Cmnd *cmd)
aic7xxx_reset(Scsi_Cmnd *cmd, unsigned int resetFlags)
{
#ifdef AIC7XXX_DEBUG_ABORT
printk ("aic7xxx: (reset) target/channel %d/%d\n", cmd->target, cmd->channel);
......@@ -4683,11 +4683,11 @@ aic7xxx_biosparam(Disk *disk, kdev_t dev, int geom[])
sectors = 32;
cylinders = disk->capacity / (heads * sectors);
if (p->extended && cylinders > 1024)
if (p->extended && (cylinders > 1024))
{
heads = 255;
sectors = 63;
cylinders = disk->capacity / (255 * 63);
cylinders = disk->capacity / (heads * sectors);
}
geom[0] = heads;
......
......@@ -18,12 +18,12 @@
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Id: aic7xxx.h,v 3.0 1996/04/16 09:11:53 deang Exp $
* $Id: aic7xxx.h,v 3.1 1996/05/12 17:25:20 deang Exp $
*-M*************************************************************************/
#ifndef _aic7xxx_h
#define _aic7xxx_h
#define AIC7XXX_H_VERSION "$Revision: 3.0 $"
#define AIC7XXX_H_VERSION "$Revision: 3.1 $"
/*
* Scsi_Host_Template (see hosts.h) for AIC-7xxx - some fields
......@@ -58,7 +58,7 @@ extern int aic7xxx_biosparam(Disk *, kdev_t, int[]);
extern int aic7xxx_detect(Scsi_Host_Template *);
extern int aic7xxx_command(Scsi_Cmnd *);
extern int aic7xxx_abort(Scsi_Cmnd *);
extern int aic7xxx_reset(Scsi_Cmnd *);
extern int aic7xxx_reset(Scsi_Cmnd *, unsigned int resetFlags);
extern const char *aic7xxx_info(struct Scsi_Host *);
......
/*+M*************************************************************************
* Adaptec AIC7xxx device driver proc support for Linux.
*
* Copyright (c) 1995 Dean W. Gehnert
* Copyright (c) 1995, 1996 Dean W. Gehnert
*
* 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
......@@ -18,13 +18,13 @@
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
*
* ----------------------------------------------------------------
* o Modified from the EATA /proc support.
* o Modified from the EATA-DMA /proc support.
* o Additional support for device block statistics provided by
* Matthew Jacob.
*
* Dean W. Gehnert, deang@teleport.com, 08/30/95
* Dean W. Gehnert, deang@teleport.com, 05/01/96
*
* $Id: aic7xxx_proc.c,v 3.0 1996/04/16 08:52:23 deang Exp $
* $Id: aic7xxx_proc.c,v 3.1 1996/05/12 17:25:56 deang Exp $
*-M*************************************************************************/
#define BLS buffer + len + size
......
......@@ -144,10 +144,10 @@ affs_readdir(struct inode *inode, struct file *filp, void *dirent, filldir_t fil
if (filp->private_data && filp->f_version == dir->i_version) {
i = (ULONG)filp->private_data;
j = 0;
pd_debug("AFFS: readdir() left off=%lu\n",i);
pr_debug("AFFS: readdir() left off=%lu\n",i);
}
filp->f_version = dir->i_version;
pd_debug("AFFS: hash_pos=%lu chain_pos=%lu\n", hash_pos, chain_pos);
pr_debug("AFFS: hash_pos=%lu chain_pos=%lu\n", hash_pos, chain_pos);
while (i) {
if (!(fh_bh = affs_bread(inode->i_dev,i,AFFS_I2BSIZE(inode)))) {
printk("AFFS: readdir: Can't get block %d\n",i);
......
......@@ -12,9 +12,9 @@
#include <linux/binfmts.h>
#include <paths.h>
#define _PATH_JAVA "/usr/local/java/bin/java"
#define _PATH_APPLET "/usr/local/java/bin/appletviewer"
#define _PATH_BASH "/bin/bash"
#define _PATH_JAVA "/usr/bin/java"
#define _PATH_APPLET "/usr/bin/appletviewer"
#define _PATH_SH "/bin/sh"
static int do_load_script(struct linux_binprm *bprm,struct pt_regs *regs)
{
......@@ -29,7 +29,7 @@ static int do_load_script(struct linux_binprm *bprm,struct pt_regs *regs)
/*
* OK, we've set the interpreter name
* Splice in (1) the interpreter's name for argv[0] (_PATH_BASH)
* Splice in (1) the interpreter's name for argv[0] (_PATH_SH)
* (2) the name of the java wrapper for argv[1] (_PATH_JAVA)
* (3) filename of Java class (replace argv[0])
* without leading path or trailing '.class'
......@@ -52,7 +52,7 @@ static int do_load_script(struct linux_binprm *bprm,struct pt_regs *regs)
bprm->p = copy_strings(1, &cp, bprm->page, bprm->p, 2);
bprm->argc++;
strcpy (bprm->buf, _PATH_BASH);
strcpy (bprm->buf, _PATH_SH);
interp = bprm->buf;
if ((i_name = strrchr (bprm->buf, '/')) != NULL)
i_name++;
......
......@@ -107,8 +107,9 @@ void initrd_init(void);
#endif
#define RO_IOCTLS(dev,where) \
case BLKROSET: if (!suser()) return -EACCES; \
set_device_ro((dev),get_fs_long((long *) (where))); return 0; \
case BLKROSET: { int __err; if (!suser()) return -EACCES; \
__err = verify_area(VERIFY_READ, (void *) (where), sizeof(long)); \
if (!__err) set_device_ro((dev),get_fs_long((long *) (where))); return __err; } \
case BLKROGET: { int __err = verify_area(VERIFY_WRITE, (void *) (where), sizeof(long)); \
if (!__err) put_fs_long(0!=is_read_only(dev),(long *) (where)); return __err; }
......
#!/bin/sh
#
# This script creates the proper /dev/ entries for IDE devices
# on the primary, secondary, tertiary, and quaternary interfaces.
# See ../Documentation/ide.txt for more information.
#
makedev () {
rm -f /dev/$1
......
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