Commit 780f80d7 authored by Linus Torvalds's avatar Linus Torvalds

Import 2.2.6pre1

parent 4cfb4152
......@@ -3956,8 +3956,8 @@ CONFIG_SCSI_NCR53C8XX
tagged command queuing and fast synchronous data transfers up to 80
MB/s with wide FAST-40 LVD devices and controllers.
The NCR53C860 and NCR53C875 support FAST-20 transfers. The NCR53C895
supports FAST-40 transfers with Ultra2 LVD devices.
An additionnal driver named SYM53C8XX (a.k.a 896 driver) can also be
configured. See the help on the SYM53C8XX driver for more information.
Note: there is another driver for the 53c8xx family of controllers
("NCR53c7,8xx SCSI support" above). If you want to use them both,
......@@ -3967,6 +3967,30 @@ CONFIG_SCSI_NCR53C8XX
Please read drivers/scsi/README.ncr53c8xx for more information.
SYM53C8XX SCSI support
CONFIG_SCSI_SYM53C8XX
The 896 driver for Linux (a.k.a. sym53c8xx) is derivated from the
ncr53c8xx driver and has been heavily reworked and enhanced to
fully support all the features of recent 53C8XX chips, notably the
hardware phase mismatch feature of the SYM53C896.
For that to be achieved without additionnal complexity, support of
old 8XX chips has been dropped. If your system uses either a
810 rev. < 16, a 815, or a 825 rev. < 16 PCI SCSI processor, you must
use the generic NCR53C8XX driver or configure both the NCR53C8XX and
the SYM53C8XX drivers either as module or linked to the kernel image.
When both drivers are linked to the kernel, the SYM53C8XX driver is
called first at initialization and you can use the 'excl=ioaddr'
driver boot option to exclude attachement of adapters by the SYM53C8XX
driver. For instance, entering 'sym53c8xx=excl:0xb400,excl=0xc000' at
lilo prompt prevents adapters at io address 0xb400 and 0xc000 from
being attached by the SYM53C8XX driver, thus allowing the NCR53C8XX
driver to attach them. The 'excl' option is also supported by the
NCR53C8XX driver.
Please read drivers/scsi/README.ncr53c8xx for more information.
synchronous data transfers frequency
CONFIG_SCSI_NCR53C8XX_SYNC
The SCSI Parallel Interface-2 Standard defines 4 classes of transfer
......@@ -4079,6 +4103,17 @@ CONFIG_SCSI_NCR53C8XX_PROFILE
The normal answer therefore is N.
include support for the NCR PQS/PDS SCSI card
CONFIG_SCSI_NCR53C8XX_PQS_PDS
This allows the driver to detect a special adapter produced by NCR
corporation called a PCI Quad SCSI or PCI Dual SCSI. You do not need
this if you do not have one of these adapters. However, since this
device is detected as a specific PCI device, this option is quite
safe. This option is only supported by the SYM53C8XX driver (not
by the NCR53C8XX driver).
The common answer here is N, but answering Y is safe.
IBMMCA SCSI support
CONFIG_SCSI_IBMMCA
This is support for the IBM SCSI adapter found in many of the PS/2
......@@ -7613,8 +7648,7 @@ CONFIG_NLS_ISO8859_1
set, which covers most West European languages such as Albanian,
Catalan, Danish, Dutch, English, Faeroese, Finnish, French, German,
Galician, Irish, Icelandic, Italian, Norwegian, Portuguese, Spanish,
Swedish, and Valencian. It is also the default for the US. If
unsure, say Y.
and Swedish. It is also the default for the US. If unsure, say Y.
nls iso8859-2
CONFIG_NLS_ISO8859_2
......@@ -7706,7 +7740,7 @@ CONFIG_NLS_ISO8859_15
set, which covers most West European languages such as Albanian,
Catalan, Danish, Dutch, English, Estonian, Faeroese, Finnish,
French, German, Galician, Irish, Icelandic, Italian, Norwegian,
Portuguese, Spanish, Swedish, and Valencian. Latin 9 is an update to
Portuguese, Spanish, and Swedish. Latin 9 is an update to
Latin 1 (ISO 8859-1) that removes a handful of rarely used
characters and instead adds support for Estonian, corrects the
support for French and Finnish, and adds the new Euro character. If
......
......@@ -88,25 +88,63 @@ The X-Server must restore the video mode correctly, else you end up
with a broken console (and vesafb cannot do anything about this).
Refresh rates
=============
There is no way to change the vesafb video mode and/or timings after
booting linux. If you are not happy with the 60 Hz refresh rate, you
have these options:
* configure and load the DOS-Tools for your the graphics board (if
available) and boot linux with loadlin.
* use a native driver (matroxfb/atyfb) instead if vesafb. If none
is available, write a new one!
* VBE 3.0 might work too. I havn't neither a gfx board with VBE 3.0
support nor the specs, so I havn't checked this yet. But maybe...
Configuration
=============
You can pass kernel command line options to vesafb with
"video=vesa:option1". Multiple options should be separated
by comma. Accepted options:
The VESA BIOS provides protected mode interface for changing
some parameters. vesafb can use it for palette changes and
to pan the display. It is turned off by default becauce it
seems not to work with some BIOS versions, but there are options
to turn it on.
You can pass options to vesafb using "video=vesa:option" on
the kernel command line. Multiple options should be separated
by comma, like this: "video=vesa:ypan,invers"
Accepted options:
invers no comment...
ypan enable display panning using the VESA protected mode
interface. The visible screen is just a window of the
video memory, console scrolling is done by changing the
start of the window.
pro: * scrolling (fullscreen) is fast, becauce there is
no need to copy around data.
* You'll get scrollback (the Shift-PgUp thing),
the video memory can be used as scrollback buffer
kontra: * scrolling only parts of the screen causes some
ugly flicker effects (boot logo flickers for
example).
ywrap Same as ypan, but assumes your gfx board can wrap-around
the video memory (i.e. starts reading from top if it
reaches the end of video memory). Faster than ypan.
redraw scroll by redrawing the affected part of the screen, this
is the safe (and slow) default.
vgapal Use the standard vga registers for palette changes.
This is the default.
pmipal Use the protected mode interface for palette changes.
invers - no comment...
redraw - scroll by redrawing the affected part of the screen
ypan - enable display panning using the VESA protected mode
interface. This enables the Shift-PgUp scrollback
thing and greatly speeds up fullscreen scrolling.
It is slower than "redraw" when scrolling only a halve
screen. This is the default.
ywrap - If your gfx board supports wrap-around, use this one
instead of ypan.
nopal - Don't use the protected mode interface for palette
changes. vesafb will try the standard vga registers
instead.
mtrr setup memory type range registers for the vesafb framebuffer.
Have fun!
......@@ -114,7 +152,7 @@ Have fun!
Gerd
--
Gerd Knorr <kraxel@cs.tu-berlin.de>
Gerd Knorr <kraxel@goldbach.in-berlin.de>
Minor (mostly typo) changes
by Nico Schmoigl <schmoigl@rumms.uni-mannheim.de>
......@@ -20,6 +20,8 @@ smbfs.txt
- info on using filesystems with the SMB protocol (Windows 3.11 and NT)
sysv-fs.txt
- info on the SystemV/Coherent filesystem.
ufs.txt
- info on the ufs filesystem.
umsdos.txt
- info on the umsdos extensions to the msdos filesystem.
vfat.txt
......
USING UFS
=========
mount -t ufs -o ufstype=type_of_ufs device dir
UFS OPTIONS
===========
ufstype=string
UFS is a file system widely used in different operating systems.
The problem are differencies among implementations. Features of
some implementations are undocumented, so its hard to recognize
type of ufs automatically. That's why user must specify type of
ufs manually by mount option ufstype. Possible values are:
old old format of ufs
default value, supported os read-only
44bsd used in FreeBSD, NetBSD, OpenBSD
supported os read-write
sun used in SunOS (Solaris)
supported as read-write
sunx86 used in SunOS for Intel (Solarisx86)
supported as read-write
nextsptep
used in NextStep
supported as read-only
openstep
used in OpenStep
supported as read-only
POSSIBLE PROBLEMS
=================
There is still bug in reallocation of fragment, in file fs/ufs/balloc.c,
line 364. But it seem working on current buffer cache configuration.
BUG REPORTS
===========
Any ufs bug report you can send to daniel.pirkl@email.cz (do not send
partition tables bug reports).
Documentation for /proc/sys/ kernel version 2.1.128
(c) 1998, Rik van Riel <H.H.vanRiel@phys.uu.nl>
Documentation for /proc/sys/ kernel version 2.2.5
(c) 1998, 1999, Rik van Riel <riel@nl.linux.org>
'Why', I hear you ask, 'would anyone even _want_ documentation
for them sysctl files? If anybody really needs it, it's all in
......@@ -12,9 +12,6 @@ have the time or knowledge to read the source code.
Furthermore, the programmers who built sysctl have built it to
be actually used, not just for the fun of programming it :-)
If you prefer HTML, feel free to visit the Linux-MM homepage
<http://humbolt.geo.uu.nl/Linux-MM/>...
==============================================================
Legal blurb:
......@@ -34,7 +31,7 @@ it. Not only to have a great laugh, but also to make sure that
you're the last RTFMing person to screw up.
In short, e-mail your suggestions, corrections and / or horror
stories to: <H.H.vanRiel@phys.uu.nl>
stories to: <riel@nl.linux.org>
Rik van Riel.
......@@ -68,6 +65,7 @@ kernel/ global kernel info / tuning
net/ networking stuff, for documentation look in:
<linux/Documentation/networking/>
proc/ <empty>
sunrpc/ SUN Remote Procedure Call (NFS)
vm/ memory management tuning
buffer and cache management
......
Documentation for /proc/sys/fs/* kernel version 2.1.128
(c) 1998, Rik van Riel <H.H.vanRiel@phys.uu.nl>
Documentation for /proc/sys/fs/* kernel version 2.2.5
(c) 1998, 1999, Rik van Riel <riel@nl.linux.org>
For general info and legal blurb, please look in README.
==============================================================
This file contains documentation for the sysctl files in
/proc/sys/fs/ and is valid for Linux kernel version 2.1.
/proc/sys/fs/ and is valid for Linux kernel version 2.2.
The files in this directory can be used to tune and monitor
miscellaneous and general things in the operation of the Linux
......@@ -23,6 +23,8 @@ Currently, these files are in /proc/sys/fs:
- inode-max
- inode-nr
- inode-state
- super-max
- super-nr
Documentation for the files in /proc/sys/fs/binfmt_misc is
in Documentation/binfmt_misc.txt.
......@@ -113,4 +115,12 @@ preshrink is nonzero when the nr_inodes > inode-max and the
system needs to prune the inode list instead of allocating
more.
==============================================================
super-max & super-nr:
These numbers control the maximum number of superblocks, and
thus the maximum number of mounted filesystems the kernel
can have. You only need to increase super-max if you need to
mount more filesystems than the current value in super-max
allows you to.
Documentation for /proc/sys/kernel/* kernel version 2.1.128
(c) 1998, Rik van Riel <H.H.vanRiel@phys.uu.nl>
Documentation for /proc/sys/kernel/* kernel version 2.2.5
(c) 1998, 1999, Rik van Riel <riel@nl.linux.org>
For general info and legal blurb, please look in README.
==============================================================
This file contains documentation for the sysctl files in
/proc/sys/kernel/ and is valid for Linux kernel version 2.1.
/proc/sys/kernel/ and is valid for Linux kernel version 2.2.
The files in this directory can be used to tune and monitor
miscellaneous and general things in the operation of the Linux
......@@ -24,6 +24,7 @@ show up in /proc/sys/kernel:
- htab-reclaim [ PPC only ]
- java-appletviewer [ binfmt_java, obsolete ]
- java-interpreter [ binfmt_java, obsolete ]
- l2cr [ PPC only ]
- modprobe ==> Documentation/kmod.txt
- osrelease
- ostype
......@@ -32,6 +33,8 @@ show up in /proc/sys/kernel:
- printk
- real-root-dev ==> Documentation/initrd.txt
- reboot-cmd [ SPARC only ]
- rtsig-nr
- rtsig-max
- sg-big-buff [ generic SCSI device (sg) ]
- shmmax [ sysv ipc ]
- version
......@@ -90,6 +93,13 @@ each time the system hits the idle loop.
==============================================================
l2cr: (PPC only)
This flag controls the L2 cache of G3 processor boards. If
0, the cache is disabled. Enabled if nonzero.
==============================================================
osrelease, ostype & version:
# cat osrelease
......@@ -155,6 +165,16 @@ rebooting. ???
==============================================================
rtsig-max & rtsig-nr:
The file rtsig-max can be used to tune the maximum number
of POSIX realtime (queued) signals that can be outstanding
in the system.
Rtsig-nr shows the number of RT signals currently queued.
==============================================================
sg-big-buff:
This file shows the size of the generic SCSI (sg) buffer.
......
Documentation for /proc/sys/sunrpc/* kernel version 2.2.5
(c) 1998, 1999, Rik van Riel <riel@nl.linux.org>
For general info and legal blurb, please look in README.
==============================================================
This file contains the documentation for the sysctl files in
/proc/sys/sunrpc and is valid for Linux kernel version 2.2.
The files in this directory can be used to (re)set the debug
flags of the SUN Remote Procedure Call (RPC) subsystem in
the Linux kernel. This stuff is used for NFS, KNFSD and
maybe a few other things as well.
The files in there are used to control the debugging flags:
rpc_debug, nfs_debug, nfsd_debug and nlm_debug.
These flags are for kernel hackers only. You should read the
source code in net/sunrpc/ for more information.
Documentation for /proc/sys/vm/* kernel version 2.1.128
(c) 1998, Rik van Riel <H.H.vanRiel@phys.uu.nl>
Documentation for /proc/sys/vm/* kernel version 2.2.5
(c) 1998, 1999, Rik van Riel <riel@nl.linux.org>
For general info and legal blurb, please look in README.
==============================================================
This file contains the documentation for the sysctl files in
/proc/sys/vm and is valid for Linux kernel version 2.1.
/proc/sys/vm and is valid for Linux kernel version 2.2.
The files in this directory can be used to tune the operation
of the virtual memory (VM) subsystem of the Linux kernel, and
one of the files (bdflush) also has a little influence on disk
usage.
Default values and initialization routines for most of these
files can be found in mm/swap.c.
Currently, these files are in /proc/sys/vm:
- bdflush
- buffermem
- freepages
- kswapd
- overcommit_memory
- page-cluster
- pagecache
- pagetable_cache
- swapctl
==============================================================
......@@ -100,12 +103,8 @@ as a percentage of total system memory.
The values are:
min_percent -- this is the minimum percentage of memory
that should be spent on buffer memory
borrow_percent -- when Linux is short on memory, and the
buffer cache uses more memory than this,
the MM subsystem will prune the buffercache
more heavily than other memory
max_percent -- this is the maximum amount of memory that
can be used for buffer memory
borrow_percent -- UNUSED
max_percent -- UNUSED
==============================================================
freepages:
......@@ -162,40 +161,28 @@ swap_cluster This is the number of pages kswapd writes in
overcommit_memory:
This file contains only one value. The following algorithm
is used to decide if there's enough memory. If the value
of overcommit_memory > 0, then there's always enough
memory :-). This is a useful feature, since programs often
malloc() huge amounts of memory 'just in case', while they
only use a small part of it. Leaving this value at 0 will
lead to the failure of such a huge malloc(), when in fact
the system has enough memory for the program to run...
On the other hand, enabling this feature can cause you to
run out of memory and thrash the system to death, so large
and/or important servers will want to set this value to 0.
From linux/mm/mmap.c:
--------------------------------------------------------------
static inline int vm_enough_memory(long pages)
{
/* This stupid algorithm decides whether we have enough memory:
* while simple, it should work in most obvious cases. It's
* easily fooled, but this should catch most mistakes.
*/
long freepages;
/* Sometimes we want to use more memory than we have. */
if (sysctl_overcommit_memory)
return 1;
freepages = buffermem >> PAGE_SHIFT;
freepages += page_cache_size;
freepages >>= 1;
freepages += nr_free_pages;
freepages += nr_swap_pages;
freepages -= num_physpages >> 4;
return freepages > pages;
}
This value contains a flag that enables memory overcommitment.
When this flag is 0, the kernel checks before each malloc()
to see if there's enough memory left. If the flag is nonzero,
the system pretends there's always enough memory.
This feature can be very useful because there are a lot of
programs that malloc() huge amounts of memory "just-in-case"
and don't much of it.
Look at: mm/mmap.c::vm_enough_memory() for more information.
==============================================================
page-cluster:
The Linux VM subsystem avoids excessive disk seeks by reading
multiple pages on a page fault. The number of pages it reads
is dependant on the amount of memory in your machine.
The number of pages the kernel reads in at once is equal to
2 ^ page-cluster. Values above 2 ^ 5 don't make much sense
for swap because we only cluster swap data in 32-page groups.
==============================================================
......@@ -203,12 +190,17 @@ pagecache:
This file does exactly the same as buffermem, only this
file controls the struct page_cache, and thus controls
the amount of memory allowed for memory mapping and generic
caching of files.
the amount of memory used for the page cache.
In 2.2, the page cache is used for 3 main purposes:
- caching read() data from files
- caching mmap()ed data and executable files
- swap cache
You don't want the minimum level to be too low, otherwise
your system might thrash when memory is tight or fragmentation
is high...
When your system is both deep in swap and high on cache,
it probably means that a lot of the swaped data is being
cached, making for more efficient swapping than possible
with the 2.0 kernel.
==============================================================
......@@ -227,62 +219,3 @@ For large systems, the settings are probably OK. For normal
systems they won't hurt a bit. For small systems (<16MB ram)
it might be advantageous to set both values to 0.
==============================================================
swapctl:
This file contains no less than 8 variables.
All of these values are used by kswapd, and the usage can be
found in linux/mm/vmscan.c.
From linux/include/linux/swapctl.h:
--------------------------------------------------------------
typedef struct swap_control_v5
{
unsigned int sc_max_page_age;
unsigned int sc_page_advance;
unsigned int sc_page_decline;
unsigned int sc_page_initial_age;
unsigned int sc_age_cluster_fract;
unsigned int sc_age_cluster_min;
unsigned int sc_pageout_weight;
unsigned int sc_bufferout_weight;
} swap_control_v5;
--------------------------------------------------------------
The first four variables are used to keep track of Linux's
page aging. Page aging is a bookkeeping method to keep track
of which pages of memory are used often, and which pages can
be swapped out without consequences.
When a page is swapped in, it starts at sc_page_initial_age
(default 3) and when the page is scanned by kswapd, its age
is adjusted according to the following scheme:
- if the page was used since the last time we scanned, its
age is increased by sc_page_advance (default 3) up to a maximum
of sc_max_page_age (default 20)
- else (it wasn't used) its age is decreased by sc_page_decline
(default 1)
And when a page reaches age 0, it's ready to be swapped out.
The next four variables can be used to control kswapd's
aggressiveness in swapping out pages.
sc_age_cluster_fract is used to calculate how many pages from
a process are to be scanned by kswapd. The formula used is
sc_age_cluster_fract/1024 * RSS, so if you want kswapd to scan
the whole process, sc_age_cluster_fract needs to have a value
of 1024. The minimum number of pages kswapd will scan is
represented by sc_age_cluster_min, this is done so kswapd will
also scan small processes.
The values of sc_pageout_weight and sc_bufferout_weight are
used to control how many tries kswapd will make in order
to swapout one page / buffer. These values can be used to
fine-tune the ratio between user pages and buffer/cache memory.
When you find that your Linux system is swapping out too many
process pages in order to satisfy buffer memory demands, you
might want to either increase sc_bufferout_weight, or decrease
the value of sc_pageout_weight.
VERSION = 2
PATCHLEVEL = 2
SUBLEVEL = 5
SUBLEVEL = 6
EXTRAVERSION =
ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
......
......@@ -174,12 +174,14 @@ CONFIG_SCSI_CONSTANTS=y
# CONFIG_SCSI_NCR53C406A is not set
# CONFIG_SCSI_SYM53C416 is not set
# CONFIG_SCSI_NCR53C7xx is not set
CONFIG_SCSI_NCR53C8XX=y
# CONFIG_SCSI_NCR53C8XX is not set
CONFIG_SCSI_SYM53C8XX=y
CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS=4
CONFIG_SCSI_NCR53C8XX_MAX_TAGS=32
CONFIG_SCSI_NCR53C8XX_SYNC=20
# CONFIG_SCSI_NCR53C8XX_PROFILE is not set
# CONFIG_SCSI_NCR53C8XX_IOMAPPED is not set
# CONFIG_SCSI_NCR53C8XX_PQS_PDS is not set
# CONFIG_SCSI_PAS16 is not set
# CONFIG_SCSI_PCI2000 is not set
# CONFIG_SCSI_PCI2220I is not set
......
......@@ -293,7 +293,8 @@ static int __init find_timer_pin(int type)
for (i = 0; i < mp_irq_entries; i++) {
int lbus = mp_irqs[i].mpc_srcbus;
if ((mp_bus_id_to_type[lbus] == MP_BUS_ISA) &&
if ((mp_bus_id_to_type[lbus] == MP_BUS_ISA ||
mp_bus_id_to_type[lbus] == MP_BUS_EISA) &&
(mp_irqs[i].mpc_irqtype == type) &&
(mp_irqs[i].mpc_srcbusirq == 0x00))
......@@ -326,20 +327,7 @@ int IO_APIC_get_PCI_irq_vector(int bus, int slot, int pci_pin)
}
/*
* Unclear documentation on what a "conforming ISA interrupt" means.
*
* Should we, or should we not, take the ELCR register into account?
* It's part of the EISA specification, but maybe it should only be
* used if the interrupt is actually marked as EISA?
*
* Oh, well. Don't do it until somebody tells us what the right thing
* to do is..
*/
#undef USE_ELCR_TRIGGER_LEVEL
#ifdef USE_ELCR_TRIGGER_LEVEL
/*
* ISA Edge/Level control register, ELCR
* EISA Edge/Level control register, ELCR
*/
static int __init EISA_ELCR(unsigned int irq)
{
......@@ -349,18 +337,22 @@ static int __init EISA_ELCR(unsigned int irq)
}
printk("Broken MPtable reports ISA irq %d\n", irq);
return 0;
}
}
#define default_ISA_trigger(idx) (EISA_ELCR(mp_irqs[idx].mpc_dstirq))
#define default_ISA_polarity(idx) (0)
/* EISA interrupts are always polarity zero and can be edge or level
* trigger depending on the ELCR value. If an interrupt is listed as
* EISA conforming in the MP table, that means its trigger type must
* be read in from the ELCR */
#else
#define default_EISA_trigger(idx) (EISA_ELCR(mp_irqs[idx].mpc_dstirq))
#define default_EISA_polarity(idx) (0)
/* ISA interrupts are always polarity zero edge triggered, even when
* listed as conforming in the MP table. */
#define default_ISA_trigger(idx) (0)
#define default_ISA_polarity(idx) (0)
#endif
static int __init MPBIOS_polarity(int idx)
{
int bus = mp_irqs[idx].mpc_srcbus;
......@@ -380,6 +372,11 @@ static int __init MPBIOS_polarity(int idx)
polarity = default_ISA_polarity(idx);
break;
}
case MP_BUS_EISA:
{
polarity = default_EISA_polarity(idx);
break;
}
case MP_BUS_PCI: /* PCI pin */
{
polarity = 1;
......@@ -439,6 +436,11 @@ static int __init MPBIOS_trigger(int idx)
trigger = default_ISA_trigger(idx);
break;
}
case MP_BUS_EISA:
{
trigger = default_EISA_trigger(idx);
break;
}
case MP_BUS_PCI: /* PCI pin, level */
{
trigger = 1;
......@@ -503,6 +505,7 @@ static int __init pin_2_irq(int idx, int pin)
switch (mp_bus_id_to_type[bus])
{
case MP_BUS_ISA: /* ISA pin */
case MP_BUS_EISA:
{
irq = mp_irqs[idx].mpc_srcbusirq;
break;
......@@ -910,6 +913,8 @@ static void __init setup_ioapic_id(void)
static void __init construct_default_ISA_mptable(void)
{
int i, pos = 0;
const int bus_type = (mpc_default_type == 2 || mpc_default_type == 3 ||
mpc_default_type == 6) ? MP_BUS_EISA : MP_BUS_ISA;
for (i = 0; i < 16; i++) {
if (!IO_APIC_IRQ(i))
......@@ -917,14 +922,14 @@ static void __init construct_default_ISA_mptable(void)
mp_irqs[pos].mpc_irqtype = mp_INT;
mp_irqs[pos].mpc_irqflag = 0; /* default */
mp_irqs[pos].mpc_srcbus = MP_BUS_ISA;
mp_irqs[pos].mpc_srcbus = bus_type;
mp_irqs[pos].mpc_srcbusirq = i;
mp_irqs[pos].mpc_dstapic = 0;
mp_irqs[pos].mpc_dstirq = i;
pos++;
}
mp_irq_entries = pos;
mp_bus_id_to_type[0] = MP_BUS_ISA;
mp_bus_id_to_type[0] = bus_type;
/*
* MP specification 1.4 defines some extra rules for default
......
......@@ -115,6 +115,7 @@ extern char _stext, _etext;
#define MAX_MP_BUSSES 32
enum mp_bustype {
MP_BUS_ISA,
MP_BUS_EISA,
MP_BUS_PCI
};
extern int mp_bus_id_to_type [MAX_MP_BUSSES];
......
......@@ -345,11 +345,13 @@ static int __init smp_read_mpc(struct mp_config_table *mpc)
SMP_PRINTK(("Bus #%d is %s\n",
m->mpc_busid,
str));
if ((strncmp(m->mpc_bustype,"ISA",3) == 0) ||
(strncmp(m->mpc_bustype,"EISA",4) == 0))
if (strncmp(m->mpc_bustype,"ISA",3) == 0)
mp_bus_id_to_type[m->mpc_busid] =
MP_BUS_ISA;
else
if (strncmp(m->mpc_bustype,"EISA",4) == 0)
mp_bus_id_to_type[m->mpc_busid] =
MP_BUS_EISA;
if (strncmp(m->mpc_bustype,"PCI",3) == 0) {
mp_bus_id_to_type[m->mpc_busid] =
MP_BUS_PCI;
......
#define BLOCKMOVE
#define Z_WAKE
static char rcsid[] =
"$Revision: 2.2.1.10 $$Date: 1999/01/20 16:14:29 $";
"$Revision: 2.2.2.1 $$Date: 1999/04/08 16:17:43 $";
/*
* linux/drivers/char/cyclades.c
......@@ -31,6 +31,13 @@ static char rcsid[] =
* void cleanup_module(void);
*
* $Log: cyclades.c,v $
* Revision 2.2.2.1 1999/04/08 16:17:43 ivan
* Fixed a bug in cy_wait_until_sent that was preventing the port to be
* closed properly after a SIGINT;
* Module usage counter scheme revisited;
* Added support to the upcoming Y PCI boards (i.e., support to additional
* PCI Device ID's).
*
* Revision 2.2.1.10 1999/01/20 16:14:29 ivan
* Removed all unnecessary page-alignement operations in ioremap calls
* (ioremap is currently safe for these operations).
......@@ -525,9 +532,11 @@ static char rcsid[] =
#undef CY_DEBUG_COUNT
#undef CY_DEBUG_DTR
#undef CY_DEBUG_WAIT_UNTIL_SENT
#undef CY_DEBUG_INTERRUPTS
#undef CY_16Y_HACK
#undef CY_ENABLE_MONITORING
#undef CY_PCI_DEBUG
#define CY_PROC
#if 0
#define PAUSE __asm__("nop");
......@@ -763,16 +772,20 @@ static int cy_chip_offset [] =
/* PCI related definitions */
static unsigned short cy_pci_nboard = 0;
static unsigned short cy_isa_nboard = 0;
static unsigned short cy_nboard = 0;
static unsigned short cy_pci_dev_id[] = {
PCI_DEVICE_ID_CYCLOM_Y_Lo,/* PCI below 1Mb */
PCI_DEVICE_ID_CYCLOM_Y_Hi,/* PCI above 1Mb */
PCI_DEVICE_ID_CYCLOM_Z_Lo,/* PCI below 1Mb */
PCI_DEVICE_ID_CYCLOM_Z_Hi,/* PCI above 1Mb */
0 /* end of table */
};
static unsigned short cy_pci_nboard = 0;
static unsigned short cy_isa_nboard = 0;
static unsigned short cy_nboard = 0;
static unsigned short cy_pci_dev_id[] = {
PCI_DEVICE_ID_CYCLOM_Y_Lo, /* PCI < 1Mb */
PCI_DEVICE_ID_CYCLOM_Y_Hi, /* PCI > 1Mb */
PCI_DEVICE_ID_CYCLOM_4Y_Lo, /* 4Y PCI < 1Mb */
PCI_DEVICE_ID_CYCLOM_4Y_Hi, /* 4Y PCI > 1Mb */
PCI_DEVICE_ID_CYCLOM_8Y_Lo, /* 8Y PCI < 1Mb */
PCI_DEVICE_ID_CYCLOM_8Y_Hi, /* 8Y PCI > 1Mb */
PCI_DEVICE_ID_CYCLOM_Z_Lo, /* Z PCI < 1Mb */
PCI_DEVICE_ID_CYCLOM_Z_Hi, /* Z PCI > 1Mb */
0 /* end of table */
};
static void cy_start(struct tty_struct *);
......@@ -2448,12 +2461,15 @@ cy_open(struct tty_struct *tty, struct file * filp)
int retval, line;
unsigned long page;
MOD_INC_USE_COUNT;
line = MINOR(tty->device) - tty->driver.minor_start;
if ((line < 0) || (NR_PORTS <= line)){
MOD_DEC_USE_COUNT;
return -ENODEV;
}
info = &cy_port[line];
if (info->line < 0){
MOD_DEC_USE_COUNT;
return -ENODEV;
}
......@@ -2479,6 +2495,8 @@ cy_open(struct tty_struct *tty, struct file * filp)
#ifdef CY_DEBUG_OTHER
printk("cyc:cy_open ttyC%d\n", info->line); /* */
#endif
tty->driver_data = info;
info->tty = tty;
if (serial_paranoia_check(info, tty->device, "cy_open")){
return -ENODEV;
}
......@@ -2491,9 +2509,6 @@ cy_open(struct tty_struct *tty, struct file * filp)
printk("cyc:cy_open (%d): incrementing count to %d\n",
current->pid, info->count);
#endif
tty->driver_data = info;
info->tty = tty;
if (!tmp_buf) {
page = get_free_page(GFP_KERNEL);
if (!page)
......@@ -2521,8 +2536,6 @@ cy_open(struct tty_struct *tty, struct file * filp)
return retval;
}
MOD_INC_USE_COUNT;
retval = block_til_ready(tty, filp, info);
if (retval) {
#ifdef CY_DEBUG_OPEN
......@@ -2563,6 +2576,10 @@ static void cy_wait_until_sent(struct tty_struct *tty, int timeout)
if (serial_paranoia_check(info, tty->device, "cy_wait_until_sent"))
return;
if (info->xmit_fifo_size == 0)
return; /* Just in case.... */
orig_jiffies = jiffies;
/*
* Set the check interval to be 1/5 of the estimated time to
......@@ -2580,6 +2597,17 @@ static void cy_wait_until_sent(struct tty_struct *tty, int timeout)
timeout = 0;
if (timeout)
char_time = MIN(char_time, timeout);
/*
* If the transmitter hasn't cleared in twice the approximate
* amount of time to send the entire FIFO, it probably won't
* ever clear. This assumes the UART isn't doing flow
* control, which is currently the case. Hence, if it ever
* takes longer than info->timeout, this is probably due to a
* UART bug of some kind. So, we clamp the timeout parameter at
* 2*info->timeout.
*/
if (!timeout || timeout > 2*info->timeout)
timeout = 2*info->timeout;
#ifdef CY_DEBUG_WAIT_UNTIL_SENT
printk("In cy_wait_until_sent(%d) check=%lu...", timeout, char_time);
printk("jiff=%lu...", jiffies);
......@@ -2601,7 +2629,7 @@ static void cy_wait_until_sent(struct tty_struct *tty, int timeout)
schedule_timeout(char_time);
if (signal_pending(current))
break;
if (timeout && time_before(orig_jiffies + timeout, jiffies))
if (timeout && time_after(jiffies, orig_jiffies + timeout))
break;
}
current->state = TASK_RUNNING;
......@@ -2631,13 +2659,9 @@ cy_close(struct tty_struct * tty, struct file * filp)
printk("cyc:cy_close ttyC%d\n", info->line);
#endif
if (!info
|| serial_paranoia_check(info, tty->device, "cy_close")){
if (!info || serial_paranoia_check(info, tty->device, "cy_close")){
return;
}
#ifdef CY_DEBUG_OPEN
printk("cyc:cy_close ttyC%d, count = %d\n", info->line, info->count);
#endif
save_flags(flags); cli();
......@@ -2648,6 +2672,9 @@ cy_close(struct tty_struct * tty, struct file * filp)
return;
}
#ifdef CY_DEBUG_OPEN
printk("cyc:cy_close ttyC%d, count = %d\n", info->line, info->count);
#endif
if ((tty->count == 1) && (info->count != 1)) {
/*
* Uh, oh. tty->count is 1, which means that the tty
......@@ -4579,6 +4606,8 @@ cy_detect_pci(void))
cy_pci_addr2 = pdev->base_address[2];
pci_read_config_byte(pdev, PCI_REVISION_ID, &cyy_rev_id);
device_id &= ~PCI_DEVICE_ID_MASK;
if ((device_id == PCI_DEVICE_ID_CYCLOM_Y_Lo)
|| (device_id == PCI_DEVICE_ID_CYCLOM_Y_Hi)){
#ifdef CY_PCI_DEBUG
......@@ -4942,6 +4971,7 @@ show_version(void)
__DATE__, __TIME__);
} /* show_version */
#ifdef CY_PROC
static int
cyclades_get_proc_info(char *buf, char **start, off_t offset, int length,
int *eof, void *data)
......@@ -4998,7 +5028,7 @@ cyclades_get_proc_info(char *buf, char **start, off_t offset, int length,
len = 0;
return len;
}
#endif
/* The serial driver boot-time initialization code!
Hardware I/O ports are mapped to character special devices on a
......@@ -5028,7 +5058,9 @@ cy_init(void))
unsigned long mailbox;
unsigned short chip_number;
int nports;
#ifdef CY_PROC
struct proc_dir_entry *ent;
#endif
show_version();
......@@ -5269,8 +5301,10 @@ cy_init(void))
#endif
}
#ifdef CY_PROC
ent = create_proc_entry("cyclades", S_IFREG | S_IRUGO, 0);
ent->read_proc = cyclades_get_proc_info;
#endif
return 0;
......@@ -5314,7 +5348,7 @@ cleanup_module(void)
free_irq(cy_card[i].irq,NULL);
}
}
#ifdef CONFIG_PROC_FS
#ifdef CY_PROC
remove_proc_entry("cyclades", 0);
#endif
......
......@@ -138,8 +138,11 @@ static ssize_t write_mem(struct file * file, const char * buf,
static inline unsigned long pgprot_noncached(unsigned long prot)
{
#if defined(__i386__)
/* On PPro and successors, PCD alone doesn't always mean
uncached because of interactions with the MTRRs. PCD | PWT
means definitely uncached. */
if (boot_cpu_data.x86 > 3)
prot |= _PAGE_PCD;
prot |= _PAGE_PCD | _PAGE_PWT;
#elif defined(__powerpc__)
prot |= _PAGE_NO_CACHE | _PAGE_GUARDED;
#elif defined(__mc68000__)
......@@ -155,6 +158,28 @@ static inline unsigned long pgprot_noncached(unsigned long prot)
return prot;
}
/*
* Architectures vary in how they handle caching for addresses
* outside of main memory.
*/
static inline int noncached_address(unsigned long addr)
{
#if defined(__i386__)
/*
* On the PPro and successors, the MTRRs are used to set
* memory types for physical addresses outside main memory,
* so blindly setting PCD or PWT on those pages is wrong.
* For Pentiums and earlier, the surround logic should disable
* caching for the high addresses through the KEN pin, but
* we maintain the tradition of paranoia in this code.
*/
return !(boot_cpu_data.x86_capability & X86_FEATURE_MTRR)
&& addr >= __pa(high_memory);
#else
return addr >= __pa(high_memory);
#endif
}
static int mmap_mem(struct file * file, struct vm_area_struct * vma)
{
unsigned long offset = vma->vm_offset;
......@@ -166,15 +191,17 @@ static int mmap_mem(struct file * file, struct vm_area_struct * vma)
* Accessing memory above the top the kernel knows about or
* through a file pointer that was marked O_SYNC will be
* done non-cached.
*
* Set VM_IO, as this is likely a non-cached access to an
* I/O area, and we don't want to include that in a core
* file.
*/
if (offset >= __pa(high_memory) || (file->f_flags & O_SYNC)) {
pgprot_val(vma->vm_page_prot) = pgprot_noncached(pgprot_val(vma->vm_page_prot));
if (noncached_address(offset) || (file->f_flags & O_SYNC))
pgprot_val(vma->vm_page_prot)
= pgprot_noncached(pgprot_val(vma->vm_page_prot));
/*
* Don't dump addresses that are not real memory to a core file.
*/
if (offset >= __pa(high_memory) || (file->f_flags & O_SYNC))
vma->vm_flags |= VM_IO;
}
if (remap_page_range(vma->vm_start, offset, vma->vm_end-vma->vm_start,
vma->vm_page_prot))
return -EAGAIN;
......
......@@ -433,8 +433,12 @@ struct pci_dev_info dev_info[] = {
DEVICE( RP, RP8M, "RocketModem 8 J"),
DEVICE( CYCLADES, CYCLOM_Y_Lo, "Cyclom-Y below 1Mbyte"),
DEVICE( CYCLADES, CYCLOM_Y_Hi, "Cyclom-Y above 1Mbyte"),
DEVICE( CYCLADES, CYCLOM_Z_Lo, "Cyclom-Z below 1Mbyte"),
DEVICE( CYCLADES, CYCLOM_Z_Hi, "Cyclom-Z above 1Mbyte"),
DEVICE( CYCLADES, CYCLOM_4Y_Lo, "Cyclom-4Y below 1Mbyte"),
DEVICE( CYCLADES, CYCLOM_4Y_Hi, "Cyclom-4Y above 1Mbyte"),
DEVICE( CYCLADES, CYCLOM_8Y_Lo, "Cyclom-8Y below 1Mbyte"),
DEVICE( CYCLADES, CYCLOM_8Y_Hi, "Cyclom-8Y above 1Mbyte"),
DEVICE( CYCLADES, CYCLOM_Z_Lo, "Cyclades-Z below 1Mbyte"),
DEVICE( CYCLADES, CYCLOM_Z_Hi, "Cyclades-Z above 1Mbyte"),
DEVICE( ESSENTIAL, ESSENTIAL_ROADRUNNER,"Roadrunner serial HIPPI"),
DEVICE( O2, O2_6832, "6832"),
DEVICE( 3DFX, 3DFX_VOODOO, "Voodoo"),
......
Thu Mar 11 23:00 1999 Gerard Roudier (groudier@club-internet.fr)
* revision 3.2 (8xx-896 driver bundle)
- Only define the host template in ncr53c8xx.h and include the
sym53c8xx_defs.h file.
- Declare static all symbols that donnot need to be visible from
outside the driver code.
- Add 'excl' boot command option that allows to pass to the driver
io address of devices not to attach.
- Add info() function called from the host template to print
driver/host information.
- Minor documentation additions.
Sat Mar 6 11:00 1999 Gerard Roudier (groudier@club-internet.fr)
* revision 3.1h
- Fix some oooold bug that hangs the bus if a device rejects a
......
This diff is collapsed.
......@@ -88,12 +88,16 @@ if [ "$CONFIG_PCI" = "y" ]; then
fi
if [ "$CONFIG_PCI" = "y" -a "$CONFIG_SCSI_NCR53C7xx" != "y" ]; then
dep_tristate 'NCR53C8XX SCSI support' CONFIG_SCSI_NCR53C8XX $CONFIG_SCSI
if [ "$CONFIG_SCSI_NCR53C8XX" != "n" ]; then
dep_tristate 'SYM53C8XX SCSI support' CONFIG_SCSI_SYM53C8XX $CONFIG_SCSI
if [ "$CONFIG_SCSI_NCR53C8XX" != "n" -o "$CONFIG_SCSI_SYM53C8XX" != "n" ]; then
int ' default tagged command queue depth' CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS 8
int ' maximum number of queued commands' CONFIG_SCSI_NCR53C8XX_MAX_TAGS 32
int ' synchronous transfers frequency in MHz' CONFIG_SCSI_NCR53C8XX_SYNC 20
bool ' enable profiling' CONFIG_SCSI_NCR53C8XX_PROFILE
bool ' use normal IO' CONFIG_SCSI_NCR53C8XX_IOMAPPED
if [ "$CONFIG_SCSI_SYM53C8XX" != "n" ]; then
bool ' include support for the NCR PQS/PDS SCSI card' CONFIG_SCSI_NCR53C8XX_PQS_PDS
fi
if [ "$CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS" = "0" ]; then
bool ' not allow targets to disconnect' CONFIG_SCSI_NCR53C8XX_NO_DISCONNECT
fi
......
......@@ -482,6 +482,14 @@ else
endif
endif
ifeq ($(CONFIG_SCSI_SYM53C8XX),y)
L_OBJS += sym53c8xx.o
else
ifeq ($(CONFIG_SCSI_SYM53C8XX),m)
M_OBJS += sym53c8xx.o
endif
endif
ifeq ($(CONFIG_SCSI_PAS16),y)
L_OBJS += pas16.o
else
......
......@@ -4,12 +4,14 @@ Written by Gerard Roudier <groudier@club-internet.fr>
21 Rue Carnot
95170 DEUIL LA BARRE - FRANCE
14 February 1999
10 March 1999
===============================================================================
1. Introduction
2. Supported chips and SCSI features
3. Summary of other supported features
3. Advantages of the enhanced 896 driver
3.1 Optimized SCSI SCRIPTS
3.2 New features of the SYM53C896 (64 bit PCI dual LVD SCSI controller)
4. Memory mapped I/O versus normal I/O
5. Tagged command queueing
6. Parity checking
......@@ -56,21 +58,30 @@ Written by Gerard Roudier <groudier@club-internet.fr>
1. Introduction
This driver has been ported from FreeBSD to Linux and is currently
maintained by:
The initial Linux ncr53c8xx driver has been a port of the ncr driver from
FreeBSD that has been achieved in November 1995 by:
Gerard Roudier <groudier@club-internet.fr>
The original driver has been written for 386bsd and FreeBSD by:
Wolfgang Stanglmeier <wolf@cologne.de>
Stefan Esser <se@mi.Uni-Koeln.de>
It is now available as a bundle of 2 drivers:
- ncr53c8xx generic driver that supports all the SYM53C8XX family including
the ealiest 810 rev. 1 and the latest 896 2 channels LVD SCSI controller.
- sym53c8xx enhanced driver (a.k.a. 896 drivers) that drops support of oldest
chips in order to gain advantage of new features, as LOAD/STORE intructions
available since the 810A and hardware phase mismatch available with the
latest 896.
You can find technical information about the NCR 8xx family in the
PCI-HOWTO written by Michael Will and in the SCSI-HOWTO written by
Drew Eckhardt.
Information about new chips is available at SYMBIOS web server:
Information about new chips is available at LSILOGIC web server:
http://www.symbios.com/
http://www.lsilogic.com/
SCSI standard documentations are available at SYMBIOS ftp server:
......@@ -109,34 +120,65 @@ The following features are supported for all chips:
Master parity checking
"Wide negotiation" is supported for chips that allow it. The
following table shows some characteristics of NCR 8xx family chips:
On board Supported by
Chip SDMS BIOS Wide SCSI std. Max. sync the driver
---- --------- ---- --------- ---------- ------------
810 N N FAST10 10 MB/s Y
810A N N FAST10 10 MB/s Y
815 Y N FAST10 10 MB/s Y
825 Y Y FAST10 20 MB/s Y
825A Y Y FAST10 20 MB/s Y
860 N N FAST20 20 MB/s Y
875 Y Y FAST20 40 MB/s Y
876 Y Y FAST20 40 MB/s Y
895 Y Y FAST40 80 MB/s Y
3. Summary of other supported features.
Module: allow to load the driver
Memory mapped I/O: increases performance
Profiling information: read operations from the proc SCSI file system
Control commands: write operations to the proc SCSI file system
Debugging information: written to syslog (expert only)
Scatter / gather
Shared interrupt
Boot setup commands
Serial NVRAM: Symbios and Tekram formats
following table shows some characteristics of NCR 8xx family chips
and what drivers support them.
Supported by Supported by
On board the generic the enhanced
Chip SDMS BIOS Wide SCSI std. Max. sync driver driver
---- --------- ---- --------- ---------- ------------ -------------
810 N N FAST10 10 MB/s Y N
810A N N FAST10 10 MB/s Y Y
815 Y N FAST10 10 MB/s Y N
825 Y Y FAST10 20 MB/s Y N
825A Y Y FAST10 20 MB/s Y Y
860 N N FAST20 20 MB/s Y Y
875 Y Y FAST20 40 MB/s Y Y
876 Y Y FAST20 40 MB/s Y Y
895 Y Y FAST40 80 MB/s Y Y
896 Y Y FAST40 80 MB/s Y Y
Summary of other supported features:
Module: allow to load the driver
Memory mapped I/O: increases performance
Profiling information: read operations from the proc SCSI file system
Control commands: write operations to the proc SCSI file system
Debugging information: written to syslog (expert only)
Scatter / gather
Shared interrupt
Boot setup commands
Serial NVRAM: Symbios and Tekram formats
3. Advantages of the enhanced 896 driver
3.1 Optimized SCSI SCRIPTS.
The 810A, 825A, 875, 895 and newest 896 support new SCSI SCRIPTS instructions
named LOAD and STORE that allow to move 1 DWORD from/to an IO register to/from
memory much faster that the MOVE MEMORY instruction that is supported by the
53c7xx and 53c8xx family. The LOAD/STORE instructions support absolute and
DSA relative addressing modes. The SCSI SCRIPTS had been entirely rewritten
using LOAD/STORE instead of MOVE MEMORY instructions.
3.2 New features of the SYM53C896 (64 bit PCI dual LVD SCSI controller)
The 896 allows to handle the phase mismatch context saving from SCRIPTS
(avoids the phase mismatch interrupt that stops the SCSI processor
until the C code has saved the context of the transfer).
Implementing this without using LOAD/STORE instructions would be painfull
and I did'nt even try it. This chip also supports 64 bit PCI transactions
and addressing. The SCRIPTS processor is not true 64 bit, but uses segment
registers for bit 32-63. Another interesting feature is that LOAD/STORE
instructions that address the on-chip RAM (8k) remain internal to the chip.
Due to the use of LOAD/STORE SCRIPTS instructions, this driver does not
support the following chips:
- SYM53C810 revision < 0x10 (16)
- SYM53C815 all revisions
- SYM53C825 revision < 0x10 (16)
4. Memory mapped I/O versus normal I/O
......@@ -703,6 +745,13 @@ Check SCSI BUS
0x1: Check and donnot attach the controller on error.
0x2: Check and just warn on error.
Exclude hosts from being attached
excl=<io_address>
Prevent host at a given io address from being attached.
For example 'ncr53c8xx=excl:0xb400,excl:0xc000' indicate to the
ncr53c8xx driver not to attach hosts at address 0xb400 and 0xc000.
Boot fail safe
safe:y load the following assumed fail safe initial setup
......@@ -1036,15 +1085,20 @@ when the SCSI DATA IN phase is reentered after a phase mismatch.
When an IRQ is shared by devices that are handled by different drivers, it
may happen that one driver complains about the request of the IRQ having
failed. This may be due to one driver having requested the IRQ using the
SA_INTERRUPT flag but some other having requested the same IRQ without this
flag, or to one driver not having requested the IRQ with the SA_SHIRQ flag.
failed. Inder Linux-2.0, this may be due to one driver having requested the
IRQ using the SA_INTERRUPT flag but some other having requested the same IRQ
without this flag. Under both Linux-2.0 and linux-2.2, this may be caused by
one driver not having requested the IRQ with the SA_SHIRQ flag.
By default, the ncr53c8xx and sym53c8xx drivers request IRQs with both the
SA_INTERRUPT and the SA_SHIRQ flag under Linux-2.0 and with only the SA_SHIRQ
flag under Linux-2.2.
By default, the ncr53c8xx driver requests IRQs with both the SA_INTERRUPT
and the SA_SHIRQ flag, but you can disable use of SA_INTERRUPT flags from
the boot command line by using the following option:
Under Linux-2.0, you can disable use of SA_INTERRUPT flag from the boot
command line by using the following option:
ncr53c8xx=irqm:0x20
ncr53c8xx=irqm:0x20 (for the generic ncr53c8xx driver)
sym53c8xx=irqm:0x20 (for the sym53c8xx driver)
If this does not fix the problem, then you may want to check how all other
drivers are requesting the IRQ and report the problem. Note that if at least
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -2,7 +2,7 @@
#define _GDTH_PROC_H
/* gdth_proc.h
* $Id: gdth_proc.h,v 1.5 1998/12/17 15:43:53 achim Exp $
* $Id: gdth_proc.h,v 1.6 1999/03/05 14:32:36 achim Exp $
*/
static int gdth_set_info(char *buffer,int length,int vh,int hanum,int busnum);
......@@ -18,6 +18,7 @@ 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(int hanum, Scsi_Cmnd *scp, int timeout);
static void gdth_do_cmd(Scsi_Cmnd *scp,gdth_cmd_str *cmd,int timeout);
void gdth_scsi_done(Scsi_Cmnd *scp);
#endif
......
......@@ -195,6 +195,10 @@
#include "53c7,8xx.h"
#endif
#ifdef CONFIG_SCSI_SYM53C8XX
#include "sym53c8xx.h"
#endif
#ifdef CONFIG_SCSI_NCR53C8XX
#include "ncr53c8xx.h"
#endif
......@@ -502,6 +506,9 @@ static Scsi_Host_Template builtin_scsi_hosts[] =
#ifdef CONFIG_SCSI_NCR53C7xx
NCR53c7xx,
#endif
#ifdef CONFIG_SCSI_SYM53C8XX
SYM53C8XX,
#endif
#ifdef CONFIG_SCSI_NCR53C8XX
NCR53C8XX,
#endif
......
......@@ -73,7 +73,7 @@
*/
/*
** March 6 1999, version 3.1h
** March 7 1999, version 3.2
**
** Supported SCSI-II features:
** Synchronous negotiation
......@@ -98,6 +98,11 @@
** Shared IRQ (since linux-1.3.72)
*/
/*
** Name and version of the driver
*/
#define SCSI_NCR_DRIVER_NAME "ncr53c8xx - version 3.2"
#define SCSI_NCR_DEBUG_FLAGS (0)
/*==========================================================
......@@ -717,12 +722,12 @@ static Scsi_Host_Template *the_template = NULL;
** /proc directory entry and proc_info function
*/
struct proc_dir_entry proc_scsi_ncr53c8xx = {
static struct proc_dir_entry proc_scsi_ncr53c8xx = {
PROC_SCSI_NCR53C8XX, 9, "ncr53c8xx",
S_IFDIR | S_IRUGO | S_IXUGO, 2
};
#ifdef SCSI_NCR_PROC_INFO_SUPPORT
int ncr53c8xx_proc_info(char *buffer, char **start, off_t offset,
static int ncr53c8xx_proc_info(char *buffer, char **start, off_t offset,
int length, int hostno, int func);
#endif
......@@ -732,6 +737,7 @@ int ncr53c8xx_proc_info(char *buffer, char **start, off_t offset,
** This structure is initialized from linux config options.
** It can be overridden at boot-up by the boot command line.
*/
#define SCSI_NCR_MAX_EXCLUDES 8
struct ncr_driver_setup {
u_char master_parity;
u_char scsi_parity;
......@@ -753,6 +759,9 @@ struct ncr_driver_setup {
u_char diff_support;
u_char irqm;
u_char bus_check;
u_char optimize;
u_char recovery;
u_int excludes[SCSI_NCR_MAX_EXCLUDES];
char tag_ctrl[100];
};
......@@ -4672,7 +4681,11 @@ printk(KERN_INFO "ncr53c%s-%d: rev=0x%02x, base=0x%lx, io_port=0x%lx, irq=%d\n",
if (request_irq(device->slot.irq, ncr53c8xx_intr,
((driver_setup.irqm & 0x10) ? 0 : SA_SHIRQ) |
#if LINUX_VERSION_CODE < LinuxVersionCode(2,2,0)
((driver_setup.irqm & 0x20) ? 0 : SA_INTERRUPT),
#else
0,
#endif
"ncr53c8xx", np)) {
#ifdef __sparc__
printk(KERN_ERR "%s: request irq %s failure\n",
......@@ -4831,7 +4844,7 @@ static inline void ncr_flush_done_cmds(Scsi_Cmnd *lcmd)
**
**==========================================================
*/
int ncr_queue_command (ncb_p np, Scsi_Cmnd *cmd)
static int ncr_queue_command (ncb_p np, Scsi_Cmnd *cmd)
{
/* Scsi_Device *device = cmd->device; */
tcb_p tp = &np->target[cmd->target];
......@@ -5395,7 +5408,7 @@ static int ncr_reset_scsi_bus(ncb_p np, int enab_int, int settle_delay)
**
**==========================================================
*/
int ncr_reset_bus (ncb_p np, Scsi_Cmnd *cmd, int sync_reset)
static int ncr_reset_bus (ncb_p np, Scsi_Cmnd *cmd, int sync_reset)
{
/* Scsi_Device *device = cmd->device; */
ccb_p cp;
......@@ -5965,7 +5978,7 @@ void ncr_complete (ncb_p np, ccb_p cp)
** This CCB has been skipped by the NCR.
** Queue it in the correponding unit queue.
*/
void ncr_ccb_skipped(ncb_p np, ccb_p cp)
static void ncr_ccb_skipped(ncb_p np, ccb_p cp)
{
tcb_p tp = &np->target[cp->target];
lcb_p lp = tp->lp[cp->lun];
......@@ -9235,6 +9248,7 @@ void ncr53c8xx_setup(char *str, int *ints)
int val;
int base;
int c;
int xi = 0;
while (cur != NULL && (pc = strchr(cur, ':')) != NULL) {
char *pe;
......@@ -9306,6 +9320,10 @@ void ncr53c8xx_setup(char *str, int *ints)
else if (!strncmp(cur, "safe:", 5) && val)
memcpy(&driver_setup, &driver_safe_setup, sizeof(driver_setup));
else if (!strncmp(cur, "excl:", 5)) {
if (xi < SCSI_NCR_MAX_EXCLUDES)
driver_setup.excludes[xi++] = val;
}
else
printk("ncr53c8xx_setup: unexpected boot option '%.*s' ignored\n", (int)(pc-cur+1), cur);
......@@ -9683,6 +9701,14 @@ static int ncr53c8xx_pci_init(Scsi_Host_Template *tpnt,
pcibios_read_config_byte(bus, device_fn, PCI_LATENCY_TIMER,
&latency_timer);
/*
** If user excludes this chip, donnot initialize it.
*/
for (i = 0 ; i < SCSI_NCR_MAX_EXCLUDES ; i++) {
if (driver_setup.excludes[i] ==
(io_port & PCI_BASE_ADDRESS_IO_MASK))
return -1;
}
/*
* Check if the chip is supported
*/
......@@ -10168,6 +10194,14 @@ printk("ncr53c8xx_select_queue_depth: host=%d, id=%d, lun=%d, depth=%d\n",
}
}
/*
** Linux entry point for info() function
*/
const char *ncr53c8xx_info (struct Scsi_Host *host)
{
return SCSI_NCR_DRIVER_NAME;
}
/*
** Linux entry point of queuecommand() function
*/
......@@ -10792,7 +10826,7 @@ static int ncr_host_info(ncb_p np, char *ptr, off_t offset, int len)
** - func = 1 means write (parse user control command)
*/
int ncr53c8xx_proc_info(char *buffer, char **start, off_t offset,
static int ncr53c8xx_proc_info(char *buffer, char **start, off_t offset,
int length, int hostno, int func)
{
struct Scsi_Host *host;
......
This diff is collapsed.
This diff is collapsed.
/******************************************************************************
** High Performance device driver for the Symbios 53C896 controller.
**
** Copyright (C) 1998 Gerard Roudier <groudier@club-internet.fr>
**
** This driver also supports all the Symbios 53C8XX controller family,
** except 53C810 revisions < 16, 53C825 revisions < 16 and all
** revisions of 53C815 controllers.
**
** This driver is based on the Linux port of the FreeBSD ncr driver.
**
** Copyright (C) 1994 Wolfgang Stanglmeier
**
**-----------------------------------------------------------------------------
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**
**-----------------------------------------------------------------------------
**
** The Linux port of the FreeBSD ncr driver has been achieved in
** november 1995 by:
**
** Gerard Roudier <groudier@club-internet.fr>
**
** Being given that this driver originates from the FreeBSD version, and
** in order to keep synergy on both, any suggested enhancements and corrections
** received on Linux are automatically a potential candidate for the FreeBSD
** version.
**
** The original driver has been written for 386bsd and FreeBSD by
** Wolfgang Stanglmeier <wolf@cologne.de>
** Stefan Esser <se@mi.Uni-Koeln.de>
**
**-----------------------------------------------------------------------------
**
** Major contributions:
** --------------------
**
** NVRAM detection and reading.
** Copyright (C) 1997 Richard Waltham <dormouse@farsrobt.demon.co.uk>
**
*******************************************************************************
*/
#ifndef SYM53C8XX_H
#define SYM53C8XX_H
#include "sym53c8xx_defs.h"
/*
** Define Scsi_Host_Template parameters
**
** Used by hosts.c and sym53c8xx.c with module configuration.
*/
#if defined(HOSTS_C) || defined(MODULE)
#include <scsi/scsicam.h>
int sym53c8xx_abort(Scsi_Cmnd *);
int sym53c8xx_detect(Scsi_Host_Template *tpnt);
const char *sym53c8xx_info(struct Scsi_Host *host);
int sym53c8xx_queue_command(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
int sym53c8xx_reset(Scsi_Cmnd *, unsigned int);
#ifdef MODULE
int sym53c8xx_release(struct Scsi_Host *);
#else
#define sym53c8xx_release NULL
#endif
#if LINUX_VERSION_CODE >= LinuxVersionCode(2,1,75)
#define SYM53C8XX { name: "", \
detect: sym53c8xx_detect, \
release: sym53c8xx_release, \
info: sym53c8xx_info, \
queuecommand: sym53c8xx_queue_command,\
abort: sym53c8xx_abort, \
reset: sym53c8xx_reset, \
bios_param: scsicam_bios_param, \
can_queue: SCSI_NCR_CAN_QUEUE, \
this_id: 7, \
sg_tablesize: SCSI_NCR_SG_TABLESIZE, \
cmd_per_lun: SCSI_NCR_CMD_PER_LUN, \
use_clustering: DISABLE_CLUSTERING}
#else
#define SYM53C8XX { NULL, NULL, NULL, NULL, \
NULL, sym53c8xx_detect, \
sym53c8xx_release, sym53c8xx_info, NULL, \
sym53c8xx_queue_command,sym53c8xx_abort, \
sym53c8xx_reset, NULL, scsicam_bios_param, \
SCSI_NCR_CAN_QUEUE, 7, \
SCSI_NCR_SG_TABLESIZE, SCSI_NCR_CMD_PER_LUN, \
0, 0, DISABLE_CLUSTERING}
#endif /* LINUX_VERSION_CODE */
#endif /* defined(HOSTS_C) || defined(MODULE) */
#endif /* SYM53C8XX_H */
This diff is collapsed.
......@@ -93,6 +93,7 @@ static union {
} fbcon_cmap;
static int inverse = 0;
static int mtrr = 0;
static int currcon = 0;
static int pmi_setpal = 0; /* pmi for palette changes ??? */
......@@ -495,6 +496,8 @@ void vesafb_setup(char *options, int *ints)
pmi_setpal=0;
else if (! strcmp(this_opt, "pmipal"))
pmi_setpal=1;
else if (! strcmp(this_opt, "mtrr"))
mtrr=1;
else if (!strncmp(this_opt, "font:", 5))
strcpy(fb_info.fontname, this_opt+5);
}
......@@ -633,7 +636,8 @@ __initfunc(void vesafb_init(void))
}
request_region(0x3c0, 32, "vga+");
#ifdef CONFIG_MTRR
mtrr_add((unsigned long)video_base, video_size, MTRR_TYPE_WRCOMB, 1);
if (mtrr)
mtrr_add((unsigned long)video_base, video_size, MTRR_TYPE_WRCOMB, 1);
#endif
strcpy(fb_info.modename, "VESA VGA");
......
......@@ -548,32 +548,14 @@ affs_rename(struct inode *old_dir, struct dentry *old_dentry,
"No inode for entry found (key=%lu)\n",new_ino);
goto end_rename;
}
if (new_inode == old_inode) {
if (old_ino == new_ino) { /* Filename might have changed case */
retval = new_dentry->d_name.len < 31 ? new_dentry->d_name.len : 30;
strncpy(DIR_END(old_bh->b_data,old_inode)->dir_name + 1,
new_dentry->d_name.name,retval);
DIR_END(old_bh->b_data,old_inode)->dir_name[0] = retval;
goto new_checksum;
}
retval = 0;
goto end_rename;
}
if (S_ISDIR(old_inode->i_mode)) {
retval = -EINVAL;
if (is_subdir(new_dentry, old_dentry))
goto end_rename;
if (new_inode) {
if (new_dentry->d_count > 1)
shrink_dcache_parent(new_dentry);
retval = -EBUSY;
if (new_dentry->d_count > 1)
goto end_rename;
retval = -ENOTEMPTY;
if (!empty_dir(new_bh,AFFS_I2HSIZE(new_inode)))
goto end_rename;
}
retval = -ENOENT;
if (affs_parent_ino(old_inode) != old_dir->i_ino)
goto end_rename;
}
......@@ -593,7 +575,6 @@ affs_rename(struct inode *old_dir, struct dentry *old_dentry,
affs_copy_name(FILE_END(old_bh->b_data,old_inode)->file_name,new_dentry->d_name.name);
if ((retval = affs_insert_hash(new_dir->i_ino,old_bh,new_dir)))
goto end_rename;
new_checksum:
affs_fix_checksum(AFFS_I2BSIZE(new_dir),old_bh->b_data,5);
new_dir->i_ctime = new_dir->i_mtime = old_dir->i_ctime
......@@ -604,7 +585,6 @@ affs_rename(struct inode *old_dir, struct dentry *old_dentry,
mark_inode_dirty(new_dir);
mark_inode_dirty(old_dir);
mark_buffer_dirty(old_bh,1);
d_move(old_dentry,new_dentry);
end_rename:
affs_brelse(old_bh);
......
......@@ -246,12 +246,6 @@ static int coda_create(struct inode *dir, struct dentry *de, int mode)
dircnp = ITOC(dir);
if ( length > CODA_MAXNAMLEN ) {
printk("name too long: create, %s(%s)\n",
coda_f2s(&dircnp->c_fid), name);
return -ENAMETOOLONG;
}
error = venus_create(dir->i_sb, &(dircnp->c_fid), name, length,
0, mode, 0, &newfid, &attrs);
......@@ -302,12 +296,6 @@ static int coda_mknod(struct inode *dir, struct dentry *de, int mode, int rdev)
dircnp = ITOC(dir);
if ( length > CODA_MAXNAMLEN ) {
printk("name too long: mknod, %s(%s)\n",
coda_f2s(&dircnp->c_fid), name);
return -ENAMETOOLONG;
}
error = venus_create(dir->i_sb, &(dircnp->c_fid), name, length,
0, mode, rdev, &newfid, &attrs);
......@@ -349,9 +337,6 @@ static int coda_mkdir(struct inode *dir, struct dentry *de, int mode)
return -ENOENT;
}
if ( len > CODA_MAXNAMLEN )
return -ENAMETOOLONG;
if (coda_isroot(dir) && coda_iscontrol(name, len))
return -EPERM;
......@@ -409,11 +394,6 @@ static int coda_link(struct dentry *source_de, struct inode *dir_inode,
CDEBUG(D_INODE, "old: fid: %s\n", coda_f2s(&(cnp->c_fid)));
CDEBUG(D_INODE, "directory: %s\n", coda_f2s(&(dir_cnp->c_fid)));
if ( len > CODA_MAXNAMLEN ) {
printk("coda_link: name too long. \n");
return -ENAMETOOLONG;
}
error = venus_link(dir_inode->i_sb,&(cnp->c_fid), &(dir_cnp->c_fid),
(const char *)name, len);
......@@ -448,9 +428,6 @@ static int coda_symlink(struct inode *dir_inode, struct dentry *de,
if (coda_isroot(dir_inode) && coda_iscontrol(name, len))
return -EPERM;
if ( len > CODA_MAXNAMLEN )
return -ENAMETOOLONG;
symlen = strlen(symname);
if ( symlen > CODA_MAXPATHLEN )
return -ENAMETOOLONG;
......@@ -519,9 +496,6 @@ int coda_rmdir(struct inode *dir, struct dentry *de)
}
dircnp = ITOC(dir);
if (len > CODA_MAXNAMLEN)
return -ENAMETOOLONG;
if (!list_empty(&de->d_hash))
return -EBUSY;
error = venus_rmdir(dir->i_sb, &(dircnp->c_fid), name, len);
......@@ -545,7 +519,6 @@ static int coda_rename(struct inode *old_dir, struct dentry *old_dentry,
const char *new_name = new_dentry->d_name.name;
int old_length = old_dentry->d_name.len;
int new_length = new_dentry->d_name.len;
struct inode *old_inode = old_dentry->d_inode;
struct inode *new_inode = new_dentry->d_inode;
struct coda_inode_info *new_cnp, *old_cnp;
int error;
......@@ -553,10 +526,6 @@ static int coda_rename(struct inode *old_dir, struct dentry *old_dentry,
ENTRY;
coda_vfs_stat.rename++;
if ( (old_length > CODA_MAXNAMLEN) || new_length > CODA_MAXNAMLEN ) {
return -ENAMETOOLONG;
}
old_cnp = ITOC(old_dir);
new_cnp = ITOC(new_dir);
......@@ -565,21 +534,6 @@ static int coda_rename(struct inode *old_dir, struct dentry *old_dentry,
old_name, old_length, strlen(old_name), new_name, new_length,
strlen(new_name),old_dentry->d_count, new_dentry->d_count);
if (new_inode == old_inode)
return 0;
/* make sure target is not in use */
if (new_inode && S_ISDIR(new_inode->i_mode)) {
/*
* Prune any children before testing for busy.
*/
if (new_dentry->d_count > 1)
shrink_dcache_parent(new_dentry);
if (new_dentry->d_count > 1)
return -EBUSY;
}
/* the C library will do unlink/create etc */
if ( coda_crossvol_rename == 0 &&
old_cnp->c_fid.Volume != new_cnp->c_fid.Volume )
......@@ -599,7 +553,6 @@ static int coda_rename(struct inode *old_dir, struct dentry *old_dentry,
coda_flag_inode(new_dir, C_VATTR);
CDEBUG(D_INODE, "result %d\n", error);
d_move(old_dentry, new_dentry);
EXIT;
return 0;
......@@ -637,7 +590,9 @@ int coda_readdir(struct file *file, void *dirent, filldir_t filldir)
result = coda_venus_readdir(&open_file, dirent, filldir);
} else {
/* potemkin case: we are handed a directory inode */
down(&cnp->c_ovp->i_sem);
result = open_file.f_op->readdir(&open_file, dirent, filldir);
up(&cnp->c_ovp->i_sem);
}
coda_restore_codafile(inode, file, cnp->c_ovp, &open_file);
EXIT;
......
This diff is collapsed.
......@@ -543,8 +543,6 @@ struct super_block * ext2_read_super (struct super_block * sb, void * data,
else
sb->u.ext2_sb.s_resgid = le16_to_cpu(es->s_def_resgid);
sb->u.ext2_sb.s_mount_state = le16_to_cpu(es->s_state);
sb->u.ext2_sb.s_rename_lock = 0;
sb->u.ext2_sb.s_rename_wait = NULL;
sb->u.ext2_sb.s_addr_per_block_bits =
log2 (EXT2_ADDR_PER_BLOCK(sb));
sb->u.ext2_sb.s_desc_per_block_bits =
......
......@@ -3,6 +3,10 @@
*
* Written 1992,1993 by Werner Almesberger
* VFAT extensions by Gordon Chaffee, merged with msdos fs by Henrik Storner
*
* Fixes:
*
* Max Cohan: Fixed invalid FSINFO offset when info_sector is 0
*/
#include <linux/version.h>
......@@ -362,8 +366,17 @@ fat_read_super(struct super_block *sb, void *data, int silent)
fat32 = 1;
MSDOS_SB(sb)->fat_length= CF_LE_W(b->fat32_length)*sector_mult;
MSDOS_SB(sb)->root_cluster = CF_LE_L(b->root_cluster);
MSDOS_SB(sb)->fsinfo_offset =
CF_LE_W(b->info_sector) * logical_sector_size + 0x1e0;
CF_LE_W(b->info_sector), logical_sector_size);
/* MC - if info_sector is 0, don't multiply by 0 */
if(CF_LE_W(b->info_sector) == 0) {
MSDOS_SB(sb)->fsinfo_offset =
logical_sector_size + 0x1e0;
} else {
MSDOS_SB(sb)->fsinfo_offset =
(CF_LE_W(b->info_sector) * logical_sector_size)
+ 0x1e0;
}
if (MSDOS_SB(sb)->fsinfo_offset + sizeof(struct fat_boot_fsinfo) > sb->s_blocksize) {
printk("fat_read_super: Bad fsinfo_offset\n");
fat_brelse(sb, bh);
......
......@@ -430,8 +430,6 @@ int hfs_rename(struct inode *old_dir, struct dentry *old_dentry,
update_dirs_plus(new_parent, is_dir);
}
/* update dcache */
d_move(old_dentry, new_dentry);
}
hfs_rename_put:
......
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.
......@@ -39,3 +39,4 @@ int ntfs_check_index_record(ntfs_inode *ino, char *record);
int ntfs_getdir_byposition(ntfs_iterate_s *walk);
int ntfs_mkdir(ntfs_inode* dir,const char* name,int namelen, ntfs_inode *ino);
int ntfs_split_indexroot(ntfs_inode *ino);
int ntfs_add_index_root( ntfs_inode *ino, int type );
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