linux-2.6-block.git
14 years agoMIPS: TXx9: Fix spi-baseclk value
Atsushi Nemoto [Thu, 3 Sep 2009 13:59:00 +0000 (22:59 +0900)]
MIPS: TXx9: Fix spi-baseclk value

TXx9 SPI bit rate is calculated by:
fBR = fSPI / 2 / (n + 1)
(fSPI is SPI master clock freq, i.e. imbusclk freq.)
So use imbus_clk / 2 as a spi-baseclk.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: bcm63xx: Set the correct BCM3302 CPU name
Florian Fainelli [Wed, 14 Oct 2009 07:56:00 +0000 (09:56 +0200)]
MIPS: bcm63xx: Set the correct BCM3302 CPU name

For consistency with other BCM63xx SoC set the CPU name to "Broadcom
BCM6338" when actually running on that system.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Loongson 2: Set cpu_has_dc_aliases and cpu_icache_snoops_remote_store
Zhang Le [Fri, 19 Jun 2009 10:01:39 +0000 (18:01 +0800)]
MIPS: Loongson 2: Set cpu_has_dc_aliases and cpu_icache_snoops_remote_store

Loongson 2 does not have dcache aliases when is using 16k pages. and the

And because Loongson 2 doesn't do SMP , cpu_icache_snoops_remote_store does
not matter here.

Signed-off-by: Zhang Le <r0bertz@gentoo.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Avoid potential hazard on Context register
Ralf Baechle [Tue, 13 Oct 2009 21:23:28 +0000 (23:23 +0200)]
MIPS: Avoid potential hazard on Context register

set_saved_sp reads Context register. Avoid reading stale value from
earlier incomplete write.

Issue found and fixed for head.S by Chris Dearman <chris@mips.com>.

Signed-off-by: Chris Dearman <chris@mips.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Octeon: Use lockless interrupt controller operations when possible.
David Daney [Tue, 13 Oct 2009 18:26:03 +0000 (11:26 -0700)]
MIPS: Octeon: Use lockless interrupt controller operations when possible.

Some newer Octeon chips have registers that allow lockless operation of
the interrupt controller.  Take advantage of them.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Octeon: Use write_{un,}lock_irq{restore,save} to set irq affinity
David Daney [Tue, 13 Oct 2009 15:52:28 +0000 (08:52 -0700)]
MIPS: Octeon: Use write_{un,}lock_irq{restore,save} to set irq affinity

Since the locks are used from interrupt context we need the
irqsave/irqrestore versions of the locking functions.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Set S-cache linesize to 64-bytes for MTI's S-cache
Ralf Baechle [Tue, 13 Oct 2009 14:54:01 +0000 (16:54 +0200)]
MIPS: Set S-cache linesize to 64-bytes for MTI's S-cache

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: SMTC: Avoid queing multiple reschedule IPIs
Jaidev Patwardhan [Fri, 10 Jul 2009 09:06:00 +0000 (02:06 -0700)]
MIPS: SMTC: Avoid queing multiple reschedule IPIs

Signed-off-by: Chris Dearman <chris@mips.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: GCMP: Avoid accessing registers when they are not present
Jaidev Patwardhan [Fri, 10 Jul 2009 08:54:25 +0000 (01:54 -0700)]
MIPS: GCMP: Avoid accessing registers when they are not present

Signed-off-by: Chris Dearman <chris@mips.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: GIC: Random fixes and enhancements.
Chris Dearman [Fri, 10 Jul 2009 08:54:09 +0000 (01:54 -0700)]
MIPS: GIC: Random fixes and enhancements.

Signed-off-by: Chris Dearman <chris@mips.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: CMP: Fix memory barriers for correct operation of amon_cpu_start
Chris Dearman [Fri, 10 Jul 2009 09:06:38 +0000 (02:06 -0700)]
MIPS: CMP: Fix memory barriers for correct operation of amon_cpu_start

Signed-off-by: Chris Dearman (chris@mips.com)
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Fix abs.[sd] and neg.[sd] emulation for NaN operands
Nigel Stephens [Mon, 12 Oct 2009 21:57:18 +0000 (14:57 -0700)]
MIPS: Fix abs.[sd] and neg.[sd] emulation for NaN operands

This patch ensures that the sign bit is always updated for NaN operands.

Signed-off-by: Chris Dearman <chris@mips.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: SPRAM: Clean up support code a little
Chris Dearman [Fri, 10 Jul 2009 08:51:27 +0000 (01:51 -0700)]
MIPS: SPRAM: Clean up support code a little

Signed-off-by: Chris Dearman <chris@mips.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: 1004K: Enable SPRAM support.
Ralf Baechle [Mon, 12 Oct 2009 21:20:20 +0000 (23:20 +0200)]
MIPS: 1004K: Enable SPRAM support.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Malta: Enable PCI 2.1 compatibility in PIIX4
Ralf Baechle [Mon, 12 Oct 2009 20:54:47 +0000 (22:54 +0200)]
MIPS: Malta: Enable PCI 2.1 compatibility in PIIX4

Based on original patch by Chris Dearman <chris@mips.com>.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Kconfig: Fix duplicate default value for MIPS_L1_CACHE_SHIFT.
Ralf Baechle [Mon, 12 Oct 2009 20:30:06 +0000 (22:30 +0200)]
MIPS: Kconfig: Fix duplicate default value for MIPS_L1_CACHE_SHIFT.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: MTI: Fix accesses to device registers on MIPS boards
Chris Dearman [Fri, 10 Jul 2009 08:53:54 +0000 (01:53 -0700)]
MIPS: MTI: Fix accesses to device registers on MIPS boards

This fixes the remaining problems introduced by
f197465384bf7ef1af184c2ed1a4e268911a91e3 (incorrect access length &
byteswapping in bigendian mode)

Signed-off-by: Chris Dearman <chris@mips.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Fix machine check exception in kmap_coherent()
Kevin Cernekee [Mon, 7 Sep 2009 18:11:31 +0000 (11:11 -0700)]
MIPS: Fix machine check exception in kmap_coherent()

On an SMP system with cache aliases, the following sequence of events may
happen:

1) copy_user_highpage() runs on CPU0, invoking kmap_coherent() to create a
   temporary mapping in the fixmap region
2) copy_page() starts on CPU0
3) CPU1 sends CPU0 an IPI asking CPU0 to run local_r4k_flush_cache_page()
4) CPU0 takes the interrupt, interrupting copy_page()
5) local_r4k_flush_cache_page() on CPU0 calls kmap_coherent() again
6) The second invocation of kmap_coherent() on CPU0 tries to use the
   same fixmap virtual address that was being used by copy_user_highpage()
7) CPU0 throws a machine check exception for the TLB address conflict

Fixed by creating an extra set of fixmap entries for use in interrupt
handlers.  This prevents fixmap VA conflicts between copy_user_highpage()
running in user context, and local_r4k_flush_cache_page() invoked from an
SMP IPI.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: MTX-1: Fix build if CONFIG_PCI is disabled.
Ralf Baechle [Mon, 12 Oct 2009 00:23:48 +0000 (02:23 +0200)]
MIPS: MTX-1: Fix build if CONFIG_PCI is disabled.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: AR7: register watchdog device only if enabled in hw configuration
Florian Fainelli [Tue, 4 Aug 2009 21:09:36 +0000 (23:09 +0200)]
MIPS: AR7: register watchdog device only if enabled in hw configuration

This patch checks if the watchdog enable bit is set in the DCL register
meaning that the hardware watchdog actually works and if so, register the
ar7_wdt platform_device.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: BCM63xx: Prepare for watchdog support
Florian Fainelli [Mon, 10 Aug 2009 19:42:59 +0000 (21:42 +0200)]
MIPS: BCM63xx: Prepare for watchdog support

This patch prepares the board code to register a bcm63xx_wdt
platform_device that we are going to use in a subsequent patch.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: BCM63xx: Make bcm63xx_uart_register an initfunc
Florian Fainelli [Mon, 10 Aug 2009 19:42:54 +0000 (21:42 +0200)]
MIPS: BCM63xx: Make bcm63xx_uart_register an initfunc

This patch removes the calls to bcm63xx_uart_register in board_bcm963xx.c
and make bcm63xx_uart_register an initfunc.  Allows us to remove
bcm63xx_dev_uart.h which was there to make checkpatch.pl happy.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: AU1000: Fix build failure for db1x00 configured for Au1100 SoC
Florian Fainelli [Sun, 16 Aug 2009 22:28:24 +0000 (00:28 +0200)]
MIPS: AU1000: Fix build failure for db1x00 configured for Au1100 SoC

This patch fixes the following warning, which becomes an error due to
-Werror to be turned on:
  CC      arch/mips/alchemy/common/gpiolib-au1000.o
cc1: warnings being treated as errors
arch/mips/alchemy/common/gpiolib-au1000.c: In function 'au1100_gpio2_to_irq':
/home/florian/dev/kernel/linux-queue/arch/mips/include/asm/mach-au1x00/gpio-au1000.h:107: warning: control reaches end of non-void function

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: BCM63xx: Fix soft-reset lockup on BCM6345
Florian Fainelli [Mon, 31 Aug 2009 18:27:39 +0000 (20:27 +0200)]
MIPS: BCM63xx: Fix soft-reset lockup on BCM6345

This patch fixes a lockup on BCM6345 where setting the PLL soft reset bit
will also lock the other blocks including UART.  Instead of setting only
the PLL soft reset bit in the software reset register, set this bit but do
not touch the others.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: TXx9: Fix error handling / Fix for noenexisting gpio_remove.
Ralf Roesch [Wed, 16 Sep 2009 06:01:20 +0000 (08:01 +0200)]
MIPS: TXx9: Fix error handling / Fix for noenexisting gpio_remove.

Error was introduced by commit 0385d1f3d394c6814be0b165c153fc3fc254469a.

Signed-off-by: Ralf Roesch <ralf.roesch@rw-gmbh.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Add IRQF_TIMER flag for timer interrupts
Wu Zhangjin [Sat, 10 Oct 2009 15:26:35 +0000 (23:26 +0800)]
MIPS: Add IRQF_TIMER flag for timer interrupts

As the commit 3ee4c147 shows, we need to "Add IRQF_TIMER flag for timer
interrupts", Atsushi Nemoto have reported that some other timer interrupts
should be considered, Here it is.

Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: 64-bit: Fix o32 lookup_dcookie syscall
Wu Zhangjin [Sat, 10 Oct 2009 11:19:49 +0000 (19:19 +0800)]
MIPS: 64-bit: Fix o32 lookup_dcookie syscall

An o32 aplication passes a 64-bit value in a pair of registers; a 64-bit
kernel expects a 64-bit argument in a single register.

Signed-off-by: Chen Jie <chenj@lemote.com>
Signed-off-by: Hu Hongbing <huhb@lemote.com>
Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: VPE: Remove stray unlock_kernel.
Ralf Baechle [Thu, 8 Oct 2009 20:16:47 +0000 (22:16 +0200)]
MIPS: VPE: Remove stray unlock_kernel.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Reported-by: Josip Rodin <joy@entuzijast.net>
14 years agoMIPS: Add IRQF_TIMER flag for timer interrupts
Wu Zhangjin [Thu, 8 Oct 2009 13:17:54 +0000 (21:17 +0800)]
MIPS: Add IRQF_TIMER flag for timer interrupts

Along the lines of d6c585a4342a2ff627a29f9aea77c5ed4cd76023, add IRQF_TIMER
flag for all timer interrupts  This ensures that timer interrupts won't be
disabled on suspend and not threaded for PREEMPT_RT.

Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Loongson: Remove redundant local_irq_disable()
Wu Zhangjin [Thu, 8 Oct 2009 12:39:50 +0000 (20:39 +0800)]
MIPS: Loongson: Remove redundant local_irq_disable()

That code is executed with irq disabled already, so, remove the redundant
local_irq_disable() here.

Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: IP27: Fix build
Ralf Baechle [Wed, 7 Oct 2009 20:11:08 +0000 (22:11 +0200)]
MIPS: IP27: Fix build

Broken by 182a85f8a119c789610a9d464f4129ded9f3c107.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Cleanup CONFIG_DEBUG_STACK_USAGE version of alloc_thread_info.
Ralf Baechle [Tue, 6 Oct 2009 23:59:20 +0000 (01:59 +0200)]
MIPS: Cleanup CONFIG_DEBUG_STACK_USAGE version of alloc_thread_info.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Octeon: Fix compile error in arch/mips/cavium-octeon/smp.c
David Daney [Thu, 1 Oct 2009 23:47:38 +0000 (16:47 -0700)]
MIPS: Octeon: Fix compile error in arch/mips/cavium-octeon/smp.c

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Don't write ones to reserved entryhi bits.
Ralf Baechle [Wed, 27 May 2009 16:29:37 +0000 (17:29 +0100)]
MIPS: Don't write ones to reserved entryhi bits.

We've silently been relying on the hardware chopping off excess, reserved
ASID bits for no better reason that it saving an instruction.  Because we
already have:

#define cpu_asid(cpu, mm)       (cpu_context((cpu), (mm)) & ASID_MASK)

in <asm/mmu_context.h>.

We can use a cleanup to avoid writing non-zero bits into the reserved
entryhi bits.  This avoid triggering some debugging assertion in the
Cavium simulator.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Extend COMMAND_LINE_SIZE
Ralf Baechle [Mon, 2 Nov 2009 11:00:01 +0000 (12:00 +0100)]
MIPS: Extend COMMAND_LINE_SIZE

Some firmware may pass well over 256 bytes these days.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoALSA: pcmcia: use dynamic debug infrastructure, deprecate CS_CHECK (sound)
Dominik Brodowski [Sat, 24 Oct 2009 19:43:03 +0000 (21:43 +0200)]
ALSA: pcmcia: use dynamic debug infrastructure, deprecate CS_CHECK (sound)

Convert PCMCIA drivers to use the dynamic debug infrastructure, instead of
requiring manual settings of PCMCIA_DEBUG.

Also, remove all usages of the CS_CHECK macro and replace them with proper
Linux style calling and return value checking. The extra error reporting may
be dropped, as the PCMCIA core already complains about any (non-driver-author)
errors.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: hda: Use quirk mask for Dell Inspiron Mini9/Vostro A90 using ALC268
Daniel T Chen [Sun, 1 Nov 2009 23:32:29 +0000 (18:32 -0500)]
ALSA: hda: Use quirk mask for Dell Inspiron Mini9/Vostro A90 using ALC268

BugLink: https://bugs.launchpad.net/bugs/368629
We should use a quirk mask for these Dell Inspiron Mini9s and Vostro
A90s, as the model=dell quirk appears to enable audio on them.

Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoARM: 5774/1: Fix Realview ARM1176PB board reboot
Philby John [Wed, 28 Oct 2009 18:09:12 +0000 (19:09 +0100)]
ARM: 5774/1: Fix Realview ARM1176PB board reboot

This is the fix for proper reboot of Realview ARM1176PB board
when issuing the reboot command. Setting the eighth bit of
control register SYS_RESETCTL to 1 to force a soft reset.
arch_reset() is modified for realview machines to call machine
specific reset function pointers.

Signed-off-by: Philby John <pjohn@in.mvista.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
Linus Torvalds [Sat, 31 Oct 2009 19:16:20 +0000 (12:16 -0700)]
Merge git://git./linux/kernel/git/gregkh/staging-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6:
  Staging: fix wireless drivers depends
  Staging: wireless drivers Kconfig change
  Staging: android: mark subsystem as broken
  Staging: remove stlc45xx driver
  Staging: rtl8187se/rtl8192e/rtl8192su: allow module unload
  Staging: vt6656: fix the memory free bug in vntwusb_disconnect()
  Staging: Panel: prevent driver from calling misc_deregister twice on same ressource
  Staging: hv: fix oops in vmbus - missing #include
  Staging: hv: fix oops in vmbus - netvsc list_head
  Staging: hv: fix oops in vmbus - udev events
  Staging: hv: Fix vmbus load hang caused by faulty data packing
  Staging: hv: Fix null pointer error after vmbus loading
  Staging: hv TODO patches

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
Linus Torvalds [Sat, 31 Oct 2009 19:16:09 +0000 (12:16 -0700)]
Merge git://git./linux/kernel/git/gregkh/usb-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6:
  USB: fsl_udc_core: Fix kernel oops on module removal
  USB: option: TLAYTECH TUE800 support
  USB: r8a66597-hcd: fix cannot detect a device when uses_new_polling is set
  USB: serial: sierra driver autopm fixes
  USB: serial: sierra driver send_setup() autopm fix
  USB: rndis_host: debug info clobbered before it is logged

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6
Linus Torvalds [Sat, 31 Oct 2009 19:15:58 +0000 (12:15 -0700)]
Merge git://git./linux/kernel/git/gregkh/tty-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6:
  tty: Mark generic_serial users as BROKEN

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
Linus Torvalds [Sat, 31 Oct 2009 19:15:28 +0000 (12:15 -0700)]
Merge git://git./linux/kernel/git/gregkh/driver-core-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6:
  Documentation: ABI: /sys/devices/system/cpu/cpu#/node
  Documentation: ABI: /sys/devices/system/cpu/cpuidle/
  Documentation: ABI: /sys/devices/system/cpu/sched_[mc|smt]_power_savings
  Documentation: ABI: /sys/devices/system/cpu/cpu#/ topology files
  Documentation: ABI: /sys/devices/system/cpu/ topology files
  Documentation: ABI: document /sys/devices/system/cpu/
  Documentation: ABI: rename sysfs-devices-cache_disable properly
  Driver core: allow certain drivers prohibit bind/unbind via sysfs
  Driver core: fix driver_register() return value

14 years agoMerge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6
Linus Torvalds [Sat, 31 Oct 2009 19:14:56 +0000 (12:14 -0700)]
Merge branch 'for-linus' of git://git390.marist.edu/linux-2.6

* 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6:
  [S390] smp: fix sigp sense handling
  [S390] smp: fix sigp stop handling
  [S390] cputime: fix overflow on 31 bit systems
  [S390] call home: fix string length handling
  [S390] call home: fix error handling in init function
  [S390] smp: fix prefix handling of offlined cpus
  [S390] s/r: cmm resume fix
  [S390] call home: fix local buffer usage in proc handler

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/fs/xfs/xfs
Linus Torvalds [Sat, 31 Oct 2009 19:12:49 +0000 (12:12 -0700)]
Merge branch 'for-linus' of git://git./fs/xfs/xfs

* 'for-linus' of git://git.kernel.org/pub/scm/fs/xfs/xfs:
  xfs: fix xfs_quota remove error
  xfs: free temporary cursor in xfs_dialloc

14 years agoMerge branch 'for-linus' of git://neil.brown.name/md
Linus Torvalds [Sat, 31 Oct 2009 19:12:19 +0000 (12:12 -0700)]
Merge branch 'for-linus' of git://neil.brown.name/md

* 'for-linus' of git://neil.brown.name/md:
  async_tx: fix asynchronous raid6 recovery for ddf layouts
  async_pq: rename scribble page
  async_pq: kill a stray dma_map() call and other cleanups
  md/raid6: kill a gcc-4.0.1 'uninitialized variable' warning
  raid6/async_tx: handle holes in block list in async_syndrome_val
  md/async: don't pass a memory pointer as a page pointer.
  md: Fix handling of raid5 array which is being reshaped to fewer devices.
  md: fix problems with RAID6 calculations for DDF.
  md/raid456: downlevel multicore operations to raid_run_ops
  md: drivers/md/unroll.pl replaced with awk analog
  md: remove clumsy usage of do_sync_mapping_range from bitmap code
  md: raid1/raid10: handle allocation errors during array setup.
  md/raid5: initialize conf->device_lock earlier
  md/raid1/raid10: add a cond_resched
  Revert "md: do not progress the resync process if the stripe was blocked"

14 years agodpt_i2o: Fix typo of EINVAL
OGAWA Hirofumi [Fri, 30 Oct 2009 08:02:31 +0000 (17:02 +0900)]
dpt_i2o: Fix typo of EINVAL

Commit ef7562b7f28319e6dd1f85dc1af87df2a7a84832 ("dpt_i2o: Fix up
copy*user") had a silly typo: EINVAL should be -EINVAL.

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: stable@kernel.org
Cc: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoNOMMU: Don't pass NULL pointers to fput() in do_mmap_pgoff()
David Howells [Fri, 30 Oct 2009 13:13:26 +0000 (13:13 +0000)]
NOMMU: Don't pass NULL pointers to fput() in do_mmap_pgoff()

Don't pass NULL pointers to fput() in the error handling paths of the NOMMU
do_mmap_pgoff() as it can't handle it.

The following can be used as a test program:

int main() { static long long a[1024 * 1024 * 20] = { 0 }; return a;}

Without the patch, the code oopses in atomic_long_dec_and_test() as called by
fput() after the kernel complains that it can't allocate that big a chunk of
memory.  With the patch, the kernel just complains about the allocation size
and then the program segfaults during execve() as execve() can't complete the
allocation of all the new ELF program segments.

Reported-by: Robin Getz <rgetz@blackfin.uclinux.org>
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Robin Getz <rgetz@blackfin.uclinux.org>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoDocumentation: ABI: /sys/devices/system/cpu/cpu#/node
Alex Chiang [Thu, 22 Oct 2009 04:15:30 +0000 (22:15 -0600)]
Documentation: ABI: /sys/devices/system/cpu/cpu#/node

Describe NUMA node symlink created for CPUs when CONFIG_NUMA is set.

Cc: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoDocumentation: ABI: /sys/devices/system/cpu/cpuidle/
Alex Chiang [Thu, 22 Oct 2009 03:45:41 +0000 (21:45 -0600)]
Documentation: ABI: /sys/devices/system/cpu/cpuidle/

Document cpuidle sysfs attributes by reading code, Documentation/cpuidle/,
and git logs.

Cc: Venki Pallipadi <venkatesh.pallipadi@intel.com>
Cc: Len Brown <lenb@kernel.org>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoDocumentation: ABI: /sys/devices/system/cpu/sched_[mc|smt]_power_savings
Alex Chiang [Thu, 22 Oct 2009 03:45:36 +0000 (21:45 -0600)]
Documentation: ABI: /sys/devices/system/cpu/sched_[mc|smt]_power_savings

Document sched_[mc|smt]_power_savings by reading existing code and
git logs.

Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoDocumentation: ABI: /sys/devices/system/cpu/cpu#/ topology files
Alex Chiang [Thu, 22 Oct 2009 03:45:31 +0000 (21:45 -0600)]
Documentation: ABI: /sys/devices/system/cpu/cpu#/ topology files

Add brief descriptions for the following sysfs files:

/sys/devices/system/cpu/cpu#/topology/core_id
/sys/devices/system/cpu/cpu#/topology/core_siblings
/sys/devices/system/cpu/cpu#/topology/core_siblings_list
/sys/devices/system/cpu/cpu#/topology/physical_package_id
/sys/devices/system/cpu/cpu#/topology/thread_siblings
/sys/devices/system/cpu/cpu#/topology/thread_siblings_list

The descriptions in Documentation/cputopology.txt weren't very
informative, so I attempted a better description based on code
reading and hopeful guessing.

Updated Documentation/cputopology.txt with the better descriptions and
fixed some style issues.

Cc: Mike Travis <travis@sgi.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoDocumentation: ABI: /sys/devices/system/cpu/ topology files
Alex Chiang [Thu, 22 Oct 2009 03:45:25 +0000 (21:45 -0600)]
Documentation: ABI: /sys/devices/system/cpu/ topology files

Add brief descriptions for the following sysfs files:

/sys/devices/system/cpu/kernel_max
/sys/devices/system/cpu/offline
/sys/devices/system/cpu/online
/sys/devices/system/cpu/possible
/sys/devices/system/cpu/present

Excerpted the relevant information from Documentation/cputopology.txt
and pointed back to cputopology.txt as the authoritative source of
information.

Cc: Mike Travis <travis@sgi.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoDocumentation: ABI: document /sys/devices/system/cpu/
Alex Chiang [Thu, 22 Oct 2009 03:45:20 +0000 (21:45 -0600)]
Documentation: ABI: document /sys/devices/system/cpu/

This interface has been around for a long time, but hasn't been
officially documented.

Document the top level sysfs directory for CPU attributes.

Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoDocumentation: ABI: rename sysfs-devices-cache_disable properly
Alex Chiang [Thu, 22 Oct 2009 03:45:15 +0000 (21:45 -0600)]
Documentation: ABI: rename sysfs-devices-cache_disable properly

Rename sysfs-devices-cache_disable to sysfs-devices-system-cpu, in
order to keep a stricter correlation between a sysfs directory and
its documentation.

Reported-by: David Rientjes <rientjes@google.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoDriver core: allow certain drivers prohibit bind/unbind via sysfs
Dmitry Torokhov [Tue, 13 Oct 2009 03:17:41 +0000 (20:17 -0700)]
Driver core: allow certain drivers prohibit bind/unbind via sysfs

Platform drivers registered via platform_driver_probe() can be bound
to devices only once, upon registration, because discard their probe()
routines to save memory. Unbinding the driver through sysfs 'unbind'
leaves the device stranded and confuses users so let's not create
bind and unbind attributes for such drivers.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Cc: Éric Piel <eric.piel@tremplin-utc.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoDriver core: fix driver_register() return value
Stas Sergeev [Sat, 17 Oct 2009 20:31:38 +0000 (00:31 +0400)]
Driver core: fix driver_register() return value

In this patch:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=16dc42e018c2868211b4928f20a957c0c216126c
the check was added for another driver to already claim the same device
on the same bus. But the returned error code was wrong: to modprobe, the
-EEXIST means that _this_ driver is already installed. It therefore
doesn't produce the needed error message when _another_ driver is trying
to register for the same device.  Returning -EBUSY fixes the problem.

Signed-off-by: Stas Sergeev <stsp@aknet.ru>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: fsl_udc_core: Fix kernel oops on module removal
Anton Vorontsov [Thu, 29 Oct 2009 16:50:43 +0000 (19:50 +0300)]
USB: fsl_udc_core: Fix kernel oops on module removal

fsl_udc_release() calls dma_free_coherent() with an inappropriate
device passed to it, and since the device has no dma_ops, the following
oops pops up:

  Kernel BUG at d103ce9c [verbose debug info unavailable]
  Oops: Exception in kernel mode, sig: 5 [#1]
  ...
  NIP [d103ce9c] fsl_udc_release+0x50/0x80 [fsl_usb2_udc]
  LR [d103ce74] fsl_udc_release+0x28/0x80 [fsl_usb2_udc]
  Call Trace:
  [cfbc7dc0] [d103ce74] fsl_udc_release+0x28/0x80 [fsl_usb2_udc]
  [cfbc7dd0] [c01a35c4] device_release+0x2c/0x90
  [cfbc7de0] [c016b480] kobject_cleanup+0x58/0x98
  [cfbc7e00] [c016c52c] kref_put+0x54/0x6c
  [cfbc7e10] [c016b360] kobject_put+0x34/0x64
  [cfbc7e20] [c01a1d0c] put_device+0x1c/0x2c
  [cfbc7e30] [d103dbfc] fsl_udc_remove+0xc0/0x1e4 [fsl_usb2_udc]
  ...

This patch fixes the issue by passing dev->parent, which points to
a correct device.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Cc: Li Yang <leoli@freescale.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Guennadi Liakhovetski <lg@denx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: option: TLAYTECH TUE800 support
Bryan Wu [Thu, 22 Oct 2009 07:00:36 +0000 (15:00 +0800)]
USB: option: TLAYTECH TUE800 support

Add ID for Tlaytech TUE800 CDMA modem to the option driver.

Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
Acked-By: Matthias Urlichs <matthias@urlichs.de>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: r8a66597-hcd: fix cannot detect a device when uses_new_polling is set
Yoshihiro Shimoda [Wed, 21 Oct 2009 11:33:39 +0000 (20:33 +0900)]
USB: r8a66597-hcd: fix cannot detect a device when uses_new_polling is set

Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: serial: sierra driver autopm fixes
Elina Pasheva [Tue, 27 Oct 2009 20:49:59 +0000 (13:49 -0700)]
USB: serial: sierra driver autopm fixes

This patch presents fixes for the autosuspend feature implementation in
sierra usb serial driver in  functions sierra_open(), sierra_close() and
stop_read_write_urbs().

The patch "sierra_close() must resume the device before it notifies it
of a closure" submitted by Oliver Neukum on Wed, October 14 has been
merged as fix in sierra_close() function.

The bug fix  in sierra_open() function restores the autopm interface
state on error condition.

The bug fix in in stop_read_write_urbs() function assures that both
receive and interrupt urbs are recycled.

Signed-off-by: Elina Pasheva <epasheva@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: serial: sierra driver send_setup() autopm fix
Elina Pasheva [Fri, 16 Oct 2009 19:04:54 +0000 (12:04 -0700)]
USB: serial: sierra driver send_setup() autopm fix

This patch presents a fix for the autosuspend feature implementation in
sierra usb serial driver for function sierra_send_setup().  Because it
is possible to call sierra_send_setup() before sierra_open() or after
sierra_close() we added a get/put interface activity to assure that the
usb control can happen even when the device is autosuspended.

Signed-off-by: Elina Pasheva <epasheva@sierrawireless.com>
Tested-by: Matthew Safar <msafar@sierrawireless.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: rndis_host: debug info clobbered before it is logged
George Nassar [Wed, 14 Oct 2009 23:27:41 +0000 (18:27 -0500)]
USB: rndis_host: debug info clobbered before it is logged

The MTU throttle-down if a RNDIS device doesn't support a particular
packet size is being incorrectly logged.  The attempted packet size is
being clobbered before it gets logged.

First patch; please inform if I'm doing this incorrectly.  Diff'd
against latest official source as per the FAQ; forward port to current
git version is straightforward.

Signed-off-by: George Nassar <george.nassar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: fix wireless drivers depends
Randy Dunlap [Thu, 29 Oct 2009 16:52:02 +0000 (09:52 -0700)]
Staging: fix wireless drivers depends

These drivers can (erroneously) be enabled even when
CONFIG_NET=n, CONFIG_NETDEVICES=n, CONFIG_WLAN=n, etc.
Stop this.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: wireless drivers Kconfig change
Greg Kroah-Hartman [Tue, 27 Oct 2009 22:46:18 +0000 (15:46 -0700)]
Staging: wireless drivers Kconfig change

Change the wireless drivers to depend on CONFIG_WLAN instead of
CONFIG_WLAN_80211 which is going away soon.

Cc: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: android: mark subsystem as broken
Greg Kroah-Hartman [Mon, 26 Oct 2009 23:03:51 +0000 (16:03 -0700)]
Staging: android: mark subsystem as broken

It's causing lots of build errors, so just mark it as broken.  It is
scheduled to be removed in 2.6.33 anyway.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: remove stlc45xx driver
Greg Kroah-Hartman [Mon, 26 Oct 2009 23:35:32 +0000 (16:35 -0700)]
Staging: remove stlc45xx driver

It's no longer needed as the p54spi driver is the same thing,
under a different name and in the correct portion of the kernel tree.

Cc: Javier Martinez Canillas <martinez.javier@gmail.com>
Cc: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: rtl8187se/rtl8192e/rtl8192su: allow module unload
Herton Ronaldo Krzesinski [Fri, 2 Oct 2009 14:03:38 +0000 (11:03 -0300)]
Staging: rtl8187se/rtl8192e/rtl8192su: allow module unload

On rtl81* additions, they had its wireless stack made builtin instead of
separated modules. But try_module_get/module_put in stack were kept,
they are uneeded with the stack builtin and makes rtl81* modules
impossible to remove on a system with an rtl81* card. request_module
calls are also uneeded with stack builtin, so remove them too.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: vt6656: fix the memory free bug in vntwusb_disconnect()
miaofng [Tue, 29 Sep 2009 07:02:53 +0000 (15:02 +0800)]
Staging: vt6656: fix the memory free bug in vntwusb_disconnect()

This patch is used to solve the memory bug when people plug out the wusb card then plug in.
Error logs are following:

root@smdk2440:~# ifdown eth1
AP deauthed me, reason=2.
Config_FileOperation file Not exist
Zone=[1][J][P]!!
WPA: Terminating
root@smdk2440:~#  ----> !!!!!!!!!!!!!!here plug out the wusbcard
usb 1-1: USB disconnect, address 4
----> !!!!!!!!!!!!!!!!!!!here plug in the wusb card
usb 1-1: new full speed USB device using s3c2410-ohci and address 5
usb 1-1: New USB device found, idVendor=160a, idProduct=3184
usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-1: Product: VNT USB-802.11 Wireless LAN Adapter
usb 1-1: Manufacturer: VIA Networking Technologies, Inc.
usb 1-1: configuration #1 chosen from 1 choice
VIA Networking Wireless LAN USB Driver Ver. 1.19_12
Copyright (c) 2004 VIA Networking Technologies, Inc.
kernel BUG at mm/slab.c:2974!
Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = c0004000
[00000000] *pgd=00000000
Internal error: Oops: 817 [#1] PREEMPT
Modules linked in: vt6656_stage
CPU: 0    Not tainted  (2.6.32-rc2 #14)
PC is at __bug+0x1c/0x28
LR is at __bug+0x18/0x28
pc : [<c002fb10>]    lr : [<c002fb0c>]    psr: 40000093
sp : c3867c68  ip : c3867bd0  fp : c3866000
r10: c3800600  r9 : c3802430  r8 : 00000004
r7 : c3802428  r6 : c3802660  r5 : c3802420  r4 : a0000013
r3 : 00000000  r2 : c3866000  r1 : 00000003  r0 : 00000024
Flags: nZcv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
Control: 0000717f  Table: 330a8000  DAC: 00000017
Process khubd (pid: 152, stack limit = 0xc3866270)
Stack: (0xc3867c68 to 0xc3868000)
7c60:                   c0093fdc c0094088 000000d0 000000d0 00000000 000080d0
7c80: 00000000 a0000013 c39ebec0 c3800600 000080d0 00000001 c03f13cc 00000006
7ca0: c02b36f0 c0094574 c0043428 0001c9de c39ebec0 c39ebea0 c3000c00 c02a6a84
7cc0: 89705f41 c3000c00 c39ebec0 c39ebea0 c3000c00 bf036f24 c39ebec8 00000006
7ce0: 00000000 c3000c00 c39ebec0 c39ebea0 c3000c00 bf036f24 c39ebec8 00000006
7d00: 00000000 bf003398 c00aa514 c3867d20 0000a1ff c00e1448 c39d9f84 c39aabe8
7d20: c3867d50 c00e1888 c39aabe8 c39ebea0 c39ebec0 bf036ebc c3000c00 bf036f24
7d40: 0000bec8 01000000 00000000 c39ebea0 c39ebec0 bf036ebc c3000c00 bf036f24
7d60: c39ebec8 00000000 00000000 c0223798 c39ebec0 c01daa14 bf036eec c3867da0
7d80: c045a4f8 c01da6e4 c39ebec0 00000000 c01daa14 c39ebec0 c3867da0 c01d9870
7da0: c38331a8 c39fcb94 c005b3b4 c39ebec0 c39ebec0 c39ebef4 00000000 c01da890
7dc0: c39ebec0 c39ebec0 c3000c00 c01d97f4 00000000 c01d8470 c39ebea0 c3000c68
7de0: 00000000 c3000c68 c3218a00 c3abcd20 00000001 c39ebec0 c39ebea0 c3000c00
7e00: 00000000 c3000c68 c3218a00 c3abcd20 00000001 c0221ee8 00000001 00000000
7e20: 00000000 00000000 00001388 00000000 c3000c04 c3000c68 c3bc29c0 00000001
7e40: c3bc29c4 00000001 c03f4af8 00000000 c39fe780 c3000c00 00000001 c045ab04
7e60: c3867eb8 c045a3bc c3000c70 00000000 00000000 c0229238 c3000c68 c0223210
7e80: c3000c00 c045aaf0 c045ab04 c0223230 c3000c68 c01daa14 c045ab04 c01da6e4
7ea0: c3000c68 00000000 c01daa14 c3000c68 c3867eb8 c01d9870 c38331a8 c3862f54
7ec0: c005b3b4 c3000c68 c3000c68 c3000c9c 00000002 c01da890 c3867ef9 c3000c68
7ee0: c3829f60 c01d97f4 00000000 c01d8470 c38918e0 c3aaf468 39383102 c300343a
7f00: 00000001 c0219660 c03f1768 c3000c00 00000000 c3000c68 00000002 c3aaf814
7f20: 00000001 00000101 c38918e0 c021b6e0 00000002 00000000 00000000 c3000c00
7f40: c38917c0 c021c418 00000064 00000064 00000101 c3867f60 c005b920 c3867f94
7f60: c3891830 c3aaf400 c3866000 c3aaf400 c3aaf800 00000000 c38918e0 c3aaf400
7f80: 00000012 00000000 00000000 c3837920 c00574a0 c3867f94 c3867f94 00000101
7fa0: 01010001 c3867fd4 c381bf48 c3867fd4 c381bf48 00000000 c021ba3c 00000000
7fc0: 00000000 00000000 00000000 c00573dc 00000000 00000000 c3867fd8 c3867fd8
7fe0: 00000000 00000000 00000000 00000000 00000000 c002ce88 00000000 ffff0000
[<c002fb10>] (__bug+0x1c/0x28) from [<c0094088>] (cache_alloc_refill+0x13c/0x594)
[<c0094088>] (cache_alloc_refill+0x13c/0x594) from [<c0094574>] (__kmalloc+0x94/0xd0)
[<c0094574>] (__kmalloc+0x94/0xd0) from [<c02a6a84>] (alloc_netdev_mq+0x48/0x1b0)
[<c02a6a84>] (alloc_netdev_mq+0x48/0x1b0) from [<bf003398>] (vntwusb_found1+0x58/0x53c [vt6656_stage])
[<bf003398>] (vntwusb_found1+0x58/0x53c [vt6656_stage]) from [<c0223798>] (usb_probe_interface+0x130/0x180)
[<c0223798>] (usb_probe_interface+0x130/0x180) from [<c01da6e4>] (driver_probe_device+0xac/0x164)
[<c01da6e4>] (driver_probe_device+0xac/0x164) from [<c01d9870>] (bus_for_each_drv+0x50/0x90)
[<c01d9870>] (bus_for_each_drv+0x50/0x90) from [<c01da890>] (device_attach+0x50/0x68)
[<c01da890>] (device_attach+0x50/0x68) from [<c01d97f4>] (bus_probe_device+0x28/0x54)
[<c01d97f4>] (bus_probe_device+0x28/0x54) from [<c01d8470>] (device_add+0x3b4/0x4f0)
[<c01d8470>] (device_add+0x3b4/0x4f0) from [<c0221ee8>] (usb_set_configuration+0x524/0x5b8)
[<c0221ee8>] (usb_set_configuration+0x524/0x5b8) from [<c0229238>] (generic_probe+0x5c/0xa0)
[<c0229238>] (generic_probe+0x5c/0xa0) from [<c0223230>] (usb_probe_device+0x48/0x54)
[<c0223230>] (usb_probe_device+0x48/0x54) from [<c01da6e4>] (driver_probe_device+0xac/0x164)
[<c01da6e4>] (driver_probe_device+0xac/0x164) from [<c01d9870>] (bus_for_each_drv+0x50/0x90)
[<c01d9870>] (bus_for_each_drv+0x50/0x90) from [<c01da890>] (device_attach+0x50/0x68)
[<c01da890>] (device_attach+0x50/0x68) from [<c01d97f4>] (bus_probe_device+0x28/0x54)
[<c01d97f4>] (bus_probe_device+0x28/0x54) from [<c01d8470>] (device_add+0x3b4/0x4f0)
[<c01d8470>] (device_add+0x3b4/0x4f0) from [<c021b6e0>] (usb_new_device+0x100/0x174)
[<c021b6e0>] (usb_new_device+0x100/0x174) from [<c021c418>] (hub_thread+0x9dc/0xeec)
[<c021c418>] (hub_thread+0x9dc/0xeec) from [<c00573dc>] (kthread+0x78/0x80)
[<c00573dc>] (kthread+0x78/0x80) from [<c002ce88>] (kernel_thread_exit+0x0/0x8)
Code: e1a01000 e59f000c eb005014 e3a03000 (e5833000)
---[ end trace 2a51e0dbab9e4fbe ]---
note: khubd[152] exited with preempt_count 1

Signed-off-by: miaofng <miaofng@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: Panel: prevent driver from calling misc_deregister twice on same ressource
Peter Huewe [Mon, 28 Sep 2009 23:22:40 +0000 (01:22 +0200)]
Staging: Panel: prevent driver from calling misc_deregister twice on same ressource

This patch prevents the driver from calling misc_deregister twice on the same
ressouce when unloading the driver.
Unloading the driver without this patch results in a Kernel BUG like this:
Panel driver version 0.9.5 registered on parport0 (io=0x378).
BUG: unable to handle kernel paging request at 0000000000100108
IP: [<ffffffff803c02ee>] misc_deregister+0x2d/0x90
PGD 6caff067 PUD 762b7067 PMD 0
Oops: 0002 [#1] PREEMPT SMP
last sysfs file: /sys/devices/platform/w83627hf.656/in8_input
...

This patch fixes this issue, although maybe not in the best way possible :)

linux version v2.6.32-rc1 - linus git tree, Di 29. Sep 01:10:18 CEST 2009

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: hv: fix oops in vmbus - missing #include
Milan Dadok [Wed, 28 Oct 2009 22:23:50 +0000 (23:23 +0100)]
Staging: hv: fix oops in vmbus - missing #include

Add missing #includes to make hv module compile successfull.

Signed-off-by: Milan Dadok <milan@dadok.name>
Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: hv: fix oops in vmbus - netvsc list_head
Milan Dadok [Wed, 28 Oct 2009 22:23:37 +0000 (23:23 +0100)]
Staging: hv: fix oops in vmbus - netvsc list_head

Remove incorrect list_head usage. Variable of type list_head was used in
some function's arguments as list item.

Signed-off-by: Milan Dadok <milan@dadok.name>
Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: hv: fix oops in vmbus - udev events
Milan Dadok [Wed, 28 Oct 2009 22:23:27 +0000 (23:23 +0100)]
Staging: hv: fix oops in vmbus - udev events

Fix typos in udev event send and guid variables copy

Signed-off-by: Milan Dadok <milan@dadok.name>
Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: hv: Fix vmbus load hang caused by faulty data packing
Hank Janssen [Fri, 16 Oct 2009 20:11:36 +0000 (20:11 +0000)]
Staging: hv: Fix vmbus load hang caused by faulty data packing

Fix vmbus load hang caused by wrong data packing.

Signed-off-by: Hank Janssen<hjanssen@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: hv: Fix null pointer error after vmbus loading
Haiyang Zhang [Fri, 23 Oct 2009 18:14:24 +0000 (18:14 +0000)]
Staging: hv: Fix null pointer error after vmbus loading

Fix null pointer error after vmbus loading. Remove code that checks for
dev_name, the affected structure is kzalloc-ed prior to this routine, so
it is always null at this stage.

Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: hv TODO patches
Stephen Hemminger [Fri, 9 Oct 2009 22:47:50 +0000 (15:47 -0700)]
Staging: hv TODO patches

Update for more items

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agotty: Mark generic_serial users as BROKEN
Alan Cox [Thu, 29 Oct 2009 12:16:22 +0000 (12:16 +0000)]
tty: Mark generic_serial users as BROKEN

There isn't much else I can do with these. I can find no hardware for any
of them and no users. The code is broken.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agolibertas if_usb: Fix crash on 64-bit machines
David Woodhouse [Fri, 30 Oct 2009 17:45:14 +0000 (17:45 +0000)]
libertas if_usb: Fix crash on 64-bit machines

On a 64-bit kernel, skb->tail is an offset, not a pointer. The libertas
usb driver passes it to usb_fill_bulk_urb() anyway, causing interesting
crashes. Fix that by using skb->data instead.

This highlights a problem with usb_fill_bulk_urb(). It doesn't notice
when dma_map_single() fails and return the error to its caller as it
should. In fact it _can't_ currently return the error, since it returns
void.

So this problem was showing up only at unmap time, after we'd already
suffered memory corruption by doing DMA to a bogus address.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Cc: stable@kernel.org
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: fix reason code output endianness
Johannes Berg [Thu, 29 Oct 2009 09:09:28 +0000 (10:09 +0100)]
mac80211: fix reason code output endianness

When HT debugging is enabled and we receive a DelBA
frame we print out the reason code in the wrong byte
order. Fix that so we don't get weird values printed.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: fix addba timer
Johannes Berg [Thu, 29 Oct 2009 07:34:00 +0000 (08:34 +0100)]
mac80211: fix addba timer

The addba timer function acquires the sta spinlock,
but at the same time we try to del_timer_sync() it
under the spinlock which can produce deadlocks.

To fix this, always del_timer_sync() the timer in
ieee80211_process_addba_resp() and add it again
after checking the conditions, if necessary.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: fix misplaced semicolon on rate control
Luis R. Rodriguez [Thu, 29 Oct 2009 00:19:06 +0000 (20:19 -0400)]
ath9k: fix misplaced semicolon on rate control

The patch e43419f9:

ath9k: downgrade assert in rc.c for invalid rate

downgraded an ASSERT to a WARN_ON() but also misplaced a
semicolon at the end of the second check. What this did
was force the rate control code to always return the rate
even if we should have warned about it. Since this should
not have happened anymore anyway this fix isn't critical
as the proper rate would have been returned anyway.

Cc: stable@kernel.org
Reported-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: Fix DMA TX bounce buffer copying
Michael Buesch [Wed, 28 Oct 2009 21:08:13 +0000 (22:08 +0100)]
b43: Fix DMA TX bounce buffer copying

b43 allocates a bouncebuffer, if the supplied TX skb is in an invalid
memory range for DMA.
However, this is broken in that it fails to copy over some metadata to the
new skb.

This patch fixes three problems:
* Failure to adjust the ieee80211_tx_info pointer to the new buffer.
  This results in a kmemcheck warning.
* Failure to copy the skb cb, which contains ieee80211_tx_info, to the new skb.
  This results in breakage of various TX-status postprocessing (Rate control).
* Failure to transfer the queue mapping.
  This results in the wrong queue being stopped on saturation and can result in queue overflow.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Tested-by: Christian Casteyde <casteyde.christian@free.fr>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: fix BSS leak
Johannes Berg [Wed, 28 Oct 2009 14:12:32 +0000 (15:12 +0100)]
mac80211: fix BSS leak

The IBSS code leaks a BSS struct after telling
cfg80211 about a given BSS by passing a frame.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort73usb.c : more ids
Xose Vazquez Perez [Mon, 19 Oct 2009 09:51:11 +0000 (11:51 +0200)]
rt73usb.c : more ids

stolen from windows inf file(07/17/2009, 1.03.05.0000)
Ovislink 0x1b75, 0x7318
MSI 0x0db0, 0x4600
WideTell 0x7167, 0x3840

Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoipw2200: fix oops on missing firmware
Zhu Yi [Thu, 15 Oct 2009 06:50:28 +0000 (14:50 +0800)]
ipw2200: fix oops on missing firmware

For non-monitor interfaces, the syntax for alloc_ieee80211/free_80211
is wrong. Because alloc_ieee80211 only creates (wiphy_new) a wiphy, but
free_80211() does wiphy_unregister() also. This is only correct when
the later wiphy_register() is called successfully, which apparently
is not the case for your fw doesn't exist one.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agogre: Fix dev_addr clobbering for gretap
Herbert Xu [Fri, 30 Oct 2009 05:51:48 +0000 (05:51 +0000)]
gre: Fix dev_addr clobbering for gretap

Nathan Neulinger noticed that gretap devices get their MAC address
from the local IP address, which results in invalid MAC addresses
half of the time.

This is because gretap is still using the tunnel netdev ops rather
than the correct tap netdev ops struct.

This patch also fixes changelink to not clobber the MAC address
for the gretap case.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Tested-by: Nathan Neulinger <nneul@mst.edu>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosky2: set carrier off in probe
Brandon Philips [Thu, 29 Oct 2009 13:58:07 +0000 (13:58 +0000)]
sky2: set carrier off in probe

Before bringing up a sky2 interface up ethtool reports
"Link detected: yes". Do as ixgbe does and netif_carrier_off() on
probe().

Signed-off-by: Brandon Philips <bphilips@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: fix sk_forward_alloc corruption
Eric Dumazet [Fri, 30 Oct 2009 05:03:53 +0000 (05:03 +0000)]
net: fix sk_forward_alloc corruption

On UDP sockets, we must call skb_free_datagram() with socket locked,
or risk sk_forward_alloc corruption. This requirement is not respected
in SUNRPC.

Add a convenient helper, skb_free_datagram_locked() and use it in SUNRPC

Reported-by: Francis Moreau <francis.moro@gmail.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosound: via82xx: deactivate DXS controls of inactive streams
Clemens Ladisch [Thu, 22 Oct 2009 07:04:09 +0000 (09:04 +0200)]
sound: via82xx: deactivate DXS controls of inactive streams

Activate the DXS volume controls only when the corresponding stream is
being used.  This makes the behaviour consistent with the other drivers
that have per-stream volume controls.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: snd-usb-caiaq: Bump version number to 1.3.20
Mark Hills [Sat, 24 Oct 2009 11:59:37 +0000 (12:59 +0100)]
ALSA: snd-usb-caiaq: Bump version number to 1.3.20

Signed-off-by: Mark Hills <mark@pogo.org.uk>
Acked-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: snd-usb-caiaq: Lock on stream start/unpause
Mark Hills [Sat, 24 Oct 2009 11:59:36 +0000 (12:59 +0100)]
ALSA: snd-usb-caiaq: Lock on stream start/unpause

Fix a bug which can result in white noise from the driver after stream
start or unpause.

Signed-off-by: Mark Hills <mark@pogo.org.uk>
Acked-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: snd-usb-caiaq: Missing lock around use of buffer positions
Mark Hills [Sat, 24 Oct 2009 11:59:35 +0000 (12:59 +0100)]
ALSA: snd-usb-caiaq: Missing lock around use of buffer positions

Fix a race which causes snd_pcm_update_hw_ptr_pos() to report a bug.

Signed-off-by: Mark Hills <mark@pogo.org.uk>
Acked-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: sound/parisc: Move dereference after NULL test
Julia Lawall [Sat, 17 Oct 2009 06:33:47 +0000 (08:33 +0200)]
ALSA: sound/parisc: Move dereference after NULL test

If the NULL test on h is needed in snd_harmony_mixer_init, then the
dereference should be after the NULL test.

Actually, there is a sequence of calls: snd_harmony_create, then
snd_harmony_pcm_init, and then snd_harmony_mixer_init.  snd_harmony_create
initializes h, but may indeed leave it as NULL.  There was no NULL test at
the beginning of snd_harmony_pcm_init, so I have added one.  The NULL test
in snd_harmony_mixer_init is then not necessary, but in case the ordering
of the calls changes, I have left it, and moved the dereference after it.

A simplified version of the semantic match that detects this problem is as
follows (http://coccinelle.lip6.fr/):

// <smpl>
@match exists@
expression x, E;
identifier fld;
@@

* x->fld
  ... when != \(x = E\|&x\)
* x == NULL
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: sound: Move dereference after NULL test and drop unnecessary NULL tests
Julia Lawall [Sat, 17 Oct 2009 06:33:22 +0000 (08:33 +0200)]
ALSA: sound: Move dereference after NULL test and drop unnecessary NULL tests

In pcm.c, if the NULL test on pcm is needed, then the dereference should be
after the NULL test.

In dummy.c and ali5451.c, the context of the calls to
snd_card_dummy_new_mixer and snd_ali_free_voice show that dummy and pvoice,
respectively cannot be NULL.

A simplified version of the semantic match that detects this problem is as
follows (http://coccinelle.lip6.fr/):

// <smpl>
@match exists@
expression x, E;
identifier fld;
@@

* x->fld
  ... when != \(x = E\|&x\)
* x == NULL
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: hda_intel: Add the Linux device ID for NVIDIA HDA controller
peer chen [Thu, 15 Oct 2009 08:37:47 +0000 (16:37 +0800)]
ALSA: hda_intel: Add the Linux device ID for NVIDIA HDA controller

Add the generic device ID for NVIDIA HDA controller.

Signed-off-by: Peer Chen <peerchen@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: pcsp - Fix nforce workaround
Stas Sergeev [Fri, 30 Oct 2009 10:51:24 +0000 (11:51 +0100)]
ALSA: pcsp - Fix nforce workaround

The attached patch fixes the problems introduced in this commit:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=eea0579fc85e64e9f05361d5aacf496fe7a151aa

- Fix nForce workaround by honouring the pointer_update var
- Revert "ns" to u64, as per the hrtimer API
- Revert to the zero-delay timer startup, since I can't reproduce any
  problem with it (please, give me the hint!)

Signed-off-by: Stas Sergeev <stsp@aknet.ru>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: SND_CS5535AUDIO: Remove the X86 platform dependency
Wu Zhangjin [Thu, 15 Oct 2009 02:22:54 +0000 (10:22 +0800)]
ALSA: SND_CS5535AUDIO: Remove the X86 platform dependency

SND_CS5535AUDIO is available on Loongson(MIPS compatible) family
machines, and checked it with ARCH=x86_64, no relative compiling
warnings & errors, so, remove the platform dependency directly.

Reported-by: rixed@happyleptic.org
Acked-by: Andres Salomon <dilinger@collabora.co.uk>
Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoxfs: fix xfs_quota remove error
Ryota Yamauchi [Fri, 30 Oct 2009 08:27:44 +0000 (09:27 +0100)]
xfs: fix xfs_quota remove error

The xfs_quota returns ENOSYS when remove command is executed.
Reproducable with following steps.

    # mount -t xfs -o uquota /dev/sda7 /mnt/mp1
    # xfs_quota -x -c off -c remove
    XFS_QUOTARM: Function not implemented.

The remove command is allowed during quotaoff, but xfs_fs_set_xstate()
checks whether quota is running, and it leads to ENOSYS.

To solve this problem, add a check for X_QUOTARM.

Signed-off-by: Ryota Yamauchi <r-yamauchi@vf.jp.nec.com>
Signed-off-by: Utako Kusaka <u-kusaka@wm.jp.nec.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
14 years agoxfs: free temporary cursor in xfs_dialloc
Eric Sandeen [Fri, 30 Oct 2009 08:27:07 +0000 (09:27 +0100)]
xfs: free temporary cursor in xfs_dialloc

Commit bd169565993b39b9b4b102cdac8b13e0a259ce2f seems
to have a slight regression where this code path:

    if (!--searchdistance) {
        /*
         * Not in range - save last search
         * location and allocate a new inode
         */
        ...
        goto newino;
    }

doesn't free the temporary cursor (tcur) that got dup'd in
this function.

This leaks an item in the xfs_btree_cur zone, and it's caught
on module unload:

===========================================================
BUG xfs_btree_cur: Objects remaining on kmem_cache_close()
-----------------------------------------------------------

It seems like maybe a single free at the end of the function might
be cleaner, but for now put a del_cursor right in this code block
similar to the handling in the rest of the function.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Christoph Hellwig <hch@lst.de>
14 years agopcnet_cs: add cis of PreMax PE-200 ethernet pcmcia card
Ken Kawasaki [Sat, 17 Oct 2009 15:39:20 +0000 (15:39 +0000)]
pcnet_cs: add cis of PreMax PE-200 ethernet pcmcia card

pcnet_cs,serial_cs:

add cis of PreMax ethernet pcmcia card,
and some Sierra Wireless serial card(AC555, AC7xx, AC8xx).

use PROD_ID for AC7xx, because MANF_ID of AC7xx and AC8xx are the same.

Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agor8169: Fix card drop incoming VLAN tagged MTU byte large jumbo frames
Raimonds Cicans [Mon, 26 Oct 2009 10:52:37 +0000 (10:52 +0000)]
r8169: Fix card drop incoming VLAN tagged MTU byte large jumbo frames

r8169 card drop incoming VLAN tagged MTU byte large jumbo frames

It looks to compare current and maximal packet sizes hardware use
'<' operator, not '<='.

Bug introduced by commit fdd7b4c3302c93f6833e338903ea77245eb510b4
("r8169: fix crash when large packets are received")

Signed-off-by: Raimonds Cicans <ray@apollo.lv>
Signed-off-by: David S. Miller <davem@davemloft.net>