linux-2.6
16 years agox86: use PTE_MASK in pgtable_32.h
Jeremy Fitzhardinge [Tue, 20 May 2008 07:26:21 +0000 (08:26 +0100)] 
x86: use PTE_MASK in pgtable_32.h

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agox86: use PTE_MASK in 32-bit PAE
Jeremy Fitzhardinge [Tue, 20 May 2008 07:26:20 +0000 (08:26 +0100)] 
x86: use PTE_MASK in 32-bit PAE

Use PTE_MASK in 3-level pagetables (ie, 32-bit PAE).

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Tested-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agox86: rearrange __(VIRTUAL|PHYSICAL)_MASK
Jeremy Fitzhardinge [Tue, 20 May 2008 07:26:19 +0000 (08:26 +0100)] 
x86: rearrange __(VIRTUAL|PHYSICAL)_MASK

Put the definitions of __(VIRTUAL|PHYSICAL)_MASK before their uses.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Tested-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agox86: fix warning on 32-bit non-PAE
Jeremy Fitzhardinge [Tue, 20 May 2008 07:26:18 +0000 (08:26 +0100)] 
x86: fix warning on 32-bit non-PAE

Fix the warning:

include2/asm/pgtable.h: In function `pte_modify':
include2/asm/pgtable.h:290: warning: left shift count >= width of type

On 32-bit PAE the virtual and physical addresses are both 32-bits,
so it ends up evaluating 1<<32.  Do the shift as a 64-bit shift then
cast to the appropriate size.  This should all be done at compile time,
and so have no effect on generated code.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Tested-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agox86: define PTE_MASK in a universally useful way
Jeremy Fitzhardinge [Tue, 20 May 2008 07:26:17 +0000 (08:26 +0100)] 
x86: define PTE_MASK in a universally useful way

Define PTE_MASK so that it contains a meaningful value for all x86
pagetable configurations.  Previously it was defined as a "long" which
means that it was too short to cover a 32-bit PAE pte entry.

It is now defined as a pteval_t, which is an integer type long enough
to contain a full pte (or pmd, pud, pgd).

This fixes an Xorg crash on 32-bit x86 with PAE due to corruption of the
NX bit in mprotect due to the incorrect type/value of PTE_MASK reported
by Hugh Dickins:

  "Yes, thanks Jeremy: I've checked that each stage builds and runs X on
   my boxes here, x86_32 and x86_32+PAE and x86_64.  (So even 1/8 is
   enough to fix the PAT pte_modify issue, though 2/8 then fixes
   compiler warnings.)"

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Tested-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoHID: remove CVS keywords
Adrian Bunk [Mon, 19 May 2008 23:31:25 +0000 (01:31 +0200)] 
HID: remove CVS keywords

This patch removes CVS keywords that weren't updated for a long time
from comments.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
16 years agoHID: Add iMON LCDs to blacklist
Dylan R Semler [Wed, 14 May 2008 09:38:14 +0000 (11:38 +0200)] 
HID: Add iMON LCDs to blacklist

The new iMON LCDs from SoundGraph need to be blacklisted from HID in order to
be used by lirc.

Signed-off-by: Dylan R Semler <dylan.semler@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
16 years agoHID: add Microchip PICKit 1 and PICkit 2 to blacklist
Xiaofan Chen [Tue, 13 May 2008 15:11:59 +0000 (17:11 +0200)] 
HID: add Microchip PICKit 1 and PICkit 2 to blacklist

Microchip PICkit 1 and PICKit 2 USB Programmers are USB HID class of device but
they are not real HID device. They are now supported by libusb based programs
like the following programs.

pk2 and pk2cmd Linux port:
http://home.pacbell.net/theposts/picmicro/
usb_pickit:
http://tfc.duke.free.fr/pickit.html
usb_pickit original version:
http://charm.cs.uiuc.edu/users/olawlor/projects/2003/microchip/

Therefore it ispreferred to blacklist them.

Signed-off-by: Xiaofan Chen <xiaofanc@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
16 years agoHID: split Numlock emulation quirk from HID_QUIRK_APPLE_HAS_FN.
Diego 'Flameeyes' Petteno [Mon, 5 May 2008 14:20:50 +0000 (16:20 +0200)] 
HID: split Numlock emulation quirk from HID_QUIRK_APPLE_HAS_FN.

Since 2.6.25 the HID_QUIRK_APPLE_HAS_FN quirk is enabled even for
non-laptop Apple keyboards of the Aluminium series. The USB version of
these don't need Numlock emulation, like the laptop (and Aluminium
Wireless) do, as they have a proper keypad.

This patch splits the Numlock emulation for Apple keyboards in a
different quirk flag, so that it can be enabled for all the keyboards
but the Aluminium USB ones.

If the Numlock emulation is enabled for Aluminium USB keyboards, the
JKL and UIO keys become the numeric pad, and the rest of the keyboard
is disabled, included the key used to disable Numlock.

Additionally, these keyboard should not have a Numlock at all, as the
Numlock key is instead replaced by the 'Clear' key as usual for Apple
USB keyboards.

Signed-off-by: Diego 'Flameeyes' Petteno <flameeyes@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
16 years ago[POWERPC] Update defconfigs for desktop/server systems
Paul Mackerras [Tue, 20 May 2008 10:04:12 +0000 (20:04 +1000)] 
[POWERPC] Update defconfigs for desktop/server systems

Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[ALSA] hda - Fix ASUS P5GD1 model
Travis Place [Tue, 20 May 2008 09:54:41 +0000 (11:54 +0200)] 
[ALSA] hda - Fix ASUS P5GD1 model

Corrected the model assignment for the ASUS P5GD1 w/SPDIF after reports of
surround sound not being possible.

Signed-off-by: Travis Place <wishie@wishie.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years ago[ALSA] hda - Fix ALC262 fujitsu model
Takashi Iwai [Tue, 20 May 2008 07:23:05 +0000 (09:23 +0200)] 
[ALSA] hda - Fix ALC262 fujitsu model

Fixed the speaker auto-mute with two laptop and docking headphones.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Tony Vroon <tony@linx.net>
16 years agosnd-pcsp: use HRTIMER_CB_SOFTIRQ
Stas Sergeev [Tue, 20 May 2008 09:47:29 +0000 (11:47 +0200)] 
snd-pcsp: use HRTIMER_CB_SOFTIRQ

Change HRTIMER_CB_IRQSAFE to HRTIMER_CB_SOFTIRQ,
as suggested by Thomas Gleixner.
That solves the lock dependancy reported in
Bug #10701.
That also allows to call hrtimer_start()
directly, tasklet "stupid hack" removed.

Signed-off-by: Stas Sergeev <stsp@aknet.ru>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoMerge branch 'for-2.6.26' of master.kernel.org:/pub/scm/linux/kernel/git/galak/powerp...
Paul Mackerras [Tue, 20 May 2008 09:46:37 +0000 (19:46 +1000)] 
Merge branch 'for-2.6.26' of /linux/kernel/git/galak/powerpc into merge

16 years agosparc64: Add global register dumping facility.
David S. Miller [Tue, 20 May 2008 06:46:00 +0000 (23:46 -0700)] 
sparc64: Add global register dumping facility.

When a cpu really is stuck in the kernel, it can be often
impossible to figure out which cpu is stuck where.  The
worst case is when the stuck cpu has interrupts disabled.

Therefore, implement a global cpu state capture that uses
SMP message interrupts which are not disabled by the
normal IRQ enable/disable APIs of the kernel.

As long as we can get a sysrq 'y' to the kernel, we can
get a dump.  Even if the console interrupt cpu is wedged,
we can trigger it from userspace using /proc/sysrq-trigger

The output is made compact so that this facility is more
useful on high cpu count systems, which is where this
facility will likely find itself the most useful :)

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agosparc: remove CVS keywords
Adrian Bunk [Mon, 19 May 2008 23:53:02 +0000 (16:53 -0700)] 
sparc: remove CVS keywords

This patch removes the CVS keywords that weren't updated for a long time
from comments.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agosparc64: remove CVS keywords
Adrian Bunk [Mon, 19 May 2008 23:52:27 +0000 (16:52 -0700)] 
sparc64: remove CVS keywords

This patch removes the CVS keywords that weren't updated for a long time
from comments.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[POWERPC] Fix mpc8377_mds.dts DMA nodes to match spec
Kumar Gala [Sun, 18 May 2008 18:30:03 +0000 (13:30 -0500)] 
[POWERPC] Fix mpc8377_mds.dts DMA nodes to match spec

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] Update arch/powerpc/boot/.gitignore
Kumar Gala [Sun, 18 May 2008 18:25:28 +0000 (13:25 -0500)] 
[POWERPC] Update arch/powerpc/boot/.gitignore

* Add dtbImage.*
* Added zImage.holly
* Folded zImage.coff.lds into zImage.*lds
* Removed some unused zImage.<foo> ignores

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] Remove generated files on make clean
Kumar Gala [Sun, 18 May 2008 18:23:03 +0000 (13:23 -0500)] 
[POWERPC] Remove generated files on make clean

dtbImage.* and several zImage. targets get created but never cleaned up.

Also, moved zImage to the clean-files line associated with all other image
results (was previously duplicated).

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years agoipv6 addrconf: Allow infinite prefix lifetime.
YOSHIFUJI Hideaki [Mon, 19 May 2008 23:56:11 +0000 (16:56 -0700)] 
ipv6 addrconf: Allow infinite prefix lifetime.

We need to handle infinite prefix lifetime specially.
With help from original reporter "Bonitch, Joseph"
<Joseph.Bonitch@xerox.com>.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoipv6 route: Fix lifetime in netlink.
YOSHIFUJI Hideaki [Mon, 19 May 2008 23:55:13 +0000 (16:55 -0700)] 
ipv6 route: Fix lifetime in netlink.

We could not see appropriate lifetime if the route had been scheduled
to expired at 0 (in jiffies).  We should check rt6i_flags instead of
rt6i_expires to determine whether lifetime is valid or not.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoipv6 addrconf: Fix route lifetime setting in corner case.
YOSHIFUJI Hideaki [Mon, 19 May 2008 23:54:29 +0000 (16:54 -0700)] 
ipv6 addrconf: Fix route lifetime setting in corner case.

Because of arithmetic overflow avoidance, the actual lifetime setting
(vs the value given by RA) did not increase monotonically around
0x7fffffff/HZ.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc
Linus Torvalds [Mon, 19 May 2008 23:40:30 +0000 (16:40 -0700)] 
Merge branch 'for-linus' of git://git./linux/kernel/git/drzeus/mmc

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc:
  at91_mci: minor cleanup
  mmc: mmc host test driver
  mmc: Fix omap compile by replacing dev_name with dma_dev_name

16 years agoAdd maintainers for myri10ge driver
Brice Goglin [Sat, 17 May 2008 10:45:36 +0000 (12:45 +0200)] 
Add maintainers for myri10ge driver

Add a MAINTAINERS entry for the myri10ge driver.

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge branch 'audit.b51' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit...
Linus Torvalds [Mon, 19 May 2008 23:38:10 +0000 (16:38 -0700)] 
Merge branch 'audit.b51' of git://git./linux/kernel/git/viro/audit-current

* 'audit.b51' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current:
  [PATCH] list_for_each_rcu must die: audit
  [patch 1/1] audit_send_reply(): fix error-path memory leak
  [PATCH] open sessionid permissions

16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
Linus Torvalds [Mon, 19 May 2008 23:37:45 +0000 (16:37 -0700)] 
Merge branch 'for-linus' of git://git./linux/kernel/git/viro/vfs-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
  [PATCH] return to old errno choice in mkdir() et.al.
  [Patch] fs/binfmt_elf.c: fix wrong return values
  [PATCH] get rid of leak in compat_execve()
  [Patch] fs/binfmt_elf.c: fix a wrong free
  [PATCH] avoid multiplication overflows and signedness issues for max_fds
  [PATCH] dup_fd() part 4 - race fix
  [PATCH] dup_fd() - part 3
  [PATCH] dup_fd() part 2
  [PATCH] dup_fd() fixes, part 1
  [PATCH] take init_files to fs/file.c

16 years agoMerge branch 'for-2.6.26' of git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer...
Linus Torvalds [Mon, 19 May 2008 23:36:28 +0000 (16:36 -0700)] 
Merge branch 'for-2.6.26' of git://git./linux/kernel/git/jwboyer/powerpc-4xx

* 'for-2.6.26' of git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/powerpc-4xx:
  [POWERPC] 4xx: Workaround for CHIP_11 Errata

16 years agoMAINTAINERS needs further order fixing
Alan Cox [Mon, 19 May 2008 13:21:51 +0000 (14:21 +0100)] 
MAINTAINERS needs further order fixing

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years ago[POWERPC] powerpc/mm/hash_low_32.S: Remove CVS keyword
Adrian Bunk [Mon, 19 May 2008 22:07:25 +0000 (01:07 +0300)] 
[POWERPC] powerpc/mm/hash_low_32.S: Remove CVS keyword

This removes a CVS keyword that wasn't updated for a long time from a
comment.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney...
Linus Torvalds [Mon, 19 May 2008 23:33:29 +0000 (16:33 -0700)] 
Merge branch 'for-linus' of git://git./linux/kernel/git/cooloney/blackfin-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6:
  Blackfin SPORTS UART Driver: converting BFIN->BLACKFIN
  Blackfin serial driver: add extra IRQ flag for 8250 serial driver
  8250 Serial Driver: Added support for 8250-class UARTs in HV Sistemas H8606 board
  Blackfin arch: Fix bug - USB fails to build for BF524/BF526
  Blackfin arch: update boards defconfig files
  Blackfin arch: IO Port functions to read/write unalligned memory
  Blackfin arch: enable a choice to provide 4M DMA memory
  Blackfin arch: cleanup the icplb/dcplb multiple hit checks
  Blackfin arch: Add workaround to read edge triggered GPIOs
  Blackfin arch: Sync channel defines with struct dma_register dma_io_base_addr.
  Blackfin arch: Check for Anomaly 05000182
  [Blackfin] arch: rename bf5xx-flash to bfin-async-flash
  [Blackfin] arch: Blackfin checksum annotations

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
Linus Torvalds [Mon, 19 May 2008 23:33:08 +0000 (16:33 -0700)] 
Merge git://git./linux/kernel/git/lethal/sh-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
  sh: Fix up restorer in debug_trap exception return path.
  sh: Make is_valid_bugaddr() more intelligent on nommu.
  sh: use the common ascii hex helpers
  sh: fix sh7785 master clock value
  sh: Fix up thread info pointer in syscall_badsys resume path.
  sh: Fix up optimized SH-4 memcpy on big endian.
  sh: disable initrd defaults in .empty_zero_page.
  sh: display boot params by default on entry.

16 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/linville/wireles...
David S. Miller [Mon, 19 May 2008 23:29:40 +0000 (16:29 -0700)] 
Merge branch 'master' of /linux/kernel/git/linville/wireless-2.6

16 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzi...
Linus Torvalds [Mon, 19 May 2008 23:29:29 +0000 (16:29 -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: (28 commits)
  drivers/ata: trim trailing whitespace
  Fixups to ATA ACPI hotplug
  libata: ignore SIMG4726 config pseudo device
  sata_sil24: don't use NCQ if marvell 4140 PMP is attached
  libata: don't schedule LPM action seperately during probing
  libata: make sure PMP notification is turned off during recovery
  libata: increase PMP register access timeout to 3s
  libata: ignore recovered PHY errors
  libata: kill hotplug related race condition
  libata: move reset freeze/thaw handling into ata_eh_reset()
  libata: reorganize ata_eh_reset() no reset method path
  libata: fix sata_link_hardreset() @online out parameter handling
  sata_promise: other cleanups
  sata_promise: mmio access cleanups
  sata_promise: fix irq clearing buglets
  ata: remove FIT() macro
  sata_mv: ensure empty request queue for FBS-NCQ EH
  sata_mv: cache main_irq_mask register in hpriv
  sata_mv: disregard masked irqs
  sata_mv: fix pmp drives not found
  ...

16 years agondisc: Add missing strategies for per-device retrans timer/reachable time settings.
YOSHIFUJI Hideaki [Mon, 19 May 2008 23:25:42 +0000 (16:25 -0700)] 
ndisc: Add missing strategies for per-device retrans timer/reachable time settings.

Noticed from Al Viro <viro@ftp.linux.org.uk> via David Miller
<davem@davemloft.net>.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[POWERPC] Update Cell MAINTAINERS entry, add spufs entry
Arnd Bergmann [Fri, 16 May 2008 09:10:59 +0000 (11:10 +0200)] 
[POWERPC] Update Cell MAINTAINERS entry, add spufs entry

The MAINTAINERS file entry for the cell platform is outdated,
even the name of the platform changed since the early days
when it was initially submitted.
The SPU file system is now maintained by Jeremy Kerr.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years agoPCI: correct mailing list address
Jesse Barnes [Mon, 19 May 2008 22:28:16 +0000 (15:28 -0700)] 
PCI: correct mailing list address

Forgot to update the PCI error handling address with the new @vger one.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
16 years ago[CIFS] add missing seq_printf to cifs_show_options for hard mount option
Steve French [Mon, 19 May 2008 22:26:42 +0000 (22:26 +0000)] 
[CIFS] add missing seq_printf to cifs_show_options for hard mount option

Also Kari Hurtta noticed a missing check in the same function which is now fixed.

CC: Kari Hurtta <hurtta+gmane@siilo.fmi.fi>
Signed-off-by: Steve French <sfrench@us.ibm.com>
16 years ago[CPUFREQ] Crusoe: longrun cpufreq module reports false min freq
maximilian attems [Thu, 8 May 2008 20:10:01 +0000 (22:10 +0200)] 
[CPUFREQ] Crusoe: longrun cpufreq module reports false min freq

The longrun cpufreq module reports a false minimum frequency 3MHz on
300-600MHz Crusoe processor.  This may be due to a calculation bug
in the module.

Original patch from Kaz Sasayama <kazssym@hypercore.co.jp>
submitted as http://bugs.debian.org/468149 patch ported to x86

Cc: Kaz Sasayama <kazssym@hypercore.co.jp>
Signed-off-by: maximilian attems <max@stro.at>
Signed-off-by: Dave Jones <davej@redhat.com>
16 years ago[CPUFREQ] powernow-k8: improve error messages
Mark Langsdorf [Tue, 18 Mar 2008 20:24:32 +0000 (15:24 -0500)] 
[CPUFREQ] powernow-k8: improve error messages

The most common error with powernow-k8 is an ACPI _PSS error
caused either by failure to load the ACPI processor module
or a bad parse of the _PSS object.  Make the error message
returned to the user in these situations more straightforward
and easier to understand.

-Mark Langsdorf
Operating System Research Center
AMD

Signed-off-by: Mark Langsdorf <mark.langsdorf@amd.com>
Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Signed-off-by: Dave Jones <davej@redhat.com>
16 years agodrivers/ata: trim trailing whitespace
Jeff Garzik [Mon, 19 May 2008 21:56:10 +0000 (17:56 -0400)] 
drivers/ata: trim trailing whitespace

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoFixups to ATA ACPI hotplug
Matthew Garrett [Mon, 19 May 2008 16:29:34 +0000 (17:29 +0100)] 
Fixups to ATA ACPI hotplug

The libata-acpi.c code currently accepts hotplug messages from both the
port and the device. This does not match the behaviour of the bay
driver, and may result in confusion when two hotplug requests are
received for the same device. This patch limits the hotplug notification
to removable ACPI devices, which in turn allows it to use the _STA
method to determine whether the device has been removed or inserted.
On removal, devices are marked as detached. On insertion, a hotplug scan
is started. This should avoid lockups caused by the ata layer attempting
to scan devices which have been removed. The uevent sending is moved
outside the spinlock in order to avoid a warning generated by it firing
when interrupts are disabled.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agolibata: ignore SIMG4726 config pseudo device
Tejun Heo [Sun, 18 May 2008 16:15:14 +0000 (01:15 +0900)] 
libata: ignore SIMG4726 config pseudo device

I was hoping ATA_HORKAGE_NODMA | ATA_HORKAGE_SKIP_PM could keep it
happy but no even this doesn't work under certain configurations and
it's not like we can do anything useful with the cofig device anyway.
Replace ATA_HORKAGE_SKIP_PM with ATA_HORKAGE_DISABLE and use it for
the config device.  This makes the device completely ignored by
libata.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agosata_sil24: don't use NCQ if marvell 4140 PMP is attached
Tejun Heo [Sun, 18 May 2008 16:15:13 +0000 (01:15 +0900)] 
sata_sil24: don't use NCQ if marvell 4140 PMP is attached

When 4140 PMP is attached to sil24, NCQ commands to fan out port 1 and
2 (0 based) often stall if commands are in progress to other ports.
I've tried a number of things but can't tell what's going on.  It
never happens w/ ahci and reportedly sata_mv which can issue NCQ
commands to multiple devices simultaneously like sil24 does.

Disable NCQ for devices behind 4140 PMP for the time being.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Mark Lord <liml@rtr.ca>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agolibata: don't schedule LPM action seperately during probing
Tejun Heo [Sun, 18 May 2008 16:15:12 +0000 (01:15 +0900)] 
libata: don't schedule LPM action seperately during probing

There's no reason to schedule LPM action after probing is complete
causing another EH iteration.  Just schedule it together with probing
itself.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agolibata: make sure PMP notification is turned off during recovery
Tejun Heo [Sun, 18 May 2008 16:15:11 +0000 (01:15 +0900)] 
libata: make sure PMP notification is turned off during recovery

PMP notification during reset can make some controllers fail reset
processing and needs to be turned off during resets.  PMP attach and
full-revalidation path did this via sata_pmp_configure() but the quick
revalidation wasn't.  Move the notification disable code right above
fan-out port recovery so that it's always turned off.

This fixes obscure reset failures.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agolibata: increase PMP register access timeout to 3s
Tejun Heo [Sun, 18 May 2008 16:15:10 +0000 (01:15 +0900)] 
libata: increase PMP register access timeout to 3s

This timeout was set low because previously PMP register access was
done via polling and register access timeouts could stack up.  This is
no longer the case.  One timeout will make all following accesses fail
immediately.

In rare cases both marvell and SIMG PMPs need almost a second.  Bump
it to 3s.

While at it, rename it to SATA_PMP_RW_TIMEOUT.  It's not specific to
SCR access.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agolibata: ignore recovered PHY errors
Tejun Heo [Sun, 18 May 2008 16:15:09 +0000 (01:15 +0900)] 
libata: ignore recovered PHY errors

No reason to get overzealous about recovered comm and data errors.
Some PHYs habitually sets them w/o no good reason and being draconian
about these soft error conditions doesn't seem to help anybody.

If need ever rises, we might need to add soft PHY error condition, say
AC_ERR_MAYBE_ATA_BUS and use it only to determine whether speed down
is necessary but I don't think that's very likely to happen.  It's far
more likely we'll get timeouts or fatal transmission errors if
recovered errors are so prominent that they hamper operation.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agolibata: kill hotplug related race condition
Tejun Heo [Sun, 18 May 2008 16:15:08 +0000 (01:15 +0900)] 
libata: kill hotplug related race condition

Originally, whole reset processing was done while the port is frozen
and SError was cleared during @postreset().  This had two race
conditions.  1: hotplug could occur after reset but before SError is
cleared and libata won't know about it.  2: hotplug could occur after
all the reset is complete but before the port is thawed.  As all
events are cleared on thaw, the hotplug event would be lost.

Commit ac371987a81c61c2efbd6931245cdcaf43baad89 kills the first race
by clearing SError during link resume but before link onlineness test.
However, this doesn't fix race #2 and in some cases clearing SError
after SRST is a good idea.

This patch solves this problem by cross checking link onlineness with
classification result after SError is cleared and port is thawed.
Reset is retried if link is online but all devices attached to the
link are unknown.  As all devices will be revalidated, this one-way
check is enough to ensure that all devices are detected and
revalidated reliably.

This, luckily, also fixes the cases where host controller returns
bogus status while harddrive is spinning up after hotplug making
classification run before the device sends the first FIS and thus
causes misdetection.

Low level drivers can bypass the logic by setting class explicitly to
ATA_DEV_NONE if ever necessary (currently none requires this).

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agolibata: move reset freeze/thaw handling into ata_eh_reset()
Tejun Heo [Sun, 18 May 2008 16:15:07 +0000 (01:15 +0900)] 
libata: move reset freeze/thaw handling into ata_eh_reset()

Previously reset freeze/thaw handling lived outside of ata_eh_reset()
mainly because the original PMP reset code needed the port frozen
while resetting all the fan-out ports, which is no longer the case.

This patch moves freeze/thaw handling into ata_eh_reset().
@prereset() and @postreset() are now called w/o freezing the port
although @prereset() an be called frozen if the port is frozen prior
to entering ata_eh_reset().

This makes code simpler and will help removing hotplug event related
races.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agolibata: reorganize ata_eh_reset() no reset method path
Tejun Heo [Sun, 18 May 2008 16:15:06 +0000 (01:15 +0900)] 
libata: reorganize ata_eh_reset() no reset method path

Reorganize ata_eh_reset() such that @prereset() is called even when no
reset method is available and if block is used instead of goto to skip
actual reset.  This makes no reset case behave better (readiness wait)
and future changes easier.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agolibata: fix sata_link_hardreset() @online out parameter handling
Tejun Heo [Sun, 18 May 2008 16:15:05 +0000 (01:15 +0900)] 
libata: fix sata_link_hardreset() @online out parameter handling

The @online out parameter is supposed to set to true iff link is
online and reset succeeded as advertised in the function description
and callers are coded expecting that.  However, sata_link_reset()
didn't behave this way on device readiness test failure.  Fix it.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agosata_promise: other cleanups
Mikael Pettersson [Sat, 17 May 2008 16:49:09 +0000 (18:49 +0200)] 
sata_promise: other cleanups

Minor coding-style fixes for sata_promise:
- remove stray blank lines
- fix checkpatch.pl errors; warnings about long lines
  remain, but I don't intend to address those at this time
- remove two inline directives: neither is essential and
  both functions are trivially inlinable anyway by virtue
  of being static and having a single unique call site
- fix comment in pdc_interrupt(): the bits in PDC_INT_SEQMASK
  denote SEQIDs not tags, the distinction becomes important
  when NCQ gets implemented

Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agosata_promise: mmio access cleanups
Mikael Pettersson [Sat, 17 May 2008 16:48:15 +0000 (18:48 +0200)] 
sata_promise: mmio access cleanups

This patch cleans up sata_promise's mmio accesses.

In sata_promise there are three distinct mmio address spaces:
1. global registers, offsets from host->iomap[PDC_MMIO_BAR]
2. per-port ATA registers, offsets from ap->ioaddr.cmd_addr
3. per-port SATA registers, offsets from ap->ioaddr.scr_addr

The driver currently often fails to indicate which address space
a given mmio base pointer refers to, which is a source of bugs
and confusion (see recent pdc_thaw() irq clearing bug; it's also
been an obstacle for the pending NCQ extensions).

To reduce these problems, adopt a coding style where the name of
a base pointer always indicates which address space it refers to:
1. global registers: host_mmio
2. per-port ATA registers: ata_mmio
3. per-port SATA registers: sata_mmio

Also rearrange register offset definitions to clearly indicate
which address space they belong to, and add a symbolic definition
for the previously hard-coded PHYMODE4 register.

Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agosata_promise: fix irq clearing buglets
Mikael Pettersson [Sat, 17 May 2008 16:47:35 +0000 (18:47 +0200)] 
sata_promise: fix irq clearing buglets

This patch fixes two bugs in sata_promise's irq status clearing paths:
1. When clearing the irq status for a specific port, the driver
   read the global SEQMASK register. This is wrong because that
   clears the irq status for _all_ ports.
2. pdc_thaw() incorrectly added the PDC_INT_SEQMASK host register
   offset to a per-port ata engine base address. This resulted in
   it reading the unrelated PDC_PKT_SUBMIT register, which did not
   have the desired irq status clearing effect.

In both cases the fix is to read from the port's Command/Status
register. This also matches what Promise's own driver does.

Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoata: remove FIT() macro
Harvey Harrison [Wed, 14 May 2008 23:17:00 +0000 (16:17 -0700)] 
ata: remove FIT() macro

Use the kernel-provided clamp_val() macro.

FIT was always applied to a member of struct ata_timing (unsigned short)
and two constants.  clamp_val will not cast to short anymore.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Tejun Heo <htejun@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agosata_mv: ensure empty request queue for FBS-NCQ EH
Mark Lord [Mon, 19 May 2008 13:01:24 +0000 (09:01 -0400)] 
sata_mv: ensure empty request queue for FBS-NCQ EH

Check for an empty request queue before stopping EDMA after a FBS-NCQ error,
as per recommendation from the Marvell datasheet.

This ensures that the EDMA won't suddenly become active again
just after our subsequent check of the empty/idle bits.

Also bump DRV_VERSION.

Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agosata_mv: cache main_irq_mask register in hpriv
Mark Lord [Sat, 17 May 2008 17:38:00 +0000 (13:38 -0400)] 
sata_mv: cache main_irq_mask register in hpriv

Part five of simplifying/fixing handling of the main_irq_mask register
to resolve unexpected interrupt issues observed in 2.6.26-rc*.

Keep a cached copy of the main_irq_mask so that we don't have
to stall the CPU to read it on every pass through mv_interrupt.

This significantly speeds up interrupt handling, both for sata_mv,
and for any other driver/device sharing the same PCI IRQ line.

Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agosata_mv: disregard masked irqs
Mark Lord [Sat, 17 May 2008 17:37:07 +0000 (13:37 -0400)] 
sata_mv: disregard masked irqs

Part four of simplifying/fixing handling of the main_irq_mask register
to resolve unexpected interrupt issues observed in 2.6.26-rc*.

Ignore masked IRQs in mv_interrupt().
This prevents "unexpected device interrupt while idle" messages.

Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agosata_mv: fix pmp drives not found
Mark Lord [Sat, 17 May 2008 17:36:30 +0000 (13:36 -0400)] 
sata_mv: fix pmp drives not found

Part three of simplifying/fixing handling of the main_irq_mask register
to resolve unexpected interrupt issues observed in 2.6.26-rc*.

Partially fix a reported bug whereby we sometimes miss seeing drives on
a port-multiplier, as reported by Gwendal Grignou <gwendal@google.com>.

The problem was that we were receiving unexpected interrupts
during EH from POLLed commands while accessing port-multiplier registers.
These unexpected interrupts can be prevented by masking the DONE_IRQ bit
for the port whenever not operating in EDMA mode.

Also fix port_stop() to mask all port interrupts.

Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agosata_mv: consolidate main_irq_mask updates
Mark Lord [Sat, 17 May 2008 17:35:21 +0000 (13:35 -0400)] 
sata_mv: consolidate main_irq_mask updates

Part two of simplifying/fixing handling of the main_irq_mask register
to resolve unexpected interrupt issues observed in 2.6.26-rc*.

Consolidate all updates of the host main_irq_mask register
into a single function.  This simplifies maintenance,
and also prepares the way for caching it (later).

No functionality changes in this update.

Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agosata_mv: don't blindly enable IRQs
Mark Lord [Sat, 17 May 2008 17:34:42 +0000 (13:34 -0400)] 
sata_mv: don't blindly enable IRQs

Part one of simplifying/fixing handling of the main_irq_mask register
to resolve unexpected interrupt issues observed in 2.6.26-rc*.

Don't blindly enable port IRQs at host init time.
Instead, enable only the bits that we want,
which in this case is simply the PCI_ERR bit.

The per-port bits can wait until the ports are reset/probed for devices.

Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agosata_mv: async notify for genIIe only
Mark Lord [Wed, 14 May 2008 13:24:39 +0000 (09:24 -0400)] 
sata_mv: async notify for genIIe only

Now that we handle the FIS_IRQ_CAUSE register correctly,
we can also now handle SATA asynchronous notification events.

So enable them, but only for the more modern GenIIe chips.
(older chips have unaddressed errata issues related to this).

This fixes hot plug/unplug for port-muliplier ports.

Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agosata_mv: group genIIe flags
Mark Lord [Wed, 14 May 2008 13:21:43 +0000 (09:21 -0400)] 
sata_mv: group genIIe flags

Group all of the flags for GenIIe devices into a common definition,
to ensure that any updates to them are shared by all GenIIe devices.

This will help make future maintenance somewhat simpler.

Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agosata_mv: fis irq register fixes
Mark Lord [Wed, 14 May 2008 13:19:30 +0000 (09:19 -0400)] 
sata_mv: fis irq register fixes

Fix handling of the FIS_IRQ_CAUSE register in sata_mv.

This register exists *only* on GenIIe devices, so don't bother
writing to it on older chips.  Also, it has to be read/cleared
in mv_err_intr() before clearing the main ERR_IRQ_CAUSE register.

This keeps sata_mv from getting stuck forever on certain error types.

Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agosata_mv: always do softreset
Mark Lord [Wed, 14 May 2008 13:18:12 +0000 (09:18 -0400)] 
sata_mv: always do softreset

Always request a softreset after hardreset succeeds.

This fixes a regression reported by Martin Michlmayr <tbm@cyrius.com>.

Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoavr32/pata: avoid unnecessary memset (updated after comments)
Christophe Jaillet [Tue, 13 May 2008 19:17:30 +0000 (21:17 +0200)] 
avr32/pata: avoid unnecessary memset (updated after comments)

Remove an explicit memset(.., 0, ...) to a variable allocated with
kzalloc (i.e. 'info').

Signed-off-by: Christophe Jaillet <christophe.jaillet@wanadoo.fr>
Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agopata-bf54x: Set ATAPI HSM to control IDE device terminate sequence.
Sonic Zhang [Mon, 12 May 2008 04:12:16 +0000 (12:12 +0800)] 
pata-bf54x: Set ATAPI HSM to control IDE device terminate sequence.

Set ATAPI host state machine to control IDE device terminate sequence.
Some IDE harddisk may assert terminate sequence in the middle of a
formal DMA transaction and resume later. Bit DETECT_TERM in ATAPI_CTRL
register determines whether the ATAPI host state machine or the kernel
driver should take care of this case.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoipv6: Move <linux/in6.h> from header-y to unifdef-y.
Robert P. J. Day [Mon, 19 May 2008 21:13:11 +0000 (14:13 -0700)] 
ipv6: Move <linux/in6.h> from header-y to unifdef-y.

Given that <linux/in6.h> contains a __KERNEL__ test, it should be
unifdef-ed.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agol2tp: avoid skb truesize bug if headroom is increased
James Chapman [Mon, 19 May 2008 21:10:01 +0000 (14:10 -0700)] 
l2tp: avoid skb truesize bug if headroom is increased

A user reported seeing occasional bugs such as the following when
using the L2TP driver.

  SKB BUG: Invalid truesize (272) len=72, sizeof(sk_buff)=208

When L2TP adds its header in the transmit path, it might need to
increase the headroom of the skb. In some cases, the increased
headroom trips a kernel bug when the skb is freed because the skb has
grown beyond its truesize value. The fix is to increase the truesize
by the amount of headroom added, after orphaning the skb.

While here, fix a misleading comment.

Thanks to Iouri Kharon <bc-info@styx.cabel.net> for the initial
report and testing the fix.

Signed-off-by: James Chapman <jchapman@katalix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm
Linus Torvalds [Mon, 19 May 2008 21:04:47 +0000 (14:04 -0700)] 
Merge branch 'for-linus' of git://git./linux/kernel/git/teigland/dlm

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm:
  dlm: <linux/dlm_plock.h> should be "unifdef"ed.
  dlm: fix plock dev_write return value
  dlm: tcp_connect_to_sock should check for -EINVAL, not EINVAL
  dlm: section mismatch warning fix
  dlm: convert connections_lock in a mutex

16 years agoMerge branch 'kvm-updates-2.6.26' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Mon, 19 May 2008 20:53:21 +0000 (13:53 -0700)] 
Merge branch 'kvm-updates-2.6.26' of git://git./linux/kernel/git/avi/kvm

* 'kvm-updates-2.6.26' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm:
  KVM: LAPIC: ignore pending timers if LVTT is disabled
  KVM: Update MAINTAINERS for new mailing lists
  KVM: Fix kvm_vcpu_block() task state race
  KVM: ia64: Set KVM_IOAPIC_NUM_PINS to 48
  KVM: ia64: fix GVMM module including position-dependent objects
  KVM: ia64: Define new kvm_fpreg struture to replace ia64_fpreg
  KVM: PIT: take inject_pending into account when emulating hlt
  s390: KVM guest: fix compile error
  KVM: x86 emulator: fix writes to registers with modrm encodings

16 years agodlm: <linux/dlm_plock.h> should be "unifdef"ed.
Robert P. J. Day [Sat, 17 May 2008 20:58:28 +0000 (16:58 -0400)] 
dlm: <linux/dlm_plock.h> should be "unifdef"ed.

Given that <linux/dlm_plock.h> contains a conditional __KERNEL__ test,
it should be moved from header-y to unifdef-y.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: David Teigland <teigland@redhat.com>
16 years agodlm: fix plock dev_write return value
David Teigland [Tue, 13 May 2008 19:28:26 +0000 (14:28 -0500)] 
dlm: fix plock dev_write return value

The return value on writes to the plock device should be
the number of bytes written.  It was returning 0 instead
when an nfs lock callback was involved.

Reported-by: Nathan Straz <nstraz@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
16 years agodlm: tcp_connect_to_sock should check for -EINVAL, not EINVAL
Marcin Slusarz [Sun, 11 May 2008 20:01:29 +0000 (22:01 +0200)] 
dlm: tcp_connect_to_sock should check for -EINVAL, not EINVAL

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: Christine Caulfield <ccaulfie@redhat.com>
Cc: David Teigland <teigland@redhat.com>
Cc: cluster-devel@redhat.com
Signed-off-by: David Teigland <teigland@redhat.com>
16 years agodlm: section mismatch warning fix
Leonardo Potenza [Sun, 11 May 2008 17:15:34 +0000 (19:15 +0200)] 
dlm: section mismatch warning fix

Removed the section mismatch message:
WARNING: fs/dlm/dlm.o(.init.text+0x132): Section mismatch in reference from the function init_module() to the function .exit.text:dlm_netlink_exit()

Since dlm_netlink_exit() is called in the init_dlm() error handling,
the __exit annotation has been removed.

Signed-off-by: Leonardo Potenza <lpotenza@inwind.it>
Signed-off-by: David Teigland <teigland@redhat.com>
16 years agodlm: convert connections_lock in a mutex
Matthias Kaehlcke [Mon, 12 May 2008 15:04:51 +0000 (10:04 -0500)] 
dlm: convert connections_lock in a mutex

The semaphore connections_lock is used as a mutex.  Convert it to the mutex
API.

Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
Cc: Christine Caulfield <ccaulfie@redhat.com>
Cc: David Teigland <teigland@redhat.com>
Cc: Steven Whitehouse <swhiteho@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Teigland <teigland@redhat.com>
16 years agoMerge branch 'drm-patches' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
Linus Torvalds [Mon, 19 May 2008 20:30:40 +0000 (13:30 -0700)] 
Merge branch 'drm-patches' of git://git./linux/kernel/git/airlied/drm-2.6

* 'drm-patches' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
  drm/i915: save and restore dsparb and d_state registers.
  drm/i915: fix off by one in VGA save/restore of AR & CR regs.
  drm: disable tasklets not IRQs when taking the drm lock spinlock
  Revert "drm/vbl rework: rework how the drm deals with vblank."

16 years agoPCI: Correct last two HP entries in the bfsort whitelist
Tony Camuso [Thu, 15 May 2008 18:40:14 +0000 (14:40 -0400)] 
PCI: Correct last two HP entries in the bfsort whitelist

Replace Redundant Whitelist Entries with the Correct Ones

The ProLiant DL585 G2 and the DL585 G2 are entered reundantly in the
dmi_system_id table. What should have been there are the DL360 and DL380. This
patch simply replaces the redundant entries with the correct entries.

Signed-off-by: Tony Camuso <tony.camuso@hp.com>
Signed-off-by: Pat Schoeller <patrick.schoeller@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes
Linus Torvalds [Mon, 19 May 2008 18:32:21 +0000 (11:32 -0700)] 
Merge git://git./linux/kernel/git/sam/kbuild-fixes

* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes:
  Don't clean bounds.h and asm-offsets.h
  kconfig: incorrect 'len' field initialisation ?
  kernel-doc: allow unnamed bit-fields
  kbuild: filter away debug symbols from kernel symbols
  Remove *.rej pattern from .gitignore
  MAINTAINERS: document names of new kbuild trees
  kbuild: disable modpost warnings for linkonce sections
  kbuild: escape meta characters in regular expression in make TAGS

16 years agoDon't clean bounds.h and asm-offsets.h
Jan Blunck [Fri, 16 May 2008 11:54:59 +0000 (13:54 +0200)] 
Don't clean bounds.h and asm-offsets.h

Since 97965478a66fbdf0f4ad5e4ecc4828f0cb548a45 ("mm: Get rid of __ZONE_COUNT")
mmzone.h includes bounds.h.
Calling make clean after make prepare removes bounds.h
again so when building external modules this fails.

Signed-off-by: Jan Blunck <jblunck@suse.de>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
--

16 years agokconfig: incorrect 'len' field initialisation ?
Christophe Jaillet [Sun, 18 May 2008 21:10:24 +0000 (23:10 +0200)] 
kconfig: incorrect 'len' field initialisation ?

1) The field 'len' of the 'gstr' structure seems to track the size of the memory
already allocated for the "growable string". So the value of this field should be
the same as the 'malloc()' just above, shouldn't it ?

Signed-off-by: Christophe Jaillet <christophe.jaillet@wanadoo.fr>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
16 years agokernel-doc: allow unnamed bit-fields
Randy Dunlap [Fri, 16 May 2008 22:45:52 +0000 (15:45 -0700)] 
kernel-doc: allow unnamed bit-fields

Allow for unnamed bit-fields and skip them instead of printing an
erroneous warning message for them, such as:

Warning(include/asm-s390/cio.h:103): No description found for parameter 'u32'

which contains:

struct tm_scsw {
u32 :1;

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
16 years agokbuild: filter away debug symbols from kernel symbols
Sam Ravnborg [Mon, 19 May 2008 18:07:58 +0000 (20:07 +0200)] 
kbuild: filter away debug symbols from kernel symbols

Andi Kleen <andi@firstfloor.org>
reported that he saw a lot of symbols like this:

0000000000000b24 N DW.aio.h.903a6d92.2
0000000000000bce N DW.task_io_accounting.h.8d8de327.0
0000000000000bec N DW.hrtimer.h.c23659c6.0

in his System.map / kallsyms output.

Simple solution is to skip all debugging
symbols (they are marked 'N').

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Paulo Marques <pmarques@grupopie.com>
16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Mon, 19 May 2008 16:24:49 +0000 (09:24 -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:
  snd-pcsp: silent misleading warning
  snd-pcsp: depend on CONFIG_EXPERIMENTAL
  snd-pcsp: put back the compatibility code for the older alsa-libs
  snd-pcsp: adjust help texts to frighten users

16 years ago[POWERPC] 4xx: Workaround for CHIP_11 Errata
Josh Boyer [Thu, 15 May 2008 14:43:46 +0000 (00:43 +1000)] 
[POWERPC] 4xx: Workaround for CHIP_11 Errata

The PowerPC 440EP, 440GR, 440EPx, and 440GRx chips have an issue that
causes the PLB3-to-PLB4 bridge to wait indefinitely for transaction
requests that cross the end-of-memory-range boundary.  Since the DDR
controller only returns the valid portion of a read request, the bridge
will prevent other PLB masters from completing their transactions.

This implements the recommended workaround for this errata for chips that
use older versions of firmware that do not already handle it.  The last
4KiB of memory are hidden from the kernel to prevent the problem
transactions from occurring.

Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Acked-by: Stefan Roese <sr@denx.de>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
16 years agosvcrdma: Verify read-list fits within RPCSVC_MAXPAGES
Tom Tucker [Tue, 13 May 2008 14:16:05 +0000 (09:16 -0500)] 
svcrdma: Verify read-list fits within RPCSVC_MAXPAGES

A RDMA read-list cannot contain more elements than RPCSVC_MAXPAGES or
it will overflow the DTO context. Verify this when processing the
protocol header.

Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
16 years agosvcrdma: Change svc_rdma_send_error return type to void
Tom Tucker [Wed, 7 May 2008 20:47:42 +0000 (15:47 -0500)] 
svcrdma: Change svc_rdma_send_error return type to void

The svc_rdma_send_error function is called when an RPCRDMA protocol
error is detected. This function attempts to post an error reply message.
Since an error posting to a transport in error is ignored, change
the return type to void.

Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
16 years agosvcrdma: Copy transport address and arm CQ before calling rdma_accept
Tom Tucker [Wed, 7 May 2008 18:52:42 +0000 (13:52 -0500)] 
svcrdma: Copy transport address and arm CQ before calling rdma_accept

This race was found by inspection. Messages can be received from the peer
immediately following the rdma_accept call, however, the CQ have not yet
been armed and the transport address has not yet been set.

Set the transport address in the connect request handler and arm the CQ
prior to calling rdma_accept.

Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
16 years agosvcrdma: Set rqstp transport address in rdma_read_complete function
Tom Tucker [Wed, 7 May 2008 18:49:58 +0000 (13:49 -0500)] 
svcrdma: Set rqstp transport address in rdma_read_complete function

The rdma_read_complete function needs to copy the rqstp transport address
from the transport. Failure to do so can result in using the wrong
authentication method for the RPC or bug checking if the rqstp address
is not valid.

Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
16 years agosvcrdma: Use ib verbs version of dma_unmap
Tom Tucker [Thu, 1 May 2008 19:02:45 +0000 (14:02 -0500)] 
svcrdma: Use ib verbs version of dma_unmap

Use the ib_verbs version of the dma_unmap service in the
svc_rdma_put_context function. This should support providers
using software rdma.

Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
16 years agosvcrdma: Cleanup queued, but unprocessed I/O in svc_rdma_free
Tom Tucker [Thu, 1 May 2008 16:25:02 +0000 (11:25 -0500)] 
svcrdma: Cleanup queued, but unprocessed I/O in svc_rdma_free

When the transport is closing, the DTO tasklet may queue data
that never gets processed. Clean up resources associated with
this I/O.

Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
16 years agosvcrdma: Move the QP and cm_id destruction to svc_rdma_free
Tom Tucker [Thu, 1 May 2008 16:13:50 +0000 (11:13 -0500)] 
svcrdma: Move the QP and cm_id destruction to svc_rdma_free

Move the destruction of the QP and CM_ID to the free path so that the
QP cleanup code doesn't race with the dto_tasklet handling flushed WR.
The QP reference is not needed because we now have a reference for
every WR.

Also add a guard in the SQ and RQ completion handlers to ignore
calls generated by some providers when the QP is destroyed.

Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
16 years agosvcrdma: Add reference for each SQ/RQ WR
Tom Tucker [Thu, 1 May 2008 15:49:03 +0000 (10:49 -0500)] 
svcrdma: Add reference for each SQ/RQ WR

Add a reference on the transport for every outstanding WR.

Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
16 years agosvcrdma: Move destroy to kernel thread
Tom Tucker [Thu, 1 May 2008 03:00:46 +0000 (22:00 -0500)] 
svcrdma: Move destroy to kernel thread

Some providers may wait while destroying adapter resources.
Since it is possible that the last reference is put on the
dto_tasklet, the actual destroy must be scheduled as a work item.

Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
16 years agosvcrdma: Shrink scope of spinlock on RQ CQ
Tom Tucker [Tue, 6 May 2008 16:49:05 +0000 (11:49 -0500)] 
svcrdma: Shrink scope of spinlock on RQ CQ

The rq_cq_reap function is only called from the dto_tasklet. The
only resource shared with other threads is the sc_rq_dto_q. Move the
spin lock to protect only this list.

Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
16 years agosvcrdma: Use standard Linux lists for context cache
Tom Tucker [Thu, 1 May 2008 01:44:39 +0000 (20:44 -0500)] 
svcrdma: Use standard Linux lists for context cache

Replace the one-off linked list implementation used to implement the
context cache with the standard Linux list_head lists. Add a context
counter to catch resource leaks. A WARN_ON will be added later to
ensure that we've freed all contexts.

Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
16 years agosvcrdma: Simplify RDMA_READ deferral buffer management
Tom Tucker [Thu, 1 May 2008 00:50:56 +0000 (19:50 -0500)] 
svcrdma: Simplify RDMA_READ deferral buffer management

An NFS_WRITE requires a set of RDMA_READ requests to fetch the write
data from the client. There are two principal pieces of data that
need to be tracked: the list of pages that comprise the completed RPC
and the SGE of dma mapped pages to refer to this list of pages. Previously
this whole bit was managed as a linked list of contexts with the
context containing the page list buried in this list. This patch
simplifies this processing by not keeping a linked list, but rather only
a pionter from the last submitted RDMA_READ's context to the context
that maps the set of pages that describe the RPC.  This significantly
simplifies this code path. SGE contexts are cleaned up inline in the DTO
path instead of at read completion time.

Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
16 years agosvcrdma: Remove unused READ_DONE context flags bit
Tom Tucker [Wed, 30 Apr 2008 22:32:17 +0000 (17:32 -0500)] 
svcrdma: Remove unused READ_DONE context flags bit

The RDMACTXT_F_READ_DONE bit is not longer used. Remove it.

Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
16 years agosvcrdma: Return error from rdma_read_xdr so caller knows to free context
Tom Tucker [Tue, 6 May 2008 15:04:50 +0000 (10:04 -0500)] 
svcrdma: Return error from rdma_read_xdr so caller knows to free context

The rdma_read_xdr function did not discriminate between no read-list and
an error posting the read-list. This results in a leak of a page if there
is an error posting the read-list.

Signed-off-by: Tom Tucker <tom@opengridcomputing.com>