]> pilppa.com Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
16 years agodm exception store: separate type from instance
Jonathan Brassow [Thu, 2 Apr 2009 18:55:30 +0000 (19:55 +0100)]
dm exception store: separate type from instance

Introduce struct dm_exception_store_type.

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
16 years agodm log: remove struct dm_dirty_log_internal
Mike Snitzer [Thu, 2 Apr 2009 18:55:30 +0000 (19:55 +0100)]
dm log: remove struct dm_dirty_log_internal

Remove the 'dm_dirty_log_internal' structure.  The resulting cleanup
eliminates extra memory allocations.  Therefore exposing the internal
list_head to the external 'dm_dirty_log_type' structure is a worthwhile
compromise.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
16 years agodm log: use standard kernel module refcount
Mike Snitzer [Thu, 2 Apr 2009 18:55:29 +0000 (19:55 +0100)]
dm log: use standard kernel module refcount

Avoid private module usage accounting by removing 'use' from
dm_dirty_log_internal.  The standard module reference counting is
sufficient.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
16 years agodm crypt: use kzfree
Johannes Weiner [Thu, 2 Apr 2009 18:55:28 +0000 (19:55 +0100)]
dm crypt: use kzfree

Use kzfree() instead of memset() + kfree().

Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Reviewed-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
16 years agodm target: remove struct tt_internal
Cheng Renquan [Thu, 2 Apr 2009 18:55:28 +0000 (19:55 +0100)]
dm target: remove struct tt_internal

The tt_internal is really just a list_head to manage registered target_type
in a double linked list,

Here embed the list_head into target_type directly,
1. to avoid kmalloc/kfree;
2. then tt_internal is really unneeded;

Cc: stable@kernel.org
Signed-off-by: Cheng Renquan <crquan@gmail.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Reviewed-by: Alasdair G Kergon <agk@redhat.com>
16 years agodm table: fix upgrade mode race
Alasdair G Kergon [Thu, 2 Apr 2009 18:55:28 +0000 (19:55 +0100)]
dm table: fix upgrade mode race

upgrade_mode() sets bdev to NULL temporarily, and does not have any
locking to exclude anything from seeing that NULL.

In dm_table_any_congested() bdev_get_queue() can dereference that NULL and
cause a reported oops.

Fix this by not changing that field during the mode upgrade.

Cc: stable@kernel.org
Cc: Neil Brown <neilb@suse.de>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
16 years agodm: path selector use module refcount directly
Jun'ichi Nomura [Thu, 2 Apr 2009 18:55:27 +0000 (19:55 +0100)]
dm: path selector use module refcount directly

Fix refcount corruption in dm-path-selector

Refcounting with non-atomic ops under shared lock will corrupt the counter
in multi-processor system and may trigger BUG_ON().
Use module refcount.
# same approach as dm-target-use-module-refcount-directly.patch here
# https://www.redhat.com/archives/dm-devel/2008-December/msg00075.html

Typical oops:
  kernel BUG at linux-2.6.29-rc3/drivers/md/dm-path-selector.c:90!
  Pid: 11148, comm: dmsetup Not tainted 2.6.29-rc3-nm #1
  dm_put_path_selector+0x4d/0x61 [dm_multipath]
  Call Trace:
   [<ffffffffa031d3f9>] free_priority_group+0x33/0xb3 [dm_multipath]
   [<ffffffffa031d4aa>] free_multipath+0x31/0x67 [dm_multipath]
   [<ffffffffa031d50d>] multipath_dtr+0x2d/0x32 [dm_multipath]
   [<ffffffffa015d6c2>] dm_table_destroy+0x64/0xd8 [dm_mod]
   [<ffffffffa015b73a>] __unbind+0x46/0x4b [dm_mod]
   [<ffffffffa015b79f>] dm_swap_table+0x60/0x14d [dm_mod]
   [<ffffffffa015f963>] dev_suspend+0xfd/0x177 [dm_mod]
   [<ffffffffa0160250>] dm_ctl_ioctl+0x24c/0x29c [dm_mod]
   [<ffffffff80288cd3>] ? get_page_from_freelist+0x49c/0x61d
   [<ffffffffa015f866>] ? dev_suspend+0x0/0x177 [dm_mod]
   [<ffffffff802bf05c>] vfs_ioctl+0x2a/0x77
   [<ffffffff802bf4f1>] do_vfs_ioctl+0x448/0x4a0
   [<ffffffff802bf5a0>] sys_ioctl+0x57/0x7a
   [<ffffffff8020c05b>] system_call_fastpath+0x16/0x1b

Cc: stable@kernel.org
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
16 years agodm target: use module refcount directly
Cheng Renquan [Thu, 2 Apr 2009 18:55:27 +0000 (19:55 +0100)]
dm target: use module refcount directly

The tt_internal's 'use' field is superfluous: the module's refcount can do
the work properly.  An acceptable side-effect is that this increases the
reference counts reported by 'lsmod'.

Remove the superfluous test when removing a target module.

[Crash possible without this on SMP - agk]

Cc: stable@kernel.org
Signed-off-by: Cheng Renquan <crquan@gmail.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Reviewed-by: Alasdair G Kergon <agk@redhat.com>
Reviewed-by: Jonathan Brassow <jbrassow@redhat.com>
16 years agodm snapshot: avoid having two exceptions for the same chunk
Mikulas Patocka [Thu, 2 Apr 2009 18:55:26 +0000 (19:55 +0100)]
dm snapshot: avoid having two exceptions for the same chunk

We need to check if the exception was completed after dropping the lock.

After regaining the lock, __find_pending_exception checks if the exception
was already placed into &s->pending hash.

But we don't check if the exception was already completed and placed into
&s->complete hash. If the process waiting in alloc_pending_exception was
delayed at this point because of a scheduling latency and the exception
was meanwhile completed, we'd miss that and allocate another pending
exception for already completed chunk.

It would lead to a situation where two records for the same chunk exist
and potential data corruption because multiple snapshot I/Os to the
affected chunk could be redirected to different locations in the
snapshot.

Cc: stable@kernel.org
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
16 years agodm snapshot: avoid dropping lock in __find_pending_exception
Mikulas Patocka [Thu, 2 Apr 2009 18:55:25 +0000 (19:55 +0100)]
dm snapshot: avoid dropping lock in __find_pending_exception

It is uncommon and bug-prone to drop a lock in a function that is called with
the lock held, so this is moved to the caller.

Cc: stable@kernel.org
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
16 years agodm snapshot: refactor __find_pending_exception
Mikulas Patocka [Thu, 2 Apr 2009 18:55:25 +0000 (19:55 +0100)]
dm snapshot: refactor __find_pending_exception

Move looking-up of a pending exception from __find_pending_exception to another
function.

Cc: stable@kernel.org
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
16 years agodm io: make sync_io uninterruptible
Mikulas Patocka [Thu, 2 Apr 2009 18:55:24 +0000 (19:55 +0100)]
dm io: make sync_io uninterruptible

If someone sends signal to a process performing synchronous dm-io call,
the kernel may crash.

The function sync_io attempts to exit with -EINTR if it has pending signal,
however the structure "io" is allocated on stack, so already submitted io
requests end up touching unallocated stack space and corrupting kernel memory.

sync_io sets its state to TASK_UNINTERRUPTIBLE, so the signal can't break out
of io_schedule() --- however, if the signal was pending before sync_io entered
while (1) loop, the corruption of kernel memory will happen.

There is no way to cancel in-progress IOs, so the best solution is to ignore
signals at this point.

Cc: stable@kernel.org
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
16 years agodm raid1: switch read_record from kmalloc to slab to save memory
Mikulas Patocka [Thu, 2 Apr 2009 18:55:24 +0000 (19:55 +0100)]
dm raid1: switch read_record from kmalloc to slab to save memory

With my previous patch to save bi_io_vec, the size of dm_raid1_read_record
is significantly increased (the vector list takes 3072 bytes on 32-bit machines
and 4096 bytes on 64-bit machines).

The structure dm_raid1_read_record used to be allocated with kmalloc,
but kmalloc aligns the size on the next power-of-two so an object
slightly greater than 4096 will allocate 8192 bytes of memory and half of
that memory will be wasted.

This patch turns kmalloc into a slab cache which doesn't have this
padding so it will reduce the memory consumed.

Cc: stable@kernel.org
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
16 years agodm: preserve bi_io_vec when resubmitting bios
Mikulas Patocka [Thu, 2 Apr 2009 18:55:23 +0000 (19:55 +0100)]
dm: preserve bi_io_vec when resubmitting bios

Device mapper saves and restores various fields in the bio, but it doesn't save
bi_io_vec.  If the device driver modifies this after a partially successful
request, dm-raid1 and dm-multipath may attempt to resubmit a bio that has
bi_size inconsistent with the size of vector.

To make requests resubmittable in dm-raid1 and dm-multipath, we must save
and restore the bio vector as well.

To reduce the memory overhead involved in this, we do not save the pages in a
vector and use a 16-bit field size if the page size is less than 65536.

Cc: stable@kernel.org
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
16 years agoARM: Add SMSC911X support to Overo platform (V2)
Steve Sakoman [Mon, 2 Feb 2009 06:27:49 +0000 (06:27 +0000)]
ARM: Add SMSC911X support to Overo platform (V2)

Gumstix will soon be shipping a variant of their Summit board that
includes an SMSC LAN9221 ethernet interface.  This patch provides
support via the smsc911x driver when enabled in kernel config.

The Overo defconfig is not updated since the LAN9221 is an option
not present on all systems.

Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Acked-by: Steve Glendinning <steve.glendinning@smsc.com>
16 years agoarm: update omap_ldp defconfig to use smsc911x
Stanley.Miao [Tue, 20 Jan 2009 17:06:10 +0000 (17:06 +0000)]
arm: update omap_ldp defconfig to use smsc911x

Signed-off-by: Stanley.Miao <stanley.miao@windriver.com>
16 years agoarm: update realview defconfigs to use smsc911x
Steve Glendinning [Tue, 20 Jan 2009 13:23:38 +0000 (13:23 +0000)]
arm: update realview defconfigs to use smsc911x

Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
16 years agoarm: update pcm037 defconfig to use smsc911x
Steve Glendinning [Tue, 20 Jan 2009 13:22:48 +0000 (13:22 +0000)]
arm: update pcm037 defconfig to use smsc911x

Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Tested-by: Sascha Hauer <s.hauer@pengutronix.de>
16 years agoarm: convert omap ldp platform to use smsc911x
Steve Glendinning [Fri, 23 Jan 2009 17:09:13 +0000 (17:09 +0000)]
arm: convert omap ldp platform to use smsc911x

from 2.6.29, smc911x isn't maintained anymore. A new driver, smsc911x,
will replace it. so convert omap_ldp to use smsc911x driver.

Signed-off-by: Stanley.Miao <stanley.miao@windriver.com>
Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
16 years agoarm: convert realview platform to use smsc911x
Steve Glendinning [Tue, 20 Jan 2009 13:23:30 +0000 (13:23 +0000)]
arm: convert realview platform to use smsc911x

Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
16 years agoarm: convert pcm037 platform to use smsc911x
Steve Glendinning [Tue, 20 Jan 2009 13:22:29 +0000 (13:22 +0000)]
arm: convert pcm037 platform to use smsc911x

Updated to also specify SMSC911X_FORCE_INTERNAL_PHY, as the external phy
detection hardware strap is incorrectly pulled high on this platform.

Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Tested-by: Sascha Hauer <s.hauer@pengutronix.de>
16 years agopowerpc: Move SPEFSCR defines to common header
Kumar Gala [Wed, 1 Apr 2009 21:25:33 +0000 (16:25 -0500)]
powerpc: Move SPEFSCR defines to common header

SPEFSCR is a user space register and doesn't conflict with anything.
Moving the defines of the various bit fields makes some emulation
code have fewer ifdefs

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years agoASoC: Implement suspend and resume operations for WM9705
Mark Brown [Thu, 2 Apr 2009 14:49:41 +0000 (15:49 +0100)]
ASoC: Implement suspend and resume operations for WM9705

Without this the WM9705 driver fails badly when resuming.

Tested-by: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
16 years agoASoC: Set parent for AC97 devices we register
Mark Brown [Wed, 1 Apr 2009 18:35:01 +0000 (19:35 +0100)]
ASoC: Set parent for AC97 devices we register

Ensure that any AC97 devices that bind to the CODEC are below the
ASoC device in the device tree so the suspend and resume code can
figure out what order to handle them in.

Reported-by: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
16 years agoASoC: Don't defer resume work for AC97 codecs
Mark Brown [Tue, 31 Mar 2009 10:27:03 +0000 (11:27 +0100)]
ASoC: Don't defer resume work for AC97 codecs

AC97 devices may have other drivers hanging off them directly so need to
have resumed when the resume function returns meaning that we can't defer
the resume - complete it immediately for them. Non-AC97 devices should
not have other drivers hanging directly off the ASoC devices.

We only really need the deferral for non-AC97 devices - it's there since
some I2C buses are very slow and non-AC97 codecs often have large numbers
of registers to restore and require delays to bring the codec up cleanly
leading to a substantial impact on overall resume time.

Reported-by: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
16 years agoASoC: Add some documentation for the ASoC jack API
Mark Brown [Fri, 27 Mar 2009 17:14:52 +0000 (17:14 +0000)]
ASoC: Add some documentation for the ASoC jack API

A brief overview of how the components of the API fit together.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
16 years agoASoC: OMAP: Set minimum buffer size constraint for McBSP2 in OMAP3
Jarkko Nikula [Fri, 27 Mar 2009 13:32:01 +0000 (15:32 +0200)]
ASoC: OMAP: Set minimum buffer size constraint for McBSP2 in OMAP3

McBSP2 in OMAP3 has 1 ksample (1k x 32 bit) internal FIFO. During
initial playback startup, this FIFO is keeping the DMA request active
until the FIFO is full.

So now if ALSA buffer size is smaller, DMA is looping around it while
filling up the HW FIFO, generating burst of interrupts as well and SW
doesn't have any change to fill enough data.

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
16 years agoASoC: TWL4030: Add constrains for second stream
Peter Ujfalusi [Fri, 27 Mar 2009 08:39:08 +0000 (10:39 +0200)]
ASoC: TWL4030: Add constrains for second stream

In case of duplex mode (capture and playback at the same time), the second
stream has to have the same parameters (rate, sample size) as the already
running stream.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
16 years agoASoC: TWL4030: 96KHz playback support
Peter Ujfalusi [Fri, 27 Mar 2009 08:39:07 +0000 (10:39 +0200)]
ASoC: TWL4030: 96KHz playback support

TWL4030 supports 96KHz sample playback, but only playback.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
16 years agoASoC: trim SSI sysfs statistics in Freescale MPC8610 sound drivers
Timur Tabi [Thu, 26 Mar 2009 16:42:38 +0000 (11:42 -0500)]
ASoC: trim SSI sysfs statistics in Freescale MPC8610 sound drivers

Optimize the display of SSI statistics in the Freescale MPC8610 sound driver
to display the status count only of the interrupts that were actually enabled.
Previously, it would display the counts of all SISR status bits, even those
that were not enabled.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
16 years agopxa2xx-ac97: fix displaying GSR after reset timeout
Luotao Fu [Thu, 26 Mar 2009 12:18:03 +0000 (13:18 +0100)]
pxa2xx-ac97: fix displaying GSR after reset timeout

the variable gsr_bit is set in isr. It is however set to 0 and interrupts are
disabled prior to reset. Hence it doesn't make a lot of sense to show the
content of gsr_bit in case of a reset timeout.

Signed-off-by: Luotao Fu <l.fu@pengutronix.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
16 years agoASoC: remove trigger delay in Freescale MPC8610 sound driver
Timur Tabi [Wed, 25 Mar 2009 23:20:37 +0000 (18:20 -0500)]
ASoC: remove trigger delay in Freescale MPC8610 sound driver

Remove the delay from the trigger function in the Freescale MPC8610 sound
driver when capture is started.  This delay was used to ensure that the DMA
controller was active when ALSA call the .pointer function to request a
DMA transfer status.  A better approach is for the .pointer function to detect
that DMA has not started, and return zero instead.  This change eliminates
the need for the delay.

Also add some related code to check for a DMA programming error, and report
XRUN if it occurs.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
16 years agoASoC: Add Magician machine support
Philipp Zabel [Thu, 19 Mar 2009 08:34:46 +0000 (09:34 +0100)]
ASoC: Add Magician machine support

HTC Magician has a Philips UDA1380 codec connected via
SSP1 (playback) and I2S (capture).
There is a flip-flop between the SSP frame clock output
and the codec's word select input pin. To make the codec
see proper I2S input, the SSP has to send two frames per
sample.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
16 years agoASoC: pxa-ssp: Use 16-bit DMA for magician stereo
Philipp Zabel [Thu, 19 Mar 2009 08:32:01 +0000 (09:32 +0100)]
ASoC: pxa-ssp: Use 16-bit DMA for magician stereo

Now magician and similar boards can use network mode with only one
active slot to explicitly set 16 bit frame width, even for S16_LE
stereo sound.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
16 years ago[ARM] 5444/1: ARM: Realview: Fix event-device multiplicators in localtimer.c
Santosh Shilimkar [Thu, 2 Apr 2009 14:28:58 +0000 (15:28 +0100)]
[ARM] 5444/1: ARM: Realview: Fix event-device multiplicators in localtimer.c

Set the "mult" to finite value in the local_timer_setup in case
of CONFIG_LOCAL_TIMERS not enabled. Othewise this throws warning
in the boot log because of detect zero event-device multiplicators.
This can cause division-by-zero crashes.

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16 years agox86, mm: fix misuse of debug_kmap_atomic
Akinobu Mita [Thu, 2 Apr 2009 07:01:26 +0000 (16:01 +0900)]
x86, mm: fix misuse of debug_kmap_atomic

Impact: fix CONFIG_DEBUG_HIGHMEM=y breakage

Commit 7ca43e756 ("mm: use debug_kmap_atomic") introduced some
debug_kmap_atomic() calls in the wrong places.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
LKML-Reference: <20090402070126.GA3951@localhost.localdomain>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoMerge branch 'linus' into x86/urgent
Ingo Molnar [Thu, 2 Apr 2009 14:33:42 +0000 (16:33 +0200)]
Merge branch 'linus' into x86/urgent

Merge needed to go past commit 7ca43e756 (mm: use debug_kmap_atomic)
and fix it.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux...
Jesper Nilsson [Thu, 2 Apr 2009 14:02:42 +0000 (16:02 +0200)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-cpumask-for-cris into for-next

16 years agoCRISv32: Remove extraneous space between -I and the path.
Jesper Nilsson [Thu, 2 Apr 2009 13:57:45 +0000 (15:57 +0200)]
CRISv32: Remove extraneous space between -I and the path.

Fixes build error:

  LD      init/built-in.o
  LD      vmlinux
  SYSMAP  System.map
  OBJCOPY arch/cris/arch-v32/boot/Image
  Kernel: arch/cris/arch-v32/boot/Image is ready
  GZIP    arch/cris/arch-v32/boot/compressed/piggy.gz
  AS      arch/cris/arch-v32/boot/compressed/head.o
crisv32-axis-linux-gnu-gcc: cannot specify -o with -c or -S and multiple compilations
make[3]: *** [arch/cris/arch-v32/boot/compressed/head.o] Error 1
make[2]: *** [arch/cris/arch-v32/boot/compressed/vmlinux] Error 2
make[1]: *** [zImage] Error 2
make: *** [sub-make] Error 2

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
16 years agosh: update defconfigs.
Paul Mundt [Thu, 2 Apr 2009 13:02:26 +0000 (22:02 +0900)]
sh: update defconfigs.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agocris: convert obsolete hw_interrupt_type to struct irq_chip
Thomas Gleixner [Wed, 11 Mar 2009 00:46:11 +0000 (01:46 +0100)]
cris: convert obsolete hw_interrupt_type to struct irq_chip

Impact: cleanup

Convert the last remaining users to struct irq_chip.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
CC: Mikael Starvik <starvik@axis.com>
Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
16 years agofuse: allow private mappings of "direct_io" files
Miklos Szeredi [Thu, 2 Apr 2009 12:25:35 +0000 (14:25 +0200)]
fuse: allow private mappings of "direct_io" files

Allow MAP_PRIVATE mmaps of "direct_io" files.  This is necessary for
execute support.

MAP_SHARED mappings require some sort of coherency between the
underlying file and the mapping.  With "direct_io" it is difficult to
provide this, so for the moment just disallow shared (read-write and
read-only) mappings altogether.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
16 years agofuse: allow kernel to access "direct_io" files
Miklos Szeredi [Thu, 2 Apr 2009 12:25:34 +0000 (14:25 +0200)]
fuse: allow kernel to access "direct_io" files

Allow the kernel read and write on "direct_io" files.  This is
necessary for nfs export and execute support.

The implementation is simple: if an access from the kernel is
detected, don't perform get_user_pages(), just use the kernel address
provided by the requester to copy from/to the userspace filesystem.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
16 years agoBUG to BUG_ON changes
Stoyan Gaydarov [Tue, 10 Mar 2009 05:10:40 +0000 (06:10 +0100)]
BUG to BUG_ON changes

Signed-off-by: Stoyan Gaydarov <stoyboyker@gmail.com>
Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
16 years agoudf: Don't write integrity descriptor too often
Jan Kara [Mon, 16 Mar 2009 17:27:37 +0000 (18:27 +0100)]
udf: Don't write integrity descriptor too often

We update information in logical volume integrity descriptor after each
allocation (as LVID contains free space, number of directories and files on
disk etc.). If the filesystem is on some phase change media, this leads to its
quick degradation as such media is able to handle only 10000 overwrites or so.
We solve the problem by writing new information into LVID only on umount,
remount-ro and sync. This solves the problem at the price of longer media
inconsistency (previously media became consistent after pdflush flushed dirty
LVID buffer) but that should be acceptable.

Report by and patch written in cooperation with
Rich Coe <Richard.Coe@med.ge.com>.

Signed-off-by: Jan Kara <jack@suse.cz>
16 years agoudf: Try anchor in block 256 first
Jan Kara [Thu, 19 Mar 2009 15:21:38 +0000 (16:21 +0100)]
udf: Try anchor in block 256 first

Anchor block can be located at several places on the medium. Two of the
locations are relative to media end which is problematic to detect. Also
some drives report some block as last but are not able to read it or any
block nearby before it. So let's first try block 256 and if it is all fine,
don't look at other possible locations of anchor blocks to avoid IO errors.
This change required a larger reorganization of code but the new code is
hopefully more readable and definitely shorter.

Signed-off-by: Jan Kara <jack@suse.cz>
16 years agoudf: Some type fixes and cleanups
Jan Kara [Wed, 11 Mar 2009 15:02:04 +0000 (16:02 +0100)]
udf: Some type fixes and cleanups

Make udf_check_valid() return 1 if the validity check passed and 0 otherwise.
So far it was the other way around which was a bit confusing. Also make
udf_vrs() return loff_t which is really the type it should return (not int).

Signed-off-by: Jan Kara <jack@suse.cz>
16 years agoudf: use hardware sector size
Clemens Ladisch [Wed, 11 Mar 2009 14:57:47 +0000 (15:57 +0100)]
udf: use hardware sector size

This patch makes the UDF FS driver use the hardware sector size as the
default logical block size, which is required by the UDF specifications.
While the previous default of 2048 bytes was correct for optical disks,
it was not for hard disks or USB storage devices, and made it impossible
to use such a device with the default mount options.  (The Linux mkudffs
tool uses a default block size of 2048 bytes even on devices with
smaller hardware sectors, so this bug is unlikely to be noticed unless
UDF-formatted USB storage devices are exchanged with other OSs.)

To avoid regressions for people who use loopback optical disk images or
who used the (sometimes wrong) defaults of mkudffs, we also try with
a block size of 2048 bytes if no anchor was found with the hardware
sector size.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jan Kara <jack@suse.cz>
16 years agoudf: fix novrs mount option
Clemens Ladisch [Fri, 6 Mar 2009 08:16:49 +0000 (09:16 +0100)]
udf: fix novrs mount option

The novrs mount option was broken due to a missing break.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jan Kara <jack@suse.cz>
16 years agoudf: Fix oops when invalid character in filename occurs
Jan Kara [Wed, 4 Feb 2009 18:46:11 +0000 (19:46 +0100)]
udf: Fix oops when invalid character in filename occurs

Functions udf_CS0toNLS() and udf_NLStoCS0() didn't count with the fact that
NLS can return negative length when invalid character is given to it for
conversion. Thus interesting things could happen (such as overwriting random
memory with the rest of filename). Add appropriate checks.

Signed-off-by: Jan Kara <jack@suse.cz>
16 years agoudf: return f_fsid for statfs(2)
Coly Li [Mon, 19 Jan 2009 17:36:55 +0000 (01:36 +0800)]
udf: return f_fsid for statfs(2)

This patch makes udf return f_fsid info for statfs(2).

Signed-off-by: Coly Li <coly.li@suse.de>
Cc: Jan Kara <jack@suse.cz>
Signed-off-by: Jan Kara <jack@suse.cz>
16 years agoudf: Add checks to not underflow sector_t
Jan Kara [Wed, 3 Dec 2008 16:31:39 +0000 (17:31 +0100)]
udf: Add checks to not underflow sector_t

Signed-off-by: Jan Kara <jack@suse.cz>
16 years agoudf: fix default mode and dmode options handling
Marcin Slusarz [Tue, 2 Dec 2008 12:40:11 +0000 (13:40 +0100)]
udf: fix default mode and dmode options handling

On x86 (and several other archs) mode_t is defined as "unsigned short"
and comparing unsigned shorts to negative ints is broken (because short
is promoted to int and then compared). Fix it.

Reported-and-tested-by: Laurent Riffard <laurent.riffard@free.fr>
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
16 years agoudf: fix sparse warnings:
Jan Kara [Mon, 1 Dec 2008 12:06:10 +0000 (13:06 +0100)]
udf: fix sparse warnings:

Fix sparse warnings:

  fs/udf/balloc.c:843:3: warning: returning void-valued expression
  fs/udf/balloc.c:847:3: warning: returning void-valued expression
  fs/udf/balloc.c:851:3: warning: returning void-valued expression
  fs/udf/balloc.c:855:3: warning: returning void-valued expression

Reported-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: Jan Kara <jack@suse.cz>
16 years agoudf: unsigned last[i] cannot be less than 0
roel kluin [Wed, 29 Oct 2008 21:23:54 +0000 (17:23 -0400)]
udf: unsigned last[i] cannot be less than 0

unsigned last[i] cannot be less than 0

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
16 years agoudf: implement mode and dmode mounting options
Marcin Slusarz [Sun, 16 Nov 2008 19:52:19 +0000 (20:52 +0100)]
udf: implement mode and dmode mounting options

"dmode" allows overriding permissions of directories and
"mode" allows overriding permissions of files.

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: Jan Kara <jack@suse.cz>
Signed-off-by: Jan Kara <jack@suse.cz>
16 years agoudf: reduce stack usage of udf_get_filename
Marcin Slusarz [Sun, 16 Nov 2008 18:02:45 +0000 (19:02 +0100)]
udf: reduce stack usage of udf_get_filename

Allocate strings with kmalloc.

Checkstack output:
Before: udf_get_filename:          600
After:  udf_get_filename:          136

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: Jan Kara <jack@suse.cz>
Signed-off-by: Jan Kara <jack@suse.cz>
16 years agoudf: reduce stack usage of udf_load_pvoldesc
Marcin Slusarz [Sun, 16 Nov 2008 18:01:44 +0000 (19:01 +0100)]
udf: reduce stack usage of udf_load_pvoldesc

Allocate strings with kmalloc.

Checkstack output:
Before: udf_process_sequence:      712
After:  udf_process_sequence:      200

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
16 years agoFix the udf code not to pass structs on stack where possible.
Pekka Enberg [Wed, 15 Oct 2008 10:29:03 +0000 (12:29 +0200)]
Fix the udf code not to pass structs on stack where possible.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Jan Kara <jack@suse.cz>
16 years agoRemove struct typedefs from fs/udf/ecma_167.h et al.
Pekka Enberg [Wed, 15 Oct 2008 10:28:03 +0000 (12:28 +0200)]
Remove struct typedefs from fs/udf/ecma_167.h et al.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Jan Kara <jack@suse.cz>
16 years ago[ARM] 5442/1: pxa/cm-x255: fix reverse RDY gpios in PCMCIA driver
Mike Rapoport [Thu, 2 Apr 2009 09:21:29 +0000 (10:21 +0100)]
[ARM] 5442/1: pxa/cm-x255: fix reverse RDY gpios in PCMCIA driver

fix reverse RDY gpios in PCMCIA driver

Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16 years agosh: Kill off broken direct-mapped cache mode.
Paul Mundt [Thu, 2 Apr 2009 08:40:16 +0000 (17:40 +0900)]
sh: Kill off broken direct-mapped cache mode.

Forcing direct-mapped worked on certain older 2-way set associative
parts, but was always error prone on 4-way parts. As these are the
norm these days, there is not much point in continuing to support this
mode. Most of the folks that used direct-mapped mode generally just
wanted writethrough caching in the first place..

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agoDoc: Fix spelling in RCU/rculist_nulls.txt.
Jesper Dangaard Brouer [Tue, 31 Mar 2009 09:36:48 +0000 (09:36 +0000)]
Doc: Fix spelling in RCU/rculist_nulls.txt.

Doc: Fix spelling in RCU/rculist_nulls.txt.

Trival spelling fixes in RCU/rculist_nulls.txt.

Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Jesper Dangaard Brouer <hawk@comx.dk>
Tested-by: Jarek Poplawski <jarkao2@gmail.com;->
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoDoc: Fix wrong API example usage of call_rcu().
Jesper Dangaard Brouer [Sun, 29 Mar 2009 23:03:01 +0000 (23:03 +0000)]
Doc: Fix wrong API example usage of call_rcu().

At some point the API of call_rcu() changed from three parameters
to two parameters, correct the documentation.

One confusing thing in RCU/listRCU.txt, which is NOT fixed in this patch,
is that no reason or explaination is given for using call_rcu() instead of
the normal synchronize_rcu() call.

Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Jesper Dangaard Brouer <hawk@comx.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoDoc: Fix missing whitespaces in RCU documentation.
Jesper Dangaard Brouer [Sun, 29 Mar 2009 23:02:56 +0000 (23:02 +0000)]
Doc: Fix missing whitespaces in RCU documentation.

Trivial fix while reading through the RCU docs.

Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Jesper Dangaard Brouer <hawk@comx.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agofsl_pq_mdio: Revive UCC MDIO support
Anton Vorontsov [Tue, 31 Mar 2009 08:33:52 +0000 (08:33 +0000)]
fsl_pq_mdio: Revive UCC MDIO support

commit 1577ecef766650a57fceb171acee2b13cbfaf1d3 ("netdev: Merge UCC
and gianfar MDIO bus drivers") introduced a regression so that UCC
MDIO buses no longer work.

This is because fsl_pq_mdio driver wrongly masks all non-TBI PHYs
for !fsl,gianfar-mdio buses, while it should do that only for
fsl,gianfar-tbi buses.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoucc_geth: Pass proper device to DMA routines, otherwise oops happens
Anton Vorontsov [Thu, 2 Apr 2009 08:26:07 +0000 (01:26 -0700)]
ucc_geth: Pass proper device to DMA routines, otherwise oops happens

The driver should pass a device that actually specifies internal DMA
ops, but currently it passes netdev's device, which is wrong and that
causes following oops:

Kernel BUG at c01c4df8 [verbose debug info unavailable]
Oops: Exception in kernel mode, sig: 5 [#1]
[...]
NIP [c01c4df8] get_new_skb+0x7c/0xf8
LR [c01c4da4] get_new_skb+0x28/0xf8
Call Trace:
[ef82be00] [c01c4da4] get_new_skb+0x28/0xf8 (unreliable)
[ef82be20] [c01c4eb8] rx_bd_buffer_set+0x44/0x98
[ef82be40] [c01c62bc] ucc_geth_startup+0x11b0/0x147c
[ef82be80] [c01c6674] ucc_geth_open+0xec/0x2a4
[ef82bea0] [c02288a4] dev_open+0xc0/0x11c
[...]

Fix this by passing of_device's device that specifies DMA ops in its
archdata.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoi.MX31: Fixing cs89x0 network building to i.MX31ADS
Alan Carvalho de Assis [Tue, 31 Mar 2009 03:36:39 +0000 (03:36 +0000)]
i.MX31: Fixing cs89x0 network building to i.MX31ADS

This is a fix to get cs89x0 network driver working on i.MX31ADS

Signed-off-by: Alan Carvalho de Assis <acassis@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agotc35815: Fix build error if NAPI enabled
Atsushi Nemoto [Thu, 2 Apr 2009 08:17:36 +0000 (01:17 -0700)]
tc35815: Fix build error if NAPI enabled

This driver contains experimental NAPI code disabled by default.
The commit bea3348ee ("[NET]: Make NAPI polling independent of struct
net_device objects.") converted the NAPI path of this driver but that
conversion was not complete.  This patch fixes a build error
introduced by the commit.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agohso: add Vendor/Product ID's for new devices
Jan Dumon [Thu, 2 Apr 2009 08:16:44 +0000 (01:16 -0700)]
hso: add Vendor/Product ID's for new devices

Add Vendor/Product ID's for new devices.
Removed duplicate product ID 0x7361.

Signed-off-by: Jan Dumon <j.dumon@option.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoucc_geth: Remove unused header
Kumar Gala [Tue, 31 Mar 2009 03:42:59 +0000 (03:42 +0000)]
ucc_geth: Remove unused header

Now that the driver is exclusively an of_platform driver we no longer
use the structs and #defines in fsl_devices.h

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agogianfar: Remove unused header
Kumar Gala [Tue, 31 Mar 2009 03:42:58 +0000 (03:42 +0000)]
gianfar: Remove unused header

Now that the driver is exclusively an of_platform driver we no longer
use the structs and #defines in fsl_devices.h

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agokaweth: Fix locking to be SMP-safe
Larry Finger [Thu, 2 Apr 2009 08:09:43 +0000 (01:09 -0700)]
kaweth: Fix locking to be SMP-safe

On an SMP system, the following message is printed. The patch below gets
fixes the problem.

=================================
[ INFO: inconsistent lock state ]
2.6.29-Linus-05093-gc31f403 #57
---------------------------------
inconsistent {hardirq-on-W} -> {in-hardirq-W} usage.
bash/4105 [HC1[1]:SC0[0]:HE0:SE1] takes:
 (&kaweth->device_lock){+...}, at: [<ffffffffa01aa286>]
                 kaweth_usb_receive+0x77/0x1af [kaw eth]
{hardirq-on-W} state was registered at:
  [<ffffffff80260503>] __lock_acquire+0x753/0x1685
  [<ffffffff8026148a>] lock_acquire+0x55/0x71
  [<ffffffff80461ba6>] _spin_lock+0x31/0x3d
  [<ffffffffa01aaa0c>] kaweth_start_xmit+0x2b/0x1e1 [kaweth]
  [<ffffffff803eccd3>] dev_hard_start_xmit+0x22e/0x2ad
  [<ffffffff803fe120>] __qdisc_run+0xf2/0x203
  [<ffffffff803ed0cd>] dev_queue_xmit+0x263/0x39b
  [<ffffffffa03a47cb>] packet_sendmsg_spkt+0x1c4/0x20a [af_packet]
  [<ffffffff803de0c2>] sock_sendmsg+0xe4/0xfd
  [<ffffffff803dec8f>] sys_sendto+0xe4/0x10c
  [<ffffffff8020bccb>] system_call_fastpath+0x16/0x1b
  [<ffffffffffffffff>] 0xffffffffffffffff
irq event stamp: 1280
hardirqs last  enabled at (1279): [<ffffffff80461a71>]
                  _spin_unlock_irqrestore+0x44/0x4c
hardirqs last disabled at (1280): [<ffffffff8020bad7>]
                  save_args+0x67/0x70
softirqs last  enabled at (660): [<ffffffff8024192c>]
                  __do_softirq+0x14d/0x15d
softirqs last disabled at (651): [<ffffffff8020ce9c>]
                  call_softirq+0x1c/0x28

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonet: allow multiple dev per napi with GRO
Stephen Hemminger [Wed, 1 Apr 2009 11:20:20 +0000 (11:20 +0000)]
net: allow multiple dev per napi with GRO

GRO assumes that there is a one-to-one relationship between NAPI
structure and network device. Some devices like sky2 share multiple
devices on a single interrupt so only have one NAPI handler. Rather than
split GRO from NAPI, just have GRO assume if device changes that
it is a different flow.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agor8169: reset IntrStatus after chip reset
Karsten Wiese [Thu, 2 Apr 2009 08:06:01 +0000 (01:06 -0700)]
r8169: reset IntrStatus after chip reset

Original comment (Karsten):
On a MSI MS-6702E mainboard, when in rtl8169_init_one() for the first time
after BIOS has run, IntrStatus reads 5 after chip has been reset.
IntrStatus should equal 0 there, so patch changes IntrStatus reset to happen
after chip reset instead of before.

Remark (Francois):
Assuming that the loglevel of the driver is increased above NETIF_MSG_INTR,
the bug reveals itself with a typical "interrupt 0025 in poll" message
at startup. In retrospect, the message should had been read as an hint of
an unexpected hardware state several months ago :o(

Fixes (at least part of) https://bugzilla.redhat.com/show_bug.cgi?id=460747

Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Tested-by: Josep <josep.puigdemont@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoixgbe: Fix potential memory leak/driver panic issue while setting up Tx & Rx ring...
Mallikarjuna R Chilakala [Tue, 31 Mar 2009 21:35:24 +0000 (21:35 +0000)]
ixgbe: Fix potential memory leak/driver panic issue while setting up Tx & Rx ring parameters

While setting up the ring parameters using ethtool the driver can
panic or leak memory as ixgbe_open tries to setup tx & rx resources.
The updated logic will use ixgbe_down/up after successful allocation of
tx & rx resources

Signed-off-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
CC: stable@kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoixgbe: fix ethtool -A|a behavior
Don Skidmore [Tue, 31 Mar 2009 21:35:05 +0000 (21:35 +0000)]
ixgbe: fix ethtool -A|a behavior

We were basicly ignoring ethtool users request for FC autoneg
and replying to queries with a "best guess".  This patch
enables the driver to store if we want to enable/disable
autoneg FC and do the correct behavior.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoixgbe: Patch to fix driver panic while freeing up tx & rx resources
Mallikarjuna R Chilakala [Tue, 31 Mar 2009 21:34:44 +0000 (21:34 +0000)]
ixgbe: Patch to fix driver panic while freeing up tx & rx resources

When network interface is made active we were not handling the error
scenarios properly to clean up rx & tx resources which might result in
a driver panic.

Signed-off-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoixgbe: refactor tx buffer processing to use skb_dma_map/unmap
Alexander Duyck [Tue, 31 Mar 2009 21:34:23 +0000 (21:34 +0000)]
ixgbe: refactor tx buffer processing to use skb_dma_map/unmap

This patch resolves an issue with map single being used to map a buffer and
then unmap page being used to unmap it.  In addition it handles any error
conditions that may be detected using skb_dma_map.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Acked-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoixgbe: Fix 82598 MSI-X allocation on systems with more than 8 CPU cores
PJ Waskiewicz [Tue, 31 Mar 2009 21:34:05 +0000 (21:34 +0000)]
ixgbe: Fix 82598 MSI-X allocation on systems with more than 8 CPU cores

MSI-X allocation broke after the 82599 merge on systems with more than 8
CPU cores.  82598 drops back into MSI mode, which isn't sufficient to run
full, efficient 10G line rate.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoixgbe: feature - driver to default with FC on.
Don Skidmore [Tue, 31 Mar 2009 21:33:44 +0000 (21:33 +0000)]
ixgbe: feature - driver to default with FC on.

In the past flow control wasn't enabled by default under the
incorrect assumption that this opened up us to a denial of
service attack.  However since any switch that forwarded flow
control would be extremely msiconfigured and/or buggy, this
concern no longer out weighs the preformance gains from
having FC enabled.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Acked-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoixgbe: Fix DCB netlink layer for 82599 to enable Priority Flow Control
PJ Waskiewicz [Tue, 31 Mar 2009 21:33:25 +0000 (21:33 +0000)]
ixgbe: Fix DCB netlink layer for 82599 to enable Priority Flow Control

The priority flow control settings from the netlink layer aren't taking
effect in the base driver.  The boolean pfc_mode_enable in the dcb_config
struct isn't being set, so the hardware configuration code is never
reached.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoixgbe: Fix ethtool output with advertised mode.
Don Skidmore [Tue, 31 Mar 2009 21:33:02 +0000 (21:33 +0000)]
ixgbe: Fix ethtool output with advertised mode.

Ethtool tries to get advertised speed from phy.autoneg_advertised.
However for copper media this wasn't happening until later do to
an other fix which moved mac.ops.setup_link_speed placement in
ixgbe_link_config(). This patch will display the default advertised
speeds if it can't yet get this information from phy.autoneg_advertised.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Acked-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoixgbe: fix build when DEBUG is defined
Alexander Duyck [Tue, 31 Mar 2009 21:32:42 +0000 (21:32 +0000)]
ixgbe: fix build when DEBUG is defined

The ixgbe driver had issues when DEBUG was defined because the hw_dbg macro
was incomplete.  This patch completes the code based off of the code that
already existed in the igb module.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonet/igb: Fix kexec with igb (rev. 3)
Rafael J. Wysocki [Tue, 31 Mar 2009 21:23:50 +0000 (21:23 +0000)]
net/igb: Fix kexec with igb (rev. 3)

Impact: Fix

Yinghai Lu found one system with 82575EB where, in the kernel that is
kexeced, probe igb failed with -2, the reason being that the adapter
could not be brought back from D3 by the kexec kernel, most probably
due to quirky hardware (it looks like the same behavior happened on
forcedeth).

Prevent igb from putting the adapter into D3 during shutdown except
when we going to power off the system.  For this purpose, seperate
igb_shutdown() from igb_suspend() and use the appropriate PCI PM
callbacks in both of them.

Signed-off-by: "Rafael J. Wysocki" <rjw@sisk.pl>
Reported-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoigb: cleanup igb loopback path
Alexander Duyck [Tue, 31 Mar 2009 20:38:56 +0000 (20:38 +0000)]
igb: cleanup igb loopback path

The code path for setting up phy loopback testing was out of date and was
setting bits it didn't need to.  This change cleans up the code path and
removes some code that has no effect on teh driver.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoigb: increase delay for copper link setup
Alexander Duyck [Tue, 31 Mar 2009 20:38:38 +0000 (20:38 +0000)]
igb: increase delay for copper link setup

Increase the delay for copper phy init from 15ms to 100ms.  This is to
address issues seen in which ethtool -t was failing in some cases on 82576
based adapters.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoigb: set num_rx/tx_queues to 0 when queues are freed
Alexander Duyck [Tue, 31 Mar 2009 20:38:19 +0000 (20:38 +0000)]
igb: set num_rx/tx_queues to 0 when queues are freed

An issue was seen on suspend in which the system reported a page fault.  This
was due to the new reg_idx code being called after the queues were freed.

This update prevents any for loops from going through the queues by setting
the number of queues to 0 when they are freed.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoigb: add support for x2 link width configurations
Alexander Duyck [Tue, 31 Mar 2009 20:38:00 +0000 (20:38 +0000)]
igb: add support for x2 link width configurations

When device is on PCIe link trained as x2 the driver is currently reporting
link width as "unknown".  The original patch provided by Myron adds the x2
link support and my changes are cosmetic to clean up the readability of the
conditional operators.

Based on work by: Myron Stowe <myron.stowe@hp.com>
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonet/fec_mpc52xx: Don't dereference phy_device if it is NULL
Grant Likely [Tue, 31 Mar 2009 20:17:03 +0000 (20:17 +0000)]
net/fec_mpc52xx: Don't dereference phy_device if it is NULL

The FEC Ethernet device isn't always attached to a phy.  Be careful
not to dereference phy_device if it is NULL.  Also eliminates an
unnecessary extra function from the ioctl path.

Reported-by: Henk Stegeman <henk.stegeman@gmail.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonet/fec_mpc52xx: Migrate to net_device_ops.
Henk Stegeman [Tue, 31 Mar 2009 20:16:57 +0000 (20:16 +0000)]
net/fec_mpc52xx: Migrate to net_device_ops.

Since not using net_device_ops gets you shunned out the cool crowd,
this patch modifies the fec_mpc52xx Ethernet driver to provide the
management hooks via a struct net_device_ops.

Reported-by: Henk Stegeman <henk.stegeman@gmail.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonet/fec_mpc52xx: fix BUG on missing dma_ops
Grant Likely [Tue, 31 Mar 2009 20:16:52 +0000 (20:16 +0000)]
net/fec_mpc52xx: fix BUG on missing dma_ops

The driver triggers a BUG_ON() when allocating DMA buffers because the
arch/powerpc dma_ops aren't in the net_device's struct device.  This
patch fixes the problem by using the parent of_device which does have
the correct dma_ops set.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Reviewed-by: Becky Bruce <beckyb@kernel.crashing.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonetfilter: use rcu_read_bh() in ipt_do_table()
Eric Dumazet [Thu, 2 Apr 2009 07:53:49 +0000 (00:53 -0700)]
netfilter: use rcu_read_bh() in ipt_do_table()

Commit 784544739a25c30637397ace5489eeb6e15d7d49
(netfilter: iptables: lock free counters) forgot to disable BH
in arpt_do_table(), ipt_do_table() and  ip6t_do_table()

Use rcu_read_lock_bh() instead of rcu_read_lock() cures the problem.

Reported-and-bisected-by: Roman Mindalev <r000n@r000n.net>
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Acked-by: Patrick McHardy <kaber@trash.net>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoRDS: Use spinlock to protect 64b value update on 32b archs
Andy Grover [Wed, 1 Apr 2009 08:20:20 +0000 (08:20 +0000)]
RDS: Use spinlock to protect 64b value update on 32b archs

We have a 64bit value that needs to be set atomically.
This is easy and quick on all 64bit archs, and can also be done
on x86/32 with set_64bit() (uses cmpxchg8b). However other
32b archs don't have this.

I actually changed this to the current state in preparation for
mainline because the old way (using a spinlock on 32b) resulted in
unsightly #ifdefs in the code. But obviously, being correct takes
precedence.

Signed-off-by: Andy Grover <andy.grover@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoRDS: Rewrite connection cleanup, fixing oops on rmmod
Andy Grover [Wed, 1 Apr 2009 08:20:19 +0000 (08:20 +0000)]
RDS: Rewrite connection cleanup, fixing oops on rmmod

This fixes a bug where a connection was unexpectedly
not on *any* list while being destroyed. It also
cleans up some code duplication and regularizes some
function names.

* Grab appropriate lock in conn_free() and explain in comment
* Ensure via locking that a conn is never not on either
  a dev's list or the nodev list
* Add rds_xx_remove_conn() to match rds_xx_add_conn()
* Make rds_xx_add_conn() return void
* Rename remove_{,nodev_}conns() to
  destroy_{,nodev_}conns() and unify their implementation
  in a helper function
* Document lock ordering as nodev conn_lock before
  dev_conn_lock

Reported-by: Yosef Etigin <yosefe@voltaire.com>
Signed-off-by: Andy Grover <andy.grover@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoRDS: Fix m_rs_lock deadlock
Andy Grover [Wed, 1 Apr 2009 08:20:18 +0000 (08:20 +0000)]
RDS: Fix m_rs_lock deadlock

rs_send_drop_to() is called during socket close. If it takes
m_rs_lock without disabling interrupts, then
rds_send_remove_from_sock() can run from the rx completion
handler and thus deadlock.

Signed-off-by: Andy Grover <andy.grover@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoNeterion: New driver: Kconfig and Makefile
Ramkrishna Vepa [Wed, 1 Apr 2009 18:15:24 +0000 (18:15 +0000)]
Neterion: New driver: Kconfig and Makefile

- Kconfig and Makefile related changes for vxge driver.

- No changes in current submission.

- Changes from previous submission -
 - Incorporated the following review comments as per Bill Flink:
        - Add dependancy on INET along with PCI
        - Remove dependancy on INET_LRO and add GRO support.
 - Made this patch as last patch as per Ben Hutchings comments.

Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion.com>
Signed-off-by: Rastapur Santosh <santosh.rastapur@neterion.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoNeterion: New driver: Driver version
Ramkrishna Vepa [Wed, 1 Apr 2009 18:15:22 +0000 (18:15 +0000)]
Neterion: New driver: Driver version

- Driver version

- Changes from previous submission -
 - Updated driver version.

Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion.com>
Signed-off-by: Rastapur Santosh <santosh.rastapur@neterion.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoNeterion: New driver: Ethtool related
Ramkrishna Vepa [Wed, 1 Apr 2009 18:15:16 +0000 (18:15 +0000)]
Neterion: New driver: Ethtool related

This patch implements all ethtool related entry point functions for the driver.

- Changes in this submission -
        - Removed redundant #include statements

- Changes in previous submissions -
        - Removed unused statistics.
        - General clean up - removed unused variables and macros.
 - Incorporated following comments from Ben Hutchings
        - No need to restart the interface in vxge_ethtool_sset
        - Do not use #ifdef ADVERTISED_XX
        - Remove unnecessart intermediate copy in vxge_ethtool_gdrvinfo
        - Use strlcpy() to ensure null-termination.
        - Use ethtool_op_get_tso, ethtool_op_set_tx_hw_csum instead
          of redefining the same code.
        - Implement get_strings_count instead of deprecated get_stats_count.
        - Don't report reporting the EEPROM length as we don't supprt
          get/set eeprom.
        - Don't set self_test_count as we don't support any self tests.

Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion.com>
Signed-off-by: Rastapur Santosh <santosh.rastapur@neterion.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoNeterion: New driver: Main entry points
Ramkrishna Vepa [Wed, 1 Apr 2009 18:15:13 +0000 (18:15 +0000)]
Neterion: New driver: Main entry points

This patch implements all the driver entry point functions.
- Definition of all module loadable paramters.
- Implementation of all driver entry point functions.

- Changes in this submission -
        - Fixed compilation error when enabling debug statements
        - Fixed few warnings when CONFIG_PCI_MSI is not defined
        - Removed unnecessary volatile variables
        - Removed compare_ether_addr as it causes unaligned memory access on
          the sparc64 platform.

- Changes in previous submissions -
        - As per Stephen Hemminger's comments removed the following loadable
          parameters - gro, rx_& tx max_indicate_pkts, exec_mode, rx & tx
          pause_enable, tx_steering_type and intr_type.
        - Added Device ID definition in vxge-main.h instead of
          include/linux/pci_ids.h file - Reported by David Miller
 - Incorporated following review comments from Ben Hutchings
        - NAPI is always enabled (no option to turn it OFF).
        - Loadable parameters
         rx_steering_type: This loadable option is removed.
         ring_blocks: This loadable option is removed.
         The driver default settings work well in most if not all cases.
         Another patch to configure these parameters with ethtool will be
         released in the future.
 - LRO has been deprecated in favour of GRO - Bill Fink & Dave Miller's comment
 - Fixed sparse warnings - Reported by Andi Kleen
 - Removed unused variables

Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion.com>
Signed-off-by: Rastapur Santosh <santosh.rastapur@neterion.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
Signed-off-by: David S. Miller <davem@davemloft.net>