]> err.no Git - linux-2.6/log
linux-2.6
15 years ago[S390] Optimize storage key operations for anon pages
Martin Schwidefsky [Fri, 1 Aug 2008 14:39:12 +0000 (16:39 +0200)]
[S390] Optimize storage key operations for anon pages

For anonymous pages without a swap cache backing the check in
page_remove_rmap for the physical dirty bit in page_remove_rmap is
unnecessary. The instructions that are used to check and reset the dirty
bit are expensive. Removing the check noticably speeds up process exit.
In addition the clearing of the dirty bit in __SetPageUptodate is
pointless as well. With these two changes there is no storage key
operation for an anonymous page anymore if it does not hit the swap
space.

The micro benchmark which repeatedly executes an empty shell script
gets about 5% faster.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] nohz/sclp: disable timer on synchronous waits.
Heiko Carstens [Fri, 1 Aug 2008 14:39:11 +0000 (16:39 +0200)]
[S390] nohz/sclp: disable timer on synchronous waits.

sclp_sync_wait wait synchronously for an sclp interrupt and disables
timer interrupts. However on the irq enter paths there is an extra
check if a timer interrupt would be due and calls the timer callback.
This would schedule softirqs in the wrong context.
So introduce local_tick_enable/disable which prevents this.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] ipl: Reboot from alternate device does not work when booting from file
Michael Holzheu [Fri, 1 Aug 2008 14:39:10 +0000 (16:39 +0200)]
[S390] ipl: Reboot from alternate device does not work when booting from file

During startup we check if diag308 works using diag 308 subcode 6,
which stores the actual ipl information. This fails with rc = 0x102, if
the system has been ipled from the HMC using load from CD or load from file.
In the case of rc = 0x102 we have to assume that diag 308 is working,
since it still can be used to ipl from an alternative device.

Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] dasd: Add support for enhanced VM UID
Stefan Weinhuber [Fri, 1 Aug 2008 14:39:09 +0000 (16:39 +0200)]
[S390] dasd: Add support for enhanced VM UID

When z/VM provides two virtual devices (minidisks) that reside on the
same real device, both will receive the configuration data from the
real device and thus get the same uid. To fix this problem, z/VM
provides an additional configuration data record that allows to
distinguish between minidisks.
z/VM APAR VM64273 needs be installed so this fix has an effect.

Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] Remove last P390 trace.
Heiko Carstens [Fri, 1 Aug 2008 14:39:08 +0000 (16:39 +0200)]
[S390] Remove last P390 trace.

Seems like I forgot this hunk...

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[MTD] [NAND] diskonchip.c fix sparse endian warnings
Harvey Harrison [Wed, 30 Jul 2008 19:34:57 +0000 (12:34 -0700)]
[MTD] [NAND] diskonchip.c fix sparse endian warnings

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
15 years ago[MTD] [NAND] drivers/mtd/nand/nandsim.c needs div64.h
Andrew Morton [Wed, 30 Jul 2008 19:34:56 +0000 (12:34 -0700)]
[MTD] [NAND] drivers/mtd/nand/nandsim.c needs div64.h

drivers/mtd/nand/nandsim.c: In function 'divide':
drivers/mtd/nand/nandsim.c:462: error: implicit declaration of function 'do_div'

Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
15 years agokgdb: fix gdb serial thread queries
Jason Wessel [Fri, 1 Aug 2008 13:39:35 +0000 (08:39 -0500)]
kgdb: fix gdb serial thread queries

The command "info threads" did not work correctly with kgdb.  It would
result in a silent kernel hang if used.

This patach addresses several problems.
 - Fix use of deprecated NR_CPUS
 - Fix kgdb to not walk linearly through the pid space
 - Correctly implement shadow pids
 - Change the threads per query to a #define
 - Fix kgdb_hex2long to work with negated values

The threads 0 and -1 are reserved to represent the current task.  That
means that CPU 0 will start with a shadow thread id of -2, and CPU 1
will have a shadow thread id of -3, etc...

From the debugger you can switch to a shadow thread to see what one of
the other cpus was doing, however it is not possible to execute run
control operations on any other cpu execept the cpu executing the
kgdb_handle_exception().

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
15 years agokgdb: fix kgdb_validate_break_address to perform a mem write
Jason Wessel [Fri, 1 Aug 2008 13:39:34 +0000 (08:39 -0500)]
kgdb: fix kgdb_validate_break_address to perform a mem write

A regression to the kgdb core was found in the case of using the
CONFIG_DEBUG_RODATA kernel option.  When this option is on, a breakpoint
cannot be written into any readonly memory page.  When an external
debugger requests a breakpoint to get set, the
kgdb_validate_break_address() was only checking to see if the address
to place the breakpoint was readable and lacked a write check.

This patch changes the validate routine to try reading (via the
breakpoint set request) and also to try immediately writing the break
point.  If either fails, an error is correctly returned and the
debugger behaves correctly.  Then an end user can make the
descision to use hardware breakpoints.

Also update the documentation to reflect that using
CONFIG_DEBUG_RODATA will inhibit the use of software breakpoints.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
15 years agokgdb: remove the requirement for CONFIG_FRAME_POINTER
Jason Wessel [Fri, 1 Aug 2008 13:39:34 +0000 (08:39 -0500)]
kgdb: remove the requirement for CONFIG_FRAME_POINTER

There is no technical reason that the kgdb core requires frame
pointers.  It is up to the end user of KGDB to decide if they need
them or not.

[ anemo@mba.ocn.ne.jp: removed frame pointers on mips ]

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
15 years ago[JFFS2] Fix allocation of summary buffer
David Woodhouse [Fri, 1 Aug 2008 09:07:51 +0000 (10:07 +0100)]
[JFFS2] Fix allocation of summary buffer

We can't use vmalloc for the buffer we use for writing summaries,
because some drivers may want to DMA from it. So limit the size to 64KiB
and use kmalloc for it instead.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
15 years agoFix rename of at91_nand -> atmel_nand
Pieter du Preez [Fri, 1 Aug 2008 09:06:40 +0000 (10:06 +0100)]
Fix rename of at91_nand -> atmel_nand

Structs called at91_nand_data where renamed to atmel_nand_data
and configs called *MTD_NAND_AT91* where renamed to
*MTD_NAND_ATMEL*. This was unfortunately not done consistently,
causing NAND chips not being initialised on several ARM boards.

I am aware that the author of the original change did not rename
MTD_NAND_AT91_BUSWIDTH to MTD_NAND_ATMEL_BUSWIDTH, for example.
All *MTD_NAND_AT91* where renamed to *MTD_NAND_ATMEL* in order
to keep naming consistency.

This patch was only tested on a MACH_SAM9_L9260, as this is the
only ARM board I have to my disposal.

Before this patch:

$ git-ls-files |xargs grep atmel_nand |wc -l
105
$ git-ls-files |xargs grep at91_nand |wc -l
4
$ git-ls-files |xargs grep MTD_NAND_ATMEL |wc -l
8
$ git-ls-files |xargs grep MTD_NAND_AT91 |wc -l
47

After this patch:

$ git-ls-files |xargs grep atmel_nand |wc -l
109
$ git-ls-files |xargs grep at91_nand |wc -l
0
$ git-ls-files |xargs grep MTD_NAND_ATMEL |wc -l
55
$ git-ls-files |xargs grep MTD_NAND_AT91 |wc -l
0

Signed-off-by: Pieter du Preez <pdupreez@gmail.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
15 years agotcp: MD5: Fix IPv6 signatures
Adam Langley [Fri, 1 Aug 2008 04:36:07 +0000 (21:36 -0700)]
tcp: MD5: Fix IPv6 signatures

Reported by Stefanos Harhalakis; although 2.6.27-rc1 talks to itself using IPv6
TCP MD5 packets just fine, Stefanos noted that tcpdump claimed that the
signatures were invalid.

I broke this in 49a72dfb8814c2d65bd9f8c9c6daf6395a1ec58d ("tcp: Fix MD5
signatures for non-linear skbs"), it was just a typo.

Note that tcpdump will still sometimes claim that the signatures are incorrect.
A patch to tcpdump has been submitted for this[1].

[1] http://tinyurl.com/6a4fl2

Signed-off-by: Adam Langley <agl@imperialviolet.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoskbuff: add missing kernel-doc for do_not_encrypt
Randy Dunlap [Fri, 1 Aug 2008 03:52:08 +0000 (20:52 -0700)]
skbuff: add missing kernel-doc for do_not_encrypt

Add missing kernel-doc notation to sk_buff:

Warning(linux-2.6.27-rc1-git2//include/linux/skbuff.h:345): No description found for parameter 'do_not_encrypt'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet/ipv4/route.c: fix build error
Ingo Molnar [Fri, 1 Aug 2008 03:51:22 +0000 (20:51 -0700)]
net/ipv4/route.c: fix build error

fix:

net/ipv4/route.c: In function 'ip_static_sysctl_init':
net/ipv4/route.c:3225: error: 'ipv4_route_path' undeclared (first use in this function)
net/ipv4/route.c:3225: error: (Each undeclared identifier is reported only once
net/ipv4/route.c:3225: error: for each function it appears in.)
net/ipv4/route.c:3225: error: 'ipv4_route_table' undeclared (first use in this function)

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
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 agosparc64: Do not clobber %g7 in setcontext() trap.
David S. Miller [Fri, 1 Aug 2008 03:40:46 +0000 (20:40 -0700)]
sparc64: Do not clobber %g7 in setcontext() trap.

That's the userland thread register, so we should never try to change
it like this.

Based upon glibc bug nptl/6577 and suggestions by Jakub Jelinek.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc64: Kill __show_regs().
David S. Miller [Fri, 1 Aug 2008 03:33:43 +0000 (20:33 -0700)]
sparc64: Kill __show_regs().

The story is that what we used to do when we actually used
smp_report_regs() is that if you specifically only wanted to have the
current cpu's registers dumped you would call "__show_regs()"
otherwise you would call show_regs() which also invoked
smp_report_regs().

Now that we killed off smp_report_regs() there is no longer any
reason to have these two routines, just show_regs() is sufficient.

Also kill off a stray declaration of show_regs() in sparc64_ksym.c

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc: Add __KERNEL__ ifdef protection to pt_regs helpers.
David S. Miller [Fri, 1 Aug 2008 03:32:35 +0000 (20:32 -0700)]
sparc: Add __KERNEL__ ifdef protection to pt_regs helpers.

Some of them use 'bool' and whatnot and therefore are not
kosher for userspace, so don't export them there.

Reported by Roland McGrath.

Signed-off-by: David S. Miller <davem@davemloft.net>
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 agosparc64: Kill smp_report_regs().
David S. Miller [Thu, 31 Jul 2008 08:06:02 +0000 (01:06 -0700)]
sparc64: Kill smp_report_regs().

All the call sites are #if 0'd out and we have a much more
useful global cpu dumping facility these days.  smp_report_regs()
is way too verbose to be usable.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc64: Kill VERBOSE_SHOWREGS code.
David S. Miller [Thu, 31 Jul 2008 07:58:35 +0000 (00:58 -0700)]
sparc64: Kill VERBOSE_SHOWREGS code.

It just clutters everything up and even though I wrote that hack I
can't remember having used it in the last 5 years or so.

Signed-off-by: David S. Miller <davem@davemloft.net>
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 agosparc64: Hook up trigger_all_cpu_backtrace().
David S. Miller [Thu, 31 Jul 2008 05:35:00 +0000 (22:35 -0700)]
sparc64: Hook up trigger_all_cpu_backtrace().

We already have code that does this, but it is only currently attached
to sysrq-'y'.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc64: Make global reg dumping even more useful.
David S. Miller [Thu, 31 Jul 2008 04:57:59 +0000 (21:57 -0700)]
sparc64: Make global reg dumping even more useful.

Record one more level of stack frame program counter.

Particularly when lockdep and all sorts of spinlock debugging is
enabled, figuring out the caller of spin_lock() is difficult when the
cpu is stuck on the lock.

Signed-off-by: David S. Miller <davem@davemloft.net>
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 agosparc: Ignore drivers/video/console/promcon_tbl.c conmakehash generated file
Florian Fainelli [Wed, 30 Jul 2008 23:49:52 +0000 (16:49 -0700)]
sparc: Ignore drivers/video/console/promcon_tbl.c conmakehash generated file

Add drivers/video/console/promcon_tbl.c to the list of ignored files.
This file is generated by conmakehash against drivers/video/console/prom.uni.

Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu>
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 master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6

15 years agosparc64: FUTEX_OP_ANDN fix
Mikael Pettersson [Wed, 30 Jul 2008 22:40:50 +0000 (15:40 -0700)]
sparc64: FUTEX_OP_ANDN fix

Correct sparc64's implementation of FUTEX_OP_ANDN to do a
bitwise negate of the oparg parameter before applying the
AND operation. All other archs that support FUTEX_OP_ANDN
either negate oparg explicitly (frv, ia64, mips, sh, x86),
or do so indirectly by using an and-not instruction (powerpc).
Since sparc64 has and-not, I chose to use that solution.

I've not found any use of FUTEX_OP_ANDN in glibc so the
impact of this bug is probably minor. But other user-space
components may try to use it so it should still get fixed.

Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: David S. Miller <davem@davemloft.net>
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/pub/scm/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>