pandora-kernel.git
14 years agoserial167: fix read buffer overflow
Roel Kluin [Thu, 1 Oct 2009 22:44:25 +0000 (15:44 -0700)]
serial167: fix read buffer overflow

Check whether index is within bounds before grabbing the element.

Also, since NR_PORTS is defined ARRAY_SIZE(cy_port), cy_port[NR_PORTS] is
out of bounds as well.

[akpm@linux-foundation.org: cleanup, remove (long) casts]
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agocyclades: fix read buffer overflow
Roel Kluin [Thu, 1 Oct 2009 22:44:24 +0000 (15:44 -0700)]
cyclades: fix read buffer overflow

irq is declared with size NR_CARDS (4), but the loop containing this
segment runs up until NR_ISA_ADDRS (16), possibly reading from irq[i] (and
trying to use the result)

Identified by the Parfait static scanner.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoicom: convert space to tabs
Breno Leitao [Thu, 1 Oct 2009 22:44:23 +0000 (15:44 -0700)]
icom: convert space to tabs

Convert spaces to tabs and remove wrong spaces

Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com>
Cc: Scott Kilau <Scott.Kilau@digi.com>
Cc: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoserial_txx9: use container_of() instead of direct cast
Atsushi Nemoto [Thu, 1 Oct 2009 22:44:22 +0000 (15:44 -0700)]
serial_txx9: use container_of() instead of direct cast

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agos3cmci: add better support for no card detect or write protect available
Ben Dooks [Thu, 1 Oct 2009 22:44:21 +0000 (15:44 -0700)]
s3cmci: add better support for no card detect or write protect available

Add better support for omitting either the card detect or the write
protect GPIOs if the board does not support it.  Add the fields
no_wprotect and no_detect to the platform data which when set indicate the
absence of the respective GPIOs.

Note, this also fixes a minor bug where it tries to free IRQ0 if there is
no detect gpio available.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agos3cmci: make SDIO IRQ hardware IRQ support build-time configurable
Ben Dooks [Thu, 1 Oct 2009 22:44:20 +0000 (15:44 -0700)]
s3cmci: make SDIO IRQ hardware IRQ support build-time configurable

We have found a couple of boards where the SDIO IRQ hardware support has
failed to work properly, and thus we should make it configurable whether
or not to be included in the driver.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agos3cmci: DMA fixes
Ben Dooks [Thu, 1 Oct 2009 22:44:19 +0000 (15:44 -0700)]
s3cmci: DMA fixes

Fixes for the DMA transfer mode of the driver to try and improve the state
of the code:

- Ensure that dma_complete is set during the end of the command phase
  so that transfers do not stall awaiting the completion

- Update the DMA debugging to provide a bit more useful information
  such as how many DMA descriptors where not processed and print the
  DMA addresses in hexadecimal.

- Fix the DMA channel request code to actually request DMA for the
  S3CMCI block instead of whatever '0' signified.

- Add fallback to PIO if we cannot get the DMA channel, as many of the
  devices with this block only have a limited number of DMA channels.

- Only try and claim and free the DMA channel if we are trying to use it.

This improves the driver DMA code to the point where it can now identify a
card and read the partition table.  However the DMA can still stall when
trying to move data between the host and memory.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agos3cmci: Kconfig selection for PIO/DMA/Both
Ben Dooks [Thu, 1 Oct 2009 22:44:18 +0000 (15:44 -0700)]
s3cmci: Kconfig selection for PIO/DMA/Both

Add a selection for the data transfer mode of the s3cmci driver, allowing
for either a configuration or rumtime selection of the use of the DMA or
PIO transfer code.

The PIO only mode is 476 bytes smaller than the driver with both methods
compiled in.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agos3cmci: add SDIO IRQ support
Ben Dooks [Thu, 1 Oct 2009 22:44:18 +0000 (15:44 -0700)]
s3cmci: add SDIO IRQ support

The controller supports SDIO IRQ detection so add support for hardware
assisted SDIO interrupt detection for the SDIO core.  This improves the
response time for SDIO interrupts and thus the transfer rate from devices
such as the Marvel 8686.

As a note, it does seem that the controller will miss an IRQ than is held
asserted, so there are some manual checks to see if the SDIO interrupt is
active after a transfer.

Major testing on the S3C2440.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agos3cmci: add debugfs support for examining driver and hardware state
Ben Dooks [Thu, 1 Oct 2009 22:44:17 +0000 (15:44 -0700)]
s3cmci: add debugfs support for examining driver and hardware state

Export driver state and hardware register state via debugfs entries
created under a directory formed from dev_name() on the probed device when
CONFIG_DEBUG_FS is set.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agos3cmci: fix direct write to interrupt mask
Ben Dooks [Thu, 1 Oct 2009 22:44:16 +0000 (15:44 -0700)]
s3cmci: fix direct write to interrupt mask

The clear_imask() call should be used to clear the interrupt mask
register, as it may end up clearing the SDIO interrupt bit if this is
enabled.

Change all writes of zero to SDIIMSK register to use clear_imask() ready
for the SDIO updates.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agos3cmci: change to use dev_pm_ops
Ben Dooks [Thu, 1 Oct 2009 22:44:15 +0000 (15:44 -0700)]
s3cmci: change to use dev_pm_ops

Move to using dev_pm_ops for suspend and resume.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agos3cmci: change GPIO to gpiolib from S3C24XX specific calls
Ben Dooks [Thu, 1 Oct 2009 22:44:15 +0000 (15:44 -0700)]
s3cmci: change GPIO to gpiolib from S3C24XX specific calls

Move to using gpiolib to access the card detect and write protect GPIO
lines instead of using the platform speicifc s3c2410_gpio calls.

Also ensure that the card lines are claimed the same way to avoid overlap
with any other drivers.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agos3cmci: update probe to use new platform id list
Ben Dooks [Thu, 1 Oct 2009 22:44:14 +0000 (15:44 -0700)]
s3cmci: update probe to use new platform id list

Use the platform id list to match the three different versions of the
hardware block that this driver supports.

This will change the prefix of the console messages produced by this
driver to be prefixed by s3c-mci instead of the hardware block name, such
as s3c2440-mci.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agos3cmci: use resource_size() instead of local macro
Ben Dooks [Thu, 1 Oct 2009 22:44:13 +0000 (15:44 -0700)]
s3cmci: use resource_size() instead of local macro

Replace the local definition RESSIZE() with the standard resource_size()
call for getting the size of a struct resource.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agomemcg: reduce check for softlimit excess
KAMEZAWA Hiroyuki [Thu, 1 Oct 2009 22:44:12 +0000 (15:44 -0700)]
memcg: reduce check for softlimit excess

In charge/uncharge/reclaim path, usage_in_excess is calculated repeatedly
and it takes res_counter's spin_lock every time.

This patch removes unnecessary calls for res_count_soft_limit_excess.

Reviewed-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Paul Menage <menage@google.com>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Cc: Balbir Singh <balbir@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agomemcg: some modification to softlimit under hierarchical memory reclaim.
KAMEZAWA Hiroyuki [Thu, 1 Oct 2009 22:44:11 +0000 (15:44 -0700)]
memcg: some modification to softlimit under hierarchical memory reclaim.

This patch clean up/fixes for memcg's uncharge soft limit path.

Problems:
  Now, res_counter_charge()/uncharge() handles softlimit information at
  charge/uncharge and softlimit-check is done when event counter per memcg
  goes over limit. Now, event counter per memcg is updated only when
  memory usage is over soft limit. Here, considering hierarchical memcg
  management, ancesotors should be taken care of.

  Now, ancerstors(hierarchy) are handled in charge() but not in uncharge().
  This is not good.

  Prolems:
  1. memcg's event counter incremented only when softlimit hits. That's bad.
     It makes event counter hard to be reused for other purpose.

  2. At uncharge, only the lowest level rescounter is handled. This is bug.
     Because ancesotor's event counter is not incremented, children should
     take care of them.

  3. res_counter_uncharge()'s 3rd argument is NULL in most case.
     ops under res_counter->lock should be small. No "if" sentense is better.

Fixes:
  * Removed soft_limit_xx poitner and checks in charge and uncharge.
    Do-check-only-when-necessary scheme works enough well without them.

  * make event-counter of memcg incremented at every charge/uncharge.
    (per-cpu area will be accessed soon anyway)

  * All ancestors are checked at soft-limit-check. This is necessary because
    ancesotor's event counter may never be modified. Then, they should be
    checked at the same time.

Reviewed-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Paul Menage <menage@google.com>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Cc: Balbir Singh <balbir@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agocgroup: catch bad css refcnt at css_put
KAMEZAWA Hiroyuki [Thu, 1 Oct 2009 22:44:09 +0000 (15:44 -0700)]
cgroup: catch bad css refcnt at css_put

__css_put() doesn't check a bug as refcnt goes to minus.
I think it should be caught. This patch adds a check for it.

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Paul Menage <menage@google.com>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Cc: Balbir Singh <balbir@in.ibm.com>
Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agomemcg: fix refcnt going negative
KAMEZAWA Hiroyuki [Thu, 1 Oct 2009 22:44:08 +0000 (15:44 -0700)]
memcg: fix refcnt going negative

__mem_cgroup_largest_soft_limit_node() returns a mem_cgroup_per_zone "mz"
with incremnted mz->mem->css's refcnt.  Then, the caller of this function
has to call css_put(mz->mem->css).

But, mz can be !NULL even if "not found" i.e.  without css_get().  By
this, css->refcnt will go down to minus.

This may cause various things...one of results will be
initite-loop in css_tryget()  as this.

INFO: RCU detected CPU 0 stall (t=10000 jiffies)
sending NMI to all CPUs:
NMI backtrace for cpu 0
CPU 0:
<snip>

 <<EOE>>  <IRQ>  [<ffffffff810884bd>] trace_hardirqs_off+0xd/0x10
  [<ffffffff8102a940>] flat_send_IPI_mask+0x90/0xb0
  [<ffffffff8102a9c9>] flat_send_IPI_all+0x69/0x70
  [<ffffffff81027372>] arch_trigger_all_cpu_backtrace+0x62/0xa0
  [<ffffffff810bff8e>] __rcu_pending+0x7e/0x370
  [<ffffffff810c02c7>] rcu_check_callbacks+0x47/0x130
  [<ffffffff81063a26>] update_process_times+0x46/0x70
  [<ffffffff81085930>] tick_sched_timer+0x60/0x160
  [<ffffffff810858d0>] ? tick_sched_timer+0x0/0x160
  [<ffffffff8107a03a>] __run_hrtimer+0xba/0x150
  [<ffffffff8107a325>] hrtimer_interrupt+0xd5/0x1b0
  [<ffffffff81426dfe>] ? trace_hardirqs_off_thunk+0x3a/0x3c
  [<ffffffff8142cacd>] smp_apic_timer_interrupt+0x6d/0x9b
  [<ffffffff8100cb33>] apic_timer_interrupt+0x13/0x20
  <EOI>  [<ffffffff811317b6>] ? mem_cgroup_walk_tree+0x156/0x180
  [<ffffffff811316d3>] ? mem_cgroup_walk_tree+0x73/0x180
  [<ffffffff81131692>] ? mem_cgroup_walk_tree+0x32/0x180
  [<ffffffff81131a00>] ? mem_cgroup_get_local_stat+0x0/0x110
  [<ffffffff81131d5b>] ? mem_control_stat_show+0x14b/0x330
  [<ffffffff810a57fd>] ? cgroup_seqfile_show+0x3d/0x60

Above shows CPU0 caught in css_tryget()'s inifinite loop because
of bad refcnt.

This is a fix to set mz=NULL at the top of retry path.

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: Paul Menage <menage@google.com>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Cc: Balbir Singh <balbir@in.ibm.com>
Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agouartlite: allow building for timberdale MFD
Richard Röjfors [Thu, 1 Oct 2009 22:44:07 +0000 (15:44 -0700)]
uartlite: allow building for timberdale MFD

Some configurations of the Timberdale FPGA has the uartlite
included.

Signed-off-by: Richard Röjfors <richard.rojfors@mocean-labs.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agodocs: update patch size in SubmittingPatches
Randy Dunlap [Thu, 1 Oct 2009 22:44:06 +0000 (15:44 -0700)]
docs: update patch size in SubmittingPatches

This patch size comment is like so last millenium.  Update it to modern
times.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agosdio: pass whitelisted cis funce tuples to sdio drivers
Albert Herranz [Thu, 1 Oct 2009 22:44:05 +0000 (15:44 -0700)]
sdio: pass whitelisted cis funce tuples to sdio drivers

Some manufacturers provide vendor information in non-vendor specific CIS
tuples.  For example, Broadcom uses an Extended Function tuple to provide
the MAC address on some of their network cards, as in the case of the
Nintendo Wii WLAN daughter card.

This patch allows passing whitelisted FUNCE tuples unknown to the SDIO
core to a matching SDIO driver instead of rejecting them and failing.

Signed-off-by: Albert Herranz <albert_herranz@yahoo.es>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agomm/rmap.c: fix comment
Huang Shijie [Thu, 1 Oct 2009 22:44:04 +0000 (15:44 -0700)]
mm/rmap.c: fix comment

The page_address_in_vma() is not only used in unuse_vma().

Signed-off-by: Huang Shijie <shijie8@gmail.com>
Acked-by: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agox86: fix csum_ipv6_magic asm memory clobber
Samuel Thibault [Thu, 1 Oct 2009 22:44:02 +0000 (15:44 -0700)]
x86: fix csum_ipv6_magic asm memory clobber

Just like ip_fast_csum, the assembly snippet in csum_ipv6_magic needs a
memory clobber, as it is only passed the address of the buffer, not a
memory reference to the buffer itself.

This caused failures in Hurd's pfinetv4 when we tried to compile it with
gcc-4.3 (bogus checksums).

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Acked-by: "David S. Miller" <davem@davemloft.net>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agomn10300: fix kernel build failures when using gcc-4.x
Mark Salter [Thu, 1 Oct 2009 22:44:01 +0000 (15:44 -0700)]
mn10300: fix kernel build failures when using gcc-4.x

Fix some build failures when using gcc-4.x for MN10300.

Firstly, __get_user() fails to build because the pointer points to a const and
__gu_val ends up being read-only:

In file included from include/linux/mempolicy.h:62,
                 from init/main.c:50:
include/linux/pagemap.h: In function 'fault_in_pages_readable':
include/linux/pagemap.h:394: error: read-only variable '__gu_val' used as 'asm' output
include/linux/pagemap.h:394: error: read-only variable '__gu_val' used as 'asm' output
include/linux/pagemap.h:394: error: read-only variable '__gu_val' used as 'asm' output
include/linux/pagemap.h:400: error: read-only variable '__gu_val' used as 'asm' output
include/linux/pagemap.h:400: error: read-only variable '__gu_val' used as 'asm' output
include/linux/pagemap.h:400: error: read-only variable '__gu_val' used as 'asm' output
make[1]: *** [init/main.o] Error 1

Secondly, gcc-4 doesn't allow casts of lvalues:

  UPD     include/linux/compile.h
arch/mn10300/kernel/rtc.c: In function 'calibrate_clock':
arch/mn10300/kernel/rtc.c:170: error: lvalue required as left operand of assignment
arch/mn10300/kernel/rtc.c:172: error: lvalue required as left operand of assignment
make[1]: *** [arch/mn10300/kernel/rtc.o] Error 1

These are seen with gcc 4.2.1.

Signed-off-by: Mark Salter <msalter@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMAINTAINERS: ARM/Palm file patterns
Joe Perches [Thu, 1 Oct 2009 22:43:59 +0000 (15:43 -0700)]
MAINTAINERS: ARM/Palm file patterns

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Tomas Cech <sleep_walker@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoChar: vt_ioctl, fix BKL imbalance
Jiri Slaby [Thu, 1 Oct 2009 22:43:59 +0000 (15:43 -0700)]
Char: vt_ioctl, fix BKL imbalance

Stanse found (again) a BKL imbalance in vt_ioctl.

It's easily triggerable by ioctl(dev_tty_fd, VT_SETACTIVATE, NULL);

Introduced by

commit d3b5cffcf84a8bdc7073dce4745d67c72629af85                                 Author: Alan Cox <alan@linux.intel.com>
Date:   Sat Sep 19 13:13:26 2009 -0700

    vt: add an activate and lock

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agorevert "m68k: convert to asm-generic/hardirq.h"
Andrew Morton [Thu, 1 Oct 2009 22:43:57 +0000 (15:43 -0700)]
revert "m68k: convert to asm-generic/hardirq.h"

Revert 45d80eea87c9f8292d2d33173d6866c0ec57238a ("m68k: convert to
asm-generic/hardirq.h") - it fails to compile due to an inclusion tangle:

In file included from include/linux/irq.h:12,
                 from include/asm-generic/hardirq.h:6,
                 from /usr/src/devel/arch/m68k/include/asm/hardirq_mm.h:6,
                 from /usr/src/devel/arch/m68k/include/asm/hardirq.h:4,
                 from include/linux/hardirq.h:10,
                 from /usr/src/devel/arch/m68k/include/asm/system_mm.h:69,
                 from /usr/src/devel/arch/m68k/include/asm/system.h:4,
                 from include/linux/list.h:7,
                 from include/linux/preempt.h:11,
                 from include/linux/spinlock.h:50,
                 from include/linux/seqlock.h:29,
                 from include/linux/time.h:8,
                 from include/linux/timex.h:56,
                 from include/linux/sched.h:56,
                 from arch/m68k/kernel/asm-offsets.c:14:
include/linux/smp.h:17: error: field 'list' has incomplete type

Cc: Christoph Hellwig <hch@lst.de>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoasm-generic/gpio.h: pull in linux/kernel.h for might_sleep()
Mike Frysinger [Thu, 1 Oct 2009 22:43:56 +0000 (15:43 -0700)]
asm-generic/gpio.h: pull in linux/kernel.h for might_sleep()

The asm-generic/gpio.h header uses the might_sleep() macro but doesn't
include the header for it, so any source code that might include
linux/gpio.h before linux/kernel.h can easily lead to a build failure.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoconst: constify remaining file_operations
Alexey Dobriyan [Thu, 1 Oct 2009 22:43:56 +0000 (15:43 -0700)]
const: constify remaining file_operations

[akpm@linux-foundation.org: fix KVM]
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agodrivers/input/input.c: fix CONFIG_PM=n warning
Andrew Morton [Thu, 1 Oct 2009 22:43:55 +0000 (15:43 -0700)]
drivers/input/input.c: fix CONFIG_PM=n warning

drivers/input/input.c:1277: warning: 'input_dev_reset' defined but not used

Acked-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agomodule: fix up CONFIG_KALLSYMS=n build.
Paul Mundt [Thu, 1 Oct 2009 22:43:54 +0000 (15:43 -0700)]
module: fix up CONFIG_KALLSYMS=n build.

Starting from commit 4a4962263f07d14660849ec134ee42b63e95ea9a "reduce
symbol table for loaded modules (v2)", the kernel/module.c build is broken
with CONFIG_KALLSYMS disabled.

  CC      kernel/module.o
kernel/module.c:1995: warning: type defaults to 'int' in declaration of 'Elf_Hdr'
kernel/module.c:1995: error: expected ';', ',' or ')' before '*' token
kernel/module.c: In function 'load_module':
kernel/module.c:2203: error: 'strmap' undeclared (first use in this function)
kernel/module.c:2203: error: (Each undeclared identifier is reported only once
kernel/module.c:2203: error: for each function it appears in.)
kernel/module.c:2239: error: 'symoffs' undeclared (first use in this function)
kernel/module.c:2239: error: implicit declaration of function 'layout_symtab'
kernel/module.c:2240: error: 'stroffs' undeclared (first use in this function)
make[1]: *** [kernel/module.o] Error 1
make: *** [kernel/module.o] Error 2

There are three different issues:

    - layout_symtab() takes a const Elf_Ehdr

    - layout_symtab() needs to return a value

    - symoffs/stroffs/strmap are referenced by the load_module() code
      despite being ifdefed out, which seems unnecessary given the noop
      behaviour of layout_symtab()/add_kallsyms() in the case of
      CONFIG_KALLSYMS=n.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Acked-by: Jan Beulich <jbeulich@novell.com>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agonet: Use sk_mark for routing lookup in more places
Atis Elsts [Thu, 1 Oct 2009 22:16:49 +0000 (15:16 -0700)]
net: Use sk_mark for routing lookup in more places

This patch against v2.6.31 adds support for route lookup using sk_mark in some
more places. The benefits from this patch are the following.
First, SO_MARK option now has effect on UDP sockets too.
Second, ip_queue_xmit() and inet_sk_rebuild_header() could fail to do routing
lookup correctly if TCP sockets with SO_MARK were used.

Signed-off-by: Atis Elsts <atis@mikrotik.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
14 years agosky2: irqname based on pci address
Stephen Hemminger [Thu, 1 Oct 2009 07:11:46 +0000 (07:11 +0000)]
sky2: irqname based on pci address

This is based on Michal Schmidt fix for skge.

Most network drivers request their IRQ when the interface is activated.
sky2 does it in ->probe() instead, because it can work with two-port
cards where the two net_devices use the same IRQ. This works fine most
of the time, except in some situations when the interface gets renamed.
Consider this example:

1. modprobe sky2
   The card is detected as eth0 and requests IRQ 17. Directory
   /proc/irq/17/eth0 is created.
2. There is an udev rule which says this interface should be called
   eth1, so udev renames eth0 -> eth1.
3. modprobe 8139too
   The Realtek card is detected as eth0. It will be using IRQ 17 too.
4. ip link set eth0 up
   Now 8139too requests IRQ 17.

The result is:
WARNING: at fs/proc/generic.c:590 proc_register ...
proc_dir_entry '17/eth0' already registered

The fix is for sky2 to name the irq based on the pci device, as is done
by some other devices DRM, infiniband, ...  ie. sky2@pci:0000:00:00

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Reviewed-by: Michal Schmidt <mschmidt@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoskge: use unique IRQ name
Michal Schmidt [Thu, 1 Oct 2009 08:13:23 +0000 (08:13 +0000)]
skge: use unique IRQ name

Most network drivers request their IRQ when the interface is activated.
skge does it in ->probe() instead, because it can work with two-port
cards where the two net_devices use the same IRQ. This works fine most
of the time, except in some situations when the interface gets renamed.
Consider this example:

1. modprobe skge
   The card is detected as eth0 and requests IRQ 17. Directory
   /proc/irq/17/eth0 is created.
2. There is an udev rule which says this interface should be called
   eth1, so udev renames eth0 -> eth1.
3. modprobe 8139too
   The Realtek card is detected as eth0. It will be using IRQ 17 too.
4. ip link set eth0 up
   Now 8139too requests IRQ 17.

The result is:
WARNING: at fs/proc/generic.c:590 proc_register ...
proc_dir_entry '17/eth0' already registered
...
And "ls /proc/irq/17" shows two subdirectories, both called eth0.

Fix it by using a unique name for skge's IRQ, based on the PCI address.
The naming from the example then looks like this:
$ grep skge /proc/interrupts
 17:        169   IO-APIC-fasteoi   skge@pci:0000:00:0a.0, eth0

irqbalance daemon will have to be taught to recognize "skge@" as an
Ethernet interrupt. This will be a one-liner addition in classify.c. I
will send a patch to irqbalance if this change is accepted.

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoIPv4 TCP fails to send window scale option when window scale is zero
Ori Finkelman [Thu, 1 Oct 2009 06:41:59 +0000 (06:41 +0000)]
IPv4 TCP fails to send window scale option when window scale is zero

Acknowledge TCP window scale support by inserting the proper option in SYN/ACK
and SYN headers even if our window scale is zero.

This fixes the following observed behavior:

1. Client sends a SYN with TCP window scaling option and non zero window scale
value to a Linux box.
2. Linux box notes large receive window from client.
3. Linux decides on a zero value of window scale for its part.
4. Due to compare against requested window scale size option, Linux does not to
 send windows scale TCP option header on SYN/ACK at all.

With the following result:

Client box thinks TCP window scaling is not supported, since SYN/ACK had no
TCP window scale option, while Linux thinks that TCP window scaling is
supported (and scale might be non zero), since SYN had  TCP window scale
option and we have a mismatched idea between the client and server
regarding window sizes.

Probably it also fixes up the following bug (not observed in practice):

1. Linux box opens TCP connection to some server.
2. Linux decides on zero value of window scale.
3. Due to compare against computed window scale size option, Linux does
not to set windows scale TCP  option header on SYN.

With the expected result that the server OS does not use window scale option
due to not receiving such an option in the SYN headers, leading to suboptimal
performance.

Signed-off-by: Gilad Ben-Yossef <gilad@codefidence.com>
Signed-off-by: Ori Finkelman <ori@comsleep.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/ipv4/tcp.c: fix min() type mismatch warning
Andrew Morton [Thu, 1 Oct 2009 22:02:20 +0000 (15:02 -0700)]
net/ipv4/tcp.c: fix min() type mismatch warning

net/ipv4/tcp.c: In function 'do_tcp_setsockopt':
net/ipv4/tcp.c:2050: warning: comparison of distinct pointer types lacks a cast

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoKconfig: STRIP: Remove stale bits of STRIP help text
Ralf Baechle [Thu, 1 Oct 2009 21:49:14 +0000 (14:49 -0700)]
Kconfig: STRIP: Remove stale bits of STRIP help text

Remove references to dead web site mosquitonet.Stanford.EDU.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoNET: mkiss: Fix typo
Ralf Baechle [Thu, 1 Oct 2009 21:48:25 +0000 (14:48 -0700)]
NET: mkiss: Fix typo

This typo was introduced by 5793f4be23f0171b4999ca68a39a9157b44139f3 on
October 14, 2005 ...

Reported-by: Matti Aarnio <matti.aarnio@zmailer.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotg3: Remove prev_vlan_tag from struct tx_ring_info
Eric Dumazet [Thu, 1 Oct 2009 21:37:34 +0000 (14:37 -0700)]
tg3: Remove prev_vlan_tag from struct tx_ring_info

prev_vlan_tag field is not used.

Patch saves 512*8 bytes per tx queue ring on 64bit arches.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Matthew Carlson <mcarlson@broadcom.com>
14 years agomove virtnet_remove to .devexit.text
Uwe Kleine-König [Wed, 30 Sep 2009 22:28:34 +0000 (22:28 +0000)]
move virtnet_remove to .devexit.text

The function virtnet_remove is used only wrapped by __devexit_p so define
it using __devexit.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Cc: David S. Miller <davem@davemloft.net>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Alex Williamson <alex.williamson@hp.com>
Cc: Mark McLoughlin <markmc@redhat.com>
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodon't use __devexit_p to wrap sgiseeq_remove
Uwe Kleine-König [Wed, 30 Sep 2009 22:28:26 +0000 (22:28 +0000)]
don't use __devexit_p to wrap sgiseeq_remove

The function sgiseeq_remove is defined using __exit, so don't use
__devexit_p but __exit_p to wrap it.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: David S. Miller <davem@davemloft.net>
Cc: Wang Chen <wangchen@cn.fujitsu.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Patrick McHardy <kaber@trash.net>
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodon't use __devexit_p to wrap meth_remove
Uwe Kleine-König [Wed, 30 Sep 2009 22:28:17 +0000 (22:28 +0000)]
don't use __devexit_p to wrap meth_remove

The function meth_remove is defined using __exit, so don't use __devexit_p
but __exit_p to wrap it.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: David S. Miller <davem@davemloft.net>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Patrick McHardy <kaber@trash.net>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobonding: set primary param via sysfs
Jiri Pirko [Fri, 18 Sep 2009 02:13:22 +0000 (02:13 +0000)]
bonding: set primary param via sysfs

Primary module parameter passed to bonding is pernament. That means if you
release the primary slave and enslave it again, it becomes the primary slave
again. But if you set primary slave via sysfs, the primary slave is only set
once and it's not remembered in bond->params structure. Therefore the setting is
lost after releasing the primary slave. This simple one-liner fixes this.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs...
Chris Mason [Thu, 1 Oct 2009 21:24:44 +0000 (17:24 -0400)]
Merge branch 'master' of git://git./linux/kernel/git/mason/btrfs-unstable into for-linus

14 years agoBtrfs: fix data space leak fix
Josef Bacik [Thu, 1 Oct 2009 21:10:23 +0000 (17:10 -0400)]
Btrfs: fix data space leak fix

There is a problem where page_mkwrite can be called on a dirtied page that
already has a delalloc range associated with it.  The fix is to clear any
delalloc bits for the range we are dirtying so the space accounting gets
handled properly.  This is the same thing we do in the normal write case, so we
are consistent across the board.  With this patch we no longer leak reserved
space.

Signed-off-by: Josef Bacik <jbacik@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Thu, 1 Oct 2009 19:43:07 +0000 (12:43 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6

14 years agoAdd a tracepoint for block request remapping
Jun'ichi Nomura [Thu, 1 Oct 2009 19:16:13 +0000 (21:16 +0200)]
Add a tracepoint for block request remapping

Since 2.6.31 now has request-based device-mapper, it's useful to have
a tracepoint for request-remapping as well as bio-remapping.
This patch adds a tracepoint for request-remapping, trace_block_rq_remap().

Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Cc: Alasdair G Kergon <agk@redhat.com>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agoblock: allow large discard requests
Christoph Hellwig [Wed, 30 Sep 2009 11:54:20 +0000 (13:54 +0200)]
block: allow large discard requests

Currently we set the bio size to the byte equivalent of the blocks to
be trimmed when submitting the initial DISCARD ioctl.  That means it
is subject to the max_hw_sectors limitation of the HBA which is
much lower than the size of a DISCARD request we can support.
Add a separate max_discard_sectors tunable to limit the size for discard
requests.

We limit the max discard request size in bytes to 32bit as that is the
limit for bio->bi_size.  This could be much larger if we had a way to pass
that information through the block layer.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agoblock: use normal I/O path for discard requests
Christoph Hellwig [Wed, 30 Sep 2009 11:52:12 +0000 (13:52 +0200)]
block: use normal I/O path for discard requests

prepare_discard_fn() was being called in a place where memory allocation
was effectively impossible.  This makes it inappropriate for all but
the most trivial translations of Linux's DISCARD operation to the block
command set.  Additionally adding a payload there makes the ownership
of the bio backing unclear as it's now allocated by the device driver
and not the submitter as usual.

It is replaced with QUEUE_FLAG_DISCARD which is used to indicate whether
the queue supports discard operations or not.  blkdev_issue_discard now
allocates a one-page, sector-length payload which is the right thing
for the common ATA and SCSI implementations.

The mtd implementation of prepare_discard_fn() is replaced with simply
checking for the request being a discard.

Largely based on a previous patch from Matthew Wilcox <matthew@wil.cx>
which did the prepare_discard_fn but not the different payload allocation
yet.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agoswapfile: avoid NULL pointer dereference in swapon when s_bdev is NULL
Suresh Jayaraman [Wed, 30 Sep 2009 08:53:48 +0000 (10:53 +0200)]
swapfile: avoid NULL pointer dereference in swapon when s_bdev is NULL

While testing Swap over NFS patchset, I noticed an oops that was triggered
during swapon. Investigating further, the NULL pointer deference is due to the
SSD device check/optimization in the swapon code that assumes s_bdev could never
be NULL.

inode->i_sb->s_bdev could be NULL in a few cases. For e.g. one such case is
loopback NFS mount, there could be others as well. Fix this by ensuring s_bdev
is not NULL before we try to deference s_bdev.

Signed-off-by: Suresh Jayaraman <sjayaraman@suse.de>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agofs/bio.c: move EXPORT* macros to line after function
H Hartley Sweeten [Sat, 26 Sep 2009 14:19:21 +0000 (16:19 +0200)]
fs/bio.c: move EXPORT* macros to line after function

As mentioned in Documentation/CodingStyle, move EXPORT* macro's
to the line immediately after the closing function brace line.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agoAdd missing blk_trace_remove_sysfs to be in pair with blk_trace_init_sysfs
Zdenek Kabelac [Fri, 25 Sep 2009 04:19:26 +0000 (06:19 +0200)]
Add missing blk_trace_remove_sysfs to be in pair with blk_trace_init_sysfs

Add missing blk_trace_remove_sysfs to be in pair with blk_trace_init_sysfs
introduced in commit 1d54ad6da9192fed5dd3b60224d9f2dfea0dcd82.
Release kobject also in case the request_fn is NULL.

Problem was noticed via kmemleak backtrace when some sysfs entries were
note properly destroyed during  device removal:

unreferenced object 0xffff88001aa76640 (size 80):
  comm "lvcreate", pid 2120, jiffies 4294885144
  hex dump (first 32 bytes):
    01 00 00 00 00 00 00 00 f0 65 a7 1a 00 88 ff ff  .........e......
    90 66 a7 1a 00 88 ff ff 86 1d 53 81 ff ff ff ff  .f........S.....
  backtrace:
    [<ffffffff813f9cc6>] kmemleak_alloc+0x26/0x60
    [<ffffffff8111d693>] kmem_cache_alloc+0x133/0x1c0
    [<ffffffff81195891>] sysfs_new_dirent+0x41/0x120
    [<ffffffff81194b0c>] sysfs_add_file_mode+0x3c/0xb0
    [<ffffffff81197c81>] internal_create_group+0xc1/0x1a0
    [<ffffffff81197d93>] sysfs_create_group+0x13/0x20
    [<ffffffff810d8004>] blk_trace_init_sysfs+0x14/0x20
    [<ffffffff8123f45c>] blk_register_queue+0x3c/0xf0
    [<ffffffff812447e4>] add_disk+0x94/0x160
    [<ffffffffa00d8b08>] dm_create+0x598/0x6e0 [dm_mod]
    [<ffffffffa00de951>] dev_create+0x51/0x350 [dm_mod]
    [<ffffffffa00de823>] ctl_ioctl+0x1a3/0x240 [dm_mod]
    [<ffffffffa00de8f2>] dm_compat_ctl_ioctl+0x12/0x20 [dm_mod]
    [<ffffffff81177bfd>] compat_sys_ioctl+0xcd/0x4f0
    [<ffffffff81036ed8>] sysenter_dispatch+0x7/0x2c
    [<ffffffffffffffff>] 0xffffffffffffffff

Signed-off-by: Zdenek Kabelac <zkabelac@redhat.com>
Reviewed-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agocciss: fix build when !PROC_FS
Alexander Beregalov [Thu, 24 Sep 2009 14:15:38 +0000 (16:15 +0200)]
cciss: fix build when !PROC_FS

Fix these build errors when CONFIG_PROC_FS is not set:
drivers/block/cciss.c: In function 'cciss_show_raid_level':
drivers/block/cciss.c:623: error: 'RAID_UNKNOWN' undeclared (first use in this function)
drivers/block/cciss.c:626: error: 'raid_label' undeclared (first use in this function)
drivers/block/cciss.c: In function 'cciss_geometry_inquiry':
drivers/block/cciss.c:2696: error: 'RAID_UNKNOWN' undeclared (first use in this function)

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agoblock: Do not clamp max_hw_sectors for stacking devices
Martin K. Petersen [Mon, 21 Sep 2009 19:46:05 +0000 (21:46 +0200)]
block: Do not clamp max_hw_sectors for stacking devices

Stacking devices do not have an inherent max_hw_sector limit.  Set the
default to INT_MAX so we are bounded only by capabilities of the
underlying storage.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agoblock: Set max_sectors correctly for stacking devices
Martin K. Petersen [Fri, 18 Sep 2009 20:54:37 +0000 (22:54 +0200)]
block: Set max_sectors correctly for stacking devices

The topology changes unintentionally caused SAFE_MAX_SECTORS to be set
for stacking devices.  Set the default limit to BLK_DEF_MAX_SECTORS and
provide SAFE_MAX_SECTORS in blk_queue_make_request() for legacy hw
drivers that depend on the old behavior.

Acked-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agocciss: cciss_host_attr_groups should be const
Jens Axboe [Fri, 18 Sep 2009 20:24:21 +0000 (22:24 +0200)]
cciss: cciss_host_attr_groups should be const

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agocciss: Dynamically allocate the drive_info_struct for each logical drive.
Stephen M. Cameron [Thu, 17 Sep 2009 18:48:31 +0000 (13:48 -0500)]
cciss: Dynamically allocate the drive_info_struct for each logical drive.

cciss: Dynamically allocate the drive_info_struct for each logical drive.
This reduces the size of the per-hba ctlr_info structure from 106936
bytes to 8132 bytes.  That's on 32-bit systems.  On 64-bit systems, the
improvement is even bigger.  Without this, the ctlr_info struct is so big
that the driver won't even load on a 64 bit system if CISS_MAX_LUN was
at it's current setting of 1024 logical drives.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agocciss: Add usage_count attribute to each logical drive in /sys
Stephen M. Cameron [Thu, 17 Sep 2009 18:48:26 +0000 (13:48 -0500)]
cciss: Add usage_count attribute to each logical drive in /sys

Add usage_count attribute to each logical drive at
/sys/devices/<dev>/ccissX/cXdY/usage_count for controller X,
logical drive Y.  The usage count is the number of times
the device has currently been opened.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agocciss: Add a "raid_level" attribute to each logical drive in /sys
Stephen M. Cameron [Thu, 17 Sep 2009 18:48:21 +0000 (13:48 -0500)]
cciss: Add a "raid_level" attribute to each logical drive in /sys

and change get rid of some magic numbers in raid lavel decoding.

Add raid_level attribute to each logical drive at
/sys/devices/<dev>/ccissX/cXdY/raid_level for controller X,
logical drive Y

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agocciss: fix some magic numbers in the raid-level decoding
Stephen M. Cameron [Thu, 17 Sep 2009 18:48:15 +0000 (13:48 -0500)]
cciss: fix some magic numbers in the raid-level decoding

cciss: fix some magic numbers in the raid-level decoding

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agocciss: Add lunid attribute to each logical drive in /sys
Stephen M. Cameron [Thu, 17 Sep 2009 18:48:10 +0000 (13:48 -0500)]
cciss: Add lunid attribute to each logical drive in /sys

Add lunid attribute to each logical drive at
/sys/devices/<dev>/ccissX/cXdY/lunid for controller X,
logical drive Y

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agocciss: Don't check h->busy_initializing in cciss_open().
Stephen M. Cameron [Thu, 17 Sep 2009 18:48:05 +0000 (13:48 -0500)]
cciss: Don't check h->busy_initializing in cciss_open().

Don't check h->busy_initializing in cciss_open().  Open won't be
called before things are ready, but h->busy_initializing won't be
unset until after the initial rebuild_lun_table is finished.  But,
to read the partitions, cciss_open will be called for each logical
drive during rebuild_lun_table.  If cciss_open checks h->busy_initializing,
then the reading of the partition information during the initial
rebuild_lun_table will fail, which is especially bad news if it
happens to be your boot device.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agocciss: Preserve all 8 bytes of LUN ID for logical drives.
Stephen M. Cameron [Thu, 17 Sep 2009 18:48:00 +0000 (13:48 -0500)]
cciss: Preserve all 8 bytes of LUN ID for logical drives.

Preserve all 8 bytes of the LunID field returned
by CCISS_REPORT_LOGICAL instead of only saving 4 bytes.
This fixes a bug with logical volume addressing encountered on
an MSA2012.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agocciss: Silence noisy per-disk messages output by cciss_read_capacity
Stephen M. Cameron [Thu, 17 Sep 2009 18:47:55 +0000 (13:47 -0500)]
cciss: Silence noisy per-disk messages output by cciss_read_capacity

Silence noisy per-disk messages output by cciss_read_capacity

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agocciss: Fix excessive gendisk freeing bug on driver unload.
Stephen M. Cameron [Thu, 17 Sep 2009 18:47:50 +0000 (13:47 -0500)]
cciss: Fix excessive gendisk freeing bug on driver unload.

Fix bug that free_hba was calling put_disk for all gendisk[]
pointers -- all 1024 of them -- regardless of whether the were
used or not (NULL).  This bug could cause rmmod to oops if logical
drives had been deleted during the driver's lifetime.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agocciss: Fix usage_count check in rebuild_lun_table when triggered via sysfs.
Stephen M. Cameron [Thu, 17 Sep 2009 18:47:44 +0000 (13:47 -0500)]
cciss: Fix usage_count check in rebuild_lun_table when triggered via sysfs.

When rebuild_lun_table is reached via sysfs, the usage count that
is checked prior to messing with c0d0 has different constraints
(must be zero) than if rebuild_lun_table is reached via ioctl
(must be one.)  Fix rebuild_lun_table to take that into account.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agocciss: Clear all sysfs-exposed data for deleted logical drives.
Stephen M. Cameron [Thu, 17 Sep 2009 18:47:39 +0000 (13:47 -0500)]
cciss: Clear all sysfs-exposed data for deleted logical drives.

When removing a logical drive, clear all the information that is
now exposed by sysfs (e.g. vendor, model, serial number.)

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agocciss: Handle special case for sysfs attributes of the first logical drive.
Stephen M. Cameron [Thu, 17 Sep 2009 18:47:34 +0000 (13:47 -0500)]
cciss: Handle special case for sysfs attributes of the first logical drive.

For c0dx where x is not 0, we handle deletion and addition simply,
but for c0d0, there is the special case that even when there's no
disk, the device node exists so that the controller may be accessed.
So, for c0d0, we only create the sysfs entries once, when a controller
is added, and only remove them once, when a controller is being
taken down.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agocciss: Handle cases when cciss_add_disk fails.
Stephen M. Cameron [Thu, 17 Sep 2009 18:47:29 +0000 (13:47 -0500)]
cciss: Handle cases when cciss_add_disk fails.

Handle cases when cciss_add_disk fails.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agocciss: Handle failure of blk_init_queue gracefully in cciss_add_disk.
Stephen M. Cameron [Thu, 17 Sep 2009 18:47:24 +0000 (13:47 -0500)]
cciss: Handle failure of blk_init_queue gracefully in cciss_add_disk.

Handle failure of blk_init_queue gracefully in cciss_add_disk.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agocciss: Rearrange logical drive sysfs code to make the "changing a disk" path work.
Stephen M. Cameron [Thu, 17 Sep 2009 18:47:19 +0000 (13:47 -0500)]
cciss: Rearrange logical drive sysfs code to make the "changing a disk" path work.

Rearrange logical drive sysfs code to make the "changing a disk" path work.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agocciss: Dynamically allocate struct device for each logical drive as needed.
Stephen M. Cameron [Thu, 17 Sep 2009 18:47:14 +0000 (13:47 -0500)]
cciss: Dynamically allocate struct device for each logical drive as needed.

Dynamically allocate struct device for each logical drive as needed
instead of allocating the maximum we would ever need at driver init time.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agocciss: Remove some unused code in rebuild_lun_table()
Stephen M. Cameron [Thu, 17 Sep 2009 18:47:08 +0000 (13:47 -0500)]
cciss: Remove some unused code in rebuild_lun_table()

Remove some unused code in rebuild_lun_table()

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agocciss: Allow triggering of rescan of logical drive topology via sysfs entry
Andrew Patterson [Thu, 17 Sep 2009 18:47:03 +0000 (13:47 -0500)]
cciss: Allow triggering of rescan of logical drive topology via sysfs entry

Added /sys/bus/pci/devices/<dev>/ccissX/rescan sysfs entry used
to kick off a rescan that discovers logical drive topology changes.

Signed-off-by: Andrew Patterson <andrew.patterson@hp.com>
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Acked-by: Mike Miller <mike.miller@hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agocciss: Use one scan thread per controller and fix hang during rmmod
Andrew Patterson [Thu, 17 Sep 2009 18:46:58 +0000 (13:46 -0500)]
cciss: Use one scan thread per controller and fix hang during rmmod

Replace the use of one scan kthread per controller with one per driver.
Use a queue to hold a list of controllers that need to be rescanned with
routines to add and remove controllers from the queue.

Fix locking and completion handling to prevent a hang during rmmod.

Signed-off-by: Andrew Patterson <andrew.patterson@hp.com>
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Acked-by: Mike Miller <mike.miller@hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agocciss: Remove sysfs entries for logical drives on driver cleanup.
Andrew Patterson [Thu, 17 Sep 2009 18:46:53 +0000 (13:46 -0500)]
cciss: Remove sysfs entries for logical drives on driver cleanup.

Sysfs entries for logical drives need to be removed when a drive is
deleted during driver cleanup.

Signed-off-by: Andrew Patterson <andrew.patterson@hp.com>
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Acked-by: Mike Miller <mike.miller@hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agocciss: fix schedule_timeout() parameters
Randy Dunlap [Fri, 18 Sep 2009 19:58:48 +0000 (12:58 -0700)]
cciss: fix schedule_timeout() parameters

Change schedule_timeout() parameter to not be specific to HZ=1000.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Mike Miller <mike.miller@hp.com>
Cc: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: "Cameron, Steve" <Steve.Cameron@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agodac960: switch to seq_file
Alexey Dobriyan [Fri, 18 Sep 2009 19:58:48 +0000 (12:58 -0700)]
dac960: switch to seq_file

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Yang Hongyang <yanghy@cn.fujitsu.com>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agocpqarray: switch to seq_file
Alexey Dobriyan [Fri, 18 Sep 2009 19:58:47 +0000 (12:58 -0700)]
cpqarray: switch to seq_file

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Chirag Kantharia <chirag.kantharia@hp.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agoBtrfs: remove duplicates of filemap_ helpers
Christoph Hellwig [Thu, 1 Oct 2009 16:58:30 +0000 (12:58 -0400)]
Btrfs: remove duplicates of filemap_ helpers

Use filemap_fdatawrite_range and filemap_fdatawait_range instead of
local copies of the functions.  For filemap_fdatawait_range that
also means replacing the awkward old wait_on_page_writeback_range
calling convention with the regular filemap byte offsets.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs...
Chris Mason [Thu, 1 Oct 2009 16:58:13 +0000 (12:58 -0400)]
Merge branch 'master' of git://git./linux/kernel/git/mason/btrfs-unstable into for-linus

14 years agopktgen: Fix delay handling
Eric Dumazet [Thu, 1 Oct 2009 16:29:45 +0000 (09:29 -0700)]
pktgen: Fix delay handling

After last pktgen changes, delay handling is wrong.

pktgen actually sends packets at full line speed.

Fix is to update pkt_dev->next_tx even if spin() returns early,
so that next spin() calls have a chance to see a positive delay.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoBtrfs: take i_mutex before generic_write_checks
Chris Mason [Thu, 1 Oct 2009 16:29:10 +0000 (12:29 -0400)]
Btrfs: take i_mutex before generic_write_checks

btrfs_file_write was incorrectly calling generic_write_checks without
taking i_mutex.  This lead to problems with racing around i_size when
doing O_APPEND writes.

The fix here is to move i_mutex higher.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoARM: 5738/1: Correct TCM documentation
Linus Walleij [Thu, 1 Oct 2009 13:31:22 +0000 (14:31 +0100)]
ARM: 5738/1: Correct TCM documentation

It turns out that the TCM memory can be remap:ed by the MMU just
like any other memory.

Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5734/1: arm: fix compilation of entry-common.S for older CPUs
Dmitry Artamonow [Tue, 29 Sep 2009 05:12:37 +0000 (06:12 +0100)]
ARM: 5734/1: arm: fix compilation of entry-common.S for older CPUs

Commit 181f817eaaca4c1f introduced some new code to entry-common.S
Sadly, this new code uses 'bx' instruction which is available only on
ARMv5 and higher CPUs. This causes following compilation errors when
building kernel for StrongARM (ARMv4):

arch/arm/kernel/entry-common.S: Assembler messages:
arch/arm/kernel/entry-common.S:129: Error: selected processor does not
 support `bx ip'
arch/arm/kernel/entry-common.S:138: Error: selected processor does not
 support `bx ip'

Fix these errors by using 'mov pc' instead of 'bx'.

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5733/1: fix bcmring compile error
Leo Chen [Mon, 28 Sep 2009 20:56:19 +0000 (21:56 +0100)]
ARM: 5733/1: fix bcmring compile error

The movement of the MMCI header file made bcmring break. It turns
out it was including asm/mmc.h without using it so fixing the
problem boils down to removing the offending include.

Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Acked-by: Scott Branden <sbranden@broadcom.com>
Signed-off-by: Leo Hao Chen <leochen@broadcom.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5732/1: remove redundant include file
Leo Chen [Mon, 28 Sep 2009 20:41:46 +0000 (21:41 +0100)]
ARM: 5732/1: remove redundant include file

Remove duplicated #include('s) in arch/arm/mach-bcmring/core.c

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Leo Chen <leochen@broadcom.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5731/2: Fix U300 generic GPIO, remove ifdefs from MMCI v3
Linus Walleij [Mon, 28 Sep 2009 11:36:18 +0000 (12:36 +0100)]
ARM: 5731/2: Fix U300 generic GPIO, remove ifdefs from MMCI v3

The #ifdefs in the MMCI driver were erroneous and just masking
a bug in the U300 generic GPIO implementation. This removes the
ifdefs and fixes the U300 generic GPIO instead.

Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoALSA: hda - Fix digita/analog mic auto-switching with IDT codecs
Takashi Iwai [Thu, 1 Oct 2009 14:38:11 +0000 (16:38 +0200)]
ALSA: hda - Fix digita/analog mic auto-switching with IDT codecs

When the auto-mic switching between an analog and a digital mic is
needed with IDT codecs, the current driver doesn't reset the connection
of the digital mux.

This patch fixes the behavior by checking both mux connections properly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoBtrfs: fix arguments to btrfs_wait_on_page_writeback_range
Christoph Hellwig [Wed, 30 Sep 2009 20:47:08 +0000 (16:47 -0400)]
Btrfs: fix arguments to btrfs_wait_on_page_writeback_range

wait_on_page_writeback_range/btrfs_wait_on_page_writeback_range takes
a pagecache offset, not a byte offset into the file.  Shift the arguments
around to wait for the correct range

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoMerge remote branch 'takashi/fix/asoc' into for-2.6.32
Mark Brown [Thu, 1 Oct 2009 10:33:26 +0000 (11:33 +0100)]
Merge remote branch 'takashi/fix/asoc' into for-2.6.32

14 years agoASoC: fix kconfig order of Blackfin drivers
Barry Song [Thu, 1 Oct 2009 05:33:30 +0000 (01:33 -0400)]
ASoC: fix kconfig order of Blackfin drivers

Some of the Blackfin options don't directly follow the kconfig options
they depend on, so kconfig is unable to display the proper tree.  So sort
the options such they expand/collapse properly.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoALSA: hda - Added quirk to enable sound on Toshiba NB200
Manoj Iyer [Tue, 22 Sep 2009 23:33:29 +0000 (18:33 -0500)]
ALSA: hda - Added quirk to enable sound on Toshiba NB200

Patch was tested on Toshiba NB200 and is found to enable sound.

Signed-off-by: Manoj Iyer <manoj.iyer@canonical.com>
Cc: stable@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoixgbe: correct the parameter description
Jiri Pirko [Thu, 1 Oct 2009 08:10:31 +0000 (01:10 -0700)]
ixgbe: correct the parameter description

ccffad25b5136958d4769ed6de5e87992dd9c65c changed parameters for function
ixgbe_update_uc_addr_list_generic but parameter description was not updated.
This patch corrects it.

Signed-off-by: Jiri Pirko <jpirko@redhat.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>
14 years agoASoC: Fix dependency of CONFIG_SND_PXA2XX_SOC_IMOTE2
Takashi Iwai [Thu, 1 Oct 2009 06:33:47 +0000 (08:33 +0200)]
ASoC: Fix dependency of CONFIG_SND_PXA2XX_SOC_IMOTE2

wm8940 requires I2C.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoext4: drop ext4dev compat
Eric Sandeen [Thu, 1 Oct 2009 06:21:07 +0000 (02:21 -0400)]
ext4: drop ext4dev compat

Kconfig & super.c promised it'd be gone by 2.6.31, so it's
about time to drop it.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agoALSA: Don't assume i2c device probing always succeeds
Takashi Iwai [Thu, 1 Oct 2009 05:46:33 +0000 (07:46 +0200)]
ALSA: Don't assume i2c device probing always succeeds

The client->driver pointer can be NULL when i2c-device probing fails
in i2c_new_device().  This patch adds the NULL checks for client->driver
and return the error instead of blind assumption of driver availability.

Reported-by: Tim Shepard <shep@alum.mit.edu>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: intel8x0 - Mute External Amplifier by default for Sony VAIO VGN-T350P
Daniel T Chen [Thu, 1 Oct 2009 04:28:16 +0000 (00:28 -0400)]
ALSA: intel8x0 - Mute External Amplifier by default for Sony VAIO VGN-T350P

BugLink: https://bugs.launchpad.net/bugs/410933
This Sony VAIO model needs External Amplifier unmuted for audible
playback, so make sure we set the inv_eapd quirk.

Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agobe2net: Workaround to fix a bug in Rx Completion processing.
Ajit Khaparde [Thu, 1 Oct 2009 04:58:22 +0000 (21:58 -0700)]
be2net: Workaround to fix a bug in Rx Completion processing.

vtp bit in RX completion descriptor could be wrongly set in
some skews of BladEngine.  Ignore this  bit if vtm is not set.
Resending because the previous patch was against net-next tree.
This patch is against the net-2.6 tree.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>