13 years agox86/pci: fix mmconfig detection with 32bit near 4g
Yinghai Lu [Wed, 3 Jun 2009 07:13:13 +0000 (00:13 -0700)]
x86/pci: fix mmconfig detection with 32bit near 4g

Pascal reported and bisected a commit:
| x86/PCI: don't call e820_all_mapped with -1 in the mmconfig case

which broke one system system.

ACPI: Using IOAPIC for interrupt routing
PCI: MCFG configuration 0: base f0000000 segment 0 buses 0 - 255
PCI: MCFG area at f0000000 reserved in ACPI motherboard resources
PCI: Using MMCONFIG for extended config space

it didn't have
PCI: updated MCFG configuration 0: base f0000000 segment 0 buses 0 - 63
anymore, and try to use 0xf000000 - 0xffffffff for mmconfig

For 32bit, mcfg_res->end could be 32bit only (if 64 resources aren't used)
So use end - 1 to pass the value in mcfg->end to avoid overflow.

We don't need to worry about the e820 path, they are always 64 bit.

Reported-by: Pascal Terjan <>
Bisected-by: Pascal Terjan <>
Tested-by: Pascal Terjan <>
Signed-off-by: Yinghai Lu <>
Signed-off-by: Jesse Barnes <>
13 years agoPCI: use fixed-up device class when configuring device
Yu Zhao [Wed, 27 May 2009 16:25:05 +0000 (00:25 +0800)]
PCI: use fixed-up device class when configuring device

The device class may be changed after the fixup, so re-read the class
value from pci_dev when configuring the device.  Otherwise some devices
such as JMicron SATA controller won't work.

Reviewed-by: Matthew Wilcox <>
Reviewed-by: Grant Grundler <>
Tested-by: Marc Dionne <>
Signed-off-by: Yu Zhao <>
Signed-off-by: Jesse Barnes <>
13 years agoLinux 2.6.30-rc8 v2.6.30-rc8
Linus Torvalds [Wed, 3 Jun 2009 03:07:25 +0000 (20:07 -0700)]
Linux 2.6.30-rc8

13 years agoMerge branch 'merge' of git://
Linus Torvalds [Wed, 3 Jun 2009 01:06:10 +0000 (18:06 -0700)]
Merge branch 'merge' of git://git./linux/kernel/git/benh/powerpc

* 'merge' of git://
  powerpc/pmac: Update PowerMac 32-bit defconfig

13 years agoparport: quickfix the proc registration bug
Alan Cox [Tue, 2 Jun 2009 15:58:10 +0000 (16:58 +0100)]
parport: quickfix the proc registration bug

Ideally we should have a directory of drivers and a link to the 'active'
driver. For now just show the first device which is effectively the existing
semantics without a warning.

This is an update on the original buggy patch that I then forgot to
resubmit. Confusingly it was proposed by Red Hat, written by Etched Pixels
fixed and submitted by Intel ...

Signed-off-by: Alan Cox <>
Signed-off-by: Linus Torvalds <>
13 years agopata_netcell: LBA48 force identify bits correct
Alan Cox [Tue, 2 Jun 2009 11:34:31 +0000 (12:34 +0100)]
pata_netcell: LBA48 force identify bits correct

This matches Bartlomiej's patch for ide_pci_generic:

In the libata case netcell has its own mini driver. I suspect this fix is
actually only needed for some firmware revs but it does no harm either way.

Signed-off-by: Alan Cox <>
Signed-off-by: Linus Torvalds <>
13 years agoMerge git://
Linus Torvalds [Tue, 2 Jun 2009 16:49:06 +0000 (09:49 -0700)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://
  net_cls: fix unconfigured struct tcf_proto keeps chaining and avoid kernel panic when we use cls_cgroup
  e1000: add missing length check to e1000 receive routine
  forcedeth: add phy_power_down parameter, leave phy powered up by default (v2)
  Bluetooth: Remove useless flush_work() causing lockdep warnings

13 years agoMerge branch 'for-linus' of git://
Linus Torvalds [Tue, 2 Jun 2009 16:47:21 +0000 (09:47 -0700)]
Merge branch 'for-linus' of git://

* 'for-linus' of git://
  xfs: prevent deadlock in xfs_qm_shake()
  xfs: fix overflow in xfs_growfs_data_private
  xfs: fix double unlock in xfs_swap_extents()

13 years agonet_cls: fix unconfigured struct tcf_proto keeps chaining and avoid kernel panic...
Minoru Usui [Tue, 2 Jun 2009 09:17:34 +0000 (02:17 -0700)]
net_cls: fix unconfigured struct tcf_proto keeps chaining and avoid kernel panic when we use cls_cgroup

This patch fixes a bug which unconfigured struct tcf_proto keeps
chaining in tc_ctl_tfilter(), and avoids kernel panic in
cls_cgroup_classify() when we use cls_cgroup.

When we execute 'tc filter add', tcf_proto is allocated, initialized
by classifier's init(), and chained.  After it's chained,
tc_ctl_tfilter() calls classifier's change().  When classifier's
change() fails, tc_ctl_tfilter() does not free and keeps tcf_proto.

In addition, cls_cgroup is initialized in change() not in init().  It
accesses unconfigured struct tcf_proto which is chained before
change(), then hits Oops.

Signed-off-by: Minoru Usui <>
Signed-off-by: Jarek Poplawski <>
Signed-off-by: Jamal Hadi Salim <>
Tested-by: Minoru Usui <>
Signed-off-by: David S. Miller <>
13 years agoe1000: add missing length check to e1000 receive routine
Neil Horman [Tue, 2 Jun 2009 08:29:58 +0000 (01:29 -0700)]
e1000: add missing length check to e1000 receive routine

Patch to fix bad length checking in e1000.  E1000 by default does two

1) Spans rx descriptors for packets that don't fit into 1 skb on recieve
2) Strips the crc from a frame by subtracting 4 bytes from the length prior to
doing an skb_put

Since the e1000 driver isn't written to support receiving packets that span
multiple rx buffers, it checks the End of Packet bit of every frame, and
discards it if its not set.  This places us in a situation where, if we have a
spanning packet, the first part is discarded, but the second part is not (since
it is the end of packet, and it passes the EOP bit test).  If the second part of
the frame is small (4 bytes or less), we subtract 4 from it to remove its crc,
underflow the length, and wind up in skb_over_panic, when we try to skb_put a
huge number of bytes into the skb.  This amounts to a remote DOS attack through
careful selection of frame size in relation to interface MTU.  The fix for this
is already in the e1000e driver, as well as the e1000 sourceforge driver, but no
one ever pushed it to e1000.  This is lifted straight from e1000e, and prevents
small frames from causing the underflow described above

Signed-off-by: Neil Horman <>
Tested-by: Andy Gospodarek <>
Signed-off-by: David S. Miller <>
13 years agoforcedeth: add phy_power_down parameter, leave phy powered up by default (v2)
Ed Swierk [Tue, 2 Jun 2009 07:19:52 +0000 (00:19 -0700)]
forcedeth: add phy_power_down parameter, leave phy powered up by default (v2)

Add a phy_power_down parameter to forcedeth: set to 1 to power down the
phy and disable the link when an interface goes down; set to 0 to always
leave the phy powered up.

The phy power state persists across reboots; Windows, some BIOSes, and
older versions of Linux don't bother to power up the phy again, forcing
users to remove all power to get the interface working (see  Leaving the phy
powered on is the safest default behavior.  Users accustomed to seeing
the link state reflect the interface state and/or wanting to minimize
power consumption can set phy_power_down=1 if compatibility with other
OSes is not an issue.

Signed-off-by: Ed Swierk <>
Signed-off-by: David S. Miller <>
13 years agoxfs: prevent deadlock in xfs_qm_shake()
Felix Blyakher [Mon, 1 Jun 2009 18:13:24 +0000 (13:13 -0500)]
xfs: prevent deadlock in xfs_qm_shake()

It's possible to recurse into filesystem from the memory
allocation, which deadlocks in xfs_qm_shake(). Add check
for __GFP_FS, and bail out if it is not set.

Signed-off-by: Felix Blyakher <>
Signed-off-by: Hedi Berriche <>
Reviewed-by: Christoph Hellwig <>
Reviewed-by: Andi Kleen <>
Signed-off-by: Felix Blyakher <>
13 years agoxfs: fix overflow in xfs_growfs_data_private
Eric Sandeen [Sat, 23 May 2009 19:30:12 +0000 (14:30 -0500)]
xfs: fix overflow in xfs_growfs_data_private

In the case where growing a filesystem would leave the last AG
too small, the fixup code has an overflow in the calculation
of the new size with one fewer ag, because "nagcount" is a 32
bit number.  If the new filesystem has > 2^32 blocks in it
this causes a problem resulting in an EINVAL return from growfs:

 # xfs_io -f -c "truncate 19998630180864" fsfile
 # mkfs.xfs -f -bsize=4096 -dagsize=76288719b,size=3905982455b fsfile
 # mount -o loop fsfile /mnt
 # xfs_growfs /mnt

meta-data=/dev/loop0             isize=256    agcount=52,
agsize=76288719 blks
         =                       sectsz=512   attr=2
data     =                       bsize=4096   blocks=3905982455, imaxpct=5
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0
log      =internal               bsize=4096   blocks=32768, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=0
realtime =none                   extsz=4096   blocks=0, rtextents=0
xfs_growfs: XFS_IOC_FSGROWFSDATA xfsctl failed: Invalid argument

Signed-off-by: Eric Sandeen <>
Reviewed-by: Christoph Hellwig <>
Reviewed-by: Felix Blyakher <>
Signed-off-by: Felix Blyakher <>
13 years agoxfs: fix double unlock in xfs_swap_extents()
Felix Blyakher [Fri, 8 May 2009 00:49:45 +0000 (19:49 -0500)]
xfs: fix double unlock in xfs_swap_extents()

Regreesion from commit ef8f7fc, which rearranged the code in
xfs_swap_extents() leading to double unlock of xfs inode ilock.
That resulted in xfs_fsr deadlocking itself on platforms, which
don't handle double unlock of rw_semaphore nicely. It caused the
count go negative, which represents the write holder, without
really having one. ia64 is one of the platforms where deadlock
was easily reproduced and the fix was tested.

Signed-off-by: Eric Sandeen <>
Reviewed-by: Eric Sandeen <>
Signed-off-by: Felix Blyakher <>
13 years agopowerpc/pmac: Update PowerMac 32-bit defconfig
Benjamin Herrenschmidt [Sun, 24 May 2009 20:34:10 +0000 (20:34 +0000)]
powerpc/pmac: Update PowerMac 32-bit defconfig

This mostly adds back AppleTouch support and adds CONFIG_HIGHMEM
by default.

Signed-off-by: Benjamin Herrenschmidt <>
13 years agoMerge branch 'master' of git://
David S. Miller [Mon, 1 Jun 2009 21:32:08 +0000 (14:32 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/holtmann/bluetooth-2.6

13 years agoMerge git://
Linus Torvalds [Mon, 1 Jun 2009 16:12:44 +0000 (09:12 -0700)]
Merge git://git./linux/kernel/git/herbert/crypto-2.6

* git://
  crypto: hash - Fix handling of sg entry that crosses page boundary

13 years agoMerge branch 'hwmon-for-linus' of git://
Linus Torvalds [Mon, 1 Jun 2009 15:03:09 +0000 (08:03 -0700)]
Merge branch 'hwmon-for-linus' of git://git./linux/kernel/git/jdelvare/staging

* 'hwmon-for-linus' of git://
  hwmon: Update documentation on fan_max
  hwmon: (lm78) Add missing __devexit_p()

13 years agoMerge git://
Linus Torvalds [Mon, 1 Jun 2009 15:02:31 +0000 (08:02 -0700)]
Merge git://git./linux/kernel/git/davem/sparc-2.6

* git://
  sparc64: Fix section attribute warnings.
  sparc64: Fix SET_PERSONALITY to not clip bits outside of PER_MASK.

13 years agoMerge git://
Linus Torvalds [Mon, 1 Jun 2009 15:02:05 +0000 (08:02 -0700)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://
  3c509: Add missing EISA IDs
  MAINTAINERS: take maintainership of the cpmac Ethernet driver
  net/firmare: Ignore .cis files
  ath1e: add new device id for asus hardware
  mlx4_en: Fix a kernel panic when waking tx queue
  rtl8187: add USB ID for Linksys WUSB54GC-EU v2 USB wifi dongle
  at76c50x-usb: avoid mutex deadlock in at76_dwork_hw_scan
  mac8390: fix build with NET_POLL_CONTROLLER
  cxgb3: link fault fixes
  cxgb3: fix dma mapping regression
  netfilter: nfnetlink_log: fix wrong skbuff size calculation
  netfilter: xt_hashlimit does a wrong SEQ_SKIP
  bfin_mac: fix build error due to net_device_ops convert
  atlx: move modinfo data from atlx.h to atl1.c
  gianfar: fix babbling rx error event bug
  cls_cgroup: read classid atomically in classifier
  netfilter: nf_ct_dccp: add missing DCCP protocol changes in event cache
  netfilter: nf_ct_tcp: fix accepting invalid RST segments

13 years agoMerge git://
Linus Torvalds [Mon, 1 Jun 2009 15:01:42 +0000 (08:01 -0700)]
Merge git://git./linux/kernel/git/jaswinder/headers-check-2.6

* git://
  headers_check fix: linux/net_dropmon.h
  headers_check fix: linux/auto_fs.h

13 years agohwmon: Update documentation on fan_max
Christian Engelmayer [Mon, 1 Jun 2009 11:46:50 +0000 (13:46 +0200)]
hwmon: Update documentation on fan_max

Add fan_max description.

Add fan limit alarm 'max_alarm' to the alarm section.

Signed-off-by: Christian Engelmayer <>
Acked-by: Hans de Goede <>
Signed-off-by: Jean Delvare <>
13 years agohwmon: (lm78) Add missing __devexit_p()
Mike Frysinger [Mon, 1 Jun 2009 11:46:49 +0000 (13:46 +0200)]
hwmon: (lm78) Add missing __devexit_p()

The remove function uses __devexit, so the .remove assignment needs
__devexit_p() to fix a build error with hotplug disabled.

Signed-off-by: Mike Frysinger <>
Signed-off-by: Jean Delvare <>
13 years ago3c509: Add missing EISA IDs
Maciej W. Rozycki [Mon, 1 Jun 2009 10:12:04 +0000 (03:12 -0700)]
3c509: Add missing EISA IDs

Several EISA device IDs for 3c509 family network cards are missing from
the driver, making the cards unusable in their EISA mode.  Here's a fix to
add them based on the EISA configuration files distributed by 3Com and our
eisa.ids database.

Signed-off-by: Maciej W. Rozycki <>
Signed-off-by: David S. Miller <>
13 years agoMAINTAINERS: take maintainership of the cpmac Ethernet driver
Florian Fainelli [Mon, 1 Jun 2009 09:43:17 +0000 (02:43 -0700)]
MAINTAINERS: take maintainership of the cpmac Ethernet driver

This patch adds me as the maintainer of the CPMAC (AR7)
Ethernet driver.

Signed-off-by: Florian Fainelli <>
Signed-off-by: David S. Miller <>
13 years agoheaders_check fix: linux/net_dropmon.h
Jaswinder Singh Rajput [Mon, 1 Jun 2009 06:23:25 +0000 (06:23 +0000)]
headers_check fix: linux/net_dropmon.h

fix the following 'make headers_check' warnings:

  usr/include/linux/net_dropmon.h:7: found __[us]{8,16,32,64} type without #include <linux/types.h>

Signed-off-by: Jaswinder Singh Rajput <>
13 years agoheaders_check fix: linux/auto_fs.h
Jaswinder Singh Rajput [Mon, 1 Jun 2009 06:21:13 +0000 (06:21 +0000)]
headers_check fix: linux/auto_fs.h

fix the following 'make headers_check' warnings:

  usr/include/linux/auto_fs.h:17: include of <linux/types.h> is preferred over <asm/types.h>

Signed-off-by: Jaswinder Singh Rajput <>
13 years agocrypto: hash - Fix handling of sg entry that crosses page boundary
Herbert Xu [Sun, 31 May 2009 13:09:22 +0000 (23:09 +1000)]
crypto: hash - Fix handling of sg entry that crosses page boundary

A quirk that we've always supported is having an sg entry that's
bigger than a page, or more generally an sg entry that crosses
page boundaries.  Even though it would be better to explicitly have
to sg entries for this, we need to support it for the existing users,
in particular, IPsec.

The new ahash sg walking code did try to handle this, but there was
a bug where we didn't increment the page so kept on walking on the
first page over an dover again.

This patch fixes it.

Tested-by: Martin Willi <>
Signed-off-by: Herbert Xu <>
13 years agoMerge branch 'for-linus' of git://
Linus Torvalds [Sat, 30 May 2009 22:25:30 +0000 (15:25 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/bart/ide-2.6

* 'for-linus' of git://
  ide_pci_generic: add quirk for Netcell ATA RAID

13 years agoide_pci_generic: add quirk for Netcell ATA RAID
Bartlomiej Zolnierkiewicz [Sat, 30 May 2009 18:06:54 +0000 (20:06 +0200)]
ide_pci_generic: add quirk for Netcell ATA RAID

We need to explicitly mark words 85-87 as valid ones since
firmware doesn't do it.

This should fix support for LBA48 and FLUSH CACHE [EXT] command
which stopped working after we applied more strict checking of
identify words in:

commit 942dcd85bf8edf38cdc3745306ca250684d99a61
("ide: idedisk_supports_lba48() -> ata_id_lba48_enabled()")


commit 4b58f17d7c45a8e5f4acda641bec388398b9c0fa
("ide: ide_id_has_flush_cache() -> ata_id_flush_enabled()")

Reported-and-tested-by: "Trevor Hemsley" <>
Signed-off-by: Bartlomiej Zolnierkiewicz <>
13 years agoMerge branch 'for-linus' of git://
Linus Torvalds [Sat, 30 May 2009 15:04:15 +0000 (08:04 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/ryusuke/nilfs2

* 'for-linus' of git://
  nilfs2: fix bh leak in nilfs_cpfile_delete_checkpoints function

13 years agoMerge branch 'release' of git://
Linus Torvalds [Sat, 30 May 2009 14:57:44 +0000 (07:57 -0700)]
Merge branch 'release' of git://git./linux/kernel/git/lenb/linux-acpi-2.6

* 'release' of git://
  ACPI, i915: build fix (v2)
  acpi-cpufreq: fix printk typo and indentation
  ACPI processor: remove spurious newline from warning message
  drm/i915: acpi/video.c fix section mismatch warning
  ACPI: video: DMI workaround broken Acer 5315 BIOS enabling display brightness
  ACPI: video: DMI workaround broken eMachines E510 BIOS enabling display brightness
  ACPI: sanity check _PSS frequency to prevent cpufreq crash
  i7300_idle: allow testing on i5000-series hardware w/o re-compile
  PCI/ACPI: fix wrong ref count handling in acpi_pci_bind()
  cpuidle: fix AMD C1E suspend hang
  cpuidle: makes AMD C1E work in acpi_idle

13 years agoMerge branch 'fixes' of git://
Linus Torvalds [Sat, 30 May 2009 14:57:33 +0000 (07:57 -0700)]
Merge branch 'fixes' of git://git./linux/kernel/git/djbw/async_tx

* 'fixes' of git://
  fsldma: Fix compile warnings
  fsldma: fix memory leak on error path in fsl_dma_prep_memcpy()
  fsldma: snooping is not enabled for last entry in descriptor chain
  fsldma: fix infinite loop on multi-descriptor DMA chain completion
  fsldma: fix "DMA halt timeout!" errors
  fsldma: fix check on potential fdev->chan[] overflow
  fsldma: update mailling list address in MAINTAINERS

13 years agonilfs2: fix bh leak in nilfs_cpfile_delete_checkpoints function
Ryusuke Konishi [Sat, 30 May 2009 12:50:58 +0000 (21:50 +0900)]
nilfs2: fix bh leak in nilfs_cpfile_delete_checkpoints function

The nilfs_cpfile_delete_checkpoints() wrongly skips brelse() for the
header block of checkpoint file in case of errors.  This fixes the
leak bug.

Signed-off-by: Ryusuke Konishi <>
13 years agonet/firmare: Ignore .cis files
Matt Kraai [Sat, 30 May 2009 05:06:33 +0000 (22:06 -0700)]
net/firmare: Ignore .cis files

Signed-off-by: Matt Kraai <>
Signed-off-by: David S. Miller <>
13 years agoath1e: add new device id for asus hardware
Greg Kroah-Hartman [Sat, 30 May 2009 05:04:54 +0000 (22:04 -0700)]
ath1e: add new device id for asus hardware

Gary Lin reports that a new device id needs to be added to the atl1e in
order to get some new Asus hardware to work properly.

Signed-off-by: Greg Kroah-Hartman <>
Signed-off-by: David S. Miller <>
13 years agomlx4_en: Fix a kernel panic when waking tx queue
Yevgeny Petrilin [Mon, 25 May 2009 20:57:21 +0000 (20:57 +0000)]
mlx4_en: Fix a kernel panic when waking tx queue

When the transmit queue gets full we enable interrupts for TX completions
There was a race that we handled the TX queue both from the interrupt context
and from the transmit function. Using "spin_trylock_irq()" ensures this
doesn't happen.

Signed-off-by: Yevgeny Petrilin <>
Signed-off-by: David S. Miller <>
13 years agoMerge branch 'master' of git://
David S. Miller [Sat, 30 May 2009 04:56:19 +0000 (21:56 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6

13 years agoMerge branches 'bugzilla-13121+', 'bugzilla-13233', 'redhat-bugzilla-500311', 'pci...
Len Brown [Sat, 30 May 2009 01:30:01 +0000 (21:30 -0400)]
Merge branches 'bugzilla-13121+', 'bugzilla-13233', 'redhat-bugzilla-500311', 'pci-bind-oops', 'misc-2.6.30' and 'i7300_idle' into release

13 years agoACPI, i915: build fix (v2)
Len Brown [Sat, 30 May 2009 01:11:27 +0000 (21:11 -0400)]
ACPI, i915: build fix (v2)

drivers/built-in.o: In function `intel_opregion_init':
(.text+0x9d540): undefined reference to `acpi_video_register'

v2: move under DRM_I915 from DRM_I915_KMS

Signed-off-by: Len Brown <>
Signed-off-by: Randy Dunlap <>
13 years agoacpi-cpufreq: fix printk typo and indentation
Joe Perches [Tue, 26 May 2009 21:58:39 +0000 (14:58 -0700)]
acpi-cpufreq: fix printk typo and indentation

Signed-off-by: Joe Perches <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Len Brown <>
13 years agoACPI processor: remove spurious newline from warning message
Frans Pop [Fri, 22 May 2009 08:23:40 +0000 (10:23 +0200)]
ACPI processor: remove spurious newline from warning message

Commit 4973b22a ("ACPI processor: reset the throttling state once it's
invalid") introduced a new warning which prints a spurious newline.

The ACPI_WARNING macro that is used already takes care of adding a
newline, after adding ACPI_CA_VERSION to the message. Remove the newline
to avoid the message getting split into two lines.

Signed-off-by: Frans Pop <>
Signed-off-by: Len Brown <>
13 years agodrm/i915: acpi/video.c fix section mismatch warning
Jaswinder Singh Rajput [Wed, 20 May 2009 06:26:08 +0000 (11:56 +0530)]
drm/i915: acpi/video.c fix section mismatch warning

Currently acpi_video_exit() is exported as well as using __exit which causes:

  WARNING: drivers/acpi/video.o(__ksymtab+0x0): Section mismatch in reference from the variable __ksymtab_acpi_video_exit to the function .exit.text:acpi_video_exit()
  The symbol acpi_video_exit is exported and annotated __exit
  Fix this by removing the __exit annotation of acpi_video_exit or drop the export.

Signed-off-by: Jaswinder Singh Rajput <>
Signed-off-by: Len Brown <>
13 years agoACPI: video: DMI workaround broken Acer 5315 BIOS enabling display brightness
Zhang Rui [Tue, 19 May 2009 19:08:41 +0000 (15:08 -0400)]
ACPI: video: DMI workaround broken Acer 5315 BIOS enabling display brightness

Signed-off-by: Zhang Rui <>
Signed-off-by: Len Brown <>
13 years agoACPI: video: DMI workaround broken eMachines E510 BIOS enabling display brightness
Zhang Rui [Wed, 27 May 2009 03:35:34 +0000 (23:35 -0400)]
ACPI: video: DMI workaround broken eMachines E510 BIOS enabling display brightness

Signed-off-by: Zhang Rui <>
Signed-off-by: Len Brown <>
13 years agoACPI: sanity check _PSS frequency to prevent cpufreq crash
Len Brown [Tue, 26 May 2009 19:11:06 +0000 (15:11 -0400)]
ACPI: sanity check _PSS frequency to prevent cpufreq crash

When BIOS SETUP is changed to disable EIST, some BIOS
hand the OS an un-initialized _PSS:

        Name (_PSS, Package (0x06)
            Package (0x06)
                0x80000000, // frequency [MHz]
                0x80000000, // power [mW]
                0x80000000, // latency [us]
                0x80000000, // BM latency [us]
                0x80000000, // control
                0x80000000 // status

These are outrageous values for frequency,
power and latency, raising the question where to draw
the line between legal and illegal.  We tend to survive
garbage in the power and latency fields, but we can BUG_ON
when garbage is in the frequency field.

Cpufreq multiplies the frequency by 1000 and stores it in a u32 KHz.
So disregard a _PSS with a frequency so large
that it can't be represented by cpufreq.

Signed-off-by: Len Brown <>
13 years agosparc64: Fix section attribute warnings.
David S. Miller [Fri, 29 May 2009 23:12:02 +0000 (16:12 -0700)]
sparc64: Fix section attribute warnings.

CSUM copy to/from user assembler was missing allocatable and
executable attributes for .fixup

Signed-off-by: David S. Miller <>
13 years agoMerge
Linus Torvalds [Fri, 29 May 2009 23:07:39 +0000 (16:07 -0700)]

  [ARM] update mach-types
  [ARM] Add cmpxchg support for ARMv6+ systems (v5)
  [ARM] barriers: improve xchg, bitops and atomic SMP barriers
  Gemini: Fix SRAM/ROM location after memory swap
  MAINTAINER: Add F: entries for Gemini and FA526
  [ARM] disable NX support for OABI-supporting kernels
  [ARM] add coherent DMA mask for mv643xx_eth
  [ARM] pxa/palm: fix PalmLD/T5/TX AC97 MFP
  [ARM] pxa: add parameter to clksrc_read() for pxa168/910
  [ARM] pxa: fix the incorrectly defined drive strength macros for pxa{168,910}
  [ARM] Orion: Remove explicit name for platform device resources
  [ARM] Kirkwood: Correct MPP for SATA activity/presence LEDs of QNAP TS-119/TS-219.
  [ARM] pxa/ezx: fix pin configuration for low power mode
  [ARM] pxa/spitz: provide spitz_ohci_exit() that unregisters USB_HOST GPIO
  [ARM] pxa: enable GPIO receivers after configuring pins
  [ARM] pxa: allow gpio_reset drive high during normal work
  [ARM] pxa: save/restore PGSR on suspend/resume.

13 years agoMerge branch 'for-linus' of git://
Linus Torvalds [Fri, 29 May 2009 19:17:03 +0000 (12:17 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jbarnes/pci-2.6

* 'for-linus' of git://
  PCI Hotplug: acpiphp: don't store a pci_dev in acpiphp_func

13 years agoMerge git://
Linus Torvalds [Fri, 29 May 2009 15:52:13 +0000 (08:52 -0700)]
Merge git://

* git://
  jffs2: Fix corruption when flash erase/write failure
  mtd: MXC NAND driver fixes (v5)

13 years agoMerge git://
Linus Torvalds [Fri, 29 May 2009 15:50:15 +0000 (08:50 -0700)]
Merge git://git./linux/kernel/git/gregkh/usb-2.6

* git://
  Revert "USB: Correct Makefile to make isp1760 buildable"
  usb-serial: fix crash when sub-driver updates firmware
  USB: isp1760: urb_dequeue doesn't always find the urbs
  USB: Yet another Conexant Clone to add to cdc-acm.c
  USB: atmel_usb_udc: Use kzalloc() to allocate ep structures
  USB: atmel-usba-udc : fix control out requests.

13 years agoMerge git://
Linus Torvalds [Fri, 29 May 2009 15:49:52 +0000 (08:49 -0700)]
Merge git://git./linux/kernel/git/gregkh/driver-core-2.6

* git://
  Driver Core: do not oops when driver_unregister() is called for unregistered drivers
  sysfs: file.c: use create_singlethread_workqueue()

13 years agoMerge branch 'for-2.6.30' of git://
Linus Torvalds [Fri, 29 May 2009 15:49:09 +0000 (08:49 -0700)]
Merge branch 'for-2.6.30' of git://

* 'for-2.6.30' of git://
  svcrdma: dma unmap the correct length for the RPCRDMA header page.
  nfsd: Revert "svcrpc: take advantage of tcp autotuning"
  nfsd: fix hung up of nfs client while sync write data to nfs server

13 years agoMerge branch 'for-linus' of git://
Linus Torvalds [Fri, 29 May 2009 15:48:25 +0000 (08:48 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/dtor/input

* 'for-linus' of git://
  Input: libps2 - better handle bad scheduler decisions
  Input: usb1400_ts - fix access to "device data" in resume function
  Input: multitouch - augment event semantics documentation
  Input: multitouch - add tracking ID to the protocol

13 years agoMerge branch 'drm-intel-next' of git://
Linus Torvalds [Fri, 29 May 2009 15:48:13 +0000 (08:48 -0700)]
Merge branch 'drm-intel-next' of git://git./linux/kernel/git/anholt/drm-intel

* 'drm-intel-next' of git://
  i915: Set object to gtt domain when faulting it back in
  drm/i915: Apply a big hammer to 865 GEM object CPU cache flushing.
  drm/i915: Fix tiling pitch handling on 8xx.

13 years agoMerge branch 'for-linus' of git://
Linus Torvalds [Fri, 29 May 2009 15:47:53 +0000 (08:47 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://
  ALSA: hda - Compaq Presario CQ60 patching for Conexant
  sound: usb-audio: make the MotU Fastlane work again
  ALSA: Enable PCM hw_ptr_jiffies check only in xrun_debug mode
  ALSA: Fix invalid jiffies check after pause

13 years ago8250: Fix oops from setserial
Alan Cox [Thu, 28 May 2009 13:01:35 +0000 (14:01 +0100)]
8250: Fix oops from setserial

If you setserial a port which has never been initialised we change the type
but don't update the I/O method pointers. The same problem is true if you
change the io type of a port - but nobody ever does that so nobody noticed!

Remember the old type and when attaching if the type has changed reload the
port accessor pointers. We can't do it blindly as some 8250 drivers load custom
accessors and we must not stomp those.

Tested-by: Victor Seryodkin <>
Closes-bug: #13367
Signed-off-by: Alan Cox <>
Signed-off-by: Linus Torvalds <>
13 years agoedac: AMD8111 & AMD8131 Kconfig fixup
Harry Ciao [Thu, 28 May 2009 21:34:43 +0000 (14:34 -0700)]
edac: AMD8111 & AMD8131 Kconfig fixup

The amd8111_edac.c driver will fail allmodconfig on architectures other
than PPC, introduce Kconfig dependency to avoid this, since both AMD8111
and AMD8131 chips are only adopted on Maple so far.

Signed-off-by: Harry Ciao <>
Cc: Doug Thompson <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
13 years agoedac: AMD8111 & AMD8131 use dev_name()
Harry Ciao [Thu, 28 May 2009 21:34:42 +0000 (14:34 -0700)]
edac: AMD8111 & AMD8131 use dev_name()

The "bus_id" member in the device structure has been obsolete, use
dev_name() instead.

Signed-off-by: Harry Ciao <>
Cc: Doug Thompson <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
13 years agomemcg: fix build warning and avoid checking for mem != null again and again
Nikanth Karthikesan [Thu, 28 May 2009 21:34:41 +0000 (14:34 -0700)]
memcg: fix build warning and avoid checking for mem != null again and again

Fix build warning, "mem_cgroup_is_obsolete defined but not used" when
CONFIG_DEBUG_VM is not set.  Also avoid checking for !mem again and again.

Signed-off-by: Nikanth Karthikesan <>
Acked-by: Pekka Enberg <>
Acked-by: KAMEZAWA Hiroyuki <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
13 years agomm: account for MAP_SHARED mappings using VM_MAYSHARE and not VM_SHARED in hugetlbfs
Mel Gorman [Thu, 28 May 2009 21:34:40 +0000 (14:34 -0700)]
mm: account for MAP_SHARED mappings using VM_MAYSHARE and not VM_SHARED in hugetlbfs


hugetlbfs reserves huge pages but does not fault them at mmap() time to
ensure that future faults succeed.  The reservation behaviour differs
depending on whether the mapping was mapped MAP_SHARED or MAP_PRIVATE.
For MAP_SHARED mappings, hugepages are reserved when mmap() is first
called and are tracked based on information associated with the inode.
Other processes mapping MAP_SHARED use the same reservation.  MAP_PRIVATE
track the reservations based on the VMA created as part of the mmap()
operation.  Each process mapping MAP_PRIVATE must make its own

hugetlbfs currently checks if a VMA is MAP_SHARED with the VM_SHARED flag
and not VM_MAYSHARE.  For file-backed mappings, such as hugetlbfs,
VM_SHARED is set only if the mapping is MAP_SHARED and the file was opened
read-write.  If a shared memory mapping was mapped shared-read-write for
populating of data and mapped shared-read-only by other processes, then
hugetlbfs would account for the mapping as if it was MAP_PRIVATE.  This
causes processes to fail to map the file MAP_SHARED even though it should
succeed as the reservation is there.

This patch alters mm/hugetlb.c and replaces VM_SHARED with VM_MAYSHARE
when the intent of the code was to check whether the VMA was mapped

Signed-off-by: Mel Gorman <>
Cc: Hugh Dickins <>
Cc: Ingo Molnar <>
Cc: <>
Cc: Lee Schermerhorn <>
Cc: KOSAKI Motohiro <>
Cc: <>
Cc: Eric B Munson <>
Cc: Adam Litke <>
Cc: Andy Whitcroft <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
13 years agox86: ignore VM_LOCKED when determining if hugetlb-backed page tables can be shared...
Mel Gorman [Thu, 28 May 2009 21:34:37 +0000 (14:34 -0700)]
x86: ignore VM_LOCKED when determining if hugetlb-backed page tables can be shared or not


On x86 and x86-64, it is possible that page tables are shared beween
shared mappings backed by hugetlbfs.  As part of this,
page_table_shareable() checks a pair of vma->vm_flags and they must match
if they are to be shared.  All VMA flags are taken into account, including

The problem is that VM_LOCKED is cleared on fork().  When a process with a
shared memory segment forks() to exec() a helper, there will be shared
VMAs with different flags.  The impact is that the shared segment is
sometimes considered shareable and other times not, depending on what
process is checking.

What happens is that the segment page tables are being shared but the
count is inaccurate depending on the ordering of events.  As the page
tables are freed with put_page(), bad pmd's are found when some of the
children exit.  The hugepage counters also get corrupted and the Total and
Free count will no longer match even when all the hugepage-backed regions
are freed.  This requires a reboot of the machine to "fix".

This patch addresses the problem by comparing all flags except VM_LOCKED
when deciding if pagetables should be shared or not for hugetlbfs-backed

Signed-off-by: Mel Gorman <>
Acked-by: Hugh Dickins <>
Cc: Ingo Molnar <>
Cc: <>
Cc: Lee Schermerhorn <>
Cc: KOSAKI Motohiro <>
Cc: <>
Cc: Eric B Munson <>
Cc: Adam Litke <>
Cc: Andy Whitcroft <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
13 years agoatmel_lcdfb: correct fifo size for some products
Nicolas Ferre [Thu, 28 May 2009 21:34:36 +0000 (14:34 -0700)]
atmel_lcdfb: correct fifo size for some products

Remove wrong fifo size definition for some AT91 products.

Due to a misunderstanding of some AT91 datasheets, a fifo size of 2048
(words) has been introduced by mistake.  In fact, all products (AT91/AT32)
are sharing the same fifo size of 512 words.

Signed-off-by: Nicolas Ferre <>
Cc: Andrew Victor <>
Acked-by: Haavard Skinnemoen <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
13 years agoS3C-fb: PM fix
Marek Szyprowski [Thu, 28 May 2009 21:34:35 +0000 (14:34 -0700)]
S3C-fb: PM fix

Correctly restore the FrameBuffer register state in the resume function.

Reviewed-by: Kyungmin Park <>
Signed-off-by: Marek Szyprowski <>
Cc: Ben Dooks <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
13 years agoserial: 8250_gsc: fix printk format error
Alexander Beregalov [Thu, 28 May 2009 21:34:34 +0000 (14:34 -0700)]
serial: 8250_gsc: fix printk format error

drivers/serial/8250_gsc.c:44: warning: format '%lx' expects type
'long unsigned int', but argument 2 has type 'resource_size_t'

[ fix it to handle u64's]
Signed-off-by: Alexander Beregalov <>
Cc: Alan Cox <>
Cc: Kyle McMartin <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
13 years agoparport_gsc: fix printk format error
Alexander Beregalov [Thu, 28 May 2009 21:34:33 +0000 (14:34 -0700)]
parport_gsc: fix printk format error

drivers/parport/parport_gsc.c:356: warning: format '%lx' expects type
'long unsigned int', but argument 2 has type 'resource_size_t'

[ fix it to handle u64's]
Signed-off-by: Alexander Beregalov <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
13 years agoflat: fix data sections alignment
Oskar Schirmer [Thu, 28 May 2009 21:34:31 +0000 (14:34 -0700)]
flat: fix data sections alignment

The flat loader uses an architecture's flat_stack_align() to align the
stack but assumes word-alignment is enough for the data sections.

However, on the Xtensa S6000 we have registers up to 128bit width
which can be used from userspace and therefor need userspace stack and
data-section alignment of at least this size.

This patch drops flat_stack_align() and uses the same alignment that
is required for slab caches, ARCH_SLAB_MINALIGN, or wordsize if it's
not defined by the architecture.

It also fixes m32r which was obviously kaput, aligning an
uninitialized stack entry instead of the stack pointer.

[ coding-style fixes]
Signed-off-by: Oskar Schirmer <>
Cc: David Howells <>
Cc: Russell King <>
Cc: Bryan Wu <>
Cc: Geert Uytterhoeven <>
Acked-by: Paul Mundt <>
Cc: Greg Ungerer <>
Signed-off-by: Johannes Weiner <>
Acked-by: Mike Frysinger <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
13 years agoMAINTAINERS: change email address for Thomas Dahlmann
Thomas Dahlmann [Thu, 28 May 2009 21:34:30 +0000 (14:34 -0700)]
MAINTAINERS: change email address for Thomas Dahlmann

Signed-off-by: Thomas <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
13 years agodrivers/serial/mpc52xx_uart.c: fix array overindexing check
Roel Kluin [Thu, 28 May 2009 21:34:29 +0000 (14:34 -0700)]
drivers/serial/mpc52xx_uart.c: fix array overindexing check

The check for an overindexing of mpc52xx_uart_{ports,nodes} has an

Signed-off-by: Roel Kluin <>
Acked-by: Wolfram Sang <>
Acked-by: Grant Likely <>
Cc: Benjamin Herrenschmidt <>
Cc: Alan Cox <>
Cc: <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
13 years agomemcg: fix deadlock between lock_page_cgroup and mapping tree_lock
Daisuke Nishimura [Thu, 28 May 2009 21:34:28 +0000 (14:34 -0700)]
memcg: fix deadlock between lock_page_cgroup and mapping tree_lock

mapping->tree_lock can be acquired from interrupt context.  Then,
following dead lock can occur.

Assume "A" as a page.

-> take mapping->tree_lock.
       take mapping->tree_lock
-> lock_page_cgroup(A)

This patch tries to fix above deadlock by moving memcg's hook to out of
mapping->tree_lock.  charge/uncharge of pagecache/swapcache is protected
by page lock, not tree_lock.

After this patch, lock_page_cgroup() is not called under mapping->tree_lock.

Signed-off-by: KAMEZAWA Hiroyuki <>
Signed-off-by: Daisuke Nishimura <>
Cc: Balbir Singh <>
Cc: Daisuke Nishimura <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
13 years agoprocfs: make errno values consistent when open pident vs exit(2) race occurs
KOSAKI Motohiro [Thu, 28 May 2009 21:34:21 +0000 (14:34 -0700)]
procfs: make errno values consistent when open pident vs exit(2) race occurs

proc_pident_instantiate() has following call flow.


And, proc_pident_lookup() has following error handling.

const struct pid_entry *p, *last;
error = ERR_PTR(-ENOENT);
if (!task)
goto out_no_task;

Then, proc_pident_instantiate should return ENOENT too when racing against
exit(2) occur.

EINAL has two bad reason.
  - it implies caller is wrong. bad the race isn't caller's mistake.
  - man 2 open don't explain EINVAL. user often don't handle it.

Note: Other proc_pid_make_inode() caller already use ENOENT properly.

Acked-by: Eric W. Biederman <>
Cc: Alexey Dobriyan <>
Signed-off-by: KOSAKI Motohiro <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
13 years agocred: #include init.h in cred.h
Alexey Dobriyan [Thu, 28 May 2009 21:34:20 +0000 (14:34 -0700)]
cred: #include init.h in cred.h

linux/cred.h can't be included as first header (alphabetical order)
because it uses __init which is enough to break compilation on some archs.

Signed-off-by: Alexey Dobriyan <>
Acked-by: James Morris <>
Acked-by: David Howells <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
13 years agooom: fix possible oom_dump_tasks NULL pointer
David Rientjes [Thu, 28 May 2009 21:34:19 +0000 (14:34 -0700)]
oom: fix possible oom_dump_tasks NULL pointer

When /proc/sys/vm/oom_dump_tasks is enabled, it is possible to get a NULL
pointer for tasks that have detached mm's since task_lock() is not held
during the tasklist scan.  Add the task_lock().

Acked-by: Nick Piggin <>
Acked-by: Mel Gorman <>
Cc: Rik van Riel <>
Signed-off-by: David Rientjes <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
13 years agoMAINTAINERS: pair EDAC-E752X P: and M: entries
Joe Perches [Thu, 28 May 2009 21:34:18 +0000 (14:34 -0700)]
MAINTAINERS: pair EDAC-E752X P: and M: entries

Entries should be P: name then M: email address.

Signed-off-by: Joe Perches <>
Acked-by: Doug Thompson <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
13 years agortl8187: add USB ID for Linksys WUSB54GC-EU v2 USB wifi dongle
John W. Linville [Wed, 27 May 2009 07:21:57 +0000 (09:21 +0200)]
rtl8187: add USB ID for Linksys WUSB54GC-EU v2 USB wifi dongle

Reported-by: Przemyslaw Kulczycki <>
Signed-off-by: John W. Linville <>
13 years agoat76c50x-usb: avoid mutex deadlock in at76_dwork_hw_scan
John W. Linville [Thu, 28 May 2009 09:39:02 +0000 (11:39 +0200)]
at76c50x-usb: avoid mutex deadlock in at76_dwork_hw_scan

at76_dwork_hw_scan holds a mutex while calling ieee80211_scan_completed,
which then calls at76_config which needs the same mutex.  This reworks
the ordering to not hold the lock while calling ieee80211_scan_completed.

Signed-off-by: John W. Linville <>
13 years agojffs2: Fix corruption when flash erase/write failure
Joakim Tjernlund [Thu, 28 May 2009 15:43:59 +0000 (17:43 +0200)]
jffs2: Fix corruption when flash erase/write failure

Erase errors such as:
"Newly-erased block contained word 0xa4ef223e at offset 0x0296a014"
and failure to write the clean marker,
moves the offending erase block to erasing list before calling
jffs2_erase_failed(). This is bad as jffs2_erase_failed() will
also move the block to the bad_list, but is now moving the
wrong block, causing FS corruption.

Signed-off-by: Joakim Tjernlund <>
Signed-off-by: David Woodhouse <>
13 years agomtd: MXC NAND driver fixes (v5)
Vladimir Barinov [Thu, 23 Apr 2009 11:47:22 +0000 (15:47 +0400)]
mtd: MXC NAND driver fixes (v5)

The following patch fixes:
 - re-initialization of host->col_addr which is used as byte index
   between the successive READID flash commands.
 - compile error when CONFIG_PM is enabled
 - pass on the error code from clk_get()
 - return -ENOMEM in case of failed ioremap()
 - pass on the return value of platform_driver_probe() directly
 - remove excessive printk
 - let command line partition table parsing with mxc_nand name.
   The cmd_line parsing is done via <mtd-id> name that differs
   from mxc_nand by default and looks like "NAND 256MiB 1,8V 8-bit"

Signed-off-by: Vladimir Barinov <>
Signed-off-by: Lothar Wassmann <>
Acked-by: Sascha Hauer <>
Signed-off-by: Artem Bityutskiy <>
Signed-off-by: David Woodhouse <>
13 years agoMerge branch 'for-rmk' of git://
Russell King [Fri, 29 May 2009 09:19:22 +0000 (10:19 +0100)]
Merge branch 'for-rmk' of git://

13 years ago[ARM] update mach-types
Russell King [Fri, 29 May 2009 09:15:08 +0000 (10:15 +0100)]
[ARM] update mach-types

Signed-off-by: Russell King <>
13 years agomac8390: fix build with NET_POLL_CONTROLLER
Finn Thain [Thu, 28 May 2009 02:05:53 +0000 (02:05 +0000)]
mac8390: fix build with NET_POLL_CONTROLLER

Fix the build for CONFIG_NET_POLL_CONTROLLER that I broke with
217cbfa856dc1cbc2890781626c4032d9e3ec59f ("mac8390: fix regression
caused during net_device_ops conversion").

Signed-off-by: Finn Thain <>
Signed-off-by: David S. Miller <>
13 years agocxgb3: link fault fixes
Divy Le Ray [Thu, 28 May 2009 11:23:08 +0000 (11:23 +0000)]
cxgb3: link fault fixes

Do not call t3_link_fault() under spinlock, as it calls msleep().
Besides, only the access to pi->link_fault needs to be serialized.

Also initialize local variables before checking the link status,
link state fields might otherwise end up containing garbage.

Signed-off-by: Divy Le Ray <>
Signed-off-by: David S. Miller <>
13 years agocxgb3: fix dma mapping regression
Divy Le Ray [Thu, 28 May 2009 11:23:02 +0000 (11:23 +0000)]
cxgb3: fix dma mapping regression

Commit 5e68b772e6efd189d6aca76f6872fb75d51ace60
  cxgb3: map entire Rx page, feed map+offset to Rx ring.

introduced a regression on platforms defining DECLARE_PCI_UNMAP_ADDR()
and related macros as no-ops.

Rx descriptors are fed with the a page buffer bus address + page chunk offset.
The page buffer bus address is set and retrieved through
pci_unamp_addr_set(), pci_unmap_addr().
These functions being meaningless on x86 (if CONFIG_DMA_API_DEBUG is not set).
The HW ends up with a bogus bus address.

This patch saves the page buffer bus address for all plaftorms.

Signed-off-by: Divy Le Ray <>
Signed-off-by: David S. Miller <>
13 years agoi7300_idle: allow testing on i5000-series hardware w/o re-compile
Len Brown [Thu, 28 May 2009 03:59:58 +0000 (23:59 -0400)]
i7300_idle: allow testing on i5000-series hardware w/o re-compile

Testing the i7300_idle driver on i5000-series hardware required
an edit to i7300_idle.h to "#define SUPPORT_I5000 1" and a re-build
of both i7300_idle and ioat_dma.

Replace that build-time scheme with a load-time module parameter:
"7300_idle.forceload=1" to make it easier to test the driver
on hardware that while not officially validated, works fine
and is much more commonly available.

By default (no modparam) the driver will continue to load
only on the i7300.

Note that ioat_dma runs a copy of i7300_idle's probe routine
to know to reserve an IOAT channel for i7300_idle.
This change makes ioat_dma do that always on the i5000,
just like it does on the i7300.

Signed-off-by: Len Brown <>
Acked-by: Andrew Henroid <>
13 years agoDriver Core: do not oops when driver_unregister() is called for unregistered drivers
Kay Sievers [Thu, 28 May 2009 21:24:07 +0000 (14:24 -0700)]
Driver Core: do not oops when driver_unregister() is called for unregistered drivers

We also fix a problem with cleaning up properly when initializing
drivers and devices, so checks like this will work successfully.

Portions of the patch by Linus and Greg and Ingo.

Reported-by: Ozan Çağlayan <>
Signed-off-by: Kay Sievers <>
Cc: Linus Torvalds <>
Cc: Ingo Molnar <>
Signed-off-by: Greg Kroah-Hartman <>
13 years agosysfs: file.c: use create_singlethread_workqueue()
Andrew Morton [Thu, 7 May 2009 19:36:53 +0000 (12:36 -0700)]
sysfs: file.c: use create_singlethread_workqueue()

We don't need a kernel thread per CPU for this application.

Acked-by: Alex Chiang <>
Cc: Lai Jiangshan <>
Cc: Peter Zijlstra <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Greg Kroah-Hartman <>
13 years agoRevert "USB: Correct Makefile to make isp1760 buildable"
Mike Frysinger [Wed, 20 May 2009 12:49:48 +0000 (08:49 -0400)]
Revert "USB: Correct Makefile to make isp1760 buildable"

This reverts commit 26e1287594864169577327fef233befc9739be3b.

A larger patch (f7e7aa585) a few days after this one added the same line
to the Makefile, but in a different place.  While it'd be more correct to
revert that one, it's easier to revert this one because this is a

Signed-off-by: Mike Frysinger <>
CC: Greg Kroah-Hartman <>
Signed-off-by: Greg Kroah-Hartman <>
13 years agousb-serial: fix crash when sub-driver updates firmware
Alan Stern [Wed, 27 May 2009 15:25:52 +0000 (11:25 -0400)]
usb-serial: fix crash when sub-driver updates firmware

This patch (as1244) fixes a crash in usb-serial that occurs when a
sub-driver returns a positive value from its attach method, indicating
that new firmware was loaded and the device will disconnect and
reconnect.  The usb-serial core then skips the step of registering the
port devices; when the disconnect occurs, the attempt to unregister
the ports fails dramatically.

This problem shows up with Keyspan devices and it might affect others
as well.

When the attach method returns a positive value, the patch sets
num_ports to 0.  This tells usb_serial_disconnect() not to try
unregistering any of the ports; instead they are cleaned up by

Signed-off-by: Alan Stern <>
Tested-by: Benjamin Herrenschmidt <>
Cc: stable <>
Signed-off-by: Greg Kroah-Hartman <>
13 years agoUSB: isp1760: urb_dequeue doesn't always find the urbs
Warren Free [Fri, 8 May 2009 08:27:08 +0000 (10:27 +0200)]
USB: isp1760: urb_dequeue doesn't always find the urbs

The option driver (and presumably others) allocates several URBs when it
opens and tries to free them when it closes. The isp1760_urb_dequeue
function gets called, but the packet being dequeued is not necessarily at
front of one of the 32 queues. If not, the isp1760_urb_done function doesn't
get called for the URB and the process trying to free it hangs forever on a
wait_queue. This patch does two things. If the URB being dequeued has others
queued behind it, it re-queues them. And it searches the queues looking for
the URB being dequeued rather than just looking at the one at the front of
the queue.

[bigeasy@linutronix] whitespace fixes, reformating

Cc: stable <>
Signed-off-by: Warren Free <>
Signed-off-by: Sebastian Andrzej Siewior <>
Signed-off-by: Greg Kroah-Hartman <>
13 years agoUSB: Yet another Conexant Clone to add to cdc-acm.c
Xiao Kaijian [Thu, 7 May 2009 16:48:23 +0000 (00:48 +0800)]
USB: Yet another Conexant Clone to add to cdc-acm.c

This patch adds another quirky Conexant USB Modem Clone to usb cdc-acm.c

Signed-off-by: Xiao Kaijian <>
Signed-off-by: Greg Kroah-Hartman <>
13 years agoUSB: atmel_usb_udc: Use kzalloc() to allocate ep structures
Haavard Skinnemoen [Tue, 5 May 2009 00:22:43 +0000 (17:22 -0700)]
USB: atmel_usb_udc: Use kzalloc() to allocate ep structures

This ensures that all fields are properly initialized.

Signed-off-by: Haavard Skinnemoen <>
Acked-by: David Brownell <>
Signed-off-by: Greg Kroah-Hartman <>
13 years agoUSB: atmel-usba-udc : fix control out requests.
Martin Fuzzey [Fri, 1 May 2009 15:21:11 +0000 (17:21 +0200)]
USB: atmel-usba-udc : fix control out requests.

usbtest #14 was failing with "udc: ep0: TXCOMP: Invalid endpoint state 2, halting endpoint..."
This occured since ep0 is bidirectional and ep->is_in is not valid (must always use ep->state)

Signed-off-by: Martin Fuzzey <>
Acked-by: David Brownell <>
Acked-by: Haavard Skinnemoen <>
Signed-off-by: Greg Kroah-Hartman <>
13 years ago[ARM] Add cmpxchg support for ARMv6+ systems (v5)
Mathieu Desnoyers [Thu, 28 May 2009 20:07:39 +0000 (16:07 -0400)]
[ARM] Add cmpxchg support for ARMv6+ systems (v5)

Add cmpxchg/cmpxchg64 support for ARMv6K and ARMv7 systems
(original patch from Catalin Marinas <>)

The cmpxchg and cmpxchg64 functions can be implemented using the
LDREX*/STREX* instructions. Since operand lengths other than 32bit are
required, the full implementations are only available if the ARMv6K
extensions are present (for the LDREXB, LDREXH and LDREXD instructions).

For ARMv6, only 32-bits cmpxchg is available.

Mathieu :

Make cmpxchg_local always available with best implementation for all type sizes (1, 2, 4 bytes).
Make cmpxchg64_local always available.

Use "Ir" constraint for "old" operand, like atomic.h atomic_cmpxchg does.

Change since v3 :
- Add "memory" clobbers (thanks to Nicolas Pitre)
- removed __asmeq(), only needed for old compilers, very unlikely on ARMv6+.

Note : ARMv7-M should eventually be ifdefed-out of cmpxchg64. But it's not
supported by the Linux kernel currently.

Put back arm < v6 cmpxchg support.

Signed-off-by: Mathieu Desnoyers <>
CC: Catalin Marinas <>
CC: Nicolas Pitre <>
Signed-off-by: Russell King <>
13 years ago[ARM] barriers: improve xchg, bitops and atomic SMP barriers
Russell King [Mon, 25 May 2009 19:58:00 +0000 (20:58 +0100)]
[ARM] barriers: improve xchg, bitops and atomic SMP barriers

Mathieu Desnoyers pointed out that the ARM barriers were lacking:

- cmpxchg, xchg and atomic add return need memory barriers on
  architectures which can reorder the relative order in which memory
  read/writes can be seen between CPUs, which seems to include recent
  ARM architectures. Those barriers are currently missing on ARM.

- test_and_xxx_bit were missing SMP barriers.

So put these barriers in.  Provide separate atomic_add/atomic_sub
operations which do not require barriers.

Reported-Reviewed-and-Acked-by: Mathieu Desnoyers <>
Signed-off-by: Russell King <>
13 years agoInput: libps2 - better handle bad scheduler decisions
Dmitry Torokhov [Thu, 28 May 2009 16:51:31 +0000 (09:51 -0700)]
Input: libps2 - better handle bad scheduler decisions

Sometimes devices send us their responses in time but due to
unfortunate scheduling decisions the receiving thread does not
get scheduled till much later and we erroneously decide that
device timed out. Work around this problem by checking whether we
received the data we needed instead of checking timeout

Tested-by: Sitsofe Wheeler <>
Signed-off-by: Dmitry Torokhov <>
13 years agoGemini: Fix SRAM/ROM location after memory swap
Paulius Zaleckas [Thu, 28 May 2009 13:42:25 +0000 (16:42 +0300)]
Gemini: Fix SRAM/ROM location after memory swap

Signed-off-by: Paulius Zaleckas <>
13 years agoMAINTAINER: Add F: entries for Gemini and FA526
Paulius Zaleckas [Thu, 28 May 2009 13:41:36 +0000 (16:41 +0300)]
MAINTAINER: Add F: entries for Gemini and FA526

Signed-off-by: Paulius Zaleckas <>
13 years agoMerge branch 'fix/hda' into for-linus
Takashi Iwai [Thu, 28 May 2009 10:02:13 +0000 (12:02 +0200)]
Merge branch 'fix/hda' into for-linus

* fix/hda:
  ALSA: hda - Compaq Presario CQ60 patching for Conexant

13 years agoALSA: hda - Compaq Presario CQ60 patching for Conexant
Tony Vroon [Wed, 27 May 2009 20:00:41 +0000 (21:00 +0100)]
ALSA: hda - Compaq Presario CQ60 patching for Conexant

A docking mic control is shown by default. The Compaq Presario
CQ60 laptop has no docking connector, so designate it as a
CXT5051_HP model.
This makes the phantom mixer slider disappear.

Signed-off-by: Tony Vroon <>
Signed-off-by: Takashi Iwai <>
13 years agosvcrdma: dma unmap the correct length for the RPCRDMA header page.
Steve Wise [Thu, 14 May 2009 21:34:28 +0000 (16:34 -0500)]
svcrdma: dma unmap the correct length for the RPCRDMA header page.

The svcrdma module was incorrectly unmapping the RPCRDMA header page.
On IBM pserver systems this causes a resource leak that results in
running out of bus address space (10 cthon iterations will reproduce it).
The code was mapping the full page but only unmapping the actual header
length.  The fix is to only map the header length.

I also cleaned up the use of ib_dma_map_page() calls since the unmap
logic always uses ib_dma_unmap_single().  I made these symmetrical.

Signed-off-by: Steve Wise <>
Signed-off-by: Tom Tucker <>
Signed-off-by: J. Bruce Fields <>