platform/adaptation/renesas_rcar/renesas_kernel.git
13 years agofs/9p: Move dotl inode operations into a seperate file
Aneesh Kumar K.V [Mon, 10 Jan 2011 19:51:47 +0000 (13:51 -0600)]
fs/9p: Move dotl inode operations into a seperate file

Source Code Reorganization

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
13 years agofs/9p: fix menu presentation
Randy Dunlap [Sun, 2 Jan 2011 06:15:54 +0000 (06:15 +0000)]
fs/9p: fix menu presentation

Make the 9P_FS kconfig options subordinate to the 9P_FS kconfig symbol
in the menu presentation instead of them all being at the same level.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
13 years agofs/9p: Fix the return error on default acl removal
Aneesh Kumar K.V [Fri, 10 Dec 2010 06:49:31 +0000 (12:19 +0530)]
fs/9p: Fix the return error on default acl removal

If we don't have default ACL, then trying to remove
default acl on a file should return 0.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
13 years agofs/9p: Remove unnecessary semicolons
Joe Perches [Mon, 15 Nov 2010 03:04:51 +0000 (03:04 +0000)]
fs/9p: Remove unnecessary semicolons

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
13 years agox86: Fix Moorestown VRTC fixmap placement
Arjan van de Ven [Tue, 11 Jan 2011 10:55:56 +0000 (10:55 +0000)]
x86: Fix Moorestown VRTC fixmap placement

The x86 fixmaps need to be all together... unfortunately the
VRTC one was misplaced.

This patch makes sure the MRST VRTC fixmap is put prior to the
__end_of_permanent_fixed_addresses marker.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
LKML-Reference: <20110111105544.24448.27607.stgit@bob.linux.org.uk>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
13 years agox86/gpio: Implement x86 gpio_to_irq convert function
Alek Du [Tue, 11 Jan 2011 10:55:32 +0000 (10:55 +0000)]
x86/gpio: Implement x86 gpio_to_irq convert function

We need this for x86 MID platforms where GPIO interrupts are
used. No special magic is needed so the default 1:1 behaviour
will do nicely.

Signed-off-by: Alek Du <alek.du@intel.com>
Signed-off-by: Jacob Pan <jacob.jun.pan@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
LKML-Reference: <20110111105439.24448.69863.stgit@bob.linux.org.uk>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
13 years agox86, UV: Fix APICID shift for Westmere processors
Jack Steiner [Mon, 10 Jan 2011 19:52:11 +0000 (13:52 -0600)]
x86, UV: Fix APICID shift for Westmere processors

Westmere processors use a different algorithm for
assigning APICIDs on SGI UV systems. The location of the
node number within the apicid is now a function of the
processor type.

Signed-off-by: Jack Steiner <steiner@sgi.com>
LKML-Reference: <20110110195210.GA18737@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
13 years agox86: Use PCI method for enabling AMD extended config space before MSR method
Jan Beulich [Mon, 10 Jan 2011 16:20:23 +0000 (16:20 +0000)]
x86: Use PCI method for enabling AMD extended config space before MSR method

While both methods should work equivalently well for the native
case, the Xen Dom0 case can't reliably work with the MSR one,
since there's no guarantee that the virtual CPUs it has
available fully cover all necessary physical ones.

As per the suggestion of Robert Richter the patch only adds the
PCI method, but leaves the MSR one as a fallback to cover new
systems the PCI IDs of which may not have got added to the code
base yet.

The only change in v2 is the breaking out of the new CPI
initialization method into a separate function, as requested by
Ingo.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Acked-by: Robert Richter <robert.richter@amd.com>
Cc: Andreas Herrmann3 <Andreas.Herrmann3@amd.com>
Cc: Joerg Roedel <joerg.roedel@amd.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
LKML-Reference: <4D2B3FD7020000780002B67D@vpn.id2.novell.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
13 years agox86: tsc: Prevent delayed init if initial tsc calibration failed
Thomas Gleixner [Tue, 11 Jan 2011 10:40:48 +0000 (11:40 +0100)]
x86: tsc: Prevent delayed init if initial tsc calibration failed

commit a8760ec (x86: Check tsc available/disabled in the delayed init
function) missed to prevent the setup of the delayed init function in
case the initial tsc calibration failed. This results in the same
divide by zero bug as we have seen without the tsc disabled check.

Skip the delayed work setup when tsc_khz (the initial calibration
value) is 0.

Bisected-and-tested-by: Kirill A. Shutemov <kas@openvz.org>
Cc: John Stultz <john.stultz@linaro.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agopowerpc/pseries: Fix VPHN build errors on non-SMP systems
Jesse Larrew [Fri, 17 Dec 2010 22:07:47 +0000 (22:07 +0000)]
powerpc/pseries: Fix VPHN build errors on non-SMP systems

The header asm/hvcall.h was previously included indirectly via
smp.h. On non-SMP systems, however, these declarations are excluded
and the build breaks. This is easily fixed by including asm/hvcall.h
directly.

The VPHN feature is only meaningful on NUMA systems that implement
the SPLPAR option, so exclude the VPHN code on systems without
SPLPAR enabled.

Also, expose unmap_cpu_from_node() on systems with SPLPAR enabled,
even if CONFIG_HOTPLUG_CPU is disabled.

Lastly, map_cpu_to_node() is now needed by VPHN to manipulate the
node masks after boot time, so remove the __cpuinit annotation to
fix a section mismatch.

Signed-off-by: Jesse Larrew <jlarrew@linux.vnet.ibm.com>
13 years agoMerge remote branch 'gcl/next' into next
Benjamin Herrenschmidt [Tue, 11 Jan 2011 04:10:08 +0000 (15:10 +1100)]
Merge remote branch 'gcl/next' into next

13 years agoMerge branch 'master' into for-linus-merged
Alex Elder [Tue, 11 Jan 2011 03:35:55 +0000 (21:35 -0600)]
Merge branch 'master' into for-linus-merged

This merge pulls the XFS master branch into the latest Linus master.
This results in a merge conflict whose best fix is not obvious.
I manually fixed the conflict, in "fs/xfs/xfs_iget.c".

Dave Chinner had done work that resulted in RCU freeing of inodes
separate from what Nick Piggin had done, and their results differed
slightly in xfs_inode_free().  The fix updates Nick's call_rcu()
with the use of VFS_I(), while incorporating needed updates to some
XFS inode fields implemented in Dave's series.  Dave's RCU callback
function has also been removed.

Signed-off-by: Alex Elder <aelder@sgi.com>
13 years agoMerge branches 'cxgb4', 'ipath', 'ipoib', 'mlx4', 'mthca', 'nes', 'qib' and 'srp...
Roland Dreier [Tue, 11 Jan 2011 01:43:30 +0000 (17:43 -0800)]
Merge branches 'cxgb4', 'ipath', 'ipoib', 'mlx4', 'mthca', 'nes', 'qib' and 'srp' into for-next

13 years agoIB/qib: Fix refcount leak in lkey/rkey validation
Mike Marciniszyn [Tue, 11 Jan 2011 01:42:23 +0000 (17:42 -0800)]
IB/qib: Fix refcount leak in lkey/rkey validation

The mr optimization introduced a reference count leak on an exception
test.  The lock/refcount manipulation is moved down and the problematic
exception test now calls bail to insure that the lock is released.

Additional fixes as suggested by Ralph Campbell <ralph.campbell@qlogic.org>:
- reduce lock scope of dma regions
- use explicit values on returns vs. automatic ret value

Signed-off-by: Mike Marciniszyn <mike.marciniszyn@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
13 years agoIB/qib: Improve SERDES tunning on QMH boards
Mike Marciniszyn [Tue, 11 Jan 2011 01:42:22 +0000 (17:42 -0800)]
IB/qib: Improve SERDES tunning on QMH boards

Improve the QMH SERDES tunning on initial driver load by having the
driver go through a link state change.

Signed-off-by: Mike Marciniszyn <mike.marciniszyn@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
13 years agoIB/qib: Unnecessary delayed completions on RC connection
Mike Marciniszyn [Tue, 11 Jan 2011 01:42:22 +0000 (17:42 -0800)]
IB/qib: Unnecessary delayed completions on RC connection

Currently on receipt of a response message (ACKs, RDMA Response,
Atomic Responses etc.) if the SDMA completion counter is not advanced
the driver delays the completion of the WQE.  In most cases this is
overly pessimistic as the response (ACK) to a previously transmitted
send implies that the send is complete.  Ensure that SDMA queue is
progressed appropriately before determining if a send has delayed
completions.

Signed-off-by: Mike Marciniszyn <mike.marciniszyn@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
13 years agoIB/qib: Issue pre-emptive NAKs on eager buffer overflow
Mike Marciniszyn [Tue, 11 Jan 2011 01:42:22 +0000 (17:42 -0800)]
IB/qib: Issue pre-emptive NAKs on eager buffer overflow

Under congestion resulting in eager buffer overflow attempt to send
pre-emptive NAKs if header queue entries with TID errors are generated
and a valid header is present.  This prevents long timeouts and flow
restarts if a trailing set of packets are dropped due to eager
overflows.  Pre-emptive NAKs are currently only supported for RDMA
writes.

Signed-off-by: Mike Marciniszyn <mike.marciniszyn@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
13 years agoIB/qib: RDMA lkey/rkey validation is inefficient for large MRs
Mike Marciniszyn [Tue, 11 Jan 2011 01:42:22 +0000 (17:42 -0800)]
IB/qib: RDMA lkey/rkey validation is inefficient for large MRs

The current code loops during rkey/lkey validiation to isolate the MR
for the RDMA, which is expensive when the current operation is inside
a very large memory region.

This fix optimizes rkey/lkey validation routines for user memory
regions and fast memory regions.  The MR entry can be isolated by
shifts/mods instead of looping.  The existing loop is preserved for
phys memory regions for now.

Signed-off-by: Mike Marciniszyn <mike.marciniszyn@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
13 years agoIB/qib: Change QPN increment
Mike Marciniszyn [Tue, 11 Jan 2011 01:42:22 +0000 (17:42 -0800)]
IB/qib: Change QPN increment

Changing from +1 to +2 allows for better QP distribution across
receive contexts.

Signed-off-by: Mike Marciniszyn <mike.marciniszyn@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
13 years agoIB/qib: Add fix missing from earlier patch
Mike Marciniszyn [Tue, 11 Jan 2011 01:42:21 +0000 (17:42 -0800)]
IB/qib: Add fix missing from earlier patch

The upstream code was missing part of a receive/error race fix from
the internal tree.  Add the missing part, which makes future merges
possible.

Signed-off-by: Mike Marciniszyn <mike.marciniszyn@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
13 years agoIB/qib: Change receive queue/QPN selection
Mike Marciniszyn [Tue, 11 Jan 2011 01:42:21 +0000 (17:42 -0800)]
IB/qib: Change receive queue/QPN selection

The basic idea is that on SusieQ, the difficult part of mapping QPN to
context is handled by the mapping registers so the generic QPN
allocation doesn't need to worry about chip specifics.  For Monty and
Linda, there is no mapping table so the qpt->mask (same as
dd->qpn_mask), is used to see if the QPN to context falls within
[zero..dd->n_krcv_queues).

Signed-off-by: Mike Marciniszyn <mike.marciniszyn@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
13 years agoIB/qib: Fix interrupt mitigation
Mike Marciniszyn [Tue, 11 Jan 2011 01:42:21 +0000 (17:42 -0800)]
IB/qib: Fix interrupt mitigation

For SusieQ we need to write to the interrupt timer register before
updating the header queue head with interrupt count.  This is to
ensure that the timer is enabled properly and a receive available
interrupt is delivered.  Otherwise this interrupt can be lost if the
receiver header/eager queues are full before the timer is enabled.

Signed-off-by: Mike Marciniszyn <mike.marciniszyn@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
13 years agoIB/qib: Avoid duplicate writes to the rcv head register
Mike Marciniszyn [Tue, 11 Jan 2011 01:42:21 +0000 (17:42 -0800)]
IB/qib: Avoid duplicate writes to the rcv head register

Avoid duplicate writes to the head register as this can lead to lost
interrupts if the context goes full before the second write is done.

Signed-off-by: Mike Marciniszyn <mike.marciniszyn@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
13 years agoIB/qib: Add a few new SERDES tunings
Mike Marciniszyn [Tue, 11 Jan 2011 01:42:21 +0000 (17:42 -0800)]
IB/qib: Add a few new SERDES tunings

Add new SERDES tuning to aid manufacturing.

Signed-off-by: Mike Marciniszyn <mike.marciniszyn@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
13 years agoIB/qib: Reset packet list after freeing
Mike Marciniszyn [Tue, 11 Jan 2011 01:42:21 +0000 (17:42 -0800)]
IB/qib: Reset packet list after freeing

Reset the list pointers after freeing the SDMA packet list.  This is
done to any potential double-free cases.

Signed-off-by: Mike Marciniszyn <mike.marciniszyn@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
13 years agoIB/qib: New SERDES init routine and improvements to SI quality
Mike Marciniszyn [Tue, 11 Jan 2011 01:42:20 +0000 (17:42 -0800)]
IB/qib: New SERDES init routine and improvements to SI quality

Implement new SERDES initialization routine and improvements to signal
integrity -- disable LE1 adaptation, disable LOS after link-up, set
better SERDES parameters.

Signed-off-by: Mike Marciniszyn <mike.marciniszyn@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
13 years agoIB/qib: Clear WAIT_SEND flags when setting QP to error state
Mike Marciniszyn [Tue, 11 Jan 2011 01:42:20 +0000 (17:42 -0800)]
IB/qib: Clear WAIT_SEND flags when setting QP to error state

If these flags are set when the QP is transitioned to the error state,
it will wait until the flags are cleared, which may never happen if
the error transition is due to a link going down.

Signed-off-by: Mike Marciniszyn <mike.marciniszyn@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
13 years agoIB/qib: Fix context allocation with multiple HCAs
Mike Marciniszyn [Tue, 11 Jan 2011 01:42:20 +0000 (17:42 -0800)]
IB/qib: Fix context allocation with multiple HCAs

The driver was incorrectly choosing HCAs on which to allocate new user
contexts based on overall count of usable ports regardless whether the
usable port was on the currently selected HCA.

Signed-off-by: Mike Marciniszyn <mike.marciniszyn@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
13 years agoIB/qib: Fix multi-Florida HCA host panic on reboot
Mike Marciniszyn [Tue, 11 Jan 2011 01:42:20 +0000 (17:42 -0800)]
IB/qib: Fix multi-Florida HCA host panic on reboot

Add check when setting configured contexts that the value does not
exceed the number of contexts allocated for the card.  If the value
exceeds the already allocated count, set it to what is already
allocated.

Signed-off-by: Mike Marciniszyn <mike.marciniszyn@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
13 years agoIB/qib: Handle transitions from ACTIVE_DEFERRED to ACTIVE better
Mike Marciniszyn [Tue, 11 Jan 2011 01:42:20 +0000 (17:42 -0800)]
IB/qib: Handle transitions from ACTIVE_DEFERRED to ACTIVE better

When the link transitions from ACTIVE_DEFERRED to ACTIVE, the driver
only sees the ACTIVE state. With this change, it will check whether
the state was already ACTIVE and if so, it will not generated IB
events and will not clear symbol error counts.

Signed-off-by: Mike Marciniszyn <mike.marciniszyn@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
13 years agoIB/qib: UD send with immediate receive completion has wrong size
Mike Marciniszyn [Tue, 11 Jan 2011 01:42:20 +0000 (17:42 -0800)]
IB/qib: UD send with immediate receive completion has wrong size

The code to generate receive completion entries for UD send with
immediate contains the wrong payload length.  This is because when the
code to compute the payload size was moved, the value of hdrsize
didn't get moved too.  The fix is to update tlen directly.

Signed-off-by: Mike Marciniszyn <mike.marciniszyn@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
13 years agoIB/qib: Set port physical state even if other fields are invalid
Mike Marciniszyn [Tue, 11 Jan 2011 01:42:19 +0000 (17:42 -0800)]
IB/qib: Set port physical state even if other fields are invalid

The IBTA vol. 1 release 1.2.1 spec. says:
C14-24.2.1: If PortInfo:Portstate=Down, then a SubnSet(PortInfo) shall
make any changes it specifies to PortInfo:PortPhysicalState; any other
result is vendor-dependent.

The patch changes the error handling so that the reply says there are
invalid fields but still attempts to set fields that are in range
including PortInfo:PortPhysicalState.

Signed-off-by: Mike Marciniszyn <mike.marciniszyn@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
13 years agoIB/qib: Generate completion callback on errors
Mike Marciniszyn [Tue, 11 Jan 2011 01:42:19 +0000 (17:42 -0800)]
IB/qib: Generate completion callback on errors

According to IBTA vol. 1, C11-30.1.1, a notification callback is
invoked if the CQ is armed for the next solicited completion event or
an error completion.  The error case wasn't being generated correctly.

Signed-off-by: Mike Marciniszyn <mike.marciniszyn@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
13 years agoIB/qib: Add support for the new QME7362 card
Mike Marciniszyn [Tue, 11 Jan 2011 01:42:19 +0000 (17:42 -0800)]
IB/qib: Add support for the new QME7362 card

Add support to recognize another board variation named QME7362.

Signed-off-by: Mike Marciniszyn <mike.marciniszyn@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
13 years agoIB/qib: Add receive header queue size module parameters
Mike Marciniszyn [Tue, 11 Jan 2011 01:42:19 +0000 (17:42 -0800)]
IB/qib: Add receive header queue size module parameters

The receive header queue sizes need to modified for performance
tuning.  Three module parameters are added to support this.

Signed-off-by: Mike Marciniszyn <mike.marciniszyn@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
13 years agoIB/qib: Remove IB latency turnoff
Mike Marciniszyn [Tue, 11 Jan 2011 01:42:19 +0000 (17:42 -0800)]
IB/qib: Remove IB latency turnoff

This is required for hardware testing.

Signed-off-by: Mike Marciniszyn <mike.marciniszyn@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
13 years agoRDMA/nes: Fix string continuation line
Joe Perches [Tue, 11 Jan 2011 01:42:14 +0000 (17:42 -0800)]
RDMA/nes: Fix string continuation line

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
13 years agoIB/mthca: Handle -ENOMEM in forward_trap()
Dan Carpenter [Tue, 11 Jan 2011 01:42:10 +0000 (17:42 -0800)]
IB/mthca: Handle -ENOMEM in forward_trap()

ib_create_send_mad() can return ERR_PTR(-ENOMEM) here.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
13 years agoIB/mlx4: Handle -ENOMEM in forward_trap()
Dan Carpenter [Tue, 11 Jan 2011 01:42:06 +0000 (17:42 -0800)]
IB/mlx4: Handle -ENOMEM in forward_trap()

ib_create_send_mad() can return ERR_PTR(-ENOMEM) here.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
13 years agomlx4_core: Avoid vunmap() of invalid pointer if allocation fails
Ali Ayoub [Tue, 11 Jan 2011 01:42:06 +0000 (17:42 -0800)]
mlx4_core: Avoid vunmap() of invalid pointer if allocation fails

Signed-off-by: Ali Ayoub <ali@mellanox.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
13 years agoIB/mlx4: Don't call dma_free_coherent() with irqs disabled
Vladimir Sokolovsky [Tue, 11 Jan 2011 01:42:06 +0000 (17:42 -0800)]
IB/mlx4: Don't call dma_free_coherent() with irqs disabled

mlx4_ib_free_cq_buf() should not be called under spin_lock_irq() since
it calls dma_free_coherent(), which needs irqs enabled.  Fix this by
deferring the free to outside the locked region.

This was found due to the

WARN_ON(irqs_disabled());

in swiotlb_free_coherent().

Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
13 years agomlx4_core: Remove warning message about firmware bug
Roland Dreier [Tue, 11 Jan 2011 01:42:05 +0000 (17:42 -0800)]
mlx4_core: Remove warning message about firmware bug

The kernel warning message added in commit 58d74bb1d9f7 ("mlx4_core:
Workaround firmware bug in query dev cap") about mlx4 reporting the
wrong number of "blue flame registers" doesn't really help anyone, since
the firmware bug is known and fixed and the bug is pretty much harmless
to users.  So just get rid of the warning.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
13 years agoIPoIB: Add GRO support
Or Gerlitz [Tue, 11 Jan 2011 01:41:55 +0000 (17:41 -0800)]
IPoIB: Add GRO support

Signed-off-by: Or Gerlitz <ogerlitz@voltaire.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
13 years agoIPoIB: Remove LRO support
Or Gerlitz [Tue, 11 Jan 2011 01:41:54 +0000 (17:41 -0800)]
IPoIB: Remove LRO support

As a first step in moving from LRO to GRO, revert commit af40da894e9
("IPoIB: add LRO support").  Also eliminate the ethtool set_flags
callback which isn't needed anymore.  Finally, we need to include
<linux/sched.h> directly to get the declaration of restart_syscall()
(which used to be included implicitly through <linux/inet_lro.h>).

Cc: Ben Hutchings <bhutchings@solarflare.com>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Vladimir Sokolovsky <vlad@mellanox.co.il>
Signed-off-by: Or Gerlitz <ogerlitz@voltaire.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
13 years agoIB/ipath: Use printf extension %pR for struct resource
Joe Perches [Tue, 11 Jan 2011 01:41:50 +0000 (17:41 -0800)]
IB/ipath: Use printf extension %pR for struct resource

Using %pR standardizes the struct resource output.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
13 years agoRDMA/cxgb4: Don't re-init wait object in init/fini paths
Steve Wise [Tue, 11 Jan 2011 01:41:43 +0000 (17:41 -0800)]
RDMA/cxgb4: Don't re-init wait object in init/fini paths

Re-initializing the wait object in rdma_init()/rdma_fini() causes a
timing window which can lead to a deadlock during close.  Once this
deadlock hits, all RDMA activity over the T4 device will be stuck.

There's no need to re-init the wait object, so remove it.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Cc: <stable@kernel.org>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
13 years agoRDMA/cxgb3,cxgb4: Remove dead code
Stephen Hemminger [Tue, 11 Jan 2011 01:41:43 +0000 (17:41 -0800)]
RDMA/cxgb3,cxgb4: Remove dead code

This removes unused code found by running 'make namespacecheck';
compile tested only.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
13 years agoMerge branch 'drm-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
Linus Torvalds [Tue, 11 Jan 2011 01:11:39 +0000 (17:11 -0800)]
Merge branch 'drm-core-next' of git://git./linux/kernel/git/airlied/drm-2.6

* 'drm-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (390 commits)
  drm/radeon/kms: disable underscan by default
  drm/radeon/kms: only enable hdmi features if the monitor supports audio
  drm: Restore the old_fb upon modeset failure
  drm/nouveau: fix hwmon device binding
  radeon: consolidate asic-specific function decls for pre-r600
  vga_switcheroo: comparing too few characters in strncmp()
  drm/radeon/kms: add NI pci ids
  drm/radeon/kms: don't enable pcie gen2 on NI yet
  drm/radeon/kms: add radeon_asic struct for NI asics
  drm/radeon/kms/ni: load default sclk/mclk/vddc at pm init
  drm/radeon/kms: add ucode loader for NI
  drm/radeon/kms: add support for DCE5 display LUTs
  drm/radeon/kms: add ni_reg.h
  drm/radeon/kms: add bo blit support for NI
  drm/radeon/kms: always use writeback/events for fences on NI
  drm/radeon/kms: adjust default clock/vddc tracking for pm on DCE5
  drm/radeon/kms: add backend map workaround for barts
  drm/radeon/kms: fill gpu init for NI asics
  drm/radeon/kms: add disabled vbios accessor for NI asics
  drm/radeon/kms: handle NI thermal controller
  ...

13 years agoMerge branch 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvar...
Linus Torvalds [Tue, 11 Jan 2011 01:09:13 +0000 (17:09 -0800)]
Merge branch 'i2c-for-linus' of git://git./linux/kernel/git/jdelvare/staging

* 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
  i2c: Constify i2c_client where possible
  i2c-algo-bit: Complain about masters which can't read SCL
  i2c-algo-bit: Refactor adapter registration
  i2c: Add generic I2C multiplexer using GPIO API
  i2c-nforce2: Remove unnecessary cast of pci_get_drvdata
  i2c-i801: Include <linux/slab.h>

13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier...
Linus Torvalds [Tue, 11 Jan 2011 01:06:08 +0000 (17:06 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/vapier/blackfin

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfin: (52 commits)
  Blackfin: encode cpu-rev into uImage name
  Blackfin: bf54x: don't ack GPIO ints when unmasking them
  Blackfin: sram_free_with_lsl: do not ignore return value of sram_free
  Blackfin: boards: add missing "static" to peripheral lists
  Blackfin: DNP5370: new board port
  Blackfin: bf518f-ezbrd: fix dsa resources
  Blackfin: move "-m elf32bfin" to general LDFLAGS
  Blackfin: kgdb_test: make sure to initialize num2
  Blackfin: kgdb: disable preempt schedule when running single step in kgdb
  Blackfin: kgdb: disable interrupt when single stepping in ADEOS
  Blackfin: SMP: kgdb: apply anomaly 257 work around
  Blackfin: fix building IPIPE code when XIP is enabled
  Blackfin: SMP: kgdb: flush core internal write buffer before flushinv
  Blackfin: sport_uart resources: remove unused secondary RX/TX pins
  Blackfin: tll6527m: fix spelling in unused code (struct name)
  Blackfin: bf527-ezkit: add adau1373 chip address
  Blackfin: no-mpu: fix masking of small uncached dma region
  Blackfin: pm: drop irq save/restore in standby and suspend to mem callback
  MAINTAINERS: update Analog Devices support info
  Blackfin: dpmc.h: pull in new pll.h
  ...

13 years agoperf session: Fix infinite loop in __perf_session__process_events
Arnaldo Carvalho de Melo [Mon, 10 Jan 2011 23:37:57 +0000 (21:37 -0200)]
perf session: Fix infinite loop in __perf_session__process_events

In this if statement:

        if (head + event->header.size >= mmap_size) {
                if (mmaps[map_idx]) {
                        munmap(mmaps[map_idx], mmap_size);
                        mmaps[map_idx] = NULL;
                }

                page_offset = page_size * (head / page_size);
                file_offset += page_offset;
                head -= page_offset;
                goto remap;
        }

With, for instance, these values:

head=2992
event->header.size=48
mmap_size=3040

We end up endlessly looping back to remap. Off by one.

Problem introduced in 55b4462.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Reported-by: Ingo Molnar <mingo@elte.hu>
Reported-by: David Ahern <daahern@cisco.com>
Bisected-by: David Ahern <daahern@cisco.com>
Tested-by: David Ahern <daahern@cisco.com>
Cc: David Ahern <daahern@cisco.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
13 years agonet/r8169: Update the function of parsing firmware
hayeswang [Mon, 10 Jan 2011 02:07:25 +0000 (02:07 +0000)]
net/r8169: Update the function of parsing firmware

Update rtl_phy_write_fw function. The new function could
parse the complex firmware which is used by RTL8111E and later.
The new firmware may read data and do some operations, not just
do writing only.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: ppp: use {get,put}_unaligned_be{16,32}
Changli Gao [Thu, 6 Jan 2011 13:37:36 +0000 (13:37 +0000)]
net: ppp: use {get,put}_unaligned_be{16,32}

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Reviewed-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoCAIF: Fix IPv6 support in receive path for GPRS/3G
Kumar Sanghvi [Fri, 7 Jan 2011 01:57:08 +0000 (01:57 +0000)]
CAIF: Fix IPv6 support in receive path for GPRS/3G

Checks version field of IP in the receive path for GPRS/3G data
and appropriately sets the value of skb->protocol.

Signed-off-by: Sjur Braendeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoarp: allow to invalidate specific ARP entries
Maxim Levitsky [Sat, 8 Jan 2011 13:57:12 +0000 (13:57 +0000)]
arp: allow to invalidate specific ARP entries

IPv4 over firewire needs to be able to remove ARP entries
from the ARP cache that belong to nodes that are removed, because
IPv4 over firewire uses ARP packets for private information
about nodes.

This information becomes invalid as soon as node drops
off the bus and when it reconnects, its only possible
to start talking to it after it responded to an ARP packet.
But ARP cache prevents such packets from being sent.

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'driver-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Tue, 11 Jan 2011 00:10:33 +0000 (16:10 -0800)]
Merge branch 'driver-core-next' of git://git./linux/kernel/git/gregkh/driver-core-2.6

* 'driver-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6:
  driver core: Document that device_rename() is only for networking
  sysfs: remove useless test from sysfs_merge_group
  driver-core: merge private parts of class and bus
  driver core: fix whitespace in class_attr_string

13 years agonet_sched: factorize qdisc stats handling
Eric Dumazet [Sun, 9 Jan 2011 08:30:54 +0000 (08:30 +0000)]
net_sched: factorize qdisc stats handling

HTB takes into account skb is segmented in stats updates.
Generalize this to all schedulers.

They should use qdisc_bstats_update() helper instead of manipulating
bstats.bytes and bstats.packets

Add bstats_update() helper too for classes that use
gnet_stats_basic_packed fields.

Note : Right now, TCQ_F_CAN_BYPASS shortcurt can be taken only if no
stab is setup on qdisc.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agomlx4: Call alloc_etherdev to allocate RX and TX queues
Tom Herbert [Sun, 9 Jan 2011 19:36:36 +0000 (19:36 +0000)]
mlx4: Call alloc_etherdev to allocate RX and TX queues

Changed driver to call alloc_etherdev_mqs so that the number of TX
and RX queues can be set to correct values in the netdev device.

Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Add alloc_netdev_mqs function
Tom Herbert [Sun, 9 Jan 2011 19:36:31 +0000 (19:36 +0000)]
net: Add alloc_netdev_mqs function

Added alloc_netdev_mqs function which allows the number of transmit and
receive queues to be specified independenty.  alloc_netdev_mq was
changed to a macro to call the new function.  Also added
alloc_etherdev_mqs with same purpose.

Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Tue, 11 Jan 2011 00:04:53 +0000 (16:04 -0800)]
Merge branch 'staging-next' of git://git./linux/kernel/git/gregkh/staging-2.6

* 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: (510 commits)
  staging: speakup: fix failure handling
  staging: usbip: remove double giveback of URB
  Staging: batman-adv: Remove batman-adv from staging
  Staging: hv: Use only one txf buffer per channel and kmalloc/GFP_KERNEL on initialize
  staging: hv: remove unneeded osd_schedule_callback
  staging: hv: convert channel_mgmt.c to not call osd_schedule_callback
  staging: hv: convert vmbus_on_msg_dpc to not call osd_schedule_callback
  staging: brcm80211: Fix WL_<type> logging macros
  Staging: IIO: DDS: AD9833 / AD9834 driver
  Staging: IIO: dds.h convenience macros
  Staging: IIO: Direct digital synthesis abi documentation
  staging: brcm80211: Convert ETHER_TYPE_802_1X to ETH_P_PAE
  staging: brcm80211: Remove unused ETHER_TYPE_<foo> #defines
  staging: brcm80211: Remove ETHER_HDR_LEN, use ETH_HLEN
  staging: brcm80211: Convert ETHER_ADDR_LEN to ETH_ALEN
  staging: brcm80211: Convert ETHER_IS<FOO> to is_<foo>_ether_addr
  staging: brcm80211: Remove unused ether_<foo> #defines and struct
  staging: brcm80211: Convert ETHER_IS_MULTI to is_multicast_ether_addr
  staging: brcm80211: Remove unused #defines ETHER_<foo>_LOCALADDR
  Staging: comedi: Fix checkpatch.pl issues in file s526.c
  ...

Fix up trivial conflict in drivers/video/udlfb.c

13 years agoperf evsel: Support perf_evsel__open(cpus > 1 && threads > 1)
Arnaldo Carvalho de Melo [Tue, 4 Jan 2011 13:55:27 +0000 (11:55 -0200)]
perf evsel: Support perf_evsel__open(cpus > 1 && threads > 1)

And a test for it:

[acme@felicio linux]$ perf test
 1: vmlinux symtab matches kallsyms: Ok
 2: detect open syscall event: Ok
 3: detect open syscall event on all cpus: Ok
[acme@felicio linux]$

Translating C the test does:

1. generates different number of open syscalls on each CPU
   by using sched_setaffinity
2. Verifies that the expected number of events is generated
   on each CPU

It works as expected.

LKML-Reference: <new-submission>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
13 years agocaif: don't set connection request param size before copying data
Dan Rosenberg [Tue, 11 Jan 2011 00:00:54 +0000 (16:00 -0800)]
caif: don't set connection request param size before copying data

The size field should not be set until after the data is successfully
copied in.

Signed-off-by: Dan Rosenberg <drosenberg@vsecurity.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platf...
Linus Torvalds [Mon, 10 Jan 2011 23:39:48 +0000 (15:39 -0800)]
Merge branch 'for_linus' of git://git./linux/kernel/git/mjg59/platform-drivers-x86

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86: (36 commits)
  sony-laptop: support new hotkeys on the P, Z and EC series
  platform/x86: Consistently select LEDS Kconfig options
  sony-laptop: fix sparse non-ANSI function warning
  intel_ips: fix sparse non-ANSI function warning
  Support KHLB2 in the compal laptop driver
  acer-wmi: Enabled Acer Launch Manager mode
  [PATCH] intel_pmic_gpio: modify EOI handling following change of kernel irq subsystem
  ACPI Thinkpad: We must always call va_end() after va_start() but do not do so in thinkpad_acpi.c::acpi_evalf()
  acer-wmi: Initialize wlan/bluetooth/wwan rfkill software block state
  acer-wmi: Detect the WiFi/Bluetooth/3G devices available
  acer-wmi: Add 3G rfkill sysfs file
  acer-wmi: Add acer wmi hotkey events support
  platform/x86: Kconfig: Replace select by depends on ACPI_WMI
  ideapad: pass ideapad_priv as argument (part 2)
  ideapad: pass ideapad_priv as argument (part 1)
  ideapad: add markups, unify comments and return result when init
  ideapad: add hotkey support
  ideapad: let camera power control entry under platform driver
  ideapad: add platform driver for ideapad
  fujitsu-laptop: fix compiler warning on pnp_ids
  ...

13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux...
Linus Torvalds [Mon, 10 Jan 2011 23:39:23 +0000 (15:39 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/geert/linux-m68k

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
  m68knommu: Need to check __get_user()/__put_user() result
  m68knommu: signal.c __user annotations
  m68knommu: Equivalent of "m68k: handle new gcc's"
  m68knommu: f_pcr has been gone since headers' merge
  m68knommu: Don't lose state if sigframe setup fails
  m68knommu: Handle multiple pending signals
  m68knommu: Switch to saner sigsuspend
  m68knommu: Don't bother with SA_ONESHOT
  m68k: Check __get_user()/__put_user() return value
  m68k: Missing syscall_trace() on sigreturn
  m68k: Fix stack mangling logics in sigreturn
  m68k: If we fail to set sigframe up, just leave regs alone...
  m68k: Don't lose state if sigframe setup fails
  m68k: Simplify the singlestepping handling in signals
  m68k: Switch to saner sigsuspend()
  m68k: Resetting sa_handler in local copy of k_sigaction is pointless
  m68k/sun3: Kill pte_unmap() warnings

13 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
Linus Torvalds [Mon, 10 Jan 2011 22:52:44 +0000 (14:52 -0800)]
Merge branch 'release' of git://git./linux/kernel/git/aegl/linux-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
  [IA64] Avoid array overflow if there are too many cpus in SRAT table
  [IA64] Remove unlikely from cpu_is_offline
  [IA64] irq_ia64, use set_irq_chip
  [IA64] perfmon: Change vmalloc to vzalloc and drop memset.
  [IA64] eliminate race condition in smp_flush_tlb_mm

13 years agoMerge branch 'for-torvalds' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw...
Linus Torvalds [Mon, 10 Jan 2011 22:50:38 +0000 (14:50 -0800)]
Merge branch 'for-torvalds' of git://git./linux/kernel/git/linusw/linux-stericsson

* 'for-torvalds' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson:
  ux500: allow 5500 and 8500 to be built together
  ux500: modem_irq is only for 5500
  ux500: dynamic SOC detection
  ux500: rename MOP board Kconfig
  ux500: remove build-time changing macros

13 years agoMerge branch 'msm-smp' of git://codeaurora.org/quic/kernel/davidb/linux-msm
Linus Torvalds [Mon, 10 Jan 2011 22:50:08 +0000 (14:50 -0800)]
Merge branch 'msm-smp' of git://codeaurora.org/quic/kernel/davidb/linux-msm

* 'msm-smp' of git://codeaurora.org/quic/kernel/davidb/linux-msm:
  msm: add SMP support for msm
  msm: hotplug: support cpu hotplug on msm
  msm: timer: SMP timer support for msm
  msm: scm-boot: Support for setting cold/warm boot addresses
  msm: Secure Channel Manager (SCM) support

13 years agocxgb4vf: fix mailbox data/control coherency domain race
Casey Leedom [Mon, 10 Jan 2011 21:53:43 +0000 (13:53 -0800)]
cxgb4vf: fix mailbox data/control coherency domain race

For the VFs, the Mailbox Data "registers" are actually backed by
T4's "MA" interface rather than PL Registers (as is the case for
the PFs).  Because these are in different coherency domains, the
write to the VF's PL-register-backed Mailbox Control can race in
front of the writes to the MA-backed VF Mailbox Data "registers".
So we need to do a read-back on at least one byte of the VF Mailbox
Data registers before doing the write to the VF Mailbox Control
register.

Signed-off-by: Casey Leedom <leedom@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqlcnic: change module parameter permissions
amit salecha [Mon, 10 Jan 2011 00:15:23 +0000 (00:15 +0000)]
qlcnic: change module parameter permissions

o Updating module parameter after driver load is not supported
  except auto_fw_reset parameter. Changing these parameter after
  driver load, can have weird result.

o Update driver version to 5.0.15.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqlcnic: fix ethtool diagnostics test
Sony Chacko [Mon, 10 Jan 2011 00:15:22 +0000 (00:15 +0000)]
qlcnic: fix ethtool diagnostics test

IRQ diag test was getting executed only when both register test
and link test passed. The test should get executed if ETH_TEST_FL_OFFLINE
flag is set.

Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqlcnic: fix flash fw version read
amit salecha [Mon, 10 Jan 2011 00:15:21 +0000 (00:15 +0000)]
qlcnic: fix flash fw version read

Driver is reading flash fw version from defined address, this address
may be invalid. Indeed Driver should read address for fw version through
flash layout table. Flash layout table has defined region and address for
fw version address should be read from fw image region.

Driver has check for old firmware, this bug can cause driver load fail.
This patch will try to read fw version from flash image region, if that fails,
read from defined address.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agophonet: some signedness bugs
Dan Carpenter [Mon, 10 Jan 2011 04:06:58 +0000 (04:06 +0000)]
phonet: some signedness bugs

Dan Rosenberg pointed out that there were some signed comparison bugs
in the phonet protocol.

http://marc.info/?l=full-disclosure&m=129424528425330&w=2

The problem is that we check for array overflows but "protocol" is
signed and we don't check for array underflows.  If you have already
have CAP_SYS_ADMIN then you could use the bugs to get root, or someone
could cause an oops by mistake.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonetdev: bfin_mac: let boards set vlan masks
Mike Frysinger [Mon, 10 Jan 2011 02:54:32 +0000 (02:54 +0000)]
netdev: bfin_mac: let boards set vlan masks

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonetdev: bfin_mac: disable hardware checksum if writeback cache is enabled
Sonic Zhang [Mon, 10 Jan 2011 02:54:33 +0000 (02:54 +0000)]
netdev: bfin_mac: disable hardware checksum if writeback cache is enabled

With writeback caches, corrupted RX packets will be sent up the stack
without any error markings.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonetdev: bfin_mac: drop unused Mac data
Mike Frysinger [Mon, 10 Jan 2011 02:54:31 +0000 (02:54 +0000)]
netdev: bfin_mac: drop unused Mac data

We don't use this local "Mac" data anywhere (since we rely on the
netdev's storage), so punt it.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonetdev: bfin_mac: mark setup_system_regs as static
Mike Frysinger [Mon, 10 Jan 2011 02:54:30 +0000 (02:54 +0000)]
netdev: bfin_mac: mark setup_system_regs as static

No need for this to be exported since it is only used in this driver.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonetdev: bfin_mac: clean up printk messages
Mike Frysinger [Mon, 10 Jan 2011 02:54:29 +0000 (02:54 +0000)]
netdev: bfin_mac: clean up printk messages

Use netdev_* and pr_* helper funcs for output rather than printk.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoi2c: Constify i2c_client where possible
Jean Delvare [Mon, 10 Jan 2011 21:11:23 +0000 (22:11 +0100)]
i2c: Constify i2c_client where possible

Helper functions for I2C and SMBus transactions don't modify the
i2c_client that is passed to them, so it can be marked const.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agoi2c-algo-bit: Complain about masters which can't read SCL
Jean Delvare [Mon, 10 Jan 2011 21:11:23 +0000 (22:11 +0100)]
i2c-algo-bit: Complain about masters which can't read SCL

The I2C specification explicitly describes both SDA and SCL as
bidirectional lines. An I2C master with a read-only SCL is thus not
compliant. If a slow slave stretches the clock, errors will happen,
so the bus can't be considered as reliable.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agoi2c-algo-bit: Refactor adapter registration
Jean Delvare [Mon, 10 Jan 2011 21:11:23 +0000 (22:11 +0100)]
i2c-algo-bit: Refactor adapter registration

Use a function pointer to decide whether to call i2c_add_adapter or
i2c_add_numbered_adapter. This makes the code more compact than the
current strategy of having the common code in a separate function.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agoi2c: Add generic I2C multiplexer using GPIO API
Peter Korsgaard [Mon, 10 Jan 2011 21:11:23 +0000 (22:11 +0100)]
i2c: Add generic I2C multiplexer using GPIO API

Add an i2c mux driver providing access to i2c bus segments using a
hardware MUX sitting on a master bus and controlled through gpio pins.

E.G. something like:

  ----------              ----------  Bus segment 1   - - - - -
 |          | SCL/SDA    |          |-------------- |           |
 |          |------------|          |
 |          |            |          | Bus segment 2 |           |
 |  Linux   | GPIO 1..N  |   MUX    |---------------   Devices
 |          |------------|          |               |           |
 |          |            |          | Bus segment M
 |          |            |          |---------------|           |
  ----------              ----------                  - - - - -

SCL/SDA of the master I2C bus is multiplexed to bus segment 1..M
according to the settings of the GPIO pins 1..N.

Signed-off-by: Peter Korsgaard <peter.korsgaard@barco.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agoi2c-nforce2: Remove unnecessary cast of pci_get_drvdata
Joe Perches [Mon, 10 Jan 2011 21:11:22 +0000 (22:11 +0100)]
i2c-nforce2: Remove unnecessary cast of pci_get_drvdata

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agoi2c-i801: Include <linux/slab.h>
Ben Hutchings [Mon, 10 Jan 2011 21:11:22 +0000 (22:11 +0100)]
i2c-i801: Include <linux/slab.h>

Commit 5a0e3ad6af8660be21ca98a971cd00f331318c05 added direct inclusion
of <linux/slab.h> to those source files that appeared to need it, but
somehow missed this.  On most architectures <linux/slab.h> is still
indirectly included, but there are exceptions such as alpha.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agoIB/srp: consolidate hot-path variables into cache lines
David Dillow [Fri, 26 Nov 2010 20:34:46 +0000 (15:34 -0500)]
IB/srp: consolidate hot-path variables into cache lines

Put the variables accessed together in the hot-path into common
cachelines, and separate them by RW vs RO to avoid false dirtying.
We keep a local copy of the lkey and rkey in the target to avoid
traversing pointers (and associated cache lines) to find them.

Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: David Dillow <dillowda@ornl.gov>
13 years agoIB/srp: stop sharing the host lock with SCSI
Bart Van Assche [Fri, 26 Nov 2010 20:08:38 +0000 (15:08 -0500)]
IB/srp: stop sharing the host lock with SCSI

We don't need protection against the SCSI stack, so use our own lock to
allow parallel progress on separate CPUs.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
[ broken out and small cleanups by David Dillow ]
Signed-off-by: David Dillow <dillowda@ornl.gov>
13 years agoIB/srp: reduce lock coverage of command completion
Bart Van Assche [Fri, 26 Nov 2010 19:50:09 +0000 (14:50 -0500)]
IB/srp: reduce lock coverage of command completion

We only need the lock to cover list and credit manipulations, so push
those into srp_remove_req() and update the call chains.

We reorder the request removal and command completion in
srp_process_rsp() to avoid the SCSI mid-layer sending another command
before we've released our request and added any credits returned by the
target. This prevents us from returning HOST_BUSY unneccesarily.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
[ broken out, small cleanups, and modified to avoid potential extraneous
  HOST_BUSY returns by David Dillow ]
Signed-off-by: David Dillow <dillowda@ornl.gov>
13 years agoIB/srp: reduce local coverage for command submission and EH
Bart Van Assche [Fri, 26 Nov 2010 19:37:47 +0000 (14:37 -0500)]
IB/srp: reduce local coverage for command submission and EH

We only need locks to protect our lists and number of credits available.
By pre-consuming the credit for the request, we can reduce our lock
coverage to just those areas. If we don't actually send the request,
we'll need to put the credit back into the pool.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
[ broken out and small cleanups by David Dillow ]
Signed-off-by: David Dillow <dillowda@ornl.gov>
13 years agoIB/srp: don't move active requests to their own list
Bart Van Assche [Fri, 26 Nov 2010 18:58:27 +0000 (13:58 -0500)]
IB/srp: don't move active requests to their own list

We use req->scmnd != NULL to indicate an active request, so there's no
need to keep a separate list for them. We can afford the array iteration
during error handling, and dropping it gives us one less item that needs
lock protection.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
[ broken out and small cleanups by David Dillow ]
Signed-off-by: David Dillow <dillowda@ornl.gov>
13 years agostaging: speakup: fix failure handling
William Hubbs [Thu, 16 Dec 2010 19:26:58 +0000 (13:26 -0600)]
staging: speakup: fix failure handling

fix the failure handling in kobjects and the main function so that we
release the virtual keyboard if we exit due to another failure.

Signed-off-by: William Hubbs <w.d.hubbs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: usbip: remove double giveback of URB
Márton Németh [Mon, 13 Dec 2010 20:59:09 +0000 (21:59 +0100)]
staging: usbip: remove double giveback of URB

In the vhci_urb_dequeue() function the TCP connection is checked twice.
Each time when the TCP connection is closed the URB is unlinked and given
back. Remove the second attempt of unlinking and giving back of the URB completely.

This patch fixes the bug described at https://bugzilla.kernel.org/show_bug.cgi?id=24872 .

Signed-off-by: Márton Németh <nm127@freemail.hu>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoMerge branch 'bugfixes' into nfs-for-2.6.38
Trond Myklebust [Mon, 10 Jan 2011 19:48:02 +0000 (14:48 -0500)]
Merge branch 'bugfixes' into nfs-for-2.6.38

Conflicts:
fs/nfs/nfs2xdr.c
fs/nfs/nfs3xdr.c
fs/nfs/nfs4xdr.c

13 years agoNFS: Don't use vm_map_ram() in readdir
Trond Myklebust [Sat, 8 Jan 2011 22:45:38 +0000 (17:45 -0500)]
NFS: Don't use vm_map_ram() in readdir

vm_map_ram() is not available on NOMMU platforms, and causes trouble
on incoherrent architectures such as ARM when we access the page data
through both the direct and the virtual mapping.

The alternative is to use the direct mapping to access page data
for the case when we are not crossing a page boundary, but to copy
the data into a linear scratch buffer when we are accessing data
that spans page boundaries.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Tested-by: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: stable@kernel.org [2.6.37]
13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
Linus Torvalds [Mon, 10 Jan 2011 19:18:59 +0000 (11:18 -0800)]
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: (30 commits)
  MAINTAINERS: Add tomoyo-dev-en ML.
  SELinux: define permissions for DCB netlink messages
  encrypted-keys: style and other cleanup
  encrypted-keys: verify datablob size before converting to binary
  trusted-keys: kzalloc and other cleanup
  trusted-keys: additional TSS return code and other error handling
  syslog: check cap_syslog when dmesg_restrict
  Smack: Transmute labels on specified directories
  selinux: cache sidtab_context_to_sid results
  SELinux: do not compute transition labels on mountpoint labeled filesystems
  This patch adds a new security attribute to Smack called SMACK64EXEC. It defines label that is used while task is running.
  SELinux: merge policydb_index_classes and policydb_index_others
  selinux: convert part of the sym_val_to_name array to use flex_array
  selinux: convert type_val_to_struct to flex_array
  flex_array: fix flex_array_put_ptr macro to be valid C
  SELinux: do not set automatic i_ino in selinuxfs
  selinux: rework security_netlbl_secattr_to_sid
  SELinux: standardize return code handling in selinuxfs.c
  SELinux: standardize return code handling in selinuxfs.c
  SELinux: standardize return code handling in policydb.c
  ...

13 years agonetfilter: x_tables: dont block BH while reading counters
Eric Dumazet [Mon, 10 Jan 2011 19:11:38 +0000 (20:11 +0100)]
netfilter: x_tables: dont block BH while reading counters

Using "iptables -L" with a lot of rules have a too big BH latency.
Jesper mentioned ~6 ms and worried of frame drops.

Switch to a per_cpu seqlock scheme, so that taking a snapshot of
counters doesnt need to block BH (for this cpu, but also other cpus).

This adds two increments on seqlock sequence per ipt_do_table() call,
its a reasonable cost for allowing "iptables -L" not block BH
processing.

Reported-by: Jesper Dangaard Brouer <hawk@comx.dk>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Patrick McHardy <kaber@trash.net>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Jesper Dangaard Brouer <hawk@comx.dk>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
13 years agoext2: Resolve 'dereferencing pointer to incomplete type' when enabling EXT2_XATTR_DEBUG
Josh Hunt [Mon, 27 Dec 2010 21:46:38 +0000 (13:46 -0800)]
ext2: Resolve 'dereferencing pointer to incomplete type' when enabling EXT2_XATTR_DEBUG

When I enable EXT2_XATTR_DEBUG in fs/ext2/xattr.c I get a build error stating
the following:

  CC      fs/ext2/xattr.o
fs/ext2/xattr.c: In function 'ext2_xattr_cache_insert':
fs/ext2/xattr.c:841: error: dereferencing pointer to incomplete type
fs/ext2/xattr.c:846: error: dereferencing pointer to incomplete type
make[2]: *** [fs/ext2/xattr.o] Error 1
make[1]: *** [fs/ext2] Error 2
make: *** [fs] Error 2

These lines reference ext2_xattr_cache->c_entry_count which is defined
in struct mb_cache. struct mb_cache is currently only defined in fs/mbcache.c.
Moving struct mb_cache definition to include/linux/mbcache.h to resolve the
issue.

Signed-off-by: Josh Hunt <johunt@akamai.com>
Signed-off-by: Jan Kara <jack@suse.cz>
13 years agoext3: Remove redundant unlikely()
Tobias Klauser [Thu, 9 Dec 2010 14:39:34 +0000 (15:39 +0100)]
ext3: Remove redundant unlikely()

IS_ERR() already implies unlikely(), so it can be omitted here.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Jan Kara <jack@suse.cz>
13 years agoext2: Remove redundant unlikely()
Tobias Klauser [Thu, 9 Dec 2010 14:39:00 +0000 (15:39 +0100)]
ext2: Remove redundant unlikely()

IS_ERR() already implies unlikely(), so it can be omitted here.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Jan Kara <jack@suse.cz>
13 years agoext3: speed up file creates by optimizing rec_len functions
Eric Sandeen [Tue, 7 Dec 2010 17:55:27 +0000 (11:55 -0600)]
ext3: speed up file creates by optimizing rec_len functions

The addition of 64k block capability in the rec_len_from_disk
and rec_len_to_disk functions added a bit of math overhead which
slows down file create workloads needlessly when the architecture
cannot even support 64k blocks, thanks to page size limits.

Similar changes already exist in the ext4 codebase.

The directory entry checking can also be optimized a bit
by sprinkling in some unlikely() conditions to move the
error handling out of line.

bonnie++ sequential file creates on a 512MB ramdisk speeds up
from about 77,000/s to about 82,000/s, about a 6% improvement.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Jan Kara <jack@suse.cz>
13 years agoext2: speed up file creates by optimizing rec_len functions
Eric Sandeen [Tue, 7 Dec 2010 17:51:05 +0000 (11:51 -0600)]
ext2: speed up file creates by optimizing rec_len functions

The addition of 64k block capability in the rec_len_from_disk
and rec_len_to_disk functions added a bit of math overhead which
slows down file create workloads needlessly when the architecture
cannot even support 64k blocks, thanks to page size limits.

The directory entry checking can also be optimized a bit
by sprinkling in some unlikely() conditions to move the
error handling out of line.

bonnie++ sequential file creates on a 512MB ramdisk speeds up
from about 2200/s to about 2500/s, about a 14% improvement.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Jan Kara <jack@suse.cz>
13 years agoext3: Add more journal error check
Namhyung Kim [Wed, 24 Nov 2010 16:53:13 +0000 (01:53 +0900)]
ext3: Add more journal error check

Check return value of ext3_journal_get_write_acccess() and
ext3_journal_dirty_metadata().

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>