]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
10 years agoMerge remote-tracking branch 'mvebu/for-next'
Stephen Rothwell [Fri, 27 Jun 2014 00:41:12 +0000 (10:41 +1000)]
Merge remote-tracking branch 'mvebu/for-next'

Conflicts:
arch/arm/mach-mvebu/Kconfig

10 years agoMerge remote-tracking branch 'imx-mxs/for-next'
Stephen Rothwell [Fri, 27 Jun 2014 00:40:02 +0000 (10:40 +1000)]
Merge remote-tracking branch 'imx-mxs/for-next'

Conflicts:
arch/arm/mach-imx/Kconfig

10 years agoMerge remote-tracking branch 'ep93xx/ep93xx-for-next'
Stephen Rothwell [Fri, 27 Jun 2014 00:39:50 +0000 (10:39 +1000)]
Merge remote-tracking branch 'ep93xx/ep93xx-for-next'

10 years agoMerge remote-tracking branch 'berlin/berlin/for-next'
Stephen Rothwell [Fri, 27 Jun 2014 00:38:52 +0000 (10:38 +1000)]
Merge remote-tracking branch 'berlin/berlin/for-next'

10 years agoMerge remote-tracking branch 'arm/for-next'
Stephen Rothwell [Fri, 27 Jun 2014 00:37:52 +0000 (10:37 +1000)]
Merge remote-tracking branch 'arm/for-next'

10 years agoMerge remote-tracking branch 'arc/for-next'
Stephen Rothwell [Fri, 27 Jun 2014 00:37:00 +0000 (10:37 +1000)]
Merge remote-tracking branch 'arc/for-next'

10 years agoMerge remote-tracking branch 'drm-intel-fixes/for-linux-next-fixes'
Stephen Rothwell [Fri, 27 Jun 2014 00:35:17 +0000 (10:35 +1000)]
Merge remote-tracking branch 'drm-intel-fixes/for-linux-next-fixes'

10 years agoMerge remote-tracking branch 'ide/master'
Stephen Rothwell [Fri, 27 Jun 2014 00:35:08 +0000 (10:35 +1000)]
Merge remote-tracking branch 'ide/master'

10 years agoMerge remote-tracking branch 'crypto-current/master'
Stephen Rothwell [Fri, 27 Jun 2014 00:35:07 +0000 (10:35 +1000)]
Merge remote-tracking branch 'crypto-current/master'

10 years agoMerge remote-tracking branch 'input-current/for-linus'
Stephen Rothwell [Fri, 27 Jun 2014 00:35:05 +0000 (10:35 +1000)]
Merge remote-tracking branch 'input-current/for-linus'

10 years agoMerge remote-tracking branch 'usb-serial-fixes/usb-linus'
Stephen Rothwell [Fri, 27 Jun 2014 00:35:04 +0000 (10:35 +1000)]
Merge remote-tracking branch 'usb-serial-fixes/usb-linus'

10 years agoMerge remote-tracking branch 'usb.current/usb-linus'
Stephen Rothwell [Fri, 27 Jun 2014 00:35:03 +0000 (10:35 +1000)]
Merge remote-tracking branch 'usb.current/usb-linus'

10 years agoMerge remote-tracking branch 'wireless/master'
Stephen Rothwell [Fri, 27 Jun 2014 00:35:02 +0000 (10:35 +1000)]
Merge remote-tracking branch 'wireless/master'

10 years agoMerge remote-tracking branch 'pci-current/for-linus'
Stephen Rothwell [Fri, 27 Jun 2014 00:35:01 +0000 (10:35 +1000)]
Merge remote-tracking branch 'pci-current/for-linus'

10 years agoMerge remote-tracking branch 'sound-current/for-linus'
Stephen Rothwell [Fri, 27 Jun 2014 00:35:00 +0000 (10:35 +1000)]
Merge remote-tracking branch 'sound-current/for-linus'

10 years agoMerge branch 'for-linus' of git://git.kernel.dk/linux-block
Linus Torvalds [Thu, 26 Jun 2014 20:06:13 +0000 (13:06 -0700)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-block

Pull block fixes from Jens Axboe:
 "A small collection of fixes/changes for the current series.  This
  contains:

   - Removal of dead code from Gu Zheng.

   - Revert of two bad fixes that went in earlier in this round, marking
     things as __init that were not purely used from init.

   - A fix for blk_mq_start_hw_queue() using the __blk_mq_run_hw_queue(),
     which could place us wrongly.  Make it use the non __ variant,
     which handles cases where we are called from the wrong CPU set.
     From me.

   - A fix for drbd, which allocates discard requests without room for
     the SCSI payload.  From Lars Ellenberg.

   - A fix for user-after-free in the blkcg code from Tejun.

   - Addition of limiting gaps in SG lists, if the hardware needs it.
     This is the last pre-req patch for blk-mq to enable the full NVMe
     conversion.  Could wait until 3.17, but it's simple enough so would
     be nice to have everything we need for the NVMe port in the 3.17
     release.  From me"

* 'for-linus' of git://git.kernel.dk/linux-block:
  drbd: fix NULL pointer deref in blk_add_request_payload
  blk-mq: blk_mq_start_hw_queue() should use blk_mq_run_hw_queue()
  block: add support for limiting gaps in SG lists
  bio: remove unused macro bip_vec_idx()
  Revert "block: add __init to elv_register"
  Revert "block: add __init to blkcg_policy_register"
  blkcg: fix use-after-free in __blkg_release_rcu() by making blkcg_gq refcnt an atomic_t
  floppy: format block0 read error message properly

10 years agoFix 32-bit regression in block device read(2)
Al Viro [Mon, 23 Jun 2014 07:44:40 +0000 (08:44 +0100)]
Fix 32-bit regression in block device read(2)

blkdev_read_iter() wants to cap the iov_iter by the amount of data
remaining to the end of device.  That's what iov_iter_truncate() is for
(trim iter->count if it's above the given limit).  So far, so good, but
the argument of iov_iter_truncate() is size_t, so on 32bit boxen (in
case of a large device) we end up with that upper limit truncated down
to 32 bits *before* comparing it with iter->count.

Easily fixed by making iov_iter_truncate() take 64bit argument - it does
the right thing after such change (we only reach the assignment in there
when the current value of iter->count is greater than the limit, i.e.
for anything that would get truncated we don't reach the assignment at
all) and that argument is not the new value of iter->count - it's an
upper limit for such.

The overhead of passing u64 is not an issue - the thing is inlined, so
callers passing size_t won't pay any penalty.

Reported-and-tested-by: Theodore Tso <tytso@mit.edu>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Tested-by: Alan Cox <gnomes@lxorguk.ukuu.org.uk>
Tested-by: Bruno Wolff III <bruno@wolff.to>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agoMerge branch 'ath-current' of git://github.com/kvalo/ath
John W. Linville [Thu, 26 Jun 2014 15:39:36 +0000 (11:39 -0400)]
Merge branch 'ath-current' of git://github.com/kvalo/ath

10 years agoALSA: hda - restore BCLK M/N values when resuming HSW/BDW display controller
Mengdong Lin [Thu, 26 Jun 2014 10:45:16 +0000 (18:45 +0800)]
ALSA: hda - restore BCLK M/N values when resuming HSW/BDW display controller

For Intel Haswell/Broadwell display HD-A controller, the 24MHz HD-A link BCLK
is converted from Core Display Clock (CDCLK): BCLK = CDCLK * M / N
And there are two registers EM4 and EM5 to program M, N value respectively.
The EM4/EM5 values will be lost and when the display power well is disabled.

BIOS programs CDCLK selected by OEM and EM4/EM5, but BIOS has no idea about
display power well on/off at runtime. So the M/N can be wrong if non-default
CDCLK is used when the audio controller resumes, which results in an invalid
BCLK and abnormal audio playback rate. So this patch saves and restores valid
M/N values on controller suspend/resume.

And 'struct hda_intel' is defined to contain standard HD-A 'struct azx' and
Intel specific fields, as Takashi suggested.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: usb-audio: Fix races at disconnection and PCM closing
Takashi Iwai [Wed, 25 Jun 2014 12:24:47 +0000 (14:24 +0200)]
ALSA: usb-audio: Fix races at disconnection and PCM closing

When a USB-audio device is disconnected while PCM is still running, we
still see some race: the disconnect callback calls
snd_usb_endpoint_free() that calls release_urbs() and then kfree()
while a PCM stream would be closed at the same time and calls
stop_endpoints() that leads to wait_clear_urbs().  That is, the EP
object might be deallocated while a PCM stream is syncing with
wait_clear_urbs() with the same EP.

Basically calling multiple wait_clear_urbs() would work fine, also
calling wait_clear_urbs() and release_urbs() would work, too, as
wait_clear_urbs() just reads some fields in ep.  The problem is the
succeeding kfree() in snd_pcm_endpoint_free().

This patch moves out the EP deallocation into the later point, the
destructor callback.  At this stage, all PCMs must have been already
closed, so it's safe to free the objects.

Reported-by: Alan Stern <stern@rowland.harvard.edu>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoARC: [SMP] Enable icache coherency
Vineet Gupta [Sun, 17 Feb 2013 10:51:42 +0000 (12:51 +0200)]
ARC: [SMP] Enable icache coherency

icaches are not snooped hence not cohrent in SMP setups which means
kernel has to do cross core calls to ensure the same.

The leaf routine __ic_line_inv_vaddr() now does cross core calls.

__sync_icache_dcache() is affected due to this:

* local dcache line flushed ahead of remote icache inv requests
* can't disable interrupts anymore, since
      __ic_line_inv_vaddr()->on_each_cpu() can deadlock.

| WARNING: CPU: 0 PID: 1 at kernel/smp.c:374
| smp_call_function_many+0x25a/0x2c4()
|
|  init_kprobes+0x90/0xc8
|     register_kprobe+0x1d6/0x510
| __sync_icache_dcache+0x28/0x80
|
|     DISABLE IRQ
|
|     __ic_line_inv_vaddr
| on_each_cpu
|      smp_call_function_many+0x25a/0x2c4   --> WARN
| __ic_line_inv_vaddr_local
|     __dc_line_op

* TODO: Needs to use mask of relevant CPUs to avoid broadcasting

Signed-off-by: Noam Camus <noamc@ezchip.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
10 years agoARC: [SMP] Fix IPI IRQ registration
Noam Camus [Thu, 28 Feb 2013 09:07:06 +0000 (11:07 +0200)]
ARC: [SMP] Fix IPI IRQ registration

Handle it just like timer. Current request_percpu_irq() would fail on
non-boot cpus and thus IRQ will remian unmasked on those cpus.

[vgupta: fix changelong]
Signed-off-by: Noam Camus <noamc@ezchip.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
10 years agoMerge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6
Linus Torvalds [Thu, 26 Jun 2014 04:47:28 +0000 (21:47 -0700)]
Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6

Pull CIFS fixes from Steve French:
 "Small set of misc cifs/smb3 fixes"

* 'for-next' of git://git.samba.org/sfrench/cifs-2.6:
  [CIFS] fix mount failure with broken pathnames when smb3 mount with mapchars option
  cifs: revalidate mapping prior to satisfying read_iter request with cache=loose
  fs/cifs: fix regression in cifs_create_mf_symlink()

10 years agoARC: Implement ptrace(PTRACE_GET_THREAD_AREA)
Anton Kolesov [Fri, 20 Jun 2014 16:28:39 +0000 (20:28 +0400)]
ARC: Implement ptrace(PTRACE_GET_THREAD_AREA)

This patch adds implementation of GET_THREAD_AREA ptrace request type. This
is required by GDB to debug NPTL applications.

Signed-off-by: Anton Kolesov <Anton.Kolesov@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
10 years agoARC: optimize kernel bss clearing in early boot code
Vineet Gupta [Thu, 17 Apr 2014 11:43:26 +0000 (17:13 +0530)]
ARC: optimize kernel bss clearing in early boot code

using ARC ZOL which reduces tot num of instructions by half

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
10 years agoARC: Fix build breakage for !CONFIG_ARC_DW2_UNWIND
Vineet Gupta [Tue, 24 Jun 2014 14:03:39 +0000 (19:33 +0530)]
ARC: Fix build breakage for !CONFIG_ARC_DW2_UNWIND

Fixes: ec7ac6afd07b (ARC: switch to generic ENTRY/END assembler annotations)
Reported-by: Anton Kolesov <akolesov@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
10 years agoMerge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck...
Linus Torvalds [Thu, 26 Jun 2014 04:38:45 +0000 (21:38 -0700)]
Merge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging

Pull hwmon fixes from Guenter Roeck:
 "Various minor fixes"

* tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  hwmon: (gpio-fan) Change name used in hwmon_device_register_with_groups
  hwmon: (emc1403) Fix missing 'select REGMAP_I2C' in Kconfig
  hwmon: (ntc_thermistor) Use the manufacturer name properly
  devicetree: bindings: Document murata vendor prefix
  hwmon: (w83l786ng) Report correct minimum fan speed

10 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Linus Torvalds [Thu, 26 Jun 2014 04:08:24 +0000 (21:08 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

Pull networking fixes from David Miller:

 1) Fix crash in ipvs tot_stats estimator, from Julian Anastasov.

 2) Fix OOPS in nf_nat on netns removal, from Florian Westphal.

 3) Really really really fix locking issues in slip and slcan tty write
    wakeups, from Tyler Hall.

 4) Fix checksum offloading in fec driver, from Fugang Duan.

 5) Off by one in BPF instruction limit test, from Kees Cook.

 6) Need to clear all TSO capability flags when doing software TSO in
    tg3 driver, from Prashant Sreedharan.

 7) Fix memory leak in vlan_reorder_header() error path, from Li
    RongQing.

 8) Fix various bugs in xen-netfront and xen-netback multiqueue support,
    from David Vrabel and Wei Liu.

 9) Fix deadlock in cxgb4 driver, from Li RongQing.

10) Prevent double free of no-cache DST entries, from Eric Dumazet.

11) Bad csum_start handling in skb_segment() leads to crashes when
    forwarding, from Tom Herbert.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (76 commits)
  net: fix setting csum_start in skb_segment()
  ipv4: fix dst race in sk_dst_get()
  net: filter: Use kcalloc/kmalloc_array to allocate arrays
  trivial: net: filter: Change kerneldoc parameter order
  trivial: net: filter: Fix typo in comment
  net: allwinner: emac: Add missing free_irq
  cxgb4: use dev_port to identify ports
  xen-netback: bookkeep number of active queues in our own module
  tg3: Change nvram command timeout value to 50ms
  cxgb4: Not need to hold the adap_rcu_lock lock when read adap_rcu_list
  be2net: fix qnq mode detection on VFs
  of: mdio: fixup of_phy_register_fixed_link parsing of new bindings
  at86rf230: fix irq setup
  net: phy: at803x: fix coccinelle warnings
  net/mlx4_core: Fix the error flow when probing with invalid VF configuration
  tulip: Poll link status more frequently for Comet chips
  net: huawei_cdc_ncm: increase command buffer size
  drivers: net: cpsw: fix dual EMAC stall when connected to same switch
  xen-netfront: recreate queues correctly when reconnecting
  xen-netfront: fix oops when disconnected from backend
  ...

10 years agonet: fix setting csum_start in skb_segment()
Tom Herbert [Wed, 25 Jun 2014 19:51:01 +0000 (12:51 -0700)]
net: fix setting csum_start in skb_segment()

Dave Jones reported that a crash is occurring in

csum_partial
tcp_gso_segment
inet_gso_segment
? update_dl_migration
skb_mac_gso_segment
__skb_gso_segment
dev_hard_start_xmit
sch_direct_xmit
__dev_queue_xmit
? dev_hard_start_xmit
dev_queue_xmit
ip_finish_output
? ip_output
ip_output
ip_forward_finish
ip_forward
ip_rcv_finish
ip_rcv
__netif_receive_skb_core
? __netif_receive_skb_core
? trace_hardirqs_on
__netif_receive_skb
netif_receive_skb_internal
napi_gro_complete
? napi_gro_complete
dev_gro_receive
? dev_gro_receive
napi_gro_receive

It looks like a likely culprit is that SKB_GSO_CB()->csum_start is
not set correctly when doing non-scatter gather. We are using
offset as opposed to doffset.

Reported-by: Dave Jones <davej@redhat.com>
Tested-by: Dave Jones <davej@redhat.com>
Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Fixes: 7e2b10c1e52ca ("net: Support for multiple checksums with gso")
Acked-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoMerge tag 'nfs-for-3.16-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Linus Torvalds [Thu, 26 Jun 2014 03:06:06 +0000 (20:06 -0700)]
Merge tag 'nfs-for-3.16-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs

Pull NFS client fixes from Trond Myklebust:
 "Highlights include:

   - Stable fix for a data corruption case due to incorrect cache
     validation
   - Fix a couple of false positive cache invalidations
   - Fix NFSv4 security negotiation issues"

* tag 'nfs-for-3.16-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
  NFSv4: test SECINFO RPC_AUTH_GSS pseudoflavors for support
  NFS Return -EPERM if no supported or matching SECINFO flavor
  NFS check the return of nfs4_negotiate_security in nfs4_submount
  NFS: Don't mark the data cache as invalid if it has been flushed
  NFS: Clear NFS_INO_REVAL_PAGECACHE when we update the file size
  nfs: Fix cache_validity check in nfs_write_pageuptodate()

10 years agoipv4: fix dst race in sk_dst_get()
Eric Dumazet [Tue, 24 Jun 2014 17:05:11 +0000 (10:05 -0700)]
ipv4: fix dst race in sk_dst_get()

When IP route cache had been removed in linux-3.6, we broke assumption
that dst entries were all freed after rcu grace period. DST_NOCACHE
dst were supposed to be freed from dst_release(). But it appears
we want to keep such dst around, either in UDP sockets or tunnels.

In sk_dst_get() we need to make sure dst refcount is not 0
before incrementing it, or else we might end up freeing a dst
twice.

DST_NOCACHE set on a dst does not mean this dst can not be attached
to a socket or a tunnel.

Then, before actual freeing, we need to observe a rcu grace period
to make sure all other cpus can catch the fact the dst is no longer
usable.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Dormando <dormando@rydia.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: filter: Use kcalloc/kmalloc_array to allocate arrays
Tobias Klauser [Tue, 24 Jun 2014 13:33:22 +0000 (15:33 +0200)]
net: filter: Use kcalloc/kmalloc_array to allocate arrays

Use kcalloc/kmalloc_array to make it clear we're allocating arrays. No
integer overflow can actually happen here, since len/flen is guaranteed
to be less than BPF_MAXINSNS (4096). However, this changed makes sure
we're not going to get one if BPF_MAXINSNS were ever increased.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Acked-by: Daniel Borkmann <dborkman@redhat.com>
Acked-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agotrivial: net: filter: Change kerneldoc parameter order
Tobias Klauser [Tue, 24 Jun 2014 13:33:21 +0000 (15:33 +0200)]
trivial: net: filter: Change kerneldoc parameter order

Change the order of the parameters to sk_unattached_filter_create() in
the kerneldoc to reflect the order they appear in the actual function.

This fix is only cosmetic, in the generated doc they still appear in the
correct order without the fix.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Acked-by: Daniel Borkmann <dborkman@redhat.com>
Acked-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agotrivial: net: filter: Fix typo in comment
Tobias Klauser [Tue, 24 Jun 2014 13:33:20 +0000 (15:33 +0200)]
trivial: net: filter: Fix typo in comment

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Acked-by: Daniel Borkmann <dborkman@redhat.com>
Acked-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: allwinner: emac: Add missing free_irq
Maxime Ripard [Mon, 23 Jun 2014 20:49:40 +0000 (22:49 +0200)]
net: allwinner: emac: Add missing free_irq

If the mdio probe function fails in emac_open, the interrupt we just requested
isn't freed. If emac_open is called again, for example because we try to set up
the interface again, the kernel will oops because the interrupt wasn't properly
released.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: <stable@vger.kernel.org> # 3.11+
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agocxgb4: use dev_port to identify ports
Thadeu Lima de Souza Cascardo [Sat, 21 Jun 2014 12:48:08 +0000 (09:48 -0300)]
cxgb4: use dev_port to identify ports

Commit 3f85944fe207d0225ef21a2c0951d4946fc9a95d ("net: Add sysfs file
for port number") introduce dev_port to network devices. cxgb4 adapters
have multiple ports on the same PCI function, and used dev_id to
identify those ports. That use was removed by commit
8c367fcbe6549195d2eb11e62bea233f811aad41 ("cxgb4: Do not set
net_device::dev_id to VI index"), since dev_id should be used only when
devices share the same MAC address.

Using dev_port for cxgb4 allows different ports on the same PCI function
to be identified.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoxen-netback: bookkeep number of active queues in our own module
Wei Liu [Mon, 23 Jun 2014 09:50:17 +0000 (10:50 +0100)]
xen-netback: bookkeep number of active queues in our own module

The original code uses netdev->real_num_tx_queues to bookkeep number of
queues and invokes netif_set_real_num_tx_queues to set the number of
queues. However, netif_set_real_num_tx_queues doesn't allow
real_num_tx_queues to be smaller than 1, which means setting the number
to 0 will not work and real_num_tx_queues is untouched.

This is bogus when xenvif_free is invoked before any number of queues is
allocated. That function needs to iterate through all queues to free
resources. Using the wrong number of queues results in NULL pointer
dereference.

So we bookkeep the number of queues in xen-netback to solve this
problem. This fixes a regression introduced by multiqueue patchset in
3.16-rc1.

There's another bug in original code that the real number of RX queues
is never set. In current Xen multiqueue design, the number of TX queues
and RX queues are in fact the same. We need to set the numbers of TX and
RX queues to the same value.

Also remove xenvif_select_queue and leave queue selection to core
driver, as suggested by David Miller.

Reported-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
CC: Ian Campbell <ian.campbell@citrix.com>
CC: Paul Durrant <paul.durrant@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agotg3: Change nvram command timeout value to 50ms
Prashant Sreedharan [Sat, 21 Jun 2014 06:28:15 +0000 (23:28 -0700)]
tg3: Change nvram command timeout value to 50ms

Commit 506724c463fcd63477a5e404728a980b71f80bb7 "tg3: Override clock,
link aware and link idle mode during NVRAM dump" changed the timeout
value for nvram command execution from 100ms to 1ms. But the 1ms
timeout value was only sufficient for nvram read operations but not
write operations for most of the devices supported by tg3 driver.
This patch sets the MAX to 50ms. Also it uses usleep_range instead
of udelay.

Signed-off-by: Prashant Sreedharan <prashant@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Suggested-by: David Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agohwmon: (gpio-fan) Change name used in hwmon_device_register_with_groups
Julien D'Ascenzio [Wed, 25 Jun 2014 20:00:31 +0000 (22:00 +0200)]
hwmon: (gpio-fan) Change name used in hwmon_device_register_with_groups

Since commit 648cd48c9e566f53c5df30d79857e0937ae13b09
The hwmon name attributes must not include '-' so the name must be
rename from gpio-fan to gpio_fan

Signed-off-by: Julien D'Ascenzio <jdascenzio@yahoo.fr>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
10 years agoMerge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm...
Linus Torvalds [Wed, 25 Jun 2014 19:19:01 +0000 (12:19 -0700)]
Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC fixes from Arnd Bergmann:
 "A new set of bug fixes for 3.16, containing patches for seven
  platforms:

  at91:
    - drivers/misc fix for Kconfig PWM symbol
    - correction of several values in DT after conversion to CCF
    - fix at91sam9261/at91sam9261ek mistake in slow crystal vs. slow RC osc

  imx:
    - Use GPIO for card CD/WP on imx51-babbage and eukrea-mbimxsd51,
      because controller base CD/WP is not working in esdhc driver due to
      runtime PM support
    - A couple of random ventana gw5xxx board fixes
    - Add IMX_IPUV3_CORE back to defconfig, which gets lost when moving
      IPUv3 driver out of staging tree
    - Fix enet/fec clock selection on imx6sl
    - Fix display node on imx53-m53evk board
    - A couple of Cubox-i updates from Russell, which were omitted from
      the merge window due to dependency

  integrator:
    - fix an OF-related regression against 3.15

  mvebu:
    - mvebu (v7)
       - Fix broken SoC ID detection
       - Select ARM_CPU_SUSPEND for v7
       - Remove armada38x compatible string (no users yet)
       - Enable Dove SoC in mvebu_v7_defconfig
    - kirkwood
       - Fix phy-connection-type on GuruPlug board

  qcom:
    - enable gsbi driver in defconfig
    - fix section mismatch warning in serial driver

  samsung:
    - use WFI macro in platform_do_lowpower because exynos cpuhotplug
      includes a hardcoded WFI instruction and it causes compile error
      in Thumb-2 mode.
    - fix GIC reg sizes for exynos4 SoCs
    - remove reset timer counter value during boot and resume for mct
      to fix a big jump in printk timestamps
    - fix pm code to check cortex-A9 for another exynos SoCs
    - don't rely on firmware's secondary_cpu_start for mcpm

  sti:
    - Ethernet clocks were wrongly defined for STiH415/416 platforms
    - STiH416 B2020 revision E DTS file name contained uppercase, change to
      lowercase"

* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (33 commits)
  ARM: at91/dt: sam9261: remove slow RC osc
  ARM: at91/dt: define sam9261ek slow crystal frequency
  ARM: at91/dt: sam9261: correctly define mainck
  ARM: at91/dt: sam9n12: correct PLLA ICPLL and OUT values
  ARM: at91/dt: sam9x5: correct PLLA ICPLL and OUT values
  misc: atmel_pwm: fix Kconfig symbols
  ARM: integrator: fix OF-related regression
  ARM: mvebu: Fix the improper use of the compatible string armada38x using a wildcard
  ARM: dts: kirkwood: fix phy-connection-type for Guruplug
  ARM: EXYNOS: Don't rely on firmware's secondary_cpu_start for mcpm
  ARM: dts: imx51-eukrea-mbimxsd51-baseboard: unbreak esdhc.
  ARM: dts: imx51-babbage: Fix esdhc setup
  ARM: dts: mx5: Move the display out of soc {} node
  ARM: dts: mx5: Fix IPU port node placement
  ARM: mvebu: select ARM_CPU_SUSPEND for Marvell EBU v7 platforms
  ARM: mvebu: Fix broken SoC ID detection
  ARM: imx_v6_v7_defconfig: Enable CONFIG_IMX_IPUV3_CORE
  ARM: multi_v7_defconfig: Add QCOM GSBI driver
  ARM: stih41x: Rename stih416-b2020-revE.dts to stih416-b2020e.dts
  tty: serial: msm: Fix section mismatch warning
  ...

10 years agobrcmfmac: assign chip id and rev in bus interface after brcmf_usb_dlneeded
Arend van Spriel [Fri, 20 Jun 2014 20:19:25 +0000 (22:19 +0200)]
brcmfmac: assign chip id and rev in bus interface after brcmf_usb_dlneeded

The function brcmf_usb_dlneeded() queries the device to obtain the chip
id and revision. So assigning these in bus interface before the call
resulted in chip id and revision being zero. This was introduced by:

   commit 5b8045d484d0ef77d6aa9444023220c5671fa3fe
   Author: Arend van Spriel <arend@broadcom.com>
   Date:   Tue May 27 12:56:23 2014 +0200

       brcmfmac: use asynchronous firmware request in USB

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agomwifiex: fix Tx timeout issue
Amitkumar Karwar [Fri, 20 Jun 2014 18:45:25 +0000 (11:45 -0700)]
mwifiex: fix Tx timeout issue

https://bugzilla.kernel.org/show_bug.cgi?id=70191
https://bugzilla.kernel.org/show_bug.cgi?id=77581

It is observed that sometimes Tx packet is downloaded without
adding driver's txpd header. This results in firmware parsing
garbage data as packet length. Sometimes firmware is unable
to read the packet if length comes out as invalid. This stops
further traffic and timeout occurs.

The root cause is uninitialized fields in tx_info(skb->cb) of
packet used to get garbage values. In this case if
MWIFIEX_BUF_FLAG_REQUEUED_PKT flag is mistakenly set, txpd
header was skipped. This patch makes sure that tx_info is
correctly initialized to fix the problem.

Cc: <stable@vger.kernel.org>
Reported-by: Andrew Wiley <wiley.andrew.j@gmail.com>
Reported-by: Linus Gasser <list@markas-al-nour.org>
Reported-by: Michael Hirsch <hirsch@teufel.de>
Tested-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Maithili Hinge <maithili@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoMerge tag 'at91-fixes' of git://github.com/at91linux/linux-at91 into fixes
Arnd Bergmann [Wed, 25 Jun 2014 18:27:15 +0000 (20:27 +0200)]
Merge tag 'at91-fixes' of git://github.com/at91linux/linux-at91 into fixes

Merge "First AT91 fixes batch for 3.16" from Nicolas Ferre:

- drivers/misc fix for Kconfig PWM symbol
- correction of several values in DT after conversion to CCF
- fix at91sam9261/at91sam9261ek mistake in slow crystal vs. slow RC osc

* tag 'at91-fixes' of git://github.com/at91linux/linux-at91:
  ARM: at91/dt: sam9261: remove slow RC osc
  ARM: at91/dt: define sam9261ek slow crystal frequency
  ARM: at91/dt: sam9261: correctly define mainck
  ARM: at91/dt: sam9n12: correct PLLA ICPLL and OUT values
  ARM: at91/dt: sam9x5: correct PLLA ICPLL and OUT values
  misc: atmel_pwm: fix Kconfig symbols

10 years agoMerge tag 'mvebu-fixes-3.16' of git://git.infradead.org/linux-mvebu into fixes
Arnd Bergmann [Wed, 25 Jun 2014 13:34:00 +0000 (15:34 +0200)]
Merge tag 'mvebu-fixes-3.16' of git://git.infradead.org/linux-mvebu into fixes

Merge "mvebu fixes for v3.16" from Jason Cooper:

 - mvebu
    - Fix broken SoC ID detection
    - Select ARM_CPU_SUSPEND for v7
    - Remove armada38x compatible string (no users yet)

 - kirkwood
    - Fix phy-connection-type on GuruPlug board

* tag 'mvebu-fixes-3.16' of git://git.infradead.org/linux-mvebu:
  ARM: mvebu: Fix the improper use of the compatible string armada38x using a wildcard
  ARM: dts: kirkwood: fix phy-connection-type for Guruplug
  ARM: mvebu: select ARM_CPU_SUSPEND for Marvell EBU v7 platforms
  ARM: mvebu: Fix broken SoC ID detection

10 years agoMerge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetoot...
John W. Linville [Wed, 25 Jun 2014 18:22:35 +0000 (14:22 -0400)]
Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth

10 years agoMerge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi...
John W. Linville [Wed, 25 Jun 2014 18:20:22 +0000 (14:20 -0400)]
Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes

10 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211
John W. Linville [Wed, 25 Jun 2014 18:17:50 +0000 (14:17 -0400)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211

10 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph...
Linus Torvalds [Wed, 25 Jun 2014 17:34:17 +0000 (10:34 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client

Pull Ceph fix from Sage Weil:
 "This fixes a corner case for cloned RBD images"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
  rbd: handle parent_overlap on writes correctly

10 years agoMerge branch 'imx/dt' into for-next
Shawn Guo [Wed, 25 Jun 2014 16:24:43 +0000 (00:24 +0800)]
Merge branch 'imx/dt' into for-next

10 years agoMerge branch 'imx/soc' into for-next
Shawn Guo [Wed, 25 Jun 2014 16:24:38 +0000 (00:24 +0800)]
Merge branch 'imx/soc' into for-next

10 years agoARM: dts: mx6: Disable the keypad in the dtsi files
Fabio Estevam [Wed, 25 Jun 2014 00:13:44 +0000 (21:13 -0300)]
ARM: dts: mx6: Disable the keypad in the dtsi files

When booting a board that does not have a keypad (such as imx6q-sabresd) the
following error is seen on boot:

imx-keypad 20b8000.kpp: OF: linux,keymap property not defined in /soc/aips-bus@02000000/kpp@020b8000
imx-keypad 20b8000.kpp: failed to build keymap
imx-keypad: probe of 20b8000.kpp failed with error -2

Let's disable the keypad functionality in the dtsi files and let each board dts
enable it when needed.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
10 years agoARM: i.MX21 clk: Add devicetree support
Alexander Shiyan [Sun, 22 Jun 2014 13:17:09 +0000 (17:17 +0400)]
ARM: i.MX21 clk: Add devicetree support

This patch adds devicetree support CCM module for i.MX21 CPUs.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
10 years agoARM: i.MX21 clk: Cleanup driver
Alexander Shiyan [Sun, 22 Jun 2014 13:17:08 +0000 (17:17 +0400)]
ARM: i.MX21 clk: Cleanup driver

This is a cleanup for i.MX21 clk driver. This change includes:
- Reduce license text.
- Remove unused definitions.
- Remove unused #include and sort the rest.
- Remove useless comment.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
10 years agoARM: i.MX21 clk: Remove clk_register_clkdev() for unused clocks
Alexander Shiyan [Sun, 22 Jun 2014 13:17:07 +0000 (17:17 +0400)]
ARM: i.MX21 clk: Remove clk_register_clkdev() for unused clocks

This patch removes clk_register_clkdev() for the clocks that do not
have any users for boards and drivers.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
10 years agoARM: i.MX21 clk: Clock initialization rework
Alexander Shiyan [Sun, 22 Jun 2014 13:17:06 +0000 (17:17 +0400)]
ARM: i.MX21 clk: Clock initialization rework

This patch perform rework i.MX21 clock initialization. This includes
adding missing clocks and sort clocks by register address.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
10 years agoARM: imx: add cpufreq support for i.mx6sx
Anson Huang [Wed, 25 Jun 2014 09:10:12 +0000 (17:10 +0800)]
ARM: imx: add cpufreq support for i.mx6sx

Add cpufreq support for i.MX6SX, using common
i.MX6Q cpufreq driver.

Signed-off-by: Anson Huang <b20788@freescale.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
10 years agoARM: clk-imx51-imx53: Remove clk_register_clkdev()
Fabio Estevam [Tue, 24 Jun 2014 18:42:58 +0000 (15:42 -0300)]
ARM: clk-imx51-imx53: Remove clk_register_clkdev()

mx51 and mx53 are device tree only platforms, so we no longer need all these
calls to clk_register_clkdev().

Only keep cpu0 and gpc_dvfs clk_register_clkdev() calls.

Tested on imx51-babbage and imx53-qsb boards.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
10 years agoARM: at91/dt: sam9261: remove slow RC osc
Alexandre Belloni [Mon, 23 Jun 2014 06:51:41 +0000 (08:51 +0200)]
ARM: at91/dt: sam9261: remove slow RC osc

The at91sam9261 doesn't actually have a slow RC oscillator, remove it from the
dtsi.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Boris BREZILLON <boris.brezillon@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
10 years agodrbd: fix NULL pointer deref in blk_add_request_payload
Lars Ellenberg [Wed, 25 Jun 2014 15:52:38 +0000 (17:52 +0200)]
drbd: fix NULL pointer deref in blk_add_request_payload

Discards don't have any payload.
But the scsi layer still expects a bio_vec it can use internally,
see sd_setup_discard_cmnd() and blk_add_request_payload().

Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
10 years agoALSA: hda - Adjust speaker HPF and add LED support for HP Spectre 13
Takashi Iwai [Tue, 24 Jun 2014 11:55:25 +0000 (13:55 +0200)]
ALSA: hda - Adjust speaker HPF and add LED support for HP Spectre 13

HP Spectre 13 has the IDT 92HD95 codec, and BIOS seems to set the
default high-pass filter in some "safer" range, which results in the
very soft tone from the built-in speakers in contrast to Windows.
Also, the mute LED control is missing, since 92HD95 codec still has no
HP-specific fixups for GPIO setups.

This patch adds these missing features: the HPF is adjusted by the
vendor-specific verb, and the LED is set up from a DMI string (but
with the default polarity = 0 assumption due to the incomplete BIOS on
the given machine).

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=74841
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoARM: at91/dt: define sam9261ek slow crystal frequency
Alexandre Belloni [Sat, 14 Jun 2014 00:10:43 +0000 (02:10 +0200)]
ARM: at91/dt: define sam9261ek slow crystal frequency

Define at91sam9261ek's slow crystal frequencies.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Boris BREZILLON <boris.brezillon@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
10 years agoARM: at91/dt: sam9261: correctly define mainck
Alexandre Belloni [Fri, 13 Jun 2014 12:02:29 +0000 (14:02 +0200)]
ARM: at91/dt: sam9261: correctly define mainck

mainck (CKGR_MCFR register) is actually using main_osc (CKGR_MOR register).

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Boris BREZILLON <boris.brezillon@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
10 years agoARM: at91/dt: sam9n12: correct PLLA ICPLL and OUT values
Alexandre Belloni [Fri, 13 Jun 2014 11:28:12 +0000 (13:28 +0200)]
ARM: at91/dt: sam9n12: correct PLLA ICPLL and OUT values

ICPLL can only take 0 or 1, it got mixed with OUT which can be in the [0-3]
range.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Boris BREZILLON <boris.brezillon@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
10 years agoARM: at91/dt: sam9x5: correct PLLA ICPLL and OUT values
Alexandre Belloni [Fri, 13 Jun 2014 11:25:34 +0000 (13:25 +0200)]
ARM: at91/dt: sam9x5: correct PLLA ICPLL and OUT values

ICPLL can only take 0 or 1, it got mixed with OUT which can be in the [0-3]
range.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Boris BREZILLON <boris.brezillon@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
10 years agoARM: dts: cubox-i: disable spread-spectrum for Cubox-i eSATA
Russell King [Tue, 24 Jun 2014 10:20:03 +0000 (11:20 +0100)]
ARM: dts: cubox-i: disable spread-spectrum for Cubox-i eSATA

Spread-spectrum doesn't work with Cubox-i hardware.  eSATA devices are
detected, but then fail on normal IO.  Therefore, disable this feature.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
10 years agoARM: dts: cubox-i: add eSATA DT configuration
Russell King [Tue, 24 Jun 2014 10:19:58 +0000 (11:19 +0100)]
ARM: dts: cubox-i: add eSATA DT configuration

Add the transmit level, boost and attenuation parameters necessary for
the eSATA interface on Cubox-i to work.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
10 years agoARM: dts: imx6sx-sdb: Add PMIC support
Fabio Estevam [Mon, 23 Jun 2014 14:21:06 +0000 (11:21 -0300)]
ARM: dts: imx6sx-sdb: Add PMIC support

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
10 years agoARM: dts: imx6sx-sdb: Add USB support
Fabio Estevam [Mon, 23 Jun 2014 14:21:05 +0000 (11:21 -0300)]
ARM: dts: imx6sx-sdb: Add USB support

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
10 years agoARM: dts: imx6sx: Fix usbmisc compatible string
Fabio Estevam [Mon, 23 Jun 2014 14:21:04 +0000 (11:21 -0300)]
ARM: dts: imx6sx: Fix usbmisc compatible string

Fix usbmisc compatible string so that usbmisc node can be found and USB
functionality can be functional.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
10 years agoARM: imx: add standby mode support for suspend
Anson Huang [Mon, 23 Jun 2014 08:42:44 +0000 (16:42 +0800)]
ARM: imx: add standby mode support for suspend

Add standby mode support for suspend, to enter standby mode:

echo standby > /sys/power/state;

Use UART or RTC alarm to wake up system, when system enters
standby mode, SOC will enter STOP mode with ARM core kept
power on and 24M XTAL on.

Signed-off-by: Anson Huang <b20788@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
10 years agoARM: imx: mem bit must be cleared before entering DSM mode
Anson Huang [Mon, 23 Jun 2014 08:42:43 +0000 (16:42 +0800)]
ARM: imx: mem bit must be cleared before entering DSM mode

According to hardware design, mem bit must be clear before
entering DSM mode, as ARM core will be power gated in DSM mode.

Signed-off-by: Anson Huang <b20788@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
10 years agohwmon: (emc1403) Fix missing 'select REGMAP_I2C' in Kconfig
Josef Gajdusek [Wed, 25 Jun 2014 14:21:21 +0000 (16:21 +0200)]
hwmon: (emc1403) Fix missing 'select REGMAP_I2C' in Kconfig

In commit 4cab259f, the emc1403 driver was converted to use regmap but the
necessary Kconfig option was not added.

Signed-off-by: Josef Gajdusek <atx@atx.name>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
10 years agoblk-mq: blk_mq_start_hw_queue() should use blk_mq_run_hw_queue()
Jens Axboe [Wed, 25 Jun 2014 14:22:34 +0000 (08:22 -0600)]
blk-mq: blk_mq_start_hw_queue() should use blk_mq_run_hw_queue()

Currently it calls __blk_mq_run_hw_queue(), which depends on the
CPU placement being correct. This means it's not possible to call
blk_mq_start_hw_queues(q) from a context that is correct for all
queues, leading to triggering the

WARN_ON(!cpumask_test_cpu(raw_smp_processor_id(), hctx->cpumask));

in __blk_mq_run_hw_queue().

Reported-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
10 years agohwmon: (ntc_thermistor) Use the manufacturer name properly
Naveen Krishna Chatradhi [Wed, 25 Jun 2014 06:29:31 +0000 (11:59 +0530)]
hwmon: (ntc_thermistor) Use the manufacturer name properly

Murata Manufacturing Co., Ltd is the vendor for
NTC (Negative Temperature coefficient) based Thermistors.
But, the driver extensively uses "NTC" as the vendor name.

This patch corrects the vendor name also updates the
compatibility strings according to the vendor-prefix.txt

Note: Drivers continue to support the previous compatible strings
but further addition of these compatible strings in device tree
is deprecated.

Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Reviewed-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
10 years agodevicetree: bindings: Document murata vendor prefix
Naveen Krishna Chatradhi [Wed, 25 Jun 2014 06:29:30 +0000 (11:59 +0530)]
devicetree: bindings: Document murata vendor prefix

Add Murata Manufacturing Co., Ltd. to the list of device tree
vendor prefixes.

Murata manufactures NTC (Negative Temperature Coefficient) based
Thermistors for small scale applications like Mobiles and PDAs.

Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
10 years agohwmon: (w83l786ng) Report correct minimum fan speed
Axel Lin [Wed, 25 Jun 2014 01:02:32 +0000 (09:02 +0800)]
hwmon: (w83l786ng) Report correct minimum fan speed

Current code is buggy, it shows the current fan speed as minimum fan speed.
Fix up show_fan_reg macro to correctly report fan and fan_min speed.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Kevin Lo <kevlo@kevlo.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
10 years agocrypto: sha512_ssse3 - fix byte count to bit count conversion
Jussi Kivilinna [Mon, 23 Jun 2014 16:41:05 +0000 (19:41 +0300)]
crypto: sha512_ssse3 - fix byte count to bit count conversion

Byte-to-bit-count computation is only partly converted to big-endian and is
mixing in CPU-endian values. Problem was noticed by sparce with warning:

  CHECK   arch/x86/crypto/sha512_ssse3_glue.c
arch/x86/crypto/sha512_ssse3_glue.c:144:19: warning: restricted __be64 degrades to integer
arch/x86/crypto/sha512_ssse3_glue.c:144:17: warning: incorrect type in assignment (different base types)
arch/x86/crypto/sha512_ssse3_glue.c:144:17:    expected restricted __be64 <noident>
arch/x86/crypto/sha512_ssse3_glue.c:144:17:    got unsigned long long

Cc: <stable@vger.kernel.org>
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
Acked-by: Tim Chen <tim.c.chen@linux.intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
10 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Linus Torvalds [Wed, 25 Jun 2014 12:44:17 +0000 (05:44 -0700)]
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc

Pull powerpc fixes and cleanups from Ben Herrenschmidt:
 "Here are a handful or two of powerpc fixes and simple/trivial
  cleanups.  A bunch of them fix ftrace with the new ABI v2 in Little
  Endian, the rest is a scattering of fairly simple things"

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
  powerpc: Don't skip ePAPR spin-table CPUs
  powerpc/module: Fix TOC symbol CRC
  powerpc/powernv: Remove OPAL v1 takeover
  powerpc/kmemleak: Do not scan the DART table
  selftests/powerpc: Use the test harness for the TM DSCR test
  powerpc/cell: cbe_thermal.c: Cleaning up a variable is of the wrong type
  powerpc/kprobes: Fix jprobes on ABI v2 (LE)
  powerpc/ftrace: Use pr_fmt() to namespace error messages
  powerpc/ftrace: Fix nop of modules on 64bit LE (ABIv2)
  powerpc/ftrace: Fix inverted check of create_branch()
  powerpc/ftrace: Fix typo in mask of opcode
  powerpc: Add ppc_global_function_entry()
  powerpc/macintosh/smu.c: Fix closing brace followed by if
  powerpc: Remove __arch_swab*
  powerpc: Remove ancient DEBUG_SIG code
  powerpc/kerenl: Enable EEH for IO accessors

10 years agoMerge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
Linus Torvalds [Wed, 25 Jun 2014 12:30:20 +0000 (05:30 -0700)]
Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost

Pull vhost cleanups from Michael S Tsirkin:
 "Two cleanup patches removing code duplication that got introduced by
  changes in rc1.  Not fixing crashes, but I'd rather not carry the
  duplicate code until the next merge window"

* tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
  vhost-scsi: don't open-code kvfree
  vhost-net: don't open-code kvfree

10 years agoMerge tag 'trace-fixes-v3.16-rc1-v2' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Wed, 25 Jun 2014 12:08:09 +0000 (05:08 -0700)]
Merge tag 'trace-fixes-v3.16-rc1-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace

Pull tracing cleanups and fixes from Steven Rostedt:
 "This includes three patches from Oleg Nesterov.  The first is a fix to
  a race condition that happens between enabling/disabling syscall
  tracepoints and new process creations (the check to go into the ptrace
  path for a process can be set when it shouldn't, or not set when it
  should).  Not a major bug but one that should be fixed and even
  applied to stable.

  The other two patches are cleanup/fixes that are not that critical,
  but for an -rc1 release would be nice to have.  They both deal with
  syscall tracepoints.

  It also includes a patch to introduce a new macro for the
  TRACE_EVENT() format called __field_struct().  Originally, __field()
  was used to record any variable into a trace event, but with the
  addition of setting the "is signed" attribute, the check causes
  anything but a primitive variable to fail to compile.  That is,
  structs and unions can't be used as they once were.  When the "is
  signed" check was introduce there were only primitive variables being
  recorded.  But that will change soon and it was reported that
  __field() causes build failures.

  To solve the __field() issue, __field_struct() is introduced to allow
  trace_events to be able to record complex types too"

* tag 'trace-fixes-v3.16-rc1-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
  tracing: Add __field_struct macro for TRACE_EVENT()
  tracing: syscall_regfunc() should not skip kernel threads
  tracing: Change syscall_*regfunc() to check PF_KTHREAD and use for_each_process_thread()
  tracing: Fix syscall_*regfunc() vs copy_process() race

10 years agomisc: atmel_pwm: fix Kconfig symbols
Nicolas Ferre [Wed, 25 Jun 2014 09:33:44 +0000 (11:33 +0200)]
misc: atmel_pwm: fix Kconfig symbols

AT91 symbols AT91SAM9263, AT91SAM9RL, and AT91SAM9G45 do not exist and this
patch changes them to their correct ARCH_* version.
These symbols are chosen instead of the SOC_* ones because this driver is not
converted to DT.
Anyway, the ATMEL_PWM symbol and the associated driver will be removed soon,
during the move to the PWM sub-system.

Reported-by: Paul Bolle <pebolle@tiscali.nl>
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
10 years agodrm/i915: vlv_prepare_pll is only needed in case of non DSI interfaces
Shobhit Kumar [Wed, 25 Jun 2014 06:50:39 +0000 (12:20 +0530)]
drm/i915: vlv_prepare_pll is only needed in case of non DSI interfaces

For MIPI, DSI PLL is configured separately in vlv_configure_dsi_pll
during the DSI enable sequence

Causing WARN dump otherwise in dpio_reads

v2: Add IS_CHERRYVIEW check as suggested by Ville

Signed-off-by: Shobhit Kumar <shobhit.kumar@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
10 years agoARM: dts: imx6sx: iomux-gpr syscon is compatible to imx6q
Anson Huang [Mon, 23 Jun 2014 06:04:01 +0000 (14:04 +0800)]
ARM: dts: imx6sx: iomux-gpr syscon is compatible to imx6q

The imx6sx iomuxc-gpr syscon is compatible to imx6q, so let's add
compatible string 'fsl,imx6q-iomuxc-gpr' for imx6sx iomuxc-gpr syscon node.

This is necessary to enable SW workaround for ERR007265,
please refer to imx6_pm_common_init of arch/arm/mach-imx/pm-imx6.c
for detail.

Signed-off-by: Anson Huang <b20788@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
10 years agopowerpc: Don't skip ePAPR spin-table CPUs
Scott Wood [Wed, 25 Jun 2014 01:15:51 +0000 (20:15 -0500)]
powerpc: Don't skip ePAPR spin-table CPUs

Commit 59a53afe70fd530040bdc69581f03d880157f15a "powerpc: Don't setup
CPUs with bad status" broke ePAPR SMP booting.  ePAPR says that CPUs
that aren't presently running shall have status of disabled, with
enable-method being used to determine whether the CPU can be enabled.

Fix by checking for spin-table, which is currently the only supported
enable-method.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Cc: Michael Neuling <mikey@neuling.org>
Cc: Emil Medve <Emilian.Medve@Freescale.com>
Cc: stable@vger.kernel.org
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
10 years agopowerpc/module: Fix TOC symbol CRC
Laurent Dufour [Tue, 24 Jun 2014 08:53:59 +0000 (10:53 +0200)]
powerpc/module: Fix TOC symbol CRC

The commit 71ec7c55ed91 introduced the magic symbol ".TOC." for ELFv2 ABI.
This symbol is built manually and has no CRC value computed. A zero value
is put in the CRC section to avoid modpost complaining about a missing CRC.
Unfortunately, this breaks the kernel module loading when the kernel is
relocated (kdump case for instance) because of the relocation applied to
the kcrctab values.

This patch compute a CRC value for the TOC symbol which will match the one
compute by the kernel when it is relocated - aka '0 - relocate_start' done in
maybe_relocated called by check_version (module.c).

Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Cc: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
10 years agopowerpc/powernv: Remove OPAL v1 takeover
Michael Ellerman [Tue, 24 Jun 2014 07:17:47 +0000 (17:17 +1000)]
powerpc/powernv: Remove OPAL v1 takeover

In commit 27f4488872d9 "Add OPAL takeover from PowerVM" we added support
for "takeover" on OPAL v1 machines.

This was a mode of operation where we would boot under pHyp, and query
for the presence of OPAL. If detected we would then do a special
sequence to take over the machine, and the kernel would end up running
in hypervisor mode.

OPAL v1 was never a supported product, and was never shipped outside
IBM. As far as we know no one is still using it.

Newer versions of OPAL do not use the takeover mechanism. Although the
query for OPAL should be harmless on machines with newer OPAL, we have
seen a machine where it causes a crash in Open Firmware.

The code in early_init_devtree() to copy boot_command_line into cmd_line
was added in commit 817c21ad9a1f "Get kernel command line accross OPAL
takeover", and AFAIK is only used by takeover, so should also be
removed.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
10 years agocxgb4: Not need to hold the adap_rcu_lock lock when read adap_rcu_list
Li RongQing [Fri, 20 Jun 2014 09:32:36 +0000 (17:32 +0800)]
cxgb4: Not need to hold the adap_rcu_lock lock when read adap_rcu_list

cxgb4_netdev maybe lead to dead lock, since it uses a spin lock, and be called
in both thread and softirq context, but not disable BH, the lockdep report is
below; In fact, cxgb4_netdev only reads adap_rcu_list with RCU protection, so
not need to hold spin lock again.
=================================
[ INFO: inconsistent lock state ]
3.14.7+ #24 Tainted: G         C O
---------------------------------
inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage.
radvd/3794 [HC0[0]:SC1[1]:HE1:SE0] takes:
 (adap_rcu_lock){+.?...}, at: [<ffffffffa09989ea>] clip_add+0x2c/0x116 [cxgb4]
{SOFTIRQ-ON-W} state was registered at:
  [<ffffffff810fca81>] __lock_acquire+0x34a/0xe48
  [<ffffffff810fd98b>] lock_acquire+0x82/0x9d
  [<ffffffff815d6ff8>] _raw_spin_lock+0x34/0x43
  [<ffffffffa09989ea>] clip_add+0x2c/0x116 [cxgb4]
  [<ffffffffa0998beb>] cxgb4_inet6addr_handler+0x117/0x12c [cxgb4]
  [<ffffffff815da98b>] notifier_call_chain+0x32/0x5c
  [<ffffffff815da9f9>] __atomic_notifier_call_chain+0x44/0x6e
  [<ffffffff815daa32>] atomic_notifier_call_chain+0xf/0x11
  [<ffffffff815b1356>] inet6addr_notifier_call_chain+0x16/0x18
  [<ffffffffa01f72e5>] ipv6_add_addr+0x404/0x46e [ipv6]
  [<ffffffffa01f8df0>] addrconf_add_linklocal+0x5f/0x95 [ipv6]
  [<ffffffffa01fc3e9>] addrconf_notify+0x632/0x841 [ipv6]
  [<ffffffff815da98b>] notifier_call_chain+0x32/0x5c
  [<ffffffff810e09a1>] __raw_notifier_call_chain+0x9/0xb
  [<ffffffff810e09b2>] raw_notifier_call_chain+0xf/0x11
  [<ffffffff8151b3b7>] call_netdevice_notifiers_info+0x4e/0x56
  [<ffffffff8151b3d0>] call_netdevice_notifiers+0x11/0x13
  [<ffffffff8151c0a6>] netdev_state_change+0x1f/0x38
  [<ffffffff8152f004>] linkwatch_do_dev+0x3b/0x49
  [<ffffffff8152f184>] __linkwatch_run_queue+0x10b/0x144
  [<ffffffff8152f1dd>] linkwatch_event+0x20/0x27
  [<ffffffff810d7bc0>] process_one_work+0x1cb/0x2ee
  [<ffffffff810d7e3b>] worker_thread+0x12e/0x1fc
  [<ffffffff810dd391>] kthread+0xc4/0xcc
  [<ffffffff815dc48c>] ret_from_fork+0x7c/0xb0
irq event stamp: 3388
hardirqs last  enabled at (3388): [<ffffffff810c6c85>]
__local_bh_enable_ip+0xaa/0xd9
hardirqs last disabled at (3387): [<ffffffff810c6c2d>]
__local_bh_enable_ip+0x52/0xd9
softirqs last  enabled at (3288): [<ffffffffa01f1d5b>]
rcu_read_unlock_bh+0x0/0x2f [ipv6]
softirqs last disabled at (3289): [<ffffffff815ddafc>]
do_softirq_own_stack+0x1c/0x30

other info that might help us debug this:
 Possible unsafe locking scenario:

       CPU0
       ----
  lock(adap_rcu_lock);
  <Interrupt>
    lock(adap_rcu_lock);

 *** DEADLOCK ***

5 locks held by radvd/3794:
 #0:  (sk_lock-AF_INET6){+.+.+.}, at: [<ffffffffa020b85a>]
rawv6_sendmsg+0x74b/0xa4d [ipv6]
 #1:  (rcu_read_lock){.+.+..}, at: [<ffffffff8151ac6b>]
rcu_lock_acquire+0x0/0x29
 #2:  (rcu_read_lock){.+.+..}, at: [<ffffffffa01f4cca>]
rcu_lock_acquire.constprop.16+0x0/0x30 [ipv6]
 #3:  (rcu_read_lock){.+.+..}, at: [<ffffffff810e09b4>]
rcu_lock_acquire+0x0/0x29
 #4:  (rcu_read_lock){.+.+..}, at: [<ffffffffa0998782>]
rcu_lock_acquire.constprop.40+0x0/0x30 [cxgb4]

stack backtrace:
CPU: 7 PID: 3794 Comm: radvd Tainted: G         C O 3.14.7+ #24
Hardware name: Supermicro X7DBU/X7DBU, BIOS 6.00 12/03/2007
 ffffffff81f15990 ffff88012fdc36a8 ffffffff815d0016 0000000000000006
 ffff8800c80dc2a0 ffff88012fdc3708 ffffffff815cc727 0000000000000001
 0000000000000001 ffff880100000000 ffffffff81015b02 ffff8800c80dcb58
Call Trace:
 <IRQ>  [<ffffffff815d0016>] dump_stack+0x4e/0x71
 [<ffffffff815cc727>] print_usage_bug+0x1ec/0x1fd
 [<ffffffff81015b02>] ? save_stack_trace+0x27/0x44
 [<ffffffff810fbfaa>] ? check_usage_backwards+0xa0/0xa0
 [<ffffffff810fc640>] mark_lock+0x11b/0x212
 [<ffffffff810fca0b>] __lock_acquire+0x2d4/0xe48
 [<ffffffff810fbfaa>] ? check_usage_backwards+0xa0/0xa0
 [<ffffffff810fbff6>] ? check_usage_forwards+0x4c/0xa6
 [<ffffffff810c6c8a>] ? __local_bh_enable_ip+0xaf/0xd9
 [<ffffffff810fd98b>] lock_acquire+0x82/0x9d
 [<ffffffffa09989ea>] ? clip_add+0x2c/0x116 [cxgb4]
 [<ffffffffa0998782>] ? rcu_read_unlock+0x23/0x23 [cxgb4]
 [<ffffffff815d6ff8>] _raw_spin_lock+0x34/0x43
 [<ffffffffa09989ea>] ? clip_add+0x2c/0x116 [cxgb4]
 [<ffffffffa09987b0>] ? rcu_lock_acquire.constprop.40+0x2e/0x30 [cxgb4]
 [<ffffffffa0998782>] ? rcu_read_unlock+0x23/0x23 [cxgb4]
 [<ffffffffa09989ea>] clip_add+0x2c/0x116 [cxgb4]
 [<ffffffffa0998beb>] cxgb4_inet6addr_handler+0x117/0x12c [cxgb4]
 [<ffffffff810fd99d>] ? lock_acquire+0x94/0x9d
 [<ffffffff810e09b4>] ? raw_notifier_call_chain+0x11/0x11
 [<ffffffff815da98b>] notifier_call_chain+0x32/0x5c
 [<ffffffff815da9f9>] __atomic_notifier_call_chain+0x44/0x6e
 [<ffffffff815daa32>] atomic_notifier_call_chain+0xf/0x11
 [<ffffffff815b1356>] inet6addr_notifier_call_chain+0x16/0x18
 [<ffffffffa01f72e5>] ipv6_add_addr+0x404/0x46e [ipv6]
 [<ffffffff810fde6a>] ? trace_hardirqs_on+0xd/0xf
 [<ffffffffa01fb634>] addrconf_prefix_rcv+0x385/0x6ea [ipv6]
 [<ffffffffa0207950>] ndisc_rcv+0x9d3/0xd76 [ipv6]
 [<ffffffffa020d536>] icmpv6_rcv+0x592/0x67b [ipv6]
 [<ffffffff810c6c85>] ? __local_bh_enable_ip+0xaa/0xd9
 [<ffffffff810c6c85>] ? __local_bh_enable_ip+0xaa/0xd9
 [<ffffffff810fd8dc>] ? lock_release+0x14e/0x17b
 [<ffffffffa020df97>] ? rcu_read_unlock+0x21/0x23 [ipv6]
 [<ffffffff8150df52>] ? rcu_read_unlock+0x23/0x23
 [<ffffffffa01f4ede>] ip6_input_finish+0x1e4/0x2fc [ipv6]
 [<ffffffffa01f540b>] ip6_input+0x33/0x38 [ipv6]
 [<ffffffffa01f5557>] ip6_mc_input+0x147/0x160 [ipv6]
 [<ffffffffa01f4ba3>] ip6_rcv_finish+0x7c/0x81 [ipv6]
 [<ffffffffa01f5397>] ipv6_rcv+0x3a1/0x3e2 [ipv6]
 [<ffffffff8151ef96>] __netif_receive_skb_core+0x4ab/0x511
 [<ffffffff810fdc94>] ? mark_held_locks+0x71/0x99
 [<ffffffff8151f0c0>] ? process_backlog+0x69/0x15e
 [<ffffffff8151f045>] __netif_receive_skb+0x49/0x5b
 [<ffffffff8151f0cf>] process_backlog+0x78/0x15e
 [<ffffffff8151f571>] ? net_rx_action+0x1a2/0x1cc
 [<ffffffff8151f47b>] net_rx_action+0xac/0x1cc
 [<ffffffff810c69b7>] ? __do_softirq+0xad/0x218
 [<ffffffff810c69ff>] __do_softirq+0xf5/0x218
 [<ffffffff815ddafc>] do_softirq_own_stack+0x1c/0x30
 <EOI>  [<ffffffff810c6bb6>] do_softirq+0x38/0x5d
 [<ffffffffa01f1d5b>] ? ip6_copy_metadata+0x156/0x156 [ipv6]
 [<ffffffff810c6c78>] __local_bh_enable_ip+0x9d/0xd9
 [<ffffffffa01f1d88>] rcu_read_unlock_bh+0x2d/0x2f [ipv6]
 [<ffffffffa01f28b4>] ip6_finish_output2+0x381/0x3d8 [ipv6]
 [<ffffffffa01f49ef>] ip6_finish_output+0x6e/0x73 [ipv6]
 [<ffffffffa01f4a70>] ip6_output+0x7c/0xa8 [ipv6]
 [<ffffffff815b1bfa>] dst_output+0x18/0x1c
 [<ffffffff815b1c9e>] ip6_local_out+0x1c/0x21
 [<ffffffffa01f2489>] ip6_push_pending_frames+0x37d/0x427 [ipv6]
 [<ffffffff81558af8>] ? skb_orphan+0x39/0x39
 [<ffffffffa020b85a>] ? rawv6_sendmsg+0x74b/0xa4d [ipv6]
 [<ffffffffa020ba51>] rawv6_sendmsg+0x942/0xa4d [ipv6]
 [<ffffffff81584cd2>] inet_sendmsg+0x3d/0x66
 [<ffffffff81508930>] __sock_sendmsg_nosec+0x25/0x27
 [<ffffffff8150b0d7>] sock_sendmsg+0x5a/0x7b
 [<ffffffff810fd8dc>] ? lock_release+0x14e/0x17b
 [<ffffffff8116d756>] ? might_fault+0x9e/0xa5
 [<ffffffff8116d70d>] ? might_fault+0x55/0xa5
 [<ffffffff81508cb1>] ? copy_from_user+0x2a/0x2c
 [<ffffffff8150b70c>] ___sys_sendmsg+0x226/0x2d9
 [<ffffffff810fcd25>] ? __lock_acquire+0x5ee/0xe48
 [<ffffffff810fde01>] ? trace_hardirqs_on_caller+0x145/0x1a1
 [<ffffffff8118efcb>] ? slab_free_hook.isra.71+0x50/0x59
 [<ffffffff8115c81f>] ? release_pages+0xbc/0x181
 [<ffffffff810fd99d>] ? lock_acquire+0x94/0x9d
 [<ffffffff81115e97>] ? read_seqcount_begin.constprop.25+0x73/0x90
 [<ffffffff8150c408>] __sys_sendmsg+0x3d/0x5b
 [<ffffffff8150c433>] SyS_sendmsg+0xd/0x19
 [<ffffffff815dc53d>] system_call_fastpath+0x1a/0x1f

Reported-by: Ben Greear <greearb@candelatech.com>
Cc: Casey Leedom <leedom@chelsio.com>
Cc: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Casey Leedom <leedom@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoNFSv4: test SECINFO RPC_AUTH_GSS pseudoflavors for support
Andy Adamson [Thu, 12 Jun 2014 19:02:32 +0000 (15:02 -0400)]
NFSv4: test SECINFO RPC_AUTH_GSS pseudoflavors for support

Fix nfs4_negotiate_security to create an rpc_clnt used to test each SECINFO
returned pseudoflavor. Check credential creation  (and gss_context creation)
which is important for RPC_AUTH_GSS pseudoflavors which can fail for multiple
reasons including mis-configuration.

Don't call nfs4_negotiate in nfs4_submount as it was just called by
nfs4_proc_lookup_mountpoint (nfs4_proc_lookup_common)

Signed-off-by: Andy Adamson <andros@netapp.com>
[Trond: fix corrupt return value from nfs_find_best_sec()]
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
10 years agoNFS Return -EPERM if no supported or matching SECINFO flavor
Andy Adamson [Mon, 9 Jun 2014 19:33:20 +0000 (15:33 -0400)]
NFS Return -EPERM if no supported or matching SECINFO flavor

Do not return RPC_AUTH_UNIX if SEINFO reply tests fail. This
prevents an infinite loop of NFS4ERR_WRONGSEC for non RPC_AUTH_UNIX mounts.

Without this patch, a mount with no sec= option to a server
that does not include RPC_AUTH_UNIX in the
SECINFO return can be presented with an attemtp to use RPC_AUTH_UNIX
which will result in an NFS4ERR_WRONG_SEC which will prompt the SECINFO
call which will again try RPC_AUTH_UNIX....

Signed-off-by: Andy Adamson <andros@netapp.com>
Tested-By: Steve Dickson <steved@redhat.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
10 years agoNFS check the return of nfs4_negotiate_security in nfs4_submount
Andy Adamson [Mon, 9 Jun 2014 19:33:19 +0000 (15:33 -0400)]
NFS check the return of nfs4_negotiate_security in nfs4_submount

Signed-off-by: Andy Adamson <andros@netapp.com>
Tested-By: Steve Dickson <steved@redhat.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
10 years agoNFS: Don't mark the data cache as invalid if it has been flushed
Trond Myklebust [Fri, 20 Jun 2014 17:11:01 +0000 (13:11 -0400)]
NFS: Don't mark the data cache as invalid if it has been flushed

Now that we have functions such as nfs_write_pageuptodate() that use
the cache_validity flags to check if the data cache is valid or not,
it is a little more important to keep the flags in sync with the
state of the data cache.
In particular, we'd like to ensure that if the data cache is empty, we
don't start marking it as needing revalidation.

Reported-by: Scott Mayhew <smayhew@redhat.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
10 years agoNFS: Clear NFS_INO_REVAL_PAGECACHE when we update the file size
Trond Myklebust [Fri, 20 Jun 2014 17:16:38 +0000 (13:16 -0400)]
NFS: Clear NFS_INO_REVAL_PAGECACHE when we update the file size

In nfs_update_inode(), if the change attribute is seen to change on
the server, then we set NFS_INO_REVAL_PAGECACHE in order to make
sure that we check the file size.
However, if we also update the file size in the same function, we
don't need to check it again. So make sure that we clear the
NFS_INO_REVAL_PAGECACHE that was set earlier.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
10 years agonfs: Fix cache_validity check in nfs_write_pageuptodate()
Scott Mayhew [Fri, 20 Jun 2014 12:44:42 +0000 (08:44 -0400)]
nfs: Fix cache_validity check in nfs_write_pageuptodate()

NFS_INO_INVALID_DATA cannot be ignored, even if we have a delegation.

We're still having some problems with data corruption when multiple
clients are appending to a file and those clients are being granted
write delegations on open.

To reproduce:

Client A:
vi /mnt/`hostname -s`
while :; do echo "XXXXXXXXXXXXXXX" >>/mnt/file; sleep $(( $RANDOM % 5 )); done

Client B:
vi /mnt/`hostname -s`
while :; do echo "YYYYYYYYYYYYYYY" >>/mnt/file; sleep $(( $RANDOM % 5 )); done

What's happening is that in nfs_update_inode() we're recognizing that
the file size has changed and we're setting NFS_INO_INVALID_DATA
accordingly, but then we ignore the cache_validity flags in
nfs_write_pageuptodate() because we have a delegation.  As a result,
in nfs_updatepage() we're extending the write to cover the full page
even though we've not read in the data to begin with.

Signed-off-by: Scott Mayhew <smayhew@redhat.com>
Cc: <stable@vger.kernel.org> # v3.11+
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
10 years agoblock: add support for limiting gaps in SG lists
Jens Axboe [Tue, 24 Jun 2014 22:22:24 +0000 (16:22 -0600)]
block: add support for limiting gaps in SG lists

Another restriction inherited for NVMe - those devices don't support
SG lists that have "gaps" in them. Gaps refers to cases where the
previous SG entry doesn't end on a page boundary. For NVMe, all SG
entries must start at offset 0 (except the first) and end on a page
boundary (except the last).

Signed-off-by: Jens Axboe <axboe@fb.com>
10 years agobio: remove unused macro bip_vec_idx()
Gu Zheng [Tue, 24 Jun 2014 10:10:26 +0000 (18:10 +0800)]
bio: remove unused macro bip_vec_idx()

Macro bip_vec_idx() was used by bio integrity originally, but no longer
used now. So remove it.

Signed-off-by: Gu Zheng <guz.fnst@cn.fujitsu.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
10 years agoMerge branches 'fixes' and 'misc' into for-next
Russell King [Tue, 24 Jun 2014 21:54:40 +0000 (22:54 +0100)]
Merge branches 'fixes' and 'misc' into for-next

10 years agoARM: make it easier to check the CPU part number correctly
Russell King [Tue, 24 Jun 2014 18:43:15 +0000 (19:43 +0100)]
ARM: make it easier to check the CPU part number correctly

Ensure that platform maintainers check the CPU part number in the right
manner: the CPU part number is meaningless without also checking the
CPU implement(e|o)r (choose your preferred spelling!)  Provide an
interface which returns both the implementer and part number together,
and update the definitions to include the implementer.

Mark the old function as being deprecated... indeed, using the old
function with the definitions will now always evaluate as false, so
people must update their un-merged code to the new function.  While
this could be avoided by adding new definitions, we'd also have to
create new names for them which would be awkward.

Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
10 years agoARM: 8076/1: mm: add support for HW coherent systems in PL310 cache
Thomas Petazzoni [Fri, 13 Jun 2014 09:58:38 +0000 (10:58 +0100)]
ARM: 8076/1: mm: add support for HW coherent systems in PL310 cache

When a PL310 cache is used on a system that provides hardware
coherency, the outer cache sync operation is useless, and can be
skipped. Moreover, on some systems, it is harmful as it causes
deadlocks between the Marvell coherency mechanism, the Marvell PCIe
controller and the Cortex-A9.

To avoid this, this commit introduces a new Device Tree property
'arm,io-coherent' for the L2 cache controller node, valid only for the
PL310 cache. It identifies the usage of the PL310 cache in an I/O
coherent configuration. Internally, it makes the driver disable the
outer cache sync operation.

Note that technically speaking, a fully coherent system wouldn't
require any of the other .outer_cache operations. However, in
practice, when booting secondary CPUs, these are not yet coherent, and
therefore a set of cache maintenance operations are necessary at this
point. This explains why we keep the other .outer_cache operations and
only ->sync is disabled.

While in theory any write to a PL310 register could cause the
deadlock, in practice, disabling ->sync is sufficient to workaround
the deadlock, since the other cache maintenance operations are only
used in very specific situations.

Contrary to previous versions of this patch, this new version does not
simply NULL-ify the ->sync member, because the l2c_init_data
structures are now 'const' and therefore cannot be modified, which is
a good thing. Therefore, this patch introduces a separate
l2c_init_data instance, called of_l2c310_coherent_data.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
10 years agoARM: Simplify generation of compressed vmlinux.lds file
Russell King [Tue, 17 Jun 2014 14:00:54 +0000 (15:00 +0100)]
ARM: Simplify generation of compressed vmlinux.lds file

As we are now using the C preprocessor, we do not need to use sed to
edit constants in this file, and then pass the resulting file through
the C preprocessor.  Instead, rely solely on the C preprocessor to
rewrite TEXT_START and BSS_ADDR.

Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
10 years agoARM: 8067/1: zImage: ensure header in LE format for BE8 kernels
Nicolas Pitre [Mon, 2 Jun 2014 16:32:25 +0000 (17:32 +0100)]
ARM: 8067/1: zImage: ensure header in LE format for BE8 kernels

All known BE8-capable systems have LE bootloaders, so we need to ensure
that the magic number and image start/end values are in little endian
format.

[ben.dooks@codethink.co.uk: from nico's original email on this subject]
[taras.kondratiuk@linaro.org: removed lds.S->lds rule, added target to extra-y]

Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>