David S. Miller [Sun, 17 Aug 2003 19:39:35 +0000 (12:39 -0700)]
[SCSI]: Fix bugs in sym2 hotplug conversion.
1) Make sym2_template.module get setup properly. It was
the scsi_module.c code taking care of this for us previously.
2) Zero out on-stack structures, in particular sym_dev not being
zeroed out was causing sometimes-boots-sometimes-doesnt problems
for me on sparc64 with sym2 non-modular.
Jamie Lokier [Sun, 17 Aug 2003 10:56:06 +0000 (03:56 -0700)]
[PATCH] make NFS lockd port numbers assignable at run time
When writing firewall rules, and you are serving NFS, it's really
useful to know the port numbers of the various NFS services. nfsd has
a standard value; mountd and statd are userspace daemons, and those
ports are settable on the command line.
The fiddly one is lockd. nlm_udpport and nlm_tcpport can be set on
the kernel command line or at module load time, but after that it's a
bit awkward (particularly as the lockd module can't be unloaded safely
- "rmmod -f lockd" sometimes panics).
This patch allows the port numbers and the other lockd parameters to
be set through files in /proc/sys/fs/nfs/nlm_*. The port numbers take
effect when lockd is next started or restarted.
In order to install the sysctl table even when compiled into the
kernel, it was necessary to update the initialisation code to the
current methods, using module_init() et al. This patch does that and
in so doing updates the module/kernel parameters to use the 2.6
module_param() method, as well as making the numeric range changes
consistent between the two.
Jamie Lokier [Sun, 17 Aug 2003 10:55:58 +0000 (03:55 -0700)]
[PATCH] use simple_strtoul for unsigned kernel parameters
The largest "unsigned int" value doesn't fit in a "long", on many machines.
So we should use simple_strtoul, not simple_strtol, to decode these values.
Adam Belay [Sun, 17 Aug 2003 10:24:02 +0000 (03:24 -0700)]
[PATCH] Fix sb_card.c for "name" removal
This will correct the sb_card compile error from removing "name" from
"struct device".
I also decided to read the name from the card structure instead of the
device structure because, for isapnp devices, the card structure is more
likely to contain an appropriate name.
Sam Ravnborg [Sun, 17 Aug 2003 09:29:08 +0000 (02:29 -0700)]
[PATCH] Move config tasks to kconfig/Makefile
This fixes a bug with multiple targets.
Olaf Hering reported that the build failed for PowerPc if used like
this: make oldconfig zImage
The reason for this was that .config was not present for any targets
specified in arch/$(ARCH)/Makefile and below.
That's because .config would not be included when oldconfig is present
in the list of targets. The fix is to move handling of *config task to
the kconfig/Makefile. Furthermore the logic in top-level makefile has
changed a bit, creating a more logial structure. When building a fresh
kernel, the user is now told that .config is missing, not an anonymous
report that .config did not exist.
The error has survided this long because the targets used in i386/boot
in general does not use CONFIG_ symbols.
James Bottomley [Sun, 17 Aug 2003 07:00:48 +0000 (02:00 -0500)]
scsi.h uses "u8" which isn't defined.
From: Muli Ben-Yehuda <mulix@mulix.org>
IMO, it's more correct to include <linux/types.h> in scsi.h, which
will bring in u8 and make scsi.h compilable on its own (provided
__KERNEL__ is defined, as it should be).
Jamie Lenehan [Sun, 17 Aug 2003 06:53:15 +0000 (01:53 -0500)]
[PATCH] dc395x - list handling cleanups
Here's another patch in the "try and make the driver readable"
cleanup series. This one cleans up all of the list handling.
Description: Replaced the various hand crafted scsi req lists
(waiting and going in the dcb and free in the acb) and the dcb list
(in the acb) with the generic linux lists. This makes all of the list
related code a *lot* more readable then it was previously.
Doug Ledford [Sun, 17 Aug 2003 09:29:33 +0000 (05:29 -0400)]
Reserve the sys_prctl() numbers for and add the stub for allowing
programs to select whether they use statistical time accounting
or accurate timestamp based accounting.
Jeff Garzik [Sun, 17 Aug 2003 08:23:28 +0000 (04:23 -0400)]
[arcnet com20020] misc fixes
* com20020_close expects two arguments (and actually uses the
second argument), but the arcnet layer only passes one arg.
Fun ensues.
* Remove __devinit markers, this is a library module.
* Move request_region up in com20020_found, to make the call
occur before the first I/O access in the function.
Albert Cahalan [Sun, 17 Aug 2003 01:48:39 +0000 (18:48 -0700)]
[PATCH] fast AND correct strncpy
This is Erik Andersen's excellent strncpy.
It works like magic. That "if" isn't a jump;
gcc uses a few integer instructions to wipe
out all jumps except for the loop itself and
the function call/return.
This has been exhaustively tested against glibc.
The existing code has 5 extra branches and
is over twice as large. (my gcc, etc.)
Dave Olien [Sun, 17 Aug 2003 01:42:26 +0000 (18:42 -0700)]
[PATCH] DAC960 fix for NULL dereference in open()
This fixes a problem that's been hidden for a while.
DAC960_open() will try to dereference a NULL pointer if an application
opens (for example) /dev/rd/c0d12 when there has never been a logical
device created for that file.
The scsi ones are already gone in jejb's tree, I'll post a patch
to kill the struct fields once the scsi tree and this patch end
up merged in mainline.
Alan Stern [Sat, 16 Aug 2003 06:28:53 +0000 (01:28 -0500)]
[PATCH] PATCH: (as70b) Update request_bufflen to match this_count
This patch addresses a problem in both sd.c and sr.c. When a read/write
command is initialized, the routines may reduce this_count (the number of
sectors to transfer) if it exceeds the maximum allowed value (i.e., 0xffff
for READ(10)). However, the code does not similarly alter
scmd->request_bufflen and scmd->bufflen to match the change in the CDB
value.
scmd->request_bufflen is important for the usb-storage driver, which
requires that it be exactly equal to the number of bytes transferred.
scmd->bufflen is used in the rw_intr() routines, where it is passed to
scsi_io_completion() as the number of sectors transferred if no errors
occur.
Another small change in the patch concerns the code in sr.c that checks
whether the total of the scatter-gather area lengths matches
scmd->request_bufflen. If they don't match, the patch bumps the kernel
log message level up to KERN_ERR, and it takes the more conservative
approach of adjusting scmd->request_bufflen only if the s-g length is
smaller than the request length.