13 years agoMerge git://
Linus Torvalds [Tue, 23 Sep 2008 15:14:14 +0000 (08:14 -0700)]
Merge git://git./linux/kernel/git/davem/sparc-2.6

* git://
  sparc64: Fix missing devices due to PCI bridge test in of_create_pci_dev().
  sparc64: Fix disappearing PCI devices on e3500.

13 years agoMerge git://
Linus Torvalds [Tue, 23 Sep 2008 15:14:04 +0000 (08:14 -0700)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://
  ath9k: Fix IRQ nobody cared issue with ath9k
  wireless: zd1211rw: add device ID fix wifi dongle "trust nw-3100"
  ath9k: connectivity is lost after Group rekeying is done

13 years agoatmel_serial: update the powersave handler to match serial core
Anti Sullin [Mon, 22 Sep 2008 20:57:54 +0000 (13:57 -0700)]
atmel_serial: update the powersave handler to match serial core

This problem seems to be unnoticed so far:;a=commit;h=b3b708fa2780cd2b5d8266a8f0c3a1cab364d4d2

has changed the serial core behavior to not to suspend the port if the
device is enabled as a wakeup source.  If the AT91 system goes to slow
clock mode, the port should be suspended always and the clocks should be
switched off.  The patch attached updates the atmel_serial driver to match
the changes in serial core.

Also, the interrupts are disabled when the clock is disabled.  If we
disable the clock with interrupts enabled, an interrupt may get stuck.  If
this is the DBGU interrupt, this blocks the OR logic at system controller
and thus all other sysc interrupts.

Signed-off-by: Anti Sullin <>
Signed-off-by: Haavard Skinnemoen <>
Cc: Michael Trimarchi <>
Cc: Andrew Victor <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
13 years agomemcg: check under limit at shrink_usage
Daisuke Nishimura [Mon, 22 Sep 2008 20:57:52 +0000 (13:57 -0700)]
memcg: check under limit at shrink_usage

Current memory cgroup(both in mainline and -mm) doesn't account swap
caches as memory(swap cache support is dropped temporarily now).

So try_to_free_mem_cgroup_pages doesn't reflect the count of pages that
have been moved to swap cache.

But this makes mem_cgroup_shrink_usage fail easily if most of the pages
are anon/shmem, and then shmem_getpage returns -ENOMEM and the process
will be killed.

This patch adds res_counter_check_under_limit to avoid these cases.

BTW, even if swap cache support is enabled again, if a process is moved to
another cgroup, which has been just made, between precharge and
shrink_usage in shmem_getpage, shrink_usage may fail just because there is
no pages to reclaim.

So this change would make sense anyway.

Signed-off-by: Daisuke Nishimura <>
Cc: Balbir Singh <>
Cc: Pavel Emelyanov <>
Cc: KAMEZAWA Hiroyuki <>
Cc: Hugh Dickins <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
13 years agoDocumentation/sysctl/kernel.txt: fix softlockup_thresh description
Andrew Morton [Mon, 22 Sep 2008 20:57:51 +0000 (13:57 -0700)]
Documentation/sysctl/kernel.txt: fix softlockup_thresh description

- s/s/seconds/

- s/10 seconds/60 seconds/

- Mention the zero-disables-it feature.

Cc: Ingo Molnar <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
13 years agomm: tiny-shmem fix lock ordering: mmap_sem vs i_mutex
Nick Piggin [Mon, 22 Sep 2008 20:57:50 +0000 (13:57 -0700)]
mm: tiny-shmem fix lock ordering: mmap_sem vs i_mutex

tiny-shmem calls do_truncate in shmem_file_setup.  do_truncate takes
i_mutex, and shmem_file_setup is called with mmap_sem held.  However
i_mutex nests outside mmap_sem.

Copy the code in shmem.c to avoid this problem.

[ coding-style fixes]
Signed-off-by: Nick Piggin <>
Reported-and-tested-by: Ingo Molnar <>
Cc: Peter Zijlstra <>
Cc: Matt Mackall <>
Cc: Hugh Dickins <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
13 years agosys_paccept: disable paccept() until API design is resolved
Michael Kerrisk [Mon, 22 Sep 2008 20:57:49 +0000 (13:57 -0700)]
sys_paccept: disable paccept() until API design is resolved

The reasons for disabling paccept() are as follows:

* The API is more complex than needed.  There is AFAICS no demonstrated
  use case that the sigset argument of this syscall serves that couldn't
  equally be served by the use of pselect/ppoll/epoll_pwait + traditional
  accept().  Roland seems to concur with this opinion
  (  I
  have (more than once) asked Ulrich to explain otherwise
  (, but he
  does not respond, so one is left to assume that he doesn't know of such
  a case.

* The use of a sigset argument is not consistent with other I/O APIs
  that can block on a single file descriptor (e.g., read(), recv(),

* The behavior of paccept() when interrupted by a signal is IMO strange:
  the kernel restarts the system call if SA_RESTART was set for the
  handler.  I think that it should not do this -- that it should behave
  consistently with paccept()/ppoll()/epoll_pwait(), which never restart,
  regardless of SA_RESTART.  The reasoning here is that the very purpose
  of paccept() is to wait for a connection or a signal, and that
  restarting in the latter case is probably never useful.  (Note: Roland
  disagrees on this point, believing that rather paccept() should be
  consistent with accept() in its behavior wrt EINTR

I believe that instead, a simpler API, consistent with Ulrich's other
recent additions, is preferable:

accept4(int fd, struct sockaddr *sa, socklen_t *salen, ind flags);

(This simpler API was originally proposed by Ulrich:

If this simpler API is added, then if we later decide that the sigset
argument really is required, then a suitable bit in 'flags' could be added
to indicate the presence of the sigset argument.

At this point, I am hoping we either will get a counter-argument from
Ulrich about why we really do need paccept()'s sigset argument, or that he
will resubmit the original accept4() patch.

Signed-off-by: Michael Kerrisk <>
Cc: David Miller <>
Cc: Davide Libenzi <>
Cc: Alan Cox <>
Cc: Ulrich Drepper <>
Cc: Jakub Jelinek <>
Cc: Roland McGrath <>
Cc: Oleg Nesterov <>
Cc: Christoph Hellwig <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
13 years agoDocumentation/DMA-mapping.txt: update for pci_dma_mapping_error() changes
Marin Mitov [Mon, 22 Sep 2008 20:57:46 +0000 (13:57 -0700)]
Documentation/DMA-mapping.txt: update for pci_dma_mapping_error() changes

Make the example code consistent with changed API.

Signed-off-by: Marin Mitov <>
Acked-by: FUJITA Tomonori <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
13 years agokexec: fix segmentation fault in kimage_add_entry
Jonathan Steel [Mon, 22 Sep 2008 20:57:45 +0000 (13:57 -0700)]
kexec: fix segmentation fault in kimage_add_entry

A segmentation fault can occur in kimage_add_entry in kexec.c when loading
a kernel image into memory.  The fault occurs because a page is requested
by calling kimage_alloc_page with gfp_mask GFP_KERNEL and the function may
actually return a page with gfp_mask GFP_HIGHUSER.  The high mem page is
returned because it was swapped with the kernel page due to the kernel
page being a page that will shortly be copied to.

This patch ensures that kimage_alloc_page returns a page that was created
with the correct gfp flags.

I have verified the change and fixed the whitespace damage of the original
patch.  Jonathan did a great job of tracking this down after he hit the
problem.  -- Eric

Signed-off-by: Jonathan Steel <>
Signed-off-by: Eric W. Biederman <>
Acked-by: Simon Horman <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
13 years agokernel-doc: allow structs whose members are all private
Randy Dunlap [Mon, 22 Sep 2008 20:57:44 +0000 (13:57 -0700)]
kernel-doc: allow structs whose members are all private

Struct members may be marked as private by using
/* private: */
before them, as noted in Documentation/kernel-doc-nano-HOWTO.txt

Fix kernel-doc to handle structs whose members are all private;
otherwise invalid XML is generated:

xmlto: input does not validate (status 3)
linux-2.6.27-rc6-git4/Documentation/DocBook/debugobjects.xml:146: element variablelist: validity error : Element variablelist content does not follow the DTD, expecting ((title , titleabbrev?)? , varlistentry+), got ()
Document linux-2.6.27-rc6-git4/Documentation/DocBook/debugobjects.xml does not validate
make[1]: *** [Documentation/DocBook/debugobjects.html] Error 3

Signed-off-by: Randy Dunlap <>
Reported-by: Roland McGrath <>
Cc: Roland McGrath <>
Cc: Christoph Hellwig <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
13 years agosmb.h: do not include linux/time.h in userspace
Kirill A. Shutemov [Mon, 22 Sep 2008 20:57:43 +0000 (13:57 -0700)]
smb.h: do not include linux/time.h in userspace

linux/time.h conflicts with time.h from glibc

It breaks building smbmount from samba.  It's regression introduced by
commit 76308da (" smb.h: uses struct timespec but didn't include

Signed-off-by: Kirill A. Shutemov <>
Cc: <> [2.6.26.x]
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
13 years agoibmasr: remove unnecessary spin_unlock()
Akinobu Mita [Mon, 22 Sep 2008 20:57:41 +0000 (13:57 -0700)]
ibmasr: remove unnecessary spin_unlock()

__asr_toggle() is always called with asr_lock held.
But there is unnecessary spin_unlock() call in __asr_toggle().

Signed-off-by: Akinobu Mita <>
Cc: Wim Van Sebroeck <>
Acked-by: Andrey Panin <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
13 years agosparc64: Fix missing devices due to PCI bridge test in of_create_pci_dev().
David S. Miller [Mon, 22 Sep 2008 22:42:24 +0000 (15:42 -0700)]
sparc64: Fix missing devices due to PCI bridge test in of_create_pci_dev().

Just like in the arch/sparc64/kernel/of_device.c code fix commit
071d7f4c3b411beae08d27656e958070c43b78b4 ("sparc64: Fix SMP bootup
with CONFIG_STACK_DEBUG or ftrace.") we have to check the OF device
node name for "pci" instead of relying upon the 'device_type' property
being there on all PCI bridges.

Tested by Meelis Roos, and confirmed to make the PCI QFE devices
reappear on the E3500 system.

Signed-off-by: David S. Miller <>
13 years agoMerge branch 'master' of git://
David S. Miller [Mon, 22 Sep 2008 22:29:05 +0000 (15:29 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6

13 years agoath9k: Fix IRQ nobody cared issue with ath9k
Senthil Balasubramanian [Mon, 22 Sep 2008 08:52:39 +0000 (14:22 +0530)]
ath9k: Fix IRQ nobody cared issue with ath9k

IRQs should be disabled before calling free_irq. Also flush pending
IRQs. Pasted the kernel log message for reference.

kernel: irq 17: nobody cared (try booting with the "irqpoll" option)
kernel:  [<c0252d2c>] __report_bad_irq+0x2e/0x6f
kernel:  [<c0252f22>] note_interrupt+0x1b5/0x207
kernel:  [<c025258b>] ? handle_IRQ_event+0x21/0x48
kernel:  [<c02534cb>] handle_fasteoi_irq+0x8e/0xad
kernel:  [<c0205650>] do_IRQ+0x6c/0x84
kernel:  [<c020425f>] common_interrupt+0x23/0x28
kernel:  [<c034f6f6>] ? acpi_idle_enter_simple+0x198/0x205
kernel:  [<c044686c>] ? menu_select+0x5c/0x78
kernel:  [<c0445a95>] cpuidle_idle_call+0x59/0x89
kernel:  [<c02029d7>] cpu_idle+0xae/0xcf
kernel:  [<c0543102>] rest_init+0x4e/0x50
kernel:  =======================
kernel: handlers:
kernel: [<f88fdd26>] (ath_isr+0x0/0x13a [ath9k])
kernel: Disabling IRQ #17

Signed-off-by: Senthil Balasubramanian <>
Tested-by: Steven Noonan <>
Signed-off-by: John W. Linville <>
13 years agowireless: zd1211rw: add device ID fix wifi dongle "trust nw-3100" [Fri, 19 Sep 2008 23:47:06 +0000 (16:47 -0700)]
wireless: zd1211rw: add device ID fix wifi dongle "trust nw-3100"

akpm: taken from

I bought the wifi dongle trust nw-3100 wich is in fact a zd1211rw.  Its
hardware id was missing in the sources, adding it made it work flawlessly.

Cc: Daniel Drake <>
Cc: Ulrich Kunitz <>
Cc: Johannes Berg <>
Signed-off-by: Andrew Morton <>
Signed-off-by: John W. Linville <>
13 years agoath9k: connectivity is lost after Group rekeying is done
Senthil Balasubramanian [Wed, 17 Sep 2008 07:09:49 +0000 (12:39 +0530)]
ath9k: connectivity is lost after Group rekeying is done

Connectivtiy is lost after Group rekeying is done. The keytype
maintained by ath9k is reset when group key is updated. Though
sc_keytype can be reset only for broadcast key the proper fix
would be to use mac80211 provided key type from txinfo during
xmit and get rid of sc_keytype from ath9k ath_softc.

Signed-off-by: Vasanthakumar Thiagarajan <>
Signed-off-by: Senthil Balasubramanian <>
Tested-by: Steven Noonan <>
Signed-off-by: John W. Linville <>
13 years agoMerge branch 'for-linus' of git://
Linus Torvalds [Mon, 22 Sep 2008 16:09:18 +0000 (09:09 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://
  ALSA: ASoC: Fix at32-pcm build breakage with PM enabled

13 years agopcmcia: Fix broken abuse of dev->driver_data
Alan Cox [Mon, 22 Sep 2008 14:58:14 +0000 (15:58 +0100)]
pcmcia: Fix broken abuse of dev->driver_data

PCMCIA abuses dev->private_data in the probe methods. Unfortunately it
continues to abuse it after calling drv->probe() which leads to crashes and
other nasties (such as bogus probes of multifunction devices) giving errors like

pcmcia: registering new device pcmcia0.1
kernel: 0.1: GetNextTuple: No more items

Extract the passed data before calling the driver probe function that way
we don't blow up when the driver reuses dev->private_data as its right.

As its close to the final release just move the hack so it works out,
hopefully someone will be sufficiently embarrassed to produce a nice rework
for 2.6.28.

Signed-off-by: Alan Cox <>
Signed-off-by: Linus Torvalds <>
13 years agoMerge branch 'for-linus' of git://
Linus Torvalds [Mon, 22 Sep 2008 14:46:06 +0000 (07:46 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/dtor/input

* 'for-linus' of git://
  Input: jornada720_ts - fix build error ( LONG() usage )
  Input: bcm5974 - switch back to normal mode when closing

13 years agoMerge git://
Linus Torvalds [Mon, 22 Sep 2008 14:45:06 +0000 (07:45 -0700)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://
  netdev: simple_tx_hash shouldn't hash inside fragments

13 years agoALSA: ASoC: Fix at32-pcm build breakage with PM enabled
Haavard Skinnemoen [Fri, 19 Sep 2008 16:50:45 +0000 (18:50 +0200)]
ALSA: ASoC: Fix at32-pcm build breakage with PM enabled


Signed-off-by: Haavard Skinnemoen <>
Acked-by: Mark Brown <>
Signed-off-by: Takashi Iwai <>
13 years agoLinux 2.6.27-rc7 v2.6.27-rc7
Linus Torvalds [Sun, 21 Sep 2008 22:29:55 +0000 (15:29 -0700)]
Linux 2.6.27-rc7

13 years agoMerge branch 'hwmon-for-linus' of git://
Linus Torvalds [Sun, 21 Sep 2008 19:41:19 +0000 (12:41 -0700)]
Merge branch 'hwmon-for-linus' of git://

* 'hwmon-for-linus' of git://
  hwmon: (ad7414) Make ad7414_update_device() static
  hwmon: (it87) Fix fan tachometer reading in IT8712F rev 0x7 (I)
  hwmon: (atxp1) Fix device detection logic

13 years agoMerge branch 'kvm-updates/2.6.27' of git://
Linus Torvalds [Sun, 21 Sep 2008 19:40:56 +0000 (12:40 -0700)]
Merge branch 'kvm-updates/2.6.27' of git://git./linux/kernel/git/avi/kvm

* 'kvm-updates/2.6.27' of git://
  KVM: ia64: 'struct fdesc' build fix

13 years agoMerge branch 'upstream' of git://
Linus Torvalds [Sun, 21 Sep 2008 19:40:30 +0000 (12:40 -0700)]
Merge branch 'upstream' of git://

* 'upstream' of git://
  [MIPS] handle .text.*
  [MIPS] Fix potential latency problem due to non-atomic cpu_wait.
  [MIPS] SMTC: Clear TIF_FPUBOUND on clone / fork.
  [MIPS] Fix 64-bit IP checksum code

13 years agoMerge branch 'for-linus' of git://
Linus Torvalds [Sun, 21 Sep 2008 19:38:45 +0000 (12:38 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/drzeus/mmc

* 'for-linus' of git://
  mmc_test: initialize mmc_test_lock statically
  mmc_block: handle error from mmc_register_driver()
  atmel-mci: Set MMC_CAP_NEEDS_POLL if no detect_pin
  atmel-mci: Fix bogus debugfs file size
  atmel-mci: Fix memory leak in atmci_regs_show
  atmel-mci: debugfs: enable clock before dumping regs
  tmio_mmc: fix compilation with debug enabled

13 years agoMAINTAINERS: Various fixes
Jean Delvare [Sat, 20 Sep 2008 10:34:33 +0000 (12:34 +0200)]
MAINTAINERS: Various fixes

* Normalize some S: entries to match the enumeration at the beginning
  of the file.
* Change one mailing list entry from S: to L:.

Signed-off-by: Jean Delvare <>
Signed-off-by: Linus Torvalds <>
13 years agoMAINTAINERS: Trivial whitespace cleanups
Jean Delvare [Sat, 20 Sep 2008 10:33:08 +0000 (12:33 +0200)]
MAINTAINERS: Trivial whitespace cleanups

* Drop trailing whitespace.
* Replace spaces and combinations of spaces and tabs by single tabs.

Signed-off-by: Jean Delvare <>
Signed-off-by: Linus Torvalds <>
13 years ago[MIPS] handle .text.*
Atsushi Nemoto [Tue, 5 Aug 2008 14:45:14 +0000 (23:45 +0900)]
[MIPS] handle .text.*

The -ffunction-sections puts each text in .text.function_name section.
Without this patch, most functions are placed outside _text..._etext
area and it breaks show_stacktrace(), etc.

Signed-off-by: Atsushi Nemoto <>
Signed-off-by: Ralf Baechle <>
13 years ago[MIPS] Fix potential latency problem due to non-atomic cpu_wait.
Atsushi Nemoto [Sun, 11 Nov 2007 17:05:18 +0000 (02:05 +0900)]
[MIPS] Fix potential latency problem due to non-atomic cpu_wait.

If an interrupt happened between checking of NEED_RESCHED and WAIT
instruction, adjust EPC to restart from checking of NEED_RESCHED.

Signed-off-by: Atsushi Nemoto <>
Signed-off-by: Ralf Baechle <>
13 years ago[MIPS] SMTC: Clear TIF_FPUBOUND on clone / fork.
Ralf Baechle [Tue, 9 Sep 2008 13:19:10 +0000 (15:19 +0200)]
[MIPS] SMTC: Clear TIF_FPUBOUND on clone / fork.

Signed-off-by: Ralf Baechle <>
13 years ago[MIPS] Fix 64-bit IP checksum code
Atsushi Nemoto [Sat, 20 Sep 2008 15:20:04 +0000 (17:20 +0200)]
[MIPS] Fix 64-bit IP checksum code

Use unsigned loads to avoid possible misscalculation of IP checksums.  This
bug was instruced in f761106cd728bcf65b7fe161b10221ee00cf7132 (lmo) /
ed99e2bc1dc5dc54eb5a019f4975562dbef20103 (

[Original fix by Atsushi.  Improved instruction scheduling and fix for
unaligned unsigned load by me -- Ralf]

Signed-off-by: Atsushi Nemoto <>
Signed-off-by: Ralf Baechle <>
13 years agonetdev: simple_tx_hash shouldn't hash inside fragments
Alexander Duyck [Sun, 21 Sep 2008 05:05:50 +0000 (22:05 -0700)]
netdev: simple_tx_hash shouldn't hash inside fragments

Currently simple_tx_hash is hashing inside of udp fragments.  As a result
packets are getting getting sent to all queues when they shouldn't be.
This causes a serious performance regression which can be seen by sending
UDP frames larger than mtu on multiqueue devices.  This change will make
it so that fragments are hashed only as IP datagrams w/o any protocol

Signed-off-by: Alexander Duyck <>
Signed-off-by: David S. Miller <>
13 years agosparc64: Fix disappearing PCI devices on e3500.
David S. Miller [Sun, 21 Sep 2008 05:00:40 +0000 (22:00 -0700)]
sparc64: Fix disappearing PCI devices on e3500.

Based upon a bug report by Meelis Roos.

The OF device layer builds properties by matching bus types and
applying 'range' properties as appropriate, up to the root.

The match for "PCI" busses is looking at the 'device_type' property,
and this does work %99 of the time.

But on an E3500 system with a PCI QFE card, the DEC 21153 bridge
sitting above the QFE network interface devices has a 'name' of "pci",
but it completely lacks a 'device_type' property.  So we don't match
it as a PCI bus, and subsequently we end up with no resource values at
all for the devices sitting under that DEC bridge.

Signed-off-by: David S. Miller <>
13 years agommc_test: initialize mmc_test_lock statically
Akinobu Mita [Sat, 13 Sep 2008 10:03:32 +0000 (19:03 +0900)]
mmc_test: initialize mmc_test_lock statically

The mutex mmc_test_lock is initialized at every time mmc_test device
is probed. Probing another mmc_test device may break the mutex, if
the probe function is called while the mutex is locked.

This patch fixes it by statically initializing mmc_test_lock.

Signed-off-by: Akinobu Mita <>
Signed-off-by: Pierre Ossman <>
13 years agommc_block: handle error from mmc_register_driver()
Akinobu Mita [Sat, 13 Sep 2008 10:02:07 +0000 (19:02 +0900)]
mmc_block: handle error from mmc_register_driver()

Check error from mmc_register_driver() and properly unwind
block device registration.

Signed-off-by: Akinobu Mita <>
Signed-off-by: Pierre Ossman <>
13 years agoatmel-mci: Set MMC_CAP_NEEDS_POLL if no detect_pin
Haavard Skinnemoen [Fri, 19 Sep 2008 19:09:30 +0000 (21:09 +0200)]
atmel-mci: Set MMC_CAP_NEEDS_POLL if no detect_pin

This allows the mmc core to detect card insertion/removal for slots that
don't have any CD pin wired up.

Signed-off-by: Haavard Skinnemoen <>
Signed-off-by: Pierre Ossman <>
13 years agoatmel-mci: Fix bogus debugfs file size
Haavard Skinnemoen [Fri, 19 Sep 2008 19:09:29 +0000 (21:09 +0200)]
atmel-mci: Fix bogus debugfs file size

We used to store a binary register snapshot in the "regs" file, so we
set the file size to be the size of this snapshot. This is no longer
valid since we switched to using seq_file.

Signed-off-by: Haavard Skinnemoen <>
Signed-off-by: Pierre Ossman <>
13 years agoatmel-mci: Fix memory leak in atmci_regs_show
Haavard Skinnemoen [Fri, 19 Sep 2008 19:09:28 +0000 (21:09 +0200)]
atmel-mci: Fix memory leak in atmci_regs_show

The debugfs hook atmci_regs_show allocates a temporary buffer for
storing a register snapshot, but it doesn't free it before returning.
Plug this leak.

Signed-off-by: Haavard Skinnemoen <>
Signed-off-by: Pierre Ossman <>
13 years agoatmel-mci: debugfs: enable clock before dumping regs
Haavard Skinnemoen [Fri, 19 Sep 2008 19:09:27 +0000 (21:09 +0200)]
atmel-mci: debugfs: enable clock before dumping regs

Make sure that the peripheral clock is enabled before reading the MMIO
registers for the debugfs "regs" dump.

Signed-off-by: Haavard Skinnemoen <>
Signed-off-by: Pierre Ossman <>
13 years agotmio_mmc: fix compilation with debug enabled
Dmitry Baryshkov [Wed, 3 Sep 2008 15:33:30 +0000 (19:33 +0400)]
tmio_mmc: fix compilation with debug enabled

Signed-off-by: Dmitry Baryshkov <>
Acked-by: Ian Molton <>
Signed-off-by: Pierre Ossman <>
13 years agohwmon: (ad7414) Make ad7414_update_device() static
Adrian Bunk [Sat, 20 Sep 2008 08:25:20 +0000 (10:25 +0200)]
hwmon: (ad7414) Make ad7414_update_device() static

This patch makes the needlessly global ad7414_update_device() static.

Signed-off-by: Adrian Bunk <>
Acked-by: Sean MacLennan <>
Signed-off-by: Jean Delvare <>
13 years agohwmon: (it87) Fix fan tachometer reading in IT8712F rev 0x7 (I)
Andrew Paprocki [Sat, 20 Sep 2008 08:25:19 +0000 (10:25 +0200)]
hwmon: (it87) Fix fan tachometer reading in IT8712F rev 0x7 (I)

The IT8712F v0.9.1 datasheet applies to revisions >= 0x8 (J).
The driver was incorrectly attempting to enable 16-bit fan
readings on rev 0x7 (I) which led to incorrect RPM values.

Signed-off-by: Andrew Paprocki <>
Tested-by: John Gumb <>
Signed-off-by: Jean Delvare <>
13 years agohwmon: (atxp1) Fix device detection logic
Jean Delvare [Sat, 20 Sep 2008 08:25:19 +0000 (10:25 +0200)]
hwmon: (atxp1) Fix device detection logic

The atxp1 device detection code has a major logic flaw, fix it. Not
sure how we managed to miss this when the driver was merged...

Signed-off-by: Jean Delvare <>
Acked-by: Sebastian Witt <>
13 years agoKVM: ia64: 'struct fdesc' build fix
Jes Sorensen [Fri, 12 Sep 2008 12:12:08 +0000 (14:12 +0200)]
KVM: ia64: 'struct fdesc' build fix

Commit 4611a77 ("[IA64] fix compile failure with non modular builds")
introduced struct fdesc into asm/elf.h, which duplicates KVM's definition.
Remove the latter to avoid the build error.

Signed-off-by: Jes Sorensen <>
Acked-by: Tony Luck <>
Signed-off-by: Avi Kivity <>
13 years agoMerge branch 'for-linus' of git://
Linus Torvalds [Fri, 19 Sep 2008 23:24:03 +0000 (16:24 -0700)]
Merge branch 'for-linus' of git://

* 'for-linus' of git://
  [S390] cio: fix orb initialization in cio_start_key
  [S390] cio: Fix driver_data handling for ccwgroup devices.

13 years agoMerge git://
Linus Torvalds [Fri, 19 Sep 2008 23:21:59 +0000 (16:21 -0700)]
Merge git://

* git://
  [XFS] Don't do I/O beyond eof when unreserving space
  [XFS] Fix use-after-free with buffers
  [XFS] Prevent lockdep false positives when locking two inodes.
  [XFS] Fix barrier status change detection.
  [XFS] Prevent direct I/O from mapping extents beyond eof
  [XFS] Fix regression introduced by remount fixup
  [XFS] Move memory allocations for log tracing out of the critical path

13 years agoMerge branch 'for-linus' of git://
Linus Torvalds [Fri, 19 Sep 2008 23:18:21 +0000 (16:18 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/roland/infiniband

* 'for-linus' of git://
  IPoIB: Fix deadlock on RTNL between bcast join comp and ipoib_stop()
  RDMA/nes: Fix client side QP destroy
  IB/mlx4: Fix up fast register page list format
  mlx4_core: Set RAE and init mtt_sz field in FRMR MPT entries

13 years agoMerge branch 'sched-fixes-for-linus' of git://
Linus Torvalds [Fri, 19 Sep 2008 23:17:12 +0000 (16:17 -0700)]
Merge branch 'sched-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'sched-fixes-for-linus' of git://
  sched: fix deadlock in setting scheduler parameter to zero
  sched: fix 2.6.27-rc5 couldn't boot on tulsa machine randomly

13 years agoMerge branch 'timers-fixes-for-linus' of git://
Linus Torvalds [Fri, 19 Sep 2008 23:16:50 +0000 (16:16 -0700)]
Merge branch 'timers-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'timers-fixes-for-linus' of git://
  clockevents: make device shutdown robust
  clocksource, acpi_pm.c: fix check for monotonicity
  clockevents: remove WARN_ON which was used to gather information

13 years agoMerge branch 'x86-fixes-for-linus' of git://
Linus Torvalds [Fri, 19 Sep 2008 23:11:09 +0000 (16:11 -0700)]
Merge branch 'x86-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'x86-fixes-for-linus' of git://
  x86: completely disable NOPL on 32 bits
  x86/paravirt: Remove duplicate paravirt_pagetable_setup_{start, done}()
  xen: fix for xen guest with mem > 3.7G
  x86: fix possible x86_64 and EFI regression
  arch/x86/kernel/kdebugfs.c: introduce missing kfree

13 years agoMerge branch 'merge' of git://
Linus Torvalds [Fri, 19 Sep 2008 23:05:05 +0000 (16:05 -0700)]
Merge branch 'merge' of git://git./linux/kernel/git/paulus/powerpc

* 'merge' of git://
  Fix compile failure with non modular builds
  powerpc: Holly board needs dtbImage target
  powerpc: Fix interrupt values for DMA2 in MPC8610 HPCD device tree

13 years agoMerge
Linus Torvalds [Fri, 19 Sep 2008 23:04:42 +0000 (16:04 -0700)]

  [ARM] 5255/1: Update jornada ssp to remove build errors/warnings
  [ARM] omap: back out 'internal_clock' support
  [ARM] 5249/1: davinci: remove redundant check in davinci_psc_config()

13 years agoMerge branch 'master' of git://
Linus Torvalds [Fri, 19 Sep 2008 23:03:38 +0000 (16:03 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/hskinnemoen/avr32-2.6

* 'master' of git://
  avr32: nmi_enter() without nmi_exit()
  avr32: fix sys_sync_file_range() call convention
  avr32: add generic_find_next_le_bit bit function
  avr32: add .gitignore files
  atstk1000: fix build breakage with BOARD_ATSTK100X_SW2_CUSTOM=y

13 years agoMerge branch 'for-linus' of git://
Linus Torvalds [Fri, 19 Sep 2008 23:02:52 +0000 (16:02 -0700)]
Merge branch 'for-linus' of git://

* 'for-linus' of git://
  md: Don't wait UNINTERRUPTIBLE for other resync to finish

13 years agoMerge git://
Linus Torvalds [Fri, 19 Sep 2008 23:02:05 +0000 (16:02 -0700)]
Merge git://git./linux/kernel/git/davem/sparc-2.6

* git://
  sparc64: Fix SMP bootup with CONFIG_STACK_DEBUG or ftrace.
  sparc64: Fix OOPS in psycho_pcierr_intr_other().

13 years agoMerge git://
Linus Torvalds [Fri, 19 Sep 2008 23:01:37 +0000 (16:01 -0700)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://
  e100: Use pci_pme_active to clear PME_Status and disable PME#
  e1000: prevent corruption of EEPROM/NVM
  forcedeth: call restore mac addr in nv_shutdown path
  bnx2: Promote vector field in bnx2_irq structure from u16 to unsigned int
  sctp: Fix oops when INIT-ACK indicates that peer doesn't support AUTH
  sctp: do not enable peer features if we can't do them.
  sctp: set the skb->ip_summed correctly when sending over loopback.
  udp: Fix rcv socket locking

13 years agoavr32: nmi_enter() without nmi_exit()
Manfred Spraul [Wed, 20 Aug 2008 13:39:59 +0000 (15:39 +0200)]
avr32: nmi_enter() without nmi_exit()

While updating the rcu code, I noticed that do_nmi() for AVR32 is odd:
There is an nmi_enter() call without an nmi_exit().
This can't be correct, it breaks rcu (at least the preempt version) and

[ fixed another case that returned directly]
Signed-off-by: Haavard Skinnemoen <>
13 years agoavr32: fix sys_sync_file_range() call convention
Hans-Christian Egtvedt [Wed, 17 Sep 2008 11:39:45 +0000 (13:39 +0200)]
avr32: fix sys_sync_file_range() call convention

On AVR32, all parameters beyond the 5th are passed on the stack. System
calls don't use the stack -- they borrow a callee-saved register
instead. This means that syscalls that take 6 parameters must be called
through a stub that pushes the last parameter on the stack.

This patch adds a stub for sync_file_range syscall on AVR32
architecture.  Tested with uClibc snapshot.

Signed-off-by: Hans-Christian Egtvedt <>
Signed-off-by: Haavard Skinnemoen <>
13 years agoavr32: add generic_find_next_le_bit bit function
Hans-Christian Egtvedt [Wed, 10 Sep 2008 13:52:04 +0000 (15:52 +0200)]
avr32: add generic_find_next_le_bit bit function

This patch implements the generic_find_next_le_bit bit function for AVR32
architecture. This is used by EXT4 file system.

Signed-off-by: Hans-Christian Egtvedt <>
Signed-off-by: Haavard Skinnemoen <>
13 years agoavr32: add .gitignore files
Markus Heidelberg [Sun, 7 Sep 2008 22:22:45 +0000 (00:22 +0200)]
avr32: add .gitignore files

Ignore Kernel binaries, kernel/ and a log file.

Signed-off-by: Markus Heidelberg <>
Signed-off-by: Haavard Skinnemoen <>
13 years agoatstk1000: fix build breakage with BOARD_ATSTK100X_SW2_CUSTOM=y
Haavard Skinnemoen [Fri, 19 Sep 2008 15:56:54 +0000 (17:56 +0200)]
atstk1000: fix build breakage with BOARD_ATSTK100X_SW2_CUSTOM=y

The #ifdef surrounding the code adding the mmc controller had a typo,
causing it to be compiled even when mmc was supposed to be disabled.

Signed-off-by: Haavard Skinnemoen <>
13 years agomd: Don't wait UNINTERRUPTIBLE for other resync to finish
NeilBrown [Fri, 19 Sep 2008 01:49:54 +0000 (11:49 +1000)]
md: Don't wait UNINTERRUPTIBLE for other resync to finish

When two md arrays share some block device (e.g each uses different
partitions on the one device), a resync of one array will wait for
the resync on the other to finish.

This can be a long time and as it currently waits TASK_UNINTERRUPTIBLE,
the softlockup code notices and complains.

So use TASK_INTERRUPTIBLE instead and make sure to flush signals
before calling schedule.

Signed-off-by: NeilBrown <>
13 years agoe100: Use pci_pme_active to clear PME_Status and disable PME#
Rafael J. Wysocki [Thu, 7 Aug 2008 22:18:04 +0000 (00:18 +0200)]
e100: Use pci_pme_active to clear PME_Status and disable PME#

Currently e100 uses pci_enable_wake() to clear pending wake-up events
and disable PME# during intitialization, but that function is not
suitable for this purpose, because it immediately returns error code
if device_may_wakeup() returns false for given device.

Make e100 use pci_pme_active(), which carries out exactly the
required operations, instead.

Signed-off-by: Rafael J. Wysocki <>
Signed-off-by: Jeff Garzik <>
13 years agoe1000: prevent corruption of EEPROM/NVM
Christopher Li [Fri, 5 Sep 2008 21:04:05 +0000 (14:04 -0700)]
e1000: prevent corruption of EEPROM/NVM

Andrey reports e1000 corruption, and that a patch in vmware's ESX fixed

The EEPROM corruption is triggered by concurrent access of the EEPROM
read/write. Putting a lock around it solve the problem.

[ use DEFINE_SPINLOCK to avoid confusing lockdep]
Signed-off-by: Christopher Li <>
Reported-by: Andrey Borzenkov <>
Cc: Zach Amsden <>
Cc: Pratap Subrahmanyam <>
Cc: Jeff Kirsher <>
Cc: Jesse Brandeburg <>
Cc: Bruce Allan <>
Cc: PJ Waskiewicz <>
Cc: John Ronciak <>
Cc: Jeff Garzik <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Jeff Garzik <>
13 years agoforcedeth: call restore mac addr in nv_shutdown path
Yinghai Lu [Sat, 13 Sep 2008 20:10:31 +0000 (13:10 -0700)]
forcedeth: call restore mac addr in nv_shutdown path


| commit f735a2a1a4f2a0f5cd823ce323e82675990469e2
| Author: Tobias Diedrich <>
| Date:   Sun May 18 15:02:37 2008 +0200
|    [netdrvr] forcedeth: setup wake-on-lan before shutting down
|    When hibernating in 'shutdown' mode, after saving the image the suspend hook
|    is not called again.
|    However, if the device is in promiscous mode, wake-on-lan will not work.
|    This adds a shutdown hook to setup wake-on-lan before the final shutdown.
|    Signed-off-by: Tobias Diedrich <>
|    Signed-off-by: Jeff Garzik <>

my servers with nvidia ck804 and mcp55 will reverse mac address with kexec.

it turns out that we need to restore the mac addr in nv_shutdown().

[ fix typo in printk]
Signed-off-by: Yinghai Lu <>
Cc: Tobias Diedrich <>
Cc: Ayaz Abdulla <>
Cc: Jeff Garzik <>
Cc: "Rafael J. Wysocki" <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Jeff Garzik <>
13 years agobnx2: Promote vector field in bnx2_irq structure from u16 to unsigned int
Benjamin Li [Thu, 18 Sep 2008 23:46:11 +0000 (16:46 -0700)]
bnx2: Promote vector field in bnx2_irq structure from u16 to unsigned int

The bnx2 driver stores/uses the irq value from the pci_dev internally.
But when it stores the irq value, it has been performing an
integer demotion.  Because of the recent changes made to
arch/x86/kernel/io_apic.c, the new method in creating the irq value
(using build_irq_for_pci_dev()) has exposed this bug on x86 systems.

Because of this demotion when calling request_irq() from
bnx2_request_irq(), the driver would get a return code of -EINVAL.
This is because the kernel could not find the requested irq descriptor.
By storing the irq value properly, the kernel can find the correct
irq descriptor and the bnx2 driver can operate normally.

Signed-off-by: Benjamin Li <>
Signed-off-by: Michael Chan <>
Signed-off-by: David S. Miller <>
13 years agosctp: Fix oops when INIT-ACK indicates that peer doesn't support AUTH
Vlad Yasevich [Thu, 18 Sep 2008 23:28:27 +0000 (16:28 -0700)]
sctp: Fix oops when INIT-ACK indicates that peer doesn't support AUTH

If INIT-ACK is received with SupportedExtensions parameter which
indicates that the peer does not support AUTH, the packet will be
silently ignore, and sctp_process_init() do cleanup all of the
transports in the association.
When T1-Init timer is expires, OOPS happen while we try to choose
a different init transport.

The solution is to only clean up the non-active transports, i.e
the ones that the peer added.  However, that introduces a problem
with sctp_connectx(), because we don't mark the proper state for
the transports provided by the user.  So, we'll simply mark
user-provided transports as ACTIVE.  That will allow INIT
retransmissions to work properly in the sctp_connectx() context
and prevent the crash.

Signed-off-by: Vlad Yasevich <>
Signed-off-by: David S. Miller <>
13 years agosctp: do not enable peer features if we can't do them.
Vlad Yasevich [Thu, 18 Sep 2008 23:27:38 +0000 (16:27 -0700)]
sctp: do not enable peer features if we can't do them.

Do not enable peer features like addip and auth, if they
are administratively disabled localy.  If the peer resports
that he supports something that we don't, neither end can
use it so enabling it is pointless.  This solves a problem
when talking to a peer that has auth and addip enabled while
we do not.  Found by Andrei Pelinescu-Onciul <>.

Signed-off-by: Vlad Yasevich <>
Signed-off-by: David S. Miller <>
13 years ago[ARM] 5255/1: Update jornada ssp to remove build errors/warnings
Kristoffer Ericson [Thu, 18 Sep 2008 11:19:39 +0000 (12:19 +0100)]
[ARM] 5255/1: Update jornada ssp to remove build errors/warnings

* Adds ssp functions into header so we don't get
"implicit declaration" error at builtime.
* Converts jornada_ssp_start/end functions into voids with
proper declarations (to avoid "prototype..." warning).
* Sorts include files in alphabetical order
* Minor comment changes

Signed-off-by: Kristoffer Ericson <>
Signed-off-by: Russell King <>
13 years agosctp: set the skb->ip_summed correctly when sending over loopback.
Vlad Yasevich [Thu, 18 Sep 2008 09:48:25 +0000 (02:48 -0700)]
sctp: set the skb->ip_summed correctly when sending over loopback.

Loopback used to clobber the ip_summed filed which sctp then used
to figure out if it needed to do checksumming or not.  Now that
loopback doesn't do that any more, sctp needs to set the ip_summed
field correctly.

Signed-off-by: Vlad Yasevich <>
Signed-off-by: David S. Miller <>
13 years ago[ARM] omap: back out 'internal_clock' support
Russell King [Wed, 17 Sep 2008 19:58:11 +0000 (20:58 +0100)]
[ARM] omap: back out 'internal_clock' support

The structures weren't ready for this change:

arch/arm/plat-omap/devices.c:320: error: 'struct omap_mmc_conf' has no member named 'internal_clock'
arch/arm/plat-omap/devices.c:326: error: implicit declaration of function 'omap_ctrl_readl'
arch/arm/plat-omap/devices.c:326: error: 'OMAP2_CONTROL_DEVCONF0' undeclared (first use in this function)
arch/arm/plat-omap/devices.c:328: error: implicit declaration of function 'omap_ctrl_writel'

Signed-off-by: Russell King <>
13 years ago[ARM] 5249/1: davinci: remove redundant check in davinci_psc_config()
roelkluin [Mon, 15 Sep 2008 19:56:44 +0000 (20:56 +0100)]
[ARM] 5249/1: davinci: remove redundant check in davinci_psc_config()

id is unsigned, check is redundant.

Signed-off-by: Roel Kluin <>
Signed-off-by: Russell King <>
13 years agoFix compile failure with non modular builds
James Bottomley [Tue, 9 Sep 2008 14:04:18 +0000 (14:04 +0000)]
Fix compile failure with non modular builds

Commit deac93df26b20cf8438339b5935b5f5643bc30c9 ("lib: Correct printk
%pF to work on all architectures") broke the non modular builds by
moving an essential function into modules.c.  Fix this by moving it
out again and into asm/sections.h as an inline.  To do this, the
definition of struct ppc64_opd_entry has been lifted out of modules.c
and put in asm/elf.h where it belongs.

Signed-off-by: James Bottomley <>
Signed-off-by: Paul Mackerras <>
13 years agopowerpc: Holly board needs dtbImage target
Josh Boyer [Tue, 9 Sep 2008 04:00:28 +0000 (04:00 +0000)]
powerpc: Holly board needs dtbImage target

One of the changes in the bootwrapper makefile introduced the dtbImage
targets for boards that need a simple zImage with a DTB embedded in
them (595be948cce574ff2d5dde5d0426a636a4363c70, "[POWERPC]
bootwrapper: Build multiple cuImages").  When this was done, it broke
booting on the Holly board as the zImage.holly wrapper did not get the
DTB embedded properly.

This changes the target for the Holly board to a dtbImage so that the
wrapper includes the vmlinux, wrapper bits, and DTB.

Signed-off-by: Josh Boyer <>
Signed-off-by: Paul Mackerras <>
13 years ago[XFS] Don't do I/O beyond eof when unreserving space
Lachlan McIlroy [Wed, 17 Sep 2008 06:52:50 +0000 (16:52 +1000)]
[XFS] Don't do I/O beyond eof when unreserving space

When unreserving space with boundaries that are not block aligned we round
up the start and round down the end boundaries and then use this function,
xfs_zero_remaining_bytes(), to zero the parts of the blocks that got
dropped during the rounding. The problem is we don't consider if these
blocks are beyond eof. Worse still is if we encounter delayed allocations
beyond eof we will try to use the magic delayed allocation block number as
a real block number. If the file size is ever extended to expose these
blocks then we'll go through xfs_zero_eof() to zero them anyway.

SGI-PV: 983683

SGI-Modid: xfs-linux-melb:xfs-kern:32055a

Signed-off-by: Lachlan McIlroy <>
Signed-off-by: Christoph Hellwig <>
13 years ago[XFS] Fix use-after-free with buffers
Lachlan McIlroy [Wed, 17 Sep 2008 06:52:13 +0000 (16:52 +1000)]
[XFS] Fix use-after-free with buffers

We have a use-after-free issue where log completions access buffers via
the buffer log item and the buffer has already been freed. Fix this by
taking a reference on the buffer when attaching the buffer log item and
release the hold when the buffer log item is detached and we no longer
need the buffer. Also create a new function xfs_buf_item_free() to combine
some common code.

SGI-PV: 985757

SGI-Modid: xfs-linux-melb:xfs-kern:32025a

Signed-off-by: Lachlan McIlroy <>
Signed-off-by: Christoph Hellwig <>
13 years ago[XFS] Prevent lockdep false positives when locking two inodes.
David Chinner [Wed, 17 Sep 2008 06:51:21 +0000 (16:51 +1000)]
[XFS] Prevent lockdep false positives when locking two inodes.

If we call xfs_lock_two_inodes() to grab both the iolock and the ilock,
then drop the ilocks on both inodes, then grab them again (as
xfs_swap_extents() does) then lockdep will report a locking order problem.
This is a false positive.

To avoid this, disallow xfs_lock_two_inodes() fom locking both inode locks
at once - force calers to make two separate calls. This means that nested
dropping and regaining of the ilocks will retain the same lockdep subclass
and so lockdep will not see anything wrong with this code.

SGI-PV: 986238

SGI-Modid: xfs-linux-melb:xfs-kern:31999a

Signed-off-by: David Chinner <>
Signed-off-by: Christoph Hellwig <>
Signed-off-by: Peter Leckie <>
Signed-off-by: Lachlan McIlroy <>
13 years ago[XFS] Fix barrier status change detection.
David Chinner [Wed, 17 Sep 2008 06:50:50 +0000 (16:50 +1000)]
[XFS] Fix barrier status change detection.

The current code in xlog_iodone() uses the wrong macro to check if the
barrier has been cleared due to an EOPNOTSUPP error form the lower layer.

SGI-PV: 986143

SGI-Modid: xfs-linux-melb:xfs-kern:31984a

Signed-off-by: David Chinner <>
Signed-off-by: Nathaniel W. Turner <>
Signed-off-by: Peter Leckie <>
Signed-off-by: Lachlan McIlroy <>
13 years ago[XFS] Prevent direct I/O from mapping extents beyond eof
Lachlan McIlroy [Wed, 17 Sep 2008 06:50:14 +0000 (16:50 +1000)]
[XFS] Prevent direct I/O from mapping extents beyond eof

With the help from some tracing I found that we try to map extents beyond
eof when doing a direct I/O read. It appears that the way to inform the
generic direct I/O path (ie do_direct_IO()) that we have breached eof is
to return an unmapped buffer from xfs_get_blocks_direct(). This will cause
do_direct_IO() to jump to the hole handling code where is will check for
eof and then abort.

This problem was found because a direct I/O read was trying to map beyond
eof and was encountering delayed allocations. The delayed allocations
beyond eof are speculative allocations and they didn't get converted when
the direct I/O flushed the file because there was only enough space in the
current AG to convert and write out the dirty pages within eof. Note that
xfs_iomap_write_allocate() wont necessarily convert all the delayed
allocation passed to it - it will return after allocating the first extent
- so if the delayed allocation extends beyond eof then it will stay that

SGI-PV: 983683

SGI-Modid: xfs-linux-melb:xfs-kern:31929a

Signed-off-by: Lachlan McIlroy <>
Signed-off-by: Christoph Hellwig <>
13 years ago[XFS] Fix regression introduced by remount fixup
Christoph Hellwig [Wed, 17 Sep 2008 06:49:33 +0000 (16:49 +1000)]
[XFS] Fix regression introduced by remount fixup

Logically we would return an error in xfs_fs_remount code to prevent users
from believing they might have changed mount options using remount which
can't be changed.

But unfortunately mount(8) adds all options from mtab and fstab to the
mount arguments in some cases so we can't blindly reject options, but have
to check for each specified option if it actually differs from the
currently set option and only reject it if that's the case.

Until that is implemented we return success for every remount request, and
silently ignore all options that we can't actually change.

SGI-PV: 985710

SGI-Modid: xfs-linux-melb:xfs-kern:31908a

Signed-off-by: Christoph Hellwig <>
Signed-off-by: Tim Shimmin <>
Signed-off-by: Lachlan McIlroy <>
13 years ago[XFS] Move memory allocations for log tracing out of the critical path
Lachlan McIlroy [Wed, 17 Sep 2008 06:45:37 +0000 (16:45 +1000)]
[XFS] Move memory allocations for log tracing out of the critical path

Memory allocations for log->l_grant_trace and iclog->ic_trace are done on
demand when the first event is logged. In xlog_state_get_iclog_space() we
call xlog_trace_iclog() under a spinlock and allocating memory here can
cause us to sleep with a spinlock held and deadlock the system.

For the log grant tracing we use KM_NOSLEEP but that means we can lose
trace entries. Since there is no locking to serialize the log grant
tracing we could race and have multiple allocations and leak memory.

So move the allocations to where we initialize the log/iclog structures.
Use KM_NOFS to avoid recursing into the filesystem and drop log->l_trace
since it's not even used.

SGI-PV: 983738

SGI-Modid: xfs-linux-melb:xfs-kern:31896a

Signed-off-by: Lachlan McIlroy <>
Signed-off-by: Christoph Hellwig <>
13 years agowarn: Turn the netdev timeout WARN_ON() into a WARN()
Arjan van de Ven [Mon, 15 Sep 2008 23:43:18 +0000 (16:43 -0700)]
warn: Turn the netdev timeout WARN_ON() into a WARN()

this patch turns the netdev timeout WARN_ON_ONCE() into a WARN_ONCE(),
so that the device and driver names are inside the warning message.
This helps automated tools like to collect the data
and do statistics, as well as making it more likely that humans
cut-n-paste the important message as part of a bugreport.

Signed-off-by: Arjan van de Ven <>
Signed-off-by: Linus Torvalds <>
13 years agoMerge branch 'for-linus' of git://
Linus Torvalds [Wed, 17 Sep 2008 02:36:06 +0000 (19:36 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/penberg/slab-2.6

* 'for-linus' of git://
  slub: fixed uninitialized counter in struct kmem_cache_node

13 years agoMerge branch 'upstream' of git://
Linus Torvalds [Wed, 17 Sep 2008 02:35:49 +0000 (19:35 -0700)]
Merge branch 'upstream' of git://

* 'upstream' of git://
  [MIPS] VR41xx: unsigned irq cannot be negative

13 years agoFix PNP build failure, bugzilla #11276
David Miller [Tue, 16 Sep 2008 22:00:11 +0000 (15:00 -0700)]
Fix PNP build failure, bugzilla #11276

This fill fix the following regression list entry:

Bug-Entry :
Subject : build error: CONFIG_OPTIMIZE_INLINING=y causes gcc 4.2 to do stupid things
Submitter : Randy Dunlap <>
Date : 2008-08-06 17:18 (38 days old)
References :
Handled-By : Bjorn Helgaas <>
Patch :

with what I believe is a better fix than the one referenced
in the regression entry above.

These PNP header interfaces try to work in such a way that
you can reference some of them even if PNP is not enabled,
and the compiler was expected to optimize everything away.

Which is mostly fine, except that there was one interface
for which there was not provided an inline "NOP" implementation.

Once we add that, all of these compile failures cannot handle
any more.

pnp: Provide NOP inline implementation of pnp_get_resource() when !PNP

Fixes kernel bugzilla #11276.

Signed-off-by: David S. Miller <>
Signed-off-by: Linus Torvalds <>
13 years agohpplus: fix build regression
Stephen Hemminger [Tue, 16 Sep 2008 23:04:12 +0000 (16:04 -0700)]
hpplus: fix build regression

This fixes kernel regression for 2.6.27-rc in
The change to split 8390 into old isa and non-isa versions
overlooked this driver.

Signed-off-by: Stephen Hemminger <>
Signed-off-by: Linus Torvalds <>
13 years agoRevert "b43/b43legacy: add RFKILL_STATE_HARD_BLOCKED support"
Linus Torvalds [Wed, 17 Sep 2008 02:32:30 +0000 (19:32 -0700)]
Revert "b43/b43legacy: add RFKILL_STATE_HARD_BLOCKED support"

This reverts commit bc19d6e0b74ef03a3baf035412c95192b54dfc6f, which as
Larry Finger reports causes the radio LED on his system to no longer
respond to rfkill switch events.

Reported-by: Larry Finger <>
Requested-by: John W. Linville <>
Signed-off-by: Linus Torvalds <>
13 years agopowerpc: Fix interrupt values for DMA2 in MPC8610 HPCD device tree
Timur Tabi [Tue, 9 Sep 2008 19:43:39 +0000 (14:43 -0500)]
powerpc: Fix interrupt values for DMA2 in MPC8610 HPCD device tree

For Freescale 8xxx devices that use an MPIC, the interrupt numbers in
the device tree must be 16 greater than the values documented in the
reference manual.  In these chips, the MPIC is wired to use the first
16 numbers for external interrupts, but the documentation numbers
internal interrupts from 0.

In the MPC8610 HPCD device tree, the interrupt properties for the DMA
channels for DMA2 were not the adjusted values.  This fixes that.

Signed-off-by: Timur Tabi <>
Signed-off-by: Kumar Gala <>
Signed-off-by: Paul Mackerras <>
13 years agoclockevents: make device shutdown robust
Thomas Gleixner [Tue, 16 Sep 2008 18:32:50 +0000 (11:32 -0700)]
clockevents: make device shutdown robust

The device shut down does not cleanup the next_event variable of the
clock event device. So when the device is reactivated the possible
stale next_event value can prevent the device to be reprogrammed as it
claims to wait on a event already.

This is the root cause of the resurfacing suspend/resume problem,
where systems need key press to come back to life.

Fix this by setting next_event to KTIME_MAX when the device is shut
down. Use a separate function for shutdown which takes care of that
and only keep the direct set mode call in the broadcast code, where we
can not touch the next_event value.

Signed-off-by: Thomas Gleixner <>
13 years agoMerge branches 'ipoib', 'mlx4' and 'nes' into for-linus
Roland Dreier [Tue, 16 Sep 2008 18:57:52 +0000 (11:57 -0700)]
Merge branches 'ipoib', 'mlx4' and 'nes' into for-linus

13 years agoIPoIB: Fix deadlock on RTNL between bcast join comp and ipoib_stop()
Yossi Etigin [Tue, 16 Sep 2008 18:57:45 +0000 (11:57 -0700)]
IPoIB: Fix deadlock on RTNL between bcast join comp and ipoib_stop()

Taking rtnl_lock in ipoib_mcast_join_complete() causes a deadlock with
ipoib_stop().  We avoid it by scheduling the piece of code that takes
the lock on ipoib_workqueue instead of executing it directly.  This
works because we only flush the ipoib_workqueue with the RTNL not held.

The deadlock happens because ipoib_stop() calls ipoib_ib_dev_down()
which calls ipoib_mcast_dev_flush(), which calls ipoib_mcast_free(),
which calls ipoib_mcast_leave(). The latter calls
ib_sa_free_multicast(), and this waits until the multicast completion
handler finishes.  This handler is ipoib_mcast_join_complete(), which
waits for the rtnl_lock(), which was already taken by ipoib_stop().

This bug was introduced in commit a77a57a1 ("IPoIB: Fix deadlock on
RTNL in ipoib_stop()").

Signed-off-by: Yossi Etigin <>
Signed-off-by: Roland Dreier <>
13 years agoRDMA/nes: Fix client side QP destroy
Faisal Latif [Tue, 16 Sep 2008 18:56:26 +0000 (11:56 -0700)]
RDMA/nes: Fix client side QP destroy

Fix QP not being destroyed properly on the client, which leads to
userspace programs hanging on exit.  This is a missing chunk from the
connection management rewrite in commit 6492cdf3 ("RDMA/nes: CM
connection setup/teardown rework").

Signed-off-by: Faisal Latif <>
Signed-off-by: Roland Dreier <>
13 years agosparc64: Fix SMP bootup with CONFIG_STACK_DEBUG or ftrace.
David S. Miller [Tue, 16 Sep 2008 18:44:00 +0000 (11:44 -0700)]
sparc64: Fix SMP bootup with CONFIG_STACK_DEBUG or ftrace.

Based upon a report by Meelis Roos.

Any function call can try to access the current
thread register via the _mcount hooks when the kernel
is built with -pg (via ftrace or STACK_DEBUG).

That can't be setup properly very early on during
the bootup of other cpus for sun4u and some early
sun4v systems.

So add notrace markers to these specific functions, so
that _mcount doesn't get invoked too early.

Signed-off-by: David S. Miller <>
13 years agoInput: jornada720_ts - fix build error ( LONG() usage )
Kristoffer Ericson [Tue, 16 Sep 2008 18:19:25 +0000 (14:19 -0400)]
Input: jornada720_ts - fix build error ( LONG() usage )

This patch removes the usage of LONG() which is deprecated; we also
replace BIT() with BIT_MASK().

signed-off-by: Kristoffer Ericson <>
Signed-off-by: Dmitry Torokhov <>
13 years agosparc64: Fix OOPS in psycho_pcierr_intr_other().
David S. Miller [Tue, 16 Sep 2008 16:53:42 +0000 (09:53 -0700)]
sparc64: Fix OOPS in psycho_pcierr_intr_other().

We no longer put the top-level PCI controller device into the
PCI layer device list.  So pbm->pci_bus->self is always NULL.

Therefore, use direct PCI config space accesses to get at
the PCI controller's PCI_STATUS register.

Tested by Meelis Roos.

Signed-off-by: David S. Miller <>
13 years ago[S390] cio: fix orb initialization in cio_start_key
Stefan Weinhuber [Tue, 16 Sep 2008 16:32:19 +0000 (09:32 -0700)]
[S390] cio: fix orb initialization in cio_start_key

The functions cio_tm_start_key and cio_start_key use the same private
orb structure of a subchannel, so the orb needs to be cleared of old
data before it is used again. A respective memset is missing from
cio_start_key and hereby added.

Signed-off-by: Stefan Weinhuber <>
Acked-by: Cornelia Huck <>
Signed-off-by: Martin Schwidefsky <>
13 years ago[S390] cio: Fix driver_data handling for ccwgroup devices.
Cornelia Huck [Tue, 16 Sep 2008 16:32:18 +0000 (09:32 -0700)]
[S390] cio: Fix driver_data handling for ccwgroup devices.

Since 16f7f9564c3ae190954f2ec55f385a268b93ac4d, we've seen
oopses when grouping/ungrouping devices:

Unable to handle kernel pointer dereference at virtual kernel address 0000000000
Oops: 0004 [#1] PREEMPT SMP
Modules linked in: bonding qeth_l2 dm_multipath sunrpc qeth_l3 dm_mod qeth chsc_
sch ccwgroup
CPU: 1 Not tainted 2.6.26-29.x.20080815-s390xdefault #1
Process iperf (pid: 24412, task: 000000003f446038, ksp: 000000003c929e08)
Krnl PSW : 0404d00180000000 000003e00006f6e6 (qeth_irq+0xda/0xb28 [qeth])
           R:0 T:1 IO:0 EX:0 Key:0 M:1 W:0 P:0 AS:3 CC:1 PM:0 EA:3
Krnl GPRS: 0000000000000000 000003e000000003 0000000000000000 0000000000114ccc
           000000003fb82e48 000003e00006f60c 000000000000000c 000000003ce72100
           0000000000114944 000000003fb82e48 0000000000114ccc 000000003fe8fd28
           000003e000066000 000003e000076128 000000003fe8fdb8 000000003fe8fd28
Krnl Code: 000003e00006f6dabf3f2024            icm     %r3,15,36(%r2)
           000003e00006f6dea774023c            brc     7,3e00006fb56
           000003e00006f6e2a7280000            lhi     %r2,0
          >000003e00006f6e65020a1a0            st      %r2,416(%r10)
           000003e00006f6ea58109000            l       %r1,0(%r9)
           000003e00006f6eea7111000            tmll    %r1,4096
           000003e00006f6f2a77400f9            brc     7,3e00006f8e4
           000003e00006f6f68810000c            srl     %r1,12
Call Trace:
([<000000003fe8fd20>] 0x3fe8fd20)
 [<000000000033bf2a>] ccw_device_call_handler+0xb2/0xd8
 [<0000000000339e1c>] ccw_device_irq+0x124/0x164
 [<0000000000339758>] io_subchannel_irq+0x8c/0x118
 [<00000000003309ba>] do_IRQ+0x192/0x1bc
 [<0000000000114f66>] io_return+0x0/0x8
 [<00000000001149cc>] sysc_do_svc+0x0/0x22
([<0000000000114a18>] sysc_noemu+0x10/0x16)
 [<00000200002e047c>] 0x200002e047c
Last Breaking-Event-Address:
 [<000003e00006f6d6>] qeth_irq+0xca/0xb28 [qeth]

The problem is that dev->driver_data for a ccw device is NULL,
while it should point to the ccwgroup device it is a member of.
This happened due to incorrect cleanup if creating a ccwgroup
device failed because the ccw devices were already grouped.

Fix this by setting cdev[i] to NULL in the error handling of
ccwgroup_create_from_string() after we give up our reference and
by checking if the driver_data points to the ccwgroup device in
ccwgroup_release() just to be really sure.

Signed-off-by: Cornelia Huck <>
Signed-off-by: Martin Schwidefsky <>
13 years agox86: completely disable NOPL on 32 bits
H. Peter Anvin [Tue, 16 Sep 2008 16:29:40 +0000 (09:29 -0700)]
x86: completely disable NOPL on 32 bits

Completely disable NOPL on 32 bits.  It turns out that Microsoft
Virtual PC is so broken it can't even reliably *fail* in the presence
of NOPL.

This leaves the infrastructure in place but disables it

Signed-off-by: H. Peter Anvin <>