]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
16 years agomodules: fix module waiting for dependent modules' init
Rusty Russell [Mon, 10 Mar 2008 18:43:52 +0000 (11:43 -0700)]
modules: fix module waiting for dependent modules' init

Commit c9a3ba55 (module: wait for dependent modules doing init.) didn't quite
work because the waiter holds the module lock, meaning that the state of the
module it's waiting for cannot change.

Fortunately, it's fairly simple to update the state outside the lock and do
the wakeup.

Thanks to Jan Glauber for tracking this down and testing (qdio and qeth).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agohugetlb: correct page count for surplus huge pages
Adam Litke [Mon, 10 Mar 2008 18:43:50 +0000 (11:43 -0700)]
hugetlb: correct page count for surplus huge pages

Free pages in the hugetlb pool are free and as such have a reference count of
zero.  Regular allocations into the pool from the buddy are "freed" into the
pool which results in their page_count dropping to zero.  However, surplus
pages can be directly utilized by the caller without first being freed to the
pool.  Therefore, a call to put_page_testzero() is in order so that such a
page will be handed to the caller with a correct count.

This has not affected end users because the bad page count is reset before the
page is handed off.  However, under CONFIG_DEBUG_VM this triggers a BUG when
the page count is validated.

Thanks go to Mel for first spotting this issue and providing an initial fix.

Signed-off-by: Adam Litke <agl@us.ibm.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Dave Hansen <haveblue@us.ibm.com>
Cc: William Lee Irwin III <wli@holomorphy.com>
Cc: Andy Whitcroft <apw@shadowen.org>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agogpio/pca953x bugfix: mark as can_sleep
Arnaud Patard [Mon, 10 Mar 2008 18:43:48 +0000 (11:43 -0700)]
gpio/pca953x bugfix: mark as can_sleep

The pca953x driver is an I2C driver so gpio_chip->can_sleep should be set.
This lets upper layers know they should use the gpio_*_cansleep() calls to
access values, and may not access them from nonsleeping contexts.

Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: "eric miao" <eric.y.miao@gmail.com>
Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomd: reduce CPU wastage on idle md array with a write-intent bitmap
NeilBrown [Mon, 10 Mar 2008 18:43:48 +0000 (11:43 -0700)]
md: reduce CPU wastage on idle md array with a write-intent bitmap

Recent patch titled
  Reduce CPU wastage on idle md array with a write-intent bitmap.

would sometimes leave the array with dirty bitmap bits that stay dirty.  A
subsequent write would sort things out so it isn't a big problem, but should
be fixed nonetheless.

We need to make sure that when the bitmap becomes not "allclean", the
daemon_sleep really does get set to a sensible value.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomd: fix formatting error in /proc/mdstat
NeilBrown [Mon, 10 Mar 2008 18:43:47 +0000 (11:43 -0700)]
md: fix formatting error in /proc/mdstat

If an md array is "auto-read-only", then this appears in /proc/mdstat as

   /dev/md0: active(auto-read-only)

whereas if it is truely readonly, it appears as

   /dev/md0: active (read-only)

The difference being a space.

One program known to parse this file expects the space and gets badly
confused.  It will be fixed, but it would be best if what the kernel generates
is more consistent too.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomempolicy: fix reference counting bugs
Lee Schermerhorn [Mon, 10 Mar 2008 18:43:45 +0000 (11:43 -0700)]
mempolicy: fix reference counting bugs

Address 3 known bugs in the current memory policy reference counting method.
I have a series of patches to rework the reference counting to reduce overhead
in the allocation path.  However, that series will require testing in -mm once
I repost it.

1) alloc_page_vma() does not release the extra reference taken for
   vma/shared mempolicy when the mode == MPOL_INTERLEAVE.  This can result in
   leaking mempolicy structures.  This is probably occurring, but not being
   noticed.

   Fix:  add the conditional release of the reference.

2) hugezonelist unconditionally releases a reference on the mempolicy when
   mode == MPOL_INTERLEAVE.  This can result in decrementing the reference
   count for system default policy [should have no ill effect] or premature
   freeing of task policy.  If this occurred, the next allocation using task
   mempolicy would use the freed structure and probably BUG out.

   Fix:  add the necessary check to the release.

3) The current reference counting method assumes that vma 'get_policy()'
   methods automatically add an extra reference a non-NULL returned mempolicy.
    This is true for shmem_get_policy() used by tmpfs mappings, including
   regular page shm segments.  However, SHM_HUGETLB shm's, backed by
   hugetlbfs, just use the vma policy without the extra reference.  This
   results in freeing of the vma policy on the first allocation, with reuse of
   the freed mempolicy structure on subsequent allocations.

   Fix: Rather than add another condition to the conditional reference
   release, which occur in the allocation path, just add a reference when
   returning the vma policy in shm_get_policy() to match the assumptions.

Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Cc: Greg KH <greg@kroah.com>
Cc: Andi Kleen <ak@suse.de>
Cc: Christoph Lameter <clameter@sgi.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: David Rientjes <rientjes@google.com>
Cc: <eric.whitney@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoTypo in Documentation/scheduler/sched-stats.txt
Masatake YAMATO [Mon, 10 Mar 2008 18:43:43 +0000 (11:43 -0700)]
Typo in Documentation/scheduler/sched-stats.txt

I have found a very small typo in Documentation/scheduler/sched-stats.txt.
See the end of this mail.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomemstick: add support for JMicron jmb38x MemoryStick host controller
Alex Dubov [Mon, 10 Mar 2008 18:43:43 +0000 (11:43 -0700)]
memstick: add support for JMicron jmb38x MemoryStick host controller

Signed-off-by: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomemstick: try harder to recover from unsuccessful interface mode switch
Alex Dubov [Mon, 10 Mar 2008 18:43:42 +0000 (11:43 -0700)]
memstick: try harder to recover from unsuccessful interface mode switch

Signed-off-by: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomemstick: fix parsing of "assembly_date" attribute field
Alex Dubov [Mon, 10 Mar 2008 18:43:42 +0000 (11:43 -0700)]
memstick: fix parsing of "assembly_date" attribute field

Signed-off-by: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomemstick: add support for decoding "specfile" media attributes
Alex Dubov [Mon, 10 Mar 2008 18:43:41 +0000 (11:43 -0700)]
memstick: add support for decoding "specfile" media attributes

Signed-off-by: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotifm: clear interrupt mask bits before setting them on adapter init
Alex Dubov [Mon, 10 Mar 2008 18:43:41 +0000 (11:43 -0700)]
tifm: clear interrupt mask bits before setting them on adapter init

This should improve reliability of detection of cards already in socket on
driver load.

Signed-off-by: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotifm: fix memorystick host initialization code
Alex Dubov [Mon, 10 Mar 2008 18:43:40 +0000 (11:43 -0700)]
tifm: fix memorystick host initialization code

Instead of assuming that host is powered on only once at card insertion, allow
for the possibility that memstick layer may need to cycle card's power to get
it out from some unhealthy states.

Signed-off-by: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotifm: fix the MemoryStick host fifo handling code
Alex Dubov [Mon, 10 Mar 2008 18:43:40 +0000 (11:43 -0700)]
tifm: fix the MemoryStick host fifo handling code

Additional input received from JMicron on MemoryStick host interfaces showed
that some assumtions in fifo handling code were incorrect.  This patch also
fixes data corruption used to occure during PIO transfers.

Signed-off-by: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomemstick: drop DRIVER_VERSION numbers as meaningless
Alex Dubov [Mon, 10 Mar 2008 18:43:39 +0000 (11:43 -0700)]
memstick: drop DRIVER_VERSION numbers as meaningless

Signed-off-by: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomemstick: make sure number of command retries is exactly as specified
Alex Dubov [Mon, 10 Mar 2008 18:43:38 +0000 (11:43 -0700)]
memstick: make sure number of command retries is exactly as specified

Signed-off-by: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomemstick: add memstick_suspend/resume_host methods
Alex Dubov [Mon, 10 Mar 2008 18:43:38 +0000 (11:43 -0700)]
memstick: add memstick_suspend/resume_host methods

Bus driver may need to be informed that host is being suspended/resumed.

Signed-off-by: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomemstick: introduce correct definitions in the header
Alex Dubov [Mon, 10 Mar 2008 18:43:37 +0000 (11:43 -0700)]
memstick: introduce correct definitions in the header

Thanks to some input from kind people at JMicron it is now possible to have
more correct definitions of protocol structures and bit field semantics.

Signed-off-by: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotridentfb: fix memory size detection
Krzysztof Helt [Mon, 10 Mar 2008 18:43:37 +0000 (11:43 -0700)]
tridentfb: fix memory size detection

Fix memory size multiplier during detection.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotridentfb: register should be left in non-locked state
Krzysztof Helt [Mon, 10 Mar 2008 18:43:36 +0000 (11:43 -0700)]
tridentfb: register should be left in non-locked state

Remove locking registers after they are unlocked during switch to/from MMIO
mode.  This fixes regression on the Blade3D (Trident 9880) caused by the
previous patch (probe fixes).

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoof_serial: fix section mismatch warnings
Josh Boyer [Mon, 10 Mar 2008 18:43:35 +0000 (11:43 -0700)]
of_serial: fix section mismatch warnings

Fix the following section mismatches:

WARNING: drivers/built-in.o(.exit.text+0x5a): Section mismatch in reference from the function of_platform_serial_exit() to the variable .devinit.data:of_platform_serial_driver
The function __exit of_platform_serial_exit() references
a variable __devinitdata of_platform_serial_driver.

Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agorename DECLARE_PCI_DEVICE_TABLE to DEFINE_PCI_DEVICE_TABLE
Andrew Morton [Mon, 10 Mar 2008 18:43:34 +0000 (11:43 -0700)]
rename DECLARE_PCI_DEVICE_TABLE to DEFINE_PCI_DEVICE_TABLE

This macro is used to define tables, not to declare them.

Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years ago[libata] Add support for the RB500 PATA CompactFlash
Florian Fainelli [Thu, 6 Mar 2008 11:25:21 +0000 (12:25 +0100)]
[libata] Add support for the RB500 PATA CompactFlash

Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoahci: logical-bitwise and confusion in ahci_save_initial_config()
Roel Kluin [Sun, 9 Mar 2008 20:42:40 +0000 (21:42 +0100)]
ahci: logical-bitwise and confusion in ahci_save_initial_config()

logical-bitwise & confusion

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agolibata: don't allow sysfs read access to force param
Tejun Heo [Sun, 9 Mar 2008 11:21:53 +0000 (20:21 +0900)]
libata: don't allow sysfs read access to force param

Buffer for force param is deallocated after initialization, so trying
to read it via sysfs results in oops.  Don't allow read access to the
param node.

Spotted by Eric Sesterhenn.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoahci: add the Device IDs for nvidia MCP7B AHCI
peerchen [Thu, 6 Mar 2008 13:22:41 +0000 (21:22 +0800)]
ahci: add the Device IDs for nvidia MCP7B AHCI

Signed-off-by: Peer Chen <peerchen@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agolibata-sff: handle controllers w/o ctl register
Tejun Heo [Thu, 6 Mar 2008 04:12:54 +0000 (13:12 +0900)]
libata-sff: handle controllers w/o ctl register

SFF incorrectly assumed that ctl register is available for all
controllers while some old SFF controllers don't have ctl register.
Make SFF handle controllers w/o ctl register by conditionalizing ctl
register access and softreset method.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agolibata: allow LLDs w/o any reset method
Tejun Heo [Thu, 6 Mar 2008 04:09:34 +0000 (13:09 +0900)]
libata: allow LLDs w/o any reset method

Some old SFF controllers don't have any way to reset the channel.
Currently, this isn't supported and libata EH causes an oops.  Allow
LLDs w/o any reset method and just assume ATA class in such cases.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoata: replace remaining __FUNCTION__ occurrences
Harvey Harrison [Thu, 6 Mar 2008 02:24:52 +0000 (18:24 -0800)]
ata: replace remaining __FUNCTION__ occurrences

__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years ago[NETFILTER]: nf_queue: don't return error when unregistering a non-existant handler
Patrick McHardy [Mon, 10 Mar 2008 23:45:05 +0000 (16:45 -0700)]
[NETFILTER]: nf_queue: don't return error when unregistering a non-existant handler

Commit ce7663d84:

[NETFILTER]: nfnetlink_queue: don't unregister handler of other subsystem

changed nf_unregister_queue_handler to return an error when attempting to
unregister a queue handler that is not identical to the one passed in.
This is correct in case we really do have a different queue handler already
registered, but some existing userspace code always does an unbind before
bind and aborts if that fails, so try to be nice and return success in
that case.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETFILTER]: nfnetlink_queue: fix EPERM when binding/unbinding and instance 0 exists
Patrick McHardy [Mon, 10 Mar 2008 23:44:36 +0000 (16:44 -0700)]
[NETFILTER]: nfnetlink_queue: fix EPERM when binding/unbinding and instance 0 exists

Similar to the nfnetlink_log problem, nfnetlink_queue incorrectly
returns -EPERM when binding or unbinding to an address family and
queueing instance 0 exists and is owned by a different process. Unlike
nfnetlink_log it previously completes the operation, but it is still
incorrect.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETFILTER]: nfnetlink_log: fix EPERM when binding/unbinding and instance 0 exists
Patrick McHardy [Mon, 10 Mar 2008 23:44:13 +0000 (16:44 -0700)]
[NETFILTER]: nfnetlink_log: fix EPERM when binding/unbinding and instance 0 exists

When binding or unbinding to an address family, the res_id is usually set
to zero. When logging instance 0 already exists and is owned by a different
process, this makes nfunl_recv_config return -EPERM without performing
the bind operation.

Since no operation on the foreign logging instance itself was requested,
this is incorrect. Move bind/unbind commands before the queue instance
permissions checks.

Also remove an incorrect comment.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETFILTER]: nf_conntrack: replace horrible hack with ksize()
Pekka Enberg [Mon, 10 Mar 2008 23:43:41 +0000 (16:43 -0700)]
[NETFILTER]: nf_conntrack: replace horrible hack with ksize()

There's a horrible slab abuse in net/netfilter/nf_conntrack_extend.c
that can be replaced with a call to ksize().

Cc: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETFILTER]: nf_conntrack: add \n to "expectation table full" message
Alexey Dobriyan [Mon, 10 Mar 2008 23:43:10 +0000 (16:43 -0700)]
[NETFILTER]: nf_conntrack: add \n to "expectation table full" message

Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETFILTER]: xt_time: fix failure to match on Sundays
Jan Engelhardt [Mon, 10 Mar 2008 23:42:40 +0000 (16:42 -0700)]
[NETFILTER]: xt_time: fix failure to match on Sundays

From: Andrew Schulman <andrex@alumni.utexas.net>

xt_time_match() in net/netfilter/xt_time.c in kernel 2.6.24 never
matches on Sundays. On my host I have a rule like

    iptables -A OUTPUT -m time --weekdays Sun -j REJECT

and it never matches. The problem is in localtime_2(), which uses

    r->weekday = (4 + r->dse) % 7;

to map the epoch day onto a weekday in {0,...,6}. In particular this
gives 0 for Sundays. But 0 has to be wrong; a weekday of 0 can never
match. xt_time_match() has

    if (!(info->weekdays_match & (1 << current_time.weekday)))
        return false;

and when current_time.weekday = 0, the result of the & is always
zero, even when info->weekdays_match = XT_TIME_ALL_WEEKDAYS = 0xFE.

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoUSB:Update mailing list information in documentation
Robert P. J. Day [Fri, 7 Mar 2008 20:08:17 +0000 (15:08 -0500)]
USB:Update mailing list information in documentation

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: fix ehci unlink regressions
David Brownell [Fri, 7 Mar 2008 21:49:42 +0000 (13:49 -0800)]
USB: fix ehci unlink regressions

The recent EHCI driver update to split the IAA watchdog timer out from
the other timers made several things work better, but not everything;
and it created a couple new issues in bugzilla.  Ergo this patch:

  - Handle a should-be-rare SMP race between the watchdog firing
    and (very late) IAA interrupts;

  - Remove a shouldn't-have-been-added WARN_ON() test;

  - Guard against one observed OOPS;

  - If this watchdog fires during clean HC shutdown, it should act
    as a NOP instead of interfering with the shutdown sequence;

  - Guard against silicon errata hypothesized by some vendors:
      * IAA status latch broken, but IAAD cleared OK;
      * IAAD wasn't cleared when IAA status got reported;

The WARN_ON is in bugzilla as 10168; the OOPS as 10078; these are
both regressions.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Tested-by: Gordon Farquharson <gordonfarquharson@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: new ftdi_sio device id
Mirko Bordignon [Mon, 10 Mar 2008 10:38:55 +0000 (11:38 +0100)]
USB: new ftdi_sio device id

Here is a patch that adds support for the propox jtagcable II dongle
(http://www.propox.com/products/t_117.html): their PID was missing,
therefore we were not able to have the device recognized though it uses
a standard FTDI chip.

Signed-off-by: Mirko Bordignon <mirko.bordignon@ieee.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: Remove __KERNEL__ check from non-exported gadget.h.
Robert P. J. Day [Fri, 7 Mar 2008 16:40:07 +0000 (11:40 -0500)]
USB: Remove __KERNEL__ check from non-exported gadget.h.

Since the header file gadget.h isn't being exported to userspace,
there seems to be little point having a __KERNEL__ proprocessor check.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: g_printer.h does not need to be "unifdef"ed.
Robert P. J. Day [Fri, 7 Mar 2008 16:02:00 +0000 (11:02 -0500)]
USB: g_printer.h does not need to be "unifdef"ed.

Since the header file g_printer.h doesn't depend on __KERNEL__,
there's no need to unifdef it in the Kbuild file.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: fsl_usb2_udc: fix broken Kconfig
Li Yang [Thu, 6 Mar 2008 10:40:07 +0000 (18:40 +0800)]
USB: fsl_usb2_udc: fix broken Kconfig

The patch fixes broken Kconfig caused by the name change of MPC834x option.
It also makes fsl_usb2_udc selectable on new platforms like MPC837x.

Signed-off-by: Li Yang <leoli@freescale.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: option: add novatel device ids
Dirk DeSchepper [Wed, 5 Mar 2008 08:26:18 +0000 (08:26 +0000)]
USB: option: add novatel device ids

This updates the option driver with a lot more novatel driver ids.

From: Dirk DeSchepper <ddeschepper@nvtl.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: usbaudio: handle kcalloc failure
Jim Meyering [Tue, 4 Mar 2008 23:25:11 +0000 (15:25 -0800)]
USB: usbaudio: handle kcalloc failure

sound/usb/usbaudio.c (check_hw_params_convention): Handle kcalloc failure.

Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: cypress_m8: add UPS Powercom (0d9f:0002)
Dmitry Shapin [Tue, 4 Mar 2008 23:25:10 +0000 (15:25 -0800)]
USB: cypress_m8: add UPS Powercom (0d9f:0002)

Add support for UPS Powercom USB interface (0d9f:0002) in chip CY7C63723.
In my case, this Powercom BNT800AP.

Signed-off-by: Dmitry Shapin <shapin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: drivers/usb/storage/sddr55.c: fix uninitialized var warnings
Andrew Morton [Tue, 4 Mar 2008 23:25:08 +0000 (15:25 -0800)]
USB: drivers/usb/storage/sddr55.c: fix uninitialized var warnings

drivers/usb/storage/sddr55.c: In function 'sddr55_transport':
drivers/usb/storage/sddr55.c:526: warning: 'deviceID' may be used uninitialized in this function
drivers/usb/storage/sddr55.c:525: warning: 'manufacturerID' may be used uninitialized in this function

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: fix usb-serial generic recursive lock
Pete Zaitcev [Wed, 5 Mar 2008 07:28:42 +0000 (23:28 -0800)]
USB: fix usb-serial generic recursive lock

Nobody should be using the generic usb-serial for anything other than
testing. Still, it's not a good thing that it's easy to lock up. There
is a traceback from NMI oopser here:
 https://bugzilla.redhat.com/show_bug.cgi?id=431379

But in short, if a line discipline has a chance to echo anything, input
can loop back a write method. So, don't call tty_flip_buffer_push from
under a lock taken on write path.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[NETFILTER]: nfnetlink_log: fix computation of netlink skb size
Eric Leblond [Mon, 10 Mar 2008 23:42:04 +0000 (16:42 -0700)]
[NETFILTER]: nfnetlink_log: fix computation of netlink skb size

This patch is similar to nfnetlink_queue fixes. It fixes the computation
of skb size by using NLMSG_SPACE instead of NLMSG_ALIGN.

Signed-off-by: Eric Leblond <eric@inl.fr>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETFILTER]: nfnetlink_queue: fix computation of allocated size for netlink skb.
Eric Leblond [Mon, 10 Mar 2008 23:41:43 +0000 (16:41 -0700)]
[NETFILTER]: nfnetlink_queue: fix computation of allocated size for netlink skb.

Size of the netlink skb was wrongly computed because the formula was using
NLMSG_ALIGN instead of NLMSG_SPACE. NLMSG_ALIGN does not add the room for
netlink header as NLMSG_SPACE does. This was causing a failure of message
building in some cases.

On my test system, all messages for packets in range [8*k+41, 8*k+48] where k
is an integer were invalid and the corresponding packets were dropped.

Signed-off-by: Eric Leblond <eric@inl.fr>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETFILTER]: nfnetlink: fix ifdef in nfnetlink_compat.h
Patrick McHardy [Mon, 10 Mar 2008 23:41:06 +0000 (16:41 -0700)]
[NETFILTER]: nfnetlink: fix ifdef in nfnetlink_compat.h

Use __KERNEL__ instead of __KERNEL to make sure the headers are not
usable by the kernel.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoPCI Hotplug: Fix small mem leak in IBM Hot Plug Controller Driver
Jesper Juhl [Sat, 8 Mar 2008 01:16:07 +0000 (02:16 +0100)]
PCI Hotplug: Fix small mem leak in IBM Hot Plug Controller Driver

In drivers/pci/hotplug/ibmphp_ebda.c::ebda_rsrc_controller(), storage is
allocated with kzalloc() and assigned to 'tmp_slot'.  Then lots of
stuff, like ->flag, ->supported_speed etc is set in tmp_slot.  A bit
further down there's then this test :

  if (!bus_info_ptr1) {
    rc = -ENODEV;
    goto error;
  }

At this point, tmp_slot has not been assigned to anything, so when
erroring-out we want to free it, but nothing at the 'error:' label
free's 'tmp_slot' - and we can't really free 'tmp_slot' at 'error:'
since we may jump to that label later when 'tmp_slot' *has* been used
and we do not want it freed. So, the only sane option left seems to be
to kfree(tmp_slot) just before jumping to the 'error:' label in the one
place where this is what actually makes sense. The following patch does
just that and thus kills off a tiny potential memory leak.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoPCI: rename DECLARE_PCI_DEVICE_TABLE to DEFINE_PCI_DEVICE_TABLE
Andrew Morton [Thu, 6 Mar 2008 23:41:50 +0000 (15:41 -0800)]
PCI: rename DECLARE_PCI_DEVICE_TABLE to DEFINE_PCI_DEVICE_TABLE

a) DECLARE_PCI_DEVICE_TABLE is misnamed.  It is used to *define* tables,
   not to declare them.  It should be called DEFINE_PCI_DEVICE_TABLE.

b) It's lame, anyway.  We could implement any number of such helper
   thingies, but we choose not to.

So I wouldn't go adding code which uses this thing until it has a correct
name, and until we've decided that we actually want to live with it.

From: Andrew Morton <akpm@linux-foundation.org>
Cc: Jonas Bonn <jonas@southpole.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agodrivers: fix dma_get_required_mask
James Bottomley [Sun, 9 Mar 2008 16:57:56 +0000 (11:57 -0500)]
drivers: fix dma_get_required_mask

There's a bug in the current implementation of dma_get_required_mask()
where it ands the returned mask with the current device mask.  This
rather defeats the purpose if you're using the call to determine what
your mask should be (since you will at that time have the default
DMA_32BIT_MASK).  This bug results in any driver that uses this function
*always* getting a 32 bit mask, which is wrong.

Fix by removing the and with dev->dma_mask.

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agofirmware: provide stubs for the FW_LOADER=n case
James Bottomley [Fri, 7 Mar 2008 14:57:54 +0000 (08:57 -0600)]
firmware: provide stubs for the FW_LOADER=n case

libsas has a case where it uses the firmware loader to provide services,
but doesn't want to select it all the time.  This currently causes a
compile failure in libsas if FW_LOADER=n.  Fix this by providing error
stubs for the firmware loader API in the FW_LOADER=n case.

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agonozomi: fix initialization and early flow control access
Frank Seidel [Thu, 6 Mar 2008 20:45:57 +0000 (21:45 +0100)]
nozomi: fix initialization and early flow control access

Due to some flaws in the initialization and flow control
code kernel oopses could be triggered e.g. when accessing
the card too early after insertion.
See e.g. kernel.org bug #10077.
The main part of the fix is a trivial state management
making sure the card is realy ready to use before allowing
any access.

Signed-off-by: Frank Seidel <fseidel@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agosysdev: fix problem with sysdev_class being re-registered
Greg Kroah-Hartman [Sat, 8 Mar 2008 22:07:16 +0000 (03:37 +0530)]
sysdev: fix problem with sysdev_class being re-registered

We need to initialize the kobject for a sysdev_class as it could have
been recycled (stupid static kobjects...)

We also do the same thing in case sysdev devices are being
re-registered.

Thanks to Balaji Rao <balajirrao@gmail.com> for pointing out the
problem.

Signed-off-by: Balaji Rao <balajirrao@gmail.com>
Tested-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agolguest: Do not append space to guests kernel command line
Paul Bolle [Mon, 10 Mar 2008 15:39:03 +0000 (16:39 +0100)]
lguest: Do not append space to guests kernel command line

The lguest launcher appends a space to the kernel command line (if kernel
arguments are specified on its command line). This space is unneeded. More
importantly, this appended space will make Red Hat's nash script interpreter
(used in a Fedora style initramfs) add an empty argument to init's command
line. This empty argument will make kernel arguments like "init=/bin/bash"
fail (because the shell will try to execute a script with an empty name).
This could be considered a bug in nash, but is easily fixed in the lguest
launcher too.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
16 years agolguest: Revert 1ce70c4fac3c3954bd48c035f448793867592bc0, fix real problem.
Rusty Russell [Tue, 11 Mar 2008 14:35:57 +0000 (09:35 -0500)]
lguest: Revert 1ce70c4fac3c3954bd48c035f448793867592bc0, fix real problem.

Ahmed managed to crash the Host in release_pgd(), which cannot be a Guest
bug, and indeed it wasn't.

The bug was that handing a 0 as the address of the toplevel page table
being manipulated can cause the lookup code in find_pgdir() to return
an uninitialized cache entry (we shadow up to 4 top level page tables
for each Guest).

Commit 37cc8d7f963ba2deec29c9b68716944516a3244f introduced this
behaviour in the Guest, uncovering the bug.

The patch which he submitted (which removed the /4 from the index
calculation) simply ensured that these high-indexed entries hit the
early exit path of guest_set_pmd().  But you get lots of segfaults in
guest userspace as the PMDs aren't being updated.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
16 years agolguest: Sanitize the lguest clock.
Rusty Russell [Tue, 11 Mar 2008 14:35:56 +0000 (09:35 -0500)]
lguest: Sanitize the lguest clock.

Now the TSC code handles a zero return from calculate_cpu_khz(),
lguest can simply pass through the value it gets from the Host: if
non-zero, all the normal TSC code applies.

Otherwise (or if the Host really doesn't support TSC), the clocksource
code will fall back to the slower but reasonable lguest clock.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
16 years agolguest: fix __get_vm_area usage.
Rusty Russell [Tue, 11 Mar 2008 14:35:56 +0000 (09:35 -0500)]
lguest: fix __get_vm_area usage.

Robert Bragg's 5dc331852848a38ca00a2817e5b98a1d0561b116 tightened
(ie. fixed) the checking in __get_vm_area, and it broke lguest.

lguest should pass the exact "end" it wants, not some random constant
(it was possible previously that it would actually get an address
different from SWITCHER_ADDR).

Also, Fabio Checconi pointed out that we should make sure we're not
hitting the fixmap area.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Robert Bragg <robert@sixbynine.org>
16 years agolguest: make sure cpu is initialized before accessing it
Eugene Teo [Sat, 9 Feb 2008 15:53:17 +0000 (23:53 +0800)]
lguest: make sure cpu is initialized before accessing it

If req is LHREQ_INITIALIZE, and the guest has been initialized before
(unlikely), it will attempt to access cpu->tsk even though cpu is not yet
initialized.

Signed-off-by: Eugene Teo <eugeneteo@kernel.sg>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
16 years agoocfs2: Fix NULL pointer dereferences in o2net
Tao Ma [Wed, 5 Mar 2008 07:49:55 +0000 (15:49 +0800)]
ocfs2: Fix NULL pointer dereferences in o2net

In some situations, ocfs2_set_nn_state might get called with sc = NULL and
valid = 0. If sc = NULL, we can't dereference it to get the o2nm_node
member. Instead, do what o2net_initialize_handshake does and use NULL when
calling o2net_reconnect_delay and o2net_idle_timeout.

Signed-off-by: Tao Ma <tao.ma@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
16 years agoocfs2/dlm: dlm_thread should not sleep while holding the dlm_spinlock
Sunil Mushran [Sat, 1 Mar 2008 22:04:25 +0000 (14:04 -0800)]
ocfs2/dlm: dlm_thread should not sleep while holding the dlm_spinlock

This patch addresses the bug in which the dlm_thread could go to sleep
while holding the dlm_spinlock.

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
16 years agoocfs2/dlm: Print message showing the recovery master
Sunil Mushran [Sat, 1 Mar 2008 22:04:24 +0000 (14:04 -0800)]
ocfs2/dlm: Print message showing the recovery master

Knowing the dlm recovery master helps in debugging recovery
issues. This patch prints a message on the recovery master node.

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
16 years agoocfs2/dlm: Add missing dlm_lockres_put()s
Sunil Mushran [Sat, 1 Mar 2008 22:04:22 +0000 (14:04 -0800)]
ocfs2/dlm: Add missing dlm_lockres_put()s

dlm_master_request_handler() forgot to put a lockres when
dlm_assert_master_worker() failed or was skipped.

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
16 years agoocfs2/dlm: Add missing dlm_lockres_put()s in migration path
Sunil Mushran [Sat, 1 Mar 2008 22:04:21 +0000 (14:04 -0800)]
ocfs2/dlm: Add missing dlm_lockres_put()s in migration path

During migration, the recovery master node may be asked to master a lockres
it may not know about. In that case, it would not only have to create a
lockres and add it to the hash, but also remember to to do the _put_
corresponding to the kref_init in dlm_init_lockres(), as soon as the migration
is completed. Yes, we don't wait for the dlm_purge_lockres() to do that
matching put. Note the ref added for it being in the hash protects the lockres
from being freed prematurely.

This patch adds that missing put, as described above, to plug a memleak.

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
16 years agoocfs2/dlm: Add missing dlm_lock_put()s
Sunil Mushran [Sat, 1 Mar 2008 22:04:20 +0000 (14:04 -0800)]
ocfs2/dlm: Add missing dlm_lock_put()s

Normally locks for remote nodes are freed when that node sends an UNLOCK
message to the master. The master node tags an DLM_UNLOCK_FREE_LOCK action
to do an extra put on the lock at the end.

However, there are times when the master node has to free the locks for the
remote nodes forcibly.

Two cases when this happens are:
1. When the master has migrated the lockres plus all locks to another node.
2. When the master is clearing all the locks of a dead node.

It was in the above two conditions that the dlm was missing the extra put.

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
16 years agoocfs2: Fix an endian bug in online resize.
Tao Ma [Mon, 3 Mar 2008 02:53:02 +0000 (10:53 +0800)]
ocfs2: Fix an endian bug in online resize.

In ocfs2_group_add, 'cr' is a disk field of type 'ocfs2_chain_rec', and we
were putting cpu byteorder values into it. Swap things to the right endian
before storing.

Signed-off-by: Tao Ma <tao.ma@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
16 years ago[PATCH] [OCFS2]: constify function pointer tables
Jan Engelhardt [Tue, 22 Jan 2008 19:52:20 +0000 (20:52 +0100)]
[PATCH] [OCFS2]: constify function pointer tables

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
16 years agoocfs2: Fix endian bug in o2dlm protocol negotiation.
Joel Becker [Tue, 12 Feb 2008 22:56:25 +0000 (14:56 -0800)]
ocfs2: Fix endian bug in o2dlm protocol negotiation.

struct dlm_query_join_packet is made up of four one-byte fields.  They
are effectively in big-endian order already.  However, little-endian
machines swap them before putting the packet on the wire (because
query_join's response is a status, and that status is treated as a u32
on the wire).  Thus, a big-endian and little-endian machines will
treat this structure differently.

The solution is to have little-endian machines swap the structure when
converting from the structure to the u32 representation.

Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
16 years agoocfs2: Use dlm_print_one_lock_resource for lock resource print
Tao Ma [Thu, 28 Feb 2008 02:41:55 +0000 (10:41 +0800)]
ocfs2: Use dlm_print_one_lock_resource for lock resource print

__dlm_print_one_lock_resource must be called with spin_lock
the res->spinlock. While in some cases, we use it without this
precondition and lead to the failure of assert_spin_locked.
So call dlm_print_one_lock_resource instead.

Signed-off-by: Tao Ma <tao.ma@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
16 years ago[PATCH] fs/ocfs2/dlm/dlmdomain.c: fix printk warning
Andrew Morton [Fri, 29 Feb 2008 09:56:06 +0000 (01:56 -0800)]
[PATCH] fs/ocfs2/dlm/dlmdomain.c: fix printk warning

fs/ocfs2/dlm/dlmdomain.c: In function 'dlm_send_join_cancels':
fs/ocfs2/dlm/dlmdomain.c:983: warning: format '%u' expects type 'unsigned int', but argument 7 has type 'long unsigned int'

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
16 years ago[POWERPC] QE: Make qe_get_firmware_info reentrant
Ionut Nicu [Fri, 7 Mar 2008 17:27:59 +0000 (19:27 +0200)]
[POWERPC] QE: Make qe_get_firmware_info reentrant

The function was returning NULL the second time it was
called if the firmware was uploaded from the boot loader
or the first time it was called if the firmware was
uploaded from the kernel.

Signed-off-by: Ionut Nicu <ionut.nicu@freescale.com>
Acked-By: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years agoriscom8: Fix hang on load
Alan Cox [Mon, 10 Mar 2008 13:24:49 +0000 (13:24 +0000)]
riscom8: Fix hang on load

This has been around for a while but nobody reported it until recently.
Resubmitting the fix as it's appropriate for 2.6.25

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years ago[POWERPC] 83xx: Make 83xx perfmon support selectable
Andy Fleming [Fri, 7 Mar 2008 23:59:03 +0000 (17:59 -0600)]
[POWERPC] 83xx: Make 83xx perfmon support selectable

Not all e300 cores support the performance monitors, and the ones
that don't will be confused by the mf/mtpmr instructions.  This
allows the support to be optional, so the 8349 can turn it off
while the 8379 can turn it on.  Sadly, those aren't config options,
so it will be left to the defconfigs and the users to make that
determination.

Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years agoLinux 2.6.25-rc5 v2.6.25-rc5
Linus Torvalds [Mon, 10 Mar 2008 05:22:27 +0000 (22:22 -0700)]
Linux 2.6.25-rc5

16 years agoDo not include linux/backing-dev.h twice
Jesper Juhl [Mon, 10 Mar 2008 00:12:08 +0000 (01:12 +0100)]
Do not include linux/backing-dev.h twice

Don't include linux/backing-dev.h twice in mm/filemap.c, it's pointless.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoRDMA/cxgb3: Fix iwch_create_cq() off-by-one error
Jon Mason [Sun, 9 Mar 2008 20:54:12 +0000 (13:54 -0700)]
RDMA/cxgb3: Fix iwch_create_cq() off-by-one error

The cxbg3 driver is unnecessarily decreasing the number of CQ entries by
one when creating a CQ.  This will cause the CQ not to have as many
entries as requested by the user if the user requests a power of 2 size.

Signed-off-by: Jon Mason <jon@opengridcomputing.com>
Acked-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/tglx/linux-2.6-hrt
Linus Torvalds [Sun, 9 Mar 2008 17:06:49 +0000 (10:06 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/tglx/linux-2.6-hrt

* git://git.kernel.org/pub/scm/linux/kernel/git/tglx/linux-2.6-hrt:
  time: remove obsolete CLOCK_TICK_ADJUST
  time: don't touch an offlined CPU's ts->tick_stopped in tick_cancel_sched_timer()
  time: prevent the loop in timespec_add_ns() from being optimised away
  ntp: use unsigned input for do_div()

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Linus Torvalds [Sun, 9 Mar 2008 17:06:14 +0000 (10:06 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  [CRYPTO] skcipher: Fix section mismatches

16 years agoalpha: fix iommu-related boot panic
Ivan Kokshaysky [Sun, 9 Mar 2008 13:31:17 +0000 (16:31 +0300)]
alpha: fix iommu-related boot panic

This fixes a boot panic due to a typo in the recent iommu patchset from
FUJITA Tomonori <tomof@acm.org> - the code used dma_get_max_seg_size()
instead of dma_get_seg_boundary().

It also removes a couple of unnecessary BUG_ON() and ALIGN() macros.

Signed-off-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Reported-and-tested-by: Bob Tracy <rct@frus.com>
Acked-by: FUJITA Tomonori <tomof@acm.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agocpu hotplug: adjust root-domain->online span in response to hotplug event
Gregory Haskins [Sat, 8 Mar 2008 05:10:15 +0000 (00:10 -0500)]
cpu hotplug: adjust root-domain->online span in response to hotplug event

We currently set the root-domain online span automatically when the
domain is added to the cpu if the cpu is already a member of
cpu_online_map.

This was done as a hack/bug-fix for s2ram, but it also causes a problem
with hotplug CPU_DOWN transitioning.  The right way to fix the original
problem is to actually respond to CPU_UP events, instead of CPU_ONLINE,
which is already too late.

This solves the hung reboot regression reported by Andrew Morton and
others.

Signed-off-by: Gregory Haskins <ghaskins@novell.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotime: remove obsolete CLOCK_TICK_ADJUST
Roman Zippel [Tue, 4 Mar 2008 23:14:26 +0000 (15:14 -0800)]
time: remove obsolete CLOCK_TICK_ADJUST

The first version of the ntp_interval/tick_length inconsistent usage patch was
recently merged as bbe4d18ac2e058c56adb0cd71f49d9ed3216a405

http://git.kernel.org/gitweb.cgi?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bbe4d18ac2e058c56adb0cd71f49d9ed3216a405

While the fix did greatly improve the situation, it was correctly pointed out
by Roman that it does have a small bug: If the users change clocksources after
the system has been running and NTP has made corrections, the correctoins made
against the old clocksource will be applied against the new clocksource,
causing error.

The second attempt, which corrects the issue in the NTP_INTERVAL_LENGTH
definition has also made it up-stream as commit
e13a2e61dd5152f5499d2003470acf9c838eab84

http://git.kernel.org/gitweb.cgi?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e13a2e61dd5152f5499d2003470acf9c838eab84

Roman has correctly pointed out that CLOCK_TICK_ADJUST is calculated
based on the PIT's frequency, and isn't really relevant to non-PIT
driven clocksources (that is, clocksources other then jiffies and pit).

This patch reverts both of those changes, and simply removes
CLOCK_TICK_ADJUST.

This does remove the granularity error correction for users of PIT and Jiffies
clocksource users, but the granularity error but for the majority of users, it
should be within the 500ppm range NTP can accommodate for.

For systems that have granularity errors greater then 500ppm, the
"ntp_tick_adj=" boot option can be used to compensate.

[johnstul@us.ibm.com: provided changelog]
[mattilinnanvuori@yahoo.com: maek ntp_tick_adj static]
Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Acked-by: john stultz <johnstul@us.ibm.com>
Signed-off-by: Matti Linnanvuori <mattilinnanvuori@yahoo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: mingo@elte.hu
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agotime: don't touch an offlined CPU's ts->tick_stopped in tick_cancel_sched_timer()
Karsten Wiese [Tue, 4 Mar 2008 22:59:55 +0000 (14:59 -0800)]
time: don't touch an offlined CPU's ts->tick_stopped in tick_cancel_sched_timer()

Silences WARN_ONs in rcu_enter_nohz() and rcu_exit_nohz(), which appeared
before caused by (repeated) calls to:
        $ echo 0 > /sys/devices/system/cpu/cpu1/online
        $ echo 1 > /sys/devices/system/cpu/cpu1/online

Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de>
Cc: johnstul@us.ibm.com
Cc: Rafael Wysocki <rjw@sisk.pl>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Ingo Molnar <mingo@elte.hu>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agotime: prevent the loop in timespec_add_ns() from being optimised away
Segher Boessenkool [Tue, 4 Mar 2008 22:59:54 +0000 (14:59 -0800)]
time: prevent the loop in timespec_add_ns() from being optimised away

Since some architectures don't support __udivdi3().

Signed-off-by: Segher Boessenkool <segher@kernel.crashing.org>
Cc: john stultz <johnstul@us.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agontp: use unsigned input for do_div()
David Howells [Mon, 25 Feb 2008 17:31:57 +0000 (18:31 +0100)]
ntp: use unsigned input for do_div()

The kernel NTP code shouldn't hand 64-bit *signed* values to do_div().  Make it
instead hand 64-bit unsigned values.  This gets rid of a couple of warnings.

Signed-off-by: David Howells <dhowells@redhat.com>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: john stultz <johnstul@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agoFix waitid si_code regression
Roland McGrath [Sat, 8 Mar 2008 19:41:22 +0000 (11:41 -0800)]
Fix waitid si_code regression

In commit ee7c82da830ea860b1f9274f1f0cdf99f206e7c2 ("wait_task_stopped:
simplify and fix races with SIGCONT/SIGKILL/untrace"), the magic (short)
cast when storing si_code was lost in wait_task_stopped.  This leaks the
in-kernel CLD_* values that do not match what userland expects.

Signed-off-by: Roland McGrath <roland@redhat.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years ago[ARM] 4856/1: Orion: initialise the sixth PCIe MBUS mapping window as well
Lennert Buytenhek [Fri, 7 Mar 2008 10:47:23 +0000 (11:47 +0100)]
[ARM] 4856/1: Orion: initialise the sixth PCIe MBUS mapping window as well

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16 years ago[ARM] 4855/1: Orion: use correct ethernet unit address range
Lennert Buytenhek [Fri, 7 Mar 2008 10:41:18 +0000 (11:41 +0100)]
[ARM] 4855/1: Orion: use correct ethernet unit address range

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16 years ago[ARM] 4853/1: include uImage target in make help
Uwe Kleine-König [Thu, 6 Mar 2008 15:22:17 +0000 (16:22 +0100)]
[ARM] 4853/1: include uImage target in make help

Signed-off-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16 years ago[ARM] 4851/1: ns9xxx: fix size of gpiores
Uwe Kleine-König [Thu, 6 Mar 2008 15:21:42 +0000 (16:21 +0100)]
[ARM] 4851/1: ns9xxx: fix size of gpiores

GPIO_MAX is the number of the last gpio, not the number of gpios.  So
the bitmap must provide GPIO_MAX + 1 bits.

Signed-off-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16 years ago[CRYPTO] skcipher: Fix section mismatches
Herbert Xu [Sat, 8 Mar 2008 12:29:43 +0000 (20:29 +0800)]
[CRYPTO] skcipher: Fix section mismatches

The previous patch to move chainiv and eseqiv into blkcipher created
a section mismatch for the chainiv exit function which was also called
from __init.  This patch removes the __exit marking on it.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
16 years agox86_64: make ptrace always sign-extend orig_ax to 64 bits
Roland McGrath [Fri, 7 Mar 2008 22:56:02 +0000 (14:56 -0800)]
x86_64: make ptrace always sign-extend orig_ax to 64 bits

This makes 64-bit ptrace calls setting the 64-bit orig_ax field for a
32-bit task sign-extend the low 32 bits up to 64.  This matches what a
64-bit debugger expects when tracing a 32-bit task.

This follows on my "x86_64 ia32 syscall restart fix".  This didn't
matter until that was fixed.

The debugger ignores or zeros the high half of every register slot it
sets (including the orig_rax pseudo-register) uniformly.  It expects
that the setting of the low 32 bits always has the same meaning as a
32-bit debugger setting those same 32 bits with native 32-bit
facilities.

This never arose before because the syscall restart check never
matched any -ERESTART* values due to lack of sign extension.  Before
that fix, even 32-bit ptrace setting orig_eax to -1 failed to trigger
the restart check anyway.  So this was never noticed as a regression
of 64-bit debuggers vs 32-bit debuggers on the same 64-bit kernel.

Signed-off-by: Roland McGrath <roland@redhat.com>
[ Changed to just do the sign-extension unconditionally on x86-64,
  since orig_ax is always just a small integer and doesn't need
  the full 64-bit range ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agobluetooth: Add another Broadcom device
Karsten Keil [Fri, 7 Mar 2008 20:10:34 +0000 (21:10 +0100)]
bluetooth: Add another Broadcom device

This adds another Broadcom BCM2045 based device to the blacklist, with
these settings the micro dongle works on my system.

Signed-off-by: Karsten Keil <kkeil@suse.de>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years ago[PPC] 8xx: swap bug-fix
Yuri Tikhonov [Sat, 2 Feb 2008 07:47:31 +0000 (10:47 +0300)]
[PPC] 8xx: swap bug-fix

This makes swap routines operate correctly on the ppc_8xx based machines.

Recent kernel's size makes swap feature very important on low-memory platfor
those are actually non-operable without it.

Signed-off-by: Yuri Tikhonov <yur@emcraft.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] 85xx: sbc8548 - Fix incorrect PCI-X and PCI interrupt map
Jeremy McNicoll [Fri, 7 Mar 2008 20:14:09 +0000 (15:14 -0500)]
[POWERPC] 85xx: sbc8548 - Fix incorrect PCI-X and PCI interrupt map

The following patch allows interrupts to occur on the
sbc8548. Currently PCI and PCI-X devices get assigned an IRQ
but the interrupt count never increases.  This solves the
problem and adds PCI support as well.

Signed-off-by: Jeremy McNicoll <jeremy.mcnicoll@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years agoMerge branch 'slab-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/christoph/vm
Linus Torvalds [Fri, 7 Mar 2008 21:49:32 +0000 (13:49 -0800)]
Merge branch 'slab-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/christoph/vm

* 'slab-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/christoph/vm:
  slub: fix typo in Documentation/vm/slub.txt
  slab: NUMA slab allocator migration bugfix
  slub: Do not cross cacheline boundaries for very small objects
  slab - use angle brackets for include of kmalloc_sizes.h
  slab numa fallback logic: Do not pass unfiltered flags to page allocator
  slub statistics: Fix check for DEACTIVATE_REMOTE_FREES

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
Linus Torvalds [Fri, 7 Mar 2008 21:17:59 +0000 (13:17 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6:
  ide: update references to Documentation/ide/ide.txt (v2)
  ide: move ide.txt to Documentation/ide/
  ide: fix buggy code in ide_register_hw()
  ide: fix enabling DMA on it821x in "smart" mode
  ide-cd: mark REQ_TYPE_ATA_PC write requests with REQ_RW flag

16 years agoide: update references to Documentation/ide/ide.txt (v2)
Randy Dunlap [Fri, 7 Mar 2008 20:53:50 +0000 (21:53 +0100)]
ide: update references to Documentation/ide/ide.txt (v2)

Fix all references to Documentation/ide/ide.txt.
Add/update ide/00-INDEX file.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: move ide.txt to Documentation/ide/
Randy Dunlap [Fri, 7 Mar 2008 20:53:50 +0000 (21:53 +0100)]
ide: move ide.txt to Documentation/ide/

Cleanup some of Documentation directory:
Move Documentation/ide.txt to the ide/ sub-directory.
Fix trailing whitespace while there.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: fix buggy code in ide_register_hw()
Peter Teoh [Fri, 7 Mar 2008 20:53:49 +0000 (21:53 +0100)]
ide: fix buggy code in ide_register_hw()

Relocating the index to come after finding the hwif pointer.

Signed-off-by: Peter Teoh <htmldeveloper@gmail.com>
Reported-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>