GitHub/LineageOS/android_kernel_motorola_exynos9610.git
18 years ago[PATCH] Hugetlb: Copy on Write support
David Gibson [Fri, 6 Jan 2006 08:10:44 +0000 (00:10 -0800)]
[PATCH] Hugetlb: Copy on Write support

Implement copy-on-write support for hugetlb mappings so MAP_PRIVATE can be
supported.  This helps us to safely use hugetlb pages in many more
applications.  The patch makes the following changes.  If needed, I also have
it broken out according to the following paragraphs.

1. Add a pair of functions to set/clear write access on huge ptes.  The
   writable check in make_huge_pte is moved out to the caller for use by COW
   later.

2. Hugetlb copy-on-write requires special case handling in the following
   situations:

   - copy_hugetlb_page_range() - Copied pages must be write protected so
     a COW fault will be triggered (if necessary) if those pages are written
     to.

   - find_or_alloc_huge_page() - Only MAP_SHARED pages are added to the
     page cache.  MAP_PRIVATE pages still need to be locked however.

3. Provide hugetlb_cow() and calls from hugetlb_fault() and
   hugetlb_no_page() which handles the COW fault by making the actual copy.

4. Remove the check in hugetlbfs_file_map() so that MAP_PRIVATE mmaps
   will be allowed.  Make MAP_HUGETLB exempt from the depricated VM_RESERVED
   mapping check.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Adam Litke <agl@us.ibm.com>
Cc: William Lee Irwin III <wli@holomorphy.com>
Cc: "Seth, Rohit" <rohit.seth@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Hugetlb: Reorganize hugetlb_fault to prepare for COW
Adam Litke [Fri, 6 Jan 2006 08:10:43 +0000 (00:10 -0800)]
[PATCH] Hugetlb: Reorganize hugetlb_fault to prepare for COW

This patch splits the "no_page()" type activity into its own function,
hugetlb_no_page().  hugetlb_fault() becomes the entry point for hugetlb faults
and delegates to the appropriate handler depending on the type of fault.
Right now we still have only hugetlb_no_page() but a later patch introduces a
COW fault.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Adam Litke <agl@us.ibm.com>
Cc: William Lee Irwin III <wli@holomorphy.com>
Cc: "Seth, Rohit" <rohit.seth@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Hugetlb: Rename find_lock_page to find_or_alloc_huge_page
Adam Litke [Fri, 6 Jan 2006 08:10:42 +0000 (00:10 -0800)]
[PATCH] Hugetlb: Rename find_lock_page to find_or_alloc_huge_page

find_lock_huge_page() isn't a great name, since it does extra things not
analagous to find_lock_page().  Rename it find_or_alloc_huge_page() which is
closer to the mark.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Adam Litke <agl@us.ibm.com>
Cc: William Lee Irwin III <wli@holomorphy.com>
Cc: "Seth, Rohit" <rohit.seth@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Hugetlb: Remove duplicate i_size check
Adam Litke [Fri, 6 Jan 2006 08:10:40 +0000 (00:10 -0800)]
[PATCH] Hugetlb: Remove duplicate i_size check

cleanup

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Adam Litke <agl@us.ibm.com>
Cc: William Lee Irwin III <wli@holomorphy.com>
Cc: "Seth, Rohit" <rohit.seth@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] madvise(MADV_REMOVE): remove pages from tmpfs shm backing store
Badari Pulavarty [Fri, 6 Jan 2006 08:10:38 +0000 (00:10 -0800)]
[PATCH] madvise(MADV_REMOVE): remove pages from tmpfs shm backing store

Here is the patch to implement madvise(MADV_REMOVE) - which frees up a
given range of pages & its associated backing store.  Current
implementation supports only shmfs/tmpfs and other filesystems return
-ENOSYS.

"Some app allocates large tmpfs files, then when some task quits and some
client disconnect, some memory can be released.  However the only way to
release tmpfs-swap is to MADV_REMOVE". - Andrea Arcangeli

Databases want to use this feature to drop a section of their bufferpool
(shared memory segments) - without writing back to disk/swap space.

This feature is also useful for supporting hot-plug memory on UML.

Concerns raised by Andrew Morton:

- "We have no plan for holepunching!  If we _do_ have such a plan (or
  might in the future) then what would the API look like?  I think
  sys_holepunch(fd, start, len), so we should start out with that."

- Using madvise is very weird, because people will ask "why do I need to
  mmap my file before I can stick a hole in it?"

- None of the other madvise operations call into the filesystem in this
  manner.  A broad question is: is this capability an MM operation or a
  filesytem operation?  truncate, for example, is a filesystem operation
  which sometimes has MM side-effects.  madvise is an mm operation and with
  this patch, it gains FS side-effects, only they're really, really
  significant ones."

Comments:

- Andrea suggested the fs operation too but then it's more efficient to
  have it as a mm operation with fs side effects, because they don't
  immediatly know fd and physical offset of the range.  It's possible to
  fixup in userland and to use the fs operation but it's more expensive,
  the vmas are already in the kernel and we can use them.

Short term plan &  Future Direction:

- We seem to need this interface only for shmfs/tmpfs files in the short
  term.  We have to add hooks into the filesystem for correctness and
  completeness.  This is what this patch does.

- In the future, plan is to support both fs and mmap apis also.  This
  also involves (other) filesystem specific functions to be implemented.

- Current patch doesn't support VM_NONLINEAR - which can be addressed in
  the future.

Signed-off-by: Badari Pulavarty <pbadari@us.ibm.com>
Cc: Hugh Dickins <hugh@veritas.com>
Cc: Andrea Arcangeli <andrea@suse.de>
Cc: Michael Kerrisk <mtk-manpages@gmx.net>
Cc: Ulrich Drepper <drepper@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] reiser4: vfs: add truncate_inode_pages_range()
Hans Reiser [Fri, 6 Jan 2006 08:10:36 +0000 (00:10 -0800)]
[PATCH] reiser4: vfs: add truncate_inode_pages_range()

This patch makes truncate_inode_pages_range from truncate_inode_pages.
truncate_inode_pages became a one-liner call to truncate_inode_pages_range.

Reiser4 needs truncate_inode_pages_ranges because it tries to keep
correspondence between existences of metadata pointing to data pages and pages
to which those metadata point to.  So, when metadata of certain part of file
is removed from filesystem tree, only pages of corresponding range are to be
truncated.

(Needed by the madvise(MADV_REMOVE) patch)

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] memhotplug: register_memory should be global
Andy Whitcroft [Fri, 6 Jan 2006 08:10:35 +0000 (00:10 -0800)]
[PATCH] memhotplug: register_memory should be global

register_memory is global and declared so in linux/memory.h.  Update the
HOTPLUG specific definition to match.  This fixes a compile warning when
HOTPLUG is enabled.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] memhotplug: register_ and unregister_memory_notifier should be global
Andy Whitcroft [Fri, 6 Jan 2006 08:10:35 +0000 (00:10 -0800)]
[PATCH] memhotplug: register_ and unregister_memory_notifier should be global

Both register_memory_notifer and unregister_memory_notifier are global and
declared so in linux/memory.h.  Update the HOTPLUG specific definitions to
match.  This fixes a compile warning when HOTPLUG is enabled.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] memhotplug: __add_section remove unused pgdat definition
Andy Whitcroft [Fri, 6 Jan 2006 08:10:33 +0000 (00:10 -0800)]
[PATCH] memhotplug: __add_section remove unused pgdat definition

__add_section defines an unused pointer to the zones pgdat.  Remove this
definition.  This fixes a compile warning.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] mm: fix __alloc_pages cpuset ALLOC_* flags
Paul Jackson [Fri, 6 Jan 2006 08:10:32 +0000 (00:10 -0800)]
[PATCH] mm: fix __alloc_pages cpuset ALLOC_* flags

Two changes to the setting of the ALLOC_CPUSET flag in
mm/page_alloc.c:__alloc_pages()

- A bug fix - the "ignoring mins" case should not be honoring ALLOC_CPUSET.
  This case of all cases, since it is handling a request that will free up
  more memory than is asked for (exiting tasks, e.g.) should be allowed to
  escape cpuset constraints when memory is tight.

- A logic change to make it simpler.  Honor cpusets even on GFP_ATOMIC
  (!wait) requests.  With this, cpuset confinement applies to all requests
  except ALLOC_NO_WATERMARKS, so that in a subsequent cleanup patch, I can
  remove the ALLOC_CPUSET flag entirely.  Since I don't know any real reason
  this logic has to be either way, I am choosing the path of the simplest
  code.

Signed-off-by: Paul Jackson <pj@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] swsusp: resume_store() retval fix
Andrew Morton [Fri, 6 Jan 2006 08:09:50 +0000 (00:09 -0800)]
[PATCH] swsusp: resume_store() retval fix

- This function returns -EINVAL all the time.  Fix.

- Decruftify it a bit too.

- Writing to it doesn't seem to do what it's suppoed to do.

Cc: Pavel Machek <pavel@ucw.cz>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] alpha: dma_map_page() fix
Andrew Morton [Fri, 6 Jan 2006 08:09:50 +0000 (00:09 -0800)]
[PATCH] alpha: dma_map_page() fix

Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Richard Henderson <rth@twiddle.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] knfsd: fix hash function for IP addresses on 64bit little-endian machines.
NeilBrown [Fri, 6 Jan 2006 08:09:49 +0000 (00:09 -0800)]
[PATCH] knfsd: fix hash function for IP addresses on 64bit little-endian machines.

The hash.h hash_long function, when used on a 64 bit machine, ignores many
of the middle-order bits.  (The prime chosen it too bit-sparse).

IP addresses for clients of an NFS server are very likely to differ only in
the low-order bits.  As addresses are stored in network-byte-order, these
bits become middle-order bits in a little-endian 64bit 'long', and so do
not contribute to the hash.  Thus you can have the situation where all
clients appear on one hash chain.

So, until hash_long is fixed (or maybe forever), us a hash function that
works well on IP addresses - xor the bytes together.

Thanks to "Iozone" <capps@iozone.org> for identifying this problem.

Cc: "Iozone" <capps@iozone.org>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] nbd: fix TX/RX race condition
Herbert Xu [Fri, 6 Jan 2006 08:09:47 +0000 (00:09 -0800)]
[PATCH] nbd: fix TX/RX race condition

Janos Haar of First NetCenter Bt.  reported numerous crashes involving the
NBD driver.  With his help, this was tracked down to bogus bio vectors
which in turn was the result of a race condition between the
receive/transmit routines in the NBD driver.

The bug manifests itself like this:

CPU0 CPU1
do_nbd_request
add req to queuelist
nbd_send_request
send req head
for each bio
kmap
send
nbd_read_stat
nbd_find_request
nbd_end_request
kunmap

When CPU1 finishes nbd_end_request, the request and all its associated
bio's are freed.  So when CPU0 calls kunmap whose argument is derived from
the last bio, it may crash.

Under normal circumstances, the race occurs only on the last bio.  However,
if an error is encountered on the remote NBD server (such as an incorrect
magic number in the request), or if there were a bug in the server, it is
possible for the nbd_end_request to occur any time after the request's
addition to the queuelist.

The following patch fixes this problem by making sure that requests are not
added to the queuelist until after they have been completed transmission.

In order for the receiving side to be ready for responses involving
requests still being transmitted, the patch introduces the concept of the
active request.

When a response matches the current active request, its processing is
delayed until after the tranmission has come to a stop.

This has been tested by Janos and it has been successful in curing this
race condition.

From: Herbert Xu <herbert@gondor.apana.org.au>

  Here is an updated patch which removes the active_req wait in
  nbd_clear_queue and the associated memory barrier.

  I've also clarified this in the comment.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Cc: <djani22@dynamicweb.hu>
Cc: Paul Clements <Paul.Clements@SteelEye.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] hfsplus oops fix
Joshua Kwan [Fri, 6 Jan 2006 08:09:45 +0000 (00:09 -0800)]
[PATCH] hfsplus oops fix

nls_utf8 is available, and the check in hfsplus_fill_super checks the wrong
pointer for NULLness (it checks the saved nls, not the new one that it
needs to use.)

Signed-off-by: Joshua Kwan <joshk@triplehelix.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] i386: PTRACE_POKEUSR: allow changing RF bit in EFLAGS register.
Chuck Ebbert [Fri, 6 Jan 2006 04:11:29 +0000 (23:11 -0500)]
[PATCH] i386: PTRACE_POKEUSR: allow changing RF bit in EFLAGS register.

Setting RF (resume flag) allows a debugger to resume execution after a
code breakpoint without tripping the breakpoint again.  It is reset by
the CPU after execution of one instruction.

Requested by Stephane Eranian:
  "I am trying to the user HW debug registers on i386 and I am running
   into a problem with ptrace() not allowing access to EFLAGS_RF for
   POKEUSER (see FLAG_MASK).  [ ...  ] It avoids the need to remove the
   breakpoint, single step, and reinstall.  The equivalent functionality
   exists on IA-64 and is allowed by ptrace()"

Cc: Stephane Eranian <eranian@hpl.hp.com>
Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years agoMerge http://oss.oracle.com/git/ocfs2
Linus Torvalds [Fri, 6 Jan 2006 04:43:11 +0000 (20:43 -0800)]
Merge http://oss.oracle.com/git/ocfs2

18 years agoUpdate MAINTAINERS - Jody is no longer at Steamballoon.
Jody McIntyre [Fri, 6 Jan 2006 04:04:08 +0000 (23:04 -0500)]
Update MAINTAINERS - Jody is no longer at Steamballoon.

18 years agoMerge with http://kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Jody McIntyre [Fri, 6 Jan 2006 03:22:50 +0000 (22:22 -0500)]
Merge ... /linux/kernel/git/torvalds/linux-2.6.git

18 years ago[NET]: Change 1500 to ETH_DATA_LEN in some files
Kris Katterjohn [Fri, 6 Jan 2006 00:35:42 +0000 (16:35 -0800)]
[NET]: Change 1500 to ETH_DATA_LEN in some files

These patches add the header linux/if_ether.h and change 1500 to
ETH_DATA_LEN in some files.

Signed-off-by: Kris Katterjohn <kjak@users.sourceforge.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPVS]: Another file needs linux/interrupt.h
Andrew Morton [Thu, 5 Jan 2006 22:57:36 +0000 (14:57 -0800)]
[IPVS]: Another file needs linux/interrupt.h

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6
Linus Torvalds [Thu, 5 Jan 2006 23:55:49 +0000 (15:55 -0800)]
Merge git://git./linux/kernel/git/brodo/pcmcia-2.6

18 years ago[PATCH] pcmcia: add some IDs for ide-cs and dtl1_cs
Richard Purdie [Thu, 5 Jan 2006 09:56:03 +0000 (09:56 +0000)]
[PATCH] pcmcia: add some IDs for ide-cs and dtl1_cs

Add some PCMCIA device IDs for the microdrive found in the Sharp Zaurus
and a different revision of the Socket CF+ Bluetooth card.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
18 years ago[PATCH] pcmcia: cleanup cs.c, reduce size
Daniel Ritz [Fri, 30 Dec 2005 14:12:35 +0000 (15:12 +0100)]
[PATCH] pcmcia: cleanup cs.c, reduce size

kill the socket_shutdown()/shutdown_socket() confusion by making it
one single function. move cs_socket_put() in there. nicer to read and
smaller:

original:
   text    data     bss     dec     hex filename
  25181    1076      32   26289    66b1 drivers/pcmcia/pcmcia_core.ko

patched:
   text    data     bss     dec     hex filename
  24973    1076      32   26081    65e1 drivers/pcmcia/pcmcia_core.ko

Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
18 years ago[PATCH] drivers/pcmcia/cistpl.c: fix endian warnings
Alexey Dobriyan [Fri, 23 Dec 2005 20:51:08 +0000 (23:51 +0300)]
[PATCH] drivers/pcmcia/cistpl.c: fix endian warnings

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
18 years ago[PATCH] pcmcia: kzalloc conversion
Dominik Brodowski [Sun, 11 Dec 2005 20:18:26 +0000 (21:18 +0100)]
[PATCH] pcmcia: kzalloc conversion

Convert users of kmalloc and memset to kzalloc

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
18 years ago[PATCH] pcmcia: no probing of ioports on PARISC
Dominik Brodowski [Sun, 11 Dec 2005 19:47:44 +0000 (20:47 +0100)]
[PATCH] pcmcia: no probing of ioports on PARISC

Do not wildly probe the IO ports we're trying to use on PARISC.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
18 years ago[PATCH] pcmcia: export stored values in sysfs
Dominik Brodowski [Thu, 8 Dec 2005 22:50:36 +0000 (23:50 +0100)]
[PATCH] pcmcia: export stored values in sysfs

Export the stored values instead of re-reading everything in the socket
information sysfs files, and make them accessible to all users, not only
to root.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
18 years ago[PATCH] 8xx PCMCIA: support for MPC885ADS and MPC866ADS
Vitaly Bordug [Thu, 8 Dec 2005 15:56:12 +0000 (13:56 -0200)]
[PATCH] 8xx PCMCIA: support for MPC885ADS and MPC866ADS

This adds PCMCIA support for both MPC885ADS and MPC866ADS.

This is established not together with FADS, because 885 does not have
io_block_mapping() for BCSR area.
Also, some cleanups done both for 885ADS and MBX.

Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com>
Signed-off-by: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
18 years ago[PATCH] m8xx_pcmcia: support MAP_AUTOSZ required for CF cards
Vitaly Bordug [Thu, 8 Dec 2005 15:53:20 +0000 (13:53 -0200)]
[PATCH] m8xx_pcmcia: support MAP_AUTOSZ required for CF cards

This fixes misconfiguration that could result in odd work of some old CF
cards.

Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com>
Signed-off-by: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
18 years ago[PATCH] pcmcia: properly handle static mem, but dynamic io sockets
Dominik Brodowski [Wed, 7 Dec 2005 11:32:20 +0000 (12:32 +0100)]
[PATCH] pcmcia: properly handle static mem, but dynamic io sockets

Some PCMCIA sockets have statically mapped memory windows, but dynamically
mapped IO windows. Using the "nonstatic" socket library is inpractical for
them, as they do neither need a resource database (as we can trust the
kernel resource database on m68k and ppc) nor lots of other features of that
library. Let them get a small "iodyn" socket library (105 lines of code)
instead.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
18 years ago[PATCH] pcmcia: fix sound drivers
Dominik Brodowski [Thu, 5 Jan 2006 23:27:16 +0000 (00:27 +0100)]
[PATCH] pcmcia: fix sound drivers

Update the PCMCIA sound drivers to handle the recent changes to the PCMCIA
core. A part of this merge was done by Takashi Iwai <tiwai@suse.de>.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
18 years ago[PATCH] pcmcia: unify attach, EVENT_CARD_INSERTION handlers into one probe callback
Dominik Brodowski [Mon, 14 Nov 2005 20:25:51 +0000 (21:25 +0100)]
[PATCH] pcmcia: unify attach, EVENT_CARD_INSERTION handlers into one probe callback

Unify the EVENT_CARD_INSERTION and "attach" callbacks to one unified
probe() callback. As all in-kernel drivers are changed to this new
callback, there will be no temporary backwards-compatibility. Inside a
probe() function, each driver _must_ set struct pcmcia_device
*p_dev->instance and instance->handle correctly.

With these patches, the basic driver interface for 16-bit PCMCIA drivers
now has the classic four callbacks known also from other buses:

        int (*probe)            (struct pcmcia_device *dev);
        void (*remove)          (struct pcmcia_device *dev);

        int (*suspend)          (struct pcmcia_device *dev);
        int (*resume)           (struct pcmcia_device *dev);

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
18 years ago[PATCH] pcmcia: remove dev_list from drivers
Dominik Brodowski [Mon, 14 Nov 2005 20:25:35 +0000 (21:25 +0100)]
[PATCH] pcmcia: remove dev_list from drivers

The linked list of devices managed by each PCMCIA driver is, in very most
cases, unused. Therefore, remove it from many drivers.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
18 years ago[PATCH] pcmcia: remove old detach mechanism
Dominik Brodowski [Mon, 14 Nov 2005 20:25:23 +0000 (21:25 +0100)]
[PATCH] pcmcia: remove old detach mechanism

Remove the old "detach" mechanism as it is unused now.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
18 years ago[PATCH] pcmcia: unify detach, REMOVAL_EVENT handlers into one remove callback
Dominik Brodowski [Mon, 14 Nov 2005 20:23:14 +0000 (21:23 +0100)]
[PATCH] pcmcia: unify detach, REMOVAL_EVENT handlers into one remove callback

Unify the "detach" and REMOVAL_EVENT handlers to one "remove" function.
Old functionality is preserved, for the moment.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
18 years ago[PATCH] pcmcia: merge suspend into device model
Dominik Brodowski [Thu, 5 Jan 2006 23:02:03 +0000 (00:02 +0100)]
[PATCH] pcmcia: merge suspend into device model

Merge the suspend and resume methods for 16-bit PCMCIA cards into the
device model -- for both runtime power management and suspend to ram/disk.

Bugfix in ds.c by Richard Purdie
Signed-Off-By: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
18 years ago[PATCH] pcmcia: new suspend core
Dominik Brodowski [Mon, 14 Nov 2005 20:21:18 +0000 (21:21 +0100)]
[PATCH] pcmcia: new suspend core

Move the suspend and resume methods out of the event handler, and into
special functions. Also use these functions for pre- and post-reset, as
almost all drivers already do, and the remaining ones can easily be
converted.

Bugfix to include/pcmcia/ds.c
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
18 years ago[PATCH] yenta: make bridge specific init code configurable
Daniel Ritz [Thu, 3 Nov 2005 20:12:14 +0000 (21:12 +0100)]
[PATCH] yenta: make bridge specific init code configurable

Make the bridge specific initialization code config options depending on
CONFIG_EMBEDDED. Config options for TI/EnE, Toshiba, Ricoh and O2Micro are
available. Disabling all of the specific tweaks cuts off more than half
of yenta_socket.ko.

Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
18 years ago[PATCH] pcmcia: validate_mem fix
Andrew Morton [Thu, 17 Nov 2005 05:29:26 +0000 (21:29 -0800)]
[PATCH] pcmcia: validate_mem fix

Also return a value if CONFIG_PCMCIA_PROBE is not set.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
18 years ago[PATCH] pcmcia: validate_mem shouldn't be void
Dominik Brodowski [Wed, 28 Sep 2005 17:41:56 +0000 (19:41 +0200)]
[PATCH] pcmcia: validate_mem shouldn't be void

Add a return value to pcmcia_validate_mem.  Only if we have enough memory
available to map the CIS, we should proceed in trying to determine information
about the device.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
18 years ago[PATCH] pcmcia: remove get_socket callback
Dominik Brodowski [Sat, 12 Nov 2005 22:56:33 +0000 (23:56 +0100)]
[PATCH] pcmcia: remove get_socket callback

The .get_socket callback is never used by the PCMCIA core, therefore remove
it.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
18 years ago[PATCH] pcmcia: remove socket register_callback
Dominik Brodowski [Wed, 28 Sep 2005 17:41:55 +0000 (19:41 +0200)]
[PATCH] pcmcia: remove socket register_callback

Remove the register_callback declaration in struct pccard_operations as it is
unused.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
18 years ago[PATCH] yenta: optimize interrupt handler
Daniel Ritz [Tue, 20 Sep 2005 21:17:37 +0000 (14:17 -0700)]
[PATCH] yenta: optimize interrupt handler

Don't waste cpu time in yenta interrupt handler when the interrupt was for
another device.

Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
18 years ago[PATCH] pcmcia: avoid macro usage in cistpl
Pavel Machek [Wed, 7 Sep 2005 23:00:26 +0000 (16:00 -0700)]
[PATCH] pcmcia: avoid macro usage in cistpl

Fix macro abuse in pcmcia.

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
18 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
Linus Torvalds [Thu, 5 Jan 2006 22:18:15 +0000 (14:18 -0800)]
Merge branch 'release' of git://git./linux/kernel/git/aegl/linux-2.6

18 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Thu, 5 Jan 2006 22:01:23 +0000 (14:01 -0800)]
Merge /pub/scm/linux/kernel/git/davem/sparc-2.6

18 years ago[IA64] Fix compile warnings in setup.c
Tony Luck [Thu, 5 Jan 2006 21:30:52 +0000 (13:30 -0800)]
[IA64] Fix compile warnings in setup.c

arch/ia64/kernel/setup.c: In function `show_cpuinfo':
arch/ia64/kernel/setup.c:576: warning: long unsigned int format, different type arg (arg 12)
arch/ia64/kernel/setup.c:576: warning: long unsigned int format, different type arg (arg 13)

Introduced by 95235ca2c20ac0b31a8eb39e2d599bcc3e9c9a10

Signed-off-by: Tony Luck <tony.luck@intel.com>
18 years ago[ATYFB]: Fix onboard video on SPARC Blade 100 for 2.6.{13,14,15}
Luis F. Ortiz [Thu, 5 Jan 2006 21:12:41 +0000 (13:12 -0800)]
[ATYFB]: Fix onboard video on SPARC Blade 100 for 2.6.{13,14,15}

I have recently been switching from using 2.4.32 on my trusty
old Sparc Blade 100 to using 2.6.15 .  Some of the problems I ran into
were distorted video when the console was active (missing first
character, skipped dots) and when running X windows (colored snow,
stripes, missing pixels).  A quick examination of the 2.6 versus 2.4
source for the ATY driver revealed alot of changes.

         A closer look at the code/data for the 64GR/XL chip revealed
two minor "typos" that the rewriter(s) of the code made.  The first is
a incorrect clock value (230 .vs. 235) and the second is a missing
flag (M64F_SDRAM_MAGIC_PLL).  Making both these changes seems to have
fixed my problem.  I tend to think the 235 value is the correct one,
as there is a 29.4 Mhz clock crystal close to the video chip and 235.2
(29.4*8) is too close to 235 to make it a coincidence.

The flag for M64F_SDRAM_MAGIC_PLL was dropped during the
changes made by adaplas in file revision 1.72 on the old bitkeeper
repository.

The change relating to the clock rate has been there forever,
at least in the 2.6 tree.  I'm not sure where to look for the old 2.5
tree or if anyone cares when it happened.

On SPARC Blades 100's, which use the ATY MACH64GR video chipset, the
clock crystal frequency is 235.2 Mhz, not 230 Mhz.  The chipset also
requires the use of M64F_SDRAM_MAGIC_PLL in order to setup the PLL
properly for the DRAM.

Signed-off-by: Luis F. Ortiz <lfo@Polyad.Org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: Use HOPLIMIT metric as TTL of TCP reset sent by REJECT
Yasuyuki Kozakai [Thu, 5 Jan 2006 20:28:57 +0000 (12:28 -0800)]
[NETFILTER]: Use HOPLIMIT metric as TTL of TCP reset sent by REJECT

HOPLIMIT metric is appropriate to TCP reset sent by REJECT target
than hard-coded max TTL. Thanks to David S. Miller for hint.

Signed-off-by: Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: nf_conntrack_l3proto_ipv4.c needs net/route.h
Patrick McHardy [Thu, 5 Jan 2006 20:21:52 +0000 (12:21 -0800)]
[NETFILTER]: nf_conntrack_l3proto_ipv4.c needs net/route.h

CC [M]  net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.o
net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c: In function 'ipv4_refrag':
net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c:198: error: dereferencing pointer to incomplete type
make[3]: *** [net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.o] Error 1

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: Export ip6_masked_addrcmp, don't pass IPv6 addresses on stack
Patrick McHardy [Thu, 5 Jan 2006 20:21:34 +0000 (12:21 -0800)]
[NETFILTER]: Export ip6_masked_addrcmp, don't pass IPv6 addresses on stack

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: make ipv6_find_hdr() find transport protocol header
Patrick McHardy [Thu, 5 Jan 2006 20:21:16 +0000 (12:21 -0800)]
[NETFILTER]: make ipv6_find_hdr() find transport protocol header

The original ipv6_find_hdr() finds the specified header in IPv6 packets.
This makes it possible to get transport header so that we can kill similar
loop in ip6_match_packet().

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: Call POST_ROUTING hook before fragmentation
Patrick McHardy [Thu, 5 Jan 2006 20:20:59 +0000 (12:20 -0800)]
[NETFILTER]: Call POST_ROUTING hook before fragmentation

Call POST_ROUTING hook before fragmentation to get rid of the okfn use
in ip_refrag and save the useless fragmentation/defragmentation step
when NAT is used.

The patch introduces one user-visible change, the POSTROUTING chain
in the mangle table gets entire packets, not fragments, which should
simplify use of the MARK and CLASSIFY targets for queueing as a nice
side-effect.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: Remove okfn usage in ip_vs_core.c
Patrick McHardy [Thu, 5 Jan 2006 20:20:40 +0000 (12:20 -0800)]
[NETFILTER]: Remove okfn usage in ip_vs_core.c

okfn should only be used from different contexts to avoid deep call chains,
i.e. by nf_queue.

Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: ctnetlink: Fix dumping of helper name
Patrick McHardy [Thu, 5 Jan 2006 20:20:02 +0000 (12:20 -0800)]
[NETFILTER]: ctnetlink: Fix dumping of helper name

Properly dump the helper name instead of internal kernel data.
Based on patch by Marcus Sundberg <marcus@ingate.com>.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: Fix module_param types and permissions
Patrick McHardy [Thu, 5 Jan 2006 20:19:46 +0000 (12:19 -0800)]
[NETFILTER]: Fix module_param types and permissions

Fix netfilter module_param types and permissions. Also fix an off-by-one in
the ipt_ULOG nlbufsiz < 128k check.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: Filter dumped entries based on the layer 3 protocol number
Pablo Neira Ayuso [Thu, 5 Jan 2006 20:19:23 +0000 (12:19 -0800)]
[NETFILTER]: Filter dumped entries based on the layer 3 protocol number

Dump entries of a given Layer 3 protocol number.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: Add ctnetlink port for nf_conntrack
Pablo Neira Ayuso [Thu, 5 Jan 2006 20:19:05 +0000 (12:19 -0800)]
[NETFILTER]: Add ctnetlink port for nf_conntrack

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: ctnetlink: remove unused variable
Pablo Neira Ayuso [Thu, 5 Jan 2006 20:18:44 +0000 (12:18 -0800)]
[NETFILTER]: ctnetlink: remove unused variable

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: ctnetlink: fix conntrack mark race
Pablo Neira Ayuso [Thu, 5 Jan 2006 20:18:25 +0000 (12:18 -0800)]
[NETFILTER]: ctnetlink: fix conntrack mark race

Set conntrack mark before it is in hashes.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: ctnetlink: ctnetlink_event cleanup
Pablo Neira Ayuso [Thu, 5 Jan 2006 20:18:08 +0000 (12:18 -0800)]
[NETFILTER]: ctnetlink: ctnetlink_event cleanup

Cleanup: Use 'else if' instead of a ugly 'goto' statement.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: ctnetlink: use u_int32_t instead of unsigned int
Pablo Neira Ayuso [Thu, 5 Jan 2006 20:17:50 +0000 (12:17 -0800)]
[NETFILTER]: ctnetlink: use u_int32_t instead of unsigned int

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: ctnetlink: propagate ctnetlink_dump_tuples_proto return value back
Pablo Neira Ayuso [Thu, 5 Jan 2006 20:17:29 +0000 (12:17 -0800)]
[NETFILTER]: ctnetlink: propagate ctnetlink_dump_tuples_proto return value back

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: ctnetlink: Add sanity checkings for ICMP
Yasuyuki Kozakai [Thu, 5 Jan 2006 20:17:03 +0000 (12:17 -0800)]
[NETFILTER]: ctnetlink: Add sanity checkings for ICMP

Signed-off-by: Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: ctnetlink: remove bogus checks in ICMP protocol at dumping
Pablo Neira Ayuso [Thu, 5 Jan 2006 20:16:41 +0000 (12:16 -0800)]
[NETFILTER]: ctnetlink: remove bogus checks in ICMP protocol at dumping

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: Decrease number of pointer derefs in nf_conntrack_core.c
Jesper Juhl [Thu, 5 Jan 2006 20:16:16 +0000 (12:16 -0800)]
[NETFILTER]: Decrease number of pointer derefs in nf_conntrack_core.c

Benefits of the patch:
 - Fewer pointer dereferences should make the code slightly faster.
 - Size of generated code is smaller
 - improved readability

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: Decrease number of pointer derefs in nfnetlink_queue.c
Jesper Juhl [Thu, 5 Jan 2006 20:15:58 +0000 (12:15 -0800)]
[NETFILTER]: Decrease number of pointer derefs in nfnetlink_queue.c

Benefits of the patch:
 - Fewer pointer dereferences should make the code slightly faster.
 - Size of generated code is smaller
 - improved readability

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPVS]: Fix compilation
Adrian Bunk [Thu, 5 Jan 2006 20:14:43 +0000 (12:14 -0800)]
[IPVS]: Fix compilation

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years agoAuto-update from upstream
Tony Luck [Thu, 5 Jan 2006 16:52:11 +0000 (08:52 -0800)]
Auto-update from upstream

18 years agoMerge with http://kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Jody McIntyre [Thu, 5 Jan 2006 13:03:40 +0000 (08:03 -0500)]
Merge ... /linux/kernel/git/torvalds/linux-2.6.git

18 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6
Linus Torvalds [Thu, 5 Jan 2006 02:44:12 +0000 (18:44 -0800)]
Merge git://git./linux/kernel/git/gregkh/driver-2.6

Trivial manual merge fixup for usb_find_interface clashes.

18 years ago[PATCH] i386: "invalid operand" -> "invalid opcode"
Chuck Ebbert [Wed, 4 Jan 2006 03:36:14 +0000 (22:36 -0500)]
[PATCH] i386: "invalid operand" -> "invalid opcode"

According to the manual, INT 6 is "invalid opcode", not "invalid operand".

Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Fix IXP4xx watchdog errata workaround
Deepak Saxena [Tue, 3 Jan 2006 20:50:30 +0000 (12:50 -0800)]
[PATCH] Fix IXP4xx watchdog errata workaround

The IXP4xx driver bails out on all A0 CPUs, but it should only do
so on IXP42x as IXP46x has functioning HW.

Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/perex/alsa
Linus Torvalds [Thu, 5 Jan 2006 00:38:36 +0000 (16:38 -0800)]
Merge git://git./linux/kernel/git/perex/alsa

18 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
Linus Torvalds [Thu, 5 Jan 2006 00:36:52 +0000 (16:36 -0800)]
Merge git://git./linux/kernel/git/sam/kbuild

18 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial
Linus Torvalds [Thu, 5 Jan 2006 00:34:57 +0000 (16:34 -0800)]
Merge git://git./linux/kernel/git/bunk/trivial

18 years agoMerge branch 'upstream' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev
Linus Torvalds [Thu, 5 Jan 2006 00:32:33 +0000 (16:32 -0800)]
Merge branch 'upstream' of /linux/kernel/git/jgarzik/libata-dev

18 years agoMerge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
Linus Torvalds [Thu, 5 Jan 2006 00:31:56 +0000 (16:31 -0800)]
Merge branch 'upstream-linus' of /linux/kernel/git/jgarzik/netdev-2.6

18 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
Linus Torvalds [Thu, 5 Jan 2006 00:30:12 +0000 (16:30 -0800)]
Merge git://git./linux/kernel/git/jejb/scsi-misc-2.6

18 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Thu, 5 Jan 2006 00:27:41 +0000 (16:27 -0800)]
Merge git://git./linux/kernel/git/davem/net-2.6

18 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
Linus Torvalds [Thu, 5 Jan 2006 00:25:44 +0000 (16:25 -0800)]
Merge git://git./linux/kernel/git/gregkh/usb-2.6

18 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq
Linus Torvalds [Thu, 5 Jan 2006 00:21:26 +0000 (16:21 -0800)]
Merge /pub/scm/linux/kernel/git/davej/cpufreq

18 years agoRelax the rw_verify_area() error checking.
Linus Torvalds [Thu, 5 Jan 2006 00:20:40 +0000 (16:20 -0800)]
Relax the rw_verify_area() error checking.

In particular, allow over-large read- or write-requests to be downgraded
to a more reasonable range, rather than considering them outright errors.

We want to protect lower layers from (the sadly all too common) overflow
conditions, but prefer to do so by chopping the requests up, rather than
just refusing them outright.

Cc: Peter Anvin <hpa@zytor.com>
Cc: Ulrich Drepper <drepper@redhat.com>
Cc: Andi Kleen <ak@suse.de>
Cc: Al Viro <viro@ftp.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] net: swich device attribute creation to default attrs
Kay Sievers [Mon, 19 Dec 2005 00:42:56 +0000 (01:42 +0100)]
[PATCH] net: swich device attribute creation to default attrs

Recent udev versions don't longer cover bad sysfs timing with built-in
logic. Explicit rules are required to do that. For net devices, the
following is needed:
  ACTION=="add", SUBSYSTEM=="net", WAIT_FOR_SYSFS="address"
to handle access to net device properties from an event handler without
races.

This patch changes the main net attributes to be created by the driver
core, which is done _before_ the event is sent out and will not require
the stat() loop of the WAIT_FOR_SYSFS key.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years ago[PATCH] drivers/base/power/runtime.c: #if 0 dpm_set_power_state()
Adrian Bunk [Mon, 12 Dec 2005 09:31:03 +0000 (01:31 -0800)]
[PATCH] drivers/base/power/runtime.c: #if 0 dpm_set_power_state()

This patch #if 0's an unused global function.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years ago[PATCH] sysfs: handle failures in sysfs_make_dirent
Steven Rostedt [Wed, 23 Nov 2005 14:15:44 +0000 (09:15 -0500)]
[PATCH] sysfs: handle failures in sysfs_make_dirent

I noticed that if sysfs_make_dirent fails to allocate the sd, then a
null will be passed to sysfs_put.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years ago[PATCH] Driver core: Make block devices create the proper symlink name
Greg Kroah-Hartman [Tue, 13 Dec 2005 23:17:34 +0000 (15:17 -0800)]
[PATCH] Driver core: Make block devices create the proper symlink name

Block devices need to add the block device name to the symlink they put
in the device directory, otherwise multiple symlinks of the same name
can be created.  This matches the class system, which works the same
way, we just forgot to convert block at the same time.

Cc: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years ago[PATCH] Driver core: only all userspace bind/unbind if CONFIG_HOTPLUG is enabled
Greg Kroah-Hartman [Tue, 13 Dec 2005 23:17:34 +0000 (15:17 -0800)]
[PATCH] Driver core: only all userspace bind/unbind if CONFIG_HOTPLUG is enabled

Thanks to drivers making their id tables __devinit, we can't allow
userspace to bind or unbind drivers from devices manually through sysfs.
So we only allow this if CONFIG_HOTPLUG is enabled.

Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years ago[PATCH] Driver Core: Rearrange exports in platform.c
Dmitry Torokhov [Sat, 10 Dec 2005 06:36:28 +0000 (01:36 -0500)]
[PATCH] Driver Core: Rearrange exports in platform.c

Driver core: rearrange exports in platform.c

The new way is to specify export right after symbol definition.
Rearrange exports to follow new style to avoid mixing two styles
in one file.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years ago[PATCH] Driver Core: Add platform_device_del()
Dmitry Torokhov [Sat, 10 Dec 2005 06:36:27 +0000 (01:36 -0500)]
[PATCH] Driver Core: Add platform_device_del()

Driver core: add platform_device_del function

Having platform_device_del90 allows more straightforward error
handling code in drivers registering platform devices.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years ago[PATCH] Input: fix add modalias support build error
Rusty Russell [Sat, 10 Dec 2005 11:48:20 +0000 (22:48 +1100)]
[PATCH] Input: fix add modalias support build error

Fix build when scripts/mod/file2alias.c includes linux/input.h, which
tries to include /usr/include/linux/mod_devicetable.h:

 In file included from scripts/mod/file2alias.c:40:
 include/linux/input.h:21:35: linux/mod_devicetable.h: No such file or directory
 make[2]: *** [scripts/mod/file2alias.o] Error 1

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years ago[PATCH] Input: add modalias support
Rusty Russell [Wed, 7 Dec 2005 20:40:34 +0000 (21:40 +0100)]
[PATCH] Input: add modalias support

Here's the patch for modalias support for input classes.  It uses
comma-separated numbers, and doesn't describe all the potential keys (no
module currently cares, and that would make the strings huge).  The
changes to input.h are to move the definitions needed by file2alias
outside __KERNEL__.  I chose not to move those definitions to
mod_devicetable.h, because there are so many that it might break compile
of something else in the kernel.

The rest is fairly straightforward.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
CC: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years ago[PATCH] ide: MODALIAS support for autoloading of ide-cd, ide-disk, ...
Kay Sievers [Mon, 12 Dec 2005 17:03:44 +0000 (18:03 +0100)]
[PATCH] ide: MODALIAS support for autoloading of ide-cd, ide-disk, ...

IDE: MODALIAS support for autoloading of ide-cd, ide-disk, ...

Add MODULE_ALIAS to IDE midlayer modules: ide-disk, ide-cd, ide-floppy and
ide-tape, to autoload these modules depending on the probed media type of
the IDE device.

It is used by udev and replaces the former agent shell script of the hotplug
package, which was required to lookup the media type in the proc filesystem.
Using proc was racy, cause the media file is created after the hotplug event
is sent out.

The module autoloading does not take any effect, until something like the
following udev rule is configured:
  SUBSYSTEM=="ide",  ACTION=="add", ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe $env{MODALIAS}"

The module ide-scsi will not be autoloaded, cause it requires manual
configuration. It can't be, and never was supported for automatic setup in
the hotplug package. Adding a MODULE_ALIAS to ide-scsi for all supported
media types, would just lead to a default blacklist entry anyway.

  $ modinfo ide-disk
  filename:       /lib/modules/2.6.15-rc4-g1b0997f5/kernel/drivers/ide/ide-disk.ko
  description:    ATA DISK Driver
  alias:          ide:*m-disk*
  license:        GPL
  ...

  $ modprobe -vn ide:m-disk
  insmod /lib/modules/2.6.15-rc4-g1b0997f5/kernel/drivers/ide/ide-disk.ko

  $ cat /sys/bus/ide/devices/0.0/modalias
  ide:m-disk

It also adds attributes to the IDE device:
  $ tree /sys/bus/ide/devices/0.0/
  /sys/bus/ide/devices/0.0/
  |-- bus -> ../../../../../../../bus/ide
  |-- drivename
  |-- media
  |-- modalias
  |-- power
  |   |-- state
  |   `-- wakeup
  `-- uevent

  $ cat /sys/bus/ide/devices/0.0/{modalias,drivename,media}
  ide:m-disk
  hda
  disk

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years ago[PATCH] kobject_uevent CONFIG_NET=n fix
akpm@osdl.org [Wed, 23 Nov 2005 07:36:13 +0000 (23:36 -0800)]
[PATCH] kobject_uevent CONFIG_NET=n fix

lib/lib.a(kobject_uevent.o)(.text+0x25f): In function `kobject_uevent':
: undefined reference to `__alloc_skb'
lib/lib.a(kobject_uevent.o)(.text+0x2a1): In function `kobject_uevent':
: undefined reference to `skb_over_panic'
lib/lib.a(kobject_uevent.o)(.text+0x31d): In function `kobject_uevent':
: undefined reference to `skb_over_panic'
lib/lib.a(kobject_uevent.o)(.text+0x356): In function `kobject_uevent':
: undefined reference to `netlink_broadcast'
lib/lib.a(kobject_uevent.o)(.init.text+0x9): In function `kobject_uevent_init':
: undefined reference to `netlink_kernel_create'
make: *** [.tmp_vmlinux1] Error 1

Netlink is unconditionally enabled if CONFIG_NET, so that's OK.

kobject_uevent.o is compiled even if !CONFIG_HOTPLUG, which is lazy.

Let's compound the sin.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years ago[PATCH] Allow overlapping resources for platform devices
Kumar Gala [Mon, 28 Nov 2005 16:15:39 +0000 (10:15 -0600)]
[PATCH] Allow overlapping resources for platform devices

There are cases in which a device's memory mapped registers overlap
with another device's memory mapped registers.  On several PowerPC
devices this occurs for the MDIO bus, whose registers tended to overlap
with one of the ethernet controllers.

By switching from request_resource to insert_resource we can register
the MDIO bus as a proper platform device and not hack around how we
handle its memory mapped registers.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years ago[PATCH] klist: Fix broken kref counting in find functions
Frank Pavlic [Sun, 27 Nov 2005 04:48:40 +0000 (20:48 -0800)]
[PATCH] klist: Fix broken kref counting in find functions

The klist reference counting in the find functions that use
klist_iter_init_node is broken.  If the function (for example
driver_find_device) is called with a NULL start object then everything is
fine, the first call to next_device()/klist_next increases the ref-count of
the first node on the list and does nothing for the start object which is
NULL.

If they are called with a valid start object then klist_next will decrement
the ref-count for the start object but nobody has incremented it.  Logical
place to fix this would be klist_iter_init_node because the function puts a
reference of the object into the klist_iter struct.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Frank Pavlic <pavlic@de.ibm.com>
Cc: Patrick Mochel <mochel@digitalimplant.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years ago[PATCH] Hold the device's parent's lock during probe and remove
Alan Stern [Thu, 17 Nov 2005 21:54:12 +0000 (16:54 -0500)]
[PATCH] Hold the device's parent's lock during probe and remove

This patch (as604) makes the driver core hold a device's parent's lock
as well as the device's lock during calls to the probe and remove
methods in a driver.  This facility is needed by USB device drivers,
owing to the peculiar way USB devices work:

A device provides multiple interfaces, and drivers are bound
to interfaces rather than to devices;

Nevertheless a reset, reset-configuration, suspend, or resume
affects the entire device and requires the caller to hold the
lock for the device, not just a lock for one of the interfaces.

Since a USB driver's probe method is always called with the interface
lock held, the locking order rules (always lock parent before child)
prevent these methods from acquiring the device lock.  The solution
provided here is to call all probe and remove methods, for all devices
(not just USB), with the parent lock already acquired.

Although currently only the USB subsystem requires these changes, people
have mentioned in prior discussion that the overhead of acquiring an
extra semaphore in all the prove/remove sequences is not overly large.

Up to now, the USB core has been using its own set of private
semaphores.  A followup patch will remove them, relying entirely on the
device semaphores provided by the driver core.

The code paths affected by this patch are:

device_add and device_del: The USB core already holds the parent
lock, so no actual change is needed.

driver_register and driver_unregister: The driver core will now
lock both the parent and the device before probing or removing.

driver_bind and driver_unbind (in sysfs): These routines will
now lock both the parent and the device before binding or
unbinding.

bus_rescan_devices: The helper routine will lock the parent
before probing a device.

I have not tested this patch for conflicts with other subsystems.  As
far as I can see, the only possibility of conflict would lie in the
bus_rescan_devices pathway, and it seems pretty remote.  Nevertheless,
it would be good for this to get a lot of testing in -mm.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years ago[PATCH] driver kill hotplug word from sn and others fix
Paul Jackson [Sat, 26 Nov 2005 04:04:26 +0000 (20:04 -0800)]
[PATCH] driver kill hotplug word from sn and others fix

The first of these changes s/hotplug/uevent/ was needed to
compile sn2_defconfig (ia64/sn).  The other three files
changed are blind changes of all remaining bus_type.hotplug
references I could find to bus_type.uevent.

This patch attempts to finish similar changes made in the
gregkh-driver-kill-hotplug-word-from-driver-core Nov 22 patch.

Signed-off-by: Paul Jackson <pj@sgi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years ago[PATCH] HOTPLUG: always enable the .config option, unless EMBEDDED
Greg Kroah-Hartman [Wed, 16 Nov 2005 19:27:07 +0000 (11:27 -0800)]
[PATCH] HOTPLUG: always enable the .config option, unless EMBEDDED

With modules, dynamic /dev, and uevents, people really want
CONFIG_HOTPLUG to be enabled in their kernels.  If not, they can still
disable it, but it is discouraged.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>