David Brownell [Mon, 8 Apr 2002 08:01:34 +0000 (01:01 -0700)]
This patch is a more complete fix for the device refcount
sanity checking and cleanup on device disconnect.
- Splits apart usb_dec_dev_use(), for driver use, and
usb_free_dev(), for hub/hcd use. Both now have
kerneldoc, and will BUG() if the refcount and the
device tree get out of sync. (Except for cleanup of
root hub init errors, refcount must go to zero only
at the instant disconnect processing completes.)
- More usbcore-internal function declarations are
now moved out of <linux/usb.h> into hcd.h
- Driver-accessible refcounting is now inlined; minor
code shrinkage, it's using atomic inc/dec instructions
not function calls.
<note from greg k-h, there is still some work to be done with USB device
reference counting, but this patch is a step in the right direction.>
Anton Blanchard [Mon, 8 Apr 2002 04:31:16 +0000 (21:31 -0700)]
[PATCH] increase dynamic proc entries for ppc64
Unfortunately the proc filesystem has a limit on the number of dynamic
proc entries it can create. On large systems we can exhaust the default
(4096) very quickly. The following patch increases the default to
something more reasonable.
Anton Blanchard [Mon, 8 Apr 2002 04:30:51 +0000 (21:30 -0700)]
[PATCH] fix busy loop in migration thread init
Since we do not set the task state to TASK_INTERRUPTIBLE, we busy loop.
On larger SMP this can actually result in a lockup due to the way
migration thread initalisation is done (nr_cpus threads are created
and they all busy loop until the scheduler evenly distributes them,
one on each cpu. With this rogue thread busy looping things can become
unbalanced and the migration threads never distribute themselves onto
all cpus).
Dan Streetman [Mon, 8 Apr 2002 03:51:56 +0000 (20:51 -0700)]
[PATCH] usbfs disconnect
This was originally created by David many months ago and posted to the
list, but not put into the kernel.
I modified the original patch to:
-patch against the 2.5.7 kernel
-use the 'real' interface number, not position (to do this I added 2
methods in usb.c)
Anton Blanchard [Tue, 9 Apr 2002 03:58:44 +0000 (13:58 +1000)]
Make cond_syscall per arch. This is required on some architectures
(eg ppc64) where foo points to a function descriptor and .foo is
the address of the actual function.
This fixes a problem that I've not run into and is difficult to trigger,
but definately a bug. We locked urb->lock, when we meant u->lock. It also
cleans up the code a little to make it easier to understand and removes
an obsolete comment.
This patch merely cleans up the code a little and doesn't fix any bugs.
It makes a couple of code paths a bit easier to understand, removes an
unused variable (uhci_list) and some procfs variables when not using
procfs.
David Brownell [Sat, 6 Apr 2002 12:17:46 +0000 (04:17 -0800)]
USB usbnet driver update
- adds ethtool support (based on code from Brad Hards)
- makes diagnostic level configurable (ethtool, module param)
- fixes a minor mem_flags goof (thanks Oliver!)
- device identifers now use devpath (stable ID) not devnum
Ben Collins [Sat, 6 Apr 2002 00:36:43 +0000 (16:36 -0800)]
[PATCH] IEEE-1394 Updates
ieee1394 updates:
- New drivers: eth1394, admtp
- nodemgr cleanup
- Fixes for ohci
- fixed for node probes
- small misc performance fixes
- New /proc interface for subsystem, node listing, and dv1394
Andrew Morton [Sat, 6 Apr 2002 00:32:52 +0000 (16:32 -0800)]
[PATCH] ->setattr() locking changes
ext3 was missed - the removal of the BKL in notify_change
means that the filesytem fails quite quickly on SMP in -pre2.
Sorry, I should have spotted that when the patch floated past.
Neil Brown [Fri, 5 Apr 2002 07:11:29 +0000 (23:11 -0800)]
[PATCH] PATCH 3 of 4 : knfsd : Store the fsid in the returned attributes instead of the device number
When a filesystem is exported with fsid= we should use that
fsid instead of the i_dev number when returning NFS attributes,
so that there is no chance of clients that depend on the filesys
id in the attributes getting confused by device numbers changing.
We only do this if the reference filehandle uses fsid to identify
the filesystem, so that a server can be converted from non-fsid= to
using fsid= without confusing active clients.
Neil Brown [Fri, 5 Apr 2002 07:11:22 +0000 (23:11 -0800)]
[PATCH] PATCH 2 of 4 : knfsd : Allow exporting of deviceless filesystems if fsid= given
Previously we could only export FS_REQUIRES_DEV filesystems
as we need a devno to put in the filehandle.
Now that we have fsid= (NFSEXP_FSID) we don't need a devno
to put in the filehandle so we can relax this requirement.
Neil Brown [Fri, 5 Apr 2002 07:11:15 +0000 (23:11 -0800)]
[PATCH] PATCH 1 of 4 : knfsd : Use symbols for size calculation for response sizes.
Use symbolic names for some common size components in the response
size calculation for the NFSD. This makes it easier to get the
numbers right and to review them.
This patch also fixes a few number for nfsv3 that were wrong.
Lets just kill this check -- it usually only catches drivers queueing
something in front of a started request on their own (such as shoving a
request sense in front of a failed packet command, for instance). So
it's either working around this detection in some drivers, or killing
it. I vote for the latter, patch attached against 2.5.8-pre1 :-)
Robert Love [Thu, 4 Apr 2002 09:25:22 +0000 (01:25 -0800)]
[PATCH] preemptive kernel behavior change: don't be rude
- do not manually set task->state
- instead, in preempt_schedule, set a flag in preempt_count that
denotes that this task is entering schedule off a kernel preemption.
- use this flag in schedule to jump to pick_next_task
- in preempt_schedule, upon return from schedule, unset the flag
- have entry.S just call preempt_schedule and not duplicate this work,
as Linus suggested. I agree. Note this makes debugging easier as
we keep a single point of entry for kernel preemptions.
The result: we can safely preempt non-TASK_RUNNING tasks. If one is
preempted, we can safely survive schedule because we won't handle the
special casing of non-TASK_RUNNING at the top of schedule. Thus other
tasks can run as desired and our non-TASK_RUNNING task will eventually
be rescheduled, in its original state, and complete happily.
This is the behavior we have in the 2.4 patches and 2.5 until
~2.5.6-pre. This works. It requires no other changes elsewhere (it
actually removes some special-casing Ingo did in the signal code).
moved files to different subdirectories to make try to make sense
of the current mess, and to allow usb client drivers to integrate into
the tree easier.