firefly-linux-kernel-4.4.55.git
12 years agoMAINTAINERS: Fix list of perf events source files
Geunsik Lim [Thu, 18 Aug 2011 07:44:57 +0000 (16:44 +0900)]
MAINTAINERS: Fix list of perf events source files

Recent changes made kernel/perf_event.c be split and moved to
kernel/events/.

Cc: Ingo Molnar <mingo@elte.hu>
Cc: Jiri Kosina <trivial@kernel.org>
Cc: Joe Perches <joe@perches.com>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1313653497-27263-1-git-send-email-leemgs1@gmail.com
Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
12 years agoperf tools: Fix build against newer glibc
Josh Boyer [Thu, 18 Aug 2011 11:37:21 +0000 (07:37 -0400)]
perf tools: Fix build against newer glibc

Upstream glibc commit 295e904 added a definition for __attribute_const__
to cdefs.h.  This causes the following error when building perf:

util/include/linux/compiler.h:8:0: error: "__attribute_const__"
redefined [-Werror] /usr/include/sys/cdefs.h:226:0: note: this is the
location of the previous definition

Wrap __attribute_const__ in #ifndef as we do for __always_inline.

Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/20110818113720.GL2227@zod.bos.redhat.com
Signed-off-by: Josh Boyer <jwboyer@redhat.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
12 years agoperf tools: Fix error handling of unknown events
Stephane Eranian [Sat, 23 Jul 2011 02:10:43 +0000 (04:10 +0200)]
perf tools: Fix error handling of unknown events

There was a problem with the parse_events() code not printing the
correct event name when an event was unknown and starting with an 'r'.
The source of the problem was the way raw notation was parsed.

Without the patch:
$ perf stat -e retired_foo
invalid event modifier: 'tired_foo'

With the patch:
$ perf stat -e retired_foo
invalid or unsupported event: 'retired_foo'

This also covers the case where the name of the event was not printed at
all when perf was linked with libpfm4.

Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20110723021043.GA20178@quad
Signed-off-by: Stephane Eranian <eranian@google.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
12 years agoperf evlist: Fix missing event name init for default event
Stephane Eranian [Tue, 7 Jun 2011 16:19:36 +0000 (18:19 +0200)]
perf evlist: Fix missing event name init for default event

When no event is given to perf record, perf top, a default event is
initialized (cycles). However, perf_evlist__add_default() was not
setting the symbolic name for the event. Perf top worked simply because
it was reconstructing the name from the event code. But it should not
have to do this. This patch initializes the evsel->name field properly.

This second version improves the code flow on the non error path.

Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20110607161936.GA8163@quad
Signed-off-by: Stephane Eranian <eranian@google.com>
[committer note: Use perf_evsel__delete() instead of plain free()]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
12 years agoperf list: Fix exit value
Stephane Eranian [Mon, 23 May 2011 12:39:17 +0000 (14:39 +0200)]
perf list: Fix exit value

This patch fixes an issue with the exit value of perf list:

$ perf list; echo $?
129

perf list returns an error exit code even though there is no error.

There was a stray exit(129) in print_events(). This patch removes this
exit().

$ perf list; echo $?
0

$ perf list hw sw
  cpu-cycles OR cycles                               [Hardware event]
  stalled-cycles-frontend OR idle-cycles-frontend    [Hardware event]
  stalled-cycles-backend OR idle-cycles-backend      [Hardware event]
  instructions                                       [Hardware event]
  cache-references                                   [Hardware event]
  cache-misses                                       [Hardware event]
  branch-instructions OR branches                    [Hardware event]
  branch-misses                                      [Hardware event]
  bus-cycles                                         [Hardware event]

  cpu-clock                                          [Software event]
  task-clock                                         [Software event]
  page-faults OR faults                              [Software event]
  minor-faults                                       [Software event]
  major-faults                                       [Software event]
  context-switches OR cs                             [Software event]
  cpu-migrations OR migrations                       [Software event]
  alignment-faults                                   [Software event]
  emulation-faults                                   [Software event]
$ echo $?
0

Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20110523123917.GA31060@quad
Signed-off-by: Stephane Eranian <eranian@google.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
12 years agobefs: Validate length of long symbolic links.
Timo Warns [Wed, 17 Aug 2011 15:59:56 +0000 (17:59 +0200)]
befs: Validate length of long symbolic links.

Signed-off-by: Timo Warns <warns@pre-sense.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoMerge branch 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Linus Torvalds [Wed, 17 Aug 2011 20:15:25 +0000 (13:15 -0700)]
Merge branch 'pm-fixes' of git://git./linux/kernel/git/rafael/linux-pm

* 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  PM / Domains: Fix build for CONFIG_PM_RUNTIME unset

12 years agomm: fix __page_to_pfn for a const struct page argument
Ian Campbell [Wed, 17 Aug 2011 16:40:33 +0000 (17:40 +0100)]
mm: fix __page_to_pfn for a const struct page argument

This allows the cast in lowmem_page_address (introduced as a warning
fixup to 33dd4e0ec911 "mm: make some struct page's const") to be
removed.

Propagate const'ness to page_to_section() as well since it is required
by __page_to_pfn.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Rik van Riel <riel@redhat.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Michel Lespinasse <walken@google.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agomm: make HASHED_PAGE_VIRTUAL page_address' struct page argument const.
Ian Campbell [Wed, 17 Aug 2011 12:45:09 +0000 (13:45 +0100)]
mm: make HASHED_PAGE_VIRTUAL page_address' struct page argument const.

Followup to 33dd4e0ec911 "mm: make some struct page's const" which missed the
HASHED_PAGE_VIRTUAL case.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Michel Lespinasse <walken@google.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoMerge branches 'ipoib' and 'iser' into for-next
Roland Dreier [Wed, 17 Aug 2011 17:57:43 +0000 (10:57 -0700)]
Merge branches 'ipoib' and 'iser' into for-next

12 years agoMerge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Wed, 17 Aug 2011 17:31:39 +0000 (10:31 -0700)]
Merge branch 'perf-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  perf probe: Filter out redundant inline-instances
  perf probe: Search concrete out-of-line instances
  perf probe: Avoid searching variables in intermediate scopes
  perf probe: Fix to search local variables in appropriate scope
  perf probe: Warn when more than one line are given
  perf probe: Fix to walk all inline instances
  perf probe: Fix to search nested inlined functions in CU
  perf probe: Fix line walker to check CU correctly
  perf probe: Fix a memory leak for scopes array
  perf: fix temporary file ownership check
  perf report: Use properly build_id kernel binaries
  perf top browser: Remove spurious helpline update

12 years agoMerge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Wed, 17 Aug 2011 17:28:33 +0000 (10:28 -0700)]
Merge branch 'timers-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  rtc: Limit RTC PIE frequency
  rtc: Fix hrtimer deadlock
  rtc: Handle errors correctly in rtc_irq_set_state()

Fixup trivial conflicts in drivers/rtc/interface.c due to slightly
trivially versions of the same patch coming in two different ways.

12 years agoMerge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Wed, 17 Aug 2011 17:25:08 +0000 (10:25 -0700)]
Merge branch 'core-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  lockdep: Fix wrong assumption in match_held_lock

12 years agoMerge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Wed, 17 Aug 2011 17:23:50 +0000 (10:23 -0700)]
Merge branch 'irq-urgent-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  irq: Track the owner of irq descriptor
  irq: Always set IRQF_ONESHOT if no primary handler is specified
  genirq: Fix wrong bit operation

12 years agoIB/iser: Support iSCSI PDU padding
Or Gerlitz [Mon, 1 Aug 2011 21:14:09 +0000 (21:14 +0000)]
IB/iser: Support iSCSI PDU padding

RFC3270 mandates that iSCSI PDUs are padded to the closest integer
number of four byte words.  Fix the iser code to support that on both
the TX/RX flows.

Signed-off-by: Or Gerlitz <ogerlitz@mellanox.co.il>
Signed-off-by: Roland Dreier <roland@purestorage.com>
12 years agoIBiser: Fix wrong mask when sizeof (dma_addr_t) > sizeof (unsigned long)
Or Gerlitz [Mon, 1 Aug 2011 21:12:09 +0000 (21:12 +0000)]
IBiser: Fix wrong mask when sizeof (dma_addr_t) > sizeof (unsigned long)

The code that prepares the SG associated with SCSI command for FMR was
buggy for systems with DMA addresses that don't fit in unsigned long,
e.g under the 32-bit based XenServer dom0 sizeof(dma_addr_t) is 8.

Fix that by casting to unsigned long long a masking constant used by
the code. This resolves a crash in iser_sg_to_page_vec on this system.

Signed-off-by: Or Gerlitz <ogerlitz@mellanox.co.il>
Signed-off-by: Roland Dreier <roland@purestorage.com>
12 years agoxen/x86: replace order-based range checking of M2P table by linear one
Jan Beulich [Tue, 16 Aug 2011 14:07:41 +0000 (15:07 +0100)]
xen/x86: replace order-based range checking of M2P table by linear one

The order-based approach is not only less efficient (requiring a shift
and a compare, typical generated code looking like this

mov eax, [machine_to_phys_order]
mov ecx, eax
shr ebx, cl
test ebx, ebx
jnz ...

whereas a direct check requires just a compare, like in

cmp ebx, [machine_to_phys_nr]
jae ...

), but also slightly dangerous in the 32-on-64 case - the element
address calculation can wrap if the next power of two boundary is
sufficiently far away from the actual upper limit of the table, and
hence can result in user space addresses being accessed (with it being
unknown what may actually be mapped there).

Additionally, the elimination of the mistaken use of fls() here (should
have been __fls()) fixes a latent issue on x86-64 that would trigger
if the code was run on a system with memory extending beyond the 44-bit
boundary.

CC: stable@kernel.org
Signed-off-by: Jan Beulich <jbeulich@novell.com>
[v1: Based on Jeremy's feedback]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
12 years agofat: fat16 support maximum 4GB file/vol size as WinXP or 7.
Namjae Jeon [Wed, 17 Aug 2011 10:10:09 +0000 (19:10 +0900)]
fat: fat16 support maximum 4GB file/vol size as WinXP or 7.

FAT16 support maximum 4GB vol/file size with 64KB cluster size.

Win NT/XP/7 increased the maximum cluster size to 64KB, and file/vol
size increased 4GB also.  Although increasing, the file size of linux
FAT is still limited at 2GB.

I found that it is limited by sb->maxbytes(0x7fffffff) when partition
is formatted by FAT16.  sb->s_maxbytes in fill_super should be set to
0xffffffff like fat32.

Signed-off-by: Namjae Jeon <linkinjeon@gmail.com>
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
12 years agofat: fix utf8 iocharset warning message
Mihai Moldovan [Wed, 17 Aug 2011 10:10:08 +0000 (19:10 +0900)]
fat: fix utf8 iocharset warning message

The fat_msg function already formats the given message and appends
a newline to it - we don't need to do this in the passed message
string as well, or will end up with a blank line printed in the
kernel log ring buffer.

Also change the loglevel from error to warning.

Signed-off-by: Mihai Moldovan <ionic@ionic.de>
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
12 years agofat: fix build warning
Jonas Aberg [Wed, 17 Aug 2011 10:10:06 +0000 (19:10 +0900)]
fat: fix build warning

This fixes a compile warning (unititialized variable) in
the fat filesystem code.

Signed-off-by: Jonas Aberg <jonas.aberg@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
12 years agoBtrfs: truncate pages from clone ioctl target range
Sage Weil [Wed, 10 Aug 2011 18:04:04 +0000 (18:04 +0000)]
Btrfs: truncate pages from clone ioctl target range

We need to truncate page cache pages for the clone ioctl target range or
else we'll confuse ourselves to no end.  If the old data was cached, we
used to still see it (until remount).  If the page was partially updated
we used to get a mix of old and new data.

Signed-off-by: Sage Weil <sage@newdream.net>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
12 years agoBtrfs: fix uninitialized sync_pending
Miao Xie [Fri, 5 Aug 2011 09:32:37 +0000 (09:32 +0000)]
Btrfs: fix uninitialized sync_pending

sync_pending is uninitialized before it be used, fix it.

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
12 years agoBtrfs: fix wrong free space information
Miao Xie [Fri, 5 Aug 2011 09:32:35 +0000 (09:32 +0000)]
Btrfs: fix wrong free space information

Btrfs subtracted the size of the allocated space twice when it allocated
the space from the bitmap in the cluster, it broke the free space information
and led to oops finally.

And this patch also fixes the bug that ctl->free_space was subtracted
without lock.

Reported-by: Liu Bo <liubo2009@cn.fujitsu.com>
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
12 years agobtrfs: memory leak in btrfs_add_inode_defrag()
Dan Carpenter [Fri, 5 Aug 2011 14:19:00 +0000 (14:19 +0000)]
btrfs: memory leak in btrfs_add_inode_defrag()

We don't use the defrag struct on this path.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
12 years agoBtrfs: use plain page_address() in header fields setget functions
Li Zefan [Wed, 3 Aug 2011 08:11:41 +0000 (08:11 +0000)]
Btrfs: use plain page_address() in header fields setget functions

We've stopped using highmem for extent buffers.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
12 years agoBtrfs: forced readonly when btrfs_drop_snapshot() fails
Tsutomu Itoh [Tue, 9 Aug 2011 07:11:13 +0000 (07:11 +0000)]
Btrfs: forced readonly when btrfs_drop_snapshot() fails

The filesystem turns readonly instead of returning the error to the
caller when detected error in btrfs_drop_snapshot().
and, because the caller doesn't check the error, the function type is
changed to 'void'.

Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
12 years agoBtrfs: check if there is enough space for balancing smarter
liubo [Wed, 3 Aug 2011 10:15:25 +0000 (10:15 +0000)]
Btrfs: check if there is enough space for balancing smarter

When checking if there is enough space for balancing a block group,
since we do not take raid types into consideration, we do not account
corrent amounts of space that we needed.  This makes us do some extra
work before we get ENOSPC.

Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
12 years agoBtrfs: fix a bug of balance on full multi-disk partitions
liubo [Tue, 2 Aug 2011 02:39:03 +0000 (02:39 +0000)]
Btrfs: fix a bug of balance on full multi-disk partitions

When balancing, we'll first try to shrink devices for some space,
but if it is working on a full multi-disk partition with raid protection,
we may encounter a bug, that is, while shrinking, total_bytes may be less
than bytes_used, and btrfs may allocate a dev extent that accesses out of
device's bounds.

Then we will not be able to write or read the data which stores at the end
of the device, and get the followings:

device fsid 0939f071-7ea3-46c8-95df-f176d773bfb6 devid 1 transid 10 /dev/sdb5
Btrfs detected SSD devices, enabling SSD mode
btrfs: relocating block group 476315648 flags 9
btrfs: found 4 extents
attempt to access beyond end of device
sdb5: rw=145, want=546176, limit=546147
attempt to access beyond end of device
sdb5: rw=145, want=546304, limit=546147
attempt to access beyond end of device
sdb5: rw=145, want=546432, limit=546147
attempt to access beyond end of device
sdb5: rw=145, want=546560, limit=546147
attempt to access beyond end of device

Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
12 years agoBtrfs: fix an oops of log replay
liubo [Sat, 6 Aug 2011 08:35:23 +0000 (08:35 +0000)]
Btrfs: fix an oops of log replay

When btrfs recovers from a crash, it may hit the oops below:

------------[ cut here ]------------
kernel BUG at fs/btrfs/inode.c:4580!
[...]
RIP: 0010:[<ffffffffa03df251>]  [<ffffffffa03df251>] btrfs_add_link+0x161/0x1c0 [btrfs]
[...]
Call Trace:
 [<ffffffffa03e7b31>] ? btrfs_inode_ref_index+0x31/0x80 [btrfs]
 [<ffffffffa04054e9>] add_inode_ref+0x319/0x3f0 [btrfs]
 [<ffffffffa0407087>] replay_one_buffer+0x2c7/0x390 [btrfs]
 [<ffffffffa040444a>] walk_down_log_tree+0x32a/0x480 [btrfs]
 [<ffffffffa0404695>] walk_log_tree+0xf5/0x240 [btrfs]
 [<ffffffffa0406cc0>] btrfs_recover_log_trees+0x250/0x350 [btrfs]
 [<ffffffffa0406dc0>] ? btrfs_recover_log_trees+0x350/0x350 [btrfs]
 [<ffffffffa03d18b2>] open_ctree+0x1442/0x17d0 [btrfs]
[...]

This comes from that while replaying an inode ref item, we forget to
check those old conflicting DIR_ITEM and DIR_INDEX items in fs/file tree,
then we will come to conflict corners which lead to BUG_ON().

Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com>
Tested-by: Andy Lutomirski <luto@mit.edu>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
12 years agoBtrfs: detect wether a device supports discard
Josef Bacik [Thu, 4 Aug 2011 14:52:27 +0000 (14:52 +0000)]
Btrfs: detect wether a device supports discard

We have a problem where if a user specifies discard but doesn't actually support
it we will return EOPNOTSUPP from btrfs_discard_extent.  This is a problem
because this gets called (in a fashion) from the tree log recovery code, which
has a nice little BUG_ON(ret) after it, which causes us to fail the tree log
replay.  So instead detect wether our devices support discard when we're adding
them and then don't issue discards if we know that the device doesn't support
it.  And just for good measure set ret = 0 in btrfs_issue_discard just in case
we still get EOPNOTSUPP so we don't screw anybody up like this again.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
12 years agoMerge branch 'kvm-updates/3.1' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Linus Torvalds [Tue, 16 Aug 2011 18:14:44 +0000 (11:14 -0700)]
Merge branch 'kvm-updates/3.1' of git://git./virt/kvm/kvm

* 'kvm-updates/3.1' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
  KVM: uses TASKSTATS, depends on NET
  KVM: fix TASK_DELAY_ACCT kconfig warning

12 years agoMerge branch 'fixallnoconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl...
Linus Torvalds [Tue, 16 Aug 2011 17:40:29 +0000 (10:40 -0700)]
Merge branch 'fixallnoconfig' of git://git./linux/kernel/git/aegl/linux-2.6

* 'fixallnoconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
  [IA64] fix "allnoconfig" build

12 years agoIPoIB: Fix possible NULL dereference in ipoib_start_xmit()
Bernd Schubert [Tue, 16 Aug 2011 10:56:54 +0000 (10:56 +0000)]
IPoIB: Fix possible NULL dereference in ipoib_start_xmit()

Fix a bug introduced in 69cce1d14049 ("net: Abstract dst->neighbour
accesses behind helpers.") where we might dereference skb_dst(skb)
even if it is NULL, which causes:

    [  240.944030] BUG: unable to handle kernel NULL pointer dereference at 0000000000000040
    [  240.948007] IP: [<ffffffffa0366ce9>] ipoib_start_xmit+0x39/0x280 [ib_ipoib]
    [...]
    [  240.948007] Call Trace:
    [  240.948007]  <IRQ>
    [  240.948007]  [<ffffffff812cd5e0>] dev_hard_start_xmit+0x2a0/0x590
    [  240.948007]  [<ffffffff8131f680>] ? arp_create+0x70/0x200
    [  240.948007]  [<ffffffff812e8e1f>] sch_direct_xmit+0xef/0x1c0

Addresses: https://bugzilla.kernel.org/show_bug.cgi?id=41212
Signed-off-by: Bernd Schubert <bernd.schubert@itwm.fraunhofer.de>
Signed-off-by: Roland Dreier <roland@purestorage.com>
12 years agoKVM: uses TASKSTATS, depends on NET
Randy Dunlap [Tue, 2 Aug 2011 19:54:31 +0000 (12:54 -0700)]
KVM: uses TASKSTATS, depends on NET

CONFIG_TASKSTATS just had a change to use netlink, including
a change to "depends on NET".  Since "select" does not follow
dependencies, KVM also needs to depend on NET to prevent build
errors when CONFIG_NET is not enabled.

Sample of the reported "undefined reference" build errors:

taskstats.c:(.text+0x8f686): undefined reference to `nla_put'
taskstats.c:(.text+0x8f721): undefined reference to `nla_reserve'
taskstats.c:(.text+0x8f8fb): undefined reference to `init_net'
taskstats.c:(.text+0x8f905): undefined reference to `netlink_unicast'
taskstats.c:(.text+0x8f934): undefined reference to `kfree_skb'
taskstats.c:(.text+0x8f9e9): undefined reference to `skb_clone'
taskstats.c:(.text+0x90060): undefined reference to `__alloc_skb'
taskstats.c:(.text+0x901e9): undefined reference to `skb_put'
taskstats.c:(.init.text+0x4665): undefined reference to `genl_register_family'
taskstats.c:(.init.text+0x4699): undefined reference to `genl_register_ops'
taskstats.c:(.init.text+0x4710): undefined reference to `genl_unregister_ops'
taskstats.c:(.init.text+0x471c): undefined reference to `genl_unregister_family'

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
12 years agoxen: self-balloon needs module.h
Randy Dunlap [Tue, 16 Aug 2011 04:41:43 +0000 (21:41 -0700)]
xen: self-balloon needs module.h

Fix build errors (found when CONFIG_SYSFS is not enabled):

  drivers/xen/xen-selfballoon.c:446: warning: data definition has no type or storage class
  drivers/xen/xen-selfballoon.c:446: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL'
  drivers/xen/xen-selfballoon.c:446: warning: parameter names (without types) in function declaration
  drivers/xen/xen-selfballoon.c:485: error: expected declaration specifiers or '...' before string constant
  drivers/xen/xen-selfballoon.c:485: warning: data definition has no type or storage class
  drivers/xen/xen-selfballoon.c:485: warning: type defaults to 'int' in declaration of 'MODULE_LICENSE'
  drivers/xen/xen-selfballoon.c:485: warning: function declaration isn't a prototype

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agogma500: kill MIPI interface types
Alan Cox [Tue, 16 Aug 2011 13:18:48 +0000 (14:18 +0100)]
gma500: kill MIPI interface types

Kirill Shutemov found problems with the non-upstream IMG driver where the
use of extra DRM encoder/connector types caused random crashes when the DRM
layer tried to display their matching name. This removes the MIPI types
matching the changes Pauli Nieminen made to the non upstream driver set.

As Pauli points out:
" MIPI (or DSI) is protocol specification on top of LVDS serial bus. That
 makes it resonable to call MIPI connectors and encoders LVDS."

(and indeed they may also be HDMI convertors or similar when we want to
 report a more useful to end user result)

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agocifs: demote cERROR in build_path_from_dentry to cFYI
Jeff Layton [Mon, 8 Aug 2011 15:50:24 +0000 (11:50 -0400)]
cifs: demote cERROR in build_path_from_dentry to cFYI

Running the cthon tests on a recent kernel caused this message to pop
occasionally:

    CIFS VFS: did not end path lookup where expected namelen is 0

Some added debugging showed that namelen and dfsplen were both 0 when
this occurred. That means that the read_seqretry returned true.

Assuming that the comment inside the if statement is true, this should
be harmless and just means that we raced with a rename. If that is the
case, then there's no need for alarm and we can demote this to cFYI.

While we're at it, print the dfsplen too so that we can see what
happened here if the message pops during debugging.

Cc: stable@kernel.org
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
12 years agoALSA: hda - Fix duplicated capture-volume creation for ALC268 models
Takashi Iwai [Tue, 16 Aug 2011 12:23:20 +0000 (14:23 +0200)]
ALSA: hda - Fix duplicated capture-volume creation for ALC268 models

Fix the duplicated creation of capture-mixer elements for some static
ALC268 configurations.  The capture mixers must be put to cap_mixer field
instead of mixers array.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoregmap: using module facilities requires module.h
Stephen Rothwell [Mon, 15 Aug 2011 23:36:06 +0000 (09:36 +1000)]
regmap: using module facilities requires module.h

Commit b33f9cbd67ba ("regmap: Specify a module license") added a
MODULES_LICENSE to this file without adding an include of module.h.

module.h should have been included anyway, since this file has
EXPORT_SYMBOLs as well.  With the pending module.h split up, this would
probably have caused build problems.

Cc: Stephen Warren <swarren@nvidia.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoMerge branch 'docs-move' of git://git.kernel.org/pub/scm/linux/kernel/git/rdunlap...
Linus Torvalds [Tue, 16 Aug 2011 02:24:42 +0000 (19:24 -0700)]
Merge branch 'docs-move' of git://git./linux/kernel/git/rdunlap/linux-docs

* 'docs-move' of git://git.kernel.org/pub/scm/linux/kernel/git/rdunlap/linux-docs:
  Docs: MSI-HOWTO: MSI -> MSIs
  Docs: MSI-HOWTO: Insert a comma
  Docs: MSI-HOWTO: can -> could
  Docs: MSI-HOWTO: Use `unknown ...' rather than `... know about.'
  Docs: MSI-HOWTO: may -> might
  Docs: MSI-HOWTO: Insert a comma
  Docs: MSI-HOWTO: API -> function
  Docs: MSI-HOWTO: , -> ;
  Docs: MSI-HOWTO: Move a sentence to another paragraph
  Docs: MSI-HOWTO: Insert `that'
  Docs: MSI-HOWTO: Offset modifier with a comma, and insert `yet' for emphasis
  Docs: MSI-HOWTO: Put the `because' subordinate clause first
  Docs: MSI-HOWTO: Streamline some wording
  Docs: MSI-HOWTO: `asked for' -> `requested'
  Docs: MSI-HOWTO: Use present tense and streamline some wording
  Docs: MSI-HOWTO: Use the subjunctive, and change `can' to `may'

12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
Linus Torvalds [Tue, 16 Aug 2011 02:16:01 +0000 (19:16 -0700)]
Merge git://git./linux/kernel/git/davem/sparc

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
  sparc64: Set HAVE_C_RECORDMCOUNT
  sparc32: unbreak arch_write_unlock()
  sparc64: remove unnecessary macros from spinlock_64.h

12 years agoMerge branch 'drm-intel-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/keith...
Linus Torvalds [Tue, 16 Aug 2011 02:14:18 +0000 (19:14 -0700)]
Merge branch 'drm-intel-fixes' of git://git./linux/kernel/git/keithp/linux-2.6

* 'drm-intel-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/keithp/linux-2.6:
  drm/i915: Cannot set clock gating under UMS
  drm/i915: Can't do accurate vblank timestamps with UMS
  Not all systems expose a firmware or platform mechanism for changing the backlight intensity on i915, so add native driver support.
  drm/i915: split out PCH refclk update code
  drm/i915: show interrupt info on IVB
  drm/i915: Remove unused 'reg' argument to dp_pipe_enabled
  drm/i915: Fix PCH port pipe select in CPT disable paths
  drm/i915: Leave LVDS registers unlocked
  drm/i915: Wait for LVDS panel power sequence

12 years agox86: fix mm/fault.c build
Randy Dunlap [Mon, 15 Aug 2011 17:18:46 +0000 (10:18 -0700)]
x86: fix mm/fault.c build

arch/x86/mm/fault.c needs to include asm/vsyscall.h to fix a
build error:

  arch/x86/mm/fault.c: In function '__bad_area_nosemaphore':
  arch/x86/mm/fault.c:728: error: 'VSYSCALL_START' undeclared (first use in this function)

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agosparc64: Set HAVE_C_RECORDMCOUNT
David S. Miller [Mon, 15 Aug 2011 21:45:17 +0000 (14:45 -0700)]
sparc64: Set HAVE_C_RECORDMCOUNT

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: unbreak arch_write_unlock()
Mikael Pettersson [Mon, 15 Aug 2011 10:11:50 +0000 (10:11 +0000)]
sparc32: unbreak arch_write_unlock()

The sparc32 version of arch_write_unlock() is just a plain assignment.
Unfortunately this allows the compiler to schedule side-effects in a
protected region to occur after the HW-level unlock, which is broken.
E.g., the following trivial test case gets miscompiled:

#include <linux/spinlock.h>
rwlock_t lock;
int counter;
void foo(void) { write_lock(&lock); ++counter; write_unlock(&lock); }

Fixed by adding a compiler memory barrier to arch_write_unlock().  The
sparc64 version combines the barrier and assignment into a single asm(),
and implements the operation as a static inline, so that's what I did too.

Compile-tested with sparc32_defconfig + CONFIG_SMP=y.

Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc64: remove unnecessary macros from spinlock_64.h
Mikael Pettersson [Mon, 15 Aug 2011 10:10:31 +0000 (10:10 +0000)]
sparc64: remove unnecessary macros from spinlock_64.h

The sparc64 spinlock_64.h contains a number of operations defined
first as static inline functions, and then as macros with the same
names and parameters as the functions.  Maybe this was needed at
some point in the past, but now nothing seems to depend on these
macros (checked with a recursive grep looking for ifdefs on these
names).  Other archs don't define these identity-macros.

So this patch deletes these unnecessary macros.

Compile-tested with sparc64_defconfig.

Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoblock: fix flush machinery for stacking drivers with differring flush flags
Jeff Moyer [Mon, 15 Aug 2011 19:37:25 +0000 (21:37 +0200)]
block: fix flush machinery for stacking drivers with differring flush flags

Commit ae1b1539622fb46e51b4d13b3f9e5f4c713f86ae, block: reimplement
FLUSH/FUA to support merge, introduced a performance regression when
running any sort of fsyncing workload using dm-multipath and certain
storage (in our case, an HP EVA).  The test I ran was fs_mark, and it
dropped from ~800 files/sec on ext4 to ~100 files/sec.  It turns out
that dm-multipath always advertised flush+fua support, and passed
commands on down the stack, where those flags used to get stripped off.
The above commit changed that behavior:

static inline struct request *__elv_next_request(struct request_queue *q)
{
        struct request *rq;

        while (1) {
-               while (!list_empty(&q->queue_head)) {
+               if (!list_empty(&q->queue_head)) {
                        rq = list_entry_rq(q->queue_head.next);
-                       if (!(rq->cmd_flags & (REQ_FLUSH | REQ_FUA)) ||
-                           (rq->cmd_flags & REQ_FLUSH_SEQ))
-                               return rq;
-                       rq = blk_do_flush(q, rq);
-                       if (rq)
-                               return rq;
+                       return rq;
                }

Note that previously, a command would come in here, have
REQ_FLUSH|REQ_FUA set, and then get handed off to blk_do_flush:

struct request *blk_do_flush(struct request_queue *q, struct request *rq)
{
        unsigned int fflags = q->flush_flags; /* may change, cache it */
        bool has_flush = fflags & REQ_FLUSH, has_fua = fflags & REQ_FUA;
        bool do_preflush = has_flush && (rq->cmd_flags & REQ_FLUSH);
        bool do_postflush = has_flush && !has_fua && (rq->cmd_flags &
        REQ_FUA);
        unsigned skip = 0;
...
        if (blk_rq_sectors(rq) && !do_preflush && !do_postflush) {
                rq->cmd_flags &= ~REQ_FLUSH;
if (!has_fua)
rq->cmd_flags &= ~REQ_FUA;
        return rq;
}

So, the flush machinery was bypassed in such cases (q->flush_flags == 0
&& rq->cmd_flags & (REQ_FLUSH|REQ_FUA)).

Now, however, we don't get into the flush machinery at all.  Instead,
__elv_next_request just hands a request with flush and fua bits set to
the scsi_request_fn, even if the underlying request_queue does not
support flush or fua.

The agreed upon approach is to fix the flush machinery to allow
stacking.  While this isn't used in practice (since there is only one
request-based dm target, and that target will now reflect the flush
flags of the underlying device), it does future-proof the solution, and
make it function as designed.

In order to make this work, I had to add a field to the struct request,
inside the flush structure (to store the original req->end_io).  Shaohua
had suggested overloading the union with rb_node and completion_data,
but the completion data is used by device mapper and can also be used by
other drivers.  So, I didn't see a way around the additional field.

I tested this patch on an HP EVA with both ext4 and xfs, and it recovers
the lost performance.  Comments and other testers, as always, are
appreciated.

Cheers,
Jeff

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agodrm/i915: Cannot set clock gating under UMS
Keith Packard [Sat, 13 Aug 2011 00:07:18 +0000 (17:07 -0700)]
drm/i915: Cannot set clock gating under UMS

The clock gating functions are only assigned under KMS, so don't try
to call them under UMS.

Signed-off-by: Keith Packard <keithp@keithp.com>
Tested-by: Justin P. Mattock <justinmattock@gmail.com>
12 years agodrm/i915: Can't do accurate vblank timestamps with UMS
Keith Packard [Sat, 13 Aug 2011 00:05:54 +0000 (17:05 -0700)]
drm/i915: Can't do accurate vblank timestamps with UMS

Disable this feature when KMS is not running by setting the
driver->get_vblank_timestamp function pointer to NULL.

Signed-off-by: Keith Packard <keithp@keithp.com>
Tested-by: Justin P. Mattock <justinmattock@gmail.com>
12 years agoNot all systems expose a firmware or platform mechanism for changing the backlight...
Matthew Garrett [Fri, 12 Aug 2011 10:11:33 +0000 (12:11 +0200)]
Not all systems expose a firmware or platform mechanism for changing the backlight intensity on i915, so add native driver support.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: David Airlie <airlied@linux.ie>
Cc: Alex Deucher <alexdeucher@gmail.com>
Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Len Brown <lenb@kernel.org>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Tested-by: Sedat Dilek <sedat.dilek@googlemail.com>
Tested-by: Michel Alexandre Salim <salimma@fedoraproject.org>
Tested-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus
Linus Torvalds [Mon, 15 Aug 2011 15:46:11 +0000 (08:46 -0700)]
Merge git://git./linux/kernel/git/rusty/linux-2.6-for-linus

* git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus:
  lguest: allow booting guest with CONFIG_RELOCATABLE=y
  virtio: Add text copy of spec to Documentation/virtual.

12 years agoMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1...
Linus Torvalds [Mon, 15 Aug 2011 15:40:49 +0000 (08:40 -0700)]
Merge branch 'fixes' of git://git./linux/kernel/git/ieee1394/linux1394-2.6

* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
  firewire: ohci: fix DMA unmapping in an error path
  firewire: cdev: fix 32 bit userland on 64 bit kernel compat corner cases

12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy...
Linus Torvalds [Mon, 15 Aug 2011 15:40:24 +0000 (08:40 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/shaggy/jfs-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy/jfs-2.6:
  jfs: flush journal completely before releasing metadata inodes

12 years agoMerge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
Linus Torvalds [Mon, 15 Aug 2011 15:39:10 +0000 (08:39 -0700)]
Merge branch 'drm-fixes' of git://git./linux/kernel/git/airlied/drm-2.6

* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
  drm/radeon/kms: don't try to be smart in the hpd handler
  drm/radeon: re-POST the asic on Apple hardware when booted via EFI
  drm/radeon: Allow panel preferred EDID to override BIOS native mode
  drm/radeon/kms: make some watermark messages debug only
  drm/radeon/kms: fix regression is handling >2 heads on cedar/caicos
  drm/radeon/kms: don't enable connectors that are off in the hotplug handler

12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
Linus Torvalds [Mon, 15 Aug 2011 15:36:30 +0000 (08:36 -0700)]
Merge git://git./linux/kernel/git/sfrench/cifs-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
  cifs: Do not set cifs/ntfs acl using a file handle (try #4)
  [CIFS] Cleanup use of CONFIG_CIFS_STATS2 ifdef to make transport routines more readable

12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Linus Torvalds [Mon, 15 Aug 2011 15:35:54 +0000 (08:35 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/broonie/regmap

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
  regmap: Specify a module license
  regmap: Fix bulk reads

12 years agodrm/radeon/kms: don't try to be smart in the hpd handler
Alex Deucher [Sat, 13 Aug 2011 17:36:13 +0000 (13:36 -0400)]
drm/radeon/kms: don't try to be smart in the hpd handler

Attempting to try and turn off disconnected display hw in the
hotput handler lead to more problems than it helped.  For
now just register an event and only attempt the do something
interesting with DP.  Other connectors are just too problematic:
- Some systems have an HPD pin assigned to LVDS, but it's rarely
if ever connected properly and we don't really care about hpd
events on LVDS anyway since it's always connected.
- The HPD pin is wired up correctly for eDP, but we don't really
have to do anything since the events since it's always connected.
- Some HPD pins fire more than once when you connect/disconnect
- etc.

Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=39882

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agoALSA: ac97: Add HP Compaq dc5100 SFF(PT003AW) to Headphone Jack Sense whitelist
Daniel T Chen [Mon, 15 Aug 2011 02:43:01 +0000 (22:43 -0400)]
ALSA: ac97: Add HP Compaq dc5100 SFF(PT003AW) to Headphone Jack Sense whitelist

BugLink: https://bugs.launchpad.net/bugs/826081
The original reporter needs 'Headphone Jack Sense' enabled to have
audible audio, so add his PCI SSID to the whitelist.

Reported-and-tested-by: Muhammad Khurram Khan
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agolguest: allow booting guest with CONFIG_RELOCATABLE=y
Rusty Russell [Mon, 15 Aug 2011 00:45:10 +0000 (10:15 +0930)]
lguest: allow booting guest with CONFIG_RELOCATABLE=y

The CONFIG_RELOCATABLE code tries to align the unpack destination to
the value of 'kernel_alignment' in the setup_hdr.  If that's 0, it
tries to unpack to address 0, which in fact causes the gunzip code
to call 'error("Out of memory while allocating output buffer")'.

The bootloader (ie. the lguest Launcher in this case) should be doing
setting this field; the normal bzImage is 16M, we can use the same.

Reported-by: Stefanos Geraggelos <sgerag@cslab.ece.ntua.gr>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: stable@kernel.org
12 years agovirtio: Add text copy of spec to Documentation/virtual.
Rusty Russell [Mon, 15 Aug 2011 00:45:10 +0000 (10:15 +0930)]
virtio: Add text copy of spec to Documentation/virtual.

As suggested by Christoph Hellwig.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agoLinux 3.1-rc2
Linus Torvalds [Sun, 14 Aug 2011 22:09:08 +0000 (15:09 -0700)]
Linux 3.1-rc2

12 years agomm: fix wrong vmap address calculations with odd NR_CPUS values
Clemens Ladisch [Tue, 21 Jun 2011 20:09:50 +0000 (22:09 +0200)]
mm: fix wrong vmap address calculations with odd NR_CPUS values

Commit db64fe02258f ("mm: rewrite vmap layer") introduced code that does
address calculations under the assumption that VMAP_BLOCK_SIZE is a
power of two.  However, this might not be true if CONFIG_NR_CPUS is not
set to a power of two.

Wrong vmap_block index/offset values could lead to memory corruption.
However, this has never been observed in practice (or never been
diagnosed correctly); what caught this was the BUG_ON in vb_alloc() that
checks for inconsistent vmap_block indices.

To fix this, ensure that VMAP_BLOCK_SIZE always is a power of two.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=31572
Reported-by: Pavel Kysilka <goldenfish@linuxsoft.cz>
Reported-by: Matias A. Fonzo <selk@dragora.org>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Cc: Nick Piggin <npiggin@suse.de>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: 2.6.28+ <stable@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc
Linus Torvalds [Sun, 14 Aug 2011 19:28:15 +0000 (12:28 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/cjb/mmc

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc:
  mmc: remove unused "ddr" parameter in struct mmc_ios
  mmc: dw_mmc: Fix DDR mode support.
  mmc: core: use defined R1_STATE_PRG macro for card status
  mmc: sdhci: use f_max instead of host->clock for timeouts
  mmc: sdhci: move timeout_clk calculation farther down
  mmc: sdhci: check host->clock before using it as a denominator
  mmc: Revert "mmc: sdhci: Fix SDHCI_QUIRK_TIMEOUT_USES_SDCLK"
  mmc: tmio: eliminate unused variable 'mmc' warning
  mmc: esdhc-imx: fix card interrupt loss on freescale eSDHC
  mmc: sdhci-s3c: Fix build for header change
  mmc: dw_mmc: Fix mask in IDMAC_SET_BUFFER1_SIZE macro
  mmc: cb710: fix possible pci_dev leak in cb710_pci_configure()
  mmc: core: Detect eMMC v4.5 ext_csd entries
  mmc: mmc_test: avoid stalled file in debugfs
  mmc: sdhci-s3c: add BROKEN_ADMA_ZEROLEN_DESC quirk
  mmc: sdhci: pxav3: controller needs 32 bit ADMA addressing
  mmc: sdhci: fix retuning timer wrongly deleted in sdhci_tasklet_finish

12 years agoALSA: snd_usb_caiaq: track submitted output urbs
Daniel Mack [Sun, 14 Aug 2011 09:31:16 +0000 (11:31 +0200)]
ALSA: snd_usb_caiaq: track submitted output urbs

The snd_usb_caiaq driver currently assumes that output urbs are serviced
in time and doesn't track when and whether they are given back by the
USB core. That usually works fine, but due to temporary limitations of
the XHCI stack, we faced that urbs were submitted more than once with
this approach.

As it's no good practice to fire and forget urbs anyway, this patch
introduces a proper bit mask to track which requests have been submitted
and given back.

That alone however doesn't make the driver work in case the host
controller is broken and doesn't give back urbs at all, and the output
stream will stop once all pre-allocated output urbs are consumed. But
it does prevent crashes of the controller stack in such cases.

See http://bugzilla.kernel.org/show_bug.cgi?id=40702 for more details.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Reported-and-tested-by: Matej Laitl <matej@laitl.cz>
Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoPM / Domains: Fix build for CONFIG_PM_RUNTIME unset
Rafael J. Wysocki [Sun, 14 Aug 2011 11:34:31 +0000 (13:34 +0200)]
PM / Domains: Fix build for CONFIG_PM_RUNTIME unset

Function genpd_queue_power_off_work() is not defined for
CONFIG_PM_RUNTIME, so pm_genpd_poweroff_unused() causes a build
error to happen in that case.  Fix the problem by making
pm_genpd_poweroff_unused() depend on CONFIG_PM_RUNTIME too.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
12 years agoMerge branch 'perf/core' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux...
Ingo Molnar [Sun, 14 Aug 2011 09:48:29 +0000 (11:48 +0200)]
Merge branch 'perf/core' of git://git./linux/kernel/git/acme/linux into perf/urgent

12 years agoMerge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groec...
Linus Torvalds [Sun, 14 Aug 2011 01:37:28 +0000 (18:37 -0700)]
Merge branch 'hwmon-for-linus' of git://git./linux/kernel/git/groeck/staging

* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/staging:
  hwmon: (ibmaem) add missing kfree
  hwmon: (pmbus/lm25066) Ignore byte writes to non-zero pages
  hwmon: (pmbus) Virtualize pmbus_write_byte

12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Sun, 14 Aug 2011 01:36:28 +0000 (18:36 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ASoC: Fix compile warning in wm8750.c
  ASoC: omap: Update e-mail address of Jarkko Nikula
  ASoC: SAMSUNG: Add I2S0 internal dma driver
  ASoC: Terminate WM8750 SPI device ID table
  ASoC: Add missing break in WM8994 probe
  ALSA: snd-usb-caiaq: Correct offset fields of outbound iso_frame_desc
  ALSA: azt3328 - adjust error handling code to include debugging code
  ALSA: hda - Add CONFIG_SND_HDA_POWER_SAVE to stac_vrefout_set()
  ALSA: usb-audio - Add quirk for BOSS Micro BR-80
  ASoC: Fix typo in wm8750 spi_ids
  ASoC: Fix warning in Speyside WM8962
  ASoC: Fix SPI driver binding for WM8987
  ASoC: Fix binding of WM8750 on Jive
  ASoC: WM8903: Free IRQ on device removal
  ASoC: Tegra: wm8903 machine driver: Allow re-insertion of module
  ASoC: Tegra: tegra_pcm_deallocate_dma_buffer: Don't OOPS

12 years agoDocumentation: befs.txt: no maintainer, orphaned
Marcos Souza [Sat, 13 Aug 2011 19:34:59 +0000 (12:34 -0700)]
Documentation: befs.txt: no maintainer, orphaned

Remove the name of Sergey Kostyliov as maintainer of befs.
In the MAINTAINERS file, befs is orphaned.

Signed-off-by: Marcos Souza <marcos.mage@gmail.com>
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoDocumentation: SubmittingDrivers: fix Linus's git tree URL
Ralf Thielow [Sat, 13 Aug 2011 19:34:57 +0000 (12:34 -0700)]
Documentation: SubmittingDrivers: fix Linus's git tree URL

Change resource URL to new git tree -
(http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git).

Signed-off-by: Ralf Thielow <ralf.thielow@googlemail.com>
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoDocumentation: add Ramoops usage description
Sergiu Iordache [Sat, 13 Aug 2011 19:34:56 +0000 (12:34 -0700)]
Documentation: add Ramoops usage description

Add a documentation file describing the usage of Ramoops

Signed-off-by: Sergiu Iordache <sergiu@chromium.org>
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoDocumentation: email-clients: Add better Thunderbird information
Paul Mcquade [Sat, 13 Aug 2011 19:34:54 +0000 (12:34 -0700)]
Documentation: email-clients: Add better Thunderbird information

Add better Thunderbird information.
Add Thunderbird Registry instructions to:
  Enable UTF8 & Preformat mode
  Disable HTML mode

Signed-off-by: Paul McQuade <paulmcquad@gmail.com>
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoDocumentation: kernel-parameters.txt cleanups
Randy Dunlap [Sat, 13 Aug 2011 19:34:52 +0000 (12:34 -0700)]
Documentation: kernel-parameters.txt cleanups

General cleanups to kernel-parameters.txt:
 - add missing $ARCH that are being used/referenced
 - alphabetize the parameter restrictions list
 - spell "IA-64" as listed in arch/ia64/Kconfig instead of "IA64"
 - remove trailing whitespace
 - use hyphen in 32-bit etc.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoDocumentation: add ARM user_debug to kernel-parameters.txt
Stephen Boyd [Sat, 13 Aug 2011 19:34:50 +0000 (12:34 -0700)]
Documentation: add ARM user_debug to kernel-parameters.txt

Usually kernel parameters are documented in kernel-parameters.txt
but user_debug is only documented in the Kconfig. Document the
option and point to the Kconfig help text for more info.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Cc: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoDocumentation: drop Linux Source Driver from kernel-docs references
Luis de Bethencourt [Sat, 13 Aug 2011 19:34:47 +0000 (12:34 -0700)]
Documentation: drop Linux Source Driver from kernel-docs references

Dropping LSD (Linux Source Driver) since it hasn't been available
for a long time.

Signed-off-by: Luis de Bethencourt <luis@debethencourt.com>
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoDocumentation: fix spelling error in SubmittingPatches
Zac Storer [Sat, 13 Aug 2011 19:34:45 +0000 (12:34 -0700)]
Documentation: fix spelling error in SubmittingPatches

Fixed a spelling error.

Signed-off-by: Zac Storer <zac.3.14159@gmail.com>
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agommc: remove unused "ddr" parameter in struct mmc_ios
Jaehoon Chung [Mon, 8 Aug 2011 09:10:52 +0000 (18:10 +0900)]
mmc: remove unused "ddr" parameter in struct mmc_ios

"mmc: dw_mmc: Fix DDR mode support" removed the last user.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
12 years agommc: dw_mmc: Fix DDR mode support.
Seungwon Jeon [Fri, 5 Aug 2011 03:35:03 +0000 (12:35 +0900)]
mmc: dw_mmc: Fix DDR mode support.

Host driver can't get a hint of DDR mode through ios->ddr flag anymore.
ios->timing is currently used to inform DDR mode as a substitute.
And capability of MMC_CAP_MMC_HIGHSPEED is added for DDR support.

Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
Acked-by: Will Newton <will.newton@imgtec.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
12 years agommc: core: use defined R1_STATE_PRG macro for card status
Jaehoon Chung [Wed, 10 Aug 2011 09:46:28 +0000 (18:46 +0900)]
mmc: core: use defined R1_STATE_PRG macro for card status

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
12 years agommc: sdhci: use f_max instead of host->clock for timeouts
Andy Shevchenko [Wed, 3 Aug 2011 15:36:01 +0000 (18:36 +0300)]
mmc: sdhci: use f_max instead of host->clock for timeouts

When timeout_clk is calculated the host->clock could be zero.
So, instead of host->clock the calculation now uses mmc->f_max.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
12 years agommc: sdhci: move timeout_clk calculation farther down
Andy Shevchenko [Wed, 3 Aug 2011 15:36:00 +0000 (18:36 +0300)]
mmc: sdhci: move timeout_clk calculation farther down

This moves the calculation below the assignment of mmc->f_max, which
we need for calculating timeout_clk in the next patch in this series.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
12 years agommc: sdhci: check host->clock before using it as a denominator
Andy Shevchenko [Wed, 3 Aug 2011 15:35:59 +0000 (18:35 +0300)]
mmc: sdhci: check host->clock before using it as a denominator

Sometimes host->clock could be zero which is a legal situation. This
patch checks host->clock before usage as a denominator when timeout is
calculated. A similar patch is applied for mmc core (see commit e9b8684,
"mmc: fix division by zero in MMC core").

Without this patch, the execution of the sdhci_calc_timeout could end up
with a backtrace:

<0>[    4.014319] divide error: 0000 [#1] PREEMPT SMP
<4>[    4.014352] Modules linked in: g_ether
<4>[    4.014376]
<4>[    4.014393] Pid: 33, comm: kworker/u:2 Not tainted 3.0.0+ #646
<4>[    4.014421] EIP: 0060:[<c12fa38e>] EFLAGS: 00010046 CPU: 1
<4>[    4.014449] EIP is at sdhci_calc_timeout+0x2e/0x100
<4>[    4.014468] EAX: 00000000 EBX: f5930fc8 ECX: 00000000 EDX: 00000000
<4>[    4.014488] ESI: f5291de8 EDI: f5291db8 EBP: f5291c6c ESP: f5291c50
<4>[    4.014508]  DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
<0>[    4.014529] Process kworker/u:2 (pid: 33, ti=f5290000 task=f53065a0 task.ti=f5290000)
<0>[    4.014546] Stack:
<4>[    4.014557]  00000082 c1054fdd f5291c78 04000000 f5930fc8 f5291de8 f5291db8 f5291cac
<4>[    4.014611]  c12fab7c c107a98b f5291c88 c13b6d3f f593109c f5882000 f5291cac c1054fdd
<4>[    4.014663]  00000000 00000000 f5882000 00000082 f5930fc8 f5291db8 0000000a f5291ccc
<0>[    4.014716] Call Trace:
<4>[    4.014743]  [<c1054fdd>] ? mod_timer+0x11d/0x380
<4>[    4.014770]  [<c12fab7c>] sdhci_prepare_data+0x2c/0x3a0
<4>[    4.014798]  [<c107a98b>] ? trace_hardirqs_off+0xb/0x10
<4>[    4.014827]  [<c13b6d3f>] ? _raw_spin_unlock_irqrestore+0x2f/0x60
<4>[    4.014854]  [<c1054fdd>] ? mod_timer+0x11d/0x380
<4>[    4.014880]  [<c12fc7db>] sdhci_send_command+0xdb/0x210
<4>[    4.014906]  [<c12fd5f3>] sdhci_request+0xc3/0x150
<4>[    4.014932]  [<c12ec56a>] mmc_start_request+0xda/0x200
<4>[    4.014960]  [<c120d7c2>] ? __raw_spin_lock_init+0x32/0x60
<4>[    4.014989]  [<c1066a85>] ? __init_waitqueue_head+0x35/0x50
<4>[    4.015015]  [<c12ec70b>] mmc_wait_for_req+0x7b/0x90
<4>[    4.015045]  [<c12f0c67>] mmc_send_cxd_data+0xf7/0x130
<4>[    4.015076]  [<c12ecbc0>] ? mmc_erase+0x140/0x140
<4>[    4.015102]  [<c12f139d>] mmc_send_ext_csd+0x1d/0x20
<4>[    4.015125]  [<c12efef0>] mmc_get_ext_csd+0x70/0x140
<4>[    4.015151]  [<c12effe8>] mmc_compare_ext_csds+0x28/0x190
<4>[    4.015176]  [<c12f039f>] mmc_init_card+0x24f/0x650
<4>[    4.015201]  [<c13b6d5d>] ? _raw_spin_unlock_irqrestore+0x4d/0x60
<4>[    4.015226]  [<c107fd9c>] ? trace_hardirqs_on_caller+0x11c/0x160
<4>[    4.015255]  [<c12f09a4>] mmc_attach_mmc+0xa4/0x190
<4>[    4.015282]  [<c12ee3f0>] mmc_rescan+0x210/0x240
<4>[    4.015311]  [<c105f9b6>] process_one_work+0x176/0x550
<4>[    4.015336]  [<c105f93a>] ? process_one_work+0xfa/0x550
<4>[    4.015360]  [<c12ee1e0>] ? mmc_init_erase+0x140/0x140
<4>[    4.015385]  [<c1061c2a>] worker_thread+0x12a/0x2c0
<4>[    4.015410]  [<c1061b00>] ? manage_workers.clone.18+0x100/0x100
<4>[    4.015437]  [<c1066244>] kthread+0x74/0x80
<4>[    4.015463]  [<c10661d0>] ? __init_kthread_worker+0x60/0x60
<4>[    4.015490]  [<c13b7dfa>] kernel_thread_helper+0x6/0xd
<0>[    4.015507] Code: 57 89 d7 56 53 89 c3 83 ec 10 8b 40 04 8b 72 28 f6 c4 10 89 45 f0 0f 85 91 00 00 00 85 f6 0f 84 c1 00 00 00 8b 4e 04 31 d2 89 c8 <f7> 73 58 ba d3 4d 62 10 89 c1 8b 06 f7 e2 c1 ea 06 01 d1 f7 45
<0>[    4.015829] EIP: [<c12fa38e>] sdhci_calc_timeout+0x2e/0x100 SS:ESP 0068:f5291c50

Reported-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
12 years agommc: Revert "mmc: sdhci: Fix SDHCI_QUIRK_TIMEOUT_USES_SDCLK"
Andy Shevchenko [Wed, 3 Aug 2011 15:35:58 +0000 (18:35 +0300)]
mmc: Revert "mmc: sdhci: Fix SDHCI_QUIRK_TIMEOUT_USES_SDCLK"

This reverts commit 4b01681c7764, which introduced a new potential
divide by zero in the process of fixing one.  The subsequent commits
attempt to fix the issue properly.

Signed-off-by: Chris Ball <cjb@laptop.org>
12 years agommc: tmio: eliminate unused variable 'mmc' warning
Axel Lin [Wed, 3 Aug 2011 06:48:58 +0000 (14:48 +0800)]
mmc: tmio: eliminate unused variable 'mmc' warning

Fix below compile warning:
  CC      drivers/mmc/host/tmio_mmc.o
drivers/mmc/host/tmio_mmc.c: In function 'tmio_mmc_suspend':
drivers/mmc/host/tmio_mmc.c:30: warning: unused variable 'mmc'
drivers/mmc/host/tmio_mmc.c: In function 'tmio_mmc_resume':
drivers/mmc/host/tmio_mmc.c:45: warning: unused variable 'mmc'

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Chris Ball <cjb@laptop.org>
12 years agommc: esdhc-imx: fix card interrupt loss on freescale eSDHC
Tony Lin [Thu, 11 Aug 2011 20:45:59 +0000 (16:45 -0400)]
mmc: esdhc-imx: fix card interrupt loss on freescale eSDHC

Apply a workaround for the imx eSDHC controller to avoid missing
card interrupts.  This makes SDIO work.

Signed-off-by: Tony Lin <tony.lin@freescale.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
12 years agommc: sdhci-s3c: Fix build for header change
Mark Brown [Fri, 29 Jul 2011 14:35:00 +0000 (15:35 +0100)]
mmc: sdhci-s3c: Fix build for header change

A header change has removed an implicit inclusion of module.h, breaking
the build due to the use of THIS_MODULE. Fix that.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
12 years agommc: dw_mmc: Fix mask in IDMAC_SET_BUFFER1_SIZE macro
Shashidhar Hiremath [Fri, 29 Jul 2011 12:49:50 +0000 (08:49 -0400)]
mmc: dw_mmc: Fix mask in IDMAC_SET_BUFFER1_SIZE macro

The mask used inside this macro was assuming Buffer_Size1's [BS1's]
width to be 14 bits, it is actually 13 bits.  Modify masks used in
IDMAC_SET_BUFFER1_SIZE such that they use only 13 bits instead of
current 14.

Signed-off-by: Shashidhar Hiremath <shashidharh@vayavyalabs.com>
Acked-by: Will Newton <will.newton@imgtec.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
12 years agommc: cb710: fix possible pci_dev leak in cb710_pci_configure()
Michał Mirosław [Thu, 28 Jul 2011 18:55:27 +0000 (20:55 +0200)]
mmc: cb710: fix possible pci_dev leak in cb710_pci_configure()

Reported-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Chris Ball <cjb@laptop.org>
12 years agommc: core: Detect eMMC v4.5 ext_csd entries
Kyungmin Park [Tue, 26 Jul 2011 08:12:37 +0000 (17:12 +0900)]
mmc: core: Detect eMMC v4.5 ext_csd entries

The eMMC v4.5 Spec is released now:

EXT_CSD_REV Extended CSD Revision
255-7 Reserved
6 Revision 1.6 (for MMC v4.5)
5 Revision 1.5 (for MMV v4.41)
...

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
12 years agommc: mmc_test: avoid stalled file in debugfs
Andy Shevchenko [Fri, 22 Jul 2011 13:13:36 +0000 (16:13 +0300)]
mmc: mmc_test: avoid stalled file in debugfs

During card removal and inserting cycle the test file in the debugfs could be
stalled until the host driver removes it. Let's keep the file in the linked
list and destroy it when card is removed.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Per Forlin <per.forlin@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
12 years agommc: sdhci-s3c: add BROKEN_ADMA_ZEROLEN_DESC quirk
Jaehoon Chung [Tue, 12 Jul 2011 08:30:47 +0000 (17:30 +0900)]
mmc: sdhci-s3c: add BROKEN_ADMA_ZEROLEN_DESC quirk

Samsung SoCs need to set BROKEN_ADMA_ZEROLEN_DESC.
(If ADMA operation is more than 65535, maybe set by zero.)

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
12 years agommc: sdhci: pxav3: controller needs 32 bit ADMA addressing
Philip Rakity [Mon, 11 Jul 2011 21:47:54 +0000 (14:47 -0700)]
mmc: sdhci: pxav3: controller needs 32 bit ADMA addressing

Enable the quirk.

(Best used in conjunction with patch downgrading ADMA to SDMA when
transfer is not aligned.)

Signed-off-by: Philip Rakity <prakity@marvell.com>
Acked-by: Zhangfei Gao <zhangfei.gao@marvell.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
12 years agommc: sdhci: fix retuning timer wrongly deleted in sdhci_tasklet_finish
Aaron Lu [Mon, 11 Jul 2011 05:27:11 +0000 (13:27 +0800)]
mmc: sdhci: fix retuning timer wrongly deleted in sdhci_tasklet_finish

Currently, the retuning timer for retuning mode 1 will be deleted in
function sdhci_tasklet_finish after a mmc request done, which will make
retuning timing never trigger again. This patch fixed this problem.

Signed-off-by: Aaron Lu <Aaron.Lu@amd.com>
Reviewed-by: Philip Rakity <prakity@marvell.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
12 years agoext4: fix nomblk_io_submit option so it correctly converts uninit blocks
Theodore Ts'o [Sat, 13 Aug 2011 16:58:21 +0000 (12:58 -0400)]
ext4: fix nomblk_io_submit option so it correctly converts uninit blocks

Bug discovered by Jan Kara:

Finally, commit 1449032be17abb69116dbc393f67ceb8bd034f92 returned back
the old IO submission code but apparently it forgot to return the old
handling of uninitialized buffers so we unconditionnaly call
block_write_full_page() without specifying end_io function. So AFAICS
we never convert unwritten extents to written in some cases. For
example when I mount the fs as: mount -t ext4 -o
nomblk_io_submit,dioread_nolock /dev/ubdb /mnt and do
        int fd = open(argv[1], O_RDWR | O_CREAT | O_TRUNC, 0600);
        char buf[1024];
        memset(buf, 'a', sizeof(buf));
        fallocate(fd, 0, 0, 16384);
        write(fd, buf, sizeof(buf));

I get a file full of zeros (after remounting the filesystem so that
pagecache is dropped) instead of seeing the first KB contain 'a's.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: stable@kernel.org
12 years agoext4: Resolve the hang of direct i/o read in handling EXT4_IO_END_UNWRITTEN.
Tao Ma [Sat, 13 Aug 2011 16:30:59 +0000 (12:30 -0400)]
ext4: Resolve the hang of direct i/o read in handling EXT4_IO_END_UNWRITTEN.

EXT4_IO_END_UNWRITTEN flag set and the increase of i_aiodio_unwritten
should be done simultaneously since ext4_end_io_nolock always clear
the flag and decrease the counter in the same time.

We don't increase i_aiodio_unwritten when setting
EXT4_IO_END_UNWRITTEN so it will go nagative and causes some process
to wait forever.

Part of the patch came from Eric in his e-mail, but it doesn't fix the
problem met by Michael actually.

http://marc.info/?l=linux-ext4&m=131316851417460&w=2

Reported-and-Tested-by: Michael Tokarev<mjt@tls.msk.ru>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Tao Ma <boyu.mt@taobao.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: stable@kernel.org
12 years agoext4: call ext4_ioend_wait and ext4_flush_completed_IO in ext4_evict_inode
Jiaying Zhang [Sat, 13 Aug 2011 16:17:13 +0000 (12:17 -0400)]
ext4: call ext4_ioend_wait and ext4_flush_completed_IO in ext4_evict_inode

Flush inode's i_completed_io_list before calling ext4_io_wait to
prevent the following deadlock scenario: A page fault happens while
some process is writing inode A. During page fault,
shrink_icache_memory is called that in turn evicts another inode
B. Inode B has some pending io_end work so it calls ext4_ioend_wait()
that waits for inode B's i_ioend_count to become zero. However, inode
B's ioend work was queued behind some of inode A's ioend work on the
same cpu's ext4-dio-unwritten workqueue. As the ext4-dio-unwritten
thread on that cpu is processing inode A's ioend work, it tries to
grab inode A's i_mutex lock. Since the i_mutex lock of inode A is
still hold before the page fault happened, we enter a deadlock.

Also moves ext4_flush_completed_IO and ext4_ioend_wait from
ext4_destroy_inode() to ext4_evict_inode(). During inode deleteion,
ext4_evict_inode() is called before ext4_destroy_inode() and in
ext4_evict_inode(), we may call ext4_truncate() without holding
i_mutex lock. As a result, there is a race between flush_completed_IO
that is called from ext4_ext_truncate() and ext4_end_io_work, which
may cause corruption on an io_end structure. This change moves
ext4_flush_completed_IO and ext4_ioend_wait from ext4_destroy_inode()
to ext4_evict_inode() to resolve the race between ext4_truncate() and
ext4_end_io_work during inode deletion.

Signed-off-by: Jiaying Zhang <jiayingz@google.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: stable@kernel.org
12 years agoext4: Fix ext4_should_writeback_data() for no-journal mode
Curt Wohlgemuth [Sat, 13 Aug 2011 15:25:18 +0000 (11:25 -0400)]
ext4: Fix ext4_should_writeback_data() for no-journal mode

ext4_should_writeback_data() had an incorrect sequence of
tests to determine if it should return 0 or 1: in
particular, even in no-journal mode, 0 was being returned
for a non-regular-file inode.

This meant that, in non-journal mode, we would use
ext4_journalled_aops for directories, symlinks, and other
non-regular files.  However, calling journalled aop
callbacks when there is no valid handle, can cause problems.

This would cause a kernel crash with Jan Kara's commit
2d859db3e4 ("ext4: fix data corruption in inodes with
journalled data"), because we now dereference 'handle' in
ext4_journalled_write_end().

I also added BUG_ONs to check for a valid handle in the
obviously journal-only aops callbacks.

I tested this running xfstests with a scratch device in
these modes:

   - no-journal
   - data=ordered
   - data=writeback
   - data=journal

All work fine; the data=journal run has many failures and a
crash in xfstests 074, but this is no different from a
vanilla kernel.

Signed-off-by: Curt Wohlgemuth <curtw@google.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: stable@kernel.org
12 years agofirewire: core: handle ack_busy when fetching the Config ROM
Stefan Richter [Sun, 7 Aug 2011 13:20:18 +0000 (15:20 +0200)]
firewire: core: handle ack_busy when fetching the Config ROM

Some older Panasonic made camcorders (Panasonic AG-EZ30 and NV-DX110,
Grundig Scenos DLC 2000) reject requests with ack_busy_X if a request is
sent immediately after they sent a response to a prior transaction.
This causes firewire-core to fail probing of the camcorder with "giving
up on config rom for node id ...".  Consequently, programs like kino or
dvgrab are unaware of the presence of a camcorder.

Such transaction failures happen also with the ieee1394 driver stack
(of the 2.4...2.6 kernel series until 2.6.36 inclusive) but with a lower
likelihood, such that kino or dvgrab are generally able to use these
camcorders via the older driver stack.  The cause for firewire-ohci's or
firewire-core's worse behavior is not yet known.  Gap count optimization
in firewire-core is not the cause.  Perhaps the slightly higher latency
of transaction completion in the older stack plays a role.  (ieee1394:
AR-resp DMA context tasklet -> packet completion ktread -> user process;
firewire-core: tasklet -> user process.)

This change introduces retries and delays after ack_busy_X into
firewire-core's Config ROM reader, such that at least firewire-core's
probing and /dev/fw* creation are successful.  This still leaves the
problem that userland processes are facing transaction failures.
gscanbus's built-in retry routines deal with them successfully, but
neither kino's nor dvgrab's do ever succeed.

But at least DV capture with "dvgrab -noavc -card 0" works now.  Live
video preview in kino works too, but not actual capture.

One way to prevent Configuration ROM reading failures in application
programs is to modify libraw1394 to synthesize read responses by means
of firewire-core's Configuration ROM cache.  This would only leave
CMP and FCP transaction failures as a potential problem source for
applications.

Reported-and-tested-by: Thomas Seilund <tps@netmaster.dk>
Reported-and-tested-by: René Fritz <rene@colorcube.de>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
12 years agoMerge branch 'devicetree/merge' of git://git.secretlab.ca/git/linux-2.6
Linus Torvalds [Sat, 13 Aug 2011 04:59:09 +0000 (21:59 -0700)]
Merge branch 'devicetree/merge' of git://git.secretlab.ca/git/linux-2.6

* 'devicetree/merge' of git://git.secretlab.ca/git/linux-2.6:
  dt: add empty of_get_property for non-dt

12 years agoMerge branch 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Sat, 13 Aug 2011 04:56:53 +0000 (21:56 -0700)]
Merge branch 'usb-linus' of git://git./linux/kernel/git/gregkh/usb-2.6

* 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (30 commits)
  USB: Serial: Add PID(0xF7C0) to FTDI SIO driver for a zeitcontrol-device
  USB: Serial: Add device ID for Sierra Wireless MC8305
  USB: Serial: Added device ID for Qualcomm Modem in Sagemcom's HiLo3G
  usb/host/pci-quirks.c: correct annotation of `ehci_dmi_nohandoff_table'
  USB: option driver: add PID for Vodafone-Huawei K4511
  USB: option driver: add PID for Vodafone-Huawei K4510
  USB: option driver: add PID for Vodafone-Huawei K3771
  USB: option driver: add PID for Vodafone-Huawei K3770
  usb: serial: ftdi_sio.c: For the FT232H FTDI_SIO_SET_BAUDRATE_REQUEST, index needs to be shifted too
  usb/isp1760: Added missing call to usb_hcd_check_unlink_urb() during unlink
  USB: EHCI: Fix test mode sequence
  USB: ftdi_sio: fix minor typo in get_ftdi_divisor
  USB: at91_udc: include linux/prefetch.h explicitly
  USB: usb-storage: unusual_devs entry for ARM V2M motherboard.
  usb/ehci-mxc: add missing inclusion of mach/hardware.h
  USB: assign instead of equal in usbtmc.c
  usb: renesas_usbhs: fixup usbhsg_for_each_uep 1st pos
  usb: renesas_usbhs: fix DMA build by including dma-mapping.h
  usb: gadget: net2272 - Correct includes
  usb: musb: fix oops on musb_gadget_pullup
  ...