platform/adaptation/renesas_rcar/renesas_kernel.git
15 years agocciss: fix regression firmware not displayed in procfs
Mike Miller [Thu, 6 Nov 2008 20:53:25 +0000 (12:53 -0800)]
cciss: fix regression firmware not displayed in procfs

This regression was introduced by commit
6ae5ce8e8d4de666f31286808d2285aa6a50fa40 ("cciss: remove redundant code").

This patch fixes a regression where the controller firmware version is not
displayed in procfs.  The previous patch would be called anytime something
changed.  This will get called only once for each controller.

Signed-off-by: Mike Miller <mike.miller@hp.com>
Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: <stable@kernel.org> [2.6.27.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agocciss: fix sysfs broken symlink regression
Mike Miller [Thu, 6 Nov 2008 20:53:24 +0000 (12:53 -0800)]
cciss: fix sysfs broken symlink regression

Regression introduced by commit 6ae5ce8e8d4de666f31286808d2285aa6a50fa40
("cciss: remove redundant code").

This patch fixes a broken symlink in sysfs that was introduced by the
above commit.  We broke it in 2.6.27-rc on or about 20080804.  Some
installers are broken if this symlink does not exist and they may not
detect the logical drives configured on the controller.  It does not
require being backported into 2.6.26.x or earlier kernels.

Signed-off-by: Mike Miller <mike.miller@hp.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: <stable@kernel.org> [2.6.27.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoautofs4: collect version check return
Ian Kent [Thu, 6 Nov 2008 20:53:23 +0000 (12:53 -0800)]
autofs4: collect version check return

The function check_dev_ioctl_version() returns an error code upon fail but
it isn't captured and returned in validate_dev_ioctl() as it should be.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Ian Kent <raven@themaw.net>
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoautofs4: correct offset mount expire check
Ian Kent [Thu, 6 Nov 2008 20:53:22 +0000 (12:53 -0800)]
autofs4: correct offset mount expire check

When checking a directory tree in autofs_tree_busy() we can incorrectly
decide that the tree isn't busy.  This happens for the case of an active
offset mount as autofs4_follow_mount() follows past the active offset
mount, which has an open file handle used for expires, causing the file
handle not to count toward the busyness check.

Signed-off-by: Ian Kent <raven@themaw.net>
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agohwmon: applesmc: add support for iMac 8
Henrik Rydberg [Thu, 6 Nov 2008 20:53:22 +0000 (12:53 -0800)]
hwmon: applesmc: add support for iMac 8

Add temperature sensor support for iMac 8.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Tested-by: Klaus Doblmann <klaus.doblmann@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agohwmon: applesmc: add support for Macbook Pro 5
Henrik Rydberg [Thu, 6 Nov 2008 20:53:21 +0000 (12:53 -0800)]
hwmon: applesmc: add support for Macbook Pro 5

Add accelerometer, backlight and temperature sensor support for the new
unibody Macbook Pro 5.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agohwmon: applesmc: add support for Macbook 5
Henrik Rydberg [Thu, 6 Nov 2008 20:53:20 +0000 (12:53 -0800)]
hwmon: applesmc: add support for Macbook 5

Add accelerometer, backlight and temperature sensor support for the new
unibody Macbook 5.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Tested-by: David M. Lary <dmlary@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agohwmon: applesmc: add support for iMac 5
Henrik Rydberg [Thu, 6 Nov 2008 20:53:19 +0000 (12:53 -0800)]
hwmon: applesmc: add support for iMac 5

Add temperature sensor support for iMac 5.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Tested-by: Ricky Campbell <johnrcampbell@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agortc: fix handling of missing tm_year data when reading alarms
Mark Brown [Thu, 6 Nov 2008 20:53:18 +0000 (12:53 -0800)]
rtc: fix handling of missing tm_year data when reading alarms

When fixing up invalid years rtc_read_alarm() was calling rtc_valid_tm()
as a boolean but rtc_valid_tm() returns zero on success or a negative
number if the time is not valid so the test was inverted.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agovt: incomplete initialization of vc_tab_stop
Wolfgang Kroworsch [Thu, 6 Nov 2008 20:53:16 +0000 (12:53 -0800)]
vt: incomplete initialization of vc_tab_stop

Problem 1 (see patch below):
  vc_tab_stop is declared as an array of 8 unsigned ints in struct
  vc_data in include/linux/console_struct.h .
  In drivers/char/vt.c only 5 of these 8 unsigned ints get initialized
  leading to unintended tabulator placement on displays with more than
  160 columns text.

Problem 2 (open):
  Upcoming displays will have more than 256 columns of text leading to
  invalid memory access in drivers/char/vt.c during tabulator
  calculations:
    if (vc->vc_tab_stop[vc->vc_x >> 5] & (1 << (vc->vc_x & 31)))
break;

Signed-off-by: Wolfgang Kroworsch <wolfgang@kroworsch.de>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agocpqarry: fix return value of cpqarray_init()
Andrey Borzenkov [Thu, 6 Nov 2008 20:53:15 +0000 (12:53 -0800)]
cpqarry: fix return value of cpqarray_init()

As reported by Dick Gevers on Compaq ProLiant:

Oct 13 18:06:51 dvgcpl kernel: Compaq SMART2 Driver (v 2.6.0)
Oct 13 18:06:51 dvgcpl kernel: sys_init_module: 'cpqarray'->init
suspiciously returned 1, it should follow 0/-E convention
Oct 13 18:06:51 dvgcpl kernel: sys_init_module: loading module anyway...
Oct 13 18:06:51 dvgcpl kernel: Pid: 315, comm: modprobe Not tainted
2.6.27-desktop-0.rc8.2mnb #1
Oct 13 18:06:51 dvgcpl kernel:  [<c0380612>] ? printk+0x18/0x1e
Oct 13 18:06:51 dvgcpl kernel:  [<c0158f85>] sys_init_module+0x155/0x1c0
Oct 13 18:06:51 dvgcpl kernel:  [<c0103f06>] syscall_call+0x7/0xb
Oct 13 18:06:51 dvgcpl kernel:  =======================

Make it return 0 on success and -ENODEV if no array was found.

Reported-by: Dick Gevers <dvgevers@xs4all.nl>
Signed-off-by: Andrey Borzenkov <arvidjaar@mail.ru>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agocciss: new hardware support
Mike Miller [Thu, 6 Nov 2008 20:53:14 +0000 (12:53 -0800)]
cciss: new hardware support

Add support for 2 new SAS/SATA controllers.

Signed-off-by: Mike Miller <mike.miller@hp.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agonet: Fix recursive descent in __scm_destroy().
David Miller [Thu, 6 Nov 2008 08:37:40 +0000 (00:37 -0800)]
net: Fix recursive descent in __scm_destroy().

__scm_destroy() walks the list of file descriptors in the scm_fp_list
pointed to by the scm_cookie argument.

Those, in turn, can close sockets and invoke __scm_destroy() again.

There is nothing which limits how deeply this can occur.

The idea for how to fix this is from Linus.  Basically, we do all of
the fput()s at the top level by collecting all of the scm_fp_list
objects hit by an fput().  Inside of the initial __scm_destroy() we
keep running the list until it is empty.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Tue, 4 Nov 2008 16:30:12 +0000 (08:30 -0800)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  xfrm: Fix xfrm_policy_gc_lock handling.
  niu: Use pci_ioremap_bar().
  bnx2x: Version Update
  bnx2x: Calling netif_carrier_off at the end of the probe
  bnx2x: PCI configuration bug on big-endian
  bnx2x: Removing the PMF indication when unloading
  mv643xx_eth: fix SMI bus access timeouts
  net: kconfig cleanup
  fs_enet: fix polling
  XFRM: copy_to_user_kmaddress() reports local address twice
  SMC91x: Fix compilation on some platforms.
  udp: Fix the SNMP counter of UDP_MIB_INERRORS
  udp: Fix the SNMP counter of UDP_MIB_INDATAGRAMS
  drivers/net/smc911x.c: Fix lockdep warning on xmit.

16 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzi...
Linus Torvalds [Tue, 4 Nov 2008 16:19:01 +0000 (08:19 -0800)]
Merge branch 'upstream-linus' of git://git./linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  libata: mask off DET when restoring SControl for detach
  libata: implement ATA_HORKAGE_ATAPI_MOD16_DMA and apply it
  libata: Fix a potential race condition in ata_scsi_park_show()
  sata_nv: fix generic, nf2/3 detection regression
  sata_via: restore vt*_prepare_host error handling
  sata_promise: add ATA engine reset to reset ops

16 years agodrivers: remove duplicated #include
Jianjun Kong [Tue, 4 Nov 2008 13:47:07 +0000 (21:47 +0800)]
drivers: remove duplicated #include

Signed-off-by: Jianjun Kong <jianjun@zeuux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agolibata: mask off DET when restoring SControl for detach
Tejun Heo [Mon, 3 Nov 2008 10:27:07 +0000 (19:27 +0900)]
libata: mask off DET when restoring SControl for detach

libata restores SControl on detach; however, trying to restore
non-zero DET can cause undeterministic behavior including PMP device
going offline till power cycling.  Mask off DET when restoring
SControl.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agolibata: implement ATA_HORKAGE_ATAPI_MOD16_DMA and apply it
Tejun Heo [Mon, 3 Nov 2008 10:01:09 +0000 (19:01 +0900)]
libata: implement ATA_HORKAGE_ATAPI_MOD16_DMA and apply it

libata always uses PIO for ATAPI commands when the number of bytes to
transfer isn't multiple of 16 but quantum DAT72 chokes on odd bytes
PIO transfers.  Implement a horkage to skip the mod16 check and apply
it to the quantum device.

This is reported by John Clark in the following thread.

  http://thread.gmane.org/gmane.linux.ide/34748

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: John Clark <clarkjc@runbox.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agolibata: Fix a potential race condition in ata_scsi_park_show()
Elias Oltmanns [Mon, 3 Nov 2008 10:01:08 +0000 (19:01 +0900)]
libata: Fix a potential race condition in ata_scsi_park_show()

Peter Moulder has pointed out that there is a slight chance that a
negative value might be passed to jiffies_to_msecs() in
ata_scsi_park_show(). This is fixed by saving the value of jiffies in a
local variable, thus also reducing code since the volatile variable
jiffies is accessed only once.

Signed-off-by: Elias Oltmanns <eo@nebensachen.de>
Signed-off-by: Tejun Heo <tj.kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agosata_nv: fix generic, nf2/3 detection regression
Tejun Heo [Mon, 3 Nov 2008 03:37:49 +0000 (12:37 +0900)]
sata_nv: fix generic, nf2/3 detection regression

All three flavors of sata_nv's are different in how their hardreset
behaves.

* generic: Hardreset is not reliable.  Link often doesn't come online
  after hardreset.

* nf2/3: A little bit better - link comes online with longer debounce
  timing.  However, nf2/3 can't reliable wait for the first D2H
  Register FIS, so it can't wait for device readiness or classify the
  device after hardreset.  Follow-up SRST required.

* ck804: Hardreset finally works.

The core layer change to prefer hardreset and follow up changes
exposed the above issues and caused various detection regressions for
all three flavors.  This patch, hopefully, fixes all the known issues
and should make sata_nv error handling more reliable.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agosata_via: restore vt*_prepare_host error handling
Marcin Slusarz [Sun, 2 Nov 2008 21:18:52 +0000 (22:18 +0100)]
sata_via: restore vt*_prepare_host error handling

commit b9d5b89b487517cbd4cb4702da829e07ef9e4432 (sata_via: fix support
for 5287) accidently (?) removed vt*_prepare_host error handling - restore it

catched by gcc:
drivers/ata/sata_via.c: In function 'svia_init_one':
drivers/ata/sata_via.c:567: warning: 'host' may be used uninitialized in this function

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Joseph Chan <JosephChan@via.com.tw>
Cc: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agosata_promise: add ATA engine reset to reset ops
Mikael Pettersson [Fri, 31 Oct 2008 07:03:55 +0000 (08:03 +0100)]
sata_promise: add ATA engine reset to reset ops

Promise ATA engines need to be reset when errors occur.
That's currently done for errors detected by sata_promise itself,
but it's not done for errors like timeouts detected outside of
the low-level driver.

The effect of this omission is that a timeout tends to result
in a sequence of failed COMRESETs after which libata EH gives
up and disables the port. At that point the port's ATA engine
hangs and even reloading the driver will not resume it.

To fix this, make sata_promise override ->hardreset on SATA
ports with code which calls pdc_reset_port() on the port in
question before calling libata's hardreset. PATA ports don't
use ->hardreset, so for those we override ->softreset instead.

Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoxfrm: Fix xfrm_policy_gc_lock handling.
Alexey Dobriyan [Tue, 4 Nov 2008 03:11:29 +0000 (19:11 -0800)]
xfrm: Fix xfrm_policy_gc_lock handling.

From: Alexey Dobriyan <adobriyan@gmail.com>

Based upon a lockdep trace by Simon Arlott.

xfrm_policy_kill() can be called from both BH and
non-BH contexts, so we have to grab xfrm_policy_gc_lock
with BH disabling.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoniu: Use pci_ioremap_bar().
David S. Miller [Tue, 4 Nov 2008 01:05:16 +0000 (17:05 -0800)]
niu: Use pci_ioremap_bar().

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agobnx2x: Version Update
Eilon Greenstein [Tue, 4 Nov 2008 00:46:58 +0000 (16:46 -0800)]
bnx2x: Version Update

Updating the version

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agobnx2x: Calling netif_carrier_off at the end of the probe
Eilon Greenstein [Tue, 4 Nov 2008 00:46:40 +0000 (16:46 -0800)]
bnx2x: Calling netif_carrier_off at the end of the probe

netif_carrier_off was called too early at the probe. In case of failure
or simply bad timing, this can cause a fatal error since linkwatch_event
might run too soon.

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agobnx2x: PCI configuration bug on big-endian
Eilon Greenstein [Tue, 4 Nov 2008 00:46:19 +0000 (16:46 -0800)]
bnx2x: PCI configuration bug on big-endian

The current code read nothing but zeros on big-endian (wrong part of the
32bits). This caused poor performance on big-endian machines. Though this
issue did not cause the system to crash, the performance is significantly
better with the fix so I view it as critical bug fix.

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agobnx2x: Removing the PMF indication when unloading
Eilon Greenstein [Tue, 4 Nov 2008 00:45:55 +0000 (16:45 -0800)]
bnx2x: Removing the PMF indication when unloading

When the PMF flag is set, the driver can access the HW freely. When the
driver is unloaded, it should not access the HW. The problem caused fatal
errors when "ethtool -i" was called after the calling instance was unloaded
and another instance was already loaded

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agomv643xx_eth: fix SMI bus access timeouts
Lennert Buytenhek [Sat, 1 Nov 2008 05:32:20 +0000 (06:32 +0100)]
mv643xx_eth: fix SMI bus access timeouts

The mv643xx_eth mii bus implementation uses wait_event_timeout() to
wait for SMI completion interrupts.

If wait_event_timeout() would return zero, mv643xx_eth would conclude
that the SMI access timed out, but this is not necessarily true --
wait_event_timeout() can also return zero in the case where the SMI
completion interrupt did happen in time but where it took longer than
the requested timeout for the process performing the SMI access to be
scheduled again.  This would lead to occasional SMI access timeouts
when the system would be under heavy load.

The fix is to ignore the return value of wait_event_timeout(), and
to re-check the SMI done bit after wait_event_timeout() returns to
determine whether or not the SMI access timed out.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agonet: kconfig cleanup
Jeff Kirsher [Mon, 3 Nov 2008 04:30:33 +0000 (20:30 -0800)]
net: kconfig cleanup

The bool kconfig option added to ixgbe and myri10ge for DCA is ambigous,
so this patch adds a description to the kconfig option.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agofs_enet: fix polling
Alexey Dobriyan [Sun, 2 Nov 2008 14:49:59 +0000 (17:49 +0300)]
fs_enet: fix polling

1. compile fix for irqreturn_t type change
2. restore ->poll_controller after CONFIG_PPC_CPM_NEW_BINDING transition

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
Linus Torvalds [Mon, 3 Nov 2008 19:43:59 +0000 (11:43 -0800)]
Merge git://git./linux/kernel/git/sfrench/cifs-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
  cifs: fix renaming one hardlink on top of another
  [CIFS] fix error in smb_send2
  [CIFS] Reduce number of socket retries in large write path

16 years agocifs: fix renaming one hardlink on top of another
Jeff Layton [Mon, 3 Nov 2008 19:05:08 +0000 (14:05 -0500)]
cifs: fix renaming one hardlink on top of another

cifs: fix renaming one hardlink on top of another

POSIX says that renaming one hardlink on top of another to the same
inode is a no-op. We had the logic mostly right, but forgot to clear
the return code.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
16 years agoMerge branch 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Mon, 3 Nov 2008 18:21:40 +0000 (10:21 -0800)]
Merge branch 'tracing-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  tracing, ring-buffer: add paranoid checks for loops
  ftrace: use kretprobe trampoline name to test in output
  tracing, alpha: undefined reference to `save_stack_trace'

16 years agoMerge branch 'io-mappings-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Mon, 3 Nov 2008 18:15:40 +0000 (10:15 -0800)]
Merge branch 'io-mappings-for-linus-2' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'io-mappings-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  io mapping: clean up #ifdefs
  io mapping: improve documentation
  i915: use io-mapping interfaces instead of a variety of mapping kludges
  resources: add io-mapping functions to dynamically map large device apertures
  x86: add iomap_atomic*()/iounmap_atomic() on 32-bit using fixmaps

16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Mon, 3 Nov 2008 18:14:59 +0000 (10:14 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: hda: make a STAC_DELL_EQ option
  ALSA: emu10k1 - Add more invert_shared_spdif flag to Audigy models
  ALSA: hda - Add a quirk for another Acer Aspire (1025:0090)
  ALSA: remove direct access of dev->bus_id in sound/isa/*
  sound: struct device - replace bus_id with dev_name(), dev_set_name()
  ALSA: Fix PIT lockup on some chipsets when using the PC-Speaker
  ALSA: rawmidi - Add open check in rawmidi callbacks
  ALSA: hda - Add digital-mic for ALC269 auto-probe mode
  ALSA: hda - Disable broken mic auto-muting in Realtek codes

16 years agoMerge branch 'proc-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/adobriyan...
Linus Torvalds [Mon, 3 Nov 2008 17:59:01 +0000 (09:59 -0800)]
Merge branch 'proc-linus' of git://git./linux/kernel/git/adobriyan/proc

* 'proc-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/adobriyan/proc:
  proc: revert /proc/uptime to ->read_proc hook

16 years agoMerge branch 'drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
Linus Torvalds [Mon, 3 Nov 2008 17:58:40 +0000 (09:58 -0800)]
Merge branch 'drm-next' of git://git./linux/kernel/git/airlied/drm-2.6

* 'drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
  i915: Add GEM ioctl to get available aperture size.
  drm/radeon: fixup further bus mastering confusion.
  build fix: CONFIG_DRM_I915=y && CONFIG_ACPI=n

16 years agoio mapping: clean up #ifdefs
Keith Packard [Mon, 3 Nov 2008 17:21:45 +0000 (18:21 +0100)]
io mapping: clean up #ifdefs

Impact: cleanup

clean up ifdefs: change #ifdef CONFIG_X86_32/64 to
CONFIG_HAVE_ATOMIC_IOMAP.

flip around the #ifdef sections to clean up the structure.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoio mapping: improve documentation
Keith Packard [Mon, 3 Nov 2008 17:21:44 +0000 (18:21 +0100)]
io mapping: improve documentation

Impact: add documentation

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoMerge branches 'topic/fix/misc' and 'topic/fix/hda' into for-linus
Takashi Iwai [Mon, 3 Nov 2008 15:28:24 +0000 (16:28 +0100)]
Merge branches 'topic/fix/misc' and 'topic/fix/hda' into for-linus

16 years agoALSA: hda: make a STAC_DELL_EQ option
Matthew Ranostay [Mon, 3 Nov 2008 13:12:43 +0000 (08:12 -0500)]
ALSA: hda: make a STAC_DELL_EQ option

Add support for explicitly enabling the EQ distortion hack for
systems without software biquad support.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Cc: stable@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agotracing, ring-buffer: add paranoid checks for loops
Steven Rostedt [Fri, 31 Oct 2008 13:58:35 +0000 (09:58 -0400)]
tracing, ring-buffer: add paranoid checks for loops

While writing a new tracer, I had a bug where I caused the ring-buffer
to recurse in a bad way. The bug was with the tracer I was writing
and not the ring-buffer itself. But it took a long time to find the
problem.

This patch adds paranoid checks into the ring-buffer infrastructure
that will catch bugs of this nature.

Note: I put the bug back in the tracer and this patch showed the error
      nicely and prevented the lockup.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoftrace: use kretprobe trampoline name to test in output
Steven Rostedt [Fri, 31 Oct 2008 19:44:07 +0000 (15:44 -0400)]
ftrace: use kretprobe trampoline name to test in output

Impact: ia64+tracing build fix

When a function is kprobed, the return address is set to the
kprobe_trampoline, or something similar. This caused the output
of the trace to look confusing when the parent seemed to be this
"kprobe_trampoline" function.

To fix this, Abhishek Sagar added a test of the instruction pointer
of the parent to see if it matched the kprobe_trampoline. If it
did, the output would print a "[unknown/kretprobe'd]" instead.

Unfortunately, not all archs do this the same way, and the trampoline
function may not be exported, which causes failures in builds.

This patch will compare the name instead of the pointer to see
if it matches. This prevents us from depending on a function from
being exported, and should work on all archs. The worst that can
happen is that an arch might use a different name and then we
go back to the confusing output. At least the arch will still build.

Reported-by: Abhishek Sagar <sagar.abhishek@gmail.com>
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Tested-by: Abhishek Sagar <sagar.abhishek@gmail.com>
Acked-by: Abhishek Sagar <sagar.abhishek@gmail.com>
16 years agoXFRM: copy_to_user_kmaddress() reports local address twice
Arnaud Ebalard [Mon, 3 Nov 2008 09:30:23 +0000 (01:30 -0800)]
XFRM: copy_to_user_kmaddress() reports local address twice

While adding support for MIGRATE/KMADDRESS in strongSwan (as specified
in draft-ebalard-mext-pfkey-enhanced-migrate-00), Andreas Steffen
noticed that XFRMA_KMADDRESS attribute passed to userland contains the
local address twice (remote provides local address instead of remote
one).

This bug in copy_to_user_kmaddress() affects only key managers that use
native XFRM interface (key managers that use PF_KEY are not affected).

For the record, the bug was in the initial changeset I posted which
added support for KMADDRESS (13c1d18931ebb5cf407cb348ef2cd6284d68902d
'xfrm: MIGRATE enhancements (draft-ebalard-mext-pfkey-enhanced-migrate)').

Signed-off-by: Arnaud Ebalard <arno@natisbad.org>
Reported-by: Andreas Steffen <andreas.steffen@strongswan.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoALSA: emu10k1 - Add more invert_shared_spdif flag to Audigy models
Takashi Iwai [Mon, 3 Nov 2008 09:21:36 +0000 (10:21 +0100)]
ALSA: emu10k1 - Add more invert_shared_spdif flag to Audigy models

Reported in Novell bnc#440862:
    https://bugzilla.novell.com/show_bug.cgi?id=440862

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agotracing, alpha: undefined reference to `save_stack_trace'
Al Viro [Fri, 31 Oct 2008 19:50:41 +0000 (19:50 +0000)]
tracing, alpha: undefined reference to `save_stack_trace'

Impact: build fix on !stacktrace architectures

only select STACKTRACE on architectures that have STACKTRACE_SUPPORT

... since we also need to ifdef out the guts of ftrace_trace_stack().
We also want to disallow setting TRACE_ITER_STACKTRACE in trace_flags
on such configs, but that can wait.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoALSA: hda - Add a quirk for another Acer Aspire (1025:0090)
Takashi Iwai [Mon, 3 Nov 2008 09:07:43 +0000 (10:07 +0100)]
ALSA: hda - Add a quirk for another Acer Aspire (1025:0090)

Added a quirk for another Acer Aspier laptop (1025:0090) with ALC883
codec.  Reported in Novell bnc#426935:
    https://bugzilla.novell.com/show_bug.cgi?id=426935

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoSMC91x: Fix compilation on some platforms.
David S. Miller [Mon, 3 Nov 2008 08:04:24 +0000 (00:04 -0800)]
SMC91x: Fix compilation on some platforms.

This reverts 51ac3beffd4afaea4350526cf01fe74aaff25eff ('SMC91x: delete
unused local variable "lp"') and adds __maybe_unused markers to these
(potentially) unused variables.

The issue is that in some configurations SMC_IO_SHIFT evaluates
to '(lp->io_shift)', but in some others it's plain '0'.

Based upon a build failure report from Manuel Lauss.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoALSA: remove direct access of dev->bus_id in sound/isa/*
Takashi Iwai [Mon, 3 Nov 2008 07:51:33 +0000 (08:51 +0100)]
ALSA: remove direct access of dev->bus_id in sound/isa/*

Removed the direct accesses of dev->bus_id in sound/isa/* by replacement
with dev_err() or dev_warn() functions.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agosound: struct device - replace bus_id with dev_name(), dev_set_name()
Kay Sievers [Sun, 2 Nov 2008 02:50:35 +0000 (03:50 +0100)]
sound: struct device - replace bus_id with dev_name(), dev_set_name()

[stripped sound/isa/* changes, replaced with the next patch -- tiwai]

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoALSA: Fix PIT lockup on some chipsets when using the PC-Speaker
Zoltan Devai [Sun, 2 Nov 2008 23:30:28 +0000 (00:30 +0100)]
ALSA: Fix PIT lockup on some chipsets when using the PC-Speaker

Fix PIT lockup on some chipsets when using the PC-Speaker.

Signed-off-by: Zoltan Devai <zdevai@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoALSA: rawmidi - Add open check in rawmidi callbacks
Takashi Iwai [Mon, 3 Nov 2008 07:17:05 +0000 (08:17 +0100)]
ALSA: rawmidi - Add open check in rawmidi callbacks

The drivers (e.g. mtpav) may call rawmidi functions in irq handlers
even though the streams are not opened.  This results in Oops or panic.

This patch adds the rawmidi state check before actually operating the
rawmidi buffers.

Tested-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoudp: Fix the SNMP counter of UDP_MIB_INERRORS
Wei Yongjun [Sun, 2 Nov 2008 16:14:27 +0000 (16:14 +0000)]
udp: Fix the SNMP counter of UDP_MIB_INERRORS

UDP packets received in udpv6_recvmsg() are not only IPv6 UDP packets, but
also have IPv4 UDP packets, so when do the counter of UDP_MIB_INERRORS in
udpv6_recvmsg(), we should check whether the packet is a IPv6 UDP packet
or a IPv4 UDP packet.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoudp: Fix the SNMP counter of UDP_MIB_INDATAGRAMS
Wei Yongjun [Sun, 2 Nov 2008 16:11:01 +0000 (16:11 +0000)]
udp: Fix the SNMP counter of UDP_MIB_INDATAGRAMS

If UDP echo is sent to xinetd/echo-dgram, the UDP reply will be received
at the sender. But the SNMP counter of UDP_MIB_INDATAGRAMS will be not
increased, UDP6_MIB_INDATAGRAMS will be increased instead.

  Endpoint A                      Endpoint B
  UDP Echo request ----------->
  (IPv4, Dst port=7)
                   <----------    UDP Echo Reply
                                  (IPv4, Src port=7)

This bug is come from this patch cb75994ec311b2cd50e5205efdcc0696abd6675d.

It do counter UDP[6]_MIB_INDATAGRAMS until udp[v6]_recvmsg. Because
xinetd used IPv6 socket to receive UDP messages, thus, when received
UDP packet, the UDP6_MIB_INDATAGRAMS will be increased in function
udpv6_recvmsg() even if the packet is a IPv4 UDP packet.

This patch fixed the problem.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoi915: Add GEM ioctl to get available aperture size.
Eric Anholt [Thu, 23 Oct 2008 04:40:13 +0000 (21:40 -0700)]
i915: Add GEM ioctl to get available aperture size.

This will let userland know when to submit its batchbuffers, before they get
too big to fit in the aperture.

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
16 years agoLinux v2.6.28-rc3
Linus Torvalds [Sun, 2 Nov 2008 22:17:19 +0000 (14:17 -0800)]
Linux v2.6.28-rc3

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
Linus Torvalds [Sun, 2 Nov 2008 21:32:26 +0000 (13:32 -0800)]
Merge git://git./linux/kernel/git/bart/ide-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6:
  ide-gd: re-get capacity on revalidate
  tx4938ide: Avoid underflow on calculation of a wait cycle
  tx4938ide: Do not call devm_ioremap for whole 128KB
  tx4938ide: Check minimum cycle time and SHWT range (v2)
  ide: Switch to a common address
  ide-cd: fix DMA alignment regression

16 years agoide-gd: re-get capacity on revalidate
Borislav Petkov [Sun, 2 Nov 2008 20:40:10 +0000 (21:40 +0100)]
ide-gd: re-get capacity on revalidate

We need to re-get a removable media's capacity when revalidating the
disk so that its partitions get rescanned by the block layer.

Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: axboe@kernel.dk
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agotx4938ide: Avoid underflow on calculation of a wait cycle
Atsushi Nemoto [Sun, 2 Nov 2008 20:40:10 +0000 (21:40 +0100)]
tx4938ide: Avoid underflow on calculation of a wait cycle

Make 'wt' variable signed while it can be negative during calculation.

Suggested-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: sshtylyov@ru.mvista.com
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agotx4938ide: Do not call devm_ioremap for whole 128KB
Atsushi Nemoto [Sun, 2 Nov 2008 20:40:09 +0000 (21:40 +0100)]
tx4938ide: Do not call devm_ioremap for whole 128KB

Call devm_ioremap() for CS0 and CS1 separetely.
And some style cleanups.

Suggested-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: ralf@linux-mips.org
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agotx4938ide: Check minimum cycle time and SHWT range (v2)
Atsushi Nemoto [Sun, 2 Nov 2008 20:40:09 +0000 (21:40 +0100)]
tx4938ide: Check minimum cycle time and SHWT range (v2)

SHWT value is used as address valid to -CSx assertion and -CSx to -DIOx
assertion setup time, and contrarywise, -DIOx to -CSx release and -CSx
release to address invalid hold time, so it actualy applies 4 times and
so constitutes -DIOx recovery time.  Check requirement of the recovery
time and cycle time.  Also check SHWT maximum value.

Suggested-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: ralf@linux-mips.org
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: Switch to a common address
Alan Cox [Sun, 2 Nov 2008 20:40:08 +0000 (21:40 +0100)]
ide: Switch to a common address

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: fix DMA alignment regression
Borislav Petkov [Sun, 2 Nov 2008 20:40:07 +0000 (21:40 +0100)]
ide-cd: fix DMA alignment regression

e5318b531b008c79d2a0c0df06a7b8628da38e2f ("ide: use the dma safe check for
REQ_TYPE_ATA_PC") introduced a regression which caused some ATAPI drives to
turn off DMA for REQ_TYPE_BLOCK_PC commands while burning and thus degrading
performance and ultimately causing an excessive amount of underruns.

The issue is documented also in:
http://bugzilla.kernel.org/show_bug.cgi?id=11742.

Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Tested-by: Valerio Passini <valerio.passini@unicam.it>
[bart: fixup patch description per comments from Sergei Shtylyov]
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Sun, 2 Nov 2008 18:16:44 +0000 (10:16 -0800)]
Merge git://git./linux/kernel/git/davem/sparc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  sparc64: Fix PCI resource mapping on sparc64
  sparc64: Kill annoying warning when building compat_binfmt_elf.o
  sparc32: kernel/trace/trace.c wants DIE_OOPS
  sparc64: Fix __copy_{to,from}_user_inatomic defines.

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Sun, 2 Nov 2008 18:15:52 +0000 (10:15 -0800)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (33 commits)
  af_unix: netns: fix problem of return value
  IRDA: remove double inclusion of module.h
  udp: multicast packets need to check namespace
  net: add documentation for skb recycling
  key: fix setkey(8) policy set breakage
  bpa10x: free sk_buff with kfree_skb
  xfrm: do not leak ESRCH to user space
  net: Really remove all of LOOPBACK_TSO code.
  netfilter: nf_conntrack_proto_gre: switch to register_pernet_gen_subsys()
  netns: add register_pernet_gen_subsys/unregister_pernet_gen_subsys
  net: delete excess kernel-doc notation
  pppoe: Fix socket leak.
  gianfar: Don't reset TBI<->SerDes link if it's already up
  gianfar: Fix race in TBI/SerDes configuration
  at91_ether: request/free GPIO for PHY interrupt
  amd8111e: fix dma_free_coherent context
  atl1: fix vlan tag regression
  SMC91x: delete unused local variable "lp"
  myri10ge: fix stop/go mmio ordering
  bonding: fix panic when taking bond interface down before removing module
  ...

16 years agolinux/string.h: fix comment typo
Jeff Garzik [Sun, 2 Nov 2008 14:51:27 +0000 (09:51 -0500)]
linux/string.h: fix comment typo

s/user/used/

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agodrivers/net/smc911x.c: Fix lockdep warning on xmit.
Will Newton [Tue, 28 Oct 2008 10:52:36 +0000 (10:52 +0000)]
drivers/net/smc911x.c: Fix lockdep warning on xmit.

dev_kfree_skb should not be called with irqs disabled, use dev_kfree_skb_irq
instead. The warning caused looks like this:

======================================================
[ INFO: hard-safe -> hard-unsafe lock order detected ]
2.6.28-rc1 #273
------------------------------------------------------
swapper/0 [HC0[0]:SC1[2]:HE0:SE0] is trying to acquire:
 (clock-AF_INET){-..+}, at: [<4015c17c>] _sock_def_write_space+0x28/0xd8

and this task is already holding:
 (&lp->lock){++..}, at: [<4013f230>] _smc911x_hard_start_xmit+0x30/0x4b8
which would create a new lock dependency:
 (&lp->lock){++..} -> (clock-AF_INET){-..+}

Signed-off-by: Will Newton <will.newton@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agosparc64: Fix PCI resource mapping on sparc64
Max Dmitrichenko [Sun, 2 Nov 2008 07:34:10 +0000 (00:34 -0700)]
sparc64: Fix PCI resource mapping on sparc64

There is a problem discovered in recent versions of ATI Mach64 driver
in X.org on sparc64 architecture. In short, the driver fails to mmap
MMIO aperture (PCI resource #2).

I've found that kernel's __pci_mmap_make_offset() returns EINVAL. It
checks whether user attempts to mmap more than the resource length,
which is 0x1000 bytes in our case. But PAGE_SIZE on SPARC64 is 0x2000
and this is what actually is being mmaped. So __pci_mmap_make_offset()
failed for this PCI resource.

Signed-off-by: Max Dmitrichenko <dmitrmax@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agosparc64: Kill annoying warning when building compat_binfmt_elf.o
David S. Miller [Sun, 2 Nov 2008 07:15:38 +0000 (00:15 -0700)]
sparc64: Kill annoying warning when building compat_binfmt_elf.o

GCC warns because some tests against 32-bit values never evaluate to
true due to how TASK_SIZE is defined.

I always wanted to mimick powerpc's definition of TASK_SIZE, which
is simply TASK_SIZE_OF(current) and that also fixes the warning.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agosparc32: kernel/trace/trace.c wants DIE_OOPS
Al Viro [Sun, 2 Nov 2008 04:44:01 +0000 (21:44 -0700)]
sparc32: kernel/trace/trace.c wants DIE_OOPS

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agosparc64: Fix __copy_{to,from}_user_inatomic defines.
Hugh Dickins [Sun, 2 Nov 2008 04:41:40 +0000 (21:41 -0700)]
sparc64: Fix __copy_{to,from}_user_inatomic defines.

Alexander Beregalov reports oops in __bzero() called from
copy_from_user_fixup() called from iov_iter_copy_from_user_atomic(),
when running dbench on tmpfs on sparc64: its __copy_from_user_inatomic
and __copy_to_user_inatomic should be avoiding, not calling, the fixups.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoaf_unix: netns: fix problem of return value
Jianjun Kong [Sun, 2 Nov 2008 04:37:27 +0000 (21:37 -0700)]
af_unix: netns: fix problem of return value

fix problem of return value

net/unix/af_unix.c: unix_net_init()
when error appears, it should return 'error', not always return 0.

Signed-off-by: Jianjun Kong <jianjun@zeuux.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoIRDA: remove double inclusion of module.h
Alexander Beregalov [Sun, 2 Nov 2008 04:30:50 +0000 (21:30 -0700)]
IRDA: remove double inclusion of module.h

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoudp: multicast packets need to check namespace
Eric Dumazet [Sun, 2 Nov 2008 04:22:23 +0000 (21:22 -0700)]
udp: multicast packets need to check namespace

Current UDP multicast delivery is not namespace aware.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Acked-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonet: add documentation for skb recycling
Stephen Hemminger [Sun, 2 Nov 2008 04:01:09 +0000 (21:01 -0700)]
net: add documentation for skb recycling

Commit 04a4bb55bcf35b63d40fd2725e58599ff8310dd7 ("net: add
skb_recycle_check() to enable netdriver skb recycling") added a
method for network drivers to recycle skbuffs, but while use of
this mechanism was documented in the commit message, it should
really have been added as a docbook comment as well -- this
patch does that.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agosparc32: kernel/trace/trace.c wants DIE_OOPS
Al Viro [Sat, 1 Nov 2008 18:20:29 +0000 (18:20 +0000)]
sparc32: kernel/trace/trace.c wants DIE_OOPS

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoel3_common_init() should be __devinit, not __init
Al Viro [Sat, 1 Nov 2008 18:20:19 +0000 (18:20 +0000)]
el3_common_init() should be __devinit, not __init

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomissing dependencies on HAVE_CLK in drivers/mfd
Al Viro [Sat, 1 Nov 2008 18:19:59 +0000 (18:19 +0000)]
missing dependencies on HAVE_CLK in drivers/mfd

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agosection fixes for cirrusfb
Al Viro [Sat, 1 Nov 2008 18:20:39 +0000 (18:20 +0000)]
section fixes for cirrusfb

cirrusfb_zorro_unmap() may be called both from __devexit and (on
cleanup path) from __devinit.  So it needs to be a normal function,
same as for cirrusfb_pci_unmap()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoPM_TEST_SUSPEND should depend on RTC_CLASS, not RTC_LIB
Al Viro [Sat, 1 Nov 2008 18:20:09 +0000 (18:20 +0000)]
PM_TEST_SUSPEND should depend on RTC_CLASS, not RTC_LIB

Insufficient dependency - we really want CONFIG_RTC_CLASS=y there.
That will give us CONFIG_RTC_LIB=y, so the old dependency can be
simply replaced.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agooss: fix O_NONBLOCK in dmasound_core
Al Viro [Sat, 1 Nov 2008 18:19:49 +0000 (18:19 +0000)]
oss: fix O_NONBLOCK in dmasound_core

We broke O_NONBLOCK handling in OSS dmasound_core in 2.3.11-pre3 - the
original code copied f_flags to open_mode and then checked for
O_NONBLOCK in there, but that got changed to copying f_mode and
O_NONBLOCK has not reached that field in any kernel version.

Since we do not care for any other bits, the fix is obvious...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 1 Nov 2008 17:36:30 +0000 (10:36 -0700)]
Merge branch 'x86-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86: fix AMDC1E and XTOPOLOGY conflict in cpufeature
  x86: build fix

16 years agoinit/do_mounts_md.c: remove duplicated #include
Huang Weiyi [Fri, 31 Oct 2008 04:47:23 +0000 (12:47 +0800)]
init/do_mounts_md.c: remove duplicated #include

Removed duplicated #include <linux/delay.h> in init/do_mounts_md.c.

The same compile error ("error: implicit declaration of function
'msleep'") got fixed twice:

 - f8b77d39397e1510b1a3bcfd385ebd1a45aae77f ("init/do_mounts_md.c:
   msleep compile fix")

 - 73b4a24f5ff09389ba6277c53a266b142f655ed2 ("init/do_mounts_md.c must
   #include <linux/delay.h>")

by people adding the <linux/delay.h> include in two slightly different
places.  Andrew's quilt scripts happily ignore the fuzz, and will
re-apply the patch even though they had conflicts.

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agox86: Clean up late e820 resource allocation
Linus Torvalds [Sat, 1 Nov 2008 17:17:22 +0000 (10:17 -0700)]
x86: Clean up late e820 resource allocation

This makes the late e820 resources use 'insert_resource_expand_to_fit()'
instead of doing a 'reserve_region_with_split()', and also avoids
marking them as IORESOURCE_BUSY.

This results in us being perfectly happy to use pre-existing PCI
resources even if they were marked as being in a reserved region, while
still avoiding any _new_ allocations in the reserved regions.  It also
makes for a simpler and more accurate resource tree.

Example resource allocation from Jonathan Corbet, who has firmware that
has an e820 reserved entry that covered a big range (e0000000-fed003ff),
and that had various PCI resources in it set up by firmware.

With old kernels, the reserved range would force us to re-allocate all
pre-existing PCI resources, and his reserved range would end up looking
like this:

e0000000-fed003ff : reserved
  fec00000-fec00fff : IOAPIC 0
  fed00000-fed003ff : HPET 0

where only the pre-allocated special regions (IOAPIC and HPET) were kept
around.

With 2.6.28-rc2, which uses 'reserve_region_with_split()', Jonathan's
resource tree looked like this:

e0000000-fe7fffff : reserved
fe800000-fe8fffff : PCI Bus 0000:01
 fe800000-fe8fffff : reserved
fe900000-fe9d9aff : reserved
fe9d9b00-fe9d9bff : 0000:00:1f.3
 fe9d9b00-fe9d9bff : reserved
fe9d9c00-fe9d9fff : 0000:00:1a.7
 fe9d9c00-fe9d9fff : reserved
fe9da000-fe9dafff : 0000:00:03.3
 fe9da000-fe9dafff : reserved
fe9db000-fe9dbfff : 0000:00:19.0
 fe9db000-fe9dbfff : reserved
fe9dc000-fe9dffff : 0000:00:1b.0
 fe9dc000-fe9dffff : reserved
fe9e0000-fe9fffff : 0000:00:19.0
 fe9e0000-fe9fffff : reserved
fea00000-fea7ffff : 0000:00:02.0
 fea00000-fea7ffff : reserved
fea80000-feafffff : 0000:00:02.1
 fea80000-feafffff : reserved
feb00000-febfffff : 0000:00:02.0
 feb00000-febfffff : reserved
fec00000-fed003ff : reserved
 fec00000-fec00fff : IOAPIC 0
 fed00000-fed003ff : HPET 0

and because the reserved entry had been split and moved into the
individual resources, and because it used the IORESOURCE_BUSY flag, the
drivers that actually wanted to _use_ those resources couldn't actually
attach to them:

e1000e 0000:00:19.0: BAR 0: can't reserve mem region [0xfe9e0000-0xfe9fffff]
HDA Intel 0000:00:1b.0: BAR 0: can't reserve mem region [0xfe9dc000-0xfe9dffff]

with this patch, the resource tree instead becomes

e0000000-fed003ff : reserved
  fe800000-fe8fffff : PCI Bus 0000:01
  fe9d9b00-fe9d9bff : 0000:00:1f.3
  fe9d9c00-fe9d9fff : 0000:00:1a.7
    fe9d9c00-fe9d9fff : ehci_hcd
  fe9da000-fe9dafff : 0000:00:03.3
  fe9db000-fe9dbfff : 0000:00:19.0
    fe9db000-fe9dbfff : e1000e
  fe9dc000-fe9dffff : 0000:00:1b.0
    fe9dc000-fe9dffff : ICH HD audio
  fe9e0000-fe9fffff : 0000:00:19.0
    fe9e0000-fe9fffff : e1000e
  fea00000-fea7ffff : 0000:00:02.0
  fea80000-feafffff : 0000:00:02.1
  feb00000-febfffff : 0000:00:02.0
  fec00000-fec00fff : IOAPIC 0
  fed00000-fed003ff : HPET 0

ie the one reserved region now ends up surrounding all the PCI resources
that were allocated inside of it by firmware, and because it is not
marked BUSY, drivers have no problem attaching to the pre-allocated
resources.

Reported-and-tested-by: Jonathan Corbet <corbet@lwn.net>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Robert Hancock <hancockr@shaw.ca>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoreserve_region_with_split: Fix GFP_KERNEL usage under spinlock
Linus Torvalds [Sat, 1 Nov 2008 16:53:58 +0000 (09:53 -0700)]
reserve_region_with_split: Fix GFP_KERNEL usage under spinlock

This one apparently doesn't generate any warnings, because the function
is only used during system bootup, when the warnings are disabled.  But
it's still very wrong.

The __reserve_region_with_split() function is called with the
resource_lock held for writing, so it must only ever do GFP_ATOMIC
allocations.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge branch 'link_removal' of git://www.jni.nu/cris
Linus Torvalds [Sat, 1 Nov 2008 16:52:43 +0000 (09:52 -0700)]
Merge branch 'link_removal' of git://jni.nu/cris

* 'link_removal' of git://www.jni.nu/cris:
  [CRIS] Remove links from CRIS build
  [CRIS] Merge asm-offsets.c for both arches into one file.

16 years agoMerge branch 'cris_move' of git://www.jni.nu/cris
Linus Torvalds [Sat, 1 Nov 2008 16:51:51 +0000 (09:51 -0700)]
Merge branch 'cris_move' of git://www.jni.nu/cris

* 'cris_move' of git://www.jni.nu/cris:
  [CRIS] Move header files from include to arch/cris/include.
  [CRISv32] Remove warning in io.h

16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
Linus Torvalds [Sat, 1 Nov 2008 16:50:38 +0000 (09:50 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jmorris/security-testing-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6:
  SELinux: properly handle empty tty_files list

16 years agoremove unused #include <version.h>'s
Huang Weiyi [Fri, 31 Oct 2008 14:50:04 +0000 (22:50 +0800)]
remove unused #include <version.h>'s

The file(s) below do not use LINUX_VERSION_CODE nor KERNEL_VERSION.
  drivers/leds/leds-hp-disk.c
  drivers/misc/panasonic-laptop.c

This patch removes the said #include <version.h>.

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agosaner FASYNC handling on file close
Al Viro [Fri, 31 Oct 2008 23:28:30 +0000 (23:28 +0000)]
saner FASYNC handling on file close

As it is, all instances of ->release() for files that have ->fasync()
need to remember to evict file from fasync lists; forgetting that
creates a hole and we actually have a bunch that *does* forget.

So let's keep our lives simple - let __fput() check FASYNC in
file->f_flags and call ->fasync() there if it's been set.  And lose that
crap in ->release() instances - leaving it there is still valid, but we
don't have to bother anymore.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofile caps: always start with clear bprm->caps_*
Serge Hallyn [Thu, 30 Oct 2008 16:52:23 +0000 (11:52 -0500)]
file caps: always start with clear bprm->caps_*

While Linux doesn't honor setuid on scripts.  However, it mistakenly
behaves differently for file capabilities.

This patch fixes that behavior by making sure that get_file_caps()
begins with empty bprm->caps_*.  That way when a script is loaded,
its bprm->caps_* may be filled when binfmt_misc calls prepare_binprm(),
but they will be cleared again when binfmt_elf calls prepare_binprm()
next to read the interpreter's file capabilities.

Signed-off-by: Serge Hallyn <serue@us.ibm.com>
Acked-by: David Howells <dhowells@redhat.com>
Acked-by: Andrew G. Morgan <morgan@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agokey: fix setkey(8) policy set breakage
Alexey Dobriyan [Fri, 31 Oct 2008 23:41:26 +0000 (16:41 -0700)]
key: fix setkey(8) policy set breakage

Steps to reproduce:

#/usr/sbin/setkey -f
flush;
spdflush;

add 192.168.0.42 192.168.0.1 ah 24500 -A hmac-md5 "1234567890123456";
add 192.168.0.42 192.168.0.1 esp 24501 -E 3des-cbc "123456789012123456789012";

spdadd 192.168.0.42 192.168.0.1 any -P out ipsec
esp/transport//require
ah/transport//require;

setkey: invalid keymsg length

Policy dump will bail out with the same message after that.

-recv(4, "\2\16\0\0\32\0\3\0\0\0\0\0\37\r\0\0\3\0\5\0\377 \0\0\2\0\0\0\300\250\0*\0"..., 32768, 0) = 208
+recv(4, "\2\16\0\0\36\0\3\0\0\0\0\0H\t\0\0\3\0\5\0\377 \0\0\2\0\0\0\300\250\0*\0"..., 32768, 0) = 208

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoMerge branch 'for-2.6.28' of git://linux-nfs.org/~bfields/linux
Linus Torvalds [Fri, 31 Oct 2008 22:44:08 +0000 (15:44 -0700)]
Merge branch 'for-2.6.28' of git://linux-nfs.org/~bfields/linux

* 'for-2.6.28' of git://linux-nfs.org/~bfields/linux:
  NLM: Set address family before calling nlm_host_rebooted()
  nfsd: fix failure to set eof in readdir in some situations

16 years agoSELinux: properly handle empty tty_files list
Eric Paris [Fri, 31 Oct 2008 21:40:00 +0000 (17:40 -0400)]
SELinux: properly handle empty tty_files list

SELinux has wrongly (since 2004) had an incorrect test for an empty
tty->tty_files list.  With an empty list selinux would be pointing to part
of the tty struct itself and would then proceed to dereference that value
and again dereference that result.  An F10 change to plymouth on a ppc64
system is actually currently triggering this bug.  This patch uses
list_empty() to handle empty lists rather than looking at a meaningless
location.

[note, this fixes the oops reported in
https://bugzilla.redhat.com/show_bug.cgi?id=469079]

Signed-off-by: Eric Paris <eparis@redhat.com>
Signed-off-by: James Morris <jmorris@namei.org>
16 years ago[CRIS] Remove links from CRIS build
Jesper Nilsson [Wed, 22 Oct 2008 21:57:53 +0000 (23:57 +0200)]
[CRIS] Remove links from CRIS build

Remove the links to architecture and machine dependent directories
(boot, lib, drivers, arch, mach)

The links were created and used mostly from the arch/cris/Makefile,
so why not dispense with them altogether?
Changed $(ARCH) to "cris" in Makefile, it is easier to read this way.

The CRISv32 head.S common files for the kernel and compressed images
needed to be modified to use ifdefs instead of using the now removed
mach link. Since there are only two versions, this is not a huge loss
in readability.

The link to vmlinux.lds.S is also replaced with a merged version
which uses ifdefs to select the correct layout.
System.map before and after are identical.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
16 years ago[CRIS] Merge asm-offsets.c for both arches into one file.
Jesper Nilsson [Tue, 21 Oct 2008 20:10:27 +0000 (22:10 +0200)]
[CRIS] Merge asm-offsets.c for both arches into one file.

Eliminates the link to arch specific asm-offsets.c from CRIS
architecture build system.

Resulting asm-offsets.s are identical before and after change
for both arch-v10 and arch-v32.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
16 years agoALSA: hda - Add digital-mic for ALC269 auto-probe mode
Takashi Iwai [Fri, 31 Oct 2008 16:16:31 +0000 (17:16 +0100)]
ALSA: hda - Add digital-mic for ALC269 auto-probe mode

The digital mic wasn't detected properly for ALC269 auto-probing mode
because of its widget number.  Fixed now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoALSA: hda - Disable broken mic auto-muting in Realtek codes
Takashi Iwai [Fri, 31 Oct 2008 13:18:24 +0000 (14:18 +0100)]
ALSA: hda - Disable broken mic auto-muting in Realtek codes

The recent addition of automatic mic-muting is broken in some cases.
The code assumes that the pin nids <= 0x18, but the digital pins can
be less than 0x18.
Also, it assumes the front-mic being the internal mic, but it depends
on the hardware implementation actually.

Instead of complex case-fixes, better to disable the code as now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
Linus Torvalds [Fri, 31 Oct 2008 15:14:15 +0000 (08:14 -0700)]
Merge branch 'merge' of git://git./linux/kernel/git/paulus/powerpc

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (23 commits)
  Revert "powerpc: Sync RPA note in zImage with kernel's RPA note"
  powerpc: Fix compile errors with CONFIG_BUG=n
  powerpc: Fix format string warning in arch/powerpc/boot/main.c
  powerpc: Fix bug in kernel copy of libfdt's fdt_subnode_offset_namelen()
  powerpc: Remove duplicate DMA entry from mpc8313erdb device tree
  powerpc/cell/OProfile: Fix on-stack array size in activate spu profiling function
  powerpc/mpic: Fix regression caused by change of default IRQ affinity
  powerpc: Update remaining dma_mapping_ops to use map/unmap_page
  powerpc/pci: Fix unmapping of IO space on 64-bit
  powerpc/pci: Properly allocate bus resources for hotplug PHBs
  OF-device: Don't overwrite numa_node in device registration
  powerpc: Fix swapcontext system for VSX + old ucontext size
  powerpc: Fix compiler warning for the relocatable kernel
  powerpc: Work around ld bug in older binutils
  powerpc/ppc64/kdump: Better flag for running relocatable
  powerpc: Use is_kdump_kernel()
  powerpc: Kexec exit should not use magic numbers
  powerpc/44x: Update 44x defconfigs
  powerpc/40x: Update 40x defconfigs
  powerpc: enable heap randomization for linkstations
  ...