h-e-n
15 years agohwmon: needs new maintainer
Mark M. Hoffman [Fri, 1 Aug 2008 03:48:25 +0000 (23:48 -0400)]
hwmon: needs new maintainer

Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>

15 years agotcp: MD5: Fix MD5 signatures on certain ACK packets
Adam Langley [Fri, 1 Aug 2008 03:49:48 +0000 (20:49 -0700)]
tcp: MD5: Fix MD5 signatures on certain ACK packets

I noticed, looking at tcpdumps, that timewait ACKs were getting sent
with an incorrect MD5 signature when signatures were enabled.

I broke this in 49a72dfb8814c2d65bd9f8c9c6daf6395a1ec58d ("tcp: Fix
MD5 signatures for non-linear skbs"). I didn't take into account that
the skb passed to tcp_*_send_ack was the inbound packet, thus the
source and dest addresses need to be swapped when calculating the MD5
pseudoheader.

Signed-off-by: Adam Langley <agl@imperialviolet.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

15 years agoipv6: Fix ip6_xmit to send fragments if ipfragok is true
Wei Yongjun [Fri, 1 Aug 2008 03:46:47 +0000 (20:46 -0700)]
ipv6: Fix ip6_xmit to send fragments if ipfragok is true

SCTP used ip6_xmit() to send fragments after received ICMP packet too
big message. But while send packet used ip6_xmit, the skb->local_df is
not initialized. So when skb if enter ip6_fragment(), the following
code will discard the skb.

ip6_fragment(...)
{
    if (!skb->local_df) {
        ...
        return -EMSGSIZE;
    }
    ...
}

SCTP do the following step:
1. send packet ip6_xmit(skb, ipfragok=0)
2. received ICMP packet too big message
3. if PMTUD_ENABLE: ip6_xmit(skb, ipfragok=1)

This patch fixed the problem by set local_df if ipfragok is true.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>

15 years agoipvs: Move userspace definitions to include/linux/ip_vs.h
Julius Volz [Fri, 1 Aug 2008 03:45:24 +0000 (20:45 -0700)]
ipvs: Move userspace definitions to include/linux/ip_vs.h

Current versions of ipvsadm include "/usr/src/linux/include/net/ip_vs.h"
directly. This file also contains kernel-only definitions. Normally, public
definitions should live in include/linux, so this patch moves the
definitions shared with userspace to a new file, "include/linux/ip_vs.h".

This also removes the unused NFC_IPVS_PROPERTY bitmask, which was once
used to point into skb->nfcache.

To make old ipvsadms still compile with this, the old header file includes
the new one.

Thanks to Dave Miller and Horms for noting/adding the missing Kbuild entry
for the new header file.

Signed-off-by: Julius Volz <juliusv@google.com>
Acked-by: Simon Horman <horms@verge.net.au>
Signed-off-by: David S. Miller <davem@davemloft.net>

15 years agohwmon: (lm85) Simplify device initialization function
Jean Delvare [Wed, 25 Jun 2008 13:10:30 +0000 (09:10 -0400)]
hwmon: (lm85) Simplify device initialization function

Clean up and simplify the device initialization function:
* Degrade error messages to warnings - what they really are.
* Stop warning about VxI mode, we don't really care.
* Drop comment about lack of limit initialization - that's the standard
  way, all hardware monitoring drivers do that.
* Only read the configuration register once.
* Only write back to the configuration register if needed.
* Don't attempt to clear the lock bit, it locks itself to 1.
* Move the function to before it's called, so that we no longer need to
  forware declare it.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>

15 years agohwmon: (lm85) Misc cleanups
Jean Delvare [Wed, 25 Jun 2008 12:47:35 +0000 (08:47 -0400)]
hwmon: (lm85) Misc cleanups

Misc cleanups to the lm85 hardware monitoring driver:
* Mark constant arrays as const.
* Remove useless masks.
* Have lm85_write_value return void - nobody is checking the returned
  value anyway and in some cases it was plain wrong.
* Remove useless initializations.
* Rename new_client to client in lm85_detect.
* Replace cascaded if/else with a switch/case in lm85_detect.
* Group similar loops in lm85_update_device.
* Remove legacy comments.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Juerg Haefliger <juergh at gmail.com>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>

15 years agohwmon: (lm85) Don't write back cached values
Jean Delvare [Sat, 12 Apr 2008 17:56:35 +0000 (19:56 +0200)]
hwmon: (lm85) Don't write back cached values

In set_pwm_auto_pwm_minctl, we write cached register bits back to the
chip. This is a bad idea as we have no guarantee that the cache is
up-to-date. Better read a fresh register value from the chip, it's
safer and in fact it is also more simple.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Juerg Haefliger <juergh at gmail.com>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>

15 years agohwmon: (lm85) Drop dead code
Jean Delvare [Thu, 1 May 2008 06:47:33 +0000 (08:47 +0200)]
hwmon: (lm85) Drop dead code

Drop a lot of useless register defines, conversion macros, data structure
members and update code. All these register values were read from the
device but nothing is done out of them, so this is all dead code in
practice.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Juerg Haefliger <juergh at gmail.com>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>

15 years agohwmon: (lm85) Coding-style cleanups
Jean Delvare [Tue, 29 Apr 2008 12:03:37 +0000 (14:03 +0200)]
hwmon: (lm85) Coding-style cleanups

Fix most style issues reported by checkpatch, including:
* Trailing, missing and extra whitespace
* Extra parentheses, curly braces and semi-colons
* Broken indentation
* Lines too long

I verified that the generated code is the same before and after
these changes.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Juerg Haefliger <juergh at gmail.com>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>

15 years agohwmon: (lm75) add new-style driver binding
David Brownell [Sun, 4 May 2008 02:33:15 +0000 (19:33 -0700)]
hwmon: (lm75) add new-style driver binding

More LM75 updates:

 - Teach the LM75 driver to use new-style driver binding:

     * Create a second driver struct, using new-style driver binding
       methods cribbed from the legacy code.

     * Add a MODULE_DEVICE_TABLE (for "newER-style binding")

     * The legacy probe logic delegates its work to this new code.

     * The legacy driver now uses the name "lm75_legacy".

 - More careful initialization.  Chips are put into 9-bit mode so
   the current interconversion routines will never fail.

 - Save the original chip configuration, and restore it on exit.
   (Among other things, this normally turns off the mode where
   the chip is constantly sampling ... and thus saves power.)

So the new-style code should catch all chips that boards declare,
while the legacy code catches others.  This particular coexistence
strategy may need some work yet ... legacy modes might best be set
up explicitly by some tool not unlike "sensors-detect".  (Or else
completely eradicated...)

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>

15 years agohwmon: (lm75) cleanup/reorg
David Brownell [Mon, 21 Apr 2008 19:10:53 +0000 (12:10 -0700)]
hwmon: (lm75) cleanup/reorg

Minor cleanup and reorg of the lm75 code.

 - Kconfig provides a larger list of lm75-compatible chips

 - A top comment now says what the driver does (!) ... as in, just
   what sort of sensor is this??

 - Section comments now delineate the various sections of the driver:
   hwmon attributes, driver binding, register access, module glue.
   One driver binding function moved out of the attribute section,
   as did the driver struct itself.

 - Minor tweaks to legacy probe logic:  correct a comment, and
   remove a pointless variable.

 - Whitespace, linelength, and comment fixes.

This patch should include no functional changes.  It's preparation
for adding new-style (driver model) I2C driver binding.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Laurent Pinchart <laurentp@cse-semaphore.com>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>

15 years agohwmon: (adt7473) clarify an awkward bit of code
Mark M. Hoffman [Mon, 26 May 2008 19:09:36 +0000 (15:09 -0400)]
hwmon: (adt7473) clarify an awkward bit of code

Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
Acked-by: Jean Delvare <khali@linux-fr.org>

15 years agohwmon: (adt7473) Remove unused defines
Jean Delvare [Sat, 26 Apr 2008 14:28:27 +0000 (16:28 +0200)]
hwmon: (adt7473) Remove unused defines

All the *_MAX_ADDR defines are never used, so remove them. The number
of registers of each type is already expressed by the *_COUNT defines.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>

15 years agohwmon: (dme1737) fix voltage scaling
Juerg Haefliger [Wed, 26 Mar 2008 04:49:15 +0000 (21:49 -0700)]
hwmon: (dme1737) fix voltage scaling

This patch fixes a voltage scaling issue for the sch311x device.

Signed-Off-By: Juerg Haefliger <juergh at gmail.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>

15 years agohwmon: (dme1737) probe all addresses
Juerg Haefliger [Fri, 4 Apr 2008 04:34:19 +0000 (21:34 -0700)]
hwmon: (dme1737) probe all addresses

This patch adds a module load parameter to enable probing of
non-standard LPC addresses 0x162e and 0x164e when scanning for supported
ISA chips.

Signed-Off-By: Juerg Haefliger <juergh at gmail.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>

15 years agohwmon: (dme1737) demacrofy for readability
Juerg Haefliger [Wed, 26 Mar 2008 04:49:02 +0000 (21:49 -0700)]
hwmon: (dme1737) demacrofy for readability

This patch gets rid of a couple of macros previously used for sysfs attribute
generation and manipulation. This makes the source a little bigger but a lot
more readable and maintainable. It also fixes an issue with pwm5 & pwm6
attributes not being created read-only initially.

Signed-Off-By: Juerg Haefliger <juergh at gmail.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>

15 years agomd: raid10: wake up frozen array
Arthur Jones [Fri, 25 Jul 2008 19:03:38 +0000 (12:03 -0700)]
md: raid10: wake up frozen array

When rescheduling a bio in raid10, we wake up
the md thread, but if the array is frozen, this
will have no effect.  This causes the array to
remain frozen for eternity.  We add a wake_up
to allow the array to de-freeze.  This code is
nearly identical to the raid1 code, which has
this fix already.

Signed-off-by: Arthur Jones <ajones@riverbed.com>
Signed-off-by: NeilBrown <neilb@suse.de>

15 years agonetdev: Fix lockdep warnings in multiqueue configurations.
David S. Miller [Thu, 31 Jul 2008 23:58:50 +0000 (16:58 -0700)]
netdev: Fix lockdep warnings in multiqueue configurations.

When support for multiple TX queues were added, the
netif_tx_lock() routines we converted to iterate over
all TX queues and grab each queue's spinlock.

This causes heartburn for lockdep and it's not a healthy
thing to do with lots of TX queues anyways.

So modify this to use a top-level lock and a "frozen"
state for the individual TX queues.

Signed-off-by: David S. Miller <davem@davemloft.net>

15 years ago[PATCH] ocfs2: Release mutex in error handling code
Julia Lawall [Mon, 21 Jul 2008 07:59:15 +0000 (09:59 +0200)]
[PATCH] ocfs2: Release mutex in error handling code

The mutex is released on a successful return, so it would seem that it
should be released on an error return as well.

The semantic patch finds this problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
expression l;
@@

mutex_lock(l);
... when != mutex_unlock(l)
    when any
    when strict
(
if (...) { ... when != mutex_unlock(l)
+   mutex_unlock(l);
    return ...;
}
|
mutex_unlock(l);
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>

15 years ago[PATCH] ocfs2: Fix oops when racing files truncates with writes into an mmap region
Sunil Mushran [Thu, 17 Jul 2008 00:22:22 +0000 (17:22 -0700)]
[PATCH] ocfs2: Fix oops when racing files truncates with writes into an mmap region

This patch fixes an oops that is reproduced when one races writes to a mmap-ed
region with another process truncating the file.

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>

15 years ago[PATCH 2/2] ocfs2: Fix race between mount and recovery
Sunil Mushran [Tue, 15 Jul 2008 00:31:10 +0000 (17:31 -0700)]
[PATCH 2/2] ocfs2: Fix race between mount and recovery

As the fs recovery is asynchronous, there is a small chance that another
node can mount (and thus recover) the slot before the recovery thread
gets to it.

If this happens, the recovery thread will block indefinitely on the
journal/slot lock as that lock will be held for the duration of the mount
(by design) by the node assigned to that slot.

The solution implemented is to keep track of the journal replays using
a recovery generation in the journal inode, which will be incremented by the
thread replaying that journal. The recovery thread, before attempting the
blocking lock on the journal/slot lock, will compare the generation on disk
with what it has cached and skip recovery if it does not match.

This bug appears to have been inadvertently introduced during the mount/umount
vote removal by mainline commit 34d024f84345807bf44163fac84e921513dde323. In the
mount voting scheme, the messaging would indirectly indicate that the slot
was being recovered.

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>

15 years ago[PATCH 1/2] ocfs2: Add counter in struct ocfs2_dinode to track journal replays
Sunil Mushran [Tue, 15 Jul 2008 00:31:09 +0000 (17:31 -0700)]
[PATCH 1/2] ocfs2: Add counter in struct ocfs2_dinode to track journal replays

This patch renames the ij_pad to ij_recovery_generation in struct ocfs2_dinode.
This will be used to keep count of journal replays after an unclean shutdown.

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>

15 years ago[PATCH] configfs: Convenience macros for attribute definition.
Joel Becker [Thu, 19 Jun 2008 02:29:05 +0000 (19:29 -0700)]
[PATCH] configfs: Convenience macros for attribute definition.

Sysfs has the _ATTR() and _ATTR_RO() macros to make defining extended
form attributes easier.  configfs should have something similiar.

- _CONFIGFS_ATTR() and _CONFIGFS_ATTR_RO() are the counterparts to the
  sysfs macros.
- CONFIGFS_ATTR_STRUCT() creates the extended form attribute structure.
- CONFIGFS_ATTR_OPS() defines the show_attribute()/store_attribute()
  operations that call the show()/store() operations of the extended
  form configfs_attributes.

Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>

15 years ago[PATCH] configfs: Pin configfs subsystems separately from new config_items.
Joel Becker [Tue, 17 Jun 2008 22:34:32 +0000 (15:34 -0700)]
[PATCH] configfs: Pin configfs subsystems separately from new config_items.

configfs_mkdir() creates a new item by calling its parent's
->make_item/group() functions.  Once that object is created,
configfs_mkdir() calls try_module_get() on the new item's module.  If it
succeeds, the module owning the new item cannot be unloaded, and
configfs is safe to reference the item.

If the item and the subsystem it belongs to are part of the same module,
the subsystem is also pinned.  This is the common case.

However, if the subsystem is made up of multiple modules, this may not
pin the subsystem.  Thus, it would be possible to unload the toplevel
subsystem module while there is still a child item.  Thus, we now
try_module_get() the subsystem's module.  This only really affects
children of the toplevel subsystem group.  Deeper children already have
their parents pinned.

Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>

15 years ago[PATCH] configfs: Fix open directory making rmdir() fail
Louis Rilling [Fri, 27 Jun 2008 11:10:25 +0000 (13:10 +0200)]
[PATCH] configfs: Fix open directory making rmdir() fail

When checking for user-created elements under an item to be removed by rmdir(),
configfs_detach_prep() counts fake configfs_dirents created by dir_open() as
user-created and fails when finding one. It is however perfectly valid to remove
a directory that is open.

Simply make configfs_detach_prep() skip fake configfs_dirent, like it already
does for attributes, and like detach_groups() does.

Signed-off-by: Louis Rilling <louis.rilling@kerlabs.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>

15 years ago[PATCH] configfs: Lock new directory inodes before removing on cleanup after failure
Louis Rilling [Fri, 4 Jul 2008 14:56:06 +0000 (16:56 +0200)]
[PATCH] configfs: Lock new directory inodes before removing on cleanup after failure

Once a new configfs directory is created by configfs_attach_item() or
configfs_attach_group(), a failure in the remaining initialization steps leads
to removing a directory which inode the VFS may have already accessed.

This commit adds the necessary inode locking to safely remove configfs
directories while cleaning up after a failure. As an advantage, the locking
rules of populate_groups() and detach_groups() become the same: the caller must
have the group's inode mutex locked.

Signed-off-by: Louis Rilling <louis.rilling@kerlabs.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>

15 years ago[PATCH] configfs: Prevent userspace from creating new entries under attaching directories
Louis Rilling [Fri, 4 Jul 2008 14:56:05 +0000 (16:56 +0200)]
[PATCH] configfs: Prevent userspace from creating new entries under attaching directories

process 1:  process 2:
configfs_mkdir("A")
  attach_group("A")
    attach_item("A")
      d_instantiate("A")
    populate_groups("A")
      mutex_lock("A")
      attach_group("A/B")
        attach_item("A")
          d_instantiate("A/B")
mkdir("A/B/C")
  do_path_lookup("A/B/C", LOOKUP_PARENT)
    ok
  lookup_create("A/B/C")
    mutex_lock("A/B")
    ok
  configfs_mkdir("A/B/C")
    ok
      attach_group("A/C")
        attach_item("A/C")
          d_instantiate("A/C")
        populate_groups("A/C")
          mutex_lock("A/C")
          attach_group("A/C/D")
            attach_item("A/C/D")
              failure
          mutex_unlock("A/C")
          detach_groups("A/C")
            nothing to do
mkdir("A/C/E")
  do_path_lookup("A/C/E", LOOKUP_PARENT)
    ok
  lookup_create("A/C/E")
    mutex_lock("A/C")
    ok
  configfs_mkdir("A/C/E")
    ok
        detach_item("A/C")
        d_delete("A/C")
      mutex_unlock("A")
      detach_groups("A")
        mutex_lock("A/B")
        detach_group("A/B")
  detach_groups("A/B")
    nothing since no _default_ group
          detach_item("A/B")
        mutex_unlock("A/B")
        d_delete("A/B")
    detach_item("A")
    d_delete("A")

Two bugs:

1/ "A/B/C" and "A/C/E" are created, but never removed while their parent are
removed in the end. The same could happen with symlink() instead of mkdir().

2/ "A" and "A/C" inodes are not locked while detach_item() is called on them,
   which may probably confuse VFS.

This commit fixes 1/, tagging new directories with CONFIGFS_USET_CREATING before
building the inode and instantiating the dentry, and validating the whole
group+default groups hierarchy in a second pass by clearing
CONFIGFS_USET_CREATING.
mkdir(), symlink(), lookup(), and dir_open() simply return -ENOENT if
called in (or linking to) a directory tagged with CONFIGFS_USET_CREATING. This
does not prevent userspace from calling stat() successfuly on such directories,
but this prevents userspace from adding (children to | symlinking from/to |
read/write attributes of | listing the contents of) not validated items. In
other words, userspace will not interact with the subsystem on a new item until
the new item creation completes correctly.
It was first proposed to re-use CONFIGFS_USET_IN_MKDIR instead of a new
flag CONFIGFS_USET_CREATING, but this generated conflicts when checking the
target of a new symlink: a valid target directory in the middle of attaching
a new user-created child item could be wrongly detected as being attached.

2/ is fixed by next commit.

Signed-off-by: Louis Rilling <louis.rilling@kerlabs.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>

15 years ago[PATCH] configfs: Fix failing symlink() making rmdir() fail
Louis Rilling [Fri, 20 Jun 2008 12:09:22 +0000 (14:09 +0200)]
[PATCH] configfs: Fix failing symlink() making rmdir() fail

On a similar pattern as mkdir() vs rmdir(), a failing symlink() may make rmdir()
fail for the symlink's parent and the symlink's target as well.

failing symlink() making target's rmdir() fail:

process 1: process 2:
symlink("A/S" -> "B")
  allow_link()
  create_link()
    attach to "B" links list
rmdir("B")
  detach_prep("B")
    error because of new link
    configfs_create_link("A", "S")
      error (eg -ENOMEM)

failing symlink() making parent's rmdir() fail:

process 1: process 2:
symlink("A/D/S" -> "B")
  allow_link()
  create_link()
    attach to "B" links list
    configfs_create_link("A/D", "S")
      make_dirent("A/D", "S")
rmdir("A")
  detach_prep("A")
    detach_prep("A/D")
      error because of "S"
      create("S")
        error (eg -ENOMEM)

We cannot use the same solution as for mkdir() vs rmdir(), since rmdir() on the
target cannot wait on the i_mutex of the new symlink's parent without risking a
deadlock (with other symlink() or sys_rename()). Instead we define a global
mutex protecting all configfs symlinks attachment, so that rmdir() can avoid the
races above.

Signed-off-by: Louis Rilling <louis.rilling@kerlabs.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>

15 years ago[PATCH] configfs: Fix symlink() to a removing item
Louis Rilling [Mon, 23 Jun 2008 12:16:17 +0000 (14:16 +0200)]
[PATCH] configfs: Fix symlink() to a removing item

The rule for configfs symlinks is that symlinks always point to valid
config_items, and prevent the target from being removed. However,
configfs_symlink() only checks that it can grab a reference on the target item,
without ensuring that it remains alive until the symlink is correctly attached.

This patch makes configfs_symlink() fail whenever the target is being removed,
using the CONFIGFS_USET_DROPPING flag set by configfs_detach_prep() and
protected by configfs_dirent_lock.

This patch introduces a similar (weird?) behavior as with mkdir failures making
rmdir fail: if symlink() races with rmdir() of the parent directory (or its
youngest user-created ancestor if parent is a default group) or rmdir() of the
target directory, and then fails in configfs_create(), this can make the racing
rmdir() fail despite the concerned directory having no user-created entry (resp.
no symlink pointing to it or one of its default groups) in the end.
This behavior is fixed in later patches.

Signed-off-by: Louis Rilling <louis.rilling@kerlabs.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>

15 years ago[PATCH] configfs: Include linux/err.h in linux/configfs.h
Joel Becker [Thu, 17 Jul 2008 23:54:19 +0000 (16:54 -0700)]
[PATCH] configfs: Include linux/err.h in linux/configfs.h

We now use PTR_ERR() in the ->make_item() and ->make_group() operations.
Folks including configfs.h need err.h.

Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>

15 years agokbuild: scripts/ver_linux: don't set PATH
Adrian Bunk [Wed, 23 Jul 2008 19:50:45 +0000 (22:50 +0300)]
kbuild: scripts/ver_linux: don't set PATH

It would have saved both a bug submitter and me a few hours if
scripts/ver_linux had picked the same gcc as the build.

Since I can't see any reason why it fiddles with PATH at all this patch
therefore removes the PATH setting.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>

15 years agoKconfig/init: change help text to match default value
jkacur [Tue, 15 Jul 2008 22:31:16 +0000 (00:31 +0200)]
Kconfig/init: change help text to match default value

Change the "If unsure" message to match the default value.

Signed-off-by: John Kacur <jkacur at gmail dot com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>

15 years agokbuild: genksyms: Include extern information in dumps
Andreas Gruenbacher [Mon, 21 Jul 2008 02:28:25 +0000 (04:28 +0200)]
kbuild: genksyms: Include extern information in dumps

The extern flag currently is not included in type dump files
(genksyms --dump-types). Include that flag there for completeness.

Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>

15 years agokbuild: genksyms parser: fix the __attribute__ rule
Andreas Gruenbacher [Wed, 30 Jul 2008 22:03:49 +0000 (00:03 +0200)]
kbuild: genksyms parser: fix the __attribute__ rule

We are having two kinds of problems with genksyms today: fake checksum
changes without actual ABI changes, and changes which we would rather like
to ignore (such as an additional field at the end of a structure that
modules are not supposed to touch, for example).

I have thought about ways to improve genksyms and compute checksums
differently to avoid those problems, but in the end I don't see a
fundamentally better way.  So here are some genksyms patches for at least
making the checksums more easily manageable, if we cannot fully fix them.

In addition to the bugfixes (the first two patches), this allows genksyms
to track checksum changes and report why a checksum changed (third patch),
and to selectively ignore changes (fourth patch).

This patch:

Gcc __attribute__ definitions may occur repeatedly, e.g.,

static int foo __attribute__((__used__))
       __attribute__((aligned (16)));

The genksyms parser does not understand this, and generates a syntax error.
Fix this case.

Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>

15 years agoKVM: s390: Fix kvm on IBM System z10
Christian Borntraeger [Tue, 29 Jul 2008 21:48:42 +0000 (23:48 +0200)]
KVM: s390: Fix kvm on IBM System z10

The z10 system supports large pages, kvm-s390 doesnt.
Make sure that we dont advertise large pages to avoid the guest crashing as
soon as the guest kernel activates DAT.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>

15 years agodrivers/media, include/media: delete zero-length files
Jeff Garzik [Thu, 31 Jul 2008 07:46:30 +0000 (03:46 -0400)]
drivers/media, include/media: delete zero-length files

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>

15 years agonetfilter: xt_hashlimit: fix race between htable_destroy and htable_gc
Pavel Emelyanov [Thu, 31 Jul 2008 07:38:52 +0000 (00:38 -0700)]
netfilter: xt_hashlimit: fix race between htable_destroy and htable_gc

Deleting a timer with del_timer doesn't guarantee, that the
timer function is not running at the moment of deletion. Thus
in the xt_hashlimit case we can get into a ticklish situation
when the htable_gc rearms the timer back and we'll actually
delete an entry with a pending timer.

Fix it with using del_timer_sync().

AFAIK del_timer_sync checks for the timer to be pending by
itself, so I remove the check.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

15 years agonetfilter: ipt_recent: fix race between recent_mt_destroy and proc manipulations
Pavel Emelyanov [Thu, 31 Jul 2008 07:38:31 +0000 (00:38 -0700)]
netfilter: ipt_recent: fix race between recent_mt_destroy and proc manipulations

The thing is that recent_mt_destroy first flushes the entries
from table with the recent_table_flush and only *after* this
removes the proc file, corresponding to that table.

Thus, if we manage to write to this file the '+XXX' command we
will leak some entries. If we manage to write there a 'clean'
command we'll race in two recent_table_flush flows, since the
recent_mt_destroy calls this outside the recent_lock.

The proper solution as I see it is to remove the proc file first
and then go on with flushing the table. This flushing becomes
safe w/o the lock, since the table is already inaccessible from
the outside.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

15 years agonetfilter: nf_conntrack_tcp: decrease timeouts while data in unacknowledged
Patrick McHardy [Thu, 31 Jul 2008 07:38:01 +0000 (00:38 -0700)]
netfilter: nf_conntrack_tcp: decrease timeouts while data in unacknowledged

In order to time out dead connections quicker, keep track of outstanding data
and cap the timeout.

Suggested by Herbert Xu.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

15 years ago[MTD] [NOR] drivers/mtd/chips/jedec_probe.c: fix Am29DL800BB device ID
Jerry Hicks [Wed, 30 Jul 2008 19:49:59 +0000 (12:49 -0700)]
[MTD] [NOR] drivers/mtd/chips/jedec_probe.c: fix Am29DL800BB device ID

The device id for Am29DL800BB in jedec_probe.c is wrong.

Reference: http://www.spansion.com/datasheets/21519c4.pdf

I discovered this while working with u-boot.

The u-boot folks mentioned Linux as an upstream reference, thought I'd
post a heads-up here too.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>

15 years agopata_it821x: Driver updates and reworking
Alan Cox [Thu, 24 Jul 2008 16:16:06 +0000 (17:16 +0100)]
pata_it821x: Driver updates and reworking

- Add support for the RDC 1010 variant
- Rework the core library to have a read_id method. This allows the hacky
  bits of it821x to go and prepares us for pata_hd
- Switch from WARN to BUG in ata_id_string as it will reboot if you get
  it wrong so WARN won't be seen
- Allow the issue of command 0xFC on the 821x. This is needed to query
  rebuild status.
- Tidy up printk formatting
- Do more ident rewriting on RAID volumes to handle firmware provided
  ident data which is rather wonky
- Report the firmware revision and device layout in RAID mode
- Don't try and disable raid on the 8211 or RDC - they don't have the
  relevant bits

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>

15 years agolibata.h: replace __FUNCTION__ with __func__
Alexander Beregalov [Sun, 20 Jul 2008 20:06:19 +0000 (00:06 +0400)]
libata.h: replace __FUNCTION__ with __func__

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>

15 years agoata_piix: subsys 106b:00a3 is apple ich8m too
Tejun Heo [Tue, 29 Jul 2008 06:06:26 +0000 (15:06 +0900)]
ata_piix: subsys 106b:00a3 is apple ich8m too

Subsys 106b:00a3 also is the weird apple ich8m which chokes when the
latter two ports are accessed, add it.  Reported by Felipe Sere.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Felipe Sere <dodofxp@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>

15 years agolibata-core: make sure that ata_force_tbl is freed in case of an error
Elias Oltmanns [Wed, 30 Jul 2008 19:32:39 +0000 (12:32 -0700)]
libata-core: make sure that ata_force_tbl is freed in case of an error

Fix a potential memory leak when ata_init() encounters an error.

Signed-off-by: Elias Oltmanns <eo@nebensachen.de>
Cc: Tejun Heo <tj@kernel.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>

15 years agolibata: update atapi disable handling
Tejun Heo [Wed, 30 Jul 2008 22:52:40 +0000 (07:52 +0900)]
libata: update atapi disable handling

Global and per-LLD ATAPI disable checks were done in the command issue
path probably because it was left out during EH conversion.  On
affected machines, this can cause lots of warning messages.  Move them
to where they belong - the probing path.

Reported by Chunbo Luo.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Chunbo Luo <chunbo.luo@windriver.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>

15 years agopata_via: add VX800 flag; add function for fixing h/w bugs
JosephChan@via.com.tw [Wed, 30 Jul 2008 19:32:48 +0000 (12:32 -0700)]
pata_via: add VX800 flag; add function for fixing h/w bugs

Add flag VIA_SATA_PATA for vx800, VX800 uses the same
chipset(0x0581/0x5324) as CX700, which has 1 PATA channel(Master/Slave)
and 1 SATA channel(Master/Slave) Add function <via_ata_tf_load>.  This is
to fix the internal bug of VIA chipsets, which will reset the device
register after changing the IEN bit in CTL register

Signed-off-by: Joseph Chan <josephchan@via.com.tw>
Cc: Tejun Heo <tj@kernel.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>

15 years agopata_ali: misplaced pci_dev_put()
Ben Dooks [Thu, 24 Jul 2008 15:38:06 +0000 (16:38 +0100)]
pata_ali: misplaced pci_dev_put()

The ali_init_one() function does a search for an isa_bridge,
but then fails to release it if the revision information was
not correctly found.

the problem comes from:
isa_bridge = pci_get_device(...);
if (isa_bridge && ...) {
pci_dev_put(isa_bridge);
}

where the pci_dev_put() is never called if isa_bridge
was valid but the extra checks on the chip-revision
fail to match.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>

15 years agoirda: replace __FUNCTION__ with __func__
Harvey Harrison [Thu, 31 Jul 2008 00:20:18 +0000 (17:20 -0700)]
irda: replace __FUNCTION__ with __func__

__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

15 years agonsc-ircc: default to dongle type 9 on IBM hardware
Matthew Garrett [Thu, 31 Jul 2008 00:00:38 +0000 (17:00 -0700)]
nsc-ircc: default to dongle type 9 on IBM hardware

This is necessary to set the dongle type on the nsc driver in order to get
it to work correctly.  Thinkpads all appear to use dongle type 9.  This
patch defaults nsc devices with an IBM PnP descriptor to use type 9.

Signed-off-by: Matthew Garrett <mjg59@srcf.ucam.org>
Signed-off-by: Ben Collins <ben.collins@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

15 years agobluetooth: add quirks for a few hci_usb devices
Michael Frey [Wed, 30 Jul 2008 23:59:15 +0000 (16:59 -0700)]
bluetooth: add quirks for a few hci_usb devices

Preface: The "Broadcom" device is on unreleased hardware, so I can't
disclose the actual model.

When the Dell 370 and 410 BT adapters are put into BT radio mode, they
need to be prepared like many other Broadcom adapters.

Also, add quirk Broadcom 2046 devices with HCI_RESET.  Reference for this
bug: https://launchpad.net/bugs/249448

Signed-off-by: Michael Frey <michael.frey@canonical.com>
Signed-off-by: Mario Limonciello <Mario_Limonciello@Dell.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Ben Collins <ben.collins@canonical.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

15 years agohysdn: remove the packed attribute from PofTimStamp_tag
David Howells [Wed, 30 Jul 2008 23:48:05 +0000 (16:48 -0700)]
hysdn: remove the packed attribute from PofTimStamp_tag

Remove the packed attribute from PofTimStamp_tag in the hysdn driver as the
thing being packed is just an array of chars and so is unpackable.

This deals with a compiler warning:

In file included from drivers/isdn/hysdn/hysdn_boot.c:19:
drivers/isdn/hysdn/hysdn_pof.h:63: warning: 'packed' attribute ignored for field of type 'unsigned char[40]'

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

15 years agoisdn: use the common ascii hex helpers
Harvey Harrison [Wed, 30 Jul 2008 23:40:22 +0000 (16:40 -0700)]
isdn: use the common ascii hex helpers

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Acked-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

15 years agotg3: adapt tg3 to use reworked PCI PM code
Rafael J. Wysocki [Wed, 30 Jul 2008 23:37:33 +0000 (16:37 -0700)]
tg3: adapt tg3 to use reworked PCI PM code

Adapt the tg3 driver to use the reworked PCI PM and make it use the
exported PCI PM core functions instead of accessing the PCI PM registers
directly by itself.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

15 years agoatm: fix direct casts of pointers to u32 in the InterPhase driver
David Howells [Wed, 30 Jul 2008 23:33:05 +0000 (16:33 -0700)]
atm: fix direct casts of pointers to u32 in the InterPhase driver

Fix direct casts of pointers to u32 in the InterPhase ATM driver.  These are
all arguments being passed to printk() calls.  So drop the cast and change the
%x to a %p.

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Chas Williams <chas@cmf.nrl.navy.mil>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

15 years agoatm: fix const assignment/discard warnings in the ATM networking driver
David Howells [Wed, 30 Jul 2008 23:31:46 +0000 (16:31 -0700)]
atm: fix const assignment/discard warnings in the ATM networking driver

Fix const assignment/discard warnings in the ATM networking driver.

The lane2_assoc_ind() function needed its arguments changing to match changes
in the lane2_ops struct (patch 61c33e012964ce358b42d2a1e9cd309af5dab02b
"atm: use const where reasonable").

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Chas Williams <chas@cmf.nrl.navy.mil>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

15 years agonet: use the common ascii hex helpers
Harvey Harrison [Wed, 30 Jul 2008 23:30:15 +0000 (16:30 -0700)]
net: use the common ascii hex helpers

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

15 years agorandom32: seeding improvement
Stephen Hemminger [Wed, 30 Jul 2008 23:29:19 +0000 (16:29 -0700)]
random32: seeding improvement

The rationale is:
   * use u32 consistently
   * no need to do LCG on values from (better) get_random_bytes
   * use more data from get_random_bytes for secondary seeding
   * don't reduce state space on srandom32()
   * enforce state variable initialization restrictions

Note: the second paper has a version of random32() with even longer period
and a version of random64() if needed.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

15 years agobridge: send correct MTU value in PMTU (revised)
Simon Wunderlich [Wed, 30 Jul 2008 23:27:55 +0000 (16:27 -0700)]
bridge: send correct MTU value in PMTU (revised)

When bridging interfaces with different MTUs, the bridge correctly chooses
the minimum of the MTUs of the physical devices as the bridges MTU.  But
when a frame is passed which fits through the incoming, but not through
the outgoing interface, a "Fragmentation Needed" packet is generated.

However, the propagated MTU is hardcoded to 1500, which is wrong in this
situation.  The sender will repeat the packet again with the same frame
size, and the same problem will occur again.

Instead of sending 1500, the (correct) MTU value of the bridge is now sent
via PMTU.  To achieve this, the corresponding rtable structure is stored
in its net_bridge structure.

Modified to get rid of fake_net_device as well.

Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

15 years agoMerge branch 'upstream-davem' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
David S. Miller [Wed, 30 Jul 2008 22:44:30 +0000 (15:44 -0700)]
Merge branch 'upstream-davem' of /linux/kernel/git/jgarzik/netdev-2.6

15 years agoMerge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
Linus Torvalds [Wed, 30 Jul 2008 22:14:56 +0000 (15:14 -0700)]
Merge branch 'upstream' of git://ftp.linux-mips.org/upstream-linus

* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  [MIPS] Cobalt: update defconfig
  [MIPS] kgdb: add arch support for the kernel's kgdb core
  [MIPS] kgdb: Remove existing implementation
  [MIPS] TXx9: Kconfig cleanup
  [MIPS] TXx9: Kill unused txx927.h
  [MIPS] TXx9: Support early_printk
  [MIPS] TXx9: Unify serial_txx9 setup
  [MIPS] TXx9: Random cleanup
  [MIPS] TXx9: Make tx4938-specific code more independent
  [MIPS] TXx9: Make tx3927-specific code more independent
  [MIPS] TXx9: Cleanup watchdog
  [MIPS] TXx9: Cleanup restart/halt/power_off
  [MIPS] TXx9: PCI error handling
  [MIPS] TXx9: Add some pci options
  [MIPS] Introduce pcibios_plat_setup
  [MIPS] TXx9: PCI fixes for tx3927/tx4927
  [MIPS] TXx9: Fix JMR3927 irq numbers
  [MIPS] RB532: Flags are unsigned long
  [MIPS] Initialization of Alchemy boards
  [MIPS] tlb-r4k: Nuke broken paranoia error test.

15 years agoFix off-by-one error in iov_iter_advance()
Linus Torvalds [Wed, 30 Jul 2008 21:45:12 +0000 (14:45 -0700)]
Fix off-by-one error in iov_iter_advance()

The iov_iter_advance() function would look at the iov->iov_len entry
even though it might have iterated over the whole array, and iov was
pointing past the end.  This would cause DEBUG_PAGEALLOC to trigger a
kernel page fault if the allocation was at the end of a page, and the
next page was unallocated.

The quick fix is to just change the order of the tests: check that there
is any iovec data left before we check the iov entry itself.

Thanks to Alexey Dobriyan for finding this case, and testing the fix.

Reported-and-tested-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Nick Piggin <npiggin@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: <stable@kernel.org> [2.6.25.x, 2.6.26.x]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

15 years agoromfs_readpage: don't report errors for pages beyond i_size
Linus Torvalds [Wed, 30 Jul 2008 21:26:25 +0000 (14:26 -0700)]
romfs_readpage: don't report errors for pages beyond i_size

We zero-fill them like we are supposed to, and that's all fine.  It's
only an error if the 'romfs_copyfrom()' routine isn't able to fill the
data that is supposed to be there.

Most of the patch is really just re-organizing the code a bit, and using
separate variables for the error value and for how much of the page we
actually filled from the filesystem.

Reported-and-tested-by: Chris Fester <cfester@wms.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Matt Waddel <matt.waddel@freescale.com>
Cc: Greg Ungerer <gerg@snapgear.com>
Signed-of-by: Linus Torvalds <torvalds@linux-foundation.org>

15 years agodrivers/net/ehea/ehea_main.c: Release mutex in error handling code
Julia Lawall [Mon, 21 Jul 2008 07:57:26 +0000 (09:57 +0200)]
drivers/net/ehea/ehea_main.c: Release mutex in error handling code

The mutex is released on a successful return, so it would seem that it
should be released on an error return as well.

The semantic patch finds this problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
expression l;
@@

mutex_lock(l);
... when != mutex_unlock(l)
    when any
    when strict
(
if (...) { ... when != mutex_unlock(l)
+   mutex_unlock(l);
    return ...;
}
|
mutex_unlock(l);
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>

15 years agosh_eth: Add support of SH7763 to sh_eth
Nobuhiro Iwamatsu [Mon, 30 Jun 2008 02:08:17 +0000 (11:08 +0900)]
sh_eth: Add support of SH7763 to sh_eth

SH7763 has Ethernet core same as SH7710/SH7712.
Positions of some registry are different, but the basic part is the same.
I add support of ethernet of sh7763 to sh_eth.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>

15 years agofix NE2000 linkage error
Mikael Pettersson [Wed, 30 Jul 2008 11:44:55 +0000 (13:44 +0200)]
fix NE2000 linkage error

Trying to build with CONFIG_NE2000=m fails with:

  scripts/mod/modpost   -o /tmp/tmp/linux-2.6.27-rc1/Module.symvers    -S     -s
ERROR: "NS8390_init" [drivers/net/ne.ko] undefined!

This is because the split of 8390 into pausing and non-pausing
versions was incompletely propagated to ne.c. This fixes it.

Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>

15 years ago[MIPS] Cobalt: update defconfig
Yoichi Yuasa [Fri, 25 Jul 2008 16:34:52 +0000 (01:34 +0900)]
[MIPS] Cobalt: update defconfig

Select new LCD framebuffer driver.

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

15 years ago[MIPS] kgdb: add arch support for the kernel's kgdb core
Jason Wessel [Tue, 29 Jul 2008 20:58:53 +0000 (15:58 -0500)]
[MIPS] kgdb: add arch support for the kernel's kgdb core

The new kgdb architecture specific handler registers and unregisters
dynamically for exceptions depending on when you configure a kgdb I/O
driver.

Aside from initializing the exceptions earlier in the boot process,
kgdb should have no impact on a device when it is compiled in so long
as an I/O module is not configured for use.

There have been quite a number of contributors during the existence of
this patch (see arch/mips/kernel/kgdb.c).  Most recently Jason
re-wrote the mips kgdb logic to use the die notification handlers.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

15 years ago[MIPS] kgdb: Remove existing implementation
Jason Wessel [Tue, 29 Jul 2008 20:58:52 +0000 (15:58 -0500)]
[MIPS] kgdb: Remove existing implementation

This patch explicitly removes the kgdb implementation, for mips which
is intended to be followed by a patch that adds a kgdb implementation
for MIPS that makes use of the kgdb core in the kernel.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

15 years ago[MIPS] TXx9: Kconfig cleanup
Atsushi Nemoto [Tue, 29 Jul 2008 13:11:33 +0000 (22:11 +0900)]
[MIPS] TXx9: Kconfig cleanup

Unify some entries in txx9/Kconfig.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

15 years ago[MIPS] TXx9: Kill unused txx927.h
Atsushi Nemoto [Tue, 29 Jul 2008 13:10:47 +0000 (22:10 +0900)]
[MIPS] TXx9: Kill unused txx927.h

include/asm-mips/txx9/txx927.h is no longer used.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

15 years ago[MIPS] TXx9: Support early_printk
Atsushi Nemoto [Tue, 29 Jul 2008 13:10:08 +0000 (22:10 +0900)]
[MIPS] TXx9: Support early_printk

Kill jmr3927-specific prom_putchar and add txx9-generic prom_putchar
to support early_printk.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

15 years ago[MIPS] TXx9: Unify serial_txx9 setup
Atsushi Nemoto [Fri, 25 Jul 2008 14:08:06 +0000 (23:08 +0900)]
[MIPS] TXx9: Unify serial_txx9 setup

* Unify calling of early_serial_txx9_setup.
* Use dedicated serial clock on RBTX4938.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

15 years ago[MIPS] TXx9: Random cleanup
Atsushi Nemoto [Wed, 23 Jul 2008 15:25:21 +0000 (00:25 +0900)]
[MIPS] TXx9: Random cleanup

* Random cleanups spotted by checkpatch script.
* Do not initialize panic_timeout.  "panic=" kernel parameter can be used.
* Do not add "ip=any" or "ip=bootp".  This options is not board specific.
* Do not add "root=/dev/nfs".  This is default on CONFIG_ROOT_NFS.
* Kill unused error checking.
* Fix IRQ comment to match current code.
* Kill some unneeded includes
* ST0_ERL is already cleared in generic code.
* conswitchp is initialized generic code.
* __init is not needed in prototype.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

15 years ago[MIPS] TXx9: Make tx4938-specific code more independent
Atsushi Nemoto [Wed, 23 Jul 2008 15:25:20 +0000 (00:25 +0900)]
[MIPS] TXx9: Make tx4938-specific code more independent

Make some TX4938 SoC specific code independent from board specific code.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

15 years ago[MIPS] TXx9: Make tx3927-specific code more independent
Atsushi Nemoto [Wed, 23 Jul 2008 15:25:19 +0000 (00:25 +0900)]
[MIPS] TXx9: Make tx3927-specific code more independent

Make some TX3927 SoC specific code independent from board specific code.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

15 years ago[MIPS] TXx9: Cleanup watchdog
Atsushi Nemoto [Wed, 23 Jul 2008 15:25:18 +0000 (00:25 +0900)]
[MIPS] TXx9: Cleanup watchdog

Unify registration of txx9wdt platform device.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

15 years ago[MIPS] TXx9: Cleanup restart/halt/power_off
Atsushi Nemoto [Wed, 23 Jul 2008 15:25:17 +0000 (00:25 +0900)]
[MIPS] TXx9: Cleanup restart/halt/power_off

Unify machine_restart/machine_halt/pm_power_off and add fallback
machine_halt routine.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

15 years ago[MIPS] TXx9: PCI error handling
Atsushi Nemoto [Fri, 25 Jul 2008 14:01:35 +0000 (23:01 +0900)]
[MIPS] TXx9: PCI error handling

From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Date: Thu, 24 Jul 2008 00:25:16 +0900
Subject: [PATCH] txx9: PCI error handling

Add more control and detailed report on PCI error interrupt.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

15 years ago[MIPS] TXx9: Add some pci options
Atsushi Nemoto [Wed, 23 Jul 2008 15:25:15 +0000 (00:25 +0900)]
[MIPS] TXx9: Add some pci options

Add pci options for backplane type, clock selection, error handling,
timeout values.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

15 years ago[MIPS] Introduce pcibios_plat_setup
Atsushi Nemoto [Wed, 23 Jul 2008 15:25:14 +0000 (00:25 +0900)]
[MIPS] Introduce pcibios_plat_setup

Introduce pcibios_plat_setup for platform-specific pcibios_setup.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

15 years ago[MIPS] TXx9: PCI fixes for tx3927/tx4927
Atsushi Nemoto [Wed, 23 Jul 2008 15:25:13 +0000 (00:25 +0900)]
[MIPS] TXx9: PCI fixes for tx3927/tx4927

* Fix tx3927 pci ops for Type-1 configuration
* Fix abort checking of tx3927 pci ops
* Flush write buffer to avoid spurious PCI error interrupt
* Add a quirk for FPCIB backplane

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

15 years ago[MIPS] TXx9: Fix JMR3927 irq numbers
Atsushi Nemoto [Wed, 23 Jul 2008 15:25:12 +0000 (00:25 +0900)]
[MIPS] TXx9: Fix JMR3927 irq numbers

* Fix wrong txx9_clockevent interrupt number
* Fix TXX9_IRQ_BASE for JMR3927+FPCIB case

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

15 years ago[MIPS] RB532: Flags are unsigned long
Adrian Bunk [Tue, 29 Jul 2008 06:46:34 +0000 (09:46 +0300)]
[MIPS] RB532: Flags are unsigned long

A recent generic change now catches such bugs:

<--  snip  -->

...
CC arch/mips/rb532/time.o
cc1: warnings being treated as errors
/home/bunk/linux/kernel-2.6/git/linux-2.6/arch/mips/rb532/time.c: In function 'plat_time_init':
/home/bunk/linux/kernel-2.6/git/linux-2.6/arch/mips/rb532/time.c:55: error: comparison of distinct pointer types lacks a cast
/home/bunk/linux/kernel-2.6/git/linux-2.6/arch/mips/rb532/time.c:66: error: comparison of distinct pointer types lacks a cast
make[2]: *** [arch/mips/rb532/time.o] Error 1

<--  snip  -->

Reported-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

15 years ago[MIPS] Initialization of Alchemy boards
Kevin Hickey [Mon, 28 Jul 2008 18:09:26 +0000 (13:09 -0500)]
[MIPS] Initialization of Alchemy boards

An earlier update changed some calls from simple_strotl to strict_strtol but
did not account for the differences in the syntax between the calls.
simple_strotl returns the integer; strict_strtol returns an error code and
takes a pointer to the result.  As it was, NULL was being passed in place of
the result, which led to failures during kernel initialization when using
YAMON.

Signed-off-by: Kevin Hickey <khickey@rmicorp.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

15 years ago[MIPS] tlb-r4k: Nuke broken paranoia error test.
Ralf Baechle [Tue, 22 Jul 2008 17:04:38 +0000 (18:04 +0100)]
[MIPS] tlb-r4k: Nuke broken paranoia error test.

Bug originally found and reported by Julia Lawall <julia@diku.dk>.  I
decieded that the whole error check was mostly useless paranoia and should
be discarded.  It would only ever trigger if r3k_have_wired_reg has a wrong
value.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

15 years agokbuild: scripts/genksyms/lex.l: add %option noinput
Adrian Bunk [Wed, 16 Jul 2008 23:08:12 +0000 (02:08 +0300)]
kbuild: scripts/genksyms/lex.l: add %option noinput

gcc 4.3 correctly determines that input() is unused and gives the
following warning:

<--  snip  -->

...
  HOSTCC  scripts/genksyms/lex.o
scripts/genksyms/lex.c:1487: warning: ‘input’ defined but not used
...

<--  snip  -->

Fix it by adding %option noinput to scripts/genksyms/lex.l and
regeneration of scripts/genksyms/lex.c_shipped.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>

15 years agokconfig: scripts/kconfig/zconf.l: add %option noinput
Adrian Bunk [Wed, 16 Jul 2008 23:07:59 +0000 (02:07 +0300)]
kconfig: scripts/kconfig/zconf.l: add %option noinput

gcc 4.3 correctly determines that input() is unused and gives the
following warning:

<--  snip  -->

...
  HOSTCC  scripts/kconfig/zconf.tab.o
scripts/kconfig/lex.zconf.c:1628: warning: ‘input’ defined but not used
...

<--  snip  -->

Fix it by adding %option noinput to scripts/kconfig/zconf.l and
regeneration of scripts/kconfig/lex.zconf.c_shipped.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>

15 years agokbuild: fix O=... build of um
Sam Ravnborg [Wed, 30 Jul 2008 20:21:20 +0000 (22:21 +0200)]
kbuild: fix O=... build of um

We used include/asm-$ARCH/system.h to check if
we should create a symlink in include2 directory with
make O=... builds.
But um does not have such a file thus build filed.

Let's try anohter filename:
$ ls -d include/asm-* | wc -l
21
$ ls -d include/asm-*/errno.h | wc -l
21

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Jeff Dike <jdike@addtoit.com>

15 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Linus Torvalds [Wed, 30 Jul 2008 17:43:56 +0000 (10:43 -0700)]
Merge branch 'merge' of git://git./linux/kernel/git/benh/powerpc

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
  powerpc/mm: Lockless get_user_pages_fast() for 64-bit (v3)
  powerpc: Don't use the wrong thread_struct for ptrace get/set VSX regs
  powerpc: Fix ptrace buffer size for VSX
  powerpc: Correctly hookup PTRACE_GET/SETVSRREGS for 32 bit processes
  ide/powermac: Fix use of uninitialized pointer on media-bay
  powerpc: Allow non-hcall return values for lparcfg writes
  ipmi/powerpc: Use linux/of_{device,platform}.h instead of asm
  powerpc/fsl: proliferate simple-bus compatibility to soc nodes
  Documentation: remove old sbc8260 board specific information
  cpm2: Rework baud rate generators configuration to support external clocks.
  powerpc: rtc_cmos_setup: assign interrupts only if there is i8259 PIC
  cpm_uart: Add generic clock API support to set baudrates
  cpm_uart: Modem control lines support
  powerpc: implement GPIO LIB API on CPM1 Freescale SoC.
  cpm2: Implement GPIO LIB API on CPM2 Freescale SoC.
  powerpc: Fix 8xx build failure
  powerpc: clean up the Book-E HW watchpoint support

15 years agocpumask: statement expressions confuse some versions of gcc
Stephen Rothwell [Tue, 29 Jul 2008 06:07:37 +0000 (16:07 +1000)]
cpumask: statement expressions confuse some versions of gcc

when you take the address of the result.  Noticed on a sparc64 compile
using a version 3.4.5 cross compiler.

 kernel/time/tick-common.c: In function `tick_check_new_device':
 kernel/time/tick-common.c:210: error: invalid lvalue in unary `&'
 ...

Just make it a regular expression.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Wed, 30 Jul 2008 17:13:37 +0000 (10:13 -0700)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (47 commits)
  net: Make "networking" one-click deselectable.
  ipv6: Fix useless proc net sockstat6 removal
  tcp: MD5: Use MIB counter instead of warning for MD5 mismatch.
  pkt_sched: Fix OOPS on ingress qdisc add.
  niu: Fix error checking in niu_ethflow_to_class.
  IPv6: datagram_send_ctl() should exit immediately when an error occured
  mac80211: fix mesh beaconing
  PS3: gelic: use unsigned long for irqflags
  mac80211: fix cfg80211 hooks for master interface
  nl80211: fix dump callbacks
  mac80211: partially fix skb->cb use
  rtl8187: Improve wireless statistics for RTL8187B
  rtl8187: Fix for TX sequence number problem
  mac80211: append CONFIG_ to MAC80211_VERBOSE_PS_DEBUG in net/mac80211/tx.c.
  mac80211: fix sparse integer as NULL pointer warning
  drivers/net/wireless/iwlwifi/iwl-led.c: printk fix
  mac80211: return correct error return from ieee80211_wep_init
  mac80211: tx, use dev_kfree_skb_any for beacon_get
  rt2x00: Clear queue entry flags during initialization
  rt2x00: Force full register config after start()
  ...

15 years agox86: wrong register was used in align macro
Vitaly Mayatskikh [Wed, 30 Jul 2008 11:30:14 +0000 (13:30 +0200)]
x86: wrong register was used in align macro

New ALIGN_DESTINATION macro has sad typo: r8d register was used instead
of ecx in fixup section. This can be considered as a regression.

Register ecx was also wrongly loaded with value in r8d in
copy_user_nocache routine.

Signed-off-by: Vitaly Mayatskikh <v.mayatskih@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

15 years agosgi-xp: setup the notify GRU message queue
Dean Nelson [Wed, 30 Jul 2008 05:34:19 +0000 (22:34 -0700)]
sgi-xp: setup the notify GRU message queue

Setup the notify GRU message queue that is used for sending user messages
on UV systems.

Signed-off-by: Dean Nelson <dcn@sgi.com>
Cc: Jack Steiner <steiner@sgi.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

15 years agosgi-xp: setup the activate GRU message queue
Dean Nelson [Wed, 30 Jul 2008 05:34:18 +0000 (22:34 -0700)]
sgi-xp: setup the activate GRU message queue

Setup the activate GRU message queue that is used for partition activation
and channel connection on UV systems.

Signed-off-by: Dean Nelson <dcn@sgi.com>
Cc: Jack Steiner <steiner@sgi.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

15 years agosgi-xp: cleanup naming of partition defines
Dean Nelson [Wed, 30 Jul 2008 05:34:18 +0000 (22:34 -0700)]
sgi-xp: cleanup naming of partition defines

Cleanup naming of partition defines.

Signed-off-by: Dean Nelson <dcn@sgi.com>
Cc: Jack Steiner <steiner@sgi.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

15 years agosgi-xp: move xpc_check_remote_hb() to support both SN2 and UV
Dean Nelson [Wed, 30 Jul 2008 05:34:17 +0000 (22:34 -0700)]
sgi-xp: move xpc_check_remote_hb() to support both SN2 and UV

Move xpc_check_remote_hb() so it can support both SN2 and UV.

Signed-off-by: Dean Nelson <dcn@sgi.com>
Cc: Jack Steiner <steiner@sgi.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

15 years agosgi-xp: add usage of GRU driver by xpc_remote_memcpy()
Dean Nelson [Wed, 30 Jul 2008 05:34:16 +0000 (22:34 -0700)]
sgi-xp: add usage of GRU driver by xpc_remote_memcpy()

Add UV support to xpc_remote_memcpy(), which involves interfacing to the
GRU driver.

Signed-off-by: Dean Nelson <dcn@sgi.com>
Cc: Jack Steiner <steiner@sgi.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

15 years agosgi-xp: enable building of XPC/XPNET on x86_64
Dean Nelson [Wed, 30 Jul 2008 05:34:16 +0000 (22:34 -0700)]
sgi-xp: enable building of XPC/XPNET on x86_64

Get XPC/XPNET to build on x86_64.  Trying to modprobe them up on a non-UV
or sn2 system will result in a -ENODEV.

Signed-off-by: Dean Nelson <dcn@sgi.com>
Cc: Jack Steiner <steiner@sgi.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

15 years agosgi-xp: add 'jiffies' to reserved page's timestamp name
Dean Nelson [Wed, 30 Jul 2008 05:34:15 +0000 (22:34 -0700)]
sgi-xp: add 'jiffies' to reserved page's timestamp name

Rename XPC's reserved page's timestamp member to reflect the units of time
involved.

Signed-off-by: Dean Nelson <dcn@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

15 years agosgi-xp: use standard bitops macros and functions
Dean Nelson [Wed, 30 Jul 2008 05:34:14 +0000 (22:34 -0700)]
sgi-xp: use standard bitops macros and functions

Change sgi-xp to use the standard bitops macros and functions instead of
trying to invent its own mechanism.

Signed-off-by: Dean Nelson <dcn@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>