Linus Torvalds [Mon, 3 Dec 2007 16:15:08 +0000 (08:15 -0800)]
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: (48 commits)
LIB82596: correct data types for hardware addresses
via-velocity: don't oops on MTU change (resend)
Stop phy code from returning success to unknown ioctls.
SET_NETDEV_DEV() in fec_mpc52xx.c
net: smc911x: only enable for mpr2 on sh.
e1000: Fix NAPI state bug when Rx complete
sky2: turn of dynamic Tx watermark workaround (FE+ only)
sky2: don't use AER routines
sky2: revert to access PCI config via device space
cxgb - fix stats
cxgb - fix NAPI
cxgb - fix T2 GSO
ucc_geth: handle passing of RX-only and TX-only internal delay PHY connection type parameters
phylib: marvell: add support for TX-only and RX-only Internal Delay
phylib: add PHY interface modes for internal delay for tx and rx only
skge: MTU changing fix
skge: serial mode register values
skge version 1.13
skge: increase TX threshold for Jumbo
skge: fiber link up/down fix
...
Linus Torvalds [Mon, 3 Dec 2007 16:14:45 +0000 (08:14 -0800)]
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
sata_mv: Fix broken Marvell 7042 support.
libata: Fix early use of port printk. (Was Re: ata4294967295: failed to start port (errno=-19))
ata_piix: add more toshiba laptops to broken suspend list
libata: More IVB horkage from TSST
libata: report protocol and full CDB on error
Several fixes for the AVR32 PATA driver
sata_mv: fix compilation error when enabling DEBUG
Set proper ATA UDMA mode for bf548 according to system clock.
Jeff Dike [Sat, 1 Dec 2007 20:16:30 +0000 (12:16 -0800)]
uml: work around host tcsetattr bug
Under the conditions that UML uses it, tcgetattr is guaranteed to return
-EINTR when the console is attached to /dev/ptmx, making generic_console_write
hang because it loops, calling tcgetattr until it succeeds. This is a host
bug - see http://marc.info/?l=linux-kernel&m=119618990807182&w=2 for the
details.
This patch works around it by blocking SIGIO while the terminal attributes are
being fiddled.
Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Sat, 1 Dec 2007 20:16:29 +0000 (12:16 -0800)]
uml: after_sleep_interval should return something
I forgot to have an int-returning function actually return something.
Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Sat, 1 Dec 2007 20:16:29 +0000 (12:16 -0800)]
uml: add !UML dependencies
The previous commit ("uml: keep UML Kconfig in sync with x86") is not
enough, unfortunately. If we go that way, we need to add dependencies
on !UML for several options.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Sat, 1 Dec 2007 20:16:28 +0000 (12:16 -0800)]
uml: keep UML Kconfig in sync with x86
Fix a UML build breakage introduced by commit 1032c0ba9da5c5b53173ad2dcf8b2a2da78f8b17 - it introduces X86_32, with many
things which UML needs depending on it.
This patch adds definitions of X86_32 and RWSEM_XCHGADD_ALGORITHM to
the UML/i386 Kconfig.
Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Mark Lord [Sat, 1 Dec 2007 18:07:22 +0000 (13:07 -0500)]
sata_mv: Fix broken Marvell 7042 support.
sata_mv: Fix broken Marvell 7042 support.
The Marvell 7042 chip is more or less the same as the 6042 internally,
but sports a PCIe bus. Despite having identical SATA cores, the 7042
does differ from its PCI bus counterparts in placment and layout of
certain bus related registers.
This patch fixes sata_mv to distinguish between the PCI bus registers
of earlier chips, and the PCIe bus registers of the 7042.
Specifically, move the offsets and bit patterns for the
PCI/PCIe interrupt cause/mask registers into the struct mv_host_priv,
as these values differ between the 6xxx and 7xxx series chips.
This fixes the driver to not access reserved PCI addresses,
and prevents the lockups reported in linux-2.6.24 with 7042 boards.
Also add a new PCI ID for the Highpoint 2300 7042-based board
that I'm using for testing this stuff here.
Tested with Marvell 6081 + 7042 chips, on x86 & x86_64.
Signed-off-by: Mark Lord <mlord@pobox.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Alan Cox [Fri, 30 Nov 2007 15:23:16 +0000 (15:23 +0000)]
libata: Fix early use of port printk. (Was Re: ata4294967295: failed to start port (errno=-19))
On Fri, 30 Nov 2007 14:34:11 +0200 (EET)
Meelis Roos <mroos@linux.ee> wrote:
> > Can you stick a stack trace in at that point ? That would help diagnose
> > it a great deal quicker.
>
> Finally done - found out hard way that BUG() is too bad and
> dump_st5ack() suits me better.
Thanks. This should fix the real cause, and also allow for port start to
fail politely with -ENODEV.
Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
The VIA veloicty driver needs the following to allow changing MTU when down.
The buffer size needs to be computed when device is brought up, not when
device is initialized. This also fixes a bug where the buffer size was
computed differently on change_mtu versus initial setting.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
David Woodhouse [Wed, 28 Nov 2007 19:56:34 +0000 (19:56 +0000)]
Stop phy code from returning success to unknown ioctls.
This kind of sucks, and prevents the Fedora installer from using the
device for network installs...
[root@efika phy]# iwconfig eth0
Warning: Driver for device eth0 has been compiled with an ancient version
of Wireless Extension, while this program support version 11 and later.
Some things may be broken...
eth0 ESSID:off/any Nickname:""
NWID:0 Channel:0 Access Point: 00:00:BF:81:14:E0
Bit Rate:-1.08206e+06 kb/s Sensitivity=0/0
RTS thr:off Fragment thr:off
Encryption key:<too big>
Power Management:off
Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Paul Mundt [Wed, 28 Nov 2007 09:24:59 +0000 (18:24 +0900)]
net: smc911x: only enable for mpr2 on sh.
The smc911x.h is a bit of a mess, not supporting any sort of generic
configuration. For the moment only ARCH_PXA and SH_MAGIC_PANEL_R2 have
suitable definitions, so we reflect this in the Kconfig also.
While there are other SH boards that will likely turn this on in the
2.6.25 time frame, it's not worth trying to stub around at the moment.
Fixes up the allmodconfig build, as noted by akpm.
Signed-off-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
sky2: turn of dynamic Tx watermark workaround (FE+ only)
Add workaround for issues FE+ (A0) transmit watermark.
This is copied verbatim from vendor driver sk98lin (10.22.4.3).
Don't have that chip version and no more information seems to be available.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Using PCIE advanced error recovery stuff creates more user problems than it's worth.
The AER stuff depends on MMCONFIG and in many configurations it just doesn't work.
Plus it doesn't add any real functionality to the driver. The sky2
driver handles its own errors fine as is.
sky2: revert to access PCI config via device space
Using the hardware window into PCI config space is more reliable
and smaller/faster than using the pci_config routines. It avoids issues
with MMCONFIG etc.
Kim Phillips [Mon, 26 Nov 2007 22:17:58 +0000 (16:17 -0600)]
ucc_geth: handle passing of RX-only and TX-only internal delay PHY connection type parameters
Extend the RGMII-Internal Delay specification case to include
TX-only and RX-only variants.
Signed-off-by: Kim Phillips <kim.phillips@freescale.com> Tested-by: Anton Vorontsov <avorontsov@ru.mvista.com> Acked-by: Li Yang <leoli@freescale.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Kim Phillips [Mon, 26 Nov 2007 22:17:52 +0000 (16:17 -0600)]
phylib: marvell: add support for TX-only and RX-only Internal Delay
Previously, Internal Delay specification implied the delay be
applied to both TX and RX. This patch allows for separate TX/RX-only
internal delay specification.
Signed-off-by: Kim Phillips <kim.phillips@freescale.com> Tested-by: Anton Vorontsov <avorontsov@ru.mvista.com> Acked-by: Li Yang <leoli@freescale.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Kim Phillips [Mon, 26 Nov 2007 22:17:48 +0000 (16:17 -0600)]
phylib: add PHY interface modes for internal delay for tx and rx only
Allow phylib specification of cases where hardware needs to configure
PHYs for Internal Delay only on either RX or TX (not both).
Signed-off-by: Kim Phillips <kim.phillips@freescale.com> Tested-by: Anton Vorontsov <avorontsov@ru.mvista.com> Acked-by: Li Yang <leoli@freescale.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
The code to change MTU doesn't correctly handle all the chip variations
and requirements for restarting. On Genesis chips changing MTU would just
cause receiver to hang.
Use a simpler approach of just taking link down/up if needed.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
The driver would not work over fibre if other end when down then
came back up (would require reloading driver). The correct way
to manage the link the same way for both TP and fibre.
Resloves problem described in: http://lkml.org/lkml/2007/11/6/395
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
The calculation of usable FIFO RAM is wrong in the skge driver.
First, is doesn't take into account the reserved area on the original
SysKonnect Genesis boards. Second it has an off-by-one error because
hw->ports is either 1 or 2.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Peter Tiedemann [Thu, 29 Nov 2007 16:36:27 +0000 (17:36 +0100)]
ctc: make use of alloc_netdev()
Currently ctc-device initialization is broken (kernel bug in
ctc_new_device).
The new network namespace code reveals a deficiency of the
ctc driver. It should make use of alloc_netdev() as described
in Documentation/networking/netdevices.txt.
Signed-off-by: Peter Tiedemann <ptiedem@de.ibm.com> Signed-off-by: Ursula Braun <braunu@de.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
S2io: Fixed the case when the card initialization fails on mtu change
Fix the case when the card initialization fails on a mtu change and then
close is called (due to ifdown), which frees non existent rx buffers.
- Returning appropriate error codes in init_nic function.
- In s2io_close function s2io_card_down is called only when device is up.
- In s2io_change_mtu function return value of s2io_card_up function
is checked and returned if it failed.
Linus Torvalds [Sat, 1 Dec 2007 04:07:54 +0000 (20:07 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
IB/ehca: Fix static rate if path faster than link
IPoIB: Fix oops if xmit is called when priv->broadcast is NULL
Pavel Kiryukhin [Tue, 27 Nov 2007 16:20:47 +0000 (19:20 +0300)]
[MIPS] Fix use of smp_processor_id() in preemptible code.
Freeing prom memory: 956kb freed
Freeing firmware memory: 978944k freed
Freeing unused kernel memory: 180k freed
BUG: using smp_processor_id() in preemptible [00000000] code: swapper/1
caller is r4k_dma_cache_wback_inv+0x144/0x2a0
Call Trace:
[<80117af8>] r4k_dma_cache_wback_inv+0x144/0x2a0
[<802e4b84>] debug_smp_processor_id+0xd4/0xf0
[<802e4b7c>] debug_smp_processor_id+0xcc/0xf0
...
CONFIG_DEBUG_PREEMPT is enabled.
--
Bug cause is blast_dcache_range() in preemptible code [in
r4k_dma_cache_wback_inv()].
blast_dcache_range() is constructed via __BUILD_BLAST_CACHE_RANGE that
uses cpu_dcache_line_size(). It uses current_cpu_data that use
smp_processor_id() in turn. In case of CONFIG_DEBUG_PREEMPT
smp_processor_id emits BUG if we are executing with preemption
enabled.
Cpu options of cpu0 are assumed to be the superset of all processors.
Can I make the same assumptions for cache line size and fix this
issue the following way:
Linus Torvalds [Fri, 30 Nov 2007 16:11:18 +0000 (08:11 -0800)]
Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm:
[ARM] 4680/1: parentheses around NR_IRQS definition
[ARM] 4679/1: AT91: Change maintainer email address
[ARM] 4675/1: pxa: fix mfp address definition error for pxa320
[ARM] 4674/1: pxa: increase LCD PCLK drive strength to fast 2mA for PXA300/PXA310
[ARM] 4673/1: pxa: add missing IRQ_SSP4 definitions for PXA3xx
[ARM] 4672/1: pxa: fix DRCMR(n) to support PXA27x and later processors
[ARM] 4665/1: fix __und_usr wrt accessing the undefined insn in user space
[ARM] 4659/1: remove possibilities for spurious false negative with __kuser_cmpxchg
[ARM] 4661/1: fix do_undefinstr wrt the enabling of IRQs
[ARM] uengine: fix memset size error
[ARM] 4648/1: i.MX/MX1 ensure more complete AITC initialization
[ARM] 4611/2: AT91: Fix GPIO buttons pins on SAM9261-EK.
[ARM] 4650/1: AT91: New-style init of I2C, support for i2c-gpio
[ARM] 4604/2: AT91: Master clock divistor on SAM9
[ARM] 4662/1: Fix PXA serial driver compilation if SERIAL_PXA_CONSOLE is disabled
[ARM] PXA ssp: unlock when ssp tries to close an invalid port
[ARM] 4654/1: pxa: update default MFP register value
[ARM] 4653/1: pxa: fix a gpio typo in mfp-pxa320.h
[ARM] 4652/1: pxa: fix a typo of pxa27x usb host clk definition
[ARM] 4651/1: pxa: add PXA3xx specific IRQ definitions
Matthew Wilcox [Thu, 29 Nov 2007 19:05:13 +0000 (12:05 -0700)]
Fix kmem_cache_free performance regression in slab
The database performance group have found that half the cycles spent
in kmem_cache_free are spent in this one call to BUG_ON. Moving it
into the CONFIG_SLAB_DEBUG-only function cache_free_debugcheck() is a
performance win of almost 0.5% on their particular benchmark.
The call was added as part of commit ddc2e812d592457747c4367fb73edcaa8e1e49ff
with the comment that "overhead should be minimal". It may have been
minimal at the time, but it isn't now.
[ Quoth Pekka Enberg: "I don't think the BUG_ON per se caused the
performance regression but rather the virt_to_head_page() changes to
virt_to_cache() that were added later." ]
Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Acked-by: Pekka J Enberg <penberg@cs.helsinki.fi> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Tomas Winkler [Tue, 27 Nov 2007 19:00:52 +0000 (21:00 +0200)]
iwlwifi: fix iwl_mac_add_interface handler
This patch fixes iwl_mac_add_interface.
1. Currently only one interface is supported, instead of silently retuning
0 now it returns -EOPNOTSUPP (By Johannes Berg)
2. It enables changing mac address from user space (By Ian Schram)
Signed-off-by: Tomas Winkler <tomas@localhost.localdomain> Cc: Zhu Yi <yi.zhu@intel.com> Cc: Reinette Chatre <reinette.chatre@intel.com> Cc: linux-wireless <linux-wireless@vger.kernel.org Cc: Ian Schram <ischram@telenet.be> Cc: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Holger Schurig [Mon, 26 Nov 2007 08:35:44 +0000 (09:35 +0100)]
libertas: let more than one MAC event through
lbs_mac_event_disconnected() was called once and then never again
upon a hardware MAC event.
The reason was that the driver didn't clean the correct bit in the interrupt
cause register of the chip.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
David Woodhouse [Sat, 24 Nov 2007 19:48:17 +0000 (19:48 +0000)]
libertas: Don't set NETIF_F_IPV6_CSUM in dev->features
I'm not sure why it was doing this, and I'm not sure I _want_ to know
why. But calling it NETIF_F_DYNALLOC doesn't change the fact that the
kernel believes it to be NETIF_F_IPV6_CSUM, and that IPv6 communication
is hence buggered.
Signed-off-by: David Woodhouse <dwmw2@infradead.org> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
iwlwifi: fix possible NULL dereference in iwl_set_rate()
Signed-off-by: Saleem Abdulrasool <compnerd@compnerd.org> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Roel Kluin [Thu, 29 Nov 2007 13:25:21 +0000 (14:25 +0100)]
[ARM] 4680/1: parentheses around NR_IRQS definition
If NR_IRQS is defined as a sum without surrounding parentheses, this may
lead to problems when used in multiplications. This may lead to problems
in:
arch/ia64/sn/kernel/irq.c:516
arch/x86/kernel/io_apic_32.c:693, 694, 699, 700
fs/proc/proc_misc.c:464
Signed-off-by: Roel Kluin <12o3l@tiscali.nl> Acked-by: Lennert Buytenhek <buytenh@wantstofly.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
eric miao [Tue, 27 Nov 2007 02:14:09 +0000 (03:14 +0100)]
[ARM] 4675/1: pxa: fix mfp address definition error for pxa320
Signed-off-by: bridge wu <bridge.wu@marvell.com> Signed-off-by: eric miao <eric.miao@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
x86/paravirt: revert exports to restore old behaviour
Subdividing the paravirt_ops structure caused a regression in certain
non-GPL modules which try to use mmu_ops and cpu_ops. This restores the
old behaviour, and makes it consistent with the non-CONFIG_PARAVIRT case.
Takashi Iwai <tiwai@suse.de> adds:
> I took at this problem (as I have an nvidia card on one of my
> workstations), and found out that the following suffer from
> EXPORT_SYMBOL_GPL changes:
>
> * local_disable_irq(), local_irq_save*(), etc.
> * MSR-related macros like rdmsr(), wrmsr(), read_cr0(), etc.
> wbinvd(), too.
> * pmd_val(), pgd_val(), etc are all involved with pv_mm_ops.
> pmd_large() and pmd_bad() is also indirectly involved.
> __flush_tlb() and friends suffer, too.
Christoph Hellwig objects to this patch on the grounds that modules
shouldn't be using these operations anyway. I don't think this is a
particularly good reason to reject the patch, for several reasons:
1. These operations are still available to modules when not using
CONFIG_PARAVIRT, since they are implicitly exported as inline
functions via the kernel headers. Exporting the same functionality as
GPL-only symbols just adds a gratuitious difference between
CONFIG_PARAVIRT and non-CONFIG_PARAVIRT configurations. If we really
think these operations are not for module use (or non-GPL module use),
then we should solve the problem in a general way.
2. It's a regression from previous kernels, which would work these
modules even with CONFIG_PARAVIRT enabled.
3. The operations in question seem pretty reasonable for modules to
use. The control registers/MSRs can be accessed directly anyway, so there's
no benefit in preventing modules from using standard interfaces. And it seems
reasonable to allow a graphics driver to create its own mappings if it wants.
Therefore, I think this patch should go in for 2.6.24. If people
really think that these operations should not be available to modules,
then we can address that separately.
Signed-off-by: Jeremy Fitzhardinge <Jeremy.Fitzhardinge@citrix.com> Cc: Tobias Powalowski <t.powa@gmx.de> Cc: Christoph Hellwig <hch@infradead.org> Cc: Takashi Iwai <tiwai@suse.de> Cc: Zachary Amsden <zach@vmware.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Randy Dunlap [Thu, 29 Nov 2007 00:22:09 +0000 (16:22 -0800)]
lguest: prevent VISWS or VOYAGER randconfigs
Keep lguest from being enabled on VISWS or VOYAGER configs, just as is
already done for VMI and XEN. Otherwise randconfigs with VISWS and LGUEST
have this problem:
In file included from arch/x86/kernel/setup_32.c:61:
include/asm-x86/mach-visws/setup_arch.h:8:1: warning: "ARCH_SETUP" redefined
In file included from include/asm/msr.h:80,
from include/asm/processor_32.h:17,
from include/asm/processor.h:2,
from include/asm/thread_info_32.h:16,
from include/asm/thread_info.h:2,
from include/linux/thread_info.h:21,
from include/linux/preempt.h:9,
from include/linux/spinlock.h:49,
from include/linux/seqlock.h:29,
from include/linux/time.h:8,
from include/linux/timex.h:57,
from include/linux/sched.h:53,
from arch/x86/kernel/setup_32.c:24:
include/asm/paravirt.h:458:1: warning: this is the location of the previous definition
(and of course, this happens because kconfig does not follow dependencies
when [evil] select is used...)
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
ACPI uses NR_CPUS in various loops and in some it accesses per cpu data of
processors that are not present(!) and that will never be present.
The pointers to per cpu data are typically not initialized for processors
that are not present. So we seem to be reading something here from offset
0 in memory.
Make ACPI use nr_cpu_ids instead. That stops at the end of the possible
processors.
Convert one loop to NR_CPUS to use the cpu_possible map instead. That way
ranges of processor that can never be brought online are skipped during the
loop.
Signed-off-by: Christoph Lameter <clameter@sgi.com> Cc: Len Brown <lenb@kernel.org> Acked-by: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
wait_task_stopped(): pass correct exit_code to wait_noreap_copyout()
In wait_task_stopped() exit_code already contains the right value for the
si_status member of siginfo, and this is simply set in the non WNOWAIT
case.
If you call waitid() with a stopped or traced process, you'll get the signal
in siginfo.si_status as expected -- however if you call waitid(WNOWAIT) at the
same time, you'll get the signal << 8 | 0x7f
Pass it unchanged to wait_noreap_copyout(); we would only need to shift it
and add 0x7f if we were returning it in the user status field and that
isn't used for any function that permits WNOWAIT.
Signed-off-by: Scott James Remnant <scott@ubuntu.com> Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Cc: Roland McGrath <roland@redhat.com> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
David Howells [Thu, 29 Nov 2007 00:22:05 +0000 (16:22 -0800)]
FRV: arrange things such that BRA can reach from the trap table
Arrange the sections in the FRV arch so that a BRA instruction with a
16-bit displacement can always reach from the trap table to entry.S,
tlb-miss.S and break.S.
The problem otherwise is that the linker can insert sufficient code between
the slots in the trap table and the targets of the branch instructions in
those slots that the displacement field in the instruction isn't
sufficiently large. This is because the branch targets were in the .text
section along with most of the other code in the kernel.
Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
David Howells [Thu, 29 Nov 2007 00:22:04 +0000 (16:22 -0800)]
FRV: fix the extern declaration of kallsyms_num_syms
Fix the extern declaration of kallsyms_num_syms to indicate that the symbol
does not reside in the small-data storage space, and so may not be accessed
relative to the small data base register.
Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jiri Kosina [Thu, 29 Nov 2007 00:22:03 +0000 (16:22 -0800)]
RTC: convert mutex to bitfield
RTC code is using mutex to assure exclusive access to /dev/rtc. This is
however wrong usage, as it leaves the mutex locked when returning into
userspace, which is unacceptable.
Convert rtc->char_lock into bit operation.
Signed-off-by: Jiri Kosina <jkosina@suse.cz> 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>
John Muir [Thu, 29 Nov 2007 00:22:02 +0000 (16:22 -0800)]
fuse: fix uninitialized field in fuse_inode
I found problems accessing (executing) previously existing files, until
I did chmod on them (or setattr).
If the fi->attr_version is not initialized, then it could be
larger than fc->attr_version until a setattr is executed, and as a
result the inode attributes would never be set.
Miklos Szeredi [Thu, 29 Nov 2007 00:22:01 +0000 (16:22 -0800)]
fuse: fix FUSE_FILE_OPS sending
FUSE_FILE_OPS is meant to signal that the kernel will send the open file to to
the userspace filesystem for operations on open files, so that sillyrenaming
unlinked files becomes unnecessary.
However this needs VFS changes, which won't make it into 2.6.24.
Huang, Ying [Thu, 29 Nov 2007 00:21:56 +0000 (16:21 -0800)]
x86_64 EFI boot support: EFI boot document
This patch adds document for EFI x86_64 boot support. The setup and operation
guide of EFI based system is documented in Documentation/x86_64/uefi.txt.
Huang, Ying [Thu, 29 Nov 2007 00:21:55 +0000 (16:21 -0800)]
x86_64 EFI boot support: EFI frame buffer driver
This patch adds Graphics Output Protocol support to the kernel. UEFI2.0 spec
deprecates Universal Graphics Adapter (UGA) protocol and only Graphics Output
Protocol (GOP) is produced. Therefore, the boot loader needs to query the
UEFI firmware with appropriate Output Protocol and pass the video information
to the kernel. As a result of GOP protocol, an EFI framebuffer driver is
needed for displaying console messages. The patch adds a EFI framebuffer
driver. The EFI frame buffer driver in this patch is based on the Intel Mac
framebuffer driver.
The ELILO bootloader takes care of passing the video information as
appropriate for EFI firmware.
The framebuffer driver has been tested in i386 kernel and x86_64 kernel on EFI
platform.
Signed-off-by: Chandramouli Narayanan <mouli@linux.intel.com> Signed-off-by: Huang Ying <ying.huang@intel.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@elte.hu> Cc: Andi Kleen <ak@suse.de> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This patch will work with the 19HS but WILL BREAK all other Keyspan
adapters. It will take me a few days to get to looking at a correct fix but
that keyspan_send_setup(port, 1) (and the '1' is the important part) must
happen once when the port is first opened. The cflag can just be set to
whatever the normal default is for your serial environment.
Jeff Dike [Thu, 29 Nov 2007 00:21:51 +0000 (16:21 -0800)]
uml: fix !NO_HZ busy-loop
With NO_HZ disabled, the UML idle loop effectively becomes a busy loop, as
it will sleep for no time.
The cause was forgetting to restart the tick after waking up from sleep.
It was disabled before sleeping, and the remaining time used as the
interval to sleep. So, the tick needs to be restarted when nanosleep
finishes.
This is done by introducing after_sleep_interval, which is empty in the
NO_HZ case, but which sets the tick starting in the !NO_HZ case.
Signed-off-by: Jeff Dike <jdike@linux.intel.com> Cc: Miklos Szeredi <miklos@szeredi.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
the reason for the crash is add_timer() done on an already running
timer. This happens because for some reason CARD_INIT is called twice.
this patch works this problem around by using mod_timer() - this gets
a booting system - but it would be nice to figure out why CARD_INIT
is done twice.
the ISDN config section (generated via make randconfig) is this:
#
# ISDN feature submodules
#
# CONFIG_ISDN_DRV_LOOP is not set
CONFIG_ISDN_DIVERSION=y
#
# ISDN4Linux hardware drivers
#
#
# Passive cards
#
CONFIG_ISDN_DRV_HISAX=y
#
# D-channel protocol features
#
CONFIG_HISAX_EURO=y
CONFIG_DE_AOC=y
# CONFIG_HISAX_NO_SENDCOMPLETE is not set
# CONFIG_HISAX_NO_LLC is not set
# CONFIG_HISAX_NO_KEYPAD is not set
CONFIG_HISAX_1TR6=y
CONFIG_HISAX_NI1=y
CONFIG_HISAX_MAX_CARDS=8
#
# HiSax supported cards
#
CONFIG_HISAX_16_0=y
# CONFIG_HISAX_16_3 is not set
# CONFIG_HISAX_TELESPCI is not set
CONFIG_HISAX_S0BOX=y
# CONFIG_HISAX_AVM_A1 is not set
CONFIG_HISAX_FRITZPCI=y
CONFIG_HISAX_AVM_A1_PCMCIA=y
CONFIG_HISAX_ELSA=y
CONFIG_HISAX_IX1MICROR2=y
CONFIG_HISAX_DIEHLDIVA=y
# CONFIG_HISAX_ASUSCOM is not set
# CONFIG_HISAX_TELEINT is not set
CONFIG_HISAX_HFCS=y
# CONFIG_HISAX_SEDLBAUER is not set
CONFIG_HISAX_SPORTSTER=y
# CONFIG_HISAX_MIC is not set
# CONFIG_HISAX_NETJET is not set
# CONFIG_HISAX_NETJET_U is not set
# CONFIG_HISAX_NICCY is not set
# CONFIG_HISAX_ISURF is not set
# CONFIG_HISAX_HSTSAPHIR is not set
# CONFIG_HISAX_BKM_A4T is not set
# CONFIG_HISAX_SCT_QUADRO is not set
# CONFIG_HISAX_GAZEL is not set
# CONFIG_HISAX_HFC_PCI is not set
# CONFIG_HISAX_W6692 is not set
# CONFIG_HISAX_HFC_SX is not set
# CONFIG_HISAX_DEBUG is not set
#
# HiSax PCMCIA card service modules
#
#
# HiSax sub driver modules
#
CONFIG_HISAX_ST5481=y
CONFIG_HISAX_HFCUSB=y
# CONFIG_HISAX_HFC4S8S is not set
CONFIG_HISAX_FRITZ_PCIPNP=y
CONFIG_HISAX_HDLC=y
#
# Active cards
#
CONFIG_ISDN_DRV_ICN=m
CONFIG_ISDN_DRV_PCBIT=m
CONFIG_ISDN_DRV_SC=y
# CONFIG_ISDN_DRV_ACT2000 is not set
CONFIG_HYSDN=m
# CONFIG_ISDN_DRV_GIGASET is not set
# CONFIG_ISDN_CAPI is not set
CONFIG_PHONE=y
CONFIG_PHONE_IXJ=m
Signed-off-by: Ingo Molnar <mingo@elte.hu> Cc: Karsten Keil <kkeil@suse.de> Cc: Kai Germaschewski <kai@germaschewski.name> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
An unprivileged process must be able to kill a setuid root program started
by the same user. This is legacy behavior needed for instance for xinit to
kill X when the window manager exits.
When an unprivileged user runs a setuid root program in !SECURE_NOROOT
mode, fP, fI, and fE are set full on, so pP' and pE' are full on. Then
cap_task_kill() prevents the user from signaling the setuid root task.
This is a change in behavior compared to when
!CONFIG_SECURITY_FILE_CAPABILITIES.
This patch introduces a special check into cap_task_kill() just to check
whether a non-root user is signaling a setuid root program started by the
same user. If so, then signal is allowed.
Signed-off-by: Serge E. Hallyn <serue@us.ibm.com> Cc: Andrew Morgan <morgan@kernel.org> Cc: Stephen Smalley <sds@epoch.ncsc.mil> Cc: Chris Wright <chrisw@sous-sol.org> Cc: James Morris <jmorris@namei.org> Cc: Casey Schaufler <casey@schaufler-ca.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Randy Dunlap [Thu, 29 Nov 2007 00:21:46 +0000 (16:21 -0800)]
hexdump: don't print bytes with bit 7 set
As Herbert Xu pointed out, bytes (chars) with bit 7 (0x80) set are true
with isprint() but they may not be isascii() but be Unicode instead, so
don't try to print them in hex dumps.
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
"Val's cross-port of the ext3 reservations code into ext2."
include/linux/ext2_fs.h got a new function whose return value is only
defined if __KERNEL__ is defined. Putting #ifdef __KERNEL__ around the
function seems to help, patch below.
Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
dmaengine: correct invalid assumptions in the Kconfig text
This patch corrects recently changed (and now invalid) Kconfig descriptions
for the DMA engine framework:
- Non-Intel(R) hardware also has DMA engines;
- DMA is used for more than memcpy and RAID offloading.
In fact, on most platforms memcpy and RAID aren't factors, and DMA
exists so that peripherals can transfer data to/from memory while
the CPU does other work.
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Anti Sullin [Thu, 29 Nov 2007 00:21:40 +0000 (16:21 -0800)]
atmel_lcdfb: LCDC startup fix
This patch adds an additional loop, that delays turning off the DMA
until the LCDC core has been turned off. This prevents the picture
to be shifted some random length when the kernel re-initializes
the LCDC.
Without this patch, the LCDC keeps running for some small time after the
PWRCON:LCD_PWR has been cleared ; the FIFO suffers an underrun and on
re-starting the LCDC the FIFO data stays shifted.
This behavior has been seen and fixed on AT91SAM9261-EK and two custom
AT91SAM9261 boards, all of them having different LCD panels.
Thanks a lot to Anti Sullin for submitting this patch (long
time ago).
Signed-off-by: Anti Sullin <anti.sullin@artecdesign.ee> Signed-off-by: Andrew Victor <andrew@sanpeople.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Acked-by: Haavard Skinnemoen <hskinnemoen@atmel.com> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Pavel Emelyanov [Thu, 29 Nov 2007 00:21:39 +0000 (16:21 -0800)]
The namespaces compatibility list doc
People discuss how the namespaces are working/going-to-work together.
Ted Ts'o proposed to create some document that describes what problems user
may have when he/she creates some new namespace, but keeps others shared.
I liked this idea, so here's the initial version of such a document with
the problems I currently have in mind and can describe somewhat audibly -
the "namespaces compatibility list".
The Documentation/namespaces/ directory is about to contain more docs about
the namespaces stuff.
Thanks to Cedirc for notes and spell checks on the doc, to Daniel for
additional info about IPC and User namespaces interaction and to Randy, who
alluded me to using a spell checker before sending the documentation :)
Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Cc: Randy Dunlap <randy.dunlap@oracle.com> Cc: Daniel Lezcano <dlezcano@fr.ibm.com> Cc: Theodore Tso <tytso@mit.edu> Cc: Cedric Le Goater <clg@fr.ibm.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Pavel Emelyanov [Thu, 29 Nov 2007 00:21:38 +0000 (16:21 -0800)]
Isolate the UTS namespace's domainname and hostname back
Commit 7d69a1f4a72b18876c99c697692b78339d491568 ("remove CONFIG_UTS_NS
and CONFIG_IPC_NS") by Cedric Le Goater accidentally removed the code
that prevented the uts->hostname and uts->domainname values from being
overwritten from another namespace.
In other words, setting hostname/domainname via sysfs (echo xxx >
/proc/sys/kernel/(host|domain)name) cased the new value to be set in
init UTS namespace only.
Return the isolation back.
Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Acked-by: Cedric Le Goater <clg@fr.ibm.com> Acked-by: Serge Hallyn <serue@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>