]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
17 years agonet: #ifdef ->sk_security
Alexey Dobriyan [Tue, 4 Nov 2008 22:45:58 +0000 (14:45 -0800)]
net: #ifdef ->sk_security

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agox86: vmware: look for DMI string in the product serial key
Alok Kataria [Mon, 3 Nov 2008 23:50:38 +0000 (15:50 -0800)]
x86: vmware: look for DMI string in the product serial key

Impact: Should permit VMware detection on older platforms where the
vendor is changed.  Could theoretically cause a regression if some
weird serial number scheme contains the string "VMware" by pure
chance.  Seems unlikely, especially with the mixed case.

In some user configured cases, VMware may choose not to put a VMware specific
DMI string, but the product serial key is always there and is VMware specific.
Add a interface to check the serial key, when checking for VMware in the DMI
information.

Signed-off-by: Alok N Kataria <akataria@vmware.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
17 years agoSELinux: hold tasklist_lock and siglock while waking wait_chldexit
Eric Paris [Tue, 4 Nov 2008 20:18:26 +0000 (15:18 -0500)]
SELinux: hold tasklist_lock and siglock while waking wait_chldexit

SELinux has long been calling wake_up_interruptible() on
current->parent->signal->wait_chldexit without holding any locks.  It
appears that this operation should hold the tasklist_lock to dereference
current->parent and we should hold the siglock when waking up the
signal->wait_chldexit.

Signed-off-by: Eric Paris <eparis@redhat.com>
Signed-off-by: James Morris <jmorris@namei.org>
17 years agoARM: OMAP: Fix define for twl4030 irqs
Tony Lindgren [Tue, 4 Nov 2008 21:35:08 +0000 (13:35 -0800)]
ARM: OMAP: Fix define for twl4030 irqs

Otherwise twl4030 gpios won't work.

Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoARM: OMAP: Fix get_irqnr_and_base to clear spurious interrupt bits
Tony Lindgren [Tue, 4 Nov 2008 21:35:07 +0000 (13:35 -0800)]
ARM: OMAP: Fix get_irqnr_and_base to clear spurious interrupt bits

On omap24xx, INTCPS_SIR_IRQ_OFFSET bits [6:0] contains the current
active interrupt number.

However, on 34xx INTCPS_SIR_IRQ_OFFSET bits [31:7] also contains the
SPURIOUSIRQFLAG, which gets set if the interrupt sorting information
is invalid.

If the SPURIOUSIRQFLAG bits are not ignored, the interrupt code will
occasionally produce a bunch of confusing errors:

irq -33, desc: c02ddcc8, depth: 0, count: 0, unhandled: 0
->handle_irq():  c006f23c, handle_bad_irq+0x0/0x22c
->chip(): 00000000, 0x0
->action(): 00000000

Fix this by masking out only the ACTIVEIRQ bits. Also fix a
confusing comment.

Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoARM: OMAP: Fix debugfs_create_*'s error checking method for arm/plat-omap
Zhaolei [Tue, 4 Nov 2008 21:35:07 +0000 (13:35 -0800)]
ARM: OMAP: Fix debugfs_create_*'s error checking method for arm/plat-omap

debugfs_create_*() returns NULL if an error occurs, returns -ENODEV
when debugfs is not enabled in the kernel.

Comparing to PATCH v1, because clk_debugfs_init is included in
"#if defined CONFIG_DEBUG_FS", we only need to check NULL return.
Thanks Li Zefan <lizf@cn.fujitsu.com>

debugfs_create_u8() and other function's return value's checking method are
also fixed in this patch.

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoARM: OMAP: Fix compiler warnings in gpmc.c
Sanjeev Premi [Tue, 4 Nov 2008 21:35:06 +0000 (13:35 -0800)]
ARM: OMAP: Fix compiler warnings in gpmc.c

Fix these compiler warnings:

gpmc.c: In function 'gpmc_init':
gpmc.c:432: warning: 'return' with a value, in function returning void
gpmc.c:439: warning: 'return' with a value, in function returning void

Signed-off-by: Sanjeev Premi <premi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoRevert "Add MT_MEMORY_SO, mark L3 and L4 to use it"
Tony Lindgren [Tue, 4 Nov 2008 21:20:17 +0000 (13:20 -0800)]
Revert "Add MT_MEMORY_SO, mark L3 and L4 to use it"

This reverts commit acb7f883f1ec61fd4dcb840a66ddca051ad8f2ef.

Also sync arch/arm/mm with the mainline kernel.

Flushing posted writes should only be needed in few selected
places.

Conflicts:

arch/arm/include/asm/mach/map.h

Signed-off-by: Tony Lindren <tony@atomide.com>
17 years ago[IA64] Build VT-D iommu support into generic kernel
Tony Luck [Mon, 3 Nov 2008 21:54:52 +0000 (13:54 -0800)]
[IA64] Build VT-D iommu support into generic kernel

Now that all the ia64 mmu pieces are in the tree we can build
support into the generic kernel.

Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64] remove dead BIO_VMERGE_BOUNDARY definition
FUJITA Tomonori [Fri, 24 Oct 2008 05:41:09 +0000 (14:41 +0900)]
[IA64] remove dead BIO_VMERGE_BOUNDARY definition

The block layer dropped the virtual merge feature
(b8b3e16cfe6435d961f6aaebcfd52a1ff2a988c5). BIO_VMERGE_BOUNDARY
definition is meaningless now (For IA64, BIO_VMERGE_BOUNDARY has been
meaningless for a long time since IA64 disables the virtual merge
feature).

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64] remove duplicated #include from pci-dma.c
Huang Weiyi [Sun, 26 Oct 2008 15:09:19 +0000 (23:09 +0800)]
[IA64] remove duplicated #include from pci-dma.c

Removed duplicated #include <asm/machvec.h> and <linux/string.h> in
arch/ia64/kernel/pci-dma.c.

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64] use common header for software IO/TLB
Joerg Roedel [Wed, 29 Oct 2008 21:17:59 +0000 (14:17 -0700)]
[IA64] use common header for software IO/TLB

Remove the swiotlb prototypes from the architecture code and use the
common header file instead.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64] fix the difference between node_mem_map and node_start_pfn
Ken'ichi Ohmichi [Wed, 29 Oct 2008 21:17:57 +0000 (14:17 -0700)]
[IA64] fix the difference between node_mem_map and node_start_pfn

makedumpfile[1] cannot run on ia64 discontigmem kernel, because the member
node_mem_map of struct pgdat_list has invalid value.  This patch fixes it.

node_start_pfn shows the start pfn of each node, and node_mem_map should
point 'struct page' of each node's node_start_pfn.  On my machine, node0's
node_start_pfn shows 0x400 and its node_mem_map points 0xa0007fffbf000000.
 This address is the same as vmem_map, so the node_mem_map points 'struct
page' of pfn 0, even if its node_start_pfn shows 0x400.

The cause is due to the round down of min_pfn in count_node_pages() and
node0's node_mem_map points 'struct page' of inactive pfn (0x0).  This
patch fixes it.

makedumpfile[1]: dump filtering command
https://sourceforge.net/projects/makedumpfile/

Signed-off-by: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
Cc: Bernhard Walle <bwalle@suse.de>
Cc: Jay Lan <jlan@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64] Add error_recovery_info field to SAL section header
Russ Anderson [Mon, 3 Nov 2008 21:32:23 +0000 (13:32 -0800)]
[IA64] Add error_recovery_info field to SAL section header

Add the error_recovery_info field to the SAL section header,
as defined in the SAL Spec.

Signed-off-by: Russ Anderson <rja@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64] Add UV watchlist support.
Russ Anderson [Mon, 3 Nov 2008 21:29:41 +0000 (13:29 -0800)]
[IA64] Add UV watchlist support.

This is used by SGI xp drivers (drivers/misc/sgi-xp).

Signed-off-by: Russ Anderson <rja@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64] Simplify SGI uv vs. sn2 driver issues
Russ Anderson [Mon, 3 Nov 2008 22:58:51 +0000 (16:58 -0600)]
[IA64] Simplify SGI uv vs. sn2 driver issues

Add partition id, coherence id, and region size to UV to
make life simpler for drivers shared between sn2 & uv.

Signed-off-by: Russ Anderson <rja@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years agomlx4_core: Fix unused variable warning
Roland Dreier [Tue, 4 Nov 2008 19:18:56 +0000 (11:18 -0800)]
mlx4_core: Fix unused variable warning

Fix

   drivers/net/mlx4/profile.c:55: warning: 'res_name' defined but not used

by making mlx4_dbg() always use all of its parameters, regardless of
whether CONFIG_MLX4_DEBUG is set or not.

Reported-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
17 years agoALSA: ASoC - Remove unnecessary inclusion of linux/version.h
Takashi Iwai [Tue, 4 Nov 2008 17:06:23 +0000 (18:06 +0100)]
ALSA: ASoC - Remove unnecessary inclusion of linux/version.h

Signed-off-by: Takashi Iwai <tiwai@suse.de>
17 years agoALSA: ASoC codec: remove unused #include <version.h>
Huang Weiyi [Fri, 31 Oct 2008 14:50:00 +0000 (22:50 +0800)]
ALSA: ASoC codec: remove unused #include <version.h>

The file(s) below do not use LINUX_VERSION_CODE nor KERNEL_VERSION.
  sound/soc/codecs/ad73311.c

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

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
17 years agoALSA: hda - Don't create empty PCM streams
Takashi Iwai [Tue, 4 Nov 2008 16:48:39 +0000 (17:48 +0100)]
ALSA: hda - Don't create empty PCM streams

Due to the hda-reconfiguration patches, the check of empty stream
is gone, and this results in an error with the codec setup with empty
streams.

This patch adds the check again to avoid the error at probing.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
17 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Tue, 4 Nov 2008 16:30:12 +0000 (08:30 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6

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

17 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzi...
Linus Torvalds [Tue, 4 Nov 2008 16:19:01 +0000 (08:19 -0800)]
Merge branch 'upstream-linus' of git://git.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:
  libata: mask off DET when restoring SControl for detach
  libata: implement ATA_HORKAGE_ATAPI_MOD16_DMA and apply it
  libata: Fix a potential race condition in ata_scsi_park_show()
  sata_nv: fix generic, nf2/3 detection regression
  sata_via: restore vt*_prepare_host error handling
  sata_promise: add ATA engine reset to reset ops

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

Signed-off-by: Jianjun Kong <jianjun@zeuux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agotracing/ftrace: fix a bug when switch current tracer to sched tracer
Frederic Weisbecker [Fri, 31 Oct 2008 12:34:45 +0000 (13:34 +0100)]
tracing/ftrace: fix a bug when switch current tracer to sched tracer

Impact: fix boot tracer + sched tracer coupling bug

Fix a bug that made the sched_switch tracer unable to run
if set as the current_tracer after the boot tracer.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agotracing/ftrace: types and naming corrections for sched tracer
Frederic Weisbecker [Fri, 31 Oct 2008 12:28:58 +0000 (13:28 +0100)]
tracing/ftrace: types and naming corrections for sched tracer

Impact: cleanup

This patch applies some corrections suggested by Steven Rostedt.

Change the type of shed_ref into int since it is used
into a Mutex, we don't need it anymore as an atomic
variable in the sched_switch tracer.
Also change the name of the register mutex.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agotracing/fastboot: use sched switch tracer from boot tracer
Frederic Weisbecker [Fri, 31 Oct 2008 12:20:08 +0000 (13:20 +0100)]
tracing/fastboot: use sched switch tracer from boot tracer

Impact: enhance boot trace output with scheduling events

Use the sched_switch tracer from the boot tracer.

We also can trace schedule events inside the initcalls.
Sched tracing is disabled after the initcall has finished and
then reenabled before the next one is started.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agotracing/ftrace: remove unused code in sched_switch tracer
Frederic Weisbecker [Fri, 31 Oct 2008 12:14:28 +0000 (13:14 +0100)]
tracing/ftrace: remove unused code in sched_switch tracer

Impact: cleanup

When init_sched_switch_trace() is called, it has no reason to start
the sched tracer if the sched_ref is not zero.

_ If this is non-zero, the tracer is already used, but we can register it
to the tracing engine. There is already a security which avoid the tracer
probes not to be resgistered twice.

_ If this is zero, this block will not be used.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agotracing/ftrace: fix a race condition in sched_switch tracer
Frederic Weisbecker [Fri, 31 Oct 2008 12:08:28 +0000 (13:08 +0100)]
tracing/ftrace: fix a race condition in sched_switch tracer

Impact: fix race condition in sched_switch tracer

This patch fixes a race condition in the sched_switch tracer. If
several tasks (IE: concurrent initcalls) are playing with
tracing_start_cmdline_record() and tracing_stop_cmdline_record(), the
following situation could happen:

_ Task A and B are using the same tracepoint probe. Task A holds it.
  Task B is sleeping and doesn't hold it.

_ Task A frees the sched tracer, then sched_ref is decremented to 0.

_ Task A is preempted and hadn't yet unregistered its tracepoint
  probe, then B runs.

_ B increments sched_ref, sees it's 1 and then guess it has to
  register its probe. But it has not been freed by task A.

_ A lot of bad things can happen after that...

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agotracing/fastboot: Enable boot tracing only during initcalls
Frederic Weisbecker [Fri, 31 Oct 2008 11:57:20 +0000 (12:57 +0100)]
tracing/fastboot: Enable boot tracing only during initcalls

Impact: modify boot tracer

We used to disable the initcall tracing at a specified time (IE: end
of builtin initcalls). But we don't need it anymore. It will be
stopped when initcalls are finished.

However we want two things:

_Start this tracing only after pre-smp initcalls are finished.

_Since we are planning to trace sched_switches at the same time, we
want to enable them only during the initcall execution.

For this purpose, this patch introduce two functions to enable/disable
the sched_switch tracing during boot.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agouwb: per-radio controller event thread and beacon cache
Stefano Panella [Tue, 4 Nov 2008 15:39:08 +0000 (15:39 +0000)]
uwb: per-radio controller event thread and beacon cache

Use an event thread per-radio controller so processing events from one
radio controller doesn't delay another.

A radio controller shouldn't have information on devices seen by a
different radio controller (they may be on different channels) so make the
beacon cache per-radio controller.

Signed-off-by: Stefano Panella <stefano.panella@csr.com>
Signed-off-by: David Vrabel <david.vrabel@csr.com>
17 years agouwb: add commands to add/remove IEs to the debug interface
Stefano Panella [Tue, 4 Nov 2008 14:24:57 +0000 (14:24 +0000)]
uwb: add commands to add/remove IEs to the debug interface

Add the commands UWB_DBG_CMD_IE_ADD and UWB_DBG_CMD_IE_RM to the debug
interface and make them call uwb_rc_ie_add() and uwb_rc_ie_rm().

Signed-off-by: Stefano Panella <stefano.panella@csr.com>
Signed-off-by: David Vrabel <david.vrabel@csr.com>
17 years agouwb: infrastructure for handling Relinquish Request IEs
Stefano Panella [Tue, 4 Nov 2008 14:06:31 +0000 (14:06 +0000)]
uwb: infrastructure for handling Relinquish Request IEs

The structures and event handler needed to handle Relinish Request IEs
received from neighbors.  Nothing is done with these IEs yet.

Signed-off-by: Stefano Panella <stefano.panella@csr.com>
Signed-off-by: David Vrabel <david.vrabel@csr.com>
17 years ago[ARM] fix VFP+softfloat binaries
Russell King [Sun, 2 Nov 2008 09:16:50 +0000 (09:16 +0000)]
[ARM] fix VFP+softfloat binaries

2.6.28-rc tightened up the ELF architecture checks on ARM.  For
non-EABI it only allows VFP if the hardware supports it.  However,
the kernel fails to also inspect the soft-float flag, so it
incorrectly rejects binaries using soft-VFP.

The fix is simple: also check that EF_ARM_SOFT_FLOAT isn't set
before rejecting VFP binaries on non-VFP hardware.

Acked-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years agox86/docs: remove noirqbalance param docs
Mark McLoughlin [Tue, 4 Nov 2008 12:46:03 +0000 (12:46 +0000)]
x86/docs: remove noirqbalance param docs

Impact: documentation fix

irqbalance was removed by:

  commit 8b8e8c1bf7275eca859fe551dfa484134eaf013b
  Author: Yinghai Lu <yhlu.kernel@gmail.com>
  Date:   Tue Aug 19 20:50:23 2008 -0700

Remove the associated documentation for noirqbalance.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agonetfilter: nf_nat: remove warn_if_extra_mangle
Simon Arlott [Tue, 4 Nov 2008 13:35:39 +0000 (14:35 +0100)]
netfilter: nf_nat: remove warn_if_extra_mangle

In net/ipv4/netfilter/nf_nat_rule.c, the function warn_if_extra_mangle was added
in commit 5b1158e909ecbe1a052203e0d8df15633f829930 (2006-12-02). I have a DNAT
target in the OUTPUT chain than changes connections with dst 2.0.0.1 to another
address which I'll substitute with 66.102.9.99 below.

On every boot I get the following message:
[  146.252505] NAT: no longer support implicit source local NAT
[  146.252517] NAT: packet src 66.102.9.99 -> dst 2.0.0.1

As far as I can tell from reading the function doing this, it should warn if the
source IP for the route to 66.102.9.99 is different from 2.0.0.1 but that is not
the case. It doesn't make sense to check the DNAT target against the local route
source.

Either the function should be changed to correctly check the route, or it should
be removed entirely as it's been nearly 2 years since it was added.

Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Signed-off-by: Patrick McHardy <kaber@trash.net>
17 years agonetfilter: netns ebtables: br_nf_pre_routing_finish() fixup
Alexey Dobriyan [Tue, 4 Nov 2008 13:31:29 +0000 (14:31 +0100)]
netfilter: netns ebtables: br_nf_pre_routing_finish() fixup

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
17 years agonetfilter: netns ebtables: ebtable_nat in netns
Alexey Dobriyan [Tue, 4 Nov 2008 13:30:46 +0000 (14:30 +0100)]
netfilter: netns ebtables: ebtable_nat in netns

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
17 years agonetfilter: netns ebtables: ebtable_filter in netns
Alexey Dobriyan [Tue, 4 Nov 2008 13:29:58 +0000 (14:29 +0100)]
netfilter: netns ebtables: ebtable_filter in netns

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
17 years agonetfilter: netns ebtables: ebtable_broute in netns
Alexey Dobriyan [Tue, 4 Nov 2008 13:29:03 +0000 (14:29 +0100)]
netfilter: netns ebtables: ebtable_broute in netns

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
17 years agonetfilter: netns ebtables: more cleanup during ebt_unregister_table()
Alexey Dobriyan [Tue, 4 Nov 2008 13:28:04 +0000 (14:28 +0100)]
netfilter: netns ebtables: more cleanup during ebt_unregister_table()

Now that ebt_unregister_table() can be called during netns stop, and module
pinning scheme can't prevent netns stop, do table cleanup by hand.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
17 years agonetfilter: netns ebtables: part 2
Alexey Dobriyan [Tue, 4 Nov 2008 13:27:15 +0000 (14:27 +0100)]
netfilter: netns ebtables: part 2

* return ebt_table from ebt_register_table(), module code will save it into
  per-netns data for unregistration
* duplicate ebt_table at the very beginning of registration -- it's added into
  list, so one ebt_table wouldn't end up in many lists (and each netns has
  different one)
* introduce underscored tables in individial modules, this is temporary to not
  break bisection.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
17 years agonetfilter: netns ebtables: part 1
Alexey Dobriyan [Tue, 4 Nov 2008 13:22:55 +0000 (14:22 +0100)]
netfilter: netns ebtables: part 1

* propagate netns from userspace, register table in passed netns
* remporarily register every ebt_table in init_net

P. S.: one needs to add ".netns_ok = 1" to igmp_protocol to test with
ebtables(8) in netns.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
17 years agonetfilter: arptable_filter: merge forward hook
Alexey Dobriyan [Tue, 4 Nov 2008 13:22:13 +0000 (14:22 +0100)]
netfilter: arptable_filter: merge forward hook

It's identical to NF_ARP_IN hook.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
17 years agonetfilter: netns-aware ipt_addrtype
Alexey Dobriyan [Tue, 4 Nov 2008 13:21:48 +0000 (14:21 +0100)]
netfilter: netns-aware ipt_addrtype

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
17 years agonetfilter: xt_NFLOG: don't call nf_log_packet in NFLOG module.
Eric Leblond [Tue, 4 Nov 2008 13:21:08 +0000 (14:21 +0100)]
netfilter: xt_NFLOG: don't call nf_log_packet in NFLOG module.

This patch modifies xt_NFLOG to suppress the call to nf_log_packet()
function. The call of this wrapper in xt_NFLOG was causing NFLOG to
use the first initialized module. Thus, if ipt_ULOG is loaded before
nfnetlink_log all NFLOG rules are treated as plain LOG rules.

Signed-off-by: Eric Leblond <eric@inl.fr>
Signed-off-by: Patrick McHardy <kaber@trash.net>
17 years agoALSA: hda - Limit the number of GPIOs show in proc
Takashi Iwai [Tue, 4 Nov 2008 12:30:57 +0000 (13:30 +0100)]
ALSA: hda - Limit the number of GPIOs show in proc

Limit the number of GPIOs shown in proc.  Otherwise it gets too long
unnecessarily, and hard to analyze.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
17 years agoftrace: sysctl typo
Peter Zijlstra [Tue, 4 Nov 2008 10:58:21 +0000 (11:58 +0100)]
ftrace: sysctl typo

Impact: fix sysctl name typo

Steve must have needed more coffee ;-)

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoftrace: sysrq-z to dump the buffers
Peter Zijlstra [Sat, 1 Nov 2008 18:53:34 +0000 (19:53 +0100)]
ftrace: sysrq-z to dump the buffers

Impact: add SysRq-z support to dump trace buffers

Allows one to force an ftrace dump from sysrq

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86 debug: mark early_printk.o as notrace
Ingo Molnar [Tue, 4 Nov 2008 09:42:23 +0000 (10:42 +0100)]
x86 debug: mark early_printk.o as notrace

Impact: do not do function-tracing in the early-printk code

this is useful when earlyprintk=vga,keep is used to debug tracer
plugins.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosched: add sanity check in partition_sched_domains()
Li Zefan [Tue, 4 Nov 2008 08:20:23 +0000 (16:20 +0800)]
sched: add sanity check in partition_sched_domains()

Impact: cleanup, add debug check

It's wrong to make dattr_new = NULL if doms_new == NULL, it introduces
memory leak if dattr_new != NULL. Fortunately dattr_new is always NULL
in this case. So remove the code and add a sanity check.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosched: remove redundant call to unregister_sched_domain_sysctl()
Li Zefan [Tue, 4 Nov 2008 08:19:13 +0000 (16:19 +0800)]
sched: remove redundant call to unregister_sched_domain_sysctl()

Impact: cleanup

The sysctl has been unregistered by partition_sched_domains().

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosched debug: remove NULL checking in print_cfs/rt_rq()
Li Zefan [Tue, 4 Nov 2008 08:17:05 +0000 (16:17 +0800)]
sched debug: remove NULL checking in print_cfs/rt_rq()

Impact: cleanup

cfs->tg is initialized in init_tg_cfs_entry() with tg != NULL, and
will never be invalidated to NULL. And the underlying cgroup of a
valid task_group is always valid.

Same for rt->tg.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosched debug: remove sd_level_to_string()
Li Zefan [Tue, 4 Nov 2008 08:15:37 +0000 (16:15 +0800)]
sched debug: remove sd_level_to_string()

Impact: cleanup

Just use the newly introduced sd->name.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoftrace: ftrace.txt version update
Steven Rostedt [Mon, 3 Nov 2008 20:18:56 +0000 (15:18 -0500)]
ftrace: ftrace.txt version update

Impact: Documentation update only

Update the version that the ftrace document was written for.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoftrace: update txt document
Steven Rostedt [Mon, 3 Nov 2008 20:15:08 +0000 (15:15 -0500)]
ftrace: update txt document

Impact: Documentation update only

A lot of changes have gone into ftrace. This patch updates
the ftrace.txt document.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoftrace: function tracer with irqs disabled
Steven Rostedt [Tue, 4 Nov 2008 04:15:57 +0000 (23:15 -0500)]
ftrace: function tracer with irqs disabled

Impact: disable interrupts during trace entry creation (as opposed to preempt)

To help with performance, I set the ftracer to not disable interrupts,
and only to disable preemption. If an interrupt occurred, it would not
be traced, because the function tracer protects itself from recursion.
This may be faster, but the trace output might miss some traces.

This patch makes the fuction trace disable interrupts, but it also
adds a runtime feature to disable preemption instead. It does this by
having two different tracer functions. When the function tracer is
enabled, it will check to see which version is requested (irqs disabled
or preemption disabled). Then it will use the corresponding function
as the tracer.

Irq disabling is the default behaviour, but if the user wants better
performance, with the chance of missing traces, then they can choose
the preempt disabled version.

Running hackbench 3 times with the irqs disabled and 3 times with
the preempt disabled function tracer yielded:

tracing type       times            entries recorded
------------      --------          ----------------
irq disabled      43.393            166433066
                  43.282            166172618
                  43.298            166256704

preempt disabled  38.969            159871710
                  38.943            159972935
                  39.325            161056510

Average:

   irqs disabled:  43.324           166287462
preempt disabled:  39.079           160300385

 preempt is 10.8 percent faster than irqs disabled.

I wrote a patch to count function trace recursion and reran hackbench.

With irq disabled: 1,150 times the function tracer did not trace due to
  recursion.
with preempt disabled: 5,117,718 times.

The thousand times with irq disabled could be due to NMIs, or simply a case
where it called a function that was not protected by notrace.

But we also see that a large amount of the trace is lost with the
preempt version.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoftrace: insert in the ftrace_preempt_disable()/enable() functions
Steven Rostedt [Tue, 4 Nov 2008 04:15:56 +0000 (23:15 -0500)]
ftrace: insert in the ftrace_preempt_disable()/enable() functions

Impact: use new, consolidated APIs in ftrace plugins

This patch replaces the schedule safe preempt disable code with the
ftrace_preempt_disable() and ftrace_preempt_enable() safe functions.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoftrace: introduce ftrace_preempt_disable()/enable()
Steven Rostedt [Tue, 4 Nov 2008 04:15:55 +0000 (23:15 -0500)]
ftrace: introduce ftrace_preempt_disable()/enable()

Impact: add new ftrace-plugin internal APIs

Parts of the tracer needs to be careful about schedule recursion.
If the NEED_RESCHED flag is set, a preempt_enable will call schedule.
Inside the schedule function, the NEED_RESCHED flag is cleared.

The problem arises when a trace happens in the schedule function but before
NEED_RESCHED is cleared. The race is as follows:

schedule()
  >> tracer called

    trace_function()
       preempt_disable()
       [ record trace ]
       preempt_enable()  <<- here's the issue.

         [check NEED_RESCHED]
          schedule()
          [ Repeat the above, over and over again ]

The naive approach is simply to use preempt_enable_no_schedule instead.
The problem with that approach is that, although we solve the schedule
recursion issue, we now might lose a preemption check when not in the
schedule function.

  trace_function()
    preempt_disable()
    [ record trace ]
    [Interrupt comes in and sets NEED_RESCHED]
    preempt_enable_no_resched()
    [continue without scheduling]

The way ftrace handles this problem is with the following approach:

int resched;

resched = need_resched();
preempt_disable_notrace();
[record trace]
if (resched)
preempt_enable_no_sched_notrace();
else
preempt_enable_notrace();

This may seem like the opposite of what we want. If resched is set
then we call the "no_sched" version??  The reason we do this is because
if NEED_RESCHED is set before we disable preemption, there's two reasons
for that:

  1) we are in an atomic code path
  2) we are already on our way to the schedule function, and maybe even
     in the schedule function, but have yet to clear the flag.

Both the above cases we do not want to schedule.

This solution has already been implemented within the ftrace infrastructure.
But the problem is that it has been implemented several times. This patch
encapsulates this code to two nice functions.

  resched = ftrace_preempt_disable();
  [ record trace]
  ftrace_preempt_enable(resched);

This way the tracers do not need to worry about getting it right.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: signal_64: remove unused code in __setup_rt_frame()
Hiroshi Shimamoto [Tue, 4 Nov 2008 03:23:01 +0000 (19:23 -0800)]
x86: signal_64: remove unused code in __setup_rt_frame()

Impact: cleanup

sizeof(*set) is always 8 on x86_64.

Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: don't use tsc_khz to calculate lpj if notsc is passed
Alok Kataria [Mon, 3 Nov 2008 19:18:47 +0000 (11:18 -0800)]
x86: don't use tsc_khz to calculate lpj if notsc is passed

Impact: fix udelay when "notsc" boot parameter is passed

With notsc passed on commandline, tsc may not be used for
udelays, make sure that we do not use tsc_khz to calculate
the lpj value in such cases.

Reported-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Alok N Kataria <akataria@vmware.com>
Cc: <stable@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoALSA: hda - Fix possible NULL dereference
Takashi Iwai [Tue, 4 Nov 2008 07:43:08 +0000 (08:43 +0100)]
ALSA: hda - Fix possible NULL dereference

Add NULL-check of the return value of snd_kctl_new1() before
accessing it.  Also, make a sanity NULL check to snd_BUG_ON()
for debugging only.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
17 years agoALSA: SOC: Fix setting codec register with debugfs filesystem merge error
Troy Kisky [Mon, 3 Nov 2008 19:22:07 +0000 (12:22 -0700)]
ALSA: SOC: Fix setting codec register with debugfs filesystem merge error

Call device_create_file only once in snd_soc_dapm_sys_add function.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
17 years agolibata: mask off DET when restoring SControl for detach
Tejun Heo [Mon, 3 Nov 2008 10:27:07 +0000 (19:27 +0900)]
libata: mask off DET when restoring SControl for detach

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

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

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

This is reported by John Clark in the following thread.

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

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

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

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

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

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

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

* ck804: Hardreset finally works.

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

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

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

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

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

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

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

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

Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
17 years agonet/: Kill now superfluous ->last_rx stores.
David S. Miller [Tue, 4 Nov 2008 06:01:07 +0000 (22:01 -0800)]
net/: Kill now superfluous ->last_rx stores.

The generic packet receive code takes care of setting
netdev->last_rx when necessary, for the sake of the
bonding ARP monitor.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agonetem: eliminate unneeded return values
Stephen Hemminger [Tue, 4 Nov 2008 05:13:26 +0000 (21:13 -0800)]
netem: eliminate unneeded return values

All these individual parsing functions never return an error,
so they can be void.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agodrivers/net: Kill now superfluous ->last_rx stores.
David S. Miller [Tue, 4 Nov 2008 05:11:17 +0000 (21:11 -0800)]
drivers/net: Kill now superfluous ->last_rx stores.

The generic packet receive code takes care of setting
netdev->last_rx when necessary, for the sake of the
bonding ARP monitor.

Drivers need not do it any more.

Some cases had to be skipped over because the drivers
were making use of the ->last_rx value themselves.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agointel_menlow: don't set max_state a negative value
Zhang Rui [Thu, 11 Sep 2008 02:56:00 +0000 (10:56 +0800)]
intel_menlow: don't set max_state a negative value

max_state is unsigned long.
don't set max_state a negative value

Cc : Thomas Sujith <sujith.thomas@intel.com>
Cc : Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoxfrm: Fix xfrm_policy_gc_lock handling.
Alexey Dobriyan [Tue, 4 Nov 2008 03:11:29 +0000 (19:11 -0800)]
xfrm: Fix xfrm_policy_gc_lock handling.

From: Alexey Dobriyan <adobriyan@gmail.com>

Based upon a lockdep trace by Simon Arlott.

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

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agonet: remove two duplicated #include
Jianjun Kong [Tue, 4 Nov 2008 02:23:09 +0000 (18:23 -0800)]
net: remove two duplicated #include

Removed duplicated #include <rdma/ib_verbs.h> in net/9p/trans_rdma.c
and  #include <linux/thread_info.h> in net/socket.c

Signed-off-by: Jianjun Kong <jianjun@zeuux.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agonet: '&' redux
Alexey Dobriyan [Tue, 4 Nov 2008 02:21:05 +0000 (18:21 -0800)]
net: '&' redux

I want to compile out proc_* and sysctl_* handlers totally and
stub them to NULL depending on config options, however usage of &
will prevent this, since taking adress of NULL pointer will break
compilation.

So, drop & in front of every ->proc_handler and every ->strategy
handler, it was never needed in fact.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agobonding, net: Move last_rx update into bonding recv logic
Jay Vosburgh [Tue, 4 Nov 2008 02:16:50 +0000 (18:16 -0800)]
bonding, net: Move last_rx update into bonding recv logic

The only user of the net_device->last_rx field is bonding.
This patch adds a conditional update of last_rx to the bonding special
logic in skb_bond_should_drop, causing last_rx to only be updated when
the ARP monitor is running.

This frees network device drivers from the necessity of
updating last_rx, which can have cache line thrash issues.

Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoFix ARMv7 memory typing
Russell King - ARM Linux [Tue, 4 Nov 2008 01:36:10 +0000 (17:36 -0800)]
Fix ARMv7 memory typing

* Russell King - ARM Linux <linux@arm.linux.org.uk> [081103 07:09]:
> Solving ARMv7 seems to be fairly simple, at the expense of making
> build_mem_types_table() slightly more complex.  If that was the only
> problem, then I wouldn't be mentioning the idea of dropping the
> patchset.

Well, this is the fix for ARMv7 (and a few others).  In making these
changes, I went back to DDI0100I (ARMv6 ARM), DDI0406A (ARMv7 ARM)
and the Marvell Xscale3 documentation.
...

Note that this version has a bug with xscale handling, but works
for omap. This patch will get reverted once the final patch is
available.

Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoMerge current mainline tree into linux-omap tree
Tony Lindgren [Tue, 4 Nov 2008 01:17:16 +0000 (17:17 -0800)]
Merge current mainline tree into linux-omap tree

Merge branches 'master' and 'linus'

17 years agonet: increase receive packet quantum
Stephen Hemminger [Tue, 4 Nov 2008 01:14:38 +0000 (17:14 -0800)]
net: increase receive packet quantum

This patch gets about 1.25% back on tbench regression.

My change to NAPI for multiqueue support changed the time limit on
network receive processing.  Under sustained loads like tbench, this
can cause the receiver to reschedule prematurely.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoprintk: ipv4 address digits printed in reverse order
Harvey Harrison [Tue, 4 Nov 2008 01:09:55 +0000 (17:09 -0800)]
printk: ipv4 address digits printed in reverse order

put_dec_trunc prints the digits in reverse order and is reversed
inside number(). Continue using put_dec_trunc, but reverse each quad
in ip4_addr_string.

[Noticed by Julius Volz]

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoIPVS: Remove supports_ipv6 scheduler flag
Julius Volz [Tue, 4 Nov 2008 01:08:56 +0000 (17:08 -0800)]
IPVS: Remove supports_ipv6 scheduler flag

Remove the 'supports_ipv6' scheduler flag since all schedulers now
support IPv6.

Signed-off-by: Julius Volz <julius.volz@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoIPVS: Add IPv6 support to LBLC/LBLCR schedulers
Julius Volz [Tue, 4 Nov 2008 01:08:28 +0000 (17:08 -0800)]
IPVS: Add IPv6 support to LBLC/LBLCR schedulers

Add IPv6 support to LBLC and LBLCR schedulers. These were the last
schedulers without IPv6 support, but we might want to keep the
supports_ipv6 flag in the case of future schedulers without IPv6
support.

Signed-off-by: Julius Volz <julius.volz@gmail.com>
Acked-by: Simon Horman <horms@verge.net.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoniu: Use pci_ioremap_bar().
David S. Miller [Tue, 4 Nov 2008 01:05:16 +0000 (17:05 -0800)]
niu: Use pci_ioremap_bar().

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agotg3: Update version to 3.95
Matt Carlson [Tue, 4 Nov 2008 00:58:53 +0000 (16:58 -0800)]
tg3: Update version to 3.95

This patch updates the version to 3.95.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agobroadcom: Add support for BCM50610
Matt Carlson [Tue, 4 Nov 2008 00:56:51 +0000 (16:56 -0800)]
broadcom: Add support for BCM50610

This patch adds the BCM50610 to the list of phys supported by the
broadcom driver.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agobroadcom: Refine expansion register access routine
Matt Carlson [Tue, 4 Nov 2008 00:56:29 +0000 (16:56 -0800)]
broadcom: Refine expansion register access routine

This patch makes the expansion register access routines a little more
formal.  They will be used by the following bcm50610 support patch.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agobroadcom: Add flow control support
Matt Carlson [Tue, 4 Nov 2008 00:56:07 +0000 (16:56 -0800)]
broadcom: Add flow control support

This patch adds flow control support to Broadcom phys.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agotg3: 5785 enhancements
Matt Carlson [Tue, 4 Nov 2008 00:55:44 +0000 (16:55 -0800)]
tg3: 5785 enhancements

This patch refines support for the 5785 device.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agotg3: Refine phylib support
Matt Carlson [Tue, 4 Nov 2008 00:54:56 +0000 (16:54 -0800)]
tg3: Refine phylib support

This patch refines the phylib support in the tg3 driver.  The patch does
the following things :

* Rename tg3_mdio_config() to tg3_mdio_config_5785().  The 5785 will be
  the only device that will use it so the name might as well reflect
  that.
* Fix a memory leak if mdiobus_register() fails.
* Add code to deal with phy device detection failures.
* Add code to correct the supported list of phy features based on the
  MAC <=> PHY interface.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agotg3: Allow WOL for phylib controlled Broadcom phys
Matt Carlson [Tue, 4 Nov 2008 00:54:15 +0000 (16:54 -0800)]
tg3: Allow WOL for phylib controlled Broadcom phys

This patch allows WOL to be enabled for Broadcom phys under phylib
control.  The only exception is the AC131, which has a completely
different register set.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agotg3: Refine power management and WOL code
Matt Carlson [Tue, 4 Nov 2008 00:53:46 +0000 (16:53 -0800)]
tg3: Refine power management and WOL code

Commit 12dac0756d357325b107fe6ec24921ec38661839 ("tg3: adapt tg3 to
use reworked PCI PM code") introduced the new PCI PM API to the tg3
driver.  The patch was understandably conservative, so this patch
elaborates on that work.

The patch starts by creating a single point in tg3_set_power_state()
to decide whether or not to enable WOL.  The rest of the code in
tg3_set_power_state() was then pivoted to use the result of this
decision.

The patch then makes sure the device is allowed to wakeup before
reporting whether or not WOL is currently enabled.  The final hunks of
the patch consolidate where the WOL capability and WOL enabled flags
are set to a single location.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agotg3: Move phylib report to end of tg3_init_one
Matt Carlson [Tue, 4 Nov 2008 00:52:56 +0000 (16:52 -0800)]
tg3: Move phylib report to end of tg3_init_one

Currently, phylib reports appear with a eth%d prefix.  Move the line
after register_netdev() and place it alongside the other informative
messages.  Update nearby informative messages accordingly.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agotg3: Do not enable APE on bcm5700
Matt Carlson [Tue, 4 Nov 2008 00:52:32 +0000 (16:52 -0800)]
tg3: Do not enable APE on bcm5700

With older versions of the NVRAM format, the driver may mistakenly
determine that APE is enabled.  Make sure this doesn't happen by
restricting the ENABLE_APE check to devices known to have more
recent NVRAM image formats.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agotg3: Reclaim TG3_FLG3_5761_5784_AX_FIXES flag
Matt Carlson [Tue, 4 Nov 2008 00:52:09 +0000 (16:52 -0800)]
tg3: Reclaim TG3_FLG3_5761_5784_AX_FIXES flag

This patch reclaims the TG3_FLG3_5761_5784_AX_FIXES flag.  It only
used twice in non-fast paths.  This patch also consolidates some other
places where specific 5784 AX chip revisions can be generalized.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agotg3: Preserve LAA when device control is released
Matt Carlson [Tue, 4 Nov 2008 00:51:36 +0000 (16:51 -0800)]
tg3: Preserve LAA when device control is released

This patch moves the __tg3_set_mac_addr() function earlier in the file
listing, to avoid a function prototype, and calls the function to
restore the LAA after a driver unload chip reset.  With this code in
place, the administrator can wake the machine using the LAA.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agotg3: Preserve DASH connectivity when WOL enabled
Matt Carlson [Tue, 4 Nov 2008 00:51:11 +0000 (16:51 -0800)]
tg3: Preserve DASH connectivity when WOL enabled

DASH firmware runs on the APE side of the chip, but it requires a few MAC
to be programmed correctly.

When WOL is enabled and management firmware is disabled, incoming
packets are evaluated and discarded at the chip's rule processor.
When management firmware is enabled, the hardware must be informed that
there are agents further up the stack that still use the incoming
frames.  Normally management firmware will configure the MAC correctly
on its own, but there can be cases where the setting could get clobbered
by the driver.  The first hunk of this patch preserves this setting.

The second hunk of this patch wipes out the driver present signature of
the APE memory space.  By doing so, the DASH firmware can assume
driver absent behavior.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agotg3: Use pci_ioremap_bar()
Matt Carlson [Tue, 4 Nov 2008 00:49:57 +0000 (16:49 -0800)]
tg3: Use pci_ioremap_bar()

This patch replaces the existing APE register mapping code with a call
to pci_ioremap_bar().  The code that maps the main device register space
did not undergo a similar change because the information derived from
the pci_resource_start() and pci_resource_len() is still used to
populate the (optional) mem_start and mem_end netdevice members.
Replace hardcoded constants where appropriate.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agotg3: Add 5761S support
Matt Carlson [Tue, 4 Nov 2008 00:49:18 +0000 (16:49 -0800)]
tg3: Add 5761S support

This patch adds support for the 5761S chip variants.

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

Updating the version

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

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

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>