pandora-kernel.git
15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Fri, 22 Aug 2008 15:37:45 +0000 (08:37 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: hda - Fix call of alc888_coef_init()
  ALSA: hda_intel: enable snoop for nvidia HDA controller

15 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
Linus Torvalds [Fri, 22 Aug 2008 15:37:07 +0000 (08:37 -0700)]
Merge branch 'for_linus' of git://git./linux/kernel/git/tytso/ext4

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
  ext4: Update documentation to remind users to update mke2fs.conf
  ext4: Fix small file fragmentation
  ext4: Initialize writeback_index to 0 when allocating a new inode
  ext4: make sure ext4_has_free_blocks returns 0 for ENOSPC
  ext4: journal credit fix for the delayed allocation's writepages() function
  ext4: Rework the ext4_da_writepages() function
  ext4: journal credits reservation fixes for DIO, fallocate
  ext4: journal credits reservation fixes for extent file writepage
  ext4: journal credits calulation cleanup and fix for non-extent writepage
  ext4: Fix bug where we return ENOSPC even though we have plenty of inodes
  ext4: don't try to resize if there are no reserved gdt blocks left
  ext4: Use ext4_discard_reservations instead of mballoc-specific call
  ext4: Fix ext4_dx_readdir hash collision handling
  ext4: Fix delalloc release block reservation for truncate
  ext4: Fix potential truncate BUG due to i_prealloc_list being non-empty
  ext4: Handle unwritten extent properly with delayed allocation

15 years agoMerge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 22 Aug 2008 15:36:55 +0000 (08:36 -0700)]
Merge branch 'sched-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  sched: enable LB_BIAS by default

15 years agoMerge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 22 Aug 2008 15:36:42 +0000 (08:36 -0700)]
Merge branch 'core-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  rcu: fix synchronize_rcu() so that kernel-doc works

15 years agoMerge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 22 Aug 2008 15:36:20 +0000 (08:36 -0700)]
Merge branch 'timers-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  nohz: fix wrong event handler after online an offlined cpu

15 years agoMerge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Fri, 22 Aug 2008 15:23:53 +0000 (08:23 -0700)]
Merge branch 'x86-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86: work around MTRR mask setting, v2
  x86: fix section mismatch warning - uv_cpu_init
  x86: fix VMI for early params
  x86: fix two modpost warnings in mm/init_64.c
  x86: fix 1:1 mapping init on 64-bit (memory hotplug case)
  x86: work around MTRR mask setting
  x86: PAT Update validate_pat_support for intel CPUs
  devmem, x86: PAT Change /dev/mem mmap with O_SYNC to use UC_MINUS
  x86: PAT proper tracking of set_memory_uc and friends
  x86: fix BUG: unable to handle kernel paging request (numaq_tsc_disable)
  x86: export pv_lock_ops non-GPL
  x86, mmiotrace: silence section mismatch warning - leave_uniprocessor
  x86: use WARN() in arch/x86/kernel
  x86: use WARN() in arch/x86/mm/ioremap.c
  werror: fix pci calgary
  x86: fix oprofile + hibernation badness
  x86, SGI UV: hardcode the TLB flush interrupt system vector
  x86: fix Xorg startup/shutdown slowdown with PAT
  x86: fix "kernel won't boot on a Cyrix MediaGXm (Geode)"
  x86 iommu: remove unneeded parenthesis

15 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzi...
Linus Torvalds [Fri, 22 Aug 2008 15:22:33 +0000 (08:22 -0700)]
Merge branch 'upstream-linus' of git://git./linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  [libata] pata_it821x: fix warning
  libata: Fix a large collection of DMA mode mismatches
  ahci: sis controllers actually can do PMP
  pata_via: clean up recent tf_load changes
  libata: restore SControl on detach
  libata: use ata_link_printk() when printing SError
  libata: always do follow-up SRST if hardreset returned -EAGAIN
  libata: fix EH action overwriting in ata_eh_reset()
  sata_mv: add the Gen IIE flag to the SoC devices.
  ata_piix: IDE Mode SATA patch for Intel Ibex Peak DeviceIDs
  ahci: RAID mode SATA patch for Intel Ibex Peak DeviceIDs
  sata_mv: don't issue two DMA commands concurrently
  libata: implement no[hs]rst force params

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
Linus Torvalds [Fri, 22 Aug 2008 15:21:48 +0000 (08:21 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/roland/infiniband

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  IPoIB: Fix deadlock on RTNL in ipoib_stop()
  IB/ipath: Fix incorrect check for max physical address in TID
  IB/ipath: Fix lost UD send work request

15 years agoALSA: hda - Fix call of alc888_coef_init()
Takashi Iwai [Fri, 22 Aug 2008 13:24:22 +0000 (15:24 +0200)]
ALSA: hda - Fix call of alc888_coef_init()

Using init_hook to call alc888_coef_init() is problematic for configurations
that already set another init_hook.  Better to put it in alc_init() as is
(although it looks a bit hackish).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agox86: work around MTRR mask setting, v2
Ingo Molnar [Fri, 22 Aug 2008 06:22:23 +0000 (08:22 +0200)]
x86: work around MTRR mask setting, v2

improve the debug printout:

- make it actually display something
- print it only once

would be nice to have a WARN_ONCE() facility, to feed such things to
kerneloops.org.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: fix section mismatch warning - uv_cpu_init
Marcin Slusarz [Thu, 21 Aug 2008 18:49:05 +0000 (20:49 +0200)]
x86: fix section mismatch warning - uv_cpu_init

WARNING: vmlinux.o(.cpuinit.text+0x3cc4): Section mismatch in reference from the function uv_cpu_init() to the function .init.text:uv_system_init()
The function __cpuinit uv_cpu_init() references
a function __init uv_system_init().
If uv_system_init is only used by uv_cpu_init then
annotate uv_system_init with a matching annotation.

uv_system_init was ment to be called only once, so do it from codepath
(native_smp_prepare_cpus) which is called once, right before activation
of other cpus (smp_init).

Note: old code relied on uv_node_to_blade being initialized to 0,
but it'a not initialized from anywhere.

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Acked-by: Jack Steiner <steiner@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years ago[libata] pata_it821x: fix warning
Jeff Garzik [Fri, 22 Aug 2008 06:33:23 +0000 (02:33 -0400)]
[libata] pata_it821x: fix warning

Reported by Andrew Morton:
drivers/ata/pata_it821x.c: In function 'it821x_port_start':
drivers/ata/pata_it821x.c:609: warning: 'mtype' may be used uninitialized in
this function

Pretty horrid fix, but so's a warning..

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agolibata: Fix a large collection of DMA mode mismatches
Alan Cox [Fri, 1 Aug 2008 08:18:34 +0000 (09:18 +0100)]
libata: Fix a large collection of DMA mode mismatches

Dave Müller sent a diff for the pata_oldpiix that highlighted a problem
where a lot of the ATA drivers assume dma_mode == 0 means "no DMA" while
the core code uses 0xFF.

This turns out to have other consequences such as code doing >= XFER_UDMA_0
also catching 0xFF as UDMAlots. Fortunately it doesn't generally affect
set_dma_mode, although some drivers call back into their own set mode code
from other points.

Having been through the drivers I've added helpers for using_udma/using_mwdma
dma_enabled so that people don't open code ranges that may change (eg if UDMA8
appears somewhere)

Thanks to David for the initial bits
[and added fix for pata_oldpiix from and signed-off-by Dave Mueller
 <dave.mueller@gmx.ch>  -jg]

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agoahci: sis controllers actually can do PMP
Tejun Heo [Fri, 1 Aug 2008 03:51:43 +0000 (12:51 +0900)]
ahci: sis controllers actually can do PMP

SIS controllers were blacklisted for PMP as enabling it made device
detection fail whether the device was PMP or not - the natural
conclusion was the controller chokes on SRST w/ pmp==15.  However, it
turned out that the controller just didn't like issuing SRST after
hardreset w/o clearing SError first.  Interestingly, the SRST itself
succeeds but the following commands fail.

If SError is cleared between hardreset and SRST, which is the default
behavior now, everything works fine and SIS controllers work with PMPs
happily.

Remove PMP blacklisting for SIS AHCIs.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Piter PUNK <piterpunk@slackware.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agopata_via: clean up recent tf_load changes
Tejun Heo [Thu, 31 Jul 2008 09:02:35 +0000 (18:02 +0900)]
pata_via: clean up recent tf_load changes

Commit bfce5e0179ad059035df28558724ff60af708e09 implemented custom
tf_load for pata_via.  This patch cleans it up a bit.

* Instead of duplicating whole body, copy tf and set ATA_TFLAG_DEVICE
  when necessary.

* Rename via_ata_tf_load() to via_tf_load().

* No need to set .tf_load in via_port_ops_noirq as it inherits from
  via_port_ops.

* Clean up indentation.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Joseph Chan <JosephChan@via.com.tw>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agolibata: restore SControl on detach
Tejun Heo [Thu, 31 Jul 2008 07:09:34 +0000 (16:09 +0900)]
libata: restore SControl on detach

Save SControl during probing and restore it on detach.  This prevents
adjustments made by libata drivers to seep into the next driver which
gets attached (be it a libata one or not).

It's not clear whether SControl also needs to be restored on suspend.
The next system to have control (ACPI or kexec'd kernel) would
probably like to see the original SControl value but there's no
guarantee that a link is gonna keep working after SControl is adjusted
without a reset and adding a reset and modified recovery cycle soley
for this is an overkill.  For now, do it only for detach.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agolibata: use ata_link_printk() when printing SError
Tejun Heo [Thu, 31 Jul 2008 07:08:38 +0000 (16:08 +0900)]
libata: use ata_link_printk() when printing SError

SError belongs to link not port.  Use ata_link_printk() to print it.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agolibata: always do follow-up SRST if hardreset returned -EAGAIN
Tejun Heo [Thu, 31 Jul 2008 07:08:02 +0000 (16:08 +0900)]
libata: always do follow-up SRST if hardreset returned -EAGAIN

As an optimization, follow-up SRST used to be skipped if
classification wasn't requested even when hardreset requested it via
-EAGAIN.  However, some hardresets can't wait for device readiness and
skipping SRST can cause timeout or other failures during revalidation.
Always perform follow-up SRST if hardreset returns -EAGAIN.  This
makes reset paths more predictable and thus less error-prone.

While at it, move hardreset error checking such that it's done right
after hardreset is finished.  This simplifies followup SRST condition
check a bit and makes the reset path easier to modify.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agolibata: fix EH action overwriting in ata_eh_reset()
Tejun Heo [Thu, 31 Jul 2008 07:07:04 +0000 (16:07 +0900)]
libata: fix EH action overwriting in ata_eh_reset()

ehc->i.action got accidentally overwritten to ATA_EH_HARD/SOFTRESET in
ata_eh_reset().  The original intention was to clear reset action
which wasn't selected.  This can cause unexpected behavior when other
EH actions are scheduled together with reset.  Fix it.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agosata_mv: add the Gen IIE flag to the SoC devices.
Saeed Bishara [Mon, 4 Aug 2008 11:52:55 +0000 (00:52 -1100)]
sata_mv: add the Gen IIE flag to the SoC devices.

The SoC sata port is based on the 7042/6042 devices (Gen IIE). This patch
will fix various issues when working with PMP and/or NCQ.

Signed-off-by: Saeed Bishara <saeed@marvell.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agoata_piix: IDE Mode SATA patch for Intel Ibex Peak DeviceIDs
Seth Heasley [Tue, 12 Aug 2008 00:03:18 +0000 (17:03 -0700)]
ata_piix: IDE Mode SATA patch for Intel Ibex Peak DeviceIDs

This patch adds the Intel Ibex Peak (PCH) IDE mode SATA Controller DeviceIDs.

Signed-off-by: Seth Heasley <seth.heasley@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agoahci: RAID mode SATA patch for Intel Ibex Peak DeviceIDs
Seth Heasley [Tue, 12 Aug 2008 00:03:09 +0000 (17:03 -0700)]
ahci: RAID mode SATA patch for Intel Ibex Peak DeviceIDs

Resend with proper whitespace.

This patch adds the Intel Ibex Peak (PCH) SATA RAID Controller DeviceIDs.

Signed-off-by: Seth Heasley <seth.heasley@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agosata_mv: don't issue two DMA commands concurrently
Tejun Heo [Wed, 13 Aug 2008 11:24:16 +0000 (20:24 +0900)]
sata_mv: don't issue two DMA commands concurrently

sata_mv allowed issuing two DMA commands concurrently which the
hardware allows.  Unfortunately, libata core layer isn't ready for
this yet and spews ugly warning message and malfunctions on this.
Don't allow concurrent DMA commands for now.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agolibata: implement no[hs]rst force params
Tejun Heo [Wed, 13 Aug 2008 11:19:09 +0000 (20:19 +0900)]
libata: implement no[hs]rst force params

Implement force params nohrst, nosrst and norst.  This is to work
around reset related problems and ease debugging.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agox86: fix VMI for early params
Alok Kataria [Thu, 21 Aug 2008 18:32:26 +0000 (11:32 -0700)]
x86: fix VMI for early params

while fixing a different bug i moved the call to vmi_init before
early params could be parsed.

This broke the vmi specific commandline parameters.
Fix that, by moving vmi initialization after kernel has got a chance to
parse early parameters.

Signed-off-by: Alok N Kataria <akataria@vmware.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: fix two modpost warnings in mm/init_64.c
Jan Beulich [Thu, 21 Aug 2008 13:28:42 +0000 (14:28 +0100)]
x86: fix two modpost warnings in mm/init_64.c

early_io{re,un}map() are __init and hence can't be called from __meminit
functions.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: fix 1:1 mapping init on 64-bit (memory hotplug case)
Jan Beulich [Thu, 21 Aug 2008 13:27:22 +0000 (14:27 +0100)]
x86: fix 1:1 mapping init on 64-bit (memory hotplug case)

While I don't have a hotplug capable system at hand, I think two issues need
fixing:

- pud_phys (in kernel_physical_ampping_init()) would remain uninitialized in
  the after_bootmem case

- the locking done just around phys_pmd_{init,update}() would leave out pgd
  updates, and it was needlessly covering code portions that do allocations
  (perhaps using a more friendly gfp value in alloc_low_page() would then be
  possible)

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: work around MTRR mask setting
Yinghai Lu [Fri, 22 Aug 2008 03:24:24 +0000 (20:24 -0700)]
x86: work around MTRR mask setting

Joshua Hoblitt reported that only 3 GB of his 16 GB of RAM is
usable. Booting with mtrr_show showed us the BIOS-initialized
MTRR settings - which are all wrong.

So the root cause is that the BIOS has not set the mask correctly:

>               [    0.429971]  MSR00000200: 00000000d0000000
>               [    0.433305]  MSR00000201: 0000000ff0000800
> should be ==> [    0.433305]  MSR00000201: 0000003ff0000800
>
>               [    0.436638]  MSR00000202: 00000000e0000000
>               [    0.439971]  MSR00000203: 0000000fe0000800
> should be ==> [    0.439971]  MSR00000203: 0000003fe0000800
>
>               [    0.443304]  MSR00000204: 0000000000000006
>               [    0.446637]  MSR00000205: 0000000c00000800
> should be ==> [    0.446637]  MSR00000205: 0000003c00000800
>
>               [    0.449970]  MSR00000206: 0000000400000006
>               [    0.453303]  MSR00000207: 0000000fe0000800
> should be ==> [    0.453303]  MSR00000207: 0000003fe0000800
>
>               [    0.456636]  MSR00000208: 0000000420000006
>               [    0.459970]  MSR00000209: 0000000ff0000800
> should be ==> [    0.459970]  MSR00000209: 0000003ff0000800

So detect this borkage and add the prefix 111.

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoMerge master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Thu, 21 Aug 2008 23:31:08 +0000 (16:31 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm

* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] 5212/1: pxa: fix build error when CPU_PXA310 is not defined
  [ARM] 5208/1: fsg-setup.c fixes
  [ARM] fix impd1.c build warning
  [ARM] e400 config use MFP
  [ARM] e740 config use MFP
  [ARM] Fix eseries IRQ limit
  [ARM] clocklib: Update users of aliases to new API
  [ARM] clocklib: Allow dynamic alias creation
  [ARM] eseries: whitespace fixes and cleanup

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
Linus Torvalds [Thu, 21 Aug 2008 20:48:37 +0000 (13:48 -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:
  pnp: fix "add acpi:* modalias entries"
  UIO: generic irq handling for some uio platform devices
  UIO: uio_pdrv: fix license specification
  UIO: uio_pdrv: fix memory leak
  block: drop references taken by class_find_device()
  block: fix partial read() of /proc/{partitions,diskstats}
  PM: Remove WARN_ON from device_pm_add
  driver core: add init_name to struct device
  PM: don't skip device PM init when CONFIG_PM_SLEEP isn't set and CONFIG_PM is set
  driver model: anti-oopsing medicine
  dev_printk(): constify the `dev' argument
  drivers/base/driver.c: remove unused to_dev() macro
  Documentation: HOWTO-ja_JP-sync patch
  Japanese translation of Documentation/SubmitChecklist
  kobject: Replace ALL occurrences of '/' with '!' instead of only the first one.

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
Linus Torvalds [Thu, 21 Aug 2008 20:48:07 +0000 (13:48 -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: sisusbvga: add USB ID for 0711:0918 Magic Control Technology Corp.
  USB: automatically enable RHSC interrupts
  USB: Don't rebind before "complete" callback
  USB: Add new PM callback methods for USB
  USB: Defer Set-Interface for suspended devices
  USB: Add udev argument to interface suspend/resume functions
  USB: cdc-acm: don't unlock acm->mutex on error path
  MUSB: Fix index register corruption seen with g_ether and Windows host
  usb: musb: get rid of MUSB_LOGLEVEL and use parameter
  usb: musb: get rid of procfs entry
  USB: Fix pxa27x_udc usb speed handling.
  USB: cdc-acm: quirk for Conexant CX93010 USB modem
  USB: fix bug in usb_unlink_anchored_urbs()
  usb-serial: option support HSDPA modem A2502
  USB: ISP1760: fixed trivial math in comment

15 years ago[S390] Update default configuration.
Martin Schwidefsky [Thu, 21 Aug 2008 17:46:41 +0000 (19:46 +0200)]
[S390] Update default configuration.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] dcssblk: fix race in dcssblk_add_store()
Gerald Schaefer [Thu, 21 Aug 2008 17:46:40 +0000 (19:46 +0200)]
[S390] dcssblk: fix race in dcssblk_add_store()

Concurrently adding the same segment may lead to duplicate device_register()
calls, which will trigger an error in kobject code:
"... don't try to register things with the same name in the same directory".
This patch adds a check to avoid this.

Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] cio: call ccw driver notify function with lock held
Peter Oberparleiter [Thu, 21 Aug 2008 17:46:39 +0000 (19:46 +0200)]
[S390] cio: call ccw driver notify function with lock held

Calling a ccw driver's notify function without the ccw device lock
held opens up a race window between discovery and handling of a change
in the device operational state. As a result, the device driver may
encounter unexpected device malfunction, leading to out-of-retry
situations or similar.

Remove race by extending the ccw device lock from state change
discovery to the calling of the notify function.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] dasd: fix data size for PSF/PRSSD command
Stefan Weinhuber [Thu, 21 Aug 2008 17:46:38 +0000 (19:46 +0200)]
[S390] dasd: fix data size for PSF/PRSSD command

The Perform Subsystem Function/Prepare for Read Subsystem Data
command requires 12 bytes of parameter data, but the respective data
structure dasd_psf_prssd_data has a length of 16 bytes.
Current storage servers ignore the obsolete bytes, but older models
fail to execute the command and report an incorrect length error.
This causes the device initilization for these devices to fail.
To fix this problem we need to correct the dasd_psf_prssd_data
structure and shorten it to the correct length.

Reported-by: Ivan Warren <ivan@vmfacility.fr>
Reviewed-by: Ivan Warren <ivan@vmfacility.fr>
Tested-by: Ivan Warren <ivan@vmfacility.fr>
CC: stable <stable@kernel.org>
Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
15 years ago[S390] fix ext2_find_next_bit
Eric Sandeen [Thu, 21 Aug 2008 17:46:37 +0000 (19:46 +0200)]
[S390] fix ext2_find_next_bit

ext4 does not work on s390 because ext2_find_next_bit is broken. Fortunately
this function is only used by ext4. The function uses ffs which does not work
analog to ffz. The result of ffs has an offset of 1 which is not taken into
account. To fix this use the low level __ffs_word function directly instead
of the ill defined ffs.

In addition the patch improves find_next_zero_bit and ext2_find_next_zero_bit
by passing the bit offset into __ffz_word instead of adding it after the
function call returned.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] cio: fix ccw group device cleanup
Peter Oberparleiter [Thu, 21 Aug 2008 17:46:36 +0000 (19:46 +0200)]
[S390] cio: fix ccw group device cleanup

Fix ccw group device initialization: initialize device object before
using reference counting during cleanup.

Fixes the following message when group device initialization fails
(e.g. because too few devices where specified):

  kobject: '<NULL>' (..): is not initialized, yet kobject_put() is
           being called.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] qdio: remove the module_get & module_put pair
Jan Glauber [Thu, 21 Aug 2008 17:46:35 +0000 (19:46 +0200)]
[S390] qdio: remove the module_get & module_put pair

Increasing the qdio reference count for every used subchannel
is unnecessary since unloading qdio (if build as a module) is
only possible if other modules that use qdio are unloaded.
Unloading modules that use qdio in turn requires that these
modules shut down all qdio subchannels. Therefore the additional
module_get reference is not needed.

Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] qdio: improve s390 debug feature usage
Jan Glauber [Thu, 21 Aug 2008 17:46:34 +0000 (19:46 +0200)]
[S390] qdio: improve s390 debug feature usage

Improve s390 debug feature usage:
- log busy bit in dbf
- increase size of dbf views
- consistent logging of qdio api calls to setup view
- print subchannel number so one can associate the interface
  with the dbf data
- only log events to one view

Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] qdio: prevent oopsing if qdio_establish fails
Jan Glauber [Thu, 21 Aug 2008 17:46:33 +0000 (19:46 +0200)]
[S390] qdio: prevent oopsing if qdio_establish fails

If qdio_establish fails we call qdio_shutdown to cleanup the
qdio subchannel. The tiq_list entry may not be valid at that
time, therefore we must ignore queues with an invalid list entry
in tiqdio_remove_input_queues.

Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] Remove unneeded spinlock initialization.
Heiko Carstens [Thu, 21 Aug 2008 17:46:32 +0000 (19:46 +0200)]
[S390] Remove unneeded spinlock initialization.

Remove the now unneeded s390_idle.lock spinlock initialization after
Josef Sipek did it the right way in arch/s390/kernel/process.c.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] Fix uninitialized spinlock use
Josef 'Jeff' Sipek [Thu, 21 Aug 2008 17:46:31 +0000 (19:46 +0200)]
[S390] Fix uninitialized spinlock use

Ever since commit 43ca5c3a1cefdaa09231d64485b8f676118bf1e0 ([S390] Convert
monitor calls to function calls.), the kernel refused to IPL with spinlock
debugging enabled.

BUG: spinlock bad magic on CPU#0, swapper/0
 lock: 00000000003a4668, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0
CPU: 0 Not tainted 2.6.25 #1
Process swapper (pid: 0, task: 000000000034f958, ksp: 0000000000377d60)
0000000000377ab8 0000000000352628 0000000000377d60 0000000000377d60
       0000000000016af4 00000000fffff7b5 0000000000377d60 0000000000000000
       0000000000000000 0000000000377a18 0000000000000009 0000000000377a18
       0000000000377a78 000000000023c920 0000000000016af4 0000000000377a18
       0000000000000005 0000000000000000 0000000000377b58 0000000000377ab8
Call Trace:
([<0000000000016a60>] show_trace+0xdc/0x108)
 [<0000000000016b4e>] show_stack+0xc2/0xfc
 [<0000000000016c9a>] dump_stack+0xb2/0xc0
 [<0000000000172dd4>]

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] drivers/s390: Use an IS_ERR test rather than a NULL test
Julien Brunel [Thu, 21 Aug 2008 17:46:30 +0000 (19:46 +0200)]
[S390] drivers/s390: Use an IS_ERR test rather than a NULL test

In case of error, functions dasd_kmalloc_request and idal_buffer_alloc
return an ERR pointer, but never return the NULL pointer. So after a
call to one of these functions, a NULL test should be replaced by an
IS_ERR test.

A simplified version of the semantic patch that makes this change is
as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@correct_null_test@
expression x,E;
statement S1, S2;
@@
x =
(
  dasd_kmalloc_request(...)
|
  idal_buffer_alloc(...)
)
<... when != x = E
if (
(
- x@p2 != NULL
+ ! IS_ERR ( x )
|
- x@p2 == NULL
+ IS_ERR( x )
)
 )
S1
else S2
...>
? x = E;
// </smpl>

Signed-off-by: Julien Brunel <brunel@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years agoUSB: sisusbvga: add USB ID for 0711:0918 Magic Control Technology Corp.
Stefan Lippers-Hollmann [Thu, 21 Aug 2008 11:46:11 +0000 (13:46 +0200)]
USB: sisusbvga: add USB ID for 0711:0918 Magic Control Technology Corp.

sisusbvga: add USB ID for 0711:0918 Magic Control Technology Corp.

usb 1-2: new high speed USB device using ehci_hcd and address 4
usb 1-2: configuration #1 chosen from 1 choice
usb 1-2: USB2VGA dongle found at address 4
usb 1-2: Allocated 8 output buffers
usb 1-2: 8MB 1 ch/1 r SDR SDRAM, bus width 32
usb 1-2: New USB device found, idVendor=0711, idProduct=0918
usb 1-2: New USB device strings: Mfr=0, Product=0, SerialNumber=0

Signed-off-by: Stefan Lippers-Hollmann <s.L-H@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: automatically enable RHSC interrupts
Alan Stern [Wed, 20 Aug 2008 21:22:05 +0000 (17:22 -0400)]
USB: automatically enable RHSC interrupts

This patch (as1069c) changes the way OHCI root-hub status-change
interrupts are enabled.  Currently a special HCD method,
hub_irq_enable(), is called when the hub driver is finished using a
root hub.  This approach turns out to be subject to races, resulting
in unnecessary polling.

The patch does away with the method entirely.  Instead, the driver
automatically enables the RHSC interrupt when no more status changes
are present.  This scheme is safe with controllers using
level-triggered semantics for their interrupt flags.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: Don't rebind before "complete" callback
Alan Stern [Tue, 12 Aug 2008 18:34:14 +0000 (14:34 -0400)]
USB: Don't rebind before "complete" callback

This patch (as1130) fixes an incompatibility between the new PM
infrastructure and USB power management.  We are not allowed to call
drivers' probe routines during a system sleep transition between the
"prepare" and "complete" callbacks, but that's exactly what we do when
a driver doesn't have full suspend/resume support.  Such drivers are
unbound during the "suspend" call and reprobed during the "resume" call.

The patch causes the reprobe step to be skipped if the "complete"
callback hasn't been issued yet, i.e., if the interface's
dev.power.status field is not equal to DPM_ON.  Thus during the
"resume" callback nothing bad will happen, and during the final
"complete" callback the reprobing will occur as desired.

This fixes the problem reported in Bugzilla #11263.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: Add new PM callback methods for USB
Alan Stern [Tue, 12 Aug 2008 18:34:10 +0000 (14:34 -0400)]
USB: Add new PM callback methods for USB

This patch (as1129) adds support for the new PM callbacks to usbcore.
The new callbacks merely invoke the same old USB power management
routines as the old ones did.

A minor improvement is that the callbacks are present only in the
"USB-device" device_type structure, rather than in the bus_type
structure.  This way they will be invoked only for USB devices, not
for USB interfaces.  The core USB PM routines automatically handle
suspending and resuming interfaces along with their devices.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: Defer Set-Interface for suspended devices
Alan Stern [Tue, 12 Aug 2008 18:33:59 +0000 (14:33 -0400)]
USB: Defer Set-Interface for suspended devices

This patch (as1128) fixes one of the problems related to the new PM
infrastructure.  We are not allowed to register new child devices
during the middle of a system sleep transition, but unbinding a USB
driver causes the core to automatically install altsetting 0 and
thereby create new endpoint pseudo-devices.

The patch fixes this problem (and the related problem that installing
altsetting 0 will fail if the device is suspended) by deferring the
Set-Interface call until some later time when it is legal and can
succeed.  Possible later times are: when a new driver is being probed
for the interface, and when the interface is being resumed.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: Add udev argument to interface suspend/resume functions
Alan Stern [Tue, 12 Aug 2008 18:33:27 +0000 (14:33 -0400)]
USB: Add udev argument to interface suspend/resume functions

This patch (as1127) makes a minor change to the prototypes of the
usb_suspend_interface() and usb_resume_interface() routines.  Now the
usb_device structure is passed as an argument, instead of being
computed on-the-fly from the usb_interface argument.

It makes the code look simpler, even if it really isn't much different
from before.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: cdc-acm: don't unlock acm->mutex on error path
Alexey Dobriyan [Wed, 20 Aug 2008 23:56:04 +0000 (16:56 -0700)]
USB: cdc-acm: don't unlock acm->mutex on error path

On Wed, Jul 23, 2008 at 03:52:36PM +0300, Andrei Popa wrote:
> I installed gnokii-0.6.22-r2 and gave the command "gnokii --identify"
> and the kernel oopsed:
>
> BUG: unable to handle kernel NULL pointer dereference at 00000458
> IP: [<c0444b52>] mutex_unlock+0x0/0xb
>  [<c03830ae>] acm_tty_open+0x4c/0x214

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Tested-by: Andrei Popa <andrei.popa@i-neo.ro>
Cc: stable <stable@kernel.org> [2.6.25.x, 2.6.26.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoMUSB: Fix index register corruption seen with g_ether and Windows host
Anand Gadiyar [Thu, 21 Aug 2008 14:51:00 +0000 (20:21 +0530)]
MUSB: Fix index register corruption seen with g_ether and Windows host

If Indexed Mode register accesses are enabled, the ep0_rxstate()
function calls musb_g_ep0_giveback() before writing to the CSR
register. When control returns to this ep0_rxstate, the index
register contents are over-written. This causes the CSR register
write to fail.

Fixed by writing the correct value into the index register before
writing to the CSR.

This was observed only in ep0_rxstate() with g_ether loaded and
the device connected to a MS Windows host PC. Anticipatively fixed
ep0_txstate() as well.

Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Acked-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agousb: musb: get rid of MUSB_LOGLEVEL and use parameter
Felipe Balbi [Sun, 10 Aug 2008 18:22:35 +0000 (21:22 +0300)]
usb: musb: get rid of MUSB_LOGLEVEL and use parameter

We can change debugging level on the fly via
/sys/module/musb_hdrc/parameters/debug.

We can also get rid of the LOGLEVEL facility in Kconfig
and rely only in module parameter.

Cc: Anand Gadiyar <gadiyar@ti.com>
Cc: Bryan Wu <bryan.wu@analog.com>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agousb: musb: get rid of procfs entry
Felipe Balbi [Sun, 10 Aug 2008 18:22:34 +0000 (21:22 +0300)]
usb: musb: get rid of procfs entry

Drivers should not add procfs. The functionality in the old
procfs file will be moved to debugfs.

Cc: Anand Gadiyar <gadiyar@ti.com>
Cc: Bryan Wu <bryan.wu@analog.com>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: Fix pxa27x_udc usb speed handling.
Robert Jarzmik [Mon, 11 Aug 2008 16:28:13 +0000 (18:28 +0200)]
USB: Fix pxa27x_udc usb speed handling.

The new composite framework revealed a weakness in the
pxa27x_udc driver gadget register function. Instead of
checking if speed asked for was USB_LOW_SPEED upon
usb_gadget_register() to deny service, it checked only
for USB_FULL_SPEED, thus denying service to usb high
speed capable gadgets (like g_ether).

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: cdc-acm: quirk for Conexant CX93010 USB modem
Eric Sandeen [Thu, 14 Aug 2008 13:25:40 +0000 (08:25 -0500)]
USB: cdc-acm: quirk for Conexant CX93010 USB modem

This patch gets my Rosewill RNX-56USB USB modem (with Conexant CX93010
chipset) up and running to the point where I can send AT commands and
retrieve caller ID data, which is all I want to do with it.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Acked-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: fix bug in usb_unlink_anchored_urbs()
Oliver Neukum [Mon, 18 Aug 2008 14:36:52 +0000 (16:36 +0200)]
USB: fix bug in usb_unlink_anchored_urbs()

Irqs must not accidentally be reenabled.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agousb-serial: option support HSDPA modem A2502
Hiroshi Miura [Tue, 19 Aug 2008 08:58:25 +0000 (10:58 +0200)]
usb-serial: option support HSDPA modem A2502

This patch  support  NTT DoCoMo A2502 3G/HSDPA modem on option driver.
It is produced by AnyDATA Corp. and also sold as KT Freetelecom (Korea) ADU 620UW.

It support 3.6Mbps/7.2Mbps hight speed communication.
I have tested A2502 with NTT DoCoMo MoperaU ISP service.

Signed-off-by: Hiroshi Miura <miurahr@nttdata.co.jp>
Signed-off-by: Matthias Urlichs <matthias@urlichs.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: ISP1760: fixed trivial math in comment
Enrico Scholz [Tue, 19 Aug 2008 22:06:22 +0000 (00:06 +0200)]
USB: ISP1760: fixed trivial math in comment

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Acked-by: Sebastian Siewior <sebastian@breakpoint.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agopnp: fix "add acpi:* modalias entries"
Kay Sievers [Thu, 21 Aug 2008 13:28:56 +0000 (15:28 +0200)]
pnp: fix "add acpi:* modalias entries"

With 22454cb99fc39f2629ad06a7eccb3df312f8830e we added only the
first entry of the device table. We need to loop over the whole
device list.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUIO: generic irq handling for some uio platform devices
Magnus Damm [Fri, 11 Jul 2008 09:55:27 +0000 (18:55 +0900)]
UIO: generic irq handling for some uio platform devices

This is V3 of uio_pdrv_genirq.c, a platform driver for UIO with
generic IRQ handling code. This driver is very similar to the regular
UIO platform driver, but is only suitable for devices that are
connected to the interrupt controller using unique interrupt lines.

The uio_pdrv_genirq driver includes generic interrupt handling code
which disables the serviced interrupt in the interrupt controller
and makes the user space driver responsible for acknowledging the
interrupt in the device and reenabling the interrupt in the interrupt
controller.

Shared interrupts are not supported since the in-kernel interrupt
handler will disable the interrupt line in the interrupt controller,
and in a shared interrupt configuration this will stop other devices
from delivering interrupts.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Hans J. Koch <hjk@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUIO: uio_pdrv: fix license specification
Uwe Kleine-König [Fri, 11 Jul 2008 09:10:37 +0000 (11:10 +0200)]
UIO: uio_pdrv: fix license specification

Thanks to Magnus Damm for pointing that out.

Signed-off-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
Cc: Magnus Damm <magnus.damm@gmail.com>
Acked-by: Hans J. Koch <hjk@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUIO: uio_pdrv: fix memory leak
Uwe Kleine-König [Fri, 11 Jul 2008 09:10:36 +0000 (11:10 +0200)]
UIO: uio_pdrv: fix memory leak

Thanks to Magnus Damm for pointing that out.

Signed-off-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
Cc: Magnus Damm <magnus.damm@gmail.com>
Acked-by: Hans J. Koch <hjk@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoblock: drop references taken by class_find_device()
Kay Sievers [Sat, 16 Aug 2008 12:30:30 +0000 (14:30 +0200)]
block: drop references taken by class_find_device()

Otherwise we leak references, which is not a good thing to do.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoblock: fix partial read() of /proc/{partitions,diskstats}
Kay Sievers [Sat, 16 Aug 2008 12:30:30 +0000 (14:30 +0200)]
block: fix partial read() of /proc/{partitions,diskstats}

The proc files get truncated if they do not fit into the buffer with
a single read(). We need to move the seq_file index from the callback
of class_find_device() to the caller of class_find_device(), to keep
its value across multiple invocations of the callback.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoPM: Remove WARN_ON from device_pm_add
Rafael J. Wysocki [Fri, 8 Aug 2008 23:05:13 +0000 (01:05 +0200)]
PM: Remove WARN_ON from device_pm_add

PM: Remove WARN_ON from device_pm_add

Fix message in device_pm_add() saying that the device will not be
added to dpm_list, although in fact the device is going to be added
to the list regardless of the ordering violation.

Remove the WARN_ON(true) triggered in that situation, because it is
hit by USB very often and spams the users' logs.

This patch fixes bug #11263

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agodriver core: add init_name to struct device
Greg Kroah-Hartman [Fri, 30 May 2008 17:45:12 +0000 (10:45 -0700)]
driver core: add init_name to struct device

This gives us a way to handle both the bus_id and init_name values being
used for a while during the transition period.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoPM: don't skip device PM init when CONFIG_PM_SLEEP isn't set and CONFIG_PM is set
Alan Stern [Thu, 7 Aug 2008 17:06:12 +0000 (13:06 -0400)]
PM: don't skip device PM init when CONFIG_PM_SLEEP isn't set and CONFIG_PM is set

This patch (as1124) fixes a couple of bugs in the PM core.  The new
dev->power.status field should be initialized regardless of whether
CONFIG_PM_SLEEP is enabled, and similarly dpm_sysfs_add() should be
called whenever CONFIG_PM is enabled.

The patch separates out the call to dpm_sysfs_add() from the call to
device_pm_add().  As a result device_pm_add() can no longer return an
error, so its return type is changed to void.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Romit Dasgupta <romit@ti.com>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agodriver model: anti-oopsing medicine
David Brownell [Thu, 7 Aug 2008 01:52:44 +0000 (18:52 -0700)]
driver model: anti-oopsing medicine

Anti-oops medicine for the class iterators ... the oops was
observed when a class was implicitly referenced before it
was initialized.

[Modified by Greg to spit a warning back so someone knows to fix their code]

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agodev_printk(): constify the `dev' argument
Jean Delvare [Wed, 30 Jul 2008 19:29:21 +0000 (12:29 -0700)]
dev_printk(): constify the `dev' argument

Add const markings to dev_name and dev_driver_string to make it clear that
dev_printk doesn't modify dev.  This is a prerequisite to adding more
const markings to other functions make it clearer, which functions can
modify dev and which can't.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agodrivers/base/driver.c: remove unused to_dev() macro
Joe Perches [Wed, 30 Jul 2008 19:29:20 +0000 (12:29 -0700)]
drivers/base/driver.c: remove unused to_dev() macro

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoDocumentation: HOWTO-ja_JP-sync patch
Tsugikazu Shibata [Thu, 21 Aug 2008 02:42:39 +0000 (11:42 +0900)]
Documentation: HOWTO-ja_JP-sync patch

Here is a patch for Documentation/ja_JP/HOWTO sync with latest
Documentation/HOWTO.
It includes translation of changes done by Jon Corbet,Jiri Pirko and me:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=history;f=Documentation/HOWTO;h=c2371c5a98f99b5eaa785bd0affd6c40187e84e3;hb=HEAD

Singed-off-by: Tsugikazu Shibata <tshibata@ab.jp.nec.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoJapanese translation of Documentation/SubmitChecklist
Takenori Nagano [Tue, 15 Jul 2008 08:49:42 +0000 (17:49 +0900)]
Japanese translation of Documentation/SubmitChecklist

Hi,

This patch adds SubmitChecklist translated into Japanese to
Documentation/ja_JP directory.
The translated SubmitChecklist has already been reviewed by JF project.

SubmitChecklist is one of the important policy documents.
So, I would like to merge into 2.6.27.

Signed-off-by: Takenori Nagano <t-nagano@ah.jp.nec.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agokobject: Replace ALL occurrences of '/' with '!' instead of only the first one.
Ingo Oeser [Tue, 22 Jul 2008 23:25:01 +0000 (01:25 +0200)]
kobject: Replace ALL occurrences of '/' with '!' instead of only the first one.

A recent patch from Kay Sievers <kay.sievers@vrfy.org>
replaced the first occurrence of '/' with '!' as needed for block devices.

Now do some cheap defensive coding and replace all of them to avoid future
issues in this area.

Signed-off-by: Ingo Oeser <ioe-lkml@rameria.de>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agox86: PAT Update validate_pat_support for intel CPUs
venkatesh.pallipadi@intel.com [Wed, 20 Aug 2008 23:45:53 +0000 (16:45 -0700)]
x86: PAT Update validate_pat_support for intel CPUs

Pentium III and Core Solo/Duo CPUs have an erratum
" Page with PAT set to WC while associated MTRR is UC may consolidate to UC "
which can result in WC setting in PAT to be ineffective. We will disable
PAT on such CPUs, so that we can continue to use MTRR WC setting.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agodevmem, x86: PAT Change /dev/mem mmap with O_SYNC to use UC_MINUS
venkatesh.pallipadi@intel.com [Wed, 20 Aug 2008 23:45:52 +0000 (16:45 -0700)]
devmem, x86: PAT Change /dev/mem mmap with O_SYNC to use UC_MINUS

All kernel mappings like ioremap(), etc uses UC_MINUS as the type. /dev/mem
mappings with /dev/mem being opened with O_SYNC however was using UC,
resulting in a conflict with /dev/mem mmap failing. This seems to be
affecting some apps (one being flashrom) which are using O_SYNC and which were
working before.

Switch /dev/mem with O_SYNC also to UC_MINUS.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: PAT proper tracking of set_memory_uc and friends
venkatesh.pallipadi@intel.com [Wed, 20 Aug 2008 23:45:51 +0000 (16:45 -0700)]
x86: PAT proper tracking of set_memory_uc and friends

Big thinko in pat memtype tracking code. reserve_memtype should be called
with physical address and not virtual address.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: fix BUG: unable to handle kernel paging request (numaq_tsc_disable)
Vegard Nossum [Wed, 20 Aug 2008 16:18:26 +0000 (18:18 +0200)]
x86: fix BUG: unable to handle kernel paging request (numaq_tsc_disable)

This section mismatch:

>> Seems to be a section mismatch; init_intel() is __cpuinit while
>> numaq_tsc_disable() is __init. Seems to be introduced in:
>>
>> commit 64898a8bad8c94ad7a4bd5cc86b66edfbb081f4a
>> Author: Yinghai Lu <yhlu.kernel@gmail.com>
>> Date:   Sat Jul 19 18:01:16 2008 -0700
>>
>>    x86: extend and use x86_quirks to clean up NUMAQ code
>
> Oops, I am wrong about numaq_tsc_disable() being __init. Still, I
> believe that Yinghai might be able to say what's really wrong :-)

Would lead to this crash:

  BUG: unable to handle kernel paging request at c08a45f0
  IP: [<c08a45f0>] numaq_tsc_disable+0x0/0x40

Fixed by the patch below.

Signed-off-by: Vegard Nossum <vegardno@ifi.uio.no>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: export pv_lock_ops non-GPL
Jeremy Fitzhardinge [Wed, 20 Aug 2008 18:31:07 +0000 (11:31 -0700)]
x86: export pv_lock_ops non-GPL

None of the spinlock API is exported GPL, so there's no reason for
pv_lock_ops to be.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: drago01 <drago01@gmail.com>
15 years agox86, mmiotrace: silence section mismatch warning - leave_uniprocessor
Marcin Slusarz [Wed, 20 Aug 2008 19:07:47 +0000 (21:07 +0200)]
x86, mmiotrace: silence section mismatch warning - leave_uniprocessor

WARNING: vmlinux.o(.text+0x180af): Section mismatch in reference from the function leave_uniprocessor() to the function .cpuinit.text:cpu_up()
The function leave_uniprocessor() references
the function __cpuinit cpu_up().
This is often because leave_uniprocessor lacks a __cpuinit
annotation or the annotation of cpu_up is wrong.

leave_uniprocessor calls cpu_up only when CONFIG_HOTPLUG_CPU is set,
so it can be safely annotated as __ref

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: Pekka Paalanen <pq@iki.fi>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Pekka Paalanen <pq@iki.fi>
15 years agoALSA: hda_intel: enable snoop for nvidia HDA controller
Peer Chen [Wed, 20 Aug 2008 23:43:24 +0000 (16:43 -0700)]
ALSA: hda_intel: enable snoop for nvidia HDA controller

Enable the snoop for nvidia hda controller to avoid data coherence issue.

Signed-off-by: Peer Chen <peerchen@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agox86: use WARN() in arch/x86/kernel
Arjan van de Ven [Tue, 8 Jul 2008 16:51:56 +0000 (09:51 -0700)]
x86: use WARN() in arch/x86/kernel

Use WARN() instead of a printk+WARN_ON() pair; this way the message
becomes part of the warning section for better reporting/collection.
This also allowed the folding of some if()'s into the WARN()

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Cc: akpm@linux-foundation.org
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: use WARN() in arch/x86/mm/ioremap.c
Arjan van de Ven [Tue, 8 Jul 2008 16:50:22 +0000 (09:50 -0700)]
x86: use WARN() in arch/x86/mm/ioremap.c

Use WARN() instead of a printk+WARN_ON() pair; this way the message
becomes part of the warning section for better reporting/collection.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Cc: akpm@linux-foundation.org
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agowerror: fix pci calgary
David Howells [Mon, 18 Aug 2008 09:58:17 +0000 (11:58 +0200)]
werror: fix pci calgary

Fix an integer comparison always false warning in the PCI Calgary 64 driver.

A u8 is being compared to something that's 512 by default, resulting in the
following warning:

arch/x86/kernel/pci-calgary_64.c:1285: warning: comparison is always false due to limited range of data type

This was introduced by patch b34e90b8f0f30151349134f87b5dc6ef75a5218c.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agonohz: fix wrong event handler after online an offlined cpu
Miao Xie [Wed, 20 Aug 2008 23:37:38 +0000 (16:37 -0700)]
nohz: fix wrong event handler after online an offlined cpu

On the tickless system(CONFIG_NO_HZ=y and CONFIG_HIGH_RES_TIMERS=n), after
I made an offlined cpu online, I found this cpu's event handler was
tick_handle_periodic, not tick_nohz_handler.

After debuging, I found this bug was caused by the wrong tick mode.  the
tick mode is not changed to NOHZ_MODE_INACTIVE when the cpu is offline.

This patch fixes this bug.

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agorcu: fix synchronize_rcu() so that kernel-doc works
Randy Dunlap [Wed, 20 Aug 2008 23:35:19 +0000 (16:35 -0700)]
rcu: fix synchronize_rcu() so that kernel-doc works

Fix RCU's synchronize_rcu() so that it looks like a C function, enabling
it to be recognized as a function with kernel-doc annotation.

Warning(linux-2.6.26-git11//kernel/rcupdate.c:81): No description found for parameter 'synchronize_rcu'
Warning(linux-2.6.26-git11//kernel/rcupdate.c:81): No description found for parameter 'call_rcu'

[akpm@linux-foundation.org: fix comment]
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agosched: enable LB_BIAS by default
Peter Zijlstra [Wed, 20 Aug 2008 10:44:55 +0000 (12:44 +0200)]
sched: enable LB_BIAS by default

Yanmin reported a significant regression on his 16-core machine due to:

  commit 93b75217df39e6d75889cc6f8050343286aff4a5
  Author: Peter Zijlstra <a.p.zijlstra@chello.nl>
  Date:   Fri Jun 27 13:41:33 2008 +0200

Flip back to the old behaviour.

Reported-by: "Zhang, Yanmin" <yanmin_zhang@linux.intel.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoLinux v2.6.27-rc4 v2.6.27-rc4
Linus Torvalds [Thu, 21 Aug 2008 02:35:56 +0000 (19:35 -0700)]
Linux v2.6.27-rc4

15 years agocramfs: fix named-pipe handling
Al Viro [Wed, 20 Aug 2008 21:09:24 +0000 (14:09 -0700)]
cramfs: fix named-pipe handling

After commit a97c9bf33f4612e2aed6f000f6b1d268b6814f3c (fix cramfs
making duplicate entries in inode cache) in kernel 2.6.14, named-pipe
on cramfs does not work properly.

It seems the commit make all named-pipe on cramfs share their inode
(and named-pipe buffer).

Make ..._test() refuse to merge inodes with ->i_ino == 1, take inode setup
back to get_cramfs_inode() and make ->drop_inode() evict ones with ->i_ino
== 1 immediately.

Reported-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: <stable@kernel.org> [2.6.14 and later]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agofbdefio: add set_page_dirty handler to deferred IO FB
Ian Campbell [Wed, 20 Aug 2008 21:09:23 +0000 (14:09 -0700)]
fbdefio: add set_page_dirty handler to deferred IO FB

Fixes kernel BUG at lib/radix-tree.c:473.

Previously the handler was incidentally provided by tmpfs but this was
removed with:

  commit 14fcc23fdc78e9d32372553ccf21758a9bd56fa1
  Author: Hugh Dickins <hugh@veritas.com>
  Date:   Mon Jul 28 15:46:19 2008 -0700

    tmpfs: fix kernel BUG in shmem_delete_inode

relying on this behaviour was incorrect in any case and the BUG also
appeared when the device node was on an ext3 filesystem.

v2: override a_ops at open() time rather than mmap() time to minimise
races per AKPM's concerns.

Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
Cc: Jaya Kumar <jayakumar.lkml@gmail.com>
Cc: Nick Piggin <npiggin@suse.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Hugh Dickins <hugh@veritas.com>
Cc: Johannes Weiner <hannes@saeurebad.de>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Kel Modderman <kel@otaku42.de>
Cc: Markus Armbruster <armbru@redhat.com>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Cc: <stable@kernel.org> [14fcc23fd is in 2.6.25.14 and 2.6.26.1]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agortc: rtc-ds1374: fix 'no irq' case handling
Anton Vorontsov [Wed, 20 Aug 2008 21:09:21 +0000 (14:09 -0700)]
rtc: rtc-ds1374: fix 'no irq' case handling

On a PowerPC board with ds1374 RTC I'm getting this error while RTC tries
to probe:

rtc-ds1374 0-0068: unable to request IRQ

This happens because I2C probing code (drivers/of/of_i2c.c) is specifying
IRQ0 for 'no irq' case, which is correct.

The driver handles this incorrectly, though. This patch fixes it.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Cc: David Brownell <david-b@pacbell.net>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agomm: xip/ext2 fix block allocation race
Nick Piggin [Wed, 20 Aug 2008 21:09:20 +0000 (14:09 -0700)]
mm: xip/ext2 fix block allocation race

XIP can call into get_xip_mem concurrently with the same file,offset with
create=1.  This usually maps down to get_block, which expects the page
lock to prevent such a situation.  This causes ext2 to explode for one
reason or another.

Serialise those calls for the moment.  For common usages today, I suspect
get_xip_mem rarely is called to create new blocks.  In future as XIP
technologies evolve we might need to look at which operations require
scalability, and rework the locking to suit.

Signed-off-by: Nick Piggin <npiggin@suse.de>
Cc: Jared Hulbert <jaredeh@gmail.com>
Acked-by: Carsten Otte <cotte@freenet.de>
Cc: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agomm: xip fix fault vs sparse page invalidate race
Nick Piggin [Wed, 20 Aug 2008 21:09:20 +0000 (14:09 -0700)]
mm: xip fix fault vs sparse page invalidate race

XIP has a race between sparse pages being inserted into page tables, and
sparse pages being zapped when its time to put a non-sparse page in.

What can happen is that a process can be left with a dangling sparse page
in a MAP_SHARED mapping, while the rest of the world sees the non-sparse
version.  Ie.  data corruption.

Guard these operations with a seqlock, making fault-in-sparse-pages the
slowpath, and try-to-unmap-sparse-pages the fastpath.

Signed-off-by: Nick Piggin <npiggin@suse.de>
Cc: Jared Hulbert <jaredeh@gmail.com>
Acked-by: Carsten Otte <cotte@freenet.de>
Cc: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agomm: dirty page tracking race fix
Nick Piggin [Wed, 20 Aug 2008 21:09:18 +0000 (14:09 -0700)]
mm: dirty page tracking race fix

There is a race with dirty page accounting where a page may not properly
be accounted for.

clear_page_dirty_for_io() calls page_mkclean; then TestClearPageDirty.

page_mkclean walks the rmaps for that page, and for each one it cleans and
write protects the pte if it was dirty.  It uses page_check_address to
find the pte.  That function has a shortcut to avoid the ptl if the pte is
not present.  Unfortunately, the pte can be switched to not-present then
back to present by other code while holding the page table lock -- this
should not be a signal for page_mkclean to ignore that pte, because it may
be dirty.

For example, powerpc64's set_pte_at will clear a previously present pte
before setting it to the desired value.  There may also be other code in
core mm or in arch which do similar things.

The consequence of the bug is loss of data integrity due to msync, and
loss of dirty page accounting accuracy.  XIP's __xip_unmap could easily
also be unreliable (depending on the exact XIP locking scheme), which can
lead to data corruption.

Fix this by having an option to always take ptl to check the pte in
page_check_address.

It's possible to retain this optimization for page_referenced and
try_to_unmap.

Signed-off-by: Nick Piggin <npiggin@suse.de>
Cc: Jared Hulbert <jaredeh@gmail.com>
Cc: Carsten Otte <cotte@freenet.de>
Cc: Hugh Dickins <hugh@veritas.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agofix setpriority(PRIO_PGRP) thread iterator breakage
Ken Chen [Wed, 20 Aug 2008 21:09:17 +0000 (14:09 -0700)]
fix setpriority(PRIO_PGRP) thread iterator breakage

When user calls sys_setpriority(PRIO_PGRP ...) on a NPTL style multi-LWP
process, only the task leader of the process is affected, all other
sibling LWP threads didn't receive the setting.  The problem was that the
iterator used in sys_setpriority() only iteartes over one task for each
process, ignoring all other sibling thread.

Introduce a new macro do_each_pid_thread / while_each_pid_thread to walk
each thread of a process.  Convert 4 call sites in {set/get}priority and
ioprio_{set/get}.

Signed-off-by: Ken Chen <kenchen@google.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Roland McGrath <roland@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoVideo/Framebuffer: add fuctional power management support to Blackfin BF54x LQ043...
Michael Hennerich [Wed, 20 Aug 2008 21:09:16 +0000 (14:09 -0700)]
Video/Framebuffer: add fuctional power management support to Blackfin BF54x LQ043 framebuffer driver

Fix bug: does nor properply resume after suspend mem
Fix for PM_SUSPEND_MEM: Save and restore peripheral base and DMA registers

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agobootmem: fix aligning of node-relative indexes and offsets
Johannes Weiner [Wed, 20 Aug 2008 21:09:15 +0000 (14:09 -0700)]
bootmem: fix aligning of node-relative indexes and offsets

Absolute alignment requirements may never be applied to node-relative
offsets.  Andreas Herrmann spotted this flaw when a bootmem allocation on
an unaligned node was itself not aligned because the combination of an
unaligned node with an aligned offset into that node is not garuanteed to
be aligned itself.

This patch introduces two helper functions that align a node-relative
index or offset with respect to the node's starting address so that the
absolute PFN or virtual address that results from combining the two
satisfies the requested alignment.

Then all the broken ALIGN()s in alloc_bootmem_core() are replaced by these
helpers.

Signed-off-by: Johannes Weiner <hannes@saeurebad.de>
Reported-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Debugged-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Reviewed-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Tested-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agodrivers/char/ipmi/ipmi_si_intf.c:default_find_bmc(): fix leak
Andrew Morton [Wed, 20 Aug 2008 21:09:14 +0000 (14:09 -0700)]
drivers/char/ipmi/ipmi_si_intf.c:default_find_bmc(): fix leak

If check_legacy_ioport() returns true, we leak *info.

Addresses http://bugzilla.kernel.org/show_bug.cgi?id=11362

Reported-by: Daniel Marjamki <danielm77@spray.se>
Cc: Christian Krafft <krafft@de.ibm.com>
Cc: Michael Ellerman <michael@ellerman.id.au>
Cc: Corey Minyard <minyard@acm.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agopm2fb: free cmap memory on module remove
Krzysztof Helt [Wed, 20 Aug 2008 21:09:11 +0000 (14:09 -0700)]
pm2fb: free cmap memory on module remove

Release cmap memory allocated in the probe function.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agortc: fix double lock on UIE emulation
Atsushi Nemoto [Wed, 20 Aug 2008 21:09:11 +0000 (14:09 -0700)]
rtc: fix double lock on UIE emulation

With commit 5ad31a575157147b43fa84ef1e21471661653878 ("rtc: remove BKL
for ioctl()"), RTC_UIE_ON ioctl cause double lock on rtc->ops_lock.
The ops_lock must not be held while set_uie() calls rtc_read_time()
which takes the lock.  Also clear_uie() does not need ops_lock.  This
patch fixes return value of RTC_UIE_OFF ioctl too.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: David Brownell <david-b@pacbell.net>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agobinfmt_misc: fix false -ENOEXEC when coupled with other binary handlers
Pavel Emelyanov [Wed, 20 Aug 2008 21:09:10 +0000 (14:09 -0700)]
binfmt_misc: fix false -ENOEXEC when coupled with other binary handlers

In case the binfmt_misc binary handler is registered *before* the e.g.
script one (when for example being compiled as a module) the following
situation may occur:

1. user launches a script, whose interpreter is a misc binary;
2. the load_misc_binary sets the misc_bang and returns -ENOEVEC,
   since the binary is a script;
3. the load_script_binary loads one and calls for search_binary_hander
   to run the interpreter;
4. the load_misc_binary is called again, but refuses to load the
   binary due to misc_bang bit set.

The fix is to move the misc_bang setting lower - prior to the actual
call to the search_binary_handler.

Caused by the commit 3a2e7f47 (binfmt_misc.c: avoid potential kernel
stack overflow)

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Reported-by: Kirill A. Shutemov <kirill@shutemov.name>
Tested-by: Kirill A. Shutemov <kirill@shutemov.name>
Cc: <stable@kernel.org> [2.6.26.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>