sfrench/cifs-2.6.git
16 years agoFix hpet_(un)register_irq_handler() for emulation
David Howells [Thu, 28 Feb 2008 13:29:43 +0000 (13:29 +0000)]
Fix hpet_(un)register_irq_handler() for emulation

Fix hpet_(un)register_irq_handler() for when CONFIG_HPET_EMULATE_RTC=n.  They
are provided macros that substitute value 0, but if they are called as
functions and the return value isn't checked, the following warnings appear:

drivers/char/rtc.c: In function `rtc_init':
drivers/char/rtc.c:1063: warning: statement with no effect
drivers/char/rtc.c: In function `rtc_exit':
drivers/char/rtc.c:1157: warning: statement with no effect

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoelfcore-compat fix uid/gid types
Roland McGrath [Tue, 26 Feb 2008 21:20:58 +0000 (13:20 -0800)]
elfcore-compat fix uid/gid types

I overlooked the difference between __kernel_uid_t and uid_t when defining
struct compat_elf_prpsinfo.  The result is a regression in 32-bit core
dumps on x86_64, where the NT_PRPSINFO note has the wrong size and layout.
This patch fixes it.

Signed-off-by: Roland McGrath <roland@redhat.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years ago[ALSA] intel8x0 - Add quirk for Compaq Deskpro EN
Takashi Iwai [Wed, 27 Feb 2008 15:40:18 +0000 (16:40 +0100)]
[ALSA] intel8x0 - Add quirk for Compaq Deskpro EN

Added the ac97_quirk hp_only for Compaq Deskpro EN.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years ago[ALSA] hda-codec - Adapt eeepc p701 mixer for virtual master control
Herton Ronaldo Krzesinski [Sat, 23 Feb 2008 10:34:12 +0000 (11:34 +0100)]
[ALSA] hda-codec - Adapt eeepc p701 mixer for virtual master control

Fix the line-out volume control of eeepc p701 to be a proper slave of
the virtual master control.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years ago[ALSA] sound: ice1712: unused structs
Harvey Harrison [Fri, 29 Feb 2008 10:46:32 +0000 (11:46 +0100)]
[ALSA] sound: ice1712: unused structs

Don't need to declare a struct when defining a structure layout.  Both
of these structs are unused.
sound/pci/ice1712/revo.c:39:3: warning: symbol 'revo51' was not declared. Should it be static?
sound/pci/ice1712/phase.c:54:3: warning: symbol 'phase28' was not declared. Should it be static?

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years ago[ALSA] ASoC: Fix WM9712 mixer_event DAPM widget function type
Jarkko Nikula [Thu, 28 Feb 2008 11:35:25 +0000 (12:35 +0100)]
[ALSA] ASoC: Fix WM9712 mixer_event DAPM widget function type

Add kcontrol argument to function since the API was changed by the commit
9af6d9562414568ecadf96aaef5b88e7e8b19821.

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years ago[ALSA] ASoC: Fix DAPM widget function types in pxa machine drivers
Jarkko Nikula [Thu, 28 Feb 2008 11:34:48 +0000 (12:34 +0100)]
[ALSA] ASoC: Fix DAPM widget function types in pxa machine drivers

Add kcontrol argument to functions since the API was changed by the commit
9af6d9562414568ecadf96aaef5b88e7e8b19821.

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years ago[ALSA] hda-codec - Fix mixer names of realtek codecs to adapt mater controls
Takashi Iwai [Wed, 27 Feb 2008 15:10:44 +0000 (16:10 +0100)]
[ALSA] hda-codec - Fix mixer names of realtek codecs to adapt mater controls

Some models like eeepc ep20 have invalid mixer names that aren't
handled properly by virtual master controls.  Rename them to the
proper names.

Also fixed some typos in the mixer names but they are not compiled
in right now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years ago[ALSA] intel8x0 - Add quirk for Acer Travelmate 2310
Takashi Iwai [Mon, 4 Feb 2008 13:00:53 +0000 (14:00 +0100)]
[ALSA] intel8x0 - Add quirk for Acer Travelmate 2310

Added ac97_quirk=hp-only for Acer Travelmate 2310.
ALSA bug#3656
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3656

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years ago[ALSA] hda_intel - Add model quirk for Albatron KI690-AM2 motherboard
Andrew Paprocki [Sun, 3 Feb 2008 09:15:44 +0000 (10:15 +0100)]
[ALSA] hda_intel - Add model quirk for Albatron KI690-AM2 motherboard

This adds a quirk to the Realtek ALC883 table for the Albatron KI690-AM2
motherboard to use the 6stack-dig model.

Signed-off-by: Andrew Paprocki <andrew@ishiboo.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years ago[ALSA] oxygen: add owner field
Clemens Ladisch [Tue, 26 Feb 2008 07:40:57 +0000 (08:40 +0100)]
[ALSA] oxygen: add owner field

I forgot to set the module owner for the HiFier/Xonar models.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years ago[ALSA] hda-codec - Add Fujitsu Lifebook E8410 to quirk table
Tony Vroon [Mon, 25 Feb 2008 15:44:13 +0000 (16:44 +0100)]
[ALSA] hda-codec - Add Fujitsu Lifebook E8410 to quirk table

Add the proper model entry for Fujitsu Lifebook E8410 with ALC262 codec.

From: Tony Vroon <tony@linx.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years ago[ALSA] hda-codec - Fix AD1988 capture elements
Takashi Iwai [Mon, 25 Feb 2008 14:32:01 +0000 (15:32 +0100)]
[ALSA] hda-codec - Fix AD1988 capture elements

The some indices of capture elements of AD1988 are wrongly assigned.
This patch fixes it.  See ALSA bug#3795
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3795

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years ago[ALSA] sb8: fix SB 1.0 capture DMA programming
Clemens Ladisch [Mon, 25 Feb 2008 10:04:41 +0000 (11:04 +0100)]
[ALSA] sb8: fix SB 1.0 capture DMA programming

Fix a wrong version check that would cause an invalid command to be sent
to SB 1.0 chips.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years ago[ALSA] usb-audio: add workaround for broken E-Mu frequency feedback
Clemens Ladisch [Mon, 25 Feb 2008 10:01:00 +0000 (11:01 +0100)]
[ALSA] usb-audio: add workaround for broken E-Mu frequency feedback

Add a workaround for the feedback pipe of E-Mu 0202/0404 USB devices
that reports the number of samples per packet instead of the number of
samples per microframe.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years ago[ALSA] ASoC: Fix TLV320AIC3X PLL divider table for 64 kHz rate
Jarkko Nikula [Wed, 20 Feb 2008 16:13:15 +0000 (17:13 +0100)]
[ALSA] ASoC: Fix TLV320AIC3X PLL divider table for 64 kHz rate

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years ago[ALSA] hda-codec - Fix Master volume on HP dv8000
Takashi Iwai [Mon, 18 Feb 2008 11:36:11 +0000 (12:36 +0100)]
[ALSA] hda-codec - Fix Master volume on HP dv8000

HP dv8000 laptop has a problem with Master volume.  It's due to the
connection of the widget 0x13.  When it's connected from the analog
amp mixer (0x19), it works as expected mysteriously (ALSA bug#3775):
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3775

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years ago[POWERPC] spufs: fix use time accounting on SPE-overcommit
Andre Detsch [Mon, 25 Feb 2008 18:07:42 +0000 (15:07 -0300)]
[POWERPC] spufs: fix use time accounting on SPE-overcommit

The spu_runcntl_RW register is restored within spu_restore function.
So, at the end of spu_bind_context, the SPU context is not just loaded,
but running.

This change corrects the state switch to account the time as USER.

Signed-off-by: Andre Detsch <adetsch@br.ibm.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
16 years ago[SPARC64]: Adjust kernel PC validation test in fault handler.
David S. Miller [Fri, 29 Feb 2008 04:38:15 +0000 (20:38 -0800)]
[SPARC64]: Adjust kernel PC validation test in fault handler.

Because of the new futex validation init handler, we have
to accept faults in init section text as well as the normal
kernel text.

Thanks to Tom Callaway for the bug report.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[XFS] If you mount an XFS filesystem with no mount options at all, then
Josef Jeff Sipek [Fri, 29 Feb 2008 02:58:40 +0000 (13:58 +1100)]
[XFS] If you mount an XFS filesystem with no mount options at all, then
the "ikeep" option is set rather than "noikeep".

This regression was introduced in 970451.

With no mount options specified, xfs_parseargs() does the following:

int ikeep = 0;

args->flags |= XFSMNT_BARRIER;

args->flags2 |= XFSMNT2_COMPAT_IOSIZE;

if (!options)

goto done;

It only sets the above two options by default and before, it also used to
set XFSMNT_IDELETE by default.

If options are specified, then

if (!(args->flags & XFSMNT_DMAPI) && !ikeep)

args->flags |= XFSMNT_IDELETE;

is executed later on which is skipped by the "goto done;" above.

The solution is to invert the logic.

SGI-PV: 977771
SGI-Modid: xfs-linux-melb:xfs-kern:30590a

Signed-off-by: Niv Sardi <xaiki@sgi.com>
Signed-off-by: Barry Naujok <bnaujok@sgi.com>
Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
16 years ago[POWERPC] spufs: serialize SLB invalidation against SLB loading
Arnd Bergmann [Thu, 28 Feb 2008 05:06:30 +0000 (06:06 +0100)]
[POWERPC] spufs: serialize SLB invalidation against SLB loading

There is a potential race between flushes of the entire SLB in the MFC
and the point where new entries are being established. The problem is
that we might put a ESID entry into the MFC SLB when the VSID entry has
just been cleared by the global flush.

This can be circumvented by holding the register_lock throughout both
the flushing and the creation of SLB entries.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
16 years ago[POWERPC] spufs: invalidate SLB translation before adding a new entry
Arnd Bergmann [Tue, 26 Feb 2008 06:01:56 +0000 (07:01 +0100)]
[POWERPC] spufs: invalidate SLB translation before adding a new entry

When we replace an SLB entry in the MFC after using up all the available
entries, there is a short window in which an incorrect entry is marked
as valid.

The problem is that the 'valid' bit is stored in the ESID, which is
always written after the VSID. Overwriting the VSID first will make the
original ESID entry point to the new VSID, which means that any
concurrent DMA accessing the old ESID ends up being redirected to the
new virtual address.  A few cycles later, we write the new ESID and
everything is fine again.

That race can be closed by writing a zero entry to the ESID first, which
makes sure that the VSID is not accessed until we write the new ESID.

Note that we don't actually need to invalidate the SLB entry using the
invalidation register, which would also flush any ERAT entries for that
segment, because the segment translation does not become invalid but is
only removed from the SLB cache.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
16 years ago[POWERPC] spufs: synchronize IRQ when disabling
Arnd Bergmann [Fri, 29 Feb 2008 04:16:48 +0000 (15:16 +1100)]
[POWERPC] spufs: synchronize IRQ when disabling

There is a small race between the context save procedure
and the SPU interrupt handling, where we expect all interrupt
processing to have finished after disabling them, while
an interrupt is still being processed on another CPU.

The obvious fix is to call synchronize_irq() after disabling
the interrupts at the start of the context save procedure
to make sure we never access the SPU any more during an
ongoing save or even after that.

Thanks to Benjamin Herrenschmidt for pointing this out.

Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
16 years agoBlackfin Serial Driver: Fix bug - Only insert UART rx char in timer task.
Sonic Zhang [Fri, 29 Feb 2008 04:08:42 +0000 (12:08 +0800)]
Blackfin Serial Driver: Fix bug - Only insert UART rx char in timer task.

http://blackfin.uclinux.org/gf/project/uclinux-dist/tracker/?action=TrackerItemEdit&tracker_item_id=3910

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
16 years ago[POWERPC] spufs: fix order of sputrace thread IDs
Jeremy Kerr [Mon, 25 Feb 2008 03:58:37 +0000 (14:58 +1100)]
[POWERPC] spufs: fix order of sputrace thread IDs

Currently, we get the following output from sputrace:

[5.097935954] 1606: spufs_ps_nopfn__enter (thread = 1605, spu = -1)
[5.097958164] 1606: spufs_ps_nopfn__insert (thread = 1605, spu = 15)
[5.097973529] 1607: spufs_ps_nopfn__enter (thread = 1605, spu = -1)
[5.097989174] 1607: spufs_ps_nopfn__insert (thread = 1605, spu = 14)

Which leads me to believe that 160[67] is the current thread ID, and
1605 is the context backing the psmap.

However, the 'current' and 'owner' tids are reversed - the 'current'
tid is on the right. This change puts the current thread ID in the
left-hand column instead, and renames the right to 'ctxthread'.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
16 years agosata_svw: Add support for HT1100 SATA controller
Anantha Subramanyam [Thu, 28 Feb 2008 23:58:35 +0000 (15:58 -0800)]
sata_svw: Add support for HT1100 SATA controller

This patch adds support (including ATAPI DMA) for HT1100 (aka BCM11000) SATA controller.

Signed-off-by: Anantha Subramanyam <ananth@broadcom.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years ago[X25]: Use proc_create() to setup ->proc_fops first
Wang Chen [Thu, 28 Feb 2008 22:16:33 +0000 (14:16 -0800)]
[X25]: Use proc_create() to setup ->proc_fops first

Use proc_create() to make sure that ->proc_fops be setup before gluing
PDE to main tree.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[WANROUTER]: Use proc_create() to setup ->proc_fops first
Wang Chen [Thu, 28 Feb 2008 22:15:56 +0000 (14:15 -0800)]
[WANROUTER]: Use proc_create() to setup ->proc_fops first

Use proc_create() to make sure that ->proc_fops be setup before gluing
PDE to main tree.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[8021Q]: Use proc_create() to setup ->proc_fops first
Wang Chen [Thu, 28 Feb 2008 22:14:58 +0000 (14:14 -0800)]
[8021Q]: Use proc_create() to setup ->proc_fops first

Use proc_create() to make sure that ->proc_fops be setup before gluing
PDE to main tree.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV4]: Use proc_create() to setup ->proc_fops first
Wang Chen [Thu, 28 Feb 2008 22:14:25 +0000 (14:14 -0800)]
[IPV4]: Use proc_create() to setup ->proc_fops first

Use proc_create() to make sure that ->proc_fops be setup before gluing
PDE to main tree.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV6]: Use proc_create() to setup ->proc_fops first
Wang Chen [Thu, 28 Feb 2008 22:13:46 +0000 (14:13 -0800)]
[IPV6]: Use proc_create() to setup ->proc_fops first

Use proc_create() to make sure that ->proc_fops be setup before gluing
PDE to main tree.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SCTP]: Use proc_create() to setup ->proc_fops first
Wang Chen [Thu, 28 Feb 2008 22:13:16 +0000 (14:13 -0800)]
[SCTP]: Use proc_create() to setup ->proc_fops first

Use proc_create() to make sure that ->proc_fops be setup before gluing
PDE to main tree.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[PKTGEN]: Use proc_create() to setup ->proc_fops first
Wang Chen [Thu, 28 Feb 2008 22:11:49 +0000 (14:11 -0800)]
[PKTGEN]: Use proc_create() to setup ->proc_fops first

Use proc_create() to make sure that ->proc_fops be setup before gluing
PDE to main tree.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NEIGHBOUR]: Use proc_create() to setup ->proc_fops first
Wang Chen [Thu, 28 Feb 2008 22:10:51 +0000 (14:10 -0800)]
[NEIGHBOUR]: Use proc_create() to setup ->proc_fops first

Use proc_create() to make sure that ->proc_fops be setup before gluing
PDE to main tree.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[LLC]: Use proc_create() to setup ->proc_fops first
Wang Chen [Thu, 28 Feb 2008 22:08:54 +0000 (14:08 -0800)]
[LLC]: Use proc_create() to setup ->proc_fops first

Use proc_create() to make sure that ->proc_fops be setup before gluing
PDE to main tree.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPX]: Use proc_create() to setup ->proc_fops first
Wang Chen [Thu, 28 Feb 2008 22:06:14 +0000 (14:06 -0800)]
[IPX]: Use proc_create() to setup ->proc_fops first

Use proc_create() to make sure that ->proc_fops be setup before gluing
PDE to main tree.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SUNRPC]: Use proc_create() to setup ->proc_fops first
Wang Chen [Thu, 28 Feb 2008 22:00:59 +0000 (14:00 -0800)]
[SUNRPC]: Use proc_create() to setup ->proc_fops first

Use proc_create() to make sure that ->proc_fops be setup before gluing
PDE to main tree.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoMerge branch 'pending' of master.kernel.org:/pub/scm/linux/kernel/git/vxy/lksctp-dev
David S. Miller [Thu, 28 Feb 2008 21:56:37 +0000 (13:56 -0800)]
Merge branch 'pending' of /linux/kernel/git/vxy/lksctp-dev

16 years ago[ATM]: Use proc_create() to setup ->proc_fops first
Wang Chen [Thu, 28 Feb 2008 21:55:45 +0000 (13:55 -0800)]
[ATM]: Use proc_create() to setup ->proc_fops first

Use proc_create() to make sure that ->proc_fops be setup before gluing
PDE to main tree.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SCTP]: Update AUTH structures to match declarations in draft-16.
Vlad Yasevich [Wed, 27 Feb 2008 21:04:52 +0000 (16:04 -0500)]
[SCTP]: Update AUTH structures to match declarations in draft-16.

The new SCTP socket api (draft 16) updates the AUTH API structures.
We never exported these since we knew they would change.
Update the rest to match the draft.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
16 years ago[SCTP]: Incorrect length was used in SCTP_*_AUTH_CHUNKS socket option
Vlad Yasevich [Wed, 27 Feb 2008 19:40:37 +0000 (14:40 -0500)]
[SCTP]: Incorrect length was used in SCTP_*_AUTH_CHUNKS socket option

The chunks are stored inside a parameter structure in the kernel
and when we copy them to the user, we need to account for
the parameter header.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
16 years ago[SCTP]: Clean up naming conventions of sctp protocol/address family registration
Neil Horman [Fri, 15 Feb 2008 14:53:59 +0000 (09:53 -0500)]
[SCTP]: Clean up naming conventions of sctp protocol/address family registration

I noticed while looking into some odd behavior in sctp, that the variable
name sctp_pf_inet6_specific was used twice to represent two different
pieces of data (its both a structure name and a pointer to that type of
structure), which is confusing to say the least, and potentially dangerous
depending on the variable scope.  This patch cleans that up, and makes the
protocol and address family registration names in SCTP more regular,
increasing readability.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
 ipv6.c     |   12 ++++++------
 protocol.c |   12 ++++++------
 2 files changed, 12 insertions(+), 12 deletions(-)

16 years ago[APPLETALK]: Use proc_create() to setup ->proc_fops first
Wang Chen [Thu, 28 Feb 2008 20:53:32 +0000 (12:53 -0800)]
[APPLETALK]: Use proc_create() to setup ->proc_fops first

As Davem mentioned in his recently patch
(d9595a7b9c777d45a74774f1428c263a0a47f4c0)
that the procfs visibility should occur after
the ->proc_fops are setup.

And also, Alexey provide proc_create() to make
sure that ->proc_fops is setup before gluing PDE
to main tree.

We use proc_create().

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[BNX2X]: add bnx2x to MAINTAINERS
Eliezer Tamir [Thu, 28 Feb 2008 19:59:10 +0000 (11:59 -0800)]
[BNX2X]: add bnx2x to MAINTAINERS

Signed-off-by: Eliezer Tamir <eliezert@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[BNX2X]: update version, remove CVS strings
Eliezer Tamir [Thu, 28 Feb 2008 19:58:49 +0000 (11:58 -0800)]
[BNX2X]: update version, remove CVS strings

Signed-off-by: Eliezer Tamir <eliezert@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[BNX2X]: Fix Xmit bugs
Eliezer Tamir [Thu, 28 Feb 2008 19:57:55 +0000 (11:57 -0800)]
[BNX2X]: Fix Xmit bugs

Several endianity corrections in start_xmit()

Fixed TSO bug where packets were missing the TCP flags.

Signed-off-by: Eliezer Tamir <eliezert@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[BNX2X]: Prevent PCI queue overflow
Eliezer Tamir [Thu, 28 Feb 2008 19:57:29 +0000 (11:57 -0800)]
[BNX2X]: Prevent PCI queue overflow

Limit traffic through an internal queue to prevent overflow.

Signed-off-by: Eliezer Tamir <eliezert@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[BNX2X]: fix slowpath races and locking
Eliezer Tamir [Thu, 28 Feb 2008 19:56:57 +0000 (11:56 -0800)]
[BNX2X]: fix slowpath races and locking

Fixed locking between fastpath and slowpath operations.

Corrected order of traffic disabling to prevent race when going down
under traffic.

- first have the microcode drop all incoming packets
- then do the slowpath stuff
- only then reset the MAC

Got rid of in_reset_task.

Remove_one() and friends would deference a null pointer if init_one
failed.

Signed-off-by: Eliezer Tamir <eliezert@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[BNX2X]: fix HW attentions and error handling
Eliezer Tamir [Thu, 28 Feb 2008 19:55:53 +0000 (11:55 -0800)]
[BNX2X]: fix HW attentions and error handling

Some of the HW attentions, used to indicate an error were not properly
acked.

This will cause the driver to endlessly receive interrupts when such
an error happens.

Had to break the code into smaller chunks because it got too nested.

Signed-off-by: Eliezer Tamir <eliezert@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[BNX2X]: fix MSI-X/INT#A errata
Eliezer Tamir [Thu, 28 Feb 2008 19:54:54 +0000 (11:54 -0800)]
[BNX2X]: fix MSI-X/INT#A errata

Errata A0.158 workaround.

Running in INT#A mode after running with MSI-X fails due to a PCI core
bug.

Signed-off-by: Eliezer Tamir <eliezert@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[BNX2X]: correct statistics
Eliezer Tamir [Thu, 28 Feb 2008 19:54:03 +0000 (11:54 -0800)]
[BNX2X]: correct statistics

Errors were summed improperly, some stats were missing.

Signed-off-by: Eliezer Tamir <eliezert@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[BNX2X]: Correct RX filtering and MC configuration
Eliezer Tamir [Thu, 28 Feb 2008 19:53:13 +0000 (11:53 -0800)]
[BNX2X]: Correct RX filtering and MC configuration

The configuration of RX filtering needed the following corrections:

Drop flags need to be set per Rx queue.

Have to tell the microcode to collect drop stats, and properly wait
for them to complete when going down.

Sometimes we failed to detect proper completion due to a logical error
in the wait loop.

Signed-off-by: Eliezer Tamir <eliezert@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[BNX2X]: Correct Link management
Eliezer Tamir [Thu, 28 Feb 2008 19:51:50 +0000 (11:51 -0800)]
[BNX2X]: Correct Link management

Properly protect PHY access between two devices on the same board with
a HW lock.

Use GPIO to clear all previous configurations before changing link
parameters.

Shut down the external PHY in case of fan failure.

Reducing the MDC/MDIO clock to 2.5MHz due to problems with some
devices.

Resolve the flow control response according to autoneg with external
PHY.

Unmasking all PHY interrupts in single write to prevent a race in the
interrupts order.

LASI indication fixes to work with peculiarities of PHYs.

Disable MAC RX to avoid a HW bug when closing the MAC under traffic.

Disable parallel detection on HiGig due to HW limitation.

Updating the shared memory structure to work with the current
bootcode.

Signed-off-by: Eliezer Tamir <eliezert@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[BNX2X]: Correct init_one()
Eliezer Tamir [Thu, 28 Feb 2008 19:50:16 +0000 (11:50 -0800)]
[BNX2X]: Correct init_one()

Correct PCI-E info printed by init_one()
In one case it failed to free the netdev.

Signed-off-by: Eliezer Tamir <eliezert@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[BNX2X]: Spelling fixes
Eliezer Tamir [Thu, 28 Feb 2008 19:49:42 +0000 (11:49 -0800)]
[BNX2X]: Spelling fixes

Signed-off-by: Eliezer Tamir <eliezert@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPCOMP]: Disable BH on output when using shared tfm
Herbert Xu [Thu, 28 Feb 2008 19:23:17 +0000 (11:23 -0800)]
[IPCOMP]: Disable BH on output when using shared tfm

Because we use shared tfm objects in order to conserve memory,
(each tfm requires 128K of vmalloc memory), BH needs to be turned
off on output as that can occur in process context.

Previously this was done implicitly by the xfrm output code.
That was lost when it became lockless.  So we need to add the
BH disabling to IPComp directly.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/linville/wireles...
David S. Miller [Thu, 28 Feb 2008 19:03:29 +0000 (11:03 -0800)]
Merge branch 'master' of /linux/kernel/git/linville/wireless-2.6

16 years ago[POWERPC] Xilinx: hwicap cleanup
Stephen Neuendorffer [Sun, 24 Feb 2008 23:34:47 +0000 (10:34 +1100)]
[POWERPC] Xilinx: hwicap cleanup

This fixes various items pointed out during a review of the hwicap driver.
Primarily, reversed memcpy calls, re-entrancy issues, and mutex conversion
have been addressed.  There are also fixes to comments to use the kerneldoc
format, as well as some sparse annotations.

Signed-off-by: Stephen Neuendorffer <stephen.neuendorffer@xilinx.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
16 years agoSSB PCI core driver: use new SPROM data structure
Aurelien Jarno [Thu, 28 Feb 2008 14:11:26 +0000 (15:11 +0100)]
SSB PCI core driver: use new SPROM data structure

Switch the SSB PCI core driver to the new SPROM data structure now that
the old one has been removed.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Acked-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years ago[POWERPC] 4xx: Use correct board info structure in cuboot wrappers
Josh Boyer [Thu, 28 Feb 2008 14:16:27 +0000 (08:16 -0600)]
[POWERPC] 4xx: Use correct board info structure in cuboot wrappers

Correct the remaining 44x cuboot wrappers to define TARGET_4xx as well.  This
creates the correct structure to use, including things like the second MAC
address.

Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
16 years agoDon't build bcm43xx if SSB is static and b43 PCI-SSB bridge is enabled.
Alexey Zaytsev [Sat, 23 Feb 2008 10:33:07 +0000 (13:33 +0300)]
Don't build bcm43xx if SSB is static and b43 PCI-SSB bridge is enabled.

This may happen e.g. when the ssb is statically enables by the b44 driver,
and the b43 pci-ssb bridge is enbled by the b43/b43legacy drivers, or the
b43/b43legacy drivers are built statically.

Signed-off-by: Alexey Zaytsev <alexey.zaytsev@gmail.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoUse a separate config option for the b43 pci to ssb bridge.
Alexey Zaytsev [Sat, 23 Feb 2008 09:59:26 +0000 (12:59 +0300)]
Use a separate config option for the b43 pci to ssb bridge.

The bridge code was unnecessary enabled by the b44
driver, but it prevents the bcm43xx driver from
being loaded, as the bridge claims the same pci ids.

Now we enable the birdge only if the b43{legacy}
drivers are selected.

Signed-off-by: Alexey Zaytsev <alexey.zaytsev@gmail.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: Remove unused exports
Roland Dreier [Tue, 26 Feb 2008 14:26:56 +0000 (15:26 +0100)]
libertas: Remove unused exports

The libertas driver exports a number of symbols with no in-tree users;
remove these unused exports.  lbs_reset_device() is completely unused, with
no callers at all, so remove the function completely.

A couple of these unused exported symbols are static, which causes the
following build error on ia64 with gcc 4.2.3:

    drivers/net/wireless/libertas/main.c:1375: error: __ksymtab_lbs_remove_mesh causes a section type conflict
    drivers/net/wireless/libertas/main.c:1354: error: __ksymtab_lbs_add_mesh causes a section type conflict

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Acked-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: fix kmalloc vs. net_ratelimit
Johannes Berg [Mon, 25 Feb 2008 23:39:28 +0000 (00:39 +0100)]
mac80211: fix kmalloc vs. net_ratelimit

The "goto end;" part definitely must not be rate limited.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agort2x00: Fix rt2x00lib_reset_link_tuner()
Ivo van Doorn [Mon, 25 Feb 2008 22:15:13 +0000 (23:15 +0100)]
rt2x00: Fix rt2x00lib_reset_link_tuner()

rt2x00lib_reset_link_tuner() can be called from within
the link tuner itself. This means that it should
_not_ call rt2x00lib_stop_link_tuner() since that will
cause the thread to hang.

Reorder the things that should be done during a
link tuner reset and during a link tuner start.

Also make antenna tuning the last step of the link
tuner since it could possibly reset some statistical
information which we need for average calculation.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agort2x00: Don't switch to antenna with low rssi
Ivo van Doorn [Mon, 25 Feb 2008 22:15:08 +0000 (23:15 +0100)]
rt2x00: Don't switch to antenna with low rssi

When rssi_a > rssi_b is true and the current antenna
was already antenna A, then rt2x00 incorrectly jumped
to antenna B.

Also don't configure the antenna when there has been
no change in the antenna setup.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agort2x00: Add link tuner safe RX toggle states
Ivo van Doorn [Mon, 25 Feb 2008 22:15:05 +0000 (23:15 +0100)]
rt2x00: Add link tuner safe RX toggle states

This adds 2 new states which both are used to toggle
the RX. These new states are required for usage
inside the link tuner thread, because the normal
RX toggling will stop the link tuner thread.
While it is possible that the link tuner thread itself
is the caller of the RX toggle (when using software
antenna diversity).

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agort2x00: Fix antenna diversity
Ivo van Doorn [Mon, 25 Feb 2008 22:15:01 +0000 (23:15 +0100)]
rt2x00: Fix antenna diversity

Fix 2 issues in antenna diversity selection.

1) the following statement will always return true.
if ((rssi_curr - rssi_old) > -5 || (rssi_curr - rssi_old) < 5)
It is cleaner to check if the absolute value is smaller then 5.

2) Only enable software diversity when default antenna setup
indicates support for it. Don't select it when the hardware
does not indicate support for it...

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agogelic wireless driver needs WIRELESS_EXT support
Sebastian Siewior [Sat, 23 Feb 2008 20:46:31 +0000 (21:46 +0100)]
gelic wireless driver needs WIRELESS_EXT support

|   CC      drivers/net/ps3_gelic_wireless.o
| /home/bigeasy/git/linux-2.6/drivers/net/ps3_gelic_wireless.c: In function 'gelic_wl_setup_netdev_ops':
| /home/bigeasy/git/linux-2.6/drivers/net/ps3_gelic_wireless.c:2660: error: 'struct net_device' has no member named 'wireless_data'
| /home/bigeasy/git/linux-2.6/drivers/net/ps3_gelic_wireless.c:2661: error: 'struct net_device' has no member named 'wireless_handlers'
| make[3]: *** [drivers/net/ps3_gelic_wireless.o] Error 1
| make[2]: *** [drivers/net] Error 2
| make[1]: *** [drivers] Error 2
| make[1]: *** Waiting for unfinished jobs....
| make: *** [sub-make] Error 2

Signed-off-by: Sebastian Siewior <sebastian@breakpoint.cc>
Acked-by: Masakazu Mokuno <mokuno@sm.sony.co.jp>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoPS3: gelic: Link the wireless net_device structure to the corresponding device structure
Masakazu Mokuno [Fri, 22 Feb 2008 07:45:26 +0000 (16:45 +0900)]
PS3: gelic: Link the wireless net_device structure to the corresponding device structure

Link the net_device structure of the wireless part to the
corresponding device structure.

Without this, the sysfs node for this net_device would not have
'device' link.

Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agorndis_wlan: fix sparse warnings
Johannes Berg [Wed, 20 Feb 2008 10:47:45 +0000 (11:47 +0100)]
rndis_wlan: fix sparse warnings

It is obviously wrong to use an enum in a little endian struct,
and those other enums should be declared differently.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years ago[POWERPC] spufs: fix invalid scheduling of forgotten contexts
Jeremy Kerr [Wed, 27 Feb 2008 08:08:13 +0000 (19:08 +1100)]
[POWERPC] spufs: fix invalid scheduling of forgotten contexts

At present, we have a situation where a context with no owner is
re-scheduled by spu_forget:

Thread 1: reading regs file Thread 2: context owner

spu_forget()
- ctx->owner = NULL
- set SPU_SCHED_WAS_ACTIVE

spu_acquire_saved()
- context is in saved state

spu_release_saved()
- SPU_SCHED_WAS_ACTIVE is set,
  so spu_activate() the context,
  which now has no owner

In spu_forget(), we shouldn't be requesting a re-schedule by setting
SPU_SCHED_WAS_ACTIVE. This change removes the set_bit in spu_forget(),
so that spu_release_saved() doesn't reinsert this destroyed context on
to the run queue.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
16 years ago[SCTP]: Correctly set the length of sctp_assoc_change notification
Vlad Yasevich [Thu, 14 Feb 2008 15:18:20 +0000 (10:18 -0500)]
[SCTP]: Correctly set the length of sctp_assoc_change notification

sctp_assoc_change notification may contain the data from a received
ABORT chunk.  Set the length correctly to account for that.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
16 years ago[NETFILTER]: Fix NF_QUEUE_NR() parenthesis
Patrick McHardy [Wed, 27 Feb 2008 20:21:18 +0000 (12:21 -0800)]
[NETFILTER]: Fix NF_QUEUE_NR() parenthesis

Properly add parens around the macro argument. This is not needed by
the kernel but the macro is exported to userspace, so it shouldn't
make any assumptions.

Also use NF_VERDICT_BITS instead of NF_VERDICT_QBTIS for the left-shift
since thats whats logically correct.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETFILTER]: xt_conntrack: fix IPv4 address comparison
Jan Engelhardt [Wed, 27 Feb 2008 20:20:41 +0000 (12:20 -0800)]
[NETFILTER]: xt_conntrack: fix IPv4 address comparison

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETFILTER]: xt_conntrack: fix missing boolean clamping
Jan Engelhardt [Wed, 27 Feb 2008 20:09:05 +0000 (12:09 -0800)]
[NETFILTER]: xt_conntrack: fix missing boolean clamping

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETFILTER]: nf_conntrack: fix smp_processor_id() in preemptible code warning
Patrick McHardy [Wed, 27 Feb 2008 20:07:47 +0000 (12:07 -0800)]
[NETFILTER]: nf_conntrack: fix smp_processor_id() in preemptible code warning

Since we're using RCU for the conntrack hash now, we need to avoid
getting preempted or interrupted by BHs while changing the stats.

Fixes warning reported by Tilman Schmidt <tilman@imap.cc> when using
preemptible RCU:

[   48.180297] BUG: using smp_processor_id() in preemptible [00000000] code: ntpdate/3562
[   48.180297] caller is __nf_conntrack_find+0x9b/0xeb [nf_conntrack]
[   48.180297] Pid: 3562, comm: ntpdate Not tainted 2.6.25-rc2-mm1-testing #1
[   48.180297]  [<c02015b9>] debug_smp_processor_id+0x99/0xb0
[   48.180297]  [<fac643a7>] __nf_conntrack_find+0x9b/0xeb [nf_conntrack]

Tested-by: Tilman Schmidt <tilman@imap.cc>
Tested-by: Christian Casteyde <casteyde.christian@free.fr> [Bugzilla #10097]
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV6] SYSCTL: Fix possible memory leakage in error path.
YOSHIFUJI Hideaki [Wed, 27 Feb 2008 20:06:38 +0000 (12:06 -0800)]
[IPV6] SYSCTL: Fix possible memory leakage in error path.

In error path, we do need to free memory just allocated.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Christoph Lameter [Wed, 27 Feb 2008 19:07:10 +0000 (11:07 -0800)]
Merge branch 'master' of git://git./linux/kernel/git/torvalds/linux-2.6

16 years ago[POWERPC] 44x: add missing define TARGET_4xx and TARGET_440GX to cuboot-taishan
Valentine Barshak [Tue, 26 Feb 2008 14:58:53 +0000 (01:58 +1100)]
[POWERPC] 44x: add missing define TARGET_4xx and TARGET_440GX to cuboot-taishan

In order to get the proper boad info (bd_info) structure defined in ppcboot.h
both TARGET_4xx and TARGET_44x should be defined for all PowerPC 440 boards.
The 440GX boards also need TARGET_440GX defined since they have 4 EMACs and
there are 4 MAC addesses in bd_info passed by u-boot.

Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
16 years ago[POWERPC] 4xx: Fix L1 cache size in katmai DTS
Stefan Roese [Thu, 21 Feb 2008 15:21:37 +0000 (02:21 +1100)]
[POWERPC] 4xx: Fix L1 cache size in katmai DTS

This patch changes the katmai (440SPe) L1 cache size to 32k. Some
whitespace issues are cleaned up too.

Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
16 years ago[POWERPC] 4xx: Fix Haleakala PCIe compatibility problem in dts
Stefan Roese [Wed, 20 Feb 2008 10:45:58 +0000 (21:45 +1100)]
[POWERPC] 4xx: Fix Haleakala PCIe compatibility problem in dts

Since the 4xx PCIe driver checks for 405ex compatibility, the
PCIe interface was not detected as it is currently defined as
"405exr" compatible. This patch changes it to "405ex".

The 405EX and 405EXr are identical exept that the 2nd PCIe and the
2nd EMAC interfaces are missing.

Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
16 years agoavr32: Fix OCD refcounting bug
Haavard Skinnemoen [Wed, 27 Feb 2008 13:04:29 +0000 (14:04 +0100)]
avr32: Fix OCD refcounting bug

Iff the parent has TIF_DEBUG set, _and_ clone_flags includes
CLONE_PTRACE we should set the TIF_DEBUG flag for the child and
increment the ocd refcount. Otherwise, the TIF_DEBUG flag must be
unset.

Currently, the child inherits TIF_DEBUG from the parent before
copy_thread is called, so TIF_DEBUG may be already be set before we
determine whether the child is supposed to inherit debugging
capabilities from the parent or not. This means that ocd_enable()
won't increment the refcount, because TIF_DEBUG is already set, and
that TIF_DEBUG will be set for processes that aren't being debugged.

This leads to a refcounting asymmetry, which may show up as

------------[ cut here ]------------
Badness at arch/avr32/kernel/ocd.c:73
PC is at ocd_disable+0x34/0x60
LR is at put_lock_stats+0xa/0x20

as reported by David Brownell. Happens when strace'ing a process that
forks a new child process, e.g. "strace mount -tjffs2 mtd1 /mnt", and
subsequently killing the child process (e.g. "umount /mnt".)

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
16 years ago[INET]: Don't create tunnels with '%' in name.
Pavel Emelyanov [Wed, 27 Feb 2008 07:51:04 +0000 (23:51 -0800)]
[INET]: Don't create tunnels with '%' in name.

Four tunnel drivers (ip_gre, ipip, ip6_tunnel and sit) can receive a
pre-defined name for a device from the userspace.  Since these drivers
call the register_netdevice() (rtnl_lock, is held), which does _not_
generate the device's name, this name may contain a '%' character.

Not sure how bad is this to have a device with a '%' in its name, but
all the other places either use the register_netdev(), which call the
dev_alloc_name(), or explicitly call the dev_alloc_name() before
registering, i.e. do not allow for such names.

This had to be prior to the commit 34cc7b, but I forgot to number the
patches and this one got lost, sorry.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[POWERPC] spufs: fix context destruction during psmap fault
Jeremy Kerr [Tue, 26 Feb 2008 02:31:42 +0000 (13:31 +1100)]
[POWERPC] spufs: fix context destruction during psmap fault

We have a small window where a spu context may be destroyed while
we're servicing a page fault (from another thread) to the context's
problem state mapping.

After we up_read() the mmap_sem, it's possible that the context is
destroyed by its owning thread, and so the later references to ctx
are invalid. This can maifest as a deadlock on the (now free()-ed)
context state mutex.

This change adds a reference to the context before we release the
mmap_sem, so that the context cannot be destroyed.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
16 years ago[AF_KEY]: Fix oops by converting to proc_net_*().
David S. Miller [Wed, 27 Feb 2008 06:20:44 +0000 (22:20 -0800)]
[AF_KEY]: Fix oops by converting to proc_net_*().

To make sure the procfs visibility occurs after the ->proc_fs ops are
setup, use proc_net_fops_create() and proc_net_remove().

This also fixes an OOPS after module unload in that the name string
for remove was wrong, so it wouldn't actually be removed.  That bug
was introduced by commit 61145aa1a12401ac71bcc450a58c773dd6e2bfb9
("[KEY]: Clean up proc files creation a bit.")

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoCONNECTOR: make cn_already_initialized static
Li Zefan [Wed, 27 Feb 2008 02:25:53 +0000 (18:25 -0800)]
CONNECTOR: make cn_already_initialized static

It is used in connector.c only, so make it static.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV4]: Reset scope when changing address
Bjorn Mork [Wed, 27 Feb 2008 02:17:53 +0000 (18:17 -0800)]
[IPV4]: Reset scope when changing address

This bug did bite at least one user, who did have to resort to rebooting
the system after an "ifconfig eth0 127.0.0.1" typo.

Deleting the address and adding a new is a less intrusive workaround.
But I still beleive this is a bug that should be fixed.  Some way or
another.

Another possibility would be to remove the scope mangling based on
address.  This will always be incomplete (are 127/8 the only address
space with host scope requirements?)

We set the scope to RT_SCOPE_HOST if an IPv4 interface is configured
with a loopback address (127/8).  The scope is never reset, and will
remain set to RT_SCOPE_HOST after changing the address. This patch
resets the scope if the address is changed again, to restore normal
functionality.

Signed-off-by: Bjorn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV6]: Add missing initializations of the new nl_info.nl_net field
Benjamin Thery [Wed, 27 Feb 2008 02:10:03 +0000 (18:10 -0800)]
[IPV6]: Add missing initializations of the new nl_info.nl_net field

Add some more missing initializations of the new nl_info.nl_net field
in IPv6 stack. This field will be used when network namespaces are
fully supported.

Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[MACVLAN]: Update Kconfig to refer to iproute
Patrick McHardy [Wed, 27 Feb 2008 01:52:05 +0000 (17:52 -0800)]
[MACVLAN]: Update Kconfig to refer to iproute

Since the macvlan release I had at least 5 users asking how to configure
it since the old userspace tool doesn't work with the version in the
kernel. Add a pointer to the Kconfig help.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agobluetooth: delete timer in l2cap_conn_del()
Thomas Gleixner [Wed, 27 Feb 2008 01:42:56 +0000 (17:42 -0800)]
bluetooth: delete timer in l2cap_conn_del()

Delete a possibly armed timer before kfree'ing the connection object.

Solves: http://lkml.org/lkml/2008/2/15/514

Reported-by:Quel Qun <kelk1@comcast.net>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SPARC64]: Loosen checks in exception table handling.
David S. Miller [Wed, 27 Feb 2008 01:30:02 +0000 (17:30 -0800)]
[SPARC64]: Loosen checks in exception table handling.

Some parts of the kernel now do things like do *_user() accesses while
set_fs(KERNEL_DS) that fault on purpose.

See, for example, the code added by changeset
a0c1e9073ef7428a14309cba010633a6cd6719ea ("futex: runtime enable pi
and robust functionality").

That trips up the ASI sanity checking we make in do_kernel_fault().

Just remove it for now.  Maybe we can add it back later with an added
conditional which looks at the current get_fs() value.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoarch/sh/drivers/dma/dma-sh.c: Correct use of ! and &
Julia Lawall [Tue, 26 Feb 2008 20:42:11 +0000 (21:42 +0100)]
arch/sh/drivers/dma/dma-sh.c: Correct use of ! and &

In commit e6bafba5b4765a5a252f1b8d31cbf6d2459da337, a bug was fixed that
involved converting !x & y to !(x & y).  The code below shows the same
pattern, and thus should perhaps be fixed in the same way.

This is not tested and clearly changes the semantics, so it is only
something to consider.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@ expression E1,E2; @@
(
  !E1 & !E2
|
- !E1 & E2
+ !(E1 & E2)
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agoMAINTAINERS: neteffect update
Roland Dreier [Thu, 21 Feb 2008 15:02:41 +0000 (09:02 -0600)]
MAINTAINERS: neteffect update

Adding Nishi to the maintainers list.

Signed-off-by: Glenn Streiff <gstreiff@neteffect.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoRDMA/nes: Fix interrupt moderation low threshold
John Lacombe [Thu, 21 Feb 2008 14:34:58 +0000 (08:34 -0600)]
RDMA/nes: Fix interrupt moderation low threshold

Interrupt moderation low threshold value was incorrectly triggering,
indicating that the threshold should be lowered.

The impact was the timer was likely to become 40usecs and get stuck
there.  The biggest side effect was too many interrupts and nonoptimal
performance.

Signed-off-by: John Lacombe <jlacombe@neteffect.com>
Signed-off-by: Glenn Streiff <gstreiff@neteffect.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoRDMA/nes: Fix CRC endianness for RDMA connection establishment on big-endian
Faisal Latif [Thu, 21 Feb 2008 14:31:22 +0000 (08:31 -0600)]
RDMA/nes: Fix CRC endianness for RDMA connection establishment on big-endian

With commit ef19454b ("[LIB] crc32c: Keep intermediate crc state in
cpu order"), the behavior of crc32c changes on big-endian platforms.

Our algorithm expects the previous behavior; otherwise we have RDMA
connection establishment failure on big-endian platforms like powerpc.
Apply cpu_to_le32() to value returned by crc32c() to get the previous
behavior.

Signed-off-by: Faisal Latif <flatif@neteffect.com>
Signed-off-by: Glenn Streiff <gstreiff@neteffect.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoRDMA/nes: Fix use-after-free in mini_cm_dec_refcnt_listen()
Faisal Latif [Thu, 21 Feb 2008 14:27:32 +0000 (08:27 -0600)]
RDMA/nes: Fix use-after-free in mini_cm_dec_refcnt_listen()

Fix use-after-free spotted by Coverity checker flagged by Adrian Bunk.

Signed-off-by: Faisal Latif <flatif@neteffect.com>
Signed-off-by: Glenn Streiff <gstreiff@neteffect.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoRDMA/nes: Fix use-after-free in nes_create_cq()
Glenn Streiff [Thu, 21 Feb 2008 14:17:54 +0000 (08:17 -0600)]
RDMA/nes: Fix use-after-free in nes_create_cq()

Just delete the debugging statement so we don't use cqp_request after
freeing it.  Adrian Bunk flagged this use-after-free issue spotted by
the Coverity checker.

Signed-off-by: Glenn Streiff <gstreiff@neteffect.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoRDMA/nes: Fix a check-after-use in nes_probe()
Adrian Bunk [Thu, 21 Feb 2008 14:13:47 +0000 (08:13 -0600)]
RDMA/nes: Fix a check-after-use in nes_probe()

Fix a check-after-use spotted by the Coverity checker.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Glenn Streiff <gstreiff@neteffect.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoRDMA/nes: Fix a memory leak in schedule_nes_timer()
Adrian Bunk [Thu, 21 Feb 2008 14:12:06 +0000 (08:12 -0600)]
RDMA/nes: Fix a memory leak in schedule_nes_timer()

Fix a memory leak spotted by the Coverity checker.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Glenn Streiff <gstreiff@neteffect.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>