]> git.neil.brown.name Git - history.git/log
history.git
23 years ago[PATCH] percpu: convert timers
Andrew Morton [Wed, 30 Oct 2002 07:31:37 +0000 (23:31 -0800)]
[PATCH] percpu: convert timers

Patch from Dipankar Sarma <dipankar@in.ibm.com>

This patch changes the per-CPU data in timer management (tvec_bases)
to use per_cpu data area and makes it safe for cpu_possible allocation
by using CPU notifiers. End result - saving space.

Depends on cpu_possible patch.

23 years ago[PATCH] percpu: convert RCU
Andrew Morton [Wed, 30 Oct 2002 07:31:27 +0000 (23:31 -0800)]
[PATCH] percpu: convert RCU

Patch from Dipankar Sarma <dipankar@in.ibm.com>

This patch convers RCU per_cpu data to use per_cpu data area
and makes it safe for cpu_possible allocation by using CPU
notifiers.

23 years ago[PATCH] percpu: fix compile warning for UP builds
Andrew Morton [Wed, 30 Oct 2002 07:31:18 +0000 (23:31 -0800)]
[PATCH] percpu: fix compile warning for UP builds

A typical construct is:

int cpu = get_cpu();

foo = per_cpu(bar, cpu);
put_cpu();

but this generates a compiler warning on uniprocessor builds: unused
variable `cpu'.

Add a dummy ref to `cpu' to per_cpu() to prevent this.

23 years ago[PATCH] percpu: balance_dirty_pages ratelimit counters
Andrew Morton [Wed, 30 Oct 2002 07:31:09 +0000 (23:31 -0800)]
[PATCH] percpu: balance_dirty_pages ratelimit counters

Convert balance_dirty_pages_ratelimited() to use percpu storage
for the ratelimiting counters.

23 years ago[PATCH] slab: Use CPU notifiers
Andrew Morton [Wed, 30 Oct 2002 07:25:42 +0000 (23:25 -0800)]
[PATCH] slab: Use CPU notifiers

- allocate memory for cpu buffers in cpu_up_prepare

- start the timer in cpu_online

- free the memory for cpu buffers in cpu_up_cancel.

23 years ago[PATCH] slab: additional code cleanup
Andrew Morton [Wed, 30 Oct 2002 07:25:32 +0000 (23:25 -0800)]
[PATCH] slab: additional code cleanup

From Manfred Spraul

- remove all typedef, except the kmem_bufctl_t.  It's a redefine for
  an int, i.e.  qualifies as tiny.

- convert most macros to inline functions.

23 years ago[PATCH] slab: Remove cache_chain_lock
Andrew Morton [Wed, 30 Oct 2002 07:25:23 +0000 (23:25 -0800)]
[PATCH] slab: Remove cache_chain_lock

Manfred added a new lock to protect the global list of slab caches.  We
already have a semaphore from those but he needs locking from timer
context.

So here we remove that lock and just do a down_trylock() on the
existing semaphore.  If that fails give up - we'll try again next timer
tick.

23 years ago[PATCH] slab: Rework the slab timer code to use add_timer_on
Andrew Morton [Wed, 30 Oct 2002 07:25:13 +0000 (23:25 -0800)]
[PATCH] slab: Rework the slab timer code to use add_timer_on

Manfred had all this weird code to schedule a kernel thread onto a
different CPU just so that we could bond a timer to that CPU.

Convert it all to use the new add_timer_on().

23 years ago[PATCH] slab: reap timers
Andrew Morton [Wed, 30 Oct 2002 07:25:03 +0000 (23:25 -0800)]
[PATCH] slab: reap timers

- add a reap timer that returns stale objects from the cpu arrays
- use list_for_each instead of while loops
- /proc/slabinfo layout change, for a new field about reaping.

Implementation:
slab contains 2 caches that contain objects that might be usable to the
systems:
- the cpu arrays contains objects that other cpus could use
- the slabs_free list contains freeable slabs, i.e. pages that someone
else might want.

The patch now keeps track of accesses to the cpu arrays and to the free
list. If there were no recent activities in one of the caches, part of
the cache is flushed.

Unlike <2.5.39, only a small part (~20%) is flushed each time:
The older kernel would refill/drain bounce heavily under memory pressure:

- kmem_cache_alloc: notices that there are no objects in the cpu
        cache, loads 120 objects from the slab lists, return 1.
        [assuming batchcount=120]
- kmem_cache_reap is called due to memory pressure, finds 119
        objects in the cpu array and returns them to the slab lists.
- repeat.

In addition, the length of the free list is limited based on the free
list accesses: a fixed "1" limit hurts the large object caches.

That's the last part for now, next is: [not yet written]
- cleanup: BUG_ON instead of if() BUG
- OOM handling for enable_cpucaches
- remove the unconditional might_sleep() from
        cache_alloc_debugcheck_before, and make that DEBUG dependant.
- initial NUMA support, just to collect some stats:
        Which percentage of the objects are freed on the wrong
        node? 0.1% or 20%?

23 years ago[PATCH] slab: uninline poisoning checks
Andrew Morton [Wed, 30 Oct 2002 07:24:52 +0000 (23:24 -0800)]
[PATCH] slab: uninline poisoning checks

remove inline from the cache poison checks: the functions are not
performance critical.

23 years ago[PATCH] slab: cleanups and speedups
Andrew Morton [Wed, 30 Oct 2002 07:24:43 +0000 (23:24 -0800)]
[PATCH] slab: cleanups and speedups

- enable the cpu array for all caches

- remove the optimized implementations for quick list access - with
  cpu arrays in all caches, the list access is now rare.

- make the cpu arrays mandatory, this removes 50% of the conditional
  branches from the hot path of kmem_cache_alloc [1]

- poisoning for objects with constructors

Patch got a bit longer...

I forgot to mention this: head arrays mean that some pages can be
blocked due to objects in the head arrays, and not returned to
page_alloc.c.  The current kernel never flushes the head arrays, this
might worsen the behaviour of low memory systems.  The hunk that
flushes the arrays regularly comes next.

Details changelog: [to be read site by side with the patch]

* docu update

* "growing" is not really needed: races between grow and shrink are
  handled by retrying.  [additionally, the current kernel never
  shrinks]

* move the batchcount into the cpu array:
the old code contained a race during cpu cache tuning:
update batchcount [in cachep] before or after the IPI?
And NUMA will need it anyway.

* bootstrap support: the cpu arrays are really mandatory, nothing
  works without them.  Thus a statically allocated cpu array is needed
  to for starting the allocators.

* move the full, partial & free lists into a separate structure, as a
  preparation for NUMA

* structure reorganization: now the cpu arrays are the most important
  part, not the lists.

* dead code elimination: remove "failures", nowhere read.

* dead code elimination: remove "OPTIMIZE": not implemented.  The
  idea is to skip the virt_to_page lookup for caches with on-slab slab
  structures, and use (ptr&PAGE_MASK) instead.  The details are in
  Bonwicks paper.  Not fully implemented.

* remove GROWN: kernel never shrinks a cache, thus grown is
  meaningless.

* bootstrap: starting the slab allocator is now a 3 stage process:
- nothing works, use the statically allocated cpu arrays.
- the smallest kmalloc allocator works, use it to allocate
cpu arrays.
- all kmalloc allocators work, use the default cpu array size

* register a cpu nodifier callback, and allocate the needed head
  arrays if a new cpu arrives

* always enable head arrays, even for DEBUG builds.  Poisoning and
  red-zoning now happens before an object is added to the arrays.
  Insert enable_all_cpucaches into cpucache_init, there is no need for
  seperate function.

* modifications to the debug checks due to the earlier calls of the
  dtor for caches with poisoning enabled

* poison+ctor is now supported

* squeezing 3 objects into a cacheline is hopeless, the FIXME is not
  solvable and can be removed.

* add additional debug tests: check_irq_off(), check_irq_on(),
  check_spinlock_acquired().

* move do_ccupdate_local nearer to do_tune_cpucache.  Should have
  been part of -04-drain.

* additional objects checks.  red-zoning is tricky: it's implemented
  by increasing the object size by 2*BYTES_PER_WORD.  Thus
  BYTES_PER_WORD must be added to objp before calling the destructor,
  constructor or before returing the object from alloc.  The poison
  functions add BYTES_PER_WORD internally.

* create a flagcheck function, right now the tests are duplicated in
  cache_grow [always] and alloc_debugcheck_before [DEBUG only]

* modify slab list updates: all allocs are now bulk allocs that try
  to get multiple objects at once, update the list pointers only at the
  end of a bulk alloc, not once per alloc.

* might_sleep was moved into kmem_flagcheck.

* major hotpath change:
- cc always exists, no fallback
- cache_alloc_refill is called with disabled interrupts,
  and does everything to recover from an empty cpu array.
  Far shorter & simpler __cache_alloc [inlined in both
  kmalloc and kmem_cache_alloc]

* __free_block, free_block, cache_flusharray: main implementation of
  returning objects to the lists.  no big changes, diff lost track.

* new debug check: too early kmalloc or kmem_cache_alloc

* slightly reduce the sizes of the cpu arrays: keep the size < a
  power of 2, including batchcount, avail and now limit, for optimal
  kmalloc memory efficiency.

That's it.  I even found 2 bugs while reading: dtors and ctors for
verify were called with wrong parameters, with RED_ZONE enabled, and
some checks still assumed that POISON and ctor are incompatible.

23 years ago[PATCH] slab: remove spaces from /proc identifiers
Andrew Morton [Wed, 30 Oct 2002 07:24:33 +0000 (23:24 -0800)]
[PATCH] slab: remove spaces from /proc identifiers

From Manfred Spraul

remove the space from the name of the DMA caches: they make it
impossible to tune the caches through /proc/slabinfo, and make parsing
/proc/slabinfo difficult

23 years ago[PATCH] slab: take the spinlock in the drain function.
Andrew Morton [Wed, 30 Oct 2002 07:24:23 +0000 (23:24 -0800)]
[PATCH] slab: take the spinlock in the drain function.

In 2.5, local_irq_disable() provides protection against
smp_call_function() on all architectures.  (Or it will, not sure.  But
davem says this is OK).

So a spin_lock() within the smp_call_function() callback is now
permitted, and we can remove/cleanup the workaround.

23 years ago[PATCH] slab: reduce internal fragmentation
Andrew Morton [Wed, 30 Oct 2002 07:24:12 +0000 (23:24 -0800)]
[PATCH] slab: reduce internal fragmentation

From Manfred Spraul

If an object is freed from a slab, then move the slab to the tail of
the partial list - this should increase the probability that the other
objects from the same page are freed, too, and that a page can be
returned to gfp later.

In other words: if we just freed an object from this page then make
this page be the *last* page which is eligible for new allocations.
Under the assumption that other objects in that same page are about to
be freed up as well.

The cpu arrays are now always in front of the list, i.e.  cache hit
rates should not matter.

23 years ago[PATCH] slab: enable the cpu arrays on uniprocessor
Andrew Morton [Wed, 30 Oct 2002 07:24:02 +0000 (23:24 -0800)]
[PATCH] slab: enable the cpu arrays on uniprocessor

From Manfred Spraul

Always enable the cpu arrays, even on uniprocessor.

They provide LIFO ordering, which should improve cache hit rates.  And
the array allocator is slightly faster than the list operations.

23 years ago[PATCH] slab: cleanup: rename static functions
Andrew Morton [Wed, 30 Oct 2002 07:23:53 +0000 (23:23 -0800)]
[PATCH] slab: cleanup: rename static functions

From Manfred Spraul

remove kmem_ from all static function that are only used in slab.c.
Except kmem_cache_slabmgmt, I've renamed it to alloc_slabmgmt().

23 years ago[PATCH] slab: add_timer_on: add a timer on a particular CPU
Andrew Morton [Wed, 30 Oct 2002 07:23:44 +0000 (23:23 -0800)]
[PATCH] slab: add_timer_on: add a timer on a particular CPU

add_timer_on is like add_timer, except it takes a target CPU on which
to add the timer.

The slab code needs per-cpu timers for shrinking the per-cpu caches.

23 years ago[PATCH] slab: extended cpu notifiers
Andrew Morton [Wed, 30 Oct 2002 07:23:34 +0000 (23:23 -0800)]
[PATCH] slab: extended cpu notifiers

Patch from Dipankar Sarma  <dipankar@in.ibm.com>

This is Manfred's patch which provides a CPU_UP_PREPARE cpu notifier to
allow initialization of per_cpu data just before the cpu becomes fully
functional.

It also provides a facility for the CPU_UP_PREPARE handler to return
NOTIFY_BAD to signify that the CPU is not permitted to come up.  If
that happens, a CPU_UP_CANCELLED message is passed to all the handlers.

The patch also fixes a bogus NOFITY_BAD return from the softirq setup
code.

Patch has been acked by Rusty.

We need this mechanism in slab for starting per-cpu timers and for
allocating the per-cpu slab hgead arrays *before* the CPU has come up
and started using slab.

23 years ago[PATCH] misc PA updates
Matthew Wilcox [Wed, 30 Oct 2002 07:06:27 +0000 (23:06 -0800)]
[PATCH] misc PA updates

 - Remove obsolete documentation
 - Update arch/parisc/lib
 - Remove arch/parisc/tools, we use asm-offsets.c these days
 - Update arch/parisc/Makefile, defconfig & vmlinux.lds.S

23 years ago[PATCH] parisc64
Matthew Wilcox [Wed, 30 Oct 2002 07:01:35 +0000 (23:01 -0800)]
[PATCH] parisc64

Add support for the parisc64 architecture.

23 years ago[PATCH] perf monitor for PA-RISC
Matthew Wilcox [Wed, 30 Oct 2002 07:01:25 +0000 (23:01 -0800)]
[PATCH] perf monitor for PA-RISC

Performance monitor support for PA8000+ processors.

23 years ago[PATCH] arch/parisc/kernel
Matthew Wilcox [Wed, 30 Oct 2002 07:01:13 +0000 (23:01 -0800)]
[PATCH] arch/parisc/kernel

Update arch/parisc/kernel.

23 years ago[PATCH] arch/parisc/mm
Matthew Wilcox [Wed, 30 Oct 2002 07:01:01 +0000 (23:01 -0800)]
[PATCH] arch/parisc/mm

Update arch/parisc/mm

23 years ago[PATCH] include/asm-parisc
Matthew Wilcox [Wed, 30 Oct 2002 07:00:20 +0000 (23:00 -0800)]
[PATCH] include/asm-parisc

Update include/asm-parisc

23 years ago[PATCH] PA-RISC math emu
Matthew Wilcox [Wed, 30 Oct 2002 07:00:00 +0000 (23:00 -0800)]
[PATCH] PA-RISC math emu

Add support for unimplemented FP ops on PA processors.

23 years ago[PATCH] sonypi driver update
Stelian Pop [Wed, 30 Oct 2002 06:59:36 +0000 (22:59 -0800)]
[PATCH] sonypi driver update

This patch adds some new events to the sonypi driver (Fn key
pressed alone, jogdial turned fast or very fast) and cleanups
the code a little bit.

Thanks to Christian Gennerat for this contribution.

23 years agoMerge penguin.transmeta.com:/home/penguin/torvalds/repositories/kernel/epoll-0.15
Linus Torvalds [Wed, 30 Oct 2002 06:54:51 +0000 (22:54 -0800)]
Merge penguin.transmeta.com:/home/penguin/torvalds/repositories/kernel/epoll-0.15
into penguin.transmeta.com:/home/penguin/torvalds/repositories/kernel/linux

23 years ago[PATCH] sys_epoll 0.15
Davide Libenzi [Wed, 30 Oct 2002 06:35:31 +0000 (22:35 -0800)]
[PATCH] sys_epoll 0.15

Latest version of the epoll interfaces.

23 years agoMerge bk://ldm.bkbits.net/linux-2.5-kobject
Linus Torvalds [Wed, 30 Oct 2002 05:21:02 +0000 (21:21 -0800)]
Merge bk://ldm.bkbits.net/linux-2.5-kobject
into penguin.transmeta.com:/home/penguin/torvalds/repositories/kernel/linux

23 years agoMerge osdl.org:/home/mochel/src/kernel/devel/linux-2.5-virgin
Patrick Mochel [Wed, 30 Oct 2002 04:50:14 +0000 (20:50 -0800)]
Merge osdl.org:/home/mochel/src/kernel/devel/linux-2.5-virgin
into osdl.org:/home/mochel/src/kernel/devel/linux-2.5-kobject

23 years agokobjects: add array of default attributes to subsystems, and create on registration.
Patrick Mochel [Wed, 30 Oct 2002 04:41:43 +0000 (20:41 -0800)]
kobjects: add array of default attributes to subsystems, and create on registration.

struct subsystem may now contain a pointer to a NULL-terminated array of
default attributes to be exported when an object is registered with the subsystem.
kobject registration will check the return values of the directory creation and
the creation of each file, and handle it appropriately.

The documentation has also been updated.

23 years agosysfs: kill struct sysfs_dir.
Patrick Mochel [Wed, 30 Oct 2002 04:27:36 +0000 (20:27 -0800)]
sysfs: kill struct sysfs_dir.

Previously, sysfs read() and write() calls looked for sysfs_ops in the struct
sysfs_dir, in the kobject. Since objects belong to a subsystem, and is a member
of a group of like devices, the sysfs_ops have been moved to struct subsystem,
and are referenced from there.

The only remaining member of struct sysfs_dir is the dentry of the object's
directory. That is moved out of the dir struct and directly into struct kobject.
That saves us 4 bytes/object.

All of the sysfs functions that referenced the struct have been changed to just
reference the dentry.

23 years agoMerge penguin.transmeta.com:/home/penguin/torvalds/repositories/kernel/kconfig
Linus Torvalds [Wed, 30 Oct 2002 04:24:40 +0000 (20:24 -0800)]
Merge penguin.transmeta.com:/home/penguin/torvalds/repositories/kernel/kconfig
into penguin.transmeta.com:/home/penguin/torvalds/repositories/kernel/linux

23 years ago[PATCH] kconfig "choice" fixes
Roman Zippel [Wed, 30 Oct 2002 04:20:29 +0000 (20:20 -0800)]
[PATCH] kconfig "choice" fixes

This fixes "choice" behaviour - it sets the correct default and fixes
oldconfig.

23 years agoMerge http://mdomsch.bkbits.net/linux-2.5-edd-tolinus
Linus Torvalds [Wed, 30 Oct 2002 04:05:20 +0000 (20:05 -0800)]
Merge http://mdomsch.bkbits.net/linux-2.5-edd-tolinus
into penguin.transmeta.com:/home/penguin/torvalds/repositories/kernel/linux

23 years agoMerge dell.com:/home/mdomsch/bk/linux-2.5
Matt Domsch [Wed, 30 Oct 2002 07:28:42 +0000 (01:28 -0600)]
Merge dell.com:/home/mdomsch/bk/linux-2.5
into dell.com:/home/mdomsch/bk/linux-2.5-edd-tolinus

23 years agoIntroduce struct subsystem.
Patrick Mochel [Wed, 30 Oct 2002 03:47:41 +0000 (19:47 -0800)]
Introduce struct subsystem.

A struct subsystem is basically a collection of objects of a certain type,
and some callbacks to operate on objects of that type.

subsystems contain embedded kobjects themselves, and have a similar set of
library routines that kobjects do, which are mostly just wrappers for the
correlating kobject routines.

kobjects are inserted in depth-first order into their subsystem's list of
objects. Orphan kobjects are also given foster parents that point to their
subsystem. This provides a bit more rigidity in the hierarchy, and disallows
any orphan kobjects.

When an object is unregistered, it is removed from its subsystem's list. When
the objects' refcount hits 0, the subsystem's ->release() callback is called.

Documentation describing the objects and the interfaces has also been added.

23 years agoMerge home.transmeta.com:/home/torvalds/v2.5/kconfig
Linus Torvalds [Wed, 30 Oct 2002 02:29:16 +0000 (18:29 -0800)]
Merge home.transmeta.com:/home/torvalds/v2.5/kconfig
into home.transmeta.com:/home/torvalds/v2.5/newconfig

23 years agoMerge bk://linuxusb.bkbits.net/linus-2.5
Linus Torvalds [Wed, 30 Oct 2002 01:57:36 +0000 (17:57 -0800)]
Merge bk://linuxusb.bkbits.net/linus-2.5
into home.transmeta.com:/home/torvalds/v2.5/linux

23 years agoUSB: fix usbmidi driver for no automatic resubmission of interrupt urbs
Greg Kroah-Hartman [Wed, 30 Oct 2002 01:41:59 +0000 (17:41 -0800)]
USB: fix usbmidi driver for no automatic resubmission of interrupt urbs

23 years ago[PATCH] kconfig update
Roman Zippel [Wed, 30 Oct 2002 01:17:40 +0000 (17:17 -0800)]
[PATCH] kconfig update

Add new configs to match changes done lately.

23 years agoMerge http://linux-isdn.bkbits.net/linux-2.5.make
Linus Torvalds [Wed, 30 Oct 2002 01:14:57 +0000 (17:14 -0800)]
Merge http://linux-isdn.bkbits.net/linux-2.5.make
into home.transmeta.com:/home/torvalds/v2.5/kconfig

23 years agokbuild: Fix menuconfig/xconfig and a modversions problem
Kai Germaschewski [Wed, 30 Oct 2002 03:23:01 +0000 (21:23 -0600)]
kbuild: Fix menuconfig/xconfig and a modversions problem

If we are to build menuconfig/xconfig, we may not have a .config
yet, so we shouldn't try to include it.

Set MODVERDIR before including the subdir Makefile, drivers/scsi/53c700
needs it.

23 years ago[PATCH] loop breakage fix
Alexander Viro [Wed, 30 Oct 2002 01:13:01 +0000 (17:13 -0800)]
[PATCH] loop breakage fix

Got it.  Breakage happened when Jens was switching to partial
completions - !uptodate is not quite the same as !err ;-)

With this fixed everything seems to work nicely.

23 years agoMerge http://linux-isdn.bkbits.net/linux-2.5.isdn
Linus Torvalds [Wed, 30 Oct 2002 01:06:09 +0000 (17:06 -0800)]
Merge http://linux-isdn.bkbits.net/linux-2.5.isdn
into home.transmeta.com:/home/torvalds/v2.5/linux

23 years agoMerge kroah.com:/home/linux/linux/BK/bleeding-2.5
Greg Kroah-Hartman [Wed, 30 Oct 2002 00:55:41 +0000 (16:55 -0800)]
Merge kroah.com:/home/linux/linux/BK/bleeding-2.5
into kroah.com:/home/linux/linux/BK/gregkh-2.5

23 years agosysfs: make symlinks easier.
Patrick Mochel [Tue, 29 Oct 2002 17:26:38 +0000 (09:26 -0800)]
sysfs: make symlinks easier.

It's now

int sysfs_create_link(struct kobject * kobj, struct kobject * target, char * name)

So, the caller doesn't have to determine the path of the target nor the depth of
the object we're creating the symlink for; it's all taken care of.

23 years ago[PATCH] usbtest mentions url
David Brownell [Tue, 29 Oct 2002 16:12:57 +0000 (08:12 -0800)]
[PATCH] usbtest mentions url

This mentions the web page with information about how to use
the 'usbtest' driver.

23 years ago[PATCH] ohci td error cleanup
David Brownell [Tue, 29 Oct 2002 16:12:42 +0000 (08:12 -0800)]
[PATCH] ohci td error cleanup

This is a version of a patch I sent out last Friday to help
address some of the "bad entry" errors that some folk
were seeing, seemingly only with control requests.  The fix
is just to not try being clever: remove one TD at a time and
patch the ED as if that TD had completed normally, then do
the next ... don't try to patch just once in this fault case.
(And it nukes some debug info I accidently submitted.)

I've gotten preliminary feedback that this helps.

23 years agoUSB: drivers/net/irda fixups due to USB structure changes.
Greg Kroah-Hartman [Tue, 29 Oct 2002 16:06:10 +0000 (08:06 -0800)]
USB: drivers/net/irda fixups due to USB structure changes.

23 years agoUSB: drivers/isdn/hisax fixups due to USB structure changes.
Greg Kroah-Hartman [Tue, 29 Oct 2002 16:05:31 +0000 (08:05 -0800)]
USB: drivers/isdn/hisax fixups due to USB structure changes.

23 years agoUSB: drivers/usb fixups due to USB structure changes.
Greg Kroah-Hartman [Tue, 29 Oct 2002 16:04:37 +0000 (08:04 -0800)]
USB: drivers/usb fixups due to USB structure changes.

23 years agoUSB: sound/usb fixups due to USB structure changes.
Greg Kroah-Hartman [Tue, 29 Oct 2002 16:03:43 +0000 (08:03 -0800)]
USB: sound/usb fixups due to USB structure changes.

23 years agoUSB: drivers/usb fixups due to USB structure changes.
Greg Kroah-Hartman [Tue, 29 Oct 2002 16:02:56 +0000 (08:02 -0800)]
USB: drivers/usb fixups due to USB structure changes.

23 years agoUSB: usb serial driver fixes due to USB structure changes.
Greg Kroah-Hartman [Tue, 29 Oct 2002 16:01:46 +0000 (08:01 -0800)]
USB: usb serial driver fixes due to USB structure changes.

23 years ago[PATCH] USB: clean up usb structures some more
David Brownell [Tue, 29 Oct 2002 15:43:32 +0000 (07:43 -0800)]
[PATCH] USB: clean up usb structures some more

This patch splits up the usb structures to have two structs,
"usb_XXX_descriptor" with just the descriptor, and "usb_host_XXX" (or
something similar) to wrap it and add the "extra" pointers plus the
array of related descriptors that the host parsed during enumeration.
(2 or 3 words extra in each"usb_host_XXX".)  This further matches the
"on the wire" data and enables the gadget drivers to share the same
header file.

Covers all the linux/drivers/usb/* and linux/sound/usb/* stuff, but
not a handful of other drivers (bluetooth, iforce, hisax, irda) that
are out of the usb tree and will likely be affected.

23 years agoMerge osdl.org:/home/mochel/src/kernel/devel/linux-2.5-virgin
Patrick Mochel [Tue, 29 Oct 2002 15:14:59 +0000 (07:14 -0800)]
Merge osdl.org:/home/mochel/src/kernel/devel/linux-2.5-virgin
into osdl.org:/home/mochel/src/kernel/devel/linux-2.5-kobject

23 years agoMerge tp1.ruhr-uni-bochum.de:/home/kai/src/kernel/v2.5/linux-2.5
Kai Germaschewski [Tue, 29 Oct 2002 15:04:37 +0000 (09:04 -0600)]
Merge tp1.ruhr-uni-bochum.de:/home/kai/src/kernel/v2.5/linux-2.5
into tp1.ruhr-uni-bochum.de:/home/kai/src/kernel/v2.5/linux-2.5.isdn

23 years agoISDN: lock only used driver
Kai Germaschewski [Tue, 29 Oct 2002 15:02:41 +0000 (09:02 -0600)]
ISDN: lock only used driver

We used to lock (ind mod use count) all drivers just in case, but
it makes more sense to only lock the one we're just using, in
particular since the old scheme was rather broken when insmod'ing
a new driver later.

23 years agoISDN: ttyI cleanups
Kai Germaschewski [Tue, 29 Oct 2002 15:01:57 +0000 (09:01 -0600)]
ISDN: ttyI cleanups

Now that ttyI's take care of their own business, some cross links
between isdn_common and isdn_tty can finally go away.

23 years agoISDN: New timer handling for read timer
Kai Germaschewski [Tue, 29 Oct 2002 15:01:08 +0000 (09:01 -0600)]
ISDN: New timer handling for read timer

Again, use a per ttyI timer handler to feed arrived data into the
ttyI. Really, there shouldn't be the need for any timer at all,
rather working flow control, but that'll take a bit to fix.

23 years agoISDN: Remove delayed ttyI xmit
Kai Germaschewski [Tue, 29 Oct 2002 15:00:20 +0000 (09:00 -0600)]
ISDN: Remove delayed ttyI xmit

There's really no good reason to delay sending out data on a ttyI, ISDN
is slow enough anyway ;)

(There is one reason, i.e. allowing to coalesce multiple chars, but
that is better fixed by having the upper levels (tty) send larger
buffers)

23 years agoISDN: New timer handling for ttyI NO CARRIER response
Kai Germaschewski [Tue, 29 Oct 2002 14:59:40 +0000 (08:59 -0600)]
ISDN: New timer handling for ttyI NO CARRIER response

Again, use a per ttyI timer handler for NO CARRIER messages, only
activated when used.

23 years agoISDN: New timer handling for ttyI RING response
Kai Germaschewski [Tue, 29 Oct 2002 14:58:11 +0000 (08:58 -0600)]
ISDN: New timer handling for ttyI RING response

Again, use a per ttyI timer handler for RING messages, only activated
when used.

23 years agoISDN: New timer handling for "+++" escape sequence
Kai Germaschewski [Tue, 29 Oct 2002 14:57:04 +0000 (08:57 -0600)]
ISDN: New timer handling for "+++" escape sequence

Instead of having one common timer and walking the list of
all ISDN channels, which might be possibly associated with a
ttyI and even more possibly so waiting for the silence period
after "+++", just use a per ttyI timer, which only gets activated
when necessary.

23 years agoISDN: Pass around struct isdn_slot directly
Kai Germaschewski [Tue, 29 Oct 2002 14:56:02 +0000 (08:56 -0600)]
ISDN: Pass around struct isdn_slot directly

The common way in the kernel is to pass around the struct (e.g.
struct net_device), and leave the user the possibility to add
its private data using ::priv, so do it the same way when accessing
an ISDN channel.

23 years agoISDN: stat_callback() and recv_callback() -> event_callback()
Kai Germaschewski [Tue, 29 Oct 2002 14:54:55 +0000 (08:54 -0600)]
ISDN: stat_callback() and recv_callback() -> event_callback()

Merge the two different types of callbacks into just one, there's no
good reasons for the receive callback to be different, in particular since
we pass things through the same state machine later anyway.

23 years agoISDN: Remove isdn_dc2minor(), isdn_slot_all_eaz()
Kai Germaschewski [Tue, 29 Oct 2002 14:53:58 +0000 (08:53 -0600)]
ISDN: Remove isdn_dc2minor(), isdn_slot_all_eaz()

The internal driver/channel relations shouldn't leak out to users
of the ISDN code, and isdn_slot_all_eaz() can be taken over by common
code as well.

23 years agoISDN: Fix isdnloop for transparent/V.110
Kai Germaschewski [Tue, 29 Oct 2002 14:53:02 +0000 (08:53 -0600)]
ISDN: Fix isdnloop for transparent/V.110

For some reason, isdnloop didn't support the transparent encoding,
which is necessary for testing V.110. Testing also found a typo
causing an oops in isdn_common.c. Fixed.

23 years agoISDN: Make V.110 support less intrusive
Kai Germaschewski [Tue, 29 Oct 2002 14:52:15 +0000 (08:52 -0600)]
ISDN: Make V.110 support less intrusive

It'd probably make more sense to provide it in library form
to the hardware drivers which don't support V.110 natively, but for
now it's at least collected in one place.

23 years agoISDN: Assorted cleanups
Kai Germaschewski [Tue, 29 Oct 2002 14:50:59 +0000 (08:50 -0600)]
ISDN: Assorted cleanups

Remove the legacy functions

    isdn_slot_readbchan(int slot, u_char *, u_char *, int);
    isdn_slot_driver(int slot);
    isdn_slot_channel(int slot);
    isdn_slot_set_usage(int slot, int usage);
    isdn_drv_writebuf_skb(int di, int ch, int x, struct sk_buff *skb);
    isdn_drv_hdrlen(int di);

Most of their tasks have been taken over by isdn_common.c, or are
obsoleted by using the isdn_slot based approach.

23 years agoISDN: Move the tty receive queue out of generic code
Kai Germaschewski [Tue, 29 Oct 2002 14:49:56 +0000 (08:49 -0600)]
ISDN: Move the tty receive queue out of generic code

Moving the tty receive queue into the tty-specific data in fact
simplifies the common code (which doesn't need to know it at all, now),
and the tty code, which can access the queue more directly.

23 years agoISDN: Route all driver callbacks through the driver state machine
Kai Germaschewski [Tue, 29 Oct 2002 14:48:51 +0000 (08:48 -0600)]
ISDN: Route all driver callbacks through the driver state machine

We used to intercept status callbacks which were for specific channels
instead of the driver before passing them to the driver and short-cutting
to them to the per-channel state machine. Do it correctly for now,
i.e. callback -> driver -> channel, even though that might have a small
performance hit. Correctness first.

23 years agoISDN: Remove ttyI specific from global "dev" variable
Kai Germaschewski [Tue, 29 Oct 2002 14:47:51 +0000 (08:47 -0600)]
ISDN: Remove ttyI specific from global "dev" variable

ISDN still has a huge global struct called "dev", which is a mess
of parts which should be private to their respective subsystem.
It's supposed to die, this is another step in making that happen.

23 years agoISDN: Signal incoming calls to ttyI's again
Kai Germaschewski [Tue, 29 Oct 2002 14:46:49 +0000 (08:46 -0600)]
ISDN: Signal incoming calls to ttyI's again

Change the incoming call logic: Incoming calls are signalled to
the net interface code first, then the tty code. It's the lower level's
responsibility to claim the call by issueing ISDN_CMD_ACCEPTD now.

Remove some crud which is handled by isdn_common state machines now.

23 years agoISDN: Remove isdn_driver::online flags
Kai Germaschewski [Tue, 29 Oct 2002 14:45:30 +0000 (08:45 -0600)]
ISDN: Remove isdn_driver::online flags

They were never used except for passing the state to userspace,
but not used in any application I know of. If necessary, the information
can easily be recovered by looking at fi.state == ST_ACTIVE

23 years agoISDN: STAT_FAXIND and STAT_AUDIO handled by state machine
Kai Germaschewski [Tue, 29 Oct 2002 14:44:39 +0000 (08:44 -0600)]
ISDN: STAT_FAXIND and STAT_AUDIO handled by state machine

23 years agoISDN: Remove ISDN_STAT_L1ERR
Kai Germaschewski [Tue, 29 Oct 2002 14:44:07 +0000 (08:44 -0600)]
ISDN: Remove ISDN_STAT_L1ERR

It wasn't used in any actual hardware driver, nor did it cause any
action at all.

23 years agoISDN: Move driver unload into the state machine
Kai Germaschewski [Tue, 29 Oct 2002 14:43:24 +0000 (08:43 -0600)]
ISDN: Move driver unload into the state machine

23 years agoISDN: Remove ISDN_STAT_NODCH
Kai Germaschewski [Tue, 29 Oct 2002 14:42:48 +0000 (08:42 -0600)]
ISDN: Remove ISDN_STAT_NODCH

It was never used anywhere (except for debugging output).

Also, fix some compiler warnings.

23 years agoISDN: State machines for the link layer
Kai Germaschewski [Tue, 29 Oct 2002 14:41:46 +0000 (08:41 -0600)]
ISDN: State machines for the link layer

Since we unfortunately cannot rely on the hardware drivers to get
their states always correct, have the common layer keep track of the
states and sanitize them before passing them on to applications
as network interfaces / ttyIs.

23 years agoISDN: Kill drvid[] array
Kai Germaschewski [Tue, 29 Oct 2002 14:39:24 +0000 (08:39 -0600)]
ISDN: Kill drvid[] array

We know the driver ids via drivers[]->interface->id already, no need
to keep them around a second time.

23 years agoISDN: Get rid of global drivers count
Kai Germaschewski [Tue, 29 Oct 2002 14:38:28 +0000 (08:38 -0600)]
ISDN: Get rid of global drivers count

It's useless information, we need to iterate over all potential
drivers anyway, since possibly the first one has unregistered before
the second, leaving a hole.

23 years agoISDN: Use a spinlock to protect the list of drivers
Kai Germaschewski [Tue, 29 Oct 2002 14:37:35 +0000 (08:37 -0600)]
ISDN: Use a spinlock to protect the list of drivers

... and move up the function register_isdn().

23 years agoISDN: Make array of drivers private to isdn_common.c
Kai Germaschewski [Tue, 29 Oct 2002 14:36:36 +0000 (08:36 -0600)]
ISDN: Make array of drivers private to isdn_common.c

Currently, we need to provide a couple of helper functions to avoid
breaking isdn_tty with this change, as that gets cleaned up, the need
for those helpers should vanish as well.

23 years agoISDN: improve /dev/isdnctrl read()/write()
Kai Germaschewski [Tue, 29 Oct 2002 14:35:37 +0000 (08:35 -0600)]
ISDN: improve /dev/isdnctrl read()/write()

read() should be safe against missed wake-ups now. These devices
should actually be implemented by the hardware drivers directly, would
make for much cleaner code. Unfortunately, isdnctrl is
using /dev/isdnctrl for the common ioctls, which are handled by the link
layer, so that's not easily possible. Too bad.

23 years agoISDN: Fix AT+FREV command
Kai Germaschewski [Tue, 29 Oct 2002 14:34:44 +0000 (08:34 -0600)]
ISDN: Fix AT+FREV command

This was broken by removing the CVS revision strings.

23 years agoISDN: Remove rcv_waitq/snd_waitq
Kai Germaschewski [Tue, 29 Oct 2002 14:34:03 +0000 (08:34 -0600)]
ISDN: Remove rcv_waitq/snd_waitq

The arrays were only allocated and initialized, never used.

23 years agoISDN: Convert ISDN/PPP to inl_priv / ind_priv
Kai Germaschewski [Tue, 29 Oct 2002 14:33:09 +0000 (08:33 -0600)]
ISDN: Convert ISDN/PPP to inl_priv / ind_priv

Interface type specific stuff is now gone from isdn_net_lib and
taken care of in the individual interface type modules.

23 years agoISDN: Convert ISDN/X.25 to inl_priv / ind_priv
Kai Germaschewski [Tue, 29 Oct 2002 14:31:08 +0000 (08:31 -0600)]
ISDN: Convert ISDN/X.25 to inl_priv / ind_priv

This is just simple renaming. However, ISDN/X.25 looks currently
rather badly broken, don't expect it to compile ;(

23 years agoISDN: alloc CISCO HDLC info dynamically
Kai Germaschewski [Tue, 29 Oct 2002 14:30:13 +0000 (08:30 -0600)]
ISDN: alloc CISCO HDLC info dynamically

There's really no need to allocate private storage for all possible
interface types, just leave it to the interface type to alloc the memory
it needs.

CISCO HDLC does that, now.

23 years agoISDN: Add missed isdn_net_lib.h
Kai Germaschewski [Tue, 29 Oct 2002 14:29:12 +0000 (08:29 -0600)]
ISDN: Add missed isdn_net_lib.h

23 years agoISDN: Move isdn_net_lib specific definitions out of linux/isdn.h
Kai Germaschewski [Tue, 29 Oct 2002 14:28:28 +0000 (08:28 -0600)]
ISDN: Move isdn_net_lib specific definitions out of linux/isdn.h

isdn_net_dev and isdn_net_local logically are used by isdn_net_lib,
so let's move them there.

23 years agoISDN: Make raw-IP, CISCO HDLC, ... support optional
Kai Germaschewski [Tue, 29 Oct 2002 14:27:36 +0000 (08:27 -0600)]
ISDN: Make raw-IP, CISCO HDLC, ... support optional

They'll still get compiled all into one module, but now you can choose
what you need - it's not hard to go from here to individual modules,
but most protocol-specific code is so small that it's probably not worth
it.

23 years agoISDN: Move ISDN net lib interface related definitions into isdn_net_lib.h
Kai Germaschewski [Tue, 29 Oct 2002 14:26:44 +0000 (08:26 -0600)]
ISDN: Move ISDN net lib interface related definitions into isdn_net_lib.h

23 years agoISDN: Move drivers/isdn/i4l/isdn_fsm.h include/linux/isdn/fsm.h
Kai Germaschewski [Tue, 29 Oct 2002 14:25:55 +0000 (08:25 -0600)]
ISDN: Move drivers/isdn/i4l/isdn_fsm.h include/linux/isdn/fsm.h

Though I've been mostly moving stuff out of include/linux and into
drivers/isdn/i4l, the finite state machine definitions actually need
to be more wildly accessible, so they go the opposite way.

23 years agoISDN/PPP: Pass frame including header to MPPP
Kai Germaschewski [Tue, 29 Oct 2002 14:23:27 +0000 (08:23 -0600)]
ISDN/PPP: Pass frame including header to MPPP

Just add the protocol number header to the frame and have MPPP deal with
the entire frame, separating these layers more cleanly.

23 years agoISDN: Remove CVS $Revision
Kai Germaschewski [Tue, 29 Oct 2002 14:22:22 +0000 (08:22 -0600)]
ISDN: Remove CVS $Revision

The revision numbers didn't get updated in ages, so they don't really
make sense anymore.

23 years agoISDN: header cosmetics
Kai Germaschewski [Tue, 29 Oct 2002 14:17:03 +0000 (08:17 -0600)]
ISDN: header cosmetics

Updating copyright lines, deleting the CVS $Id lines, move
PPP CCP reset related declarations into drivers/isdn/i4l/isdn_ppp_ccp.c.

23 years agoISDN/PPP: Remove random frame drop
Kai Germaschewski [Tue, 29 Oct 2002 14:15:12 +0000 (08:15 -0600)]
ISDN/PPP: Remove random frame drop

Dropping every 7th packet was just meant for internal debugging...