pandora-kernel.git
16 years agoLinux 2.6.22-rc7 v2.6.22-rc7
Linus Torvalds [Sun, 1 Jul 2007 19:54:24 +0000 (12:54 -0700)]
Linux 2.6.22-rc7

Last -rc? That's the plan..

16 years agoPM: introduce set_target method in pm_ops
Rafael J. Wysocki [Sun, 1 Jul 2007 19:07:33 +0000 (12:07 -0700)]
PM: introduce set_target method in pm_ops

Commit 52ade9b3b97fd3bea42842a056fe0786c28d0555 changed the suspend code
ordering to execute pm_ops->prepare() after the device model per-device
.suspend() calls in order to fix some ACPI-related issues.  Unfortunately, it
broke the at91 platform which assumed that pm_ops->prepare() would be called
before suspending devices.

at91 used pm_ops->prepare() to get notified of the target system sleep state,
so that it could use this information while suspending devices.  However, with
the current suspend code ordering pm_ops->prepare() is called too late for
this purpose.  Thus, at91 needs an additional method in 'struct pm_ops' that
will be used for notifying the platform of the target system sleep state.
Moreover, in the future such a method will also be needed by ACPI.

This patch adds the .set_target() method to 'struct pm_ops' and makes the
suspend code call it, if implemented, before executing the device model
per-device .suspend() calls.  It also modifies the at91 code to use
pm_ops->set_target() instead of pm_ops->prepare().

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: Len Brown <lenb@kernel.org>
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 agosmsc-ircc2: bypass PNP detection until we get the quirks worked out
Bjorn Helgaas [Sun, 1 Jul 2007 19:06:49 +0000 (12:06 -0700)]
smsc-ircc2: bypass PNP detection until we get the quirks worked out

Don't use PNP detection by default yet.  We have some PNP and BIOS issues
to work out first.

Sample problem on a Toshiba Portege 4000: the SMCf010 device is handed off
disabled.  We assign I/O ports originally assigned to the SMCf010 to a
PCMCIA device instead.  We enable the SMCf010, configuring it to use
disjoint ports, but _SRS doesn't work correctly, so the device doesn't
work.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Andrey Borzenkov <arvidjaar@mail.ru>
Cc: Adam Belay <ambx1@neo.rr.com>
Cc: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>
Cc: Samuel Ortiz <samuel@sortiz.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoi386: mtrr crash fix
Andrew Morton [Sun, 1 Jul 2007 19:06:48 +0000 (12:06 -0700)]
i386: mtrr crash fix

Commit 3ebad5905609476a4ff1151a66b21d9794009961 ("[PATCH] x86: Save and
restore the fixed-range MTRRs of the BSP when suspending") added mtrr
operations without verifying that the CPU has MTRRs.  Crashes transmeta
CPUs.

Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: <linux@horizon.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoasus_acpi: fix oops on non-asus machines
Maxime Austruy [Sun, 1 Jul 2007 19:06:38 +0000 (12:06 -0700)]
asus_acpi: fix oops on non-asus machines

If asus_acpi_init doesn't find any device it knows about, it mistakenly
returns a "success" error code even though it cleans up after itself.  Later
when trying to rmmod asus_acpi, the module_exit routine would try to clean up
one more time and we would end up calling
acpi_bus_unregister_driver(&asus_hotk_driver) twice.  This patch addresses
this first problem by returning -ENODEV when no appropriate device is found.

Then there was also another bug with the code handling the return value of
backlight_device_register.  If this function ever failed, the driver would
cleanup by calling the module_exit routine from module_init, but it would
still return "success".  So any attempt to rmmod this module would result in
asus_acpi_exit being called twice but it's not ready to handle it (I haven't
hit this bug, just found it by code inspection).  This patch fixes that by
inserting a return -ENODEV; at the end of this error handling path.

Signed-off-by: Maxime Austruy <maxime@tralhalla.org>
Cc: Len Brown <lenb@kernel.org>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agopci.h stubs (for EDD build error)
Randy Dunlap [Sun, 1 Jul 2007 19:06:37 +0000 (12:06 -0700)]
pci.h stubs (for EDD build error)

Provide stubs for more PCI bus/slot functions when CONFIG_PCI=n.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Matt Domsch <Matt_Domsch@dell.com>
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 agoALSA: more section mismatches
Randy Dunlap [Sun, 1 Jul 2007 19:06:37 +0000 (12:06 -0700)]
ALSA: more section mismatches

Fix section mismatch warnings:

WARNING: sound/built-in.o(.exit.text+0x3ad): Section mismatch: reference to .init.text: (between 'sb_exit' and 'unload_uart6850')
WARNING: sound/built-in.o(.exit.text+0x753): Section mismatch: reference to .init.text: (between 'snd_mts64_module_exit' and 'snd_portman_module_exit')

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Jaroslav Kysela <perex@suse.cz>
Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofrv: fix fallout from "remove sched.h from mm.h" patch
Alexey Dobriyan [Sun, 1 Jul 2007 19:06:36 +0000 (12:06 -0700)]
frv: fix fallout from "remove sched.h from mm.h" patch

/home/rpjday/AMD/k/topics/0_hi/hi1.c:15: error: dereferencing pointer to incomplete type
/home/rpjday/AMD/k/topics/0_hi/hi1.c:16: error: dereferencing pointer to incomplete type

Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoSLAB: remove WARN_ON_ONCE for zero sized objects for 2.6.22 release
Christoph Lameter [Sun, 1 Jul 2007 19:06:35 +0000 (12:06 -0700)]
SLAB: remove WARN_ON_ONCE for zero sized objects for 2.6.22 release

We agreed to remove the WARN_ON_ONCE before 2.6.22 is released.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoblink driver power saving
Stephen Hemminger [Sun, 1 Jul 2007 16:50:35 +0000 (12:50 -0400)]
blink driver power saving

The blink driver wakes up every jiffies which wastes power unnecessarily.
Using a notifier gives same effect. Also add ability to unload module.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
[ We should really just delete the whole thing. The blink driver is
  broken in many other ways too  -Linus ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoi386: remove bogus mtrr range check
Linus Torvalds [Sun, 1 Jul 2007 17:56:11 +0000 (10:56 -0700)]
i386: remove bogus mtrr range check

Commit 9215da33209b861b01c51382254b178a3fe92a30 "fixed" the MTRR range
check to not allow any MTRR's under the 1MB mark (since that's where the
fixed MTRR's are active).

However, that was totally bogus, since it's normal (and almost required)
to have a large variable MTRR that starts at 0, and covers some large
percentage of the whole RAM, and then using the fixed MTRR's to override
that large MTRR to handle the special ISA hole in the 640k-1M region.

The old check was bogus too (checking that no variable MTRR is used that
is entirely under the 1MB range), but at least it wasn't actively
detrimental, because no sane situation would ever trigger such MTRR
usage in the first place.

That said, the whole notion of not allowing variable MTRR's in the low
1MB is just stupid, so rather than revert the commit, this just removes
the whole sad and unnecessary check entirely.

Cc: Jan Beulich <jbeulich@novell.com>
Cc: Andi Kleen <ak@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Tested-by: Luca Palermo <darkmage@sabayonlinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Sat, 30 Jun 2007 04:30:18 +0000 (21:30 -0700)]
Merge branch 'master' of /linux/kernel/git/davem/sparc-2.6

* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC64]: Add linux/pagemap.h to asm/tlb.h
  [SPARC64]: Need to set state to IDLE during sun4v IRQ enable.
  [SPARC64]: Fix VIRQ enabling.
  [SPARC64]: Add irqs to mdesc_node.

16 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Sat, 30 Jun 2007 04:29:57 +0000 (21:29 -0700)]
Merge branch 'master' of /linux/kernel/git/davem/net-2.6

* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [IRDA]: fix printk format
  [NETPOLL] netconsole: fix soft lockup when removing module
  [NETPOLL]: tx lock deadlock fix
  SCTP: lock_sock_nested in sctp_sock_migrate
  SCTP: Fix sctp_getsockopt_get_peer_addrs
  SCTP: update sctp_getsockopt helpers to allow oversized buffers

16 years agoFix VDSO gettimeofday() when called with NULL struct timeval.
Will Schmidt [Fri, 29 Jun 2007 20:49:50 +0000 (15:49 -0500)]
Fix VDSO gettimeofday() when called with NULL struct timeval.

The vdso64 portion of patch 74609f4536f2b8fd6a48381bbbe3cd37da20a527 for
fixing problems with NULL gettimeofday input mistakenly checks for a
null tz field twice, when it should be checking for null tz once, and
null tv once; by way of a r10/r11 typo.

Any application calling gettimeofday(&tv,NULL) will "fail".

This corrects that typo, and makes my G5 happy.

Tested on G5.

Signed-off-by: Will Schmidt <will_schmidt@vnet.ibm.com>
Cc: Tony Breeds <tony@bakeyournoodle.com>
Forwarded-by: Ben Herrenschmidt <benh@kernel.crashing.org>
[ Ben says: "I checked the 32 bits part of the change is correct.  You
  can probably blame me for originally writing the 2 versions with
  inversed usage of r10 and r11, thus confusing Tony :-)"

  Ben duly blamed.   - Linus ]

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years ago[IRDA]: fix printk format
Randy Dunlap [Fri, 29 Jun 2007 05:40:23 +0000 (22:40 -0700)]
[IRDA]: fix printk format

Fix printk format warning:
drivers/net/irda/irport.c:512: warning: format '%d' expects type 'int', but argument 5 has type 'long int'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETPOLL] netconsole: fix soft lockup when removing module
Jarek Poplawski [Fri, 29 Jun 2007 05:11:47 +0000 (22:11 -0700)]
[NETPOLL] netconsole: fix soft lockup when removing module

#1
Until kernel ver. 2.6.21 (including) cancel_rearming_delayed_work()
required a work function should always (unconditionally) rearm with
delay > 0 - otherwise it would endlessly loop. This patch replaces
this function with cancel_delayed_work(). Later kernel versions don't
require this, so here it's only for uniformity.

#2
After deleting a timer in cancel_[rearming_]delayed_work() there could
stay a last skb queued in npinfo->txq causing a memory leak after
kfree(npinfo).

Initial patch & testing by: Jason Wessel <jason.wessel@windriver.com>

Signed-off-by: Jarek Poplawski <jarkao2@o2.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SPARC64]: Add linux/pagemap.h to asm/tlb.h
Alexey Dobriyan [Fri, 29 Jun 2007 04:25:31 +0000 (21:25 -0700)]
[SPARC64]: Add linux/pagemap.h to asm/tlb.h

As seen on sparc64-allnoconfig:

  CC      arch/sparc64/mm/tlb.o
In file included from arch/sparc64/mm/tlb.c:19:
include/asm/tlb.h: In function 'tlb_flush_mmu':
include/asm/tlb.h:60: warning: implicit declaration of function 'release_pages'
include/asm/tlb.h: In function 'tlb_remove_page':
include/asm/tlb.h:92: warning: implicit declaration of function 'page_cache_release'

Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/vxy/lksctp-dev
David S. Miller [Fri, 29 Jun 2007 04:21:43 +0000 (21:21 -0700)]
Merge /pub/scm/linux/kernel/git/vxy/lksctp-dev

16 years agoMerge branch 'for_linus' of master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc
Linus Torvalds [Thu, 28 Jun 2007 18:45:12 +0000 (11:45 -0700)]
Merge branch 'for_linus' of /linux/kernel/git/galak/powerpc

* 'for_linus' of master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc:
  phy: Fix phy_id for Vitesse 824x PHY

16 years agoIntroduce fixed sys_sync_file_range2() syscall, implement on PowerPC and ARM
David Woodhouse [Wed, 27 Jun 2007 21:10:09 +0000 (14:10 -0700)]
Introduce fixed sys_sync_file_range2() syscall, implement on PowerPC and ARM

Not all the world is an i386.  Many architectures need 64-bit arguments to be
aligned in suitable pairs of registers, and the original
sys_sync_file_range(int, loff_t, loff_t, int) was therefore wasting an
argument register for padding after the first integer.  Since we don't
normally have more than 6 arguments for system calls, that left no room for
the final argument on some architectures.

Fix this by introducing sys_sync_file_range2(int, int, loff_t, loff_t) which
all fits nicely.  In fact, ARM already had that, but called it
sys_arm_sync_file_range.  Move it to fs/sync.c and rename it, then implement
the needed compatibility routine.  And stop the missing syscall check from
bitching about the absence of sys_sync_file_range() if we've implemented
sys_sync_file_range2() instead.

Tested on PPC32 and with 32-bit and 64-bit userspace on PPC64.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Arnd Bergmann <arnd@arndb.de>
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 agoserial: clear proper MPSC interrupt cause bits
Jay Lubomirski [Wed, 27 Jun 2007 21:10:09 +0000 (14:10 -0700)]
serial: clear proper MPSC interrupt cause bits

The interrupt clearing code in mpsc_sdma_intr_ack() mistakenly clears the
interrupt for both controllers instead of just the one its supposed to.
This can result in the other controller appearing to hang because its
interrupt was effectively lost.

So, don't clear the interrupt cause bits for both MPSC controllers when
clearing the interrupt for one of them.  Just clear the one that is
supposed to be cleared.

Signed-off-by: Jay Lubomirski <jaylubo@motorola.com>
Acked-by: Mark A. Greer <mgreer@mvista.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoext2: fix return of uninitialised variable
Andrew Morton [Wed, 27 Jun 2007 21:10:08 +0000 (14:10 -0700)]
ext2: fix return of uninitialised variable

gcc correctly says

fs/ext2/super.c: In function 'ext2_remount':
fs/ext2/super.c:1055: warning: 'err' may be used uninitialized in this function

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomips-jazz: correct flags for timer io resource
Alexey Dobriyan [Wed, 27 Jun 2007 21:10:06 +0000 (14:10 -0700)]
mips-jazz: correct flags for timer io resource

arch/mips/jazz/setup.c:55:4: error: Initializer entry defined twice

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agow1_therm_read_bin: don't call flush_signals()
Evgeniy Polyakov [Wed, 27 Jun 2007 21:10:04 +0000 (14:10 -0700)]
w1_therm_read_bin: don't call flush_signals()

This can disrupt userspace signal management.

Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Cc: Roland McGrath <roland@redhat.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agorelayfs: fix overwrites
Masami Hiramatsu [Wed, 27 Jun 2007 21:10:04 +0000 (14:10 -0700)]
relayfs: fix overwrites

When I use relayfs with "overwrite" mode, read() still sets incorrect
number of consumed bytes.

Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Acked-by: Tom Zanussi <zanussi@us.ibm.com>
Acked-by: David Wilder <dwilder@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agorelay file read: start-pos fix
David Wilder [Wed, 27 Jun 2007 21:10:03 +0000 (14:10 -0700)]
relay file read: start-pos fix

Fix a bug in the relay read interface causing the number of consumed bytes
to be set incorrectly.

Signed-off-by: Tom Zanussi <zanussi@us.ibm.com>
Signed-off-by: David Wilder <dwilder@us.ibm.com>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoALSA: use __devexit_p
Randy Dunlap [Wed, 27 Jun 2007 21:10:02 +0000 (14:10 -0700)]
ALSA: use __devexit_p

Change __devexit to __devexit_p:
sound/isa/opl3sa2.c:956: error: expected expression before '__attribute__'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Jaroslav Kysela <perex@suse.cz>
Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoDocumentation/HOWTO: update URLs of git trees
Stefan Richter [Wed, 27 Jun 2007 21:10:01 +0000 (14:10 -0700)]
Documentation/HOWTO: update URLs of git trees

Also, remove outdated 1394 tree and mention MAINTAINERS as pointer to
development trees.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofix section mismatch in chipsfb
Olaf Hering [Wed, 27 Jun 2007 21:10:00 +0000 (14:10 -0700)]
fix section mismatch in chipsfb

WARNING: drivers/built-in.o(.text+0x8742a): Section mismatch: reference to .init.data:chipsfb_fix (between 'chipsfb_pci_init' and 'chipsfb_set_par')
WARNING: drivers/built-in.o(.text+0x87432): Section mismatch: reference to .init.data:chipsfb_fix (between 'chipsfb_pci_init' and 'chipsfb_set_par')
WARNING: drivers/built-in.o(.text+0x87442): Section mismatch: reference to .init.data:chipsfb_var (between 'chipsfb_pci_init' and 'chipsfb_set_par')
WARNING: drivers/built-in.o(.text+0x8744a): Section mismatch: reference to .init.data:chipsfb_var (between 'chipsfb_pci_init' and 'chipsfb_set_par')

init_chips is only called from chipsfb_pci_init
chipsfb_fix and chipsfb_var are only referenced from init_chips

Signed-off-by: Olaf Hering <olaf@aepfle.de>
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 agoavoid spurious POLLIN returns in signalfd
Davide Libenzi [Wed, 27 Jun 2007 21:09:59 +0000 (14:09 -0700)]
avoid spurious POLLIN returns in signalfd

The new code in kernel/signal.c does not allow fetching private signals
from another task.  This patch avoid spurious POLLIN returns from a
signalfd poll(2) operation.

Signed-off-by: Davide Libenzi <davidel@xmailserver.org>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agosaa7134: fix thread shutdown handling
Jeff Mahoney [Wed, 27 Jun 2007 21:09:58 +0000 (14:09 -0700)]
saa7134: fix thread shutdown handling

This patch changes the test for the thread pid from >= 0 to > 0.

When the saa8134 driver initialization fails after a certain point, it goes
through the complete shutdown process for the driver.  Part of shutting it
down includes tearing down the thread for tv audio.

The test for tearing down the thread tests for >= 0.  Since the dev
structure is kzalloc'd, the test will always be true if we haven't tried to
start the thread yet.  We end up waiting on pid 0 to complete, which will
never happen, so we lock up.

This bug was observed in Novell Bugzilla 284718, when request_irq() failed.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Acked-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoALSA: fix ice1712 section mismatch
Randy Dunlap [Wed, 27 Jun 2007 21:09:57 +0000 (14:09 -0700)]
ALSA: fix ice1712 section mismatch

Cannot mix const and __initdata:
sound/pci/ice1712/prodigy192.c:708: error: ak4114_controls causes a section type conflict

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Jaroslav Kysela <perex@suse.cz>
Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoIOATDMA: fix section mismatches
Randy Dunlap [Wed, 27 Jun 2007 21:09:56 +0000 (14:09 -0700)]
IOATDMA: fix section mismatches

Rename struct pci_driver data so that false section mismatch warnings won't
be produced.

Sam, ISTM that depending on variable names is the weakest & worst part of
modpost section checking.  Should __init_refok work here?  I got build
errors when I tried to use it, probably because the struct pci_driver probe
and remove methods are not marked "__init_refok".

WARNING: drivers/dma/ioatdma.o(.data+0x10): Section mismatch: reference to .init.text: (between 'ioat_pci_drv' and 'ioat_pci_tbl')
WARNING: drivers/dma/ioatdma.o(.data+0x14): Section mismatch: reference to .exit.text: (between 'ioat_pci_drv' and 'ioat_pci_tbl')

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Chris Leech <christopher.leech@intel.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoFix Kconfig dependency problems wrt boolean menuconfigs
Trent Piepho [Wed, 27 Jun 2007 21:09:54 +0000 (14:09 -0700)]
Fix Kconfig dependency problems wrt boolean menuconfigs

If one has a dependency chain (tristate)FOO depends on (bool)BAR depends on
(tristate)BAZ, build problems will result.  If BAZ=m, then BAR can be set
y, which allows FOO=y.  It's possible to have FOO=y && BAZ=m, which
wouldn't be allowed if FOO depended directly on BAZ.  In effect, the bool
promotes the tristate from m to y.

This ends up causing a problem with several menuconfigs that look like:

menuconfig BAR
bool
depends on BAZ [tristate]
if BAR
config FOO
tristate
endif

The solution used here is to add the dependencies of BAR to the if
statement, so that items in the if block will gain a direct
non-bool-promoted dependency on BAZ.  This is how it would work if a menu
was used instead of an if block.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Acked-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: "David S. Miller" <davem@davemloft.net>
Acked-by: Jeff Garzik <jeff@garzik.org>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: Chas Williams <chas@cmf.nrl.navy.mil>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomm: kill validate_anon_vma to avoid mapcount BUG
Hugh Dickins [Wed, 27 Jun 2007 21:09:53 +0000 (14:09 -0700)]
mm: kill validate_anon_vma to avoid mapcount BUG

validate_anon_vma gave a useful check on the integrity of the anon_vma list
when Andrea was developing obj rmap; but it was not enabled in SLES9
itself, nor in mainline, until Nick changed commented-out RMAP_DEBUG to
configurable CONFIG_DEBUG_VM in 2.6.17.  Now Petr Vandrovec reports that
its BUG_ON(mapcount > 100000) can easily crash a CONFIG_DEBUG_VM=y system.

That limit was just an arbitrary number to protect against an infinite
loop.  We could raise it to something enormous (depending on sizeof struct
vma and size of memory?); but I rather think validate_anon_vma has outlived
its usefulness, and is better just removed - which gives a magnificent
performance boost to anything like Petr's test program ;)

Of course, a very long anon_vma list is bad news for preemption latency,
and I believe there has been one recent report of such: let's not forget
that, but validate_anon_vma only makes it worse not better.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Cc: Petr Vandrovec <petr@vmware.com>
Acked-by: Nick Piggin <npiggin@suse.de>
Cc: Andrea Arcangeli <andrea@suse.de>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoPNP SMCf010 quirk: auto-config device if BIOS left it broken
Bjorn Helgaas [Wed, 27 Jun 2007 21:09:52 +0000 (14:09 -0700)]
PNP SMCf010 quirk: auto-config device if BIOS left it broken

Some HP firmware leaves the SMCf010 IRDA device incompletely configured, or
reports the wrong resources in _CRS.  As a workaround, when we find such a
device, try to auto-configure the device.

This ignores the _CRS data, picks a config from _PRS, and runs _SRS to
configure the device.  This makes smsc-ircc2 work correctly with PNP
resources (with no preconfiguration!) on all the machines I tested.

I think Windows does something like this by default for all devices,
so we should consider doing the same thing in Linux.

This patch addresses part of the 2.6.22 regression:
    "no irda0 interface (2.6.21 was OK), smsc does not find chip"
It fixes smsc-ircc2 PNP device detection on HP nc6000, nc6220, nw8000,
nw8240, and possibly other machines.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Samuel Ortiz <samuel@sortiz.org>
Cc: "Linus Walleij (LD/EAB)" <linus.walleij@ericsson.com>
Cc: Andrey Borzenkov <arvidjaar@mail.ru>
Cc: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>
Cc: Adam Belay <ambx1@neo.rr.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agosmsc-ircc2: skip preconfiguration for PNP devices
Bjorn Helgaas [Wed, 27 Jun 2007 21:09:50 +0000 (14:09 -0700)]
smsc-ircc2: skip preconfiguration for PNP devices

If we rely on the device resources from PNPBIOS, we also have to rely on
the BIOS to configure any bridges on the way to the device.

Using the PNPBIOS resources but changing the configuration of a bridge
behind the back of the firmware is likely to make things inconsistent.

This patch addresses part of the 2.6.22 regression:
    "no irda0 interface (2.6.21 was OK), smsc does not find chip"
It fixes smsc-ircc2 PNP device detection on HP nx5000 laptops.
Other laptops, including HP nc6000, HP nc8000, HP nw8000, and Toshiba
Portege 4000, still need PNP quirks to make this work.

With "smsc-ircc2.nopnp", we do the legacy device probe, including manual
bridge preconfiguration, as before.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Samuel Ortiz <samuel@sortiz.org>
Acked-by: "Linus Walleij (LD/EAB)" <linus.walleij@ericsson.com>
Cc: Andrey Borzenkov <arvidjaar@mail.ru>
Cc: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Adam Belay <ambx1@neo.rr.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomtrr/cyrix: fix sections
Randy Dunlap [Wed, 27 Jun 2007 21:09:49 +0000 (14:09 -0700)]
mtrr/cyrix: fix sections

main.c::mtrr_add() or mtrr_del() [exported]
calls main.c::mtrr_add_page() or mtrr_del_page() or mtrr_restore() [resume]
calls main.c::set_mtrr()
calls main.c::ipi_handler()
calls main.c::mtrr_if->set_all() == which can be cyrix_set_all

WARNING: arch/i386/kernel/built-in.o(.text+0x8657): Section mismatch: reference to .init.data: (between 'cyrix_set_all' and 'centaur_get_free_region')
WARNING: arch/i386/kernel/built-in.o(.text+0x866b): Section mismatch: reference to .init.data: (between 'cyrix_set_all' and 'centaur_get_free_region')
WARNING: arch/i386/kernel/built-in.o(.text+0x867e): Section mismatch: reference to .init.data: (between 'cyrix_set_all' and 'centaur_get_free_region')
WARNING: arch/i386/kernel/built-in.o(.text+0x8684): Section mismatch: reference to .init.data: (between 'cyrix_set_all' and 'centaur_get_free_region')
WARNING: arch/i386/kernel/built-in.o(.text+0x868a): Section mismatch: reference to .init.data: (between 'cyrix_set_all' and 'centaur_get_free_region')

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoeventfd: clean compile when CONFIG_EVENTFD=n
Randy Dunlap [Wed, 27 Jun 2007 21:09:48 +0000 (14:09 -0700)]
eventfd: clean compile when CONFIG_EVENTFD=n

Fix gcc warning and add parameter checking when CONFIG_EVENTFD=n:

fs/aio.c: In function 'aio_complete':
fs/aio.c:955: warning: statement with no effect

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Davide Libenzi <davidel@xmailserver.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoatyfb: Fix XCLK frequency on Apple iBook1
Ville Syrjala [Wed, 27 Jun 2007 21:09:46 +0000 (14:09 -0700)]
atyfb: Fix XCLK frequency on Apple iBook1

Fix a regression on Apple iBook1.  Changes in the clock init code caused an
incorrect XCLK frequency to be used leading to a corrupted display.

Signed-off-by: Ville Syrjala <syrjala@sci.fi>
Cc: Olaf Hering <olaf@aepfle.de>
Cc: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agozero out last page for llseek/write
Michael Halcrow [Wed, 27 Jun 2007 21:09:45 +0000 (14:09 -0700)]
zero out last page for llseek/write

When one llseek's past the end of the file and then writes, every page past
the previous end of the file should be cleared.  Trevor found that the code,
as is, does not assure that the very last page is always cleared.  This patch
takes care of that.

Signed-off-by: Michael Halcrow <mhalcrow@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoeCryptfs: initialize crypt_stat in setattr
Michael Halcrow [Wed, 27 Jun 2007 21:09:44 +0000 (14:09 -0700)]
eCryptfs: initialize crypt_stat in setattr

Recent changes in eCryptfs have made it possible to get to ecryptfs_setattr()
with an uninitialized crypt_stat struct.  This results in a wide and colorful
variety of unpleasantries.  This patch properly initializes the crypt_stat
structure in ecryptfs_setattr() when it is necessary to do so.

Signed-off-by: Michael Halcrow <mhalcrow@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoeCryptfs: fix write zeros behavior
Michael Halcrow [Wed, 27 Jun 2007 21:09:44 +0000 (14:09 -0700)]
eCryptfs: fix write zeros behavior

This patch fixes the processes involved in wiping regions of the data during
truncate and write events, fixing a kernel hang in 2.6.22-rc4 while assuring
that zero values are written out to the appropriate locations during events in
which the i_size will change.

The range passed to ecryptfs_truncate() from ecryptfs_prepare_write() includes
the page that is the object of ecryptfs_prepare_write().  This leads to a
kernel hang as read_cache_page() is executed on the same page in the
ecryptfs_truncate() execution path.  This patch remedies this by limiting the
range passed to ecryptfs_truncate() so as to exclude the page that is the
object of ecryptfs_prepare_write(); it also adds code to
ecryptfs_prepare_write() to zero out the region of its own page when writing
past the i_size position.  This patch also modifies ecryptfs_truncate() so
that when a file is truncated to a smaller size, eCryptfs will zero out the
contents of the new last page from the new size through to the end of the last
page.

Signed-off-by: Michael Halcrow <mhalcrow@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agophy: Fix phy_id for Vitesse 824x PHY
Kumar Gala [Thu, 28 Jun 2007 18:26:06 +0000 (13:26 -0500)]
phy: Fix phy_id for Vitesse 824x PHY

The phy_id specified for the Vitesse 824x PHY would never match because
it was expecting bits to be set that would be masked by the phy_id_mask.
Fix the phy_id so it will match properly, and changed the mdio_bus_match
to mask both the driver and devices phy_id with the mask so we dont have
this issue in the future.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
Linus Torvalds [Wed, 27 Jun 2007 17:04:02 +0000 (10:04 -0700)]
Merge branch 'release' of git://git./linux/kernel/git/aegl/linux-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
  [IA64] Make SN2 PCI code use ioremap rather than manually mangle the address
  [IA64] Force error to surface in nofault code
  [IA64] change sh_change_coherence oemcall to use nolock
  [IA64] remove duplicate header include line
  [IA64] Correct unwind validation code
  [IA64] is_power_of_2-ia64/mm/hugetlbpage.c

16 years agoMerge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
Linus Torvalds [Wed, 27 Jun 2007 17:00:23 +0000 (10:00 -0700)]
Merge branch 'upstream-linus' of /linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  libata: kill ATA_HORKAGE_DMA_RW_ONLY
  libata: use PIO for non-16 byte aligned ATAPI commands
  libata: call ata_check_atapi_dma() with qc better prepared
  libata: fix infinite EH waiting bug
  libata: fix ata_dev_disable()
  pata_it821x: fix section mismatch warning
  libata: remove unused variable from ata_eh_reset()
  libata: be less verbose about hpa
  libata: kill non-sense warning message
  libata: kill the infamous abnormal status message
  HPT374 is UDMA100 not UDMA133

16 years agoMerge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
Linus Torvalds [Wed, 27 Jun 2007 16:59:52 +0000 (09:59 -0700)]
Merge branch 'upstream-linus' of /linux/kernel/git/jgarzik/netdev-2.6

* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6:
  2.6.22: ERROR: "__ucmpdi2" [drivers/net/s2io.ko] undefined!
  cxgb3 - fix register to stop bc/mc traffic
  au1000_eth: Fix warnings.

16 years agoremove leftover documentation of acpi_generic_hotkey
Stephen Hemminger [Wed, 27 Jun 2007 02:03:04 +0000 (22:03 -0400)]
remove leftover documentation of acpi_generic_hotkey

This looks like leftover text in the kernel parameter in documentation.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoAdd support SiS based XGI chips to SiS DRM.
Ian Romanick [Tue, 26 Jun 2007 20:38:00 +0000 (06:38 +1000)]
Add support SiS based XGI chips to SiS DRM.

This adds support for some of the XGI Volari family that are based on the
SiS.

Signed-off-by: Dave Airlie <airlied@linux.ie>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years ago[NETPOLL]: tx lock deadlock fix
Stephen Hemminger [Wed, 27 Jun 2007 07:39:42 +0000 (00:39 -0700)]
[NETPOLL]: tx lock deadlock fix

If sky2 device poll routine is called from netpoll_send_skb, it would
deadlock. The netpoll_send_skb held the netif_tx_lock, and the poll
routine could acquire it to clean up skb's. Other drivers might use
same locking model.

The driver is correct, netpoll should not introduce more locking
problems than it causes already. So change the code to drop lock
before calling poll handler.

Signed-off-by: Stephen Hemminger <shemminger@linux.foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agolibata: kill ATA_HORKAGE_DMA_RW_ONLY
Tejun Heo [Tue, 26 Jun 2007 17:49:38 +0000 (02:49 +0900)]
libata: kill ATA_HORKAGE_DMA_RW_ONLY

ATA_HORKAGE_DMA_RW_ONLY for TORiSAN is verified to be subset of using
DMA for ATAPI commands which aren't aligned to 16 bytes.  As libata
now doesn't use DMA for unaligned ATAPI commands, the horkage is
redundant.  Kill it.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agolibata: use PIO for non-16 byte aligned ATAPI commands
Tejun Heo [Tue, 26 Jun 2007 17:48:43 +0000 (02:48 +0900)]
libata: use PIO for non-16 byte aligned ATAPI commands

The IDE driver used DMA for ATAPI commands if READ/WRITE command is
multiple of sector size or sg command is multiple of 16 bytes.  For
libata, READ/WRITE sector alignment is guaranteed by the high level
driver (sr), so we only have to worry about the 16 byte alignment.

This patch makes ata_check_atapi_dma() always request PIO for all data
transfer commands which are not multiple of 16 bytes.

The following reports are related to this problem.

http://bugzilla.kernel.org/show_bug.cgi?id=8605 (confirmed)
http://thread.gmane.org/gmane.linux.kernel/476620 (confirmed)
https://bugzilla.novell.com/show_bug.cgi?id=229260 (probably)

Albert first pointed out the difference between IDE and libata.  Kudos
to him.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Albert Lee <albertcc@tw.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agolibata: call ata_check_atapi_dma() with qc better prepared
Tejun Heo [Tue, 26 Jun 2007 17:47:35 +0000 (02:47 +0900)]
libata: call ata_check_atapi_dma() with qc better prepared

In atapi_xlat(), prepare qc better before calling
ata_check_atapi_dma() such that ata_check_atapi_dma() can use info
from qc.  While at it, reformat weird looking if/else block in the
function.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agolibata: fix infinite EH waiting bug
Tejun Heo [Mon, 25 Jun 2007 12:47:11 +0000 (21:47 +0900)]
libata: fix infinite EH waiting bug

When EH gives up after repeated exceptions, it doesn't't clear the
PENDING bit on exit which leaves PENDING bit set without EH actually
scheduled.  This makes ata_port_wait_eh() to wait forever makes rmmod
hang on such port.  Fix it by clearing the flag.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agolibata: fix ata_dev_disable()
Tejun Heo [Mon, 25 Jun 2007 14:34:02 +0000 (23:34 +0900)]
libata: fix ata_dev_disable()

Fix silly condition check bug in ata_dev_disable().

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agopata_it821x: fix section mismatch warning
Randy Dunlap [Mon, 25 Jun 2007 17:42:22 +0000 (10:42 -0700)]
pata_it821x: fix section mismatch warning

Fix section mismatch when CONFIG_HOTPLUG=n (but functions are used
for resume):

WARNING: drivers/ata/pata_it821x.o(.text+0x3f): Section mismatch: reference to .init.text: (between 'it821x_reinit_one' and 'it821x_program_udma')
WARNING: drivers/ata/pata_it821x.o(.text+0x691): Section mismatch: reference to .init.text: (between 'it821x_init_one' and 'it821x_passthru_set_dmamode')

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agolibata: remove unused variable from ata_eh_reset()
Tejun Heo [Mon, 25 Jun 2007 12:43:04 +0000 (21:43 +0900)]
libata: remove unused variable from ata_eh_reset()

Removed unused variable did_followup_srst from ata_eh_reset().

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agolibata: be less verbose about hpa
Tejun Heo [Mon, 25 Jun 2007 11:45:54 +0000 (20:45 +0900)]
libata: be less verbose about hpa

There's no reason to print out hpa related messages when HPA is not
active.  Kill the unconditional message and add a warning message
which is printed if HPA size is smaller than the current size.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agolibata: kill non-sense warning message
Tejun Heo [Mon, 25 Jun 2007 12:11:13 +0000 (21:11 +0900)]
libata: kill non-sense warning message

prereset() is now allowed to set flag for unsupported reset method.
EH layer is responsible for selecting the fallback.  Remove non-sense
warning message.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agolibata: kill the infamous abnormal status message
Tejun Heo [Mon, 25 Jun 2007 12:31:05 +0000 (21:31 +0900)]
libata: kill the infamous abnormal status message

The infamous abnormal status message triggers on not so abnormal cases
including empty port and even when it's being triggered on actual
errors the info it provides is redundant and out of context - higher
level functions will print the info in better safe later anyway.

Also, by being triggered all the time, it leads people to think that
the abnormality is somehow related to all ATA and system problems
they're experiencing and gives owners of healthy systems unfounded
doubts about the integrity of the universe.  Make it a DPRINTK and
save the universe.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoHPT374 is UDMA100 not UDMA133
Alan Cox [Fri, 22 Jun 2007 13:17:28 +0000 (14:17 +0100)]
HPT374 is UDMA100 not UDMA133

Propogate change from drivers/ide

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years ago2.6.22: ERROR: "__ucmpdi2" [drivers/net/s2io.ko] undefined!
Olaf Hering [Tue, 19 Jun 2007 20:41:10 +0000 (22:41 +0200)]
2.6.22: ERROR: "__ucmpdi2" [drivers/net/s2io.ko] undefined!

On Tue, Jun 19, Stephen Hemminger wrote:
> Olaf Hering <olaf@aepfle.de> wrote:
> > What happend to __ucmpdi2 from David Woodhouse?
> > google has a few hits about stuff like this on 32bit powerpc with gcc 4.1.2:
> >
> > ERROR: "__ucmpdi2" [drivers/net/s2io.ko] undefined!
> >
> > using the drivers/net/s2io* files from 2.6.21 with 2.6.22-rc5 fixes the
> > compile.
> >
> > 25805dcf9d83098cf5492117ad2669cd14cc9b24 adds two u64 >>= 48 followed by
> > a switch statement (line 2889 and 6816).
>
> Probably the "switch(err) {" needs a cast to a smaller type (like u8).

This change removes the compiler-generated calls to __ucmpdi2.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agocxgb3 - fix register to stop bc/mc traffic
Divy Le Ray [Mon, 25 Jun 2007 22:19:30 +0000 (15:19 -0700)]
cxgb3 - fix register to stop bc/mc traffic

Use the right register to stop broadcast/multicast traffic.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoau1000_eth: Fix warnings.
Ralf Baechle [Sun, 24 Jun 2007 13:59:54 +0000 (15:59 +0200)]
au1000_eth: Fix warnings.

Fixed by including <linux/dma-mapping.h>:

  CC      drivers/net/au1000_eth.o
drivers/net/au1000_eth.c: In function 'au1000_probe':
drivers/net/au1000_eth.c:661: warning: implicit declaration of function 'dma_alloc_noncoherent'
drivers/net/au1000_eth.c:802: warning: implicit declaration of function 'dma_free_noncoherent'

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agox86_64 irq: use mask/unmask and proper locking in fixup_irqs()
Siddha, Suresh B [Mon, 25 Jun 2007 22:52:35 +0000 (15:52 -0700)]
x86_64 irq: use mask/unmask and proper locking in fixup_irqs()

Force irq migration path during cpu offline, is not using proper locks and
irq_chip mask/unmask routines.  This will result in some races(especially
the device generating the interrupt can see some inconsistent state,
resulting in issues like stuck irq,..).

Appended patch fixes the issue by taking proper lock and encapsulating
irq_chip set_affinity() with a mask() before and an unmask() after.

This fixes a MSI irq stuck issue reported by Darrick Wong.

There are several more general bugs in this area(irq migration in the
process context). For example,

 1. Possibility of missing edge triggered irq.
 2. Reliable method of migrating level triggered irq in the process context.

We plan to look and close these in the near future.

Eric says:
In addition even with the fix from Suresh there is still at least one
nasty hardware race in fixup_irqs().   However we exercise that code
path rarely enough that we are unlikely to hit it in the real world,
and that race seems to have existed since the code was merged.  And a
fix for that is not coming soon as it is an open investigation area
if we can fix irq migration to work outside of irq context or if
we have to rework the requirements imposed by the generic cpu hotplug
and layer on fixup_irqs().  So this may come up again.

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Reported-and-tested-by: Darrick Wong <djwong@us.ibm.com>
Cc: Andi Kleen <ak@suse.de>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agox86_64: set the irq_chip name for lapic
Suresh Siddha [Mon, 25 Jun 2007 22:31:37 +0000 (15:31 -0700)]
x86_64: set the irq_chip name for lapic

set the irq_chip name for lapic.

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Tue, 26 Jun 2007 23:51:23 +0000 (16:51 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm

* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] 4449/1: more entries in arch/arm/boot/.gitignore
  [ARM] 4452/1: Force the literal pool dump before reloc_end
  [ARM] Update show_regs/oops register format
  [ARM] Add support for pause_on_oops and display preempt/smp options

16 years agoMerge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
Linus Torvalds [Tue, 26 Jun 2007 23:50:48 +0000 (16:50 -0700)]
Merge branch 'upstream' of git://ftp.linux-mips.org/upstream-linus

* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  [MIPS] Count timer interrupts correctly.
  [MIPS] SMTC and non-SMTC kernel and modules are incompatible
  [MIPS] EMMA2RH: Disable GEN_RTC, it can't possibly work.
  [MIPS] Remove a duplicated local variable in test_and_clear_bit()
  [MIPS] use compat_siginfo in rt_sigframe_n32
  [MIPS] 20K: Handle WAIT related bugs according to errata information
  [MIPS] AP/SP requires shadow registers, auto enable support.
  [MIPS] Fix pb1500 reg B access
  [MIPS] Alchemy: Fix wrong cast
  [MIPS] remove "support for" from system type entry
  [MIPS] add io_map_base to pci_controller on Cobalt
  [MIPS] __ucmpdi2 arguments are unsigned long long.

16 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
Linus Torvalds [Tue, 26 Jun 2007 23:49:57 +0000 (16:49 -0700)]
Merge branch 'merge' of git://git./linux/kernel/git/paulus/powerpc

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
  [POWERPC] Fix subtle FP state corruption bug in signal return on SMP
  [POWERPC] Fix VDSO gettimeofday() when called with NULL struct timeval
  [POWERPC] Update defconfigs
  [POWERPC] Update g5_defconfig

16 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6
Linus Torvalds [Tue, 26 Jun 2007 23:49:42 +0000 (16:49 -0700)]
Merge /pub/scm/linux/kernel/git/gregkh/usb-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6:
  USB: ftdio_sio: New IPlus device ID
  USB: add new device id to option driver
  USB: fix race leading to use after free in io_edgeport
  USB: usblcd doesn't limit memory consumption during write
  USB: memory leak in iowarrior.c
  USB: ti serial driver sleeps with spinlock held
  USB: g_file_storage: call allow_signal()

16 years ago[IA64] Make SN2 PCI code use ioremap rather than manually mangle the address
Jes Sorensen [Mon, 18 Jun 2007 15:19:05 +0000 (17:19 +0200)]
[IA64] Make SN2 PCI code use ioremap rather than manually mangle the address

This one changes the SN2 specific PCI drivers to use ioremap() for
obtaining the real address to access for the PCI registers instead of
manually calculating them with __IA64_UNCACHED_OFFSET.

The patch should have no real change when running on a normal Linux
kernel, but when running as a paravirtualized it is needed.

Signed-off-by: Jes Sorenson <jes@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
16 years ago[IA64] Force error to surface in nofault code
Russ Anderson [Thu, 14 Jun 2007 21:01:24 +0000 (16:01 -0500)]
[IA64] Force error to surface in nofault code

Montecito behaves slightly differently than previous processors,
resulting in the MCA due to a failed PIO read to sometimes surfacing
outside the nofault code.  Adding an additional or and stop bits
ensures the MCA surfaces in the nofault code.

Signed-off-by: Russ Anderson <rja@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
16 years ago[IA64] change sh_change_coherence oemcall to use nolock
Dean Nelson [Tue, 19 Jun 2007 11:26:17 +0000 (06:26 -0500)]
[IA64] change sh_change_coherence oemcall to use nolock

Change sn_change_coherence's ia64_sal_oemcall to the nolock variety since
PROM does the locking for this function internally.

Signed-off-by: Dean Nelson <dcn@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
16 years ago[IA64] remove duplicate header include line
MUNEDA Takahiro [Wed, 20 Jun 2007 04:00:00 +0000 (13:00 +0900)]
[IA64] remove duplicate header include line

Remove duplicate header include line from arch/ia64/kernel/time.c.

Signed-off-by: MUNEDA Takahiro <muneda.takahiro@jp.fujitsu.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
16 years ago[IA64] Correct unwind validation code
Keith Owens [Tue, 26 Jun 2007 06:25:22 +0000 (16:25 +1000)]
[IA64] Correct unwind validation code

Both rp_loc and pfs_loc can be in the register stack area _or_ they can
be in the memory stack area, the latter occurs when a struct pt_regs is
pushed.  Correct the validation check on these fields to check for both
stack areas.  Not allowing for memory stack locations means no
backtrace past ia64_leave_kernel, or any other code that uses
PT_REGS_UNWIND_INFO.

Signed-off-by: Keith Owens <kaos@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
16 years ago[IA64] is_power_of_2-ia64/mm/hugetlbpage.c
vignesh babu [Thu, 7 Jun 2007 09:57:46 +0000 (15:27 +0530)]
[IA64] is_power_of_2-ia64/mm/hugetlbpage.c

Replacing (n & (n-1)) in the context of power of 2 checks
with is_power_of_2

Signed-off-by: vignesh babu <vignesh.babu@wipro.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
16 years ago[MIPS] Count timer interrupts correctly.
Chris Dearman [Thu, 21 Jun 2007 11:59:58 +0000 (12:59 +0100)]
[MIPS] Count timer interrupts correctly.

Signed-off-by: Chris Dearman <chris@mips.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] SMTC and non-SMTC kernel and modules are incompatible
Ralf Baechle [Wed, 20 Jun 2007 13:25:27 +0000 (14:25 +0100)]
[MIPS] SMTC and non-SMTC kernel and modules are incompatible

So don't allow mixing.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] EMMA2RH: Disable GEN_RTC, it can't possibly work.
Ralf Baechle [Mon, 18 Jun 2007 15:36:11 +0000 (16:36 +0100)]
[MIPS] EMMA2RH: Disable GEN_RTC, it can't possibly work.

Neither rtc_mips_get_time nor rtc_mips_set_time are being initialized by
the EMMA2RH setup code, so genrtc at best was a RTC dummy avoiding a few
error messages but not providing actual functionality.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] Remove a duplicated local variable in test_and_clear_bit()
Atsushi Nemoto [Wed, 13 Jun 2007 15:56:31 +0000 (00:56 +0900)]
[MIPS] Remove a duplicated local variable in test_and_clear_bit()

Fix a sparse warning caused by 2c921d07f8c641e691b0dfd80a5cfe14c60ec489

include2/asm/bitops.h:313:23: warning: symbol 'res' shadows an earlier one
include2/asm/bitops.h:309:16: originally declared here

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] use compat_siginfo in rt_sigframe_n32
Pavel Kiryukhin [Tue, 5 Jun 2007 09:42:20 +0000 (13:42 +0400)]
[MIPS] use compat_siginfo in rt_sigframe_n32

Signed-off-by: Pavel Kiryukhin <vksavl@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] 20K: Handle WAIT related bugs according to errata information
Ralf Baechle [Tue, 12 Jun 2007 12:04:09 +0000 (13:04 +0100)]
[MIPS] 20K: Handle WAIT related bugs according to errata information

We used to avoid the WAIT entirely on the 20K but really only need to do
this on early revs of the 20K.  Without this a 20K was a bit of a
power hog.  Well, in the lower power power hog category ;-)

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] AP/SP requires shadow registers, auto enable support.
Ralf Baechle [Fri, 1 Jun 2007 14:47:46 +0000 (15:47 +0100)]
[MIPS] AP/SP requires shadow registers, auto enable support.

Noticed by Chris Dearman (chris@mips.com).

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] Fix pb1500 reg B access
Yoichi Yuasa [Mon, 28 May 2007 14:26:56 +0000 (23:26 +0900)]
[MIPS] Fix pb1500 reg B access

au_readl() is correct here.

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] Alchemy: Fix wrong cast
Yoichi Yuasa [Mon, 28 May 2007 14:13:50 +0000 (23:13 +0900)]
[MIPS] Alchemy: Fix wrong cast

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] remove "support for" from system type entry
Yoichi Yuasa [Mon, 28 May 2007 13:54:28 +0000 (22:54 +0900)]
[MIPS] remove "support for" from system type entry

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] add io_map_base to pci_controller on Cobalt
Yoichi Yuasa [Mon, 21 May 2007 14:02:34 +0000 (23:02 +0900)]
[MIPS] add io_map_base to pci_controller on Cobalt

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] __ucmpdi2 arguments are unsigned long long.
Ralf Baechle [Tue, 26 Jun 2007 17:37:20 +0000 (19:37 +0200)]
[MIPS] __ucmpdi2 arguments are unsigned long long.

Reported by Eugene Surovegin <ebs@ebshome.net>.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years agoSCTP: lock_sock_nested in sctp_sock_migrate
Zach Brown [Fri, 22 Jun 2007 22:14:46 +0000 (15:14 -0700)]
SCTP: lock_sock_nested in sctp_sock_migrate

sctp_sock_migrate() grabs the socket lock on a newly allocated socket while
holding the socket lock on an old socket.  lockdep worries that this might
be a recursive lock attempt.

 task/3026 is trying to acquire lock:
  (sk_lock-AF_INET){--..}, at: [<ffffffff88105b8c>] sctp_sock_migrate+0x2e3/0x327 [sctp]
 but task is already holding lock:
  (sk_lock-AF_INET){--..}, at: [<ffffffff8810891f>] sctp_accept+0xdf/0x1e3 [sctp]

This patch tells lockdep that this locking is safe by using
lock_sock_nested().

Signed-off-by: Zach Brown <zach.brown@oracle.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
16 years ago[SPARC64]: Need to set state to IDLE during sun4v IRQ enable.
David S. Miller [Tue, 26 Jun 2007 07:13:31 +0000 (00:13 -0700)]
[SPARC64]: Need to set state to IDLE during sun4v IRQ enable.

This fixes hypervisor console interrupts on LDOM guests.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SPARC64]: Fix VIRQ enabling.
David S. Miller [Tue, 26 Jun 2007 07:13:09 +0000 (00:13 -0700)]
[SPARC64]: Fix VIRQ enabling.

We were doing the wrong call to turn them on, and also
when enabling we need to forcefully set the state to IDLE.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SPARC64]: Add irqs to mdesc_node.
David S. Miller [Tue, 26 Jun 2007 07:11:56 +0000 (00:11 -0700)]
[SPARC64]: Add irqs to mdesc_node.

Will be used to store translated LDC rx-ino and tx-ino.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoUSB: ftdio_sio: New IPlus device ID
Luiz Fernando N. Capitulino [Fri, 22 Jun 2007 01:34:23 +0000 (22:34 -0300)]
USB: ftdio_sio: New IPlus device ID

Reported by Grzegorz Chimosz <gchimi@gmail.com>

Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: add new device id to option driver
Alexander Gattin [Tue, 19 Jun 2007 21:48:10 +0000 (00:48 +0300)]
USB: add new device id to option driver

Cc: Matthias Urlichs <smurf@smurf.noris.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: fix race leading to use after free in io_edgeport
Oliver Neukum [Wed, 13 Jun 2007 16:50:41 +0000 (18:50 +0200)]
USB: fix race leading to use after free in io_edgeport

usb_unlink_urb() is asynchronous, therefore an URB's buffer may not
be freed without waiting for the completion handler. This patch switches
to usb_kill_urb(), which is synchronous.
Thanks to Alan for making me look at the remaining users of usb_unlink_urb()

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Al Borchers <alborchers@steinerpoint.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: usblcd doesn't limit memory consumption during write
Oliver Neukum [Mon, 11 Jun 2007 13:36:02 +0000 (15:36 +0200)]
USB: usblcd doesn't limit memory consumption during write

usblcd currently has no way to limit memory consumption by fast writers.
This is a security problem, as it allows users with write access to this
device to drive the system into oom despite resource limits.
Here's the fix taken from the modern skeleton driver.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: memory leak in iowarrior.c
Oliver Neukum [Tue, 12 Jun 2007 13:36:07 +0000 (15:36 +0200)]
USB: memory leak in iowarrior.c

this is a classical memory leak in the ioctl handler. The buffer is simply
never freed. This fixes it the obvious way.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: ti serial driver sleeps with spinlock held
Oliver Neukum [Mon, 7 May 2007 06:33:18 +0000 (08:33 +0200)]
USB: ti serial driver sleeps with spinlock held

you are submitting an URB with GFP_KERNEL holding a spinlock.
In this case the spinlock can be dropped earlier.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Cc: Al Borchers <alborchers@steinerpoint.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: g_file_storage: call allow_signal()
Oleg Nesterov [Wed, 30 May 2007 15:06:33 +0000 (11:06 -0400)]
USB: g_file_storage: call allow_signal()

New changes in the signal-handling code require compensating changes
in g_file_storage.  This patch (as913) by Oleg Nesterov makes the
code use allow_signal() instead of sigprocmask().

From: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[POWERPC] Fix subtle FP state corruption bug in signal return on SMP
Paul Mackerras [Tue, 26 Jun 2007 04:49:11 +0000 (14:49 +1000)]
[POWERPC] Fix subtle FP state corruption bug in signal return on SMP

This fixes a bug which can cause corruption of the floating-point state
on return from a signal handler.  If we have a signal handler that has
used the floating-point registers, and it happens to context-switch to
another task while copying the interrupted floating-point state from the
user stack into the thread struct (e.g. because of a page fault, or
because it gets preempted), the context switch code will think that the
FP registers contain valid FP state that needs to be copied into the
thread_struct, and will thus overwrite the values that the signal return
code has put into the thread_struct.

This can occur because we clear the MSR bits that indicate the presence
of valid FP state after copying the state into the thread_struct.  To fix
this we just move the clearing of the MSR bits to before the copy.  A
similar potential problem also occurs with the Altivec state, and this
fixes that in the same way.

Signed-off-by: Paul Mackerras <paulus@samba.org>