Commit 7eaba1c7 authored by Linus Torvalds's avatar Linus Torvalds

Linux 2.1.108

I just made a pre-2.1.108 and put it on ftp.kernel.org - it fixes a
problem where my sendfile() forgot to get the kernel lock (blush), so it
randomly didn't work correctly on SMP.

I've also done some more testing of sendfile(), and the nice thing is that
when I compared doing a file copy with sendfile compared to a plain "cp",
the sendfile implementation was about twice as fast (at least my version
of "cp" will just do read+write pairs over and over again). When I copied
a 38MB file the "cp" took 1:58 seconds while sendfile took 1:08 seconds
according to "time" (I have 512MB of RAM, so this was all cached,
obviously)..

I haven't done any network tests, because I don't think I'd be able to see
any difference, and it does need the "SO_CONSTIPATED" thing and a way to
push the end of data for best performance.

Some final words on sendfile():
 - it does report errors correctly. That doesn't mean that you necessarily
   can know _which_ fd produced the error, that you have to find out on
   your own. A file real access can generally result in EIO and EACCES
   (the latter with NFS and other "protection-at-read-time" non-UNIX
   filesystems), while the output write() can result in a number of errors
   as the output fd can be any kind of socket/tty/file. Depending on the
   mode of the output file, the output errors can include EINTR, EAGAIN
   etc, and you can mix sendfile() with select() on the output socket, for
   example.
 - you can give it a length of MAX_ULONG, and it will write as much as it
   can. This is entirely consistent with the notion that it is equivalent
   with write(out, tmpbuf, read(in, tmpbuf, size)) where "tmpbuf" is
   essentially infinite - the read() will read al of the file and return
   the file length in the process. Thus you don't even need to know the
   size of the file beforehand.
   The file copy test was essentially done with a single
        error = sendfile(out, in, ~0);
   and I'm appending my current test-program.

This is going to be in 2.2, btw. The changes are so small and so obviously
have to work that it would be ridiculous not to have this - the only
question is whether I'll try to make it a "copyfd()" system call instead,
falling back on read+write when I can't use the page cache directly. I
suspect I won't.

                        Linus
parent eb4d32c1
......@@ -3219,127 +3219,104 @@ CONFIG_SCSI_NCR53C7xx_DISCONNECT
NCR53C8XX SCSI support
CONFIG_SCSI_NCR53C8XX
This is the BSD ncr driver adapted to Linux for the NCR53C8XX family
This is the BSD ncr driver adapted to linux for the NCR53C8XX family
of PCI-SCSI controllers. This driver supports parity checking,
tagged command queuing, Fast-20 data transfer up to 20 MB/s with
narrow SCSI devices and 40 MB/s with wide SCSI devices.
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.
Please read drivers/scsi/README.ncr53c8xx for more information.
Linux/i386, Linux/Alpha and Linux/PPC are supported by this driver.
Linux/i386 and Linux/Alpha are supported by this driver.
synchronous data transfers frequency
CONFIG_SCSI_NCR53C8XX_SYNC
SCSI-2 specifications allow SCSI devices to negotiate a synchronous
transfer period of 25 nano-seconds or more.
The transfer period value is 4 times the agreed transfer period.
So, data can be transferred at a 10 MHz frequency, allowing 10
MB/second throughput with 8 bits SCSI-2 devices and 20 MB/second
with wide16 devices. This frequency can be used safely with
differential devices but may cause problems with single-ended
devices.
Specify 0 if you want to only use asynchronous data transfers.
Otherwise, specify a value between 5 and 10. Commercial O/Ses
generally use 5 Mhz frequency for synchronous transfers. It is a
reasonable default value.
However, a flawless single-ended SCSI bus supports 10 MHz data
transfers. Regardless of the value chosen in the Linux
configuration, the synchronous period can be changed after boot-up
through the /proc/scsi file system. The generic command is:
echo "setsync #target period" >/proc/scsi/ncr53c8xx/0
Use a 25 ns period for 10 Mhz synchronous data transfers.
If you don't know what to do now, go with the default.
The SCSI Parallel Interface-2 Standard defines 4 classes of transfer
rates: FAST-5, FAST-10, FAST-20 and FAST-40. The numbers are respectively
the maximum data transfer rates in mega-transfers per second for each
class. For example, a FAST-20 Wide 16 device is able to transfer data
at up to 40 MB/s.
You may specify 0 if you want to only use asynchronous data transfers.
Otherwise, specify a value between 5 and 40, depending on the capability
of your SCSI controller. Note that 40 should normally be ok since the
driver narrows the value according to controllers capabilities.
This option has no effect for adapters with NVRAM, since the driver will
get this information from the user set-up. It also can be overriden using
a boot setup option, as follow (example):
'ncr53c8xx=sync:12' will allow the driver to negotiate for FAST-20
synchronous data transfer (20 mega-transfers per second).
The normal answer therefore is not to go with the default but to select
the maximum value 40 allowing the driver to use the maximum value
supported by each controller.
There is no safe option other than using good cabling, right terminations
and SCSI conformant devices.
use normal IO
CONFIG_SCSI_NCR53C8XX_IOMAPPED
This option allows you to force the driver to use normal IO.
Memory mapped IO has less latency than normal IO and works for most
Intel-based hardware. Under Linux/Alpha and Linux/PPC only normal
IO is currently supported by the driver and so, this option has no
effect. On Linux/PPC MMIO and normal IO are done the same (all IO
is memory mapped) so you lose nothing by using normal IO. The normal
answer therefore is N. Try Y only if you have problems.
Memory mapped IO has less latency than normal IO and works for most
Intel-based hardware.
Under Linux/Alpha only normal IO is currently supported by the
driver and so, this option has no effect.
The normal answer therefore is N.
not allow targets to disconnect
CONFIG_SCSI_NCR53C8XX_NO_DISCONNECT
This option is only provided for safety if you suspect some SCSI
This option is only provided for safety if you suspect some scsi
device of yours to not support properly the target-disconnect
feature. In that case, you would say Y here. In general however, to
not allow targets to disconnect is not reasonable if there is more
than 1 device on a SCSI bus. The normal answer therefore is N.
detect and read serial NVRAMs
CONFIG_SCSI_NCR53C8XX_NVRAM_DETECT
Enable support for reading the serial NVRAM data on Symbios and some
Symbios compatible cards, and Tekram DC390W/U/F cards. Useful for
systems with more than one Symbios compatible controller where at
least one has a serial NVRAM, or for a system with a mixture of
Symbios and Tekram cards. Enables setting the boot order of host
adaptors to something other than the default order or "reverse
probe" order. Also enables Symbios and Tekram cards to be
distinguished so that the option "assume boards are SYMBIOS
compatible" (CONFIG_SCSI_NCR53C8XX_SYMBIOS_COMPAT) below may be set
in a system with a mixture of Symbios and Tekram cards so that the
Symbios cards can make use of the full range of Symbios features,
differential, led pin, without causing problems for the Tekram
card(s). Also enables setting host and targets SCSI features as
defined in the user setup for each host using a serial NVRAM. Read
drivers/scsi/README.ncr53c8xx for more information. The default
answer is N, the normal answer should be Y.
than 1 device on a scsi bus. The normal answer therefore is N.
enable tagged command queuing
CONFIG_SCSI_NCR53C8XX_TAGGED_QUEUE
default tagged command queue depth
CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS
This option allows you to enable tagged command queuing support at
Linux start-up. Some SCSI devices do not properly support this
feature. The suggested method is to say N here and to use the
"settags" control command after boot-up to enable this feature:
echo "settags 2 4" >/proc/scsi/ncr53c8xx/0
asks the driver to use up to 4 concurrent tagged commands for target
2 of controller 0.
See the file drivers/scsi/README.ncr53c8xx for more information.
WARNING! If you say Y here, then you have to say N to "not allow
targets to disconnect", above.
The safe answer therefore is N.
The normal answer therefore is Y.
linux start-up and to define the default value for the number of
tags per device. If you donnot want tagged command queuing to be
used by the driver you must enter either 0 or 1 for this option.
The default value is 8 and should be supported by most hard disks.
This option has no effect for adapters with NVRAM, since the driver
will get this information from the user set-up. It also can be
overriden using a boot setup option, as follow (example):
'ncr53c8xx=tags:4/t2t3q16/t0u2q10' will set default queue depth to 4,
set queue depth to 16 for target 2 and target 3 on controller 0 and
set queue depth to 10 for target 0 / lun 2 on controller 1.
The normal answer therefore is to go with the default 8 and to use
a boot command line option for devices that need to use a different
command queue depth.
There is no safe option other than using good scsi devices.
maximum number of queued commands
CONFIG_SCSI_NCR53C8XX_MAX_TAGS
This option allows you to specify the maximum number of commands
that can be queued to a device, when tagged command queuing is
possible. The default value is 4. Minimum is 2, maximum is 12. The
normal answer therefore is the default one.
that can be queued to any device, when tagged command queuing is
possible. The default value is 32. Minimum is 2, maximum is 64.
For value less than 32, this option only spares a fiew memory
(8*7*(32-MAXTAGS) bytes), so using less than 32 is'nt worth it.
For value greater than 32, latency on reselection will be increased
of 1 or 2 micro-seconds. So, the normal answer here is to go with the
default value 32 unless you are using very large hard disks with
large cache (>= 1MB) that are able to get advantage of more than
32 tagged commands.
There is no safe option and the default answer is recommended.
assume boards are SYMBIOS compatible
CONFIG_SCSI_NCR53C8XX_SYMBIOS_COMPAT
This option allows you to enable some features depending on GPIO
wiring. These General Purpose Input/Output pins can be used for
vendor specific features or implementation of the standard SYMBIOS
features. Genuine SYMBIOS boards use GPIO0 in output for controller
LED and GPIO3 bit as a flag indicating single-ended/differential
interface.
If all the boards of your system are genuine SYMBIOS boards or use
BIOS and drivers from SYMBIOS, you would want to say Y here.
The driver behaves correctly on my system with this option enabled.
(SDMS 4.0 + Promise SCSI ULTRA 875 rev 0x3 + ASUS SC200 810A rev
0x12). This option must be set to N if your system has at least one
53C8XX based SCSI board with a vendor-specific BIOS (example: Tekram
DC-390/U/W/F).
However, if all your non Symbios compatible boards have NVRAM,
saying Y to "detect and read serial NVRAMs"
(CONFIG_SCSI_NCR53C8XX_NVRAM_DETECT) above allows the driver to
distinguish Symbios compatible boards from other ones; you can then
also answer Y here.
If unsure, say N.
LED and GPIO3 bit as a flag indicating singled-ended/differential
interface. The Tekram DC-390U/F boards uses a different GPIO wiring.
This option is useless if all your boards have NVRAM, since the driver
is able to detect the board type from the NVRAM format.
enable profiling statistics gathering
CONFIG_SCSI_NCR53C8XX_PROFILE
This option allows you to enable profiling informations gathering.
This statististics are not very accurate due to the low frequency
of the kernel clock (100 Hz on i386) and have performance impact
on systems that use very fast devices.
The normal answer therefore is N.
IBMMCA SCSI support
CONFIG_SCSI_IBMMCA
......
/* -*- auto-fill -*- */
Overview of the Virtual File System
Richard Gooch <rgooch@atnf.csiro.au>
27-JUN-1998
Conventions used in this document <section>
=================================
Each section in this document will have the string "<section>" at the
right-hand side of the section title. Each subsection will have
"<subsection>" at the right-hand side. These strings are meant to make
it easier to search through the document.
NOTE that the master copy of this document is available online at:
http://www.atnf.csiro.au/~rgooch/linux/docs/vfs.txt
What is it? <section>
===========
The Virtual File System (otherwise known as the Virtual Filesystem
Switch) is the software layer in the kernel that provides the
filesystem interface to userspace programmes. It also provides an
abstraction within the kernel which allows different filesystem
implementations to co-exist.
A Quick Look At How It Works <section>
============================
In this section I'll briefly describe how things work, before
launching into the details. I'll start with describing what happens
when user programmes open and manipulate files, and then look from the
other view which is how a filesystem is supported and subsequently
mounted.
Opening a File <subsection>
--------------
The VFS implements the open(2) system call. The pathname argument is
used by the VFS to search through the directory entry cache (dentry
cache or "dcache"). This provides a very fast lookup mechanism to
translate a pathname (filename) into a specific dentry.
An individual dentry usually has a pointer to an inode. Inodes are the
things that live on disc drives, and can be regular files (you know:
those things that you write data into), directories, FIFOs and other
beasts. Dentries live in RAM and are never saved to disc: they exist
only for performance. Inodes live on disc and are copied into memory
when required. Later any changes are written back to disc. The inode
that lives in RAM is a VFS inode, and it is this which the dentry
points to.
The dcache is meant to be a view into your entire filespace. Unlike
Linus, most of us losers can't fit enough dentries into RAM to cover
all of our filespace, so the dcache has bits missing. In order to
resolve your pathname into a dentry, the VFS may have to resort to
creating dentries along the way, and then loading the inode. This is
done by looking up the inode.
To lookup an inode (usually read from disc) requires that the VFS
calls the lookup() method of the parent directory inode. This method
is installed by the specific filesystem implementation that the inode
lives in. There will be more on this later.
Once the VFS has the required dentry (and hence the inode), we can do
all those boring things like open(2) the file, or stat(2) it to peek
at the inode data. The stat(2) operation is fairly simple: once the
VFS has the dentry, it peeks at the inode data and passes some of it
back to userspace.
Opening a file requires another operation: allocation of a file
structure (this is the kernel-side implementation of file
descriptors). The freshly allocated file structure is initialised with
a pointer to the dentry and a set of file operation member
functions. These are taken from the inode data. The open() file method
is then called so the specific filesystem implementation can do it's
work. You can see that this is another switch performed by the VFS.
The file structure is placed into the file descriptor table for the
process.
Reading, writing and closing files (and other assorted VFS operations)
is done by using the userspace file descriptor to grab the appropriate
file structure, and then calling the required file structure method
function to do whatever is required.
For as long as the file is open, it keeps the dentry "open" (in use),
which in turn means that the VFS inode is still in use.
Registering and Mounting a Filesystem <subsection>
-------------------------------------
If you want to support a new kind of filesystem in the kernel, all you
need to do is call register_filesystem(). You pass a structure
describing the filesystem implementation (struct file_system_type)
which is then added to an internal table of supported filesystems. You
can do:
% cat /proc/filesystems
to see what filesystems are currently available on your system.
When a request is made to mount a block device onto a directory in
your filespace the VFS will call the appropriate method for the
specific filesystem. The dentry for the mount point will then be
updated to point to the root inode for the new filesystem.
It's now time to look at things in more detail.
struct file_system_type <section>
=======================
This describes the filesystem. As of kernel 2.1.99, the following
members are defined:
struct file_system_type {
const char *name;
int fs_flags;
struct super_block *(*read_super) (struct super_block *, void *, int);
struct file_system_type * next;
};
name: the name of the filesystem type, such as "ext2", "iso9660",
"msdos" and so on
fs_flags: various flags (i.e. if it is a read-only FS)
read_super: the method to call when a new instance of this
filesystem should be mounted
next: for internal VFS use: you should initialise this to NULL
The read_super() method has the following arguments:
struct super_block *sb: the superblock structure. This is partially
initialised by the VFS and the rest must be initialised by the
read_super() method
void *data: arbitrary mount options, usually comes as an ASCII
string
int silent: whether or not to be silent on error
The read_super() method must determine if the block device specified
in the superblock contains a filesystem of the type the method
supports. On success the method returns the superblock pointer, on
failure it returns NULL.
The most interesting member of the superblock structure that the
read_super() method fills in is the "s_op" field. This is a pointer to
a "struct super_operations" which describes the next level of the
filesystem implementation.
struct super_operations <section>
=======================
This describes how the VFS can manipulate the superblock of your
filesystem. As of kernel 2.1.99, the following members are defined:
struct super_operations {
void (*read_inode) (struct inode *);
void (*write_inode) (struct inode *);
void (*put_inode) (struct inode *);
void (*delete_inode) (struct inode *);
int (*notify_change) (struct dentry *, struct iattr *);
void (*put_super) (struct super_block *);
void (*write_super) (struct super_block *);
int (*statfs) (struct super_block *, struct statfs *, int);
int (*remount_fs) (struct super_block *, int *, char *);
void (*clear_inode) (struct inode *);
};
All methods are called without any locks being held, unless otherwise
noted. This means that most methods can block safely. All methods are
only called from a process context (i.e. not from an interrupt handler
or bottom half).
read_inode: this method is called to read a specific inode from the
mounted filesystem. The "i_ino" member in the "struct inode"
will be initialised by the VFS to indicate which inode to
read. Other members are filled in by this method
write_inode: this method is called when the VFS needs to write an
inode to disc
put_inode: called when the VFS inode is removed from the inode
cache. This method is optional
delete_inode: called when the VFS wants to delete an inode
notify_change: called when VFS inode attributes are changed. If this
is NULL the VFS falls back to the write_inode() method. This
is called with the kernel lock held
put_super: called when the VFS wishes to free the superblock
(i.e. unmount). This is called with the superblock lock held
write_super: called when the VFS superblock needs to be written to
disc. This method is optional
statfs: called when the VFS needs to get filesystem statistics. This
is called with the kernel lock held
remount_fs: called when the filesystem is remounted. This is called
with the kernel lock held
clear_inode: called then the VFS clears the inode. Optional
The read_inode() method is responsible for filling in the "i_op"
field. This is a pointer to a "struct inode_operations" which
describes the methods that can be performed on individual inodes.
struct inode_operations <section>
=======================
This describes how the VFS can manipulate an inode in your
filesystem. As of kernel 2.1.99, the following members are defined:
struct inode_operations {
struct file_operations * default_file_ops;
int (*create) (struct inode *,struct dentry *,int);
int (*lookup) (struct inode *,struct dentry *);
int (*link) (struct dentry *,struct inode *,struct dentry *);
int (*unlink) (struct inode *,struct dentry *);
int (*symlink) (struct inode *,struct dentry *,const char *);
int (*mkdir) (struct inode *,struct dentry *,int);
int (*rmdir) (struct inode *,struct dentry *);
int (*mknod) (struct inode *,struct dentry *,int,int);
int (*rename) (struct inode *, struct dentry *,
struct inode *, struct dentry *);
int (*readlink) (struct dentry *, char *,int);
struct dentry * (*follow_link) (struct dentry *, struct dentry *);
int (*readpage) (struct file *, struct page *);
int (*writepage) (struct file *, struct page *);
int (*bmap) (struct inode *,int);
void (*truncate) (struct inode *);
int (*permission) (struct inode *, int);
int (*smap) (struct inode *,int);
int (*updatepage) (struct file *, struct page *, const char *,
unsigned long, unsigned int, int);
int (*revalidate) (struct dentry *);
};
default_file_ops: this is a pointer to a "struct file_operations"
which describes how to manipulate open files
create: called by the open(2) and creat(2) system calls. Only
required if you want to support regular files. The dentry you
get should not have an inode (i.e. it should be a negative
dentry). Here you will probably call d_instantiate() with the
dentry and the newly created inode
lookup: called when the VFS needs to lookup an inode in a parent
directory. The name to look for is found in the dentry. This
method must call d_add() to insert the found inode into the
dentry. The "i_count" field in the inode structure should be
incremented. If the named inode does not exist a NULL inode
should be inserted into the dentry (this is called a negative
dentry). Returning an error code from this routine must only
be done on a real error, otherwise creating inodes with system
calls like create(2), mknod(2), mkdir(2) and so on will fail.
If you wish to overload the dentry methods then you should
initialise the "d_dop" field in the dentry; this is a pointer
to a struct "dentry_operations".
This method is called with the directory semaphore held
link: called by the link(2) system call. Only required if you want
to support hard links. You will probably need to call
d_instantiate() just as you would in the create() method
unlink: called by the unlink(2) system call. Only required if you
want to support deleting inodes
symlink: called by the symlink(2) system call. Only required if you
want to support symlinks. You will probably need to call
d_instantiate() just as you would in the create() method
mkdir: called by the mkdir(2) system call. Only required if you want
to support creating subdirectories. You will probably need to
call d_instantiate() just as you would in the create() method
rmdir: called by the rmdir(2) system call. Only required if you want
to support deleting subdirectories
mknod: called by the mknod(2) system call to create a device (char,
block) inode or a named pipe (FIFO) or socket. Only required
if you want to support creating these types of inodes. You
will probably need to call d_instantiate() just as you would
in the create() method
readlink: called by the readlink(2) system call. Only required if
you want to support reading symbolic links
follow_link: called by the VFS to follow a symbolic link to the
inode it points to. Only required if you want to support
symbolic links
struct file_operations <section>
======================
This describes how the VFS can manipulate an open file. As of kernel
2.1.99, the following members are defined:
struct file_operations {
loff_t (*llseek) (struct file *, loff_t, int);
ssize_t (*read) (struct file *, char *, size_t, loff_t *);
ssize_t (*write) (struct file *, const char *, size_t, loff_t *);
int (*readdir) (struct file *, void *, filldir_t);
unsigned int (*poll) (struct file *, struct poll_table_struct *);
int (*ioctl) (struct inode *, struct file *, unsigned int, unsigned long);
int (*mmap) (struct file *, struct vm_area_struct *);
int (*open) (struct inode *, struct file *);
int (*release) (struct inode *, struct file *);
int (*fsync) (struct file *, struct dentry *);
int (*fasync) (struct file *, int);
int (*check_media_change) (kdev_t dev);
int (*revalidate) (kdev_t dev);
int (*lock) (struct file *, int, struct file_lock *);
};
llseek: called when the VFS needs to move the file position index
read: called by the read(2) system call
write: called by the write(2) system call
readdir: called when the VFS needs to read the directory contents
poll: called by the VFS when a process wants to check if there is
activity on this file and (optionally) go to sleep until there
is activity
ioctl: called by the ioctl(2) system call
mmap: called by the mmap(2) system call
open: called by the VFS when an inode should be opened. When the VFS
opens a file, it creates a new "struct file" and initialises
the "f_op" file operations member with the "default_file_ops"
field in the inode structure. It then calls the open method
for the newly allocated file structure. You might think that
the open method really belongs in "struct inode_operations",
and you may be right. I think it's done the way it is because
it makes filesystems simpler to implement. The open() method
is a good place to initialise the "private_data" member in the
file structure if you want to point to a device structure
release: called when the last reference to an open file is closed
fsync: called by the fsync(2) system call
fasync: called by the fcntl(2) system call when asynchronous
(non-blocking) mode is enabled for a file
Note that the file operations are implemented by the specific
filesystem in which the inode resides. When opening a device node
(character or block special) most filesystems will call special
support routines in the VFS which will locate the required device
driver information. These support routines replace the filesystem file
operations with those for the device driver, and then proceed to call
the new open() method for the file. This is how opening a device file
in the filesystem eventually ends up calling the device driver open()
method. Note the devfs (the Device FileSystem) has a more direct path
from device node to device driver (this is an unofficial kernel
patch).
struct dentry_operations <section>
========================
This describes how a filesystem can overload the standard dentry
operations. Dentries and the dcache are the domain of the VFS and the
individual filesystem implementations. Device drivers have no business
here. As of kernel 2.1.99, the following members are defined:
struct dentry_operations {
int (*d_revalidate)(struct dentry *);
int (*d_hash) (struct dentry *, struct qstr *);
int (*d_compare) (struct dentry *, struct qstr *, struct qstr *);
void (*d_delete)(struct dentry *);
void (*d_release)(struct dentry *);
void (*d_iput)(struct dentry *, struct inode *);
};
d_revalidate: called when the VFS needs to revalidate a dentry
d_hash: called when the VFS adds a dentry to the hash table
d_compare: called when a dentry should be compared with another
d_delete: called when the last reference to a dentry is
deleted. This means no-one is using the dentry, however it is
still valid and in the dcache
d_release: called when a dentry is deallocated
d_iput: called when a dentry looses its inode (just prior to its
being deallocated). The default when this is NULL is that the
VFS calls iput(). If you define this method, you must call
iput() yourself
Each dentry has a pointer to its parent dentry, as well as a hash list
of child dentries. Child dentries are basically like files in a
directory.
There are a number of functions defined which permit a filesystem to
manipulate dentries:
dget: open a new handle for an existing dentry (this just increments
the usage count)
dput: close a handle for a dentry (decrements the usage count). If
the usage count drops to 0, the "d_delete" method is called
and the dentry is placed on the unused list if the dentry is
still in its parents hash list. Putting the dentry on the
unused list just means that if the system needs some RAM, it
goes through the unused list of dentries and deallocates them.
If the dentry has already been unhashed and the usage count
drops to 0, in this case the dentry is deallocated after the
"d_delete" method is called
d_drop: this unhashes a dentry from its parents hash list. A
subsequent call to dput() will dellocate the dentry if its
usage count drops to 0
d_delete: delete a dentry. If there are no other open references to
the dentry then the dentry is turned into a negative dentry
(the d_iput() method is called). If there are other
references, then d_drop() is called instead
d_add: add a dentry to its parents hash list and then calls
d_instantiate()
d_instantiate: add a dentry to the alias hash list for the inode and
updates the "d_inode" member. The "i_count" member in the
inode structure should be set/incremented. If the inode
pointer is NULL, the dentry is called a "negative
dentry". This function is commonly called when an inode is
created for an existing negative dentry
......@@ -509,10 +509,8 @@ L: linux-kernel@vger.rutgers.edu
S: Maintained
SCSI SUBSYSTEM
P: Leonard N. Zubkoff
M: Leonard N. Zubkoff <lnz@dandelion.com>
L: linux-scsi@vger.rutgers.edu
S: Maintained
S: Unmaintained
SCSI TAPE DRIVER
P: Kai Mdkisara
......
......@@ -4,15 +4,6 @@
#
mainmenu_name "Kernel configuration of Linux for Alpha machines"
# clear all implied options (don't want default values for those):
unset CONFIG_CROSSCOMPILE CONFIG_NATIVE
unset CONFIG_ALPHA_EV4 CONFIG_ALPHA_EV5 CONFIG_ALPHA_EV6
unset CONFIG_PCI CONFIG_ALPHA_EISA
unset CONFIG_ALPHA_LCA CONFIG_ALPHA_APECS CONFIG_ALPHA_CIA
unset CONFIG_ALPHA_T2 CONFIG_ALPHA_PYXIS
unset CONFIG_ALPHA_TSUNAMI CONFIG_ALPHA_MCPCIA
unset CONFIG_ALPHA_NEED_ROUNDING_EMULATION
mainmenu_option next_comment
comment 'Code maturity level options'
bool 'Prompt for development and/or incomplete code/drivers' CONFIG_EXPERIMENTAL
......@@ -31,6 +22,8 @@ endmenu
mainmenu_option next_comment
comment 'General setup'
unset CONFIG_CROSSCOMPILE CONFIG_NATIVE
if [ "`uname`" != "Linux" ]; then
define_bool CONFIG_CROSSCOMPILE y
else
......@@ -63,6 +56,14 @@ choice 'Alpha system type' \
Ruffian CONFIG_ALPHA_RUFFIAN \
Platform2000 CONFIG_ALPHA_P2K" Cabriolet
# clear all implied options (don't want default values for those):
unset CONFIG_ALPHA_EV4 CONFIG_ALPHA_EV5 CONFIG_ALPHA_EV6
unset CONFIG_PCI CONFIG_ALPHA_EISA
unset CONFIG_ALPHA_LCA CONFIG_ALPHA_APECS CONFIG_ALPHA_CIA
unset CONFIG_ALPHA_T2 CONFIG_ALPHA_PYXIS
unset CONFIG_ALPHA_TSUNAMI CONFIG_ALPHA_MCPCIA
unset CONFIG_ALPHA_NEED_ROUNDING_EMULATION
if [ "$CONFIG_ALPHA_BOOK1" = "y" ]
then
define_bool CONFIG_ALPHA_NONAME y
......
......@@ -388,11 +388,11 @@ int get_cpuinfo(char *buffer)
&systype_name, &sysvariation_name);
return sprintf(buffer,
"CPU\t\t\t: Alpha\n"
"CPU model\t\t: %s\n"
"CPU variation\t\t: %ld\n"
"CPU revision\t\t: %ld\n"
"CPU serial number\t: %s\n"
"cpu\t\t\t: Alpha\n"
"cpu model\t\t: %s\n"
"cpu variation\t\t: %ld\n"
"cpu revision\t\t: %ld\n"
"cpu serial number\t: %s\n"
"system type\t\t: %s\n"
"system variation\t: %s\n"
"system revision\t\t: %ld\n"
......
/*
* bios32.c - Low-Level PCI Access
*
* $Id: bios32.c,v 1.33 1998/05/12 07:30:11 mj Exp $
* $Id: bios32.c,v 1.37 1998/06/19 17:11:37 mj Exp $
*
* Copyright 1993, 1994 Drew Eckhardt
* Visionary Computing
......@@ -62,6 +62,9 @@
* Feb 6, 1998 : No longer using BIOS to find devices and device classes. [mj]
*
* May 1, 1998 : Support for peer host bridges. [mj]
*
* Jun 19, 1998 : Changed to use spinlocks, so that PCI configuration space
* can be accessed from interrupts even on SMP systems. [mj]
*/
#include <linux/config.h>
......@@ -71,16 +74,15 @@
#include <linux/init.h>
#include <linux/ioport.h>
#include <linux/malloc.h>
#include <linux/smp_lock.h>
#include <asm/page.h>
#include <asm/segment.h>
#include <asm/system.h>
#include <asm/io.h>
#include <linux/smp_lock.h>
#include <asm/irq.h>
#include <asm/bitops.h>
#include <asm/smp.h>
#include <asm/spinlock.h>
#include "irq.h"
......@@ -92,6 +94,13 @@
#define DBG(x...)
#endif
/*
* This interrupt-safe spinlock protects all accesses to PCI
* configuration space.
*/
spinlock_t pci_lock = SPIN_LOCK_UNLOCKED;
/*
* Generic PCI access -- indirect calls according to detected HW.
*/
......@@ -128,41 +137,28 @@ int pcibios_present(void)
return access_pci->pci_present;
}
int pcibios_read_config_byte (unsigned char bus,
unsigned char device_fn, unsigned char where, unsigned char *value)
{
return access_pci->read_config_byte(bus, device_fn, where, value);
}
int pcibios_read_config_word (unsigned char bus,
unsigned char device_fn, unsigned char where, unsigned short *value)
{
return access_pci->read_config_word(bus, device_fn, where, value);
}
int pcibios_read_config_dword (unsigned char bus,
unsigned char device_fn, unsigned char where, unsigned int *value)
{
return access_pci->read_config_dword(bus, device_fn, where, value);
}
int pcibios_write_config_byte (unsigned char bus,
unsigned char device_fn, unsigned char where, unsigned char value)
{
return access_pci->write_config_byte(bus, device_fn, where, value);
}
int pcibios_write_config_word (unsigned char bus,
unsigned char device_fn, unsigned char where, unsigned short value)
{
return access_pci->write_config_word(bus, device_fn, where, value);
#define PCI_byte_BAD 0
#define PCI_word_BAD (pos & 1)
#define PCI_dword_BAD (pos & 3)
#define PCI_STUB(rw,size,type) \
int pcibios_##rw##_config_##size (u8 bus, u8 dfn, u8 pos, type value) \
{ \
int res; \
unsigned long flags; \
if (PCI_##size##_BAD) return PCIBIOS_BAD_REGISTER_NUMBER; \
spin_lock_irqsave(&pci_lock, flags); \
res = access_pci->rw##_config_##size(bus, dfn, pos, value); \
spin_unlock_irqrestore(&pci_lock, flags); \
return res; \
}
int pcibios_write_config_dword (unsigned char bus,
unsigned char device_fn, unsigned char where, unsigned int value)
{
return access_pci->write_config_dword(bus, device_fn, where, value);
}
PCI_STUB(read, byte, u8 *)
PCI_STUB(read, word, u16 *)
PCI_STUB(read, dword, u32 *)
PCI_STUB(write, byte, u8)
PCI_STUB(write, word, u16)
PCI_STUB(write, dword, u32)
#define PCI_PROBE_BIOS 1
#define PCI_PROBE_CONF1 2
......@@ -187,76 +183,48 @@ static unsigned int pci_probe = PCI_PROBE_BIOS | PCI_PROBE_CONF1 | PCI_PROBE_CON
static int pci_conf1_read_config_byte(unsigned char bus, unsigned char device_fn,
unsigned char where, unsigned char *value)
{
unsigned long flags;
save_flags(flags); cli();
outl(CONFIG_CMD(bus,device_fn,where), 0xCF8);
*value = inb(0xCFC + (where&3));
restore_flags(flags);
return PCIBIOS_SUCCESSFUL;
}
static int pci_conf1_read_config_word (unsigned char bus,
unsigned char device_fn, unsigned char where, unsigned short *value)
{
unsigned long flags;
if (where&1) return PCIBIOS_BAD_REGISTER_NUMBER;
save_flags(flags); cli();
outl(CONFIG_CMD(bus,device_fn,where), 0xCF8);
*value = inw(0xCFC + (where&2));
restore_flags(flags);
return PCIBIOS_SUCCESSFUL;
}
static int pci_conf1_read_config_dword (unsigned char bus, unsigned char device_fn,
unsigned char where, unsigned int *value)
{
unsigned long flags;
if (where&3) return PCIBIOS_BAD_REGISTER_NUMBER;
save_flags(flags); cli();
outl(CONFIG_CMD(bus,device_fn,where), 0xCF8);
*value = inl(0xCFC);
restore_flags(flags);
return PCIBIOS_SUCCESSFUL;
}
static int pci_conf1_write_config_byte (unsigned char bus, unsigned char device_fn,
unsigned char where, unsigned char value)
{
unsigned long flags;
save_flags(flags); cli();
outl(CONFIG_CMD(bus,device_fn,where), 0xCF8);
outb(value, 0xCFC + (where&3));
restore_flags(flags);
return PCIBIOS_SUCCESSFUL;
}
static int pci_conf1_write_config_word (unsigned char bus, unsigned char device_fn,
unsigned char where, unsigned short value)
{
unsigned long flags;
if (where&1) return PCIBIOS_BAD_REGISTER_NUMBER;
save_flags(flags); cli();
outl(CONFIG_CMD(bus,device_fn,where), 0xCF8);
outw(value, 0xCFC + (where&2));
restore_flags(flags);
return PCIBIOS_SUCCESSFUL;
}
static int pci_conf1_write_config_dword (unsigned char bus, unsigned char device_fn,
unsigned char where, unsigned int value)
{
unsigned long flags;
if (where&3) return PCIBIOS_BAD_REGISTER_NUMBER;
save_flags(flags); cli();
outl(CONFIG_CMD(bus,device_fn,where), 0xCF8);
outl(value, 0xCFC);
restore_flags(flags);
return PCIBIOS_SUCCESSFUL;
}
......@@ -282,90 +250,72 @@ static struct pci_access pci_direct_conf1 = {
static int pci_conf2_read_config_byte(unsigned char bus, unsigned char device_fn,
unsigned char where, unsigned char *value)
{
unsigned long flags;
if (device_fn & 0x80)
return PCIBIOS_DEVICE_NOT_FOUND;
save_flags(flags); cli();
outb (FUNC(device_fn), 0xCF8);
outb (bus, 0xCFA);
*value = inb(IOADDR(device_fn,where));
outb (0, 0xCF8);
restore_flags(flags);
return PCIBIOS_SUCCESSFUL;
}
static int pci_conf2_read_config_word (unsigned char bus, unsigned char device_fn,
unsigned char where, unsigned short *value)
{
unsigned long flags;
if (device_fn & 0x80)
return PCIBIOS_DEVICE_NOT_FOUND;
save_flags(flags); cli();
outb (FUNC(device_fn), 0xCF8);
outb (bus, 0xCFA);
*value = inw(IOADDR(device_fn,where));
outb (0, 0xCF8);
restore_flags(flags);
return PCIBIOS_SUCCESSFUL;
}
static int pci_conf2_read_config_dword (unsigned char bus, unsigned char device_fn,
unsigned char where, unsigned int *value)
{
unsigned long flags;
if (device_fn & 0x80)
return PCIBIOS_DEVICE_NOT_FOUND;
save_flags(flags); cli();
outb (FUNC(device_fn), 0xCF8);
outb (bus, 0xCFA);
*value = inl (IOADDR(device_fn,where));
outb (0, 0xCF8);
restore_flags(flags);
return PCIBIOS_SUCCESSFUL;
}
static int pci_conf2_write_config_byte (unsigned char bus, unsigned char device_fn,
unsigned char where, unsigned char value)
{
unsigned long flags;
save_flags(flags); cli();
if (device_fn & 0x80)
return PCIBIOS_DEVICE_NOT_FOUND;
outb (FUNC(device_fn), 0xCF8);
outb (bus, 0xCFA);
outb (value, IOADDR(device_fn,where));
outb (0, 0xCF8);
restore_flags(flags);
return PCIBIOS_SUCCESSFUL;
}
static int pci_conf2_write_config_word (unsigned char bus, unsigned char device_fn,
unsigned char where, unsigned short value)
{
unsigned long flags;
save_flags(flags); cli();
if (device_fn & 0x80)
return PCIBIOS_DEVICE_NOT_FOUND;
outb (FUNC(device_fn), 0xCF8);
outb (bus, 0xCFA);
outw (value, IOADDR(device_fn,where));
outb (0, 0xCF8);
restore_flags(flags);
return PCIBIOS_SUCCESSFUL;
}
static int pci_conf2_write_config_dword (unsigned char bus, unsigned char device_fn,
unsigned char where, unsigned int value)
{
unsigned long flags;
save_flags(flags); cli();
if (device_fn & 0x80)
return PCIBIOS_DEVICE_NOT_FOUND;
outb (FUNC(device_fn), 0xCF8);
outb (bus, 0xCFA);
outl (value, IOADDR(device_fn,where));
outb (0, 0xCF8);
restore_flags(flags);
return PCIBIOS_SUCCESSFUL;
}
......@@ -387,7 +337,7 @@ __initfunc(static struct pci_access *pci_check_direct(void))
unsigned int tmp;
unsigned long flags;
save_flags(flags); cli();
__save_flags(flags); __cli();
/*
* Check if configuration type 1 works.
......@@ -398,7 +348,7 @@ __initfunc(static struct pci_access *pci_check_direct(void))
outl (0x80000000, 0xCF8);
if (inl (0xCF8) == 0x80000000) {
outl (tmp, 0xCF8);
restore_flags(flags);
__restore_flags(flags);
printk("PCI: Using configuration type 1\n");
return &pci_direct_conf1;
}
......@@ -413,13 +363,13 @@ __initfunc(static struct pci_access *pci_check_direct(void))
outb (0x00, 0xCF8);
outb (0x00, 0xCFA);
if (inb (0xCF8) == 0x00 && inb (0xCFA) == 0x00) {
restore_flags(flags);
__restore_flags(flags);
printk("PCI: Using configuration type 2\n");
return &pci_direct_conf2;
}
}
restore_flags(flags);
__restore_flags(flags);
return NULL;
}
......@@ -504,7 +454,7 @@ static unsigned long bios32_service(unsigned long service)
unsigned long entry; /* %edx */
unsigned long flags;
save_flags(flags); cli();
spin_lock_irqsave(&pci_lock, flags);
__asm__("lcall (%%edi)"
: "=a" (return_code),
"=b" (address),
......@@ -513,7 +463,7 @@ static unsigned long bios32_service(unsigned long service)
: "0" (service),
"1" (0),
"D" (&bios32_indirect));
restore_flags(flags);
spin_unlock_irqrestore(&pci_lock, flags);
switch (return_code) {
case 0:
......@@ -542,8 +492,8 @@ __initfunc(static int check_pcibios(void))
if ((pcibios_entry = bios32_service(PCI_SERVICE))) {
pci_indirect.address = pcibios_entry + PAGE_OFFSET;
save_flags(flags); cli();
__asm__ __volatile__(
__save_flags(flags); __cli();
__asm__(
"lcall (%%edi)\n\t"
"jc 1f\n\t"
"xor %%ah, %%ah\n"
......@@ -555,7 +505,7 @@ __initfunc(static int check_pcibios(void))
: "1" (PCIBIOS_PCI_BIOS_PRESENT),
"D" (&pci_indirect)
: "memory");
restore_flags(flags);
__restore_flags(flags);
status = (eax >> 8) & 0xff;
hw_mech = eax & 0xff;
......@@ -589,9 +539,7 @@ static int pci_bios_find_class (unsigned int class_code, unsigned short index,
{
unsigned long bx;
unsigned long ret;
unsigned long flags;
save_flags(flags); cli();
__asm__ ("lcall (%%edi)\n\t"
"jc 1f\n\t"
"xor %%ah, %%ah\n"
......@@ -602,7 +550,6 @@ static int pci_bios_find_class (unsigned int class_code, unsigned short index,
"c" (class_code),
"S" ((int) index),
"D" (&pci_indirect));
restore_flags(flags);
*bus = (bx >> 8) & 0xff;
*device_fn = bx & 0xff;
return (int) (ret & 0xff00) >> 8;
......@@ -615,9 +562,7 @@ __initfunc(static int pci_bios_find_device (unsigned short vendor, unsigned shor
{
unsigned short bx;
unsigned short ret;
unsigned long flags;
save_flags(flags); cli();
__asm__("lcall (%%edi)\n\t"
"jc 1f\n\t"
"xor %%ah, %%ah\n"
......@@ -629,7 +574,6 @@ __initfunc(static int pci_bios_find_device (unsigned short vendor, unsigned shor
"d" (vendor),
"S" ((int) index),
"D" (&pci_indirect));
restore_flags(flags);
*bus = (bx >> 8) & 0xff;
*device_fn = bx & 0xff;
return (int) (ret & 0xff00) >> 8;
......@@ -640,9 +584,7 @@ static int pci_bios_read_config_byte(unsigned char bus,
{
unsigned long ret;
unsigned long bx = (bus << 8) | device_fn;
unsigned long flags;
save_flags(flags); cli();
__asm__("lcall (%%esi)\n\t"
"jc 1f\n\t"
"xor %%ah, %%ah\n"
......@@ -653,7 +595,6 @@ static int pci_bios_read_config_byte(unsigned char bus,
"b" (bx),
"D" ((long) where),
"S" (&pci_indirect));
restore_flags(flags);
return (int) (ret & 0xff00) >> 8;
}
......@@ -662,9 +603,7 @@ static int pci_bios_read_config_word (unsigned char bus,
{
unsigned long ret;
unsigned long bx = (bus << 8) | device_fn;
unsigned long flags;
save_flags(flags); cli();
__asm__("lcall (%%esi)\n\t"
"jc 1f\n\t"
"xor %%ah, %%ah\n"
......@@ -675,7 +614,6 @@ static int pci_bios_read_config_word (unsigned char bus,
"b" (bx),
"D" ((long) where),
"S" (&pci_indirect));
restore_flags(flags);
return (int) (ret & 0xff00) >> 8;
}
......@@ -684,9 +622,7 @@ static int pci_bios_read_config_dword (unsigned char bus,
{
unsigned long ret;
unsigned long bx = (bus << 8) | device_fn;
unsigned long flags;
save_flags(flags); cli();
__asm__("lcall (%%esi)\n\t"
"jc 1f\n\t"
"xor %%ah, %%ah\n"
......@@ -697,7 +633,6 @@ static int pci_bios_read_config_dword (unsigned char bus,
"b" (bx),
"D" ((long) where),
"S" (&pci_indirect));
restore_flags(flags);
return (int) (ret & 0xff00) >> 8;
}
......@@ -706,9 +641,7 @@ static int pci_bios_write_config_byte (unsigned char bus,
{
unsigned long ret;
unsigned long bx = (bus << 8) | device_fn;
unsigned long flags;
save_flags(flags); cli();
__asm__("lcall (%%esi)\n\t"
"jc 1f\n\t"
"xor %%ah, %%ah\n"
......@@ -719,7 +652,6 @@ static int pci_bios_write_config_byte (unsigned char bus,
"b" (bx),
"D" ((long) where),
"S" (&pci_indirect));
restore_flags(flags);
return (int) (ret & 0xff00) >> 8;
}
......@@ -728,9 +660,7 @@ static int pci_bios_write_config_word (unsigned char bus,
{
unsigned long ret;
unsigned long bx = (bus << 8) | device_fn;
unsigned long flags;
save_flags(flags); cli();
__asm__("lcall (%%esi)\n\t"
"jc 1f\n\t"
"xor %%ah, %%ah\n"
......@@ -741,7 +671,6 @@ static int pci_bios_write_config_word (unsigned char bus,
"b" (bx),
"D" ((long) where),
"S" (&pci_indirect));
restore_flags(flags);
return (int) (ret & 0xff00) >> 8;
}
......@@ -750,9 +679,7 @@ static int pci_bios_write_config_dword (unsigned char bus,
{
unsigned long ret;
unsigned long bx = (bus << 8) | device_fn;
unsigned long flags;
save_flags(flags); cli();
__asm__("lcall (%%esi)\n\t"
"jc 1f\n\t"
"xor %%ah, %%ah\n"
......@@ -763,7 +690,6 @@ static int pci_bios_write_config_dword (unsigned char bus,
"b" (bx),
"D" ((long) where),
"S" (&pci_indirect));
restore_flags(flags);
return (int) (ret & 0xff00) >> 8;
}
......@@ -860,8 +786,14 @@ __initfunc(void pcibios_sort(void))
break;
}
}
if (!d)
if (!d) {
printk("PCI: BIOS reporting unknown device %02x:%02x\n", bus, devfn);
/*
* We must not continue scanning as several buggy BIOSes
* return garbage after the last device. Grr.
*/
break;
}
}
if (!idx) {
printk("PCI: Device %02x:%02x not found by BIOS\n",
......
......@@ -16,7 +16,7 @@ else
dep_tristate ' Include IDE/ATAPI TAPE support' CONFIG_BLK_DEV_IDETAPE $CONFIG_BLK_DEV_IDE
dep_tristate ' Include IDE/ATAPI FLOPPY support' CONFIG_BLK_DEV_IDEFLOPPY $CONFIG_BLK_DEV_IDE
dep_tristate ' SCSI emulation support' CONFIG_BLK_DEV_IDESCSI $CONFIG_BLK_DEV_IDE
if [ "$CONFIG_BLK_DEV_IDE" = "y" ]; then
if [ "$CONFIG_BLK_DEV_IDE" != "n" ]; then
bool ' CMD640 chipset bugfix/support' CONFIG_BLK_DEV_CMD640
if [ "$CONFIG_BLK_DEV_CMD640" = "y" ]; then
bool ' CMD640 enhanced support' CONFIG_BLK_DEV_CMD640_ENHANCED
......@@ -48,7 +48,9 @@ else
bool ' QDI QD6580 support' CONFIG_BLK_DEV_QD6580
bool ' UMC-8672 support' CONFIG_BLK_DEV_UMC8672
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
if [ "$CONFIG_BLK_DEV_IDE" = "y" ]; then
bool ' PROMISE DC4030 support (EXPERIMENTAL)' CONFIG_BLK_DEV_PDC4030
fi
fi
fi
fi
......
......@@ -98,85 +98,86 @@ ifeq ($(CONFIG_BLK_DEV_HD),y)
L_OBJS += hd.o
endif
ifeq ($(CONFIG_BLK_DEV_IDE),y)
LX_OBJS += ide.o
ifeq ($(CONFIG_PROC_FS),y)
L_OBJS += ide-proc.o
endif
L_OBJS += ide-probe.o
else
ifeq ($(CONFIG_BLK_DEV_IDE),m)
MIX_OBJS += ide.o
# ide-mod includes ide-proc
M_OBJS += ide-mod.o
MX_OBJS += ide-probe.o
endif
endif
ifeq ($(CONFIG_BLK_DEV_RZ1000),y)
L_OBJS += rz1000.o
IDE_OBJS += rz1000.o
endif
ifeq ($(CONFIG_BLK_DEV_CMD640),y)
L_OBJS += cmd640.o
IDE_OBJS += cmd640.o
endif
ifeq ($(CONFIG_BLK_DEV_IDEPCI),y)
L_OBJS += ide-pci.o
IDE_OBJS += ide-pci.o
endif
ifeq ($(CONFIG_BLK_DEV_IDEDMA),y)
L_OBJS += ide-dma.o
endif
ifeq ($(CONFIG_BLK_DEV_PS2),y)
L_OBJS += ps2esdi.o
IDE_OBJS += ide-dma.o
endif
ifeq ($(CONFIG_BLK_DEV_DTC2278),y)
L_OBJS += dtc2278.o
IDE_OBJS += dtc2278.o
endif
ifeq ($(CONFIG_BLK_DEV_HT6560B),y)
L_OBJS += ht6560b.o
IDE_OBJS += ht6560b.o
endif
ifeq ($(CONFIG_BLK_DEV_QD6580),y)
L_OBJS += qd6580.o
IDE_OBJS += qd6580.o
endif
ifeq ($(CONFIG_BLK_DEV_UMC8672),y)
L_OBJS += umc8672.o
IDE_OBJS += umc8672.o
endif
ifeq ($(CONFIG_BLK_DEV_ALI14XX),y)
L_OBJS += ali14xx.o
IDE_OBJS += ali14xx.o
endif
ifeq ($(CONFIG_BLK_DEV_PDC4030),y)
L_OBJS += pdc4030.o
IDE_OBJS += pdc4030.o
endif
ifeq ($(CONFIG_BLK_DEV_TRM290),y)
L_OBJS += trm290.o
IDE_OBJS += trm290.o
endif
ifeq ($(CONFIG_BLK_DEV_OPTI621),y)
L_OBJS += opti621.o
IDE_OBJS += opti621.o
endif
ifeq ($(CONFIG_BLK_DEV_NS87415),y)
L_OBJS += ns87415.o
IDE_OBJS += ns87415.o
endif
ifeq ($(CONFIG_BLK_DEV_CMD646),y)
L_OBJS += cmd646.o
IDE_OBJS += cmd646.o
endif
ifeq ($(CONFIG_BLK_DEV_SL82C105),y)
L_OBJS += sl82c105.o
IDE_OBJS += sl82c105.o
endif
### if CONFIG_BLK_DEV_IDE is n, IDE_OBJS will be ignored
ifeq ($(CONFIG_PROC_FS),y)
IDE_OBJS += ide-proc.o
endif
###Collect
ifeq ($(CONFIG_BLK_DEV_IDE),y)
LX_OBJS += ide.o
L_OBJS += ide-probe.o $(IDE_OBJS)
else
ifeq ($(CONFIG_BLK_DEV_IDE),m)
MIX_OBJS += ide.o $(IDE_OBJS)
M_OBJS += ide-mod.o ide-probe.o
endif
endif
############
ifeq ($(CONFIG_BLK_DEV_IDEDISK),y)
L_OBJS += ide-disk.o
else
......@@ -209,6 +210,10 @@ else
endif
endif
ifeq ($(CONFIG_BLK_DEV_PS2),y)
L_OBJS += ps2esdi.o
endif
ifeq ($(CONFIG_BLK_DEV_XD),y)
L_OBJS += xd.o
else
......@@ -273,5 +278,5 @@ endif
include $(TOPDIR)/Rules.make
ide-mod.o: ide.o ide-proc.o
$(LD) $(LD_RFLAG) -r -o $@ ide.o ide-proc.o
ide-mod.o: ide.o $(IDE_OBJS)
$(LD) $(LD_RFLAG) -r -o $@ ide.o $(IDE_OBJS)
/*
* linux/drivers/block/ide.c Version 6.13 March 29, 1998
* linux/drivers/block/ide.c Version 6.17 March 29, 1998
*
* Copyright (C) 1994-1998 Linus Torvalds & authors (see below)
*/
......@@ -88,6 +88,7 @@
* Version 6.14 fixed IRQ sharing among PCI devices
* Version 6.15 added SMP awareness to IDE drivers
* Version 6.16 fixed various bugs; even more SMP friendly
* Version 6.17 fix for newest EZ-Drive problem
*
* Some additional driver compile-time options are in ide.h
*
......@@ -2560,7 +2561,7 @@ int ide_xlate_1024 (kdev_t i_rdev, int xparm, const char *msg)
printk("%s ", msg);
if (xparm == -1 && drive->bios_cyl < 1024)
if (xparm == -1 && (drive->bios_cyl * drive->bios_head * drive->bios_sect) < (1024 * 16 * 63))
return 0; /* small disk: no translation needed */
if (drive->id) {
......
......@@ -74,9 +74,9 @@
* BUSY _________ _______
* |____________|
*
* I discovered this using the printer scanner:
* I discovered this using the printer scanner that you can find at:
*
* http://www.cs.unibo.it/~arcangel/pscan/pscan-0.4.tar.gz
* ftp://e-mind.com/pub/linux/pscan/
*
* 11 May 98, Andrea Arcangeli
*/
......@@ -326,8 +326,7 @@ static int lp_write_buf(unsigned int minor, const char *buf, int count)
lp_table[minor].irq_detected = 0;
lp_table[minor].irq_missed = 0;
if (!LP_POLLED(minor))
w_ctr(minor, LP_PSELECP | LP_PINITP | LP_PINTEN);
w_ctr(minor, LP_PSELECP | LP_PINITP);
do {
bytes_written = 0;
......@@ -335,7 +334,7 @@ static int lp_write_buf(unsigned int minor, const char *buf, int count)
if (copy_from_user(lp->lp_buffer, buf, copy_size))
{
w_ctr(minor, LP_PINITP);
w_ctr(minor, LP_PSELECP | LP_PINITP);
return -EFAULT;
}
......@@ -357,7 +356,7 @@ static int lp_write_buf(unsigned int minor, const char *buf, int count)
if (signal_pending(current))
{
w_ctr(minor, LP_PINITP);
w_ctr(minor, LP_PSELECP | LP_PINITP);
if (total_bytes_written + bytes_written)
return total_bytes_written + bytes_written;
else
......@@ -370,7 +369,7 @@ static int lp_write_buf(unsigned int minor, const char *buf, int count)
if (lp_check_status(minor))
{
w_ctr(minor, LP_PINITP);
w_ctr(minor, LP_PSELECP | LP_PINITP);
return rc ? rc : -EIO;
}
......@@ -414,7 +413,7 @@ static int lp_write_buf(unsigned int minor, const char *buf, int count)
} while (count > 0);
w_ctr(minor, LP_PINITP);
w_ctr(minor, LP_PSELECP | LP_PINITP);
return total_bytes_written;
}
......
......@@ -62,7 +62,7 @@
* ever possible.
*/
#define SERIAL_PARANOIA_CHECK
#undef SERIAL_PARANOIA_CHECK
#define CONFIG_SERIAL_NOPAUSE_IO
#define SERIAL_DO_RESTART
......@@ -1661,11 +1661,15 @@ static int set_serial_info(struct async_struct * info,
if ((new_serial.irq >= NR_IRQS) || (new_serial.port > 0xffff) ||
(new_serial.type < PORT_UNKNOWN) ||
(new_serial.type > PORT_MAX) ||
(new_serial.xmit_fifo_size == 0)) {
(new_serial.type > PORT_MAX)) {
return -EINVAL;
}
if ((new_serial.type != state->type) ||
(new_serial.xmit_fifo_size <= 0))
new_serial.xmit_fifo_size =
uart_config[state->type].dfl_xmit_fifo_size;
/* Make sure address is not already in use */
if (new_serial.type) {
for (i = 0 ; i < NR_PORTS; i++)
......@@ -1714,9 +1718,6 @@ static int set_serial_info(struct async_struct * info,
check_and_exit:
if (!state->port || !state->type)
return 0;
if (state->type != old_state.type)
info->xmit_fifo_size = state->xmit_fifo_size =
uart_config[state->type].dfl_xmit_fifo_size;
if (state->flags & ASYNC_INITIALIZED) {
if (((old_state.flags & ASYNC_SPD_MASK) !=
(state->flags & ASYNC_SPD_MASK)) ||
......@@ -2566,12 +2567,15 @@ static int rs_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) || (line >= NR_PORTS))
return -ENODEV;
retval = get_async_struct(line, &info);
if (retval)
return retval;
tty->driver_data = info;
info->tty = tty;
if (serial_paranoia_check(info, tty->device, "rs_open"))
return -ENODEV;
......@@ -2579,8 +2583,6 @@ static int rs_open(struct tty_struct *tty, struct file * filp)
printk("rs_open %s%d, count = %d\n", tty->driver.name, info->line,
info->state->count);
#endif
tty->driver_data = info;
info->tty = tty;
info->tty->low_latency = (info->flags & ASYNC_LOW_LATENCY) ? 1 : 0;
if (!tmp_buf) {
......@@ -2615,7 +2617,6 @@ static int rs_open(struct tty_struct *tty, struct file * filp)
if (retval)
return retval;
MOD_INC_USE_COUNT;
retval = block_til_ready(tty, filp, info);
if (retval) {
#ifdef SERIAL_DEBUG_OPEN
......
Fri Jan 2 18:00 1998 Gerard Roudier (groudier@club-internet.fr)
* Revision 2.5f
Sun Jun 28 12:00 1998 Gerard Roudier (groudier@club-internet.fr)
* revision 3.0e
- Some cleanup, spelling fixes, version checks, documentations
changes, etc ...
Sat Jun 20 20:00 1998 Gerard Roudier (groudier@club-internet.fr)
* revision 3.0c
- Add a boot setup option that allows to set up device queue depths
at boot-up. This option is very usefull since Linux does not
allow to change scsi device queue depth once the system has been
booted up.
Sun Jun 15 23:00 1998 Gerard Roudier (groudier@club-internet.fr)
* revision 3.0a
- Support for up to 64 TAGS per LUN.
- Rewrite the TARGET vs LUN capabilities management.
CmdQueue is now handled as a LUN capability as it shall be.
This also fixes a bug triggered when disabling tagged command
queuing for a device that had this feature enabled.
- Remove the ncr_opennings() stuff that was useless under Linux
and hard to understand to me.
- Add "setverbose" procfs driver command. It allows to tune
verbose level after boot-up. Setting this level to zero, for
example avoid flooding the syslog file.
- Add KERN_XXX to some printk's.
Tue Jun 10 23:00 1998 Gerard Roudier (groudier@club-internet.fr)
* revision 3.0
- Linux config changes for 2.0.34:
Remove NVRAM detection config option. This option is now enabled
by default but can be disabled by editing the driver header file.
Add a PROFILE config option.
- Update Configure.help
- Add calls to new function mdelay() for milli-seconds delay if
kernel version >= 2.1.105.
- Replace all printf(s) by printk(s). After all, the ncr53c8xx is
a driver for Linux.
- Perform auto-sense on COMMAND TERMINATED. Not sure it is usefull.
- Some other minor changes.
Tue Jun 4 23:00 1998 Gerard Roudier (groudier@club-internet.fr)
* revision 2.6n
- Code cleanup and simplification:
Remove kernel 1.2.X and 1.3.X support.
Remove the _old_ target capabilities table.
Remove the error recovery code that have'nt been really usefull.
Use a single alignment boundary (CACHE_LINE_SIZE) for data
structures.
- Several aggressive SCRIPTS optimizations and changes:
Reselect SCRIPTS code rewritten.
Support for selection/reselection without ATN.
And some others.
- Miscallaneous changes in the C code:
Count actual number of CCB queued to the controller (future use).
Lots of other minor changes.
Wed May 13 20:00 1998 Gerard Roudier (groudier@club-internet.fr)
* revision 2.6m
- Problem of missed SCSI bus reset with the 53C895 fixed by
Richard Waltham. The 53C895 needs about 650 us for the bus
mode to settle. Delays used while resetting the controller
and the bus have been adjusted. Thanks Richard!
- Some simplification for 64 bit arch done ccb address testing.
- Add a check of the MSG_OUT phase after Selection with ATN.
- The new tagged queue stuff seems ok, so some informationnal
message have been conditionned by verbose >= 3.
- Donnot reset if a SBMC interrupt reports the same bus mode.
- Print out the whole driver set-up. Some options were missing and
the print statement was misplaced for modules.
- Ignore a SCSI parity interrupt if the chip is not connected to
the SCSI bus.
Sat May 1 16:00 1998 Gerard Roudier (groudier@club-internet.fr)
* revision 2.6l
- Add CCB done queue support for Alpha and perhaps some other
architectures.
- Add some barriers to enforce memory ordering for x86 and
Alpha architectures.
- Fix something that looks like an old bug in the nego SIR
interrupt code in case of negotiation failure.
Sat Apr 25 21:00 1998 Gerard Roudier (groudier@club-internet.fr)
* revision 2.6k
- Remove all accesses to the on-chip RAM from the C code:
Use SCRIPTS to load the on-chip RAM.
Use SCRIPTS to repair the start queue on selection timeout.
Use the copy of script in main memory to calculate the chip
context on phase mismatch.
- The above allows now to use the on-chip RAM without requiring
to get access to the on-chip RAM from the C code. This makes
on-chip RAM useable for linux-1.2.13 and for Linux-Alpha for
instance.
- Some simplifications and cleanups in the SCRIPTS and C code.
- Buglet fixed in parity error recovery SCRIPTS (never tested).
- Minor updates in README.ncr53c8xx.
Wed Apr 15 21:00 1998 Gerard Roudier (groudier@club-internet.fr)
* revision 2.6j
- Incorporate changes from linux-2.1.95 ncr53c8xx driver version.
- Add SMP support for linux-2.1.95 and above.
- Fix a bug when QUEUE FULL is returned and no commands are
disconnected. This happens with Atlas I / L912 and may happen
with Atlas II / LXY4.
- Nail another one on CHECK condition when requeuing the command
for auto-sense.
- Call scsi_done() for all completed commands after interrupt
handling.
- Increase the done queue to 24 entries.
Sat Apr 4 20:00 1998 Gerard Roudier (groudier@club-internet.fr)
* revision 2.6i
- CTEST0 is used by the 53C885 for Power Management and
priority setting between the 2 functions.
Use SDID instead as actual target number. Just have had to
overwrite it with SSID on reselection.
- Split DATA_IN and DATA_OUT scripts into 2 sub-scripts.
64 segments are moved from on-chip RAM scripts.
If more segments, a script in main memory is used for the
additionnal segments.
- Since the SCRIPTS processor continues SCRIPTS execution after
having won arbitration, do some stuff prior to testing any SCSI
phase on reselection. This should have the vertue to process
scripts in parallel with the SCSI core performing selection.
- Increase the done queue to 12 entries.
Sun Mar 29 12:00 1998 Gerard Roudier (groudier@club-internet.fr)
* revision 2.6h
- Some fixes.
Tue Mar 26 23:00 1998 Gerard Roudier (groudier@club-internet.fr)
* revision 2.6g
- New done queue. 8 entries by default (6 always useable).
Can be increased if needed.
- Resources management using doubly linked queues.
- New auto-sense and QUEUE FULL handling that does not need to
stall the NCR queue any more.
- New CCB starvation avoiding algorithm.
- Prepare CCBs for SCSI commands that cannot be queued, instead of
inserting these commands into the waiting list. The waiting list
is now only used while resetting and when memory for CCBs is not
yet available?
Sun Feb 8 22:00 1998 Gerard Roudier (groudier@club-internet.fr)
* revision 2.6f
- Some fixes in order to really support the 53C895, at least with
FAST-20 devices.
- Heavy changes in the target/lun resources management to allow
the scripts to jump directly to the CCB on reselection instead
of walking on the lun CCBs list. Up to 32 tags per lun are now
supported without script processor and PCI traffic overhead.
Sun Jan 11 22:00 1998 Gerard Roudier (groudier@club-internet.fr)
* revision 2.6d
- new (different ?) implementation of the start queue:
Use a simple CALL to a launch script in the CCB.
- implement a minimal done queue (1 entry :-) ).
this avoid scanning all CCBs on INT FLY (Only scan all CCBs, on
overflow). Hit ratio is better than 99.9 % on my system, so no
need to have a larger done queue.
- generalization of the restart of CCB on special condition as
Abort, QUEUE FULL, CHECK CONDITION.
This has been called 'silly scheduler'.
- make all the profiling code conditionned by a config option.
This spare some PCI traffic and C code when this feature is not
needed.
- handle more cleanly the situation where direction is unknown.
The pointers patching is now performed by the SCRIPTS processor.
- remove some useless scripts instructions.
Ported from driver 2.5 series:
------------------------------
- Use FAST-5 instead of SLOW for slow scsi devices according to
new SPI-2 draft.
- Make some changes in order to accomodate with 875 rev <= 3
......@@ -10,1136 +179,13 @@ Fri Jan 2 18:00 1998 Gerard Roudier (groudier@club-internet.fr)
. Memory Read Line is not enabled for 875 and 875-like chips.
. Programmed burst length set to 64 DWORDS (instead of 128).
(Note: SYMBIOS uses 32 DWORDS for the SDMS BIOS)
Sun Oct 26 12:00 1997 Gerard Roudier (groudier@club-internet.fr)
* revision 2.5e
- Add 'buschk' boot option.
This option enables checking of SCSI BUS data lines after SCSI
RESET (set by default). (Submitted by Richard Waltham).
- Update the README file.
Sat Oct 4 18:00 1997 Gerard Roudier (groudier@club-internet.fr)
* revision 2.5d
- Dispatch CONDITION MET and RESERVATION CONFLICT scsi status
as OK driver status.
- Update the README file and the Symbios NVRAM format definition
with removable media flags values (available with SDMS 4.09).
Sat Sep 20 21:00 1997 Gerard Roudier (groudier@club-internet.fr)
* revision 2.5c
- Several PCI configuration registers fix-ups for powerpc.
(Patch sent by Cort).
Thu Aug 28 10:00 1997 Gerard Roudier (groudier@club-internet.fr)
* revision 2.5b
- Add 'ncr53c8xx' char pointer variable. This variable allows to
pass a boot command to the driver when it is loaded as a module.
Option separator is ' ' instead of ','. Example:
insmod <mod_path>/ncr53c8xx.o ncr53c8xx='verb:2 sync:0 specf:n'
- Always use 'driver_setup.settle_delay' for internal resets.
2 seconds hardcoded is sometimes too short. Suggested by Richard W.
This delay may be shortenned in order to avoid spurious timeouts.
- Fix release module stuff that failed for more than 1 controller.
- For linux versions > 1.3.70, trust the 'dev_id' parameter passed
to the interrupt handler (dev_id = struct ncb *).
- Fix up in 'ncr_log_hard_error()' when the DSP points outside scripts.
Suggested by Stefan Esser.
Tue Aug 23 23:43 1997 Gerard Roudier (groudier@club-internet.fr)
* revision 2.5a
- Update Configure.help for inclusion in linux-2.1.51/2/3
- Use BASE_2 address from PCI config space instead of some
IO register for getting the on-board SRAM bus address.
- Remove error testing of pcibios_read/write functions.
These functions are intended to be used for successfully
detected PCI devices. Expecting error condition from them
is nothing but paranoia.
Thu Aug 21 23:00 1997 Gerard Roudier (groudier@club-internet.fr)
* revision 2.5
- 53C860 chip support fix.
- Move the 'host_status' to the last DWORD of the CCB header.
This header is copied back by the script processor. This
guarantees that the header is entirely copied back over
the PCI when the CPU completes a CCB.
- (re)read ISTAT prior to scanning CCBs for completion. This
ensure that any posted buffer are flushed prior CCBs scan.
- Support for BIG ENDIAN cpu. Added by Cort <cort@cs.nmt.edu>.
Initial patch did'nt support disconnections and tagged commands.
I've completed the patch and it seems that all is ok now.
Only some powerpc under 2.1.X is supported for the moment.
- Misc. trivial fixes and cleanups.
Sat July 26 18:00 1997 Gerard Roudier (groudier@club-internet.fr)
* revision 2.4
Several clean-ups:
- Asynchronous pre-scaler calculation.
Synchronous divisor calculation.
- Use FE_ as feature identifier prefix instead of _F_.
- Change 'ns_sync' identifier to "minsync".
- Some others.
Apply some SPI2-R12 recommendations.
- Use Slow, Fast-10, Fast-20, Fast-40 SCSI instead of SCSI-2,
FAST SCSI-2, ULTRA, ULTRA-2.
- Reset the SCSI on bus mode change.
Wed July 02 22:58 1997 Gerard Roudier (groudier@club-internet.fr)
* revision 2.3c
- Add define SCSI_NCR_PCI_FIX_UP_SUPPORT for conditionnal compilation
of the corresponding pci fix-up code when a small driver is needed.
- Use "ncr53c8xx" as driver name for both request_irq() and
request_region(). Using different names confused 'lsdev'.
(Suggestion sent by Henrik Storner).
Wed June 24 22:08 1997 Gerard Roudier (groudier@club-internet.fr)
* revision 2.3b
- Print an error message on unexpected boot command line option.
- Switch to asynchronous data transfer mode after SCSI wide
negotiation.
Wed June 14 22:00 1997 Gerard Roudier (groudier@club-internet.fr)
* revision 2.3a
- Add PCI LATENCY TIMER fixup code.
Increase it if necessary according to burst size.
Boot option bit : 'pcifix:4'
- On phase mismatch, calculate residual data size for all OUTPUT
phases. That's only required for interrupted DATA OUT phase, but
this information is usefull for problem solving.
- Add KERN_INFO to some messages printed to the log.
(Patch sent by Wolfram Kleff).
Tue June 02 22:30 1997 Gerard Roudier (groudier@club-internet.fr)
* revision 2.3
- NvRAM support code slightly improved (I think):
Use IO or MMIO according to driver setup for reading the NvRAM.
Use structures for NvRAM data instead of raw data.
- Prevent from queuing more than 1 command to the scsi SCRIPT with
negotiation attached when tagged command queueing is enabled.
- Fix-up for old 53C8XX chips that support PCI READ LINE but not
CACHE LINE SIZE. If the cache line size is unknown, set burst
to 8 dwords and disable READ LINE, otherwise set burst max to
the cache line size value.
Sat May 24 12:30 1997 Gerard Roudier (groudier@club-internet.fr)
* revision 2.2c (for linux-2.1.40)
- Remove reference to 'x86' symbol when MODULE is defined, since this
symbol is not exported for module loading.
The value of 'x86' is used for fixing up the PCI CACHE LINE SIZE
configuration register.
- Bytes/words read one bit at a time from the serial NVRAM were'nt
initialized with zero.
- Some comments added. Minor cosmetic changes.
Mon May 19 20:30 1997 Gerard Roudier (groudier@club-internet.fr)
* revision 2.2b
- Patch for NVRAM support by Richard Waltham applied.
The code detects Symbios NVRAM format and Tekram NVRAM format.
This enhancement allows to get hosts and devices user set up
from the NVRAM.
- Use the NVRAM contents when present to initialize user definable
target parameters.
- Update the README file.
Sun May 11 22:30 1997 Gerard Roudier (groudier@club-internet.fr)
* revision 2.1b
- Cosmetic changes.
- Some heavy testings under pre-linux-2.1.37-6
Sun May 4 22:30 1997 Gerard Roudier (groudier@club-internet.fr)
* revision 2.1a
- PFEN wrongly used for PREFETCH feature bit testing.
Changed to _F_PFEN.
- 2 SCR_COPY that need NO FLUSH bit to be removed had been missed
in tp->getscr[] script (loads SXFER and SCNTL3 on reselection).
Sat May 3 22:30 1997 Gerard Roudier (groudier@club-internet.fr)
* revision 2.1
- Use the NO FLUSH option for MOVE MEMORY (COPY) each time it is
possible. More than 100 COPY with NO FLUSH and 6 with FLUSH for
my configuration (max queued command / device = 8).
This option bit is removed from the script instance for chips
that donnot support prefetching.
- Rewrite the ncr_exception() routine more simple (I think) and
remove useless code.
- Change the data_in and data_out script management.
Use the bottom part of these scripts instead of the beginning.
That avoids to zero the scatter/gather array when a command is
queued (1k) and to deal with some weird IID on MOVE 0 bytes when
a target wants to transfer more bytes than expected.
- Misc. improvements in the init code.
- Remove IOMAPPED/MMIO automatic switching option.
Was useless and reported not reliable.
- Fix a double read of DSTAT and remove DFE testing in the
Phase mismatch service routine.
- Etc...
Fri Apr 26 20:00 1997 Gerard Roudier (groudier@club-internet.fr)
* revision 2.0a
- Add support if the Diamond FirePort 40 (SYM53C875J chip)
Mon Apr 22 22:00 1997 Gerard Roudier (groudier@club-internet.fr)
* revision 2.0
- incorporate __initdata and __initfunc directives in order to
allow 'init' to free unused memory after driver initialisations.
Patch sent by Roberto Fichera.
- rewrite the init code of the driver. Now a feature descriptor
is used for each real chip types. The code is a lot more clean,
since the driver uses device and revision ids only in the
detection procedure.
- add 'pcifix' boot command line. This command allows to fix up PCI
config space for new chips which support features based on the
cache line size and 'write and invalidate'.
- incorporate in the driver, the code used for error recovery
testing. This code is normally not compiled; have to define
SCSI_NCR_DEBUG_ERROR_RECOVERY in order to compile it.
- take into account actual SCSI bus mode for 53C895 LVD/SE controller.
In single ended mode only fast20 is supported.
(Just to not be late since such controllers are not yet available)
Sat Apr 20 21:00 1997 Gerard Roudier (groudier@club-internet.fr)
* revision 1.18f
- fix an old bug included in the initial port (version 0.0).
The driver allocated 10 bytes of static data and uses 12 bytes.
No danger, since data are generally aligned on 4 bytes boundary
and so byte 10 and 11 are free (I hope ...)
Wed Apr 16 12:00 1997 Gerard Roudier (groudier@club-internet.fr)
* revision 1.18e
- reset all when an unexpected data cycle is detected while
disconnecting.
- make changes to abort() ans reset() functions according to
Leonard's documentation.
- small fix in some message for hard errors.
Sat Apr 5 13:00 1997 Gerard Roudier (groudier@club-internet.fr)
* revision 1.18d
- Probe NCR pci device ids in reverse order if asked by user from
the boot command line. Suggested by Richard Waltham.
- Make a separate function that prints out verbose information on
severe error (assumed from hardware).
- Add the transfer period factor and the max commands per lun value
to the proc info data. If debug flags are set or verbosity is
greater than 1, debug flags and verbosity are returned in proc
info data.
- Update the documentation.
Thu Mar 20 23:00 1997 Gerard Roudier (groudier@club-internet.fr)
* revision 1.18c
- Add special features support for NCR53C885 and NCR53C896 chip.
Quite obvious, but untested, and based on the fact that:
The 885 supports same features as the 875.
The 896 is a 64 bits PCI version of the 895.
- Improve recovery from SCSI GROSS ERRORS.
I can get such errors by making the driver negotiate offset 8 with
a disk and setting the ncr chip to a lower offset value.
I got bunches of errors that have been gracefully recovered by
the driver.
The driver now uses its timer handler in order to wait 2 sec. for
devices to settle after SCSI reset and so does not uselessly freeze
the system with interrupt masked for seconds.
- Enable 'burst op code fetch' and 'read line' for 815 chips.
- Use a 2 commands queue depth instead of 1 for devices that does
not support tagged command queuing.
- The ULTRA timing flag setting was based on the output resulting
period factor of the ncr and not on the negotiated one.
This flag setting was wrong only for 24 ns negotiated period factor.
- Some other minor changes and cleanups.
Thu Feb 27 23:00 1997 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.c ncr53c8xx.h revision 1.18b
- 'On paper' support of the NCR53C895 Ultra-2 chip.
(Clock quadrupler + 7 clock divisors)
- Load the main part of the script into the on-board RAM.
- 810A rev. 0x11 PCI problem fixed.
This chip is now supported with all PCI features enabled and
16 dwords burst transfers.
- Align on 32 boundary some internal structures.
That fixes the 810A problem and allows cache line bursting when
moving the global header (64 bytes) from/to CCBs to/from NCB.
- Synchronous parameters calculation rewritten. The driver
now uses all available clock divisors and will be able to support
clock frequencies that are not multiple of 40 Mhz if necessary.
Sat Feb 8 22:00 1997 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.c - revision 1.17a
- IRQ mode set up from boot setup command.
irqm:0 open drain (default)
irqm:1 preserve initial setting (assumed from BIOS)
irqm:2 totem pole
- DIFF mode set up from boot setup command.
Suggested by Richard Waltham.
diff:0 never set up diff mode (default)
diff:1 set up diff mode according to initial setting (BIOS?)
diff:2 always set up diff mode
diff:3 set up diff mode if GPIO3 is zero (SYMBIOS boards)
- Change CONFIG option for LED support.
CONFIG_SCSI_NCR53C8XX_SYMBIOS_COMPAT allows LED support and
DIFF support for SYMBIOS boards and compatibles (clones?).
- Set 16 DWORD bursts for 810A rev. >= 0x12 since my SC200 with
such a chip have no problem with it (MB with Triton 2 HX).
810A rev. 0x11 are set to 8 DWORD bursts since they may give
problems with PCI read multiple and Triton 2 HX.
Thanks to Stefan for this information.
Sat Jan 25 22:00 1997 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.c - revision 1.17
- Controller LED support.
Only works with LED pin wired to GPIO_FETCHN, so probably with
all boards using SMDS BIOS.
This option can be enabled only if CONFIG_EXPERIMENTAL is set.
- Assume clock doubler for 875 chip when clock frequency measurement
result is 40 MHz. May help when some old stuff as SDMS BIOS 3.0
or some old driver has broken the normal BIOS settings.
- Add wide negotiation control from boot setup command.
May be usefull with systems using a 875 based board connected to
a wide device through a 50 pins to 68 pins converter.
- Add a "boot fail safe option" to the boot setup command line.
- Rewrite the "reset_command" routine.
Low-level driver are responsible to keep the involved command
alive. The new code seems to behave correctly.
- Change some variables used by the script from u_long to u_int32.
- Remove some useless code.
Sun Jan 12 12:00 1997 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.c - revision 1.16e
- Add support of PCI burst length control from boot setup command.
burst:0 disable burst
burst:255 get burst from initial settings (BIOS settings?)
burst:#x set burst transfers to 1<<#x
- Only check xfer direction for common op-codes.
For all device specific / vendor specific opcodes the driver
now uses the xfer direction decided by the target.
Sun Jan 05 12:00 1997 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.c - revision 1.16d
- The driver is now able to process scsi commands without
knowledge of xfer data direction.
Stefan agreed with this change for Linux. This change is
not needed under FreeBSD since low-level drivers receive
the expected data direction for each scsi request.
- Save ctest5 features bits at start-up and restore them at
module release step.
Avoid side effects when a ncr driver which trusts bios
settings is reloaded (could be the ncr53c8xx itself).
Wed Jan 01 23:30 1997 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.c - revision 1.16c
- Bad decision about 20MHz for 13 ns period factor.
Was wrong, so I restore the previous algorithm.
- Burst length 128 not correctly set in dmode.
Thu Dec 26 22:00 1996 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.c ncr53c8xx.h README.ncr53c8xx - revision 1.16b
- Remove useless code.
- Try to improve error recovery in case of abort and reset.
- Remove DEBUG_NEGO by default.
- Add boot setup command support.
Now, all experimental config options can be removed.
- Update README file.
Mon Dec 23 23:00 1996 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.c ncr53c8xx.h - revision 1.16a
New display for speed ##.# MB/s (From Stefan)
- I add "WIDE" qualifier after ULTRA and FAST
- I get "FAST WIDE SCSI-2 20 MB/s" with my Atlas. That's nice.
Richard Waltham reports SYMBIOS set the 875 to 20 MB/s for 13 ns
period factor. I decide to trust SYMBIOS. 20 MB/s output speed
instead of 19.2 MB/s should not cause problem. The ncr is only able
to use 16.67 MB/s when 20 MB/s is not possible.
Fix from Markus Kossman: "Ultra SCSI enabled" wrongly printed
when not enabled.
Set DEBUG_NEGO by default in order to get reports about sync nego.
Will remove it in the next patch.
Thu Dec 19 21:00 1996 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.c ncr53c8xx.h README.ncr53c8xx - revision 1.16
Incorporate new definitions in ncr53c8xx.h (From Stefan).
Check changes against Stefan's current version of the driver.
All seems ok.
Sat Nov 30 21:00 1996 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.c ncr53c8xx.h
Make changes in order to support:
- Clock doubler and so 80 Mhz scsi clock for 875 chips.
- Sync transfers below 7.5 MB/sec.
Use Clock/2 between 5 and 10 Mega-transfers/s and Clock/4 below 5.
- Ultra SCSI data transfers.
- Offset 16.
Works with my configuration. However I cannot test Ultra transfers,
since my disks are only fast scsi-2.
Tue Nov 28 21:00 1996 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.c
I received yesterday my Promise SCSI Ultra board.
NCR53C875 rev. 3 with clock doubler.
Add the code to support some bus features, the large 536 dma fifo and
burst 128. Works.
Mon Nov 4 21:00 1996 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.c ncr53c8xx.h - revision 1.14c
Severall control command improvements:
- Allow to specify "all" to commands that apply to #target.
For example: "setsync all 255" sets asynchronous data
transfers for all targets on a bus.
- Allow to control disconnection privilege per device, as follow:
"setflag #target no_sync" disables disconnection for #target.
"setflag #target" with no flag specified reenables it.
Obviously #target may be specified as "all" in order to control
disconnection for all targets with a single control command.
- README file updated and some hints about SCSI problems solving added.
Sun Oct 27 22:00 1996 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.c ncr53c8xx.h - revision 1.14b
Add the following config parameters:
- CONFIG_SCSI_NCR53C8XX_MAX_TAGS
Max number of queued tagged commands.
Allow from 2 to 12, default 4.
- CONFIG_SCSI_NCR53C8XX_SYNC
Synchronous transfers frequency in MHz.
Allow from 5 to 10, default 5, 0 means asynchronous.
(And so remove CONFIG_SCSI_NCR53C8XX_FORCE_ASYNCHRONOUS)
Sun Oct 20 16:00 1996 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.c
ncr_scatter() rewritten.
remove "ncr dead" detection.
Sun Oct 13 19:00 1996 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.c ncr53c8xx.h - revision 1.14a
Enabling some special features makes problems with some hardware.
So, disable them by default.
Add SCSI_NCR_SPECIAL_FEATURES define to play with.
Sun Oct 13 14:00 1996 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.c ncr53c8xx.h
Incorporate Stefan's patch for clock frequency detection.
(Committed in FreeBSD/ncr.c rev. 1.81).
The driver then does about the following:
Assume 40 MHz clock for all ncr chips except:
- NCR53C860 chips:
Assume 80 Mhz clock.
- NCR53C875 chips:
If clock doubler enabled, disable it and assume 40 Mhz clock.
Else if (scntl3&7)=0 measure scsi clock frequency.
Else trust bios setting of scntl3&7 (3=40 Mhz, 5=80Mhz).
Wed Oct 9 22:00 1996 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.c - release 1.14
For now, just change the clock detection as follow:
- If clock doubler selected by BIOS, assume 40 MHz clock since
clock doubler will be disabled by chip reset.
- Else if NCR53C860 assume 80 MHz clock.
- Else trust BIOS setting if (scntl3&7 >= 3)
- Else assume 40 MHz clock.
Sat Oct 05 17:00 1996 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.c
Stefan sent me a patch that improves the clock frequency detection
of the driver. Stefan uses the general timer register stime1 in
order to measure as accurately as possible the scsi clock.
Works ok with my 825, but needs still testing. So will be
released later.
Sun Sep 29 17:00 1996 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.c
Preserve dcntl/dmode/ctest3/ctest4 features bits at start-up.
Add the define option SCSI_NCR_TRUST_BIOS_SETTING.
- If this option is defined, the driver will preserve the
corresponding bits of io registers.
- Else, the driver will set features bits according to chip
and revision ids.
Sun Sep 22 17:00 1996 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.c
Remove useless fields and code and so spare cpu:
- profile data are accumulated in jiffies ticks and converted
to milli-seconds when read through proc fs.
- when IOMAPPED is not defined, try only MMIO.
(avoid testing a value in order to choose between IO and MMIO)
Sun Sep 01 20:00 1996 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.h, ncr53c8xx.c - Version 1.13
Adaptation of the tagged command queuing depth control of the
FreeBSD driver to Linux. Now, tagged command queueing can be
disabled at run time by a "settags N 0" control command.
Add the following heuristic in order to manage intelligently (perhaps)
QUEUE_FULL status:
- Each time a QUEUE FULL status is returned by a device, disable tagged
command queuing for that device.
- Every 100 successfully complete commands, increment the maximum
queuable commands (up to the allowed limit).
Fri Aug 30 10:00 1996 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.c - Version 1.12c
Incorporate the changes of FreeBSD/ncr.c revision 1.76.
The changes add support for the 53c860 and 53c875,
but without taking advantage of the new features.
Those chips are used exactly as the old 53c810.
Sun Jul 21 00:00 1996 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.c, README.ncr53c8xx
Add the ncr53c8xx_select_queue_depths() function.
Set queue_depth to SCSI_NCR_MAX_TAGS (4 by default) for devices that
support tagged command queueing.
For other devices, set queue_depth to 1. No need to queue a command
to the driver if this command cannot be sent to the device.
Each time the driver hide io requests from the kernel and/or from the
driver, it may break a little (or a lot) optimization algorithms that
try to increase throughput by reordering io requests.
It is better to enable the disk write caching to reduce latencies for
write operations, and to trust asynchronous read ahead from the device
and from the kernel that can reduce latencies for read operations,
even when tagged command queuing is not supported or enabled.
Sat Jul 20 20:00 1996 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.c
Minor changes:
- Problem of "CCB address mismatch" that happens with the 3 versions
of the driver. The CCB is correct and Stefan Esser suggests a little
patch that seems to be a bypass.
Stefan says he will change that in a future version of the BSD driver.
- Set burst transfers to 8 for 815 chips.
Sun Jul 14 15:00 1996 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.c, Configure.help
Memory mapped io donnot work under linux/Alpha for the driver.
For the moment it is better to not support this feature for this
architecture.
Tue Jul 09 20:00 1996 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.c
Garbage printed out with the following command (fixed):
- cat <some proc scsi device> /proc/scsi/ncr53c8xx/0
Sun Jul 07 20:00 1996 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.c
Tagged command queueing cannot be disabled at run time.
I probably never try that because I felt the risk.
Shortest patch sent to Linus. I have to plan something better.
Wed Jul 03 23:00 1996 Gerard Roudier (groudier@club-internet.fr)
Release 1.12a
Tested linux releases: 1.2.13, 2.0.0, 2.0.1
Mon Jul 01 21:00 1996 Gerard Roudier (groudier@club-internet.fr)
ncr53c8xx.h, ncr53c8xx.c
Add "clearprof" user command that clear the profile counters.
Automatically clear profile counters when num_kbytes=1000000000
in order to avoid ugly overflow.
Donnot compile user command code and profile data with 1.2.13.
Wed Jun 29 20:38 1996 Gerard Roudier (groudier@club-internet.fr)
Matthew Geier reported to me a weird problem of unexpected
disconnection while asynchronous negotiation.
The message sent by the driver is 1-3-1-ff-00. I sent a patch to
Matthew that change the message to 1-3-1-00-00.
The sync msgout was correct however some devices might be to happy
with ff.
Wed Jun 26 22:57 1996 Gerard Roudier (groudier@club-internet.fr)
Patch no 4 sent to Harald.
The drived used "wtime" for timeouts adn time measurements.
I change for jiffies.
Work with my P133.
Mon Jun 24 23:05 1996 Gerard Roudier (groudier@club-internet.fr)
Patch no 3 sent to Harald.
Sun Jun 23 22:29 1996 Gerard Roudier (groudier@club-internet.fr)
Patch no 2 sent to Harald.
I think that the driver have some chance to work.
Sun Jun 23 15:00 1996 Gerard Roudier (groudier@club-internet.fr)
Harald Koenig is interested in the adaptation of the driver to
Linux/Alpha.
I have prepared a patch and sent it to Harald.
Sun Jun 16 19:00 1996 Gerard Roudier (groudier@club-internet.fr)
Release 1.11
Tested linux releases: 1.2.13, 2.0.0
Sat Jun 15 23:00 1996 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.h, Configure.help, scsi/Config.in
Add CONFIG_SCSI_NCR53C8XX_IOMAPPED config option.
Prepare the 2.0.0 with the new version of the driver.
Wed Jun 12 23:00 1996 Gerard Roudier (groudier@club-internet.fr)
Rewrite the README file.
Add some documentations of the proc file system support.
Sun Jun 9 18:00 1996 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.c
Add proc filesystem support of the driver.
Read operations returns profile information.
Write operations send control commands to the host adapter driver.
Wed Jun 5 22:00 1996 Gerard Roudier (groudier@club-internet.fr)
Change xfer direction for SCAN command to write.
Was bogus.
Tue May 30 18:00 1996 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.c
Set the DMA FIFO to 88 for 825A and 875 boards.
The previous value of 536 is bogus since the script only read 7
bits for the fifo size (thanks to Stefan).
Mon May 27 18:00 1996 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.c
Correct the xfer direction guessing for scanner SCAN command (write).
Mon May 27 18:00 1996 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.c
Add the following config options:
SCSI_NCR_DISABLE_MPARITY_CHECK : disable master parity checking.
SCSI_NCR_DISABLE_PARITY_CHECK : disable scsi parity checking.
SCSI_NCR_FORCE_SYNC_NEGO : force sync nego for all scsi 2 devices.
Sat May 25 22:00 1996 Gerard Roudier (groudier@club-internet.fr)
Release 1.10
Tested linux releases: 1.2.13, 1.3.45, 1.3.71, 1.3.90, 1.3.100
1.99.6, 1.99.7
Switch between Drew's driver and Bsd driver tested for 1.99.7.
Both driver was made as modules.
Sat May 25 16:00 1996 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.c
Some weird problems happen with multi-lun configurations and HDs.
SDTR seems to be sent with TEST UNIT READY of lun 1.
Tagged Queue cannot be enabled. It seems that inqdata are
filled with garbage probably due to some INQUIRY command to
lun 1.
I have fixed the problem as follow:
- negotiation are initiated only with a command to lun 0.
- inquiry data are store only for lun 0.
Wed May 22 22:00 1996 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.c, ncr53c8xx.h
Have prepared the patch that allow to install the driver in the
kernel tree, without moving Drew's one.
Seems to work. However, I have to check that nothing has been
broken for 1.2.13 and 1.3.45 to 1.3.100.
Sun May 4 22:00 1996 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.h
Adapt the source to some modifications of the linux tree of 1.3.98.
(include/linux/scsicam.h moved to include/scsi/scsicam.h)
Thu Apr 25 21:00 1996 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.h, ncr53c8xx.c
Release 1.9
Prepare conditionnal compilations for the future Linux version(s).
Assume that these versions will be nicely compatible with current
one.
1.3.255, 1.4.0 or 2.0.0 ?
I suggest 3.0.0 for some obvious reason.
Wed Apr 24 23:15 1996 Gerard Roudier (groudier@club-internet.fr)
* Install.ncr53c8xx
Add Patch-Current.ncr53c8xx to the distribution.
This patch is applied to the scsi Makefile at installation time for
Linux release V.P.S (V*1000000000+P*100000000+S > 1300000094).
Each time it'll be necessary I will send the patch corresponding to
the current Linux release to the linux-scsi@vger.rutgers.edu.
Sun Apr 21 19:00 1996 Gerard Roudier (groudier@club-internet.fr)
* README.ncr53c8xx
Update Bonnie results of linux-1.3.92 + prepatch read-ahead 1.3.93.
Results are so good that I must remove FreeBSD-2.0.5 results from the
README file, otherwise I should cause trouble for myself.
Sun Apr 07 21:00 1996 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.h
Define SCSI_NCR_MAX_LUN (8) inconditionaly.
Previous releases did not work for multi-lun devices.
This definition was wrongly conditionned:
(SCSI_CONFIG_MULTI_LUN instead of CONFIG_SCSI_MULTI_LUN).
No luck, since I donnot have multi-lun devices and could'nt
test it.
Some tests under linux-1.3.84 with an experimental patch that
try to do asynchronous read-ahead.
Wed Apr 03 23:15 1996 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.h, ncr53c8xx.c
Change some wrong "assert (target == cmd->target & 7)" to
"assert (target == (cmd->target & 0xf)".
Remove NCR_TIMEOUT_ALERT from ncr53c8xx.c
Add SCSI_NCR_TIMEOUT_ALERT to ncr53c8xx.h
Sun Mar 24 21:15 1996 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.h
During "make dep" of linux-1.2.13, LINUX_VERSION_CODE is undefined.
Have to assume 1.2.13 in such situation.
Release 1.8
Sun Mar 24 21:00 1996 Gerard Roudier (groudier@club-internet.fr)
* README.ncr53c8xx
Make changes according to the new uninstallation procedure.
Sun Mar 24 20:00 1996 Gerard Roudier (groudier@club-internet.fr)
* Uninstall.ncr53c8xx
Add an uninstallation script to the distribution.
This shell script restore the standard driver.
Very usefull for people who prefers to use a driver that
does not support:
- Master parity check
- Tagged command queuing
- Fast Wide Scsi-2 features (up to 20 MB/sec)
and that would be capable to reject a Wide Negotiation that it had
previously initiated.
Sat Mar 23 22:00 1996 Gerard Roudier (groudier@club-internet.fr)
* README.ncr53c8xx
Make changes according to the new installation procedure.
Fri Mar 22 23:00 1996 Gerard Roudier (groudier@club-internet.fr)
* Install.ncr53c8xx
Add an installation script to the distribution.
3 differents patches are necessary:
- linux-1.2.13
- linux-1.3.45 to linux-1.3.49
- linux-1.3.50 to linux-1.3.77
Wed Mar 13 22:00 1996 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.c, ncr53c8xx.h
Add share irq support.
This facility appears with linux-1.3.70. It seems that the
corresponding code of the kernel was questionnable before 1.3.72.
I decide to support this options from linux-1.3.72 and above.
(Add define option SCSI_NCR_SHARE_IRQ)
Release 1.7
Tue Mar 12 22:00 1996 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.c
Download BSD ncr.c 1.67 and apply the correction of negotiations order.
Now the Wide and Sync negotiation are done in the proper order.
(Problem reported by Johannes Plass).
Round up correctly the announced speed in MB/sec.
Tue Mar 05 22:00 1996 Gerard Roudier (groudier@club-internet.fr)
* README.ncr53c8xx
Have to upload release 1.6 for users of linux-1.3.70-71
Mon Mar 04 16:00 1996 Gerard Roudier (groudier@club-internet.fr)
* README.ncr53c8xx
Add some Bonnie results to the README file.
Sun Mar 03 20:00 1996 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.c
Make changes for linux-1.3.70 according to the new specification of
irq services interface (request_irq(), free_irq()).
With 26 letters, "_", and 10 digits we can build about:
53x62**9 C names of 10 characters.
Why to use SAME function names with DIFFERENT parameters ?
Sat Mar 02 22:30 1996 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.c
Using SIMPLE QUEUE TAG for all operations is good for performances,
but may be bad for assumed timeout values.
Under heavy disk load (Bonnie), the drive may start IO process of a
command, then disconnect, then execute lots of other commands
before completing the interrupted command.
The standard value of SD_TIMEOUT (6 sec or 7 sec) seems (is) too short.
I fix the problem by forcing an ORDERED QUEUE TAG for the next
command when I found some "old" pending command.
"Old" means that they might be timeouted in a few seconds.
Add NCR_TIMEOUT_ALERT and set it to 3 seconds.
Fri Mar 01 22:30 1996 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.h, ncr53c8xx.c
Add define SCSI_NCR_SEGMENT_SIZE and set it by default to 512.
If undefined, the driver use the scatter list given by the upper
scsi driver, else it tries to split segments into shorter one
according to the value of SCSI_NCR_SEGMENT_SIZE.
Tue Feb 27 21:30 1996 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.h
Set sg_tablesize to 127 = SCSI_NCR_MAX_SCATTER-1.
(was 64 = SCSI_NCR_MAX_SCATTER/2).
May increase the speed (about 20%) for linear read/write operations.
Bonnie results may be better, but I prefered the previous
value.
Tue Feb 27 21:00 1996 Gerard Roudier (groudier@club-internet.fr)
* ncr54c8xx.c, ncr53c8xx.h
Tagged command queueing seems to affect linux-1.3.XY kernels.
I decide to disable tagged queue by default and to provide a command
tool to enable it per device after boot-up.
Add scsitag.c to the distribution.
Usage: scsitag device
Examples: scsitag /dev/sda
scsitag /dev/sdb
Sun Feb 25 14:00 1996 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.c, ncr53c8xx.h
Add INQ7_Default definition and set the target capabilities to this
value by default.
Add some code to reject a synchronous negotiation request from a target
that is defined as not capable of Sync in the table of capabilities.
Sat Feb 24 23:00 1996 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.c
Add some code to fill some write-only host instance fields:
- base
- io_port
- n_io_port
- dma_channel
This fields may be used with some "standard" drivers that do not
process correctly the release function.
Fri Feb 23 23:00 1996 Gerard Roudier (groudier@club-internet.fr)
I receive a mail from Jason Duerstock.
A new bug in ncrBsd2Linux which is probably outside the driver code
and inside Linux kernel code.
The kernel memory is quite corrupted and we cannot get any information
by looking into the messages about the crash. However Linus see a bug in
ncrBsd2Linux because it is a "non standard" driver.
I think too that ncrBsd2Linux is not a standard driver of Linux kernel,
because it has no bugs enough to become standard for Linux.
Drew's driver is quite standard.
Wed Feb 21 23:00 1996 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.c, ncr53c8xx.h
I incorporate the differences between FreeBSD ncr.c revision 1.62 and
revision 1.64.
- Some cosmetic changes.
- Use M_SIMPLE_TAG by default (even for write operations).
I seems to me that SIMPLE TAG is safe only if the flag "queue
algorithm modifier" is set to zero.
I will ask some questions to Stefan Esser about this.
Add option SCSI_NCR_ALWAYS_SIMPLE_TAG in ncr53c8xx.h.
Fri Feb 16 23:00 1996 Gerard Roudier (groudier@club-internet.fr)
I have found the bug. It is a recursion in __get_free_pages().
I will send a mail to Linus about this.
Sat Feb 10 20:00 1996 Gerard Roudier (groudier@club-internet.fr)
I am sure that the kernel stack overflow is due to a severe bug in
the Linux kernel.
I decide to try to find the bug by myself.
Fri Feb 09 20:00 1996 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.c, ncr53c8xx.h
Limit commands per lun to 2 for linux-1.3.XY.
The patch-1.3.60 does not correct the kernel stack overflow problem.
I decide to make some tests with Drew's driver and Bsd2Linux with same
working conditions (3 commands per lun, FAST SCSI, no command queueing).
I get the stack overflow problem with the 2 drivers at the same
frequency.
With only 2 commands per lun, I don't have the problem with any driver.
It seems that the madness of recursion and the recent introduction of
the silly generic read function have broken performance and reliability
of scsi drivers.
Thu Feb 08 23:00 1996 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.c, ncr_attach()
Release memory mapped region and io port if initialisation
does not succeed.
Thu Feb 08 22:00 1996 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.c, ncr53c8xx.c
Try to spare some CPU time in queue_command() function and interrupt
handler:
Add SCSI_NCR_PARANOIA define option in ncr53c8xx.h.
Add SCSI_NCR_PROFILE define option in ncr53c8xx.h.
Avoid useless code and function calls.
Tue Feb 06 21:00 1996 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.c, ncr53c8xx.h, ncr_timeout()
Add SCSI_NCR_BROKEN_INTR define option in ncr53c8xx.h.
If this option is set, the timeout handler polls the interrupt status
register every tick (10 ms). So, boards with broken interrupt can work.
Mon Feb 05 21:30 1996 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.c
Print the correct speed, for devices with successfull wide negotiation.
For same period, such devices are two times faster then narrow ones.
Mon Feb 05 21:00 1996 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.h, ncr53c8xx.c, ncr_attach()
Add define SCSI_NCR_SETTLE_TIME in header file and set it by default
to 2 seconds.
Sat Jan 27 14:00 1996 Gerard Roudier (groudier@club-internet.fr)
Upload release 1.3
Wed Jan 24 24:00 1996 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.c
Update from ncr Bsd 1.60 (Stefan Esser):
The handshake timeout is disabled, since
a few devices will delay ACK for more than a
second: Scanner, CDROM writer and a few old hard
disk drives.
Wed Jan 24 22:30 1996 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.c
Set the selection timeout to 0.4 sec, since 0.25 sec
is recommended for scsi-1 devices.
Note that the Bsd ncr driver sets this timeout to 0.1 sec
and the linux standard ncr driver sets it to 0.8 sec.
Wed Jan 24 22:00 1996 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.c
Add a 5 seconds delay after chip initialization,
waiting for scsi devices to settle their stomach,
as FreeBSD generic scsi driver does.
Tue Jan 23 23:00 1996 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.c
Set burst length value according to chip type.
The original Bsd ncr driver sets burst length to 16 for
all chip types.
Tue Jan 16 23:00 1996 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.c, ncr53c8xx.h
Add comments to linux specific glue code.
Mon Jan 15 22:00 1996 Gerard Roudier (groudier@club-internet.fr)
io mapped versus memory mapped.
* ncr53c8xx.c
Add some code to dynamicaly switch to io mapped if memory mapped
does not work.
No more need to reconfigure, compile and link the kernel if
memory mapped is not possible.
Sun Jan 14 18:00 1996 Gerard Roudier (groudier@club-internet.fr)
Patch sent to ncr mailing list by Jason Duerstock
<jduersto@kendall.mdcc.edu>
I have omitted to provide the proc_dir_entry to the middle
scsi driver.
* ncr53c8xxx.c
Add the declaration of the ncr53c8xx proc_dir_entry and return
the pointer to middle scsi driver.
Sat Jan 13 01:00 1996 Gerard Roudier (groudier@club-internet.fr)
ncrBsd2Linux 1.1 is ready.
Upload to sunsite immediatly.
Fri Jan 12 23:45 1996 Gerard Roudier (groudier@club-internet.fr)
It seems that scsi-2 devices too may cause problems because they
have flawes in the firmware.
* ncr53c8xx.h
I add a table of capabilities per target.
This table contains one byte per target. The value of this byte
is anded with byte 7 of INQUIRY data.
Edit ncr53c8xx.h and read the corresponding comments for more
details.
Wed Jan 10 22:35 1996 Gerard Roudier (groudier@club-internet.fr)
I have some time to read the scsi-1 specifications.
Some very old scsi devices may cause problems with the ncr Bsd driver
for the following raisons:
The Synchronous Negotiation protocol was optional.
The standardized INQUIRY data does not include the byte 7 of
the scsi-2 specifications which contains the capabilities of
the device.
I think that negotiation with such devices are very questionnable.
* ncr53c8xx.c
ncrBsd2Linux 1.1 does not negotiate with scsi-1 devices.
Sat Jan 06 21:00 1996 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.c function ncr_attach()
Disable chip interrupt before soft reset in attach procedure.
When loadlin is used to boot the system, the state of the NCR chip
is unpredicable. This modification avoid unexpected interrupts.
Thu Jan 04 23:45 1996 Gerard Roudier (groudier@club-internet.fr)
ncrBsd2Linux 1.0 is ready.
Upload to sunsite immediatly.
Tue Jan 02 23:00 1996 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.c
Add a waiting list for Scsi Commands than can be inserted
into the start queue immediatly.
When a command complete, the waiting commands are requeued by calling
the queuecommand() function.
Sun Dec 31 23:59 1995 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.c
Use kmalloc()/kfree() for internal data structures allocation to
avoid scsi memory pool shortage.
Sat Dec 30 23:00 1995 Gerard Roudier (groudier@club-internet.fr)
ncrBsd2Linux can now use memory mapped IO.
Works fine.
* ncr53c8xx.c
Call vremap() from ncr_attach() to map the physical page which
contains the memory IO window.
Call vfree() from ncr_detach() (release module).
Fri Dec 29 23:45 1995 Gerard Roudier (groudier@club-internet.fr)
ncrBsd2Linux can now be configured as a module.
Works fine.
* ncr53c8xx.c: add new functions ncr53c8xx_release() and ncr_detach()
Add the code to (per host):
Stop the timer.
Stop the chip.
Free allocated memory.
Fri Dec 29 23:00 1995 Gerard Roudier (groudier@club-internet.fr)
Problem: detection routine returns 0 and can detect only one host.
* ncr53c8xx.c function ncr_attach()
ncr_attach() now returns 0 on success and -1 on error.
ncr53c8xx_detect() returns the number of detected hosts.
Thu Dec 28 22:00 1995 Gerard Roudier (groudier@club-internet.fr)
I must upload the new version which corrects the severe problem with
WRITE_10 command.
Release 0.5
Known or probable problems with this ncr driver release:
--------------------------------------------------------
Same as the previous release.
Wed Dec 27 23:00 1995 Gerard Roudier (groudier@club-internet.fr)
Problem:
System CRASH or scsi ERROR "extra data disgarded" on WRITE(10)
command.
* ncr53c8xx.c function guess_xfer_direction()
I add the WRITE(10) (0x2A) into the list of Data Out scsi commands.
It was a big mistake.
This BUG was introduced in the release 0.3 and is obvious present in
the release 0.4.
Wed Dec 27 22:00 1995 Gerard Roudier (groudier@club-internet.fr)
Problem:
When I was testing tagged command queueing and disconnections
with one hard disk at a time (IBM S12), the script process hung
every 5 minutes with a non empty stall queue.
* ncr53c8xx.c function ncr_exception()
I replace "OUTB (nc_istat, INTF)" by
"OUTB (nc_istat, (istat & SIGP) | INTF)".
This statement cleared the INTF condition, but cleared the SIGP flag too.
(This bug is in the original FreeBSD ncr driver).
Mon Dec 25 22:00 1995 Gerard Roudier (groudier@club-internet.fr)
Release 0.4
Known or probable problems with this ncr driver release:
--------------------------------------------------------
Hardware (or software) conflicts with some ethernet cards.
See release 0.2 above.
Crash with Intel saturn chipset with write-back cache enabled.
The SCSI SCRIPT access the internal registers of
the NCR chip by memory addressing.
Ensure that the memory area of the NCR chip is not cacheable.
Use scanpci to get the base memory address of the ncr chip.
The 128 bytes following this address must not be cached.
Sat Dec 23 22:00 1995 Gerard Roudier (groudier@club-internet.fr)
Problem:
FreeBSD driver important comments
---------------------------------
We try to reduce the number of interrupts caused
by unexpected phase changes due to disconnects.
A typical harddisk may disconnect before ANY block.
If we wanted to avoid unexpected phase changes at all
we had to use a break point every 512 bytes.
Of course the number of scatter/gather blocks is
limited.
* ncr53c8xx.c function ncr_scatter()
This function has been rewritten according to the above comments.
The Linux scatter list is scanned, and blocks are broken as possible
into 512 bytes chunks.
Wed Dec 22 22:00 1995 Gerard Roudier (groudier@club-internet.fr)
Problem: ensure that there are enough allocated Command Control Blocks
for each unit to enqueue commands according to cmd_per_lun.
* ncr53c8xx.c function ncr_allocate_ccb()
Allocate all required ccb(s) instead of one at a time.
Mon Dec 18 23:00 1995 Gerard Roudier (groudier@club-internet.fr)
Problem: A copy of the system time is used to compute timeouts.
When the system time is changed , we can get spurious timeouts
if scsi commands are pending.
* ncr53c8xx.c function ncr_timeout()
In FreeBSD the kernel time (volatile struct timeval time) is not
affected by settimeofday() or other change time functions.
For Linux, I replace "time" by "xtime". But "xtime" is the system time,
and is affected by change time functions.
If we detect a change <=-1s or >1s we assume system time has been changed.
For all active ccb(s), we recompute tlimit.
We set heartbeat to thistime to prevent spurious chip reset.
Sun Dec 17 23:00 1995 Gerard Roudier (groudier@club-internet.fr)
Release 0.3.
Sun Dec 17 11:00 1995 Gerard Roudier (groudier@club-internet.fr)
Problem: Linux middle-level scsi driver does not provide the
direction of transfert in scsi command parameters.
FreeBSD ncr driver need this information to patch the SCSI script
for SAVE DATA POINTER and to check actual data transfer direction.
* ncr53c8xx.c
I add the function guess_xfer_direction(int opcode) which try to
guess the transfer direction.
Unfortunately my documentation about SCSI-II standard is very old.
It does not contain PHOTO-CD command specifications.
I assume input transfer direction, for unknown command. (not perfect)
Wed Dec 15 23:00 1995 Gerard Roudier (groudier@club-internet.fr)
It's time to schedule the release 0.2
Known or probable problems with this ncr driver release:
--------------------------------------------------------
Scsi tapes do not work.
scsi-config-1.5 does not work too.
Hardware (or software) conflicts with some ethernet cards.
The linux native ncr53c810 scsi driver does'not use memory
mapped IO at all.
The BSD driver can use memory mapped IO.
Under Linux, i seems to be difficult (or impossible) to map
a PCI memory area. So I decide to use normal IO in the code of
the ported driver.
However, the SCSI SCRIPT access the internal registers of
the NCR chip by memory addressing.
EThernet cards use a memory area to communicate with the system.
I think that this memory area conflicts with the memory area
used by the NCR chip.
The configuration diskette of your ethernet card can help you
to fix the problem (try sofware configurations).
Wed Dec 15 22:00 1995 Gerard Roudier (groudier@club-internet.fr)
Problem: detection of CD change did not work.
* ncr53c8xx.c
Signal a CHECK_CONDITION (S_CHECK_COND) to the middle-level
scsi drivers when the scsi completion status = S_SENSE|S_GOOD.
Problem: System hang with status <4/82> after mounting the root
partition. System disk is a QUANTUM EMPIRE 1080 S.
Submitted by rwilhelm@Physik.TU-Muenchen.DE (Robert Wilhelm)
Thu, 14 Dec 1995 10:18:43 +0100 (MET)
* ncr53c8xx.c
Signal a CHECK_CONDITION (S_CHECK_COND) to the middle-level
scsi drivers when the scsi completion status = S_SENSE|S_CHECK_COND.
(HS_COMPLETE=4, S_SENSE|S_CHECK_COND=x82).
I can't test this fix. I think that it should work.
Thu Dec 14 22:00 1995 Gerard Roudier (groudier@club-internet.fr)
Problem submitted by Bill Dyess <Bill@Dyess.com> Tue 12 Dec 1995
Only one lun detected on a Pioneer DRM-602X 6-disk CD-ROM changer.
* ncr53c8xx.h, ncr53c8xx.c
Define NCR_SCSI_MAX_LUN to 8 if the Linux configuration flag
SCSI_CONFIG_MULTI_LUN is set.
My CD device has only one lun. I can't test multi-lun device,
but I think that it should work.
* ncr53c8xx.c
Write the ncr_abort_command() and ncr_reset_command() functions.
I intend to test these functions next week.
Sun Dec 10 22:00 1995 Gerard Roudier (groudier@club-internet.fr)
* Release 0.1
Works fine with hard disks under Linux 1.2.13 and Linux 1.3.45.
......@@ -68,12 +68,12 @@ 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
bool ' detect and read serial NVRAMs' CONFIG_SCSI_NCR53C8XX_NVRAM_DETECT
bool ' enable tagged command queueing' CONFIG_SCSI_NCR53C8XX_TAGGED_QUEUE
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
int ' maximum number of queued commands' CONFIG_SCSI_NCR53C8XX_MAX_TAGS 4
int ' synchronous transfers frequency in MHz' CONFIG_SCSI_NCR53C8XX_SYNC 5
if [ "$CONFIG_SCSI_NCR53C8XX_TAGGED_QUEUE" != "y" ]; then
if [ "$CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS" = "0" ]; then
bool ' not allow targets to disconnect' CONFIG_SCSI_NCR53C8XX_NO_DISCONNECT
fi
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
......
......@@ -4,7 +4,7 @@ Written by Gerard Roudier <groudier@club-internet.fr>
21 Rue Carnot
95170 DEUIL LA BARRE - FRANCE
2 January 1998
27 June 1998
===============================================================================
1. Introduction
......@@ -22,7 +22,7 @@ Written by Gerard Roudier <groudier@club-internet.fr>
8.5 Set debug mode
8.6 Clear profile counters
8.7 Set flag (no_sync)
8.8 Debug error recovery
8.8 Set verbose level
9. Configuration parameters
10. Boot setup commands
10.1 Syntax
......@@ -33,9 +33,7 @@ Written by Gerard Roudier <groudier@club-internet.fr>
10.6 SCSI BUS checking boot option
11. Some constants and flags of the ncr53c8xx.h header file
12. Installation
12.1 Provided files
12.2 Installation procedure
13. Control commands under linux-1.2.13
13. Architecture dependant features
14. Known problems
14.1 Tagged commands with Iomega Jaz device
14.2 Device names change when another controller is added
......@@ -93,7 +91,7 @@ This driver has been tested OK with linux/i386, Linux/Alpha and Linux/PPC.
Latest driver version and patches are available at:
ftp://linux.wauug.org/pub/roudier
ftp://ftp.tux.org/pub/people/gerard-roudier
I am not a native speaker of English and there are probably lots of
mistakes in this README file. Any help will be welcome.
......@@ -112,19 +110,19 @@ The following features are supported for all chips:
"Wide negotiation" is supported for chips that allow it. The
following table shows some characteristics of NCR 8xx family chips:
On board Supported by Tested with
Chip SDMS BIOS Wide Ultra SCSI the driver the driver
---- --------- ---- ---------- ------------ -----------
810 N N N Y Y
810A N N N Y Y
815 Y N N Y Y
825 Y Y N Y Y
825A Y Y N Y Y
860 N N Y Y Y
875 Y Y Y Y Y
895 Y Y Y(1) Y not yet
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
(1) The 895 chip is supported 'on paper'.
3. Summary of other supported features.
......@@ -152,49 +150,88 @@ driver to use normal I/O in all cases.
5. Tagged command queueing
Some SCSI devices do not properly support tagged command queuing. A
safe configuration is to not enable tagged command queuing support at
boot-up, and to enable support of it with the control command
"settags" described further in this text.
Once you are sure that all your devices properly support tagged
command queuing, you can enable it by default with the
CONFIG_SCSI_NCR53C8XX_TAGGED_QUEUE configuration option.
Queuing more than 1 command at a time to a device allows it to perform
optimizations based on actual head positions and its mechanical
characteristics. This feature may also reduce average command latency.
In order to really gain advantage of this feature, devices must have
a reasonnable cache size (No miracle is to be expected for a low-end
hard disk with 128 KB or less).
Some kown SCSI devices do not properly support tagged command queuing.
Generally, firmware revisions that fix this kind of problems are available
at respective vendor web/ftp sites.
All I can say is that the hard disks I use on my machines behave well with
this driver with tagged command queuing enabled:
- IBM S12 0662
- Conner 1080S
- Quantum Atlas I
- Quantum Atlas II
If your controller has NVRAM, you can configure this feature per target
from the user setup tool. The Tekram Setup program allows to tune the
maximum number of queued commands up to 32. The Symbios Setup only allows
to enable or disable this feature.
The maximum number of simultaneous tagged commands queued to a device
is currently set to 4 by default. It is defined in the file
ncr53c8xx.h by SCSI_NCR_MAX_TAGS. This value is suitable for most SCSI
disks. With large SCSI disks (> 2GB, cache > 512KB average seek time
< 10 ms), 8 tagged commands may give better performance.
is currently set to 8 by default. This value is suitable for most SCSI
disks. With large SCSI disks (>= 2GB, cache >= 512KB, average seek time
<= 10 ms), using a larger value may give better performances.
The driver supports up to 64 commands per device, but using more than
32 is generally not worth it, unless you are using a very large disk
or disk array.
If your controller does not have NVRAM or if it is managed by the SDMS
BIOS/SETUP, you can configure tagged queueing feature and device queue
depths from the boot command-line. For example:
ncr53c8xx=tags:4/t2t3q15-t4q7/t1u0q32
will set tagged commands queue depths as follow:
- target 2 all luns on controller 0 --> 15
- target 3 all luns on controller 0 --> 15
- target 4 all luns on controller 0 --> 7
- target 1 lun 0 on controller 1 --> 32
- all other target/lun --> 4
In some special conditions, some SCSI disk firmwares may return a
QUEUE FULL status for a SCSI command. This behaviour is managed by the
driver by the following heuristic:
driver using the following heuristic:
- Each time a QUEUE FULL status is returned, tagged queue depth is reduced
to the actual number of disconnected commands.
- Each time a QUEUE FULL status is returned, tagged command queueing is
temporarily disabled.
- Every 1000 successfully completed SCSI commands, if allowed by the
current limit, the maximum number of queueable commands is incremented.
- Every 100 successfully completed SCSI commands, if allowed by the
current limit, the maximum number of queueable commands is
incremented and tagged command queueing is reenabled.
Since QUEUE FULL status reception and handling is resource wasting, the
driver notifies by default this problem to user by indicating the actual
number of commands used and their status, as well as its decision on the
device queue depth change.
The heuristic used by the driver in handling QUEUE FULL ensures that the
impact on performances is not too bad. You can get rid of the messages by
setting verbose level to zero, as follow:
1st method: boot your system using 'ncr53c8xx=verb:0' option.
2nd method: apply "setverbose 0" control command to the proc fs entry
corresponding to your controller after boot-up.
6. Parity checking
The driver supports SCSI parity checking and PCI bus master parity
checking. These features must be enabled in order to ensure safe data
transfers. However, some flawed devices or mother boards will have
problems with parity. You can disable parity by choosing first
"CONFIG_EXPERIMENTAL". Then, "make config" will allow to set the
following configuration options:
CONFIG_SCSI_NCR53C8XX_DISABLE_PARITY_CHECK (disable SCSI parity checking)
CONFIG_SCSI_NCR53C8XX_DISABLE_MPARITY_CHECK (disable master parity checking)
problems with parity. You can disable either PCI parity or SCSI parity
checking by entering appropriate options from the boot command line.
(See 10: Boot setup commands).
7. Profiling information
Profiling information is available through the proc SCSI file system.
Since gathering profiling information may impact performances, this
feature is disabled by default and requires a compilation configuration
option to be set to Y.
The device associated with a host has the following pathname:
/proc/scsi/ncr53c8xx/N (N=0,1,2 ....)
......@@ -346,7 +383,7 @@ Available commands:
target: target number
tags: number of concurrent tagged commands
must not be greater than SCSI_NCR_MAX_TAGS (default: 4)
must not be greater than SCSI_NCR_MAX_TAGS (default: 8)
8.4 Set order type for tagged command
......@@ -404,26 +441,12 @@ Available commands:
will allow disconnection for all devices on the SCSI bus.
8.8 Debug error recovery
8.8 Set verbose level
debug_error_recovery <error to trigger>
setverbose #level
Available error type to trigger:
sge: SCSI gross error
abort: abort command from the middle-level driver
reset: reset command from the middle-level driver
parity: scsi parity detected in DATA IN phase
none: restore driver normal behaviour
The code corresponding to this feature is normally not compiled.
Its purpose is driver testing only. In order to compile the code
that allows to trigger error recovery you must define at compile time
SCSI_NCR_DEBUG_ERROR_RECOVERY.
If you have compiled the driver with this option, nothing will happen
as long as you donnot use the control command 'debug_error_recovery'
with sge, abort, reset or parity as argument.
If you select an error type, it will be triggered by the driver every
30 seconds.
The driver default verbose level is 1. This command allows to change
th driver verbose level after boot-up.
9. Configuration parameters
......@@ -433,6 +456,11 @@ if only one has a flaw for some SCSI feature, you can disable the
support by the driver of this feature at linux start-up and enable
this feature after boot-up only for devices that support it safely.
CONFIG_SCSI_NCR53C8XX_PROFILE_SUPPORT (default answer: n)
This option must be set for profiling information to be gathered
and printed out through the proc file system. This features may
impact performances.
CONFIG_SCSI_NCR53C8XX_IOMAPPED (default answer: n)
Answer "y" if you suspect your mother board to not allow memory mapped I/O.
May slow down performance a little. This option is required by
......@@ -440,13 +468,12 @@ CONFIG_SCSI_NCR53C8XX_IOMAPPED (default answer: n)
suffers no performance loss with this option since all IO is memory
mapped anyway.
CONFIG_SCSI_NCR53C8XX_TAGGED_QUEUE (default answer: n)
Answer "y" if you are sure that all your SCSI devices that are able to
accept tagged commands will proceed safely.
CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS (default answer: 8)
Default tagged command queue depth.
CONFIG_SCSI_NCR53C8XX_MAX_TAGS (default answer: 4)
CONFIG_SCSI_NCR53C8XX_MAX_TAGS (default answer: 8)
This option allows you to specify the maximum number of tagged commands
that can be queued to a device.
that can be queued to a device. The maximum supported value is 32.
CONFIG_SCSI_NCR53C8XX_SYNC (default answer: 5)
This option allows you to specify the frequency in MHz the driver
......@@ -535,8 +562,8 @@ Scsi disconnections
disc:n disabled
Special features
Only apply to 810A, 825A, 860 and 875 controllers.
Have no effect with normal 810 and 825.
Only apply to 810A, 825A, 860, 875 and 895 controllers.
Have no effect with other ones.
specf:y (or 1) enabled
specf:n (or 0) disabled
specf:3 enabled except Memory Write And Invalidate
......@@ -545,17 +572,25 @@ Special features
Invalidate.
Ultra SCSI support
Only apply to 860 and 875 controllers.
Only apply to 860, 875 and 895 controllers.
Have no effect with other ones.
ultra:y enabled
ultra:2 Ultra2 enabled
ultra:1 Ultra enabled
ultra:n disabled
Number of tagged commands
Default number of tagged commands
tags:0 (or tags:1 ) tagged command queuing disabled
tags:#tags (#tags > 1) tagged command queuing enabled
#tags will be truncated to the max queued commands configuration parameter.
If the driver is configured with a maximum of 4 queued commands, tags:4 is
the right argument to specify.
This option also allows to specify a command queue depth for each device
that support tagged command queueing.
Example:
ncr53c8xx=tags:10/t2t3q16-t5q24/t1u2q32
will set devices queue depth as follow:
- controller #0 target #2 and target #3 -> 16 commands,
- controller #0 target #5 -> 24 commands,
- controller #1 target #1 logical unit #2 -> 32 commands,
- all other logical units (all targets, all controllers) -> 10 commands.
Default synchronous period factor
sync:255 disabled (asynchronous transfer mode)
......@@ -692,7 +727,7 @@ Boot fail safe
If the driver has been configured with default options, the equivalent
boot setup is:
ncr53c8xx=mpar:y,spar:y,disc:y,specf:3,fsn:n,ultra:y,fsn:n,revprob:n,verb:1\
ncr53c8xx=mpar:y,spar:y,disc:y,specf:3,fsn:n,ultra:2,fsn:n,revprob:n,verb:1\
tags:0,sync:50,debug:0,burst:7,led:0,wide:1,settle:2,diff:0,irqm:0
For an installation diskette or a safe but not fast system,
......@@ -705,8 +740,8 @@ boot setup can be:
My personnal system works flawlessly with the following equivalent setup:
ncr53c8xx=mpar:y,spar:y,disc:y,specf:1,fsn:n,ultra:y,fsn:n,revprob:n,verb:1\
tags:8,sync:12,debug:0,burst:7,led:1,wide:1,settle:2,diff:0,irqm:0
ncr53c8xx=mpar:y,spar:y,disc:y,specf:1,fsn:n,ultra:2,fsn:n,revprob:n,verb:1\
tags:32,sync:12,debug:0,burst:7,led:1,wide:1,settle:2,diff:0,irqm:0
The driver prints its actual setup when verbosity level is 2. You can try
"ncr53c8xx=verb:2" to get the "static" setup of the driver, or add "verb:2"
......@@ -723,8 +758,8 @@ Available option bits:
Use 'pcifix:3' in order to allow the driver to fix both PCI features.
These options only apply to new SYMBIOS chips 810A, 825A, 860 and 875
and are only supported for Pentium and 486 class processors.
These options only apply to new SYMBIOS chips 810A, 825A, 860, 875
and 895 and are only supported for Pentium and 486 class processors.
Recent SYMBIOS 53C8XX scsi processors are able to use PCI read multiple
and PCI write and invalidate commands. These features require the
cache line size register to be properly set in the PCI configuration
......@@ -737,7 +772,7 @@ invalidate bit in the PCI configuration space of 53C8XX chips.
Optimized PCI accesses may be broken for some PCI/memory controllers or
make problems with some PCI boards.
This fix-up works flawlessly on my system.
This fix-up worked flawlessly on my previous system.
(MB Triton HX / 53C875 / 53C810A)
I use these options at my own risks as you will do if you decide to
use them too.
......@@ -812,17 +847,12 @@ Some of these are defined from the configuration parameters. To
change other "defines", you must edit the header file. Do that only
if you know what you are doing.
SCSI_NCR_SETUP_ULTRA_SUPPORT (default: defined)
Ultra SCSI support.
Can be changed by the following boot setup command:
ncr53c8xx=ultra:n
SCSI_NCR_SETUP_SPECIAL_FEATURES (default: defined)
If defined, the driver will enable some special features according
to chip and revision id.
For 810A, 860, 825A and 875 scsi chips, this option enables support
of features that reduce load of PCI bus and memory accesses during
scsi transfer processing: burst op-code fetch, read multiple,
For 810A, 860, 825A, 875 and 895 scsi chips, this option enables
support of features that reduce load of PCI bus and memory accesses
during scsi transfer processing: burst op-code fetch, read multiple,
read line, prefetch, cache line line, write and invalidate,
burst 128 (875 only), large dma fifo (875 only), offset 16 (875 only).
Can be changed by the following boot setup command:
......@@ -834,7 +864,7 @@ SCSI_NCR_IOMAPPED (default: not defined)
SCSI_NCR_SHARE_IRQ (default: defined)
If defined, request shared IRQ.
SCSI_NCR_MAX_TAGS (default: 4)
SCSI_NCR_MAX_TAGS (default: 8)
Maximum number of simultaneous tagged commands to a device.
Can be changed by "settags <target> <maxtags>"
......@@ -843,7 +873,7 @@ SCSI_NCR_SETUP_DEFAULT_SYNC (default: 50)
negotiation. 0 means asynchronous.
Can be changed by "setsync <target> <period factor>"
SCSI_NCR_SETUP_DEFAULT_TAGS (default: 4)
SCSI_NCR_SETUP_DEFAULT_TAGS (default: 8)
Default number of simultaneous tagged commands to a device.
< 1 means tagged command queuing disabled at start-up.
......@@ -864,7 +894,7 @@ SCSI_NCR_SETUP_MASTER_PARITY (default: defined)
SCSI_NCR_SETUP_MASTER_PARITY (default: defined)
If defined, SCSI parity checking is enabled.
SCSI_NCR_PROFILE (default: defined)
SCSI_NCR_PROFILE_SUPPORT (default: not defined)
If defined, profiling information is gathered.
SCSI_NCR_MAX_SCATTER (default: 128)
......@@ -899,67 +929,28 @@ SCSI_NCR_MAX_LUN (default: 8)
12. Installation
12.1 Provided files
This driver is part of the linux kernel distribution.
Driver files are located in the sub-directory "drivers/scsi" of the
kernel source tree.
Driver and common files:
Driver files:
README.ncr53c8xx : this file
ChangeLog.ncr53c8xx : change log
ConfigHelp.ncr53c8xx : Part of Configure.help about the driver
ncr53c8xx.h : definitions
ncr53c8xx.c : the driver code
scsitag.c : command tool to enable tagged queue
conf.modules : sample of /etc/conf.modules
Install.ncr53c8xx : installation script
Patch-1.2.13.ncr53c8xx : patch for linux-1.2.13
Patch-2.0.29.ncr53c8xx : patch for linux-2.0.29
You must untar the distribution with the following command:
tar zxvf ncrBsd2Linux-2.2b-src.tar.gz
The sub-directory ncr53c8xx-2.2b will be created. Change to this directory.
12.2 Installation procedure
This install script has been tested with linux-1.2.13 and 2.0.29.
This procedure copies the new driver files to the kernel tree and
applies a patch to some files of the kernel tree.
If your linux directory is at the standard location
"/usr/src/linux", just enter:
Install.ncr53c8xx
Else enter:
Install.ncr53c8xx <your_linux_directory>
Make the kernel:
Change to linux source directory
Configure with NCR53C7,8XX support = N
Configure with NCR53C8XX support = Y (or m)
Make dependencies
Make the kernel (use make zdisk first)
Make and install modules if you have configured with 'm'
13. Control commands under linux-1.2.13
Profiling data and control commands using the proc SCSI file system
are not available for linux-1.2.13. The only control command
available is "scsitag" which allows you to enable tagged command
queuing support after linux boot-up.
New driver versions are made available separately in order to allow testing
changes and new features prior to including them into the linux kernel
distribution. The following URL provides informations on latest avalaible
patches:
Tagged command queueing is disabled by default at system startup.
ftp://ftp.tux.org/pub/people/gerard-roudier/README
You can enable tagged queue per device with the following command:
scsitag device_name (ex: scsitag /dev/sda)
13. Architecture dependant features.
Use "cc -o scsitag scsitag.c" to create the "scsitag" executable.
<Not yet written>
14. Known problems
......@@ -1079,7 +1070,7 @@ Try to enable one feature at a time with control commands. For example:
Will reset flags (no_sync) for target 3, and so will allow it to disconnect
the SCSI Bus.
- echo "settags 3 4" >/proc/scsi/ncr53c8xx/0
- echo "settags 3 8" >/proc/scsi/ncr53c8xx/0
Will enable tagged command queuing for target 3 if that device supports it.
Once you have found the device and the feature that cause problems, just
......@@ -1100,12 +1091,14 @@ Periods are in nano-seconds and speeds are in Mega-transfers per second.
1 Mega-transfers/second means 1 MB/s with 8 bits SCSI and 2 MB/s with
Wide16 SCSI.
16.1 Synchronous timings for 53C875 and 53C860 Ultra-SCSI controllers
16.1 Synchronous timings for 53C895, 53C875 and 53C860 SCSI controllers
----------------------------------------------
Negotiated NCR settings
Factor Period Speed Period Speed
------ ------ ------ ------ ------
10 25 40.000 25 40.000 (53C895 only)
11 30.2 33.112 31.25 32.000 (53C895 only)
12 50 20.000 50 20.000
13 52 19.230 62 16.000
14 56 17.857 62 16.000
......
......@@ -501,7 +501,7 @@ scsi_unregister(struct Scsi_Host * sh){
/* If we are removing the last host registered, it is safe to reuse
* its host number (this avoids "holes" at boot time) (DB)
*/
if (max_scsi_hosts == next_scsi_host && !scsi_loadable_module_flag)
if (max_scsi_hosts == next_scsi_host)
max_scsi_hosts--;
next_scsi_host--;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -42,10 +42,18 @@
#ifndef NCR53C8XX_H
#define NCR53C8XX_H
#if 0
#define CONFIG_SCSI_NCR53C8XX_PROFILE
#endif
#ifndef CONFIG_SCSI_NCR53C8XX_NVRAM_DETECT
#define CONFIG_SCSI_NCR53C8XX_NVRAM_DETECT
#endif
/*
** Name and revision of the driver
*/
#define SCSI_NCR_DRIVER_NAME "ncr53c8xx - revision 2.5f"
#define SCSI_NCR_DRIVER_NAME "ncr53c8xx - revision 3.0e"
/*
** Check supported Linux versions
......@@ -56,51 +64,27 @@
#endif
#include <linux/config.h>
/*
** During make dep of linux-1.2.13, LINUX_VERSION_CODE is undefined
** Under linux-1.3.X, all seems to be OK.
** So, we have only to define it under 1.2.13
*/
#define LinuxVersionCode(v, p, s) (((v)<<16)+((p)<<8)+(s))
#if !defined(LINUX_VERSION_CODE)
#define LINUX_VERSION_CODE LinuxVersionCode(1,2,13)
#endif
/*
** Normal IO or memory mapped IO.
**
** Memory mapped IO only works with linux-1.3.X
** If your motherboard does not work with memory mapped IO,
** define SCSI_NCR_IOMAPPED for PATCHLEVEL 3 too.
** These options are'nt tunable from 'make config'
*/
#if LINUX_VERSION_CODE < LinuxVersionCode(1,3,0)
# define SCSI_NCR_IOMAPPED
#endif
#if LINUX_VERSION_CODE >= LinuxVersionCode(1,3,0)
# define SCSI_NCR_PROC_INFO_SUPPORT
#endif
#if LINUX_VERSION_CODE >= LinuxVersionCode(1,3,72)
# define SCSI_NCR_SHARE_IRQ
#endif
#define SCSI_NCR_PROC_INFO_SUPPORT
#define SCSI_NCR_SHARE_IRQ
/*
** If you want a driver as small as possible, donnot define the
** following options.
*/
#define SCSI_NCR_BOOT_COMMAND_LINE_SUPPORT
#define SCSI_NCR_DEBUG_INFO_SUPPORT
#define SCSI_NCR_PCI_FIX_UP_SUPPORT
#ifdef SCSI_NCR_PROC_INFO_SUPPORT
# define SCSI_NCR_PROFILE_SUPPORT
# ifdef CONFIG_SCSI_NCR53C8XX_PROFILE
# define SCSI_NCR_PROFILE_SUPPORT
# endif
# define SCSI_NCR_USER_COMMAND_SUPPORT
# define SCSI_NCR_USER_INFO_SUPPORT
/* # define SCSI_NCR_DEBUG_ERROR_RECOVERY_SUPPORT */
#endif
/*==========================================================
......@@ -130,25 +114,27 @@
#define SCSI_NCR_MAX_SYNC (40)
/*
* Allow tags from 2 to 12, default 4
* Allow tags from 2 to 64, default 8
*/
#ifdef CONFIG_SCSI_NCR53C8XX_MAX_TAGS
#if CONFIG_SCSI_NCR53C8XX_MAX_TAGS < 2
#define SCSI_NCR_MAX_TAGS (2)
#elif CONFIG_SCSI_NCR53C8XX_MAX_TAGS > 12
#define SCSI_NCR_MAX_TAGS (12)
#elif CONFIG_SCSI_NCR53C8XX_MAX_TAGS > 64
#define SCSI_NCR_MAX_TAGS (64)
#else
#define SCSI_NCR_MAX_TAGS CONFIG_SCSI_NCR53C8XX_MAX_TAGS
#endif
#else
#define SCSI_NCR_MAX_TAGS (4)
#define SCSI_NCR_MAX_TAGS (8)
#endif
/*
* Allow tagged command queuing support if configured with default number
* of tags set to max (see above).
*/
#ifdef CONFIG_SCSI_NCR53C8XX_TAGGED_QUEUE
#ifdef CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS
#define SCSI_NCR_SETUP_DEFAULT_TAGS CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS
#elif defined CONFIG_SCSI_NCR53C8XX_TAGGED_QUEUE
#define SCSI_NCR_SETUP_DEFAULT_TAGS SCSI_NCR_MAX_TAGS
#else
#define SCSI_NCR_SETUP_DEFAULT_TAGS (0)
......@@ -167,12 +153,13 @@
/*
* Sync transfer frequency at startup.
* Allow from 5Mhz to 40Mhz default 10 Mhz.
* Allow from 5Mhz to 40Mhz default 20 Mhz.
*/
#ifndef CONFIG_SCSI_NCR53C8XX_SYNC
#define CONFIG_SCSI_NCR53C8XX_SYNC (5)
#define CONFIG_SCSI_NCR53C8XX_SYNC (20)
#elif CONFIG_SCSI_NCR53C8XX_SYNC > SCSI_NCR_MAX_SYNC
#define SCSI_NCR_SETUP_DEFAULT_SYNC SCSI_NCR_MAX_SYNC
#undef CONFIG_SCSI_NCR53C8XX_SYNC
#define CONFIG_SCSI_NCR53C8XX_SYNC SCSI_NCR_MAX_SYNC
#endif
#if CONFIG_SCSI_NCR53C8XX_SYNC == 0
......@@ -247,14 +234,18 @@
#define SCSI_NCR_ALWAYS_SIMPLE_TAG
#define SCSI_NCR_MAX_SCATTER (127)
#define SCSI_NCR_MAX_TARGET (16)
#define SCSI_NCR_MAX_HOST (2)
#define SCSI_NCR_TIMEOUT_ALERT (3*HZ)
/* No need to use a too large adapter queue */
#if SCSI_NCR_MAX_TAGS <= 32
#define SCSI_NCR_CAN_QUEUE (7*SCSI_NCR_MAX_TAGS)
#else
#define SCSI_NCR_CAN_QUEUE (250)
#endif
#define SCSI_NCR_CMD_PER_LUN (SCSI_NCR_MAX_TAGS)
#define SCSI_NCR_SG_TABLESIZE (SCSI_NCR_MAX_SCATTER)
#define SCSI_NCR_TIMER_INTERVAL ((HZ+5-1)/5)
#define SCSI_NCR_TIMER_INTERVAL (HZ)
#if 1 /* defined CONFIG_SCSI_MULTI_LUN */
#define SCSI_NCR_MAX_LUN (8)
......@@ -270,21 +261,12 @@
#if defined(HOSTS_C) || defined(MODULE)
#if LINUX_VERSION_CODE >= LinuxVersionCode(1,3,98)
#include <scsi/scsicam.h>
#else
#include <linux/scsicam.h>
#endif
int ncr53c8xx_abort(Scsi_Cmnd *);
int ncr53c8xx_detect(Scsi_Host_Template *tpnt);
int ncr53c8xx_queue_command(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
#if LINUX_VERSION_CODE >= LinuxVersionCode(1,3,98)
int ncr53c8xx_reset(Scsi_Cmnd *, unsigned int);
#else
int ncr53c8xx_reset(Scsi_Cmnd *);
#endif
#ifdef MODULE
int ncr53c8xx_release(struct Scsi_Host *);
......@@ -306,34 +288,22 @@ int ncr53c8xx_release(struct Scsi_Host *);
sg_tablesize: SCSI_NCR_SG_TABLESIZE, \
cmd_per_lun: SCSI_NCR_CMD_PER_LUN, \
use_clustering: DISABLE_CLUSTERING}
#elif LINUX_VERSION_CODE >= LinuxVersionCode(1,3,0)
#define NCR53C8XX { NULL, NULL, NULL, NULL, \
SCSI_NCR_DRIVER_NAME, ncr53c8xx_detect, \
ncr53c8xx_release, NULL, NULL, \
ncr53c8xx_queue_command,ncr53c8xx_abort, \
ncr53c8xx_reset, NULL, scsicam_bios_param, \
SCSI_NCR_CAN_QUEUE, 7, \
SCSI_NCR_SG_TABLESIZE, SCSI_NCR_CMD_PER_LUN, \
0, 0, DISABLE_CLUSTERING}
#else
#define NCR53C8XX { NULL, NULL, \
#define NCR53C8XX { NULL, NULL, NULL, NULL, \
SCSI_NCR_DRIVER_NAME, ncr53c8xx_detect, \
ncr53c8xx_release, NULL, NULL, \
ncr53c8xx_release, NULL, NULL, \
ncr53c8xx_queue_command,ncr53c8xx_abort, \
ncr53c8xx_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) */
#ifndef HOSTS_C
/*
......@@ -589,94 +559,6 @@ typedef struct {
1 \
}
/*
** Define the table of target capabilities by host and target
**
** If you have problems with a scsi device, note the host unit and the
** corresponding target number.
**
** Edit the corresponding entry of the table below and try successively:
** NQ7_Questionnable
** NQ7_IdeLike
**
** This bitmap is anded with the byte 7 of inquiry data on completion of
** INQUIRY command.
** The driver never see the zeroed bits and will ignore the corresponding
** capabilities of the target.
*/
#define INQ7_SftRe 1
#define INQ7_CmdQueue (1<<1) /* Tagged Command */
#define INQ7_Reserved (1<<2)
#define INQ7_Linked (1<<3)
#define INQ7_Sync (1<<4) /* Synchronous Negotiation */
#define INQ7_WBus16 (1<<5)
#define INQ7_WBus32 (1<<6)
#define INQ7_RelAdr (1<<7)
#define INQ7_IdeLike 0
#define INQ7_Scsi1Like INQ7_IdeLike
#define INQ7_Perfect 0xff
#define INQ7_Questionnable ~(INQ7_CmdQueue|INQ7_Sync)
#define INQ7_VeryQuestionnable \
~(INQ7_CmdQueue|INQ7_Sync|INQ7_WBus16|INQ7_WBus32)
#define INQ7_Default INQ7_Perfect
#define NCR53C8XX_TARGET_CAPABILITIES \
/* Host 0 */ \
{ \
{ \
/* Target 0 */ INQ7_Default, \
/* Target 1 */ INQ7_Default, \
/* Target 2 */ INQ7_Default, \
/* Target 3 */ INQ7_Default, \
/* Target 4 */ INQ7_Default, \
/* Target 5 */ INQ7_Default, \
/* Target 6 */ INQ7_Default, \
/* Target 7 */ INQ7_Default, \
/* Target 8 */ INQ7_Default, \
/* Target 9 */ INQ7_Default, \
/* Target 10 */ INQ7_Default, \
/* Target 11 */ INQ7_Default, \
/* Target 12 */ INQ7_Default, \
/* Target 13 */ INQ7_Default, \
/* Target 14 */ INQ7_Default, \
/* Target 15 */ INQ7_Default, \
} \
}, \
/* Host 1 */ \
{ \
{ \
/* Target 0 */ INQ7_Default, \
/* Target 1 */ INQ7_Default, \
/* Target 2 */ INQ7_Default, \
/* Target 3 */ INQ7_Default, \
/* Target 4 */ INQ7_Default, \
/* Target 5 */ INQ7_Default, \
/* Target 6 */ INQ7_Default, \
/* Target 7 */ INQ7_Default, \
/* Target 8 */ INQ7_Default, \
/* Target 9 */ INQ7_Default, \
/* Target 10 */ INQ7_Default, \
/* Target 11 */ INQ7_Default, \
/* Target 12 */ INQ7_Default, \
/* Target 13 */ INQ7_Default, \
/* Target 14 */ INQ7_Default, \
/* Target 15 */ INQ7_Default, \
} \
}
/*
** Replace the proc_dir_entry of the standard ncr driver.
*/
#if LINUX_VERSION_CODE >= LinuxVersionCode(1,3,0)
#if defined(CONFIG_SCSI_NCR53C7xx) || !defined(CONFIG_SCSI_NCR53C8XX)
#define PROC_SCSI_NCR53C8XX PROC_SCSI_NCR53C7xx
#endif
#endif
/**************** ORIGINAL CONTENT of ncrreg.h from FreeBSD ******************/
/*-----------------------------------------------------------------
......@@ -801,7 +683,11 @@ struct ncr_reg {
/*28*/ u_int32 nc_dnad; /* ### Next command register */
/*2c*/ u_int32 nc_dsp; /* --> Script Pointer */
/*30*/ u_int32 nc_dsps; /* --> Script pointer save/opcode#2 */
/*34*/ u_int32 nc_scratcha; /* ??? Temporary register a */
/*34*/ u_char nc_scratcha; /* Temporary register a */
/*35*/ u_char nc_scratcha1;
/*36*/ u_char nc_scratcha2;
/*37*/ u_char nc_scratcha3;
/*38*/ u_char nc_dmode;
#define BL_2 0x80 /* mod: burst length shift value +2 */
......@@ -1080,10 +966,10 @@ struct scr_tblsel {
/*-----------------------------------------------------------
**
** FROM_REG (reg) reg = SFBR
** FROM_REG (reg) SFBR = reg
** << 0 >>
**
** TO_REG (reg) SFBR = reg
** TO_REG (reg) reg = SFBR
** << 0 >>
**
** LOAD_REG (reg, data) reg = <data>
......@@ -1107,6 +993,42 @@ struct scr_tblsel {
#define SCR_LOAD_SFBR(data) \
(SCR_REG_SFBR (gpreg, SCR_LOAD, data))
/*-----------------------------------------------------------
**
** LOAD from memory to register.
** STORE from register to memory.
**
**-----------------------------------------------------------
**
** LOAD_ABS (LEN)
** <<start address>>
**
** LOAD_REL (LEN) (DSA relative)
** <<dsa_offset>>
**
**-----------------------------------------------------------
*/
#define SCR_NO_FLUSH2 0x02000000
#define SCR_DSA_REL2 0x10000000
#define SCR_LOAD_R(reg, how, n) \
(0xe1000000 | how | (SCR_REG_OFS(REG(reg))) | (n))
#define SCR_STORE_R(reg, how, n) \
(0xe0000000 | how | (SCR_REG_OFS(REG(reg))) | (n))
#define SCR_LOAD_ABS(reg, n) SCR_LOAD_R(reg, SCR_NO_FLUSH2, n)
#define SCR_LOAD_REL(reg, n) SCR_LOAD_R(reg, SCR_NO_FLUSH2|SCR_DSA_REL2, n)
#define SCR_LOAD_ABS_F(reg, n) SCR_LOAD_R(reg, 0, n)
#define SCR_LOAD_REL_F(reg, n) SCR_LOAD_R(reg, SCR_DSA_REL2, n)
#define SCR_STORE_ABS(reg, n) SCR_STORE_R(reg, SCR_NO_FLUSH2, n)
#define SCR_STORE_REL(reg, n) SCR_STORE_R(reg, SCR_NO_FLUSH2|SCR_DSA_REL2,n)
#define SCR_STORE_ABS_F(reg, n) SCR_STORE_R(reg, 0, n)
#define SCR_STORE_REL_F(reg, n) SCR_STORE_R(reg, SCR_DSA_REL2, n)
/*-----------------------------------------------------------
**
** Waiting for Disconnect or Reselect
......@@ -1143,7 +1065,7 @@ struct scr_tblsel {
**-----------------------------------------------------------
*/
#define SCR_NO_OP 0x80000000
#define SCR_NO_OP 0x80000000
#define SCR_JUMP 0x80080000
#define SCR_JUMPR 0x80880000
#define SCR_CALL 0x88080000
......
......@@ -274,6 +274,7 @@ static struct dev_info device_list[] =
{"NRC","MBR-7","*", BLIST_FORCELUN | BLIST_SINGLELUN},
{"NRC","MBR-7.4","*", BLIST_FORCELUN | BLIST_SINGLELUN},
{"NAKAMICH","MJ-4.8S","*", BLIST_FORCELUN | BLIST_SINGLELUN},
{"PIONEER","CD-ROM DRM-600","*", BLIST_FORCELUN | BLIST_SINGLELUN},
{"PIONEER","CD-ROM DRM-602X","*", BLIST_FORCELUN | BLIST_SINGLELUN},
{"PIONEER","CD-ROM DRM-604X","*", BLIST_FORCELUN | BLIST_SINGLELUN},
{"EMULEX","MD21/S2 ESDI","*", BLIST_SINGLELUN},
......
......@@ -180,7 +180,8 @@ void scsi_old_times_out (Scsi_Cmnd * SCpnt)
scsi_reset (SCpnt,
SCSI_RESET_ASYNCHRONOUS | SCSI_RESET_SUGGEST_BUS_RESET);
break;
case (IN_ABORT | IN_RESET | IN_RESET2):
case IN_RESET2:
case (IN_ABORT | IN_RESET2):
/* Obviously the bus reset didn't work.
* Let's try even harder and call for an HBA reset.
* Maybe the HBA itself crashed and this will shake it loose.
......
......@@ -191,7 +191,7 @@ static void send_sigio(int pid, uid_t uid, uid_t euid)
match = -p->pgrp;
if (pid != match)
continue;
if (!euid &&
if ((euid != 0) &&
(euid ^ p->suid) && (euid ^ p->uid) &&
(uid ^ p->suid) && (uid ^ p->uid))
continue;
......
......@@ -281,7 +281,6 @@ extern unsigned long put_dirty_page(struct task_struct * tsk,unsigned long page,
extern void free_page_tables(struct mm_struct * mm);
extern void clear_page_tables(struct task_struct * tsk);
extern int new_page_tables(struct task_struct * tsk);
extern int copy_page_tables(struct task_struct * to);
extern void zap_page_range(struct mm_struct *mm, unsigned long address, unsigned long size);
extern int copy_page_range(struct mm_struct *dst, struct mm_struct *src, struct vm_area_struct *vma);
......@@ -291,6 +290,7 @@ extern int zeromap_page_range(unsigned long from, unsigned long size, pgprot_t p
extern void vmtruncate(struct inode * inode, unsigned long offset);
extern void handle_mm_fault(struct task_struct *tsk,struct vm_area_struct *vma, unsigned long address, int write_access);
extern void check_pgt_cache(void);
extern void make_pages_present(unsigned long addr, unsigned long end);
extern unsigned long paging_init(unsigned long start_mem, unsigned long end_mem);
extern void mem_init(unsigned long start_mem, unsigned long end_mem);
......
......@@ -918,6 +918,22 @@ void handle_mm_fault(struct task_struct *tsk, struct vm_area_struct * vma,
oom(tsk);
}
/*
* Simplistic page force-in..
*/
void make_pages_present(unsigned long addr, unsigned long end)
{
int write;
struct vm_area_struct * vma;
vma = find_vma(current->mm, addr);
write = (vma->vm_flags & VM_WRITE) != 0;
while (addr < end) {
handle_mm_fault(current, vma, addr, write);
addr += PAGE_SIZE;
}
}
/* Low and high watermarks for page table cache.
The system should try to have pgt_water[0] <= cache elements <= pgt_water[1]
*/
......
......@@ -126,26 +126,7 @@ static int mlock_fixup(struct vm_area_struct * vma,
if (!(newflags & VM_LOCKED))
pages = -pages;
vma->vm_mm->locked_vm += pages;
#if 0
/*
* This is horribly broken. See the comment on the same
* brokenness in mm/mmap.c (essentially, this doesn't
* work anyway for PROT_NONE and writable pages, and now
* that we properly get the mmap semaphore it would just
* lock up on us).
*
* Fix the same way.
*/
if (newflags & VM_LOCKED) {
while (start < end) {
int c;
get_user(c,(int *) start);
__asm__ __volatile__("": :"r" (c));
start += PAGE_SIZE;
}
}
#endif
make_pages_present(start, end);
}
return retval;
}
......
......@@ -51,7 +51,7 @@ int sysctl_overcommit_memory;
/* Check that a process has enough memory to allocate a
* new virtual mapping.
*/
static inline int vm_enough_memory(long pages)
int vm_enough_memory(long pages)
{
/* Stupid algorithm to decide if we have enough memory: while
* simple, it hopefully works in most obvious cases.. Easy to
......@@ -318,27 +318,7 @@ unsigned long do_mmap(struct file * file, unsigned long addr, unsigned long len,
mm->total_vm += len >> PAGE_SHIFT;
if (flags & VM_LOCKED) {
mm->locked_vm += len >> PAGE_SHIFT;
/*
* This used to be just slightly broken, now it's just completely
* buggered. We can't take a page fault here, because we already
* hold the mm semaphore (as is proper). We should do this by hand
* by calling the appropriate fault-in routine.
*
* That would also fix this routine wrt writes and PROT_NONE
* areas, both of which can't be handled by the page fault
* approach anyway.
*/
#if 0
unsigned long start = addr;
do {
char c;
get_user(c,(char *) start);
len -= PAGE_SIZE;
start += PAGE_SIZE;
__asm__ __volatile__("": :"r" (c));
} while (len > 0);
#endif
make_pages_present(addr, addr + len);
}
return addr;
......
......@@ -21,6 +21,8 @@
#include <asm/system.h>
#include <asm/pgtable.h>
extern int vm_enough_memory(long pages);
static inline pte_t *get_one_pte(struct mm_struct *mm, unsigned long addr)
{
pgd_t * pgd;
......@@ -179,7 +181,7 @@ asmlinkage unsigned long sys_mremap(unsigned long addr,
* the unnecessary pages..
*/
ret = addr;
if (old_len > new_len) {
if (old_len >= new_len) {
do_munmap(addr+new_len, old_len - new_len);
goto out;
}
......@@ -205,6 +207,11 @@ asmlinkage unsigned long sys_mremap(unsigned long addr,
if ((current->mm->total_vm << PAGE_SHIFT) + (new_len - old_len)
> current->rlim[RLIMIT_AS].rlim_cur)
goto out;
/* Private writable mapping? Check memory availability.. */
if ((vma->vm_flags & (VM_SHARED | VM_WRITE)) == VM_WRITE &&
!(flags & MAP_NORESERVE) &&
!vm_enough_memory((new_len - old_len) >> PAGE_SHIFT))
goto out;
/* old_len exactly to the end of the area.. */
if (old_len == vma->vm_end - addr &&
......
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