]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
11 years agoMerge remote-tracking branch 'l2-mtd/master'
Stephen Rothwell [Fri, 2 Aug 2013 04:17:07 +0000 (14:17 +1000)]
Merge remote-tracking branch 'l2-mtd/master'

11 years agoMerge remote-tracking branch 'infiniband/for-next'
Stephen Rothwell [Fri, 2 Aug 2013 04:15:29 +0000 (14:15 +1000)]
Merge remote-tracking branch 'infiniband/for-next'

11 years agoMerge remote-tracking branch 'bluetooth/master'
Stephen Rothwell [Fri, 2 Aug 2013 04:13:53 +0000 (14:13 +1000)]
Merge remote-tracking branch 'bluetooth/master'

11 years agoMerge remote-tracking branch 'wireless-next/master'
Stephen Rothwell [Fri, 2 Aug 2013 04:11:48 +0000 (14:11 +1000)]
Merge remote-tracking branch 'wireless-next/master'

Conflicts:
drivers/net/ethernet/broadcom/Kconfig

11 years agoMerge remote-tracking branch 'ipsec-next/master'
Stephen Rothwell [Fri, 2 Aug 2013 04:10:06 +0000 (14:10 +1000)]
Merge remote-tracking branch 'ipsec-next/master'

11 years agoMerge remote-tracking branch 'net-next/master'
Stephen Rothwell [Fri, 2 Aug 2013 04:04:36 +0000 (14:04 +1000)]
Merge remote-tracking branch 'net-next/master'

11 years agoMerge remote-tracking branch 'slave-dma/next'
Stephen Rothwell [Fri, 2 Aug 2013 04:00:14 +0000 (14:00 +1000)]
Merge remote-tracking branch 'slave-dma/next'

11 years agoMerge remote-tracking branch 'dlm/next'
Stephen Rothwell [Fri, 2 Aug 2013 03:58:38 +0000 (13:58 +1000)]
Merge remote-tracking branch 'dlm/next'

11 years agoMerge remote-tracking branch 'ieee1394/for-next'
Stephen Rothwell [Fri, 2 Aug 2013 03:57:02 +0000 (13:57 +1000)]
Merge remote-tracking branch 'ieee1394/for-next'

11 years agoMerge remote-tracking branch 'idle/next'
Stephen Rothwell [Fri, 2 Aug 2013 03:55:20 +0000 (13:55 +1000)]
Merge remote-tracking branch 'idle/next'

11 years agoMerge remote-tracking branch 'pm/linux-next'
Stephen Rothwell [Fri, 2 Aug 2013 03:47:11 +0000 (13:47 +1000)]
Merge remote-tracking branch 'pm/linux-next'

11 years agoMerge remote-tracking branch 'libata/for-next'
Stephen Rothwell [Fri, 2 Aug 2013 03:45:26 +0000 (13:45 +1000)]
Merge remote-tracking branch 'libata/for-next'

11 years agoMerge remote-tracking branch 'kbuild/for-next'
Stephen Rothwell [Fri, 2 Aug 2013 03:43:47 +0000 (13:43 +1000)]
Merge remote-tracking branch 'kbuild/for-next'

11 years agoMerge remote-tracking branch 'v4l-dvb/master'
Stephen Rothwell [Fri, 2 Aug 2013 03:41:56 +0000 (13:41 +1000)]
Merge remote-tracking branch 'v4l-dvb/master'

11 years agoMerge remote-tracking branch 'hwmon-staging/hwmon-next'
Stephen Rothwell [Fri, 2 Aug 2013 03:40:21 +0000 (13:40 +1000)]
Merge remote-tracking branch 'hwmon-staging/hwmon-next'

11 years agoMerge branch 'jdelvare-hwmon/master'
Stephen Rothwell [Fri, 2 Aug 2013 03:38:45 +0000 (13:38 +1000)]
Merge branch 'jdelvare-hwmon/master'

11 years agoMerge remote-tracking branch 'hid/for-next'
Stephen Rothwell [Fri, 2 Aug 2013 03:37:05 +0000 (13:37 +1000)]
Merge remote-tracking branch 'hid/for-next'

11 years agoMerge remote-tracking branch 'pci/next'
Stephen Rothwell [Fri, 2 Aug 2013 03:35:29 +0000 (13:35 +1000)]
Merge remote-tracking branch 'pci/next'

11 years agoMerge remote-tracking branch 'vfs/for-next'
Stephen Rothwell [Fri, 2 Aug 2013 03:29:34 +0000 (13:29 +1000)]
Merge remote-tracking branch 'vfs/for-next'

Conflicts:
fs/ext4/namei.c

11 years agoMerge remote-tracking branch 'xfs/for-next'
Stephen Rothwell [Fri, 2 Aug 2013 03:27:53 +0000 (13:27 +1000)]
Merge remote-tracking branch 'xfs/for-next'

11 years agoMerge remote-tracking branch 'v9fs/for-next'
Stephen Rothwell [Fri, 2 Aug 2013 03:26:18 +0000 (13:26 +1000)]
Merge remote-tracking branch 'v9fs/for-next'

11 years agoMerge remote-tracking branch 'ocfs2/linux-next'
Stephen Rothwell [Fri, 2 Aug 2013 03:24:10 +0000 (13:24 +1000)]
Merge remote-tracking branch 'ocfs2/linux-next'

11 years agoMerge remote-tracking branch 'nfsd/nfsd-next'
Stephen Rothwell [Fri, 2 Aug 2013 03:22:35 +0000 (13:22 +1000)]
Merge remote-tracking branch 'nfsd/nfsd-next'

11 years agoMerge remote-tracking branch 'nfs/linux-next'
Stephen Rothwell [Fri, 2 Aug 2013 03:21:01 +0000 (13:21 +1000)]
Merge remote-tracking branch 'nfs/linux-next'

11 years agoMerge remote-tracking branch 'logfs/master'
Stephen Rothwell [Fri, 2 Aug 2013 03:19:03 +0000 (13:19 +1000)]
Merge remote-tracking branch 'logfs/master'

11 years agoMerge remote-tracking branch 'gfs2/master'
Stephen Rothwell [Fri, 2 Aug 2013 03:17:28 +0000 (13:17 +1000)]
Merge remote-tracking branch 'gfs2/master'

11 years agoMerge remote-tracking branch 'f2fs/dev'
Stephen Rothwell [Fri, 2 Aug 2013 03:15:54 +0000 (13:15 +1000)]
Merge remote-tracking branch 'f2fs/dev'

11 years agoMerge remote-tracking branch 'ext3/for_next'
Stephen Rothwell [Fri, 2 Aug 2013 02:40:08 +0000 (12:40 +1000)]
Merge remote-tracking branch 'ext3/for_next'

11 years agoMerge remote-tracking branch 'cifs/for-next'
Stephen Rothwell [Fri, 2 Aug 2013 02:38:32 +0000 (12:38 +1000)]
Merge remote-tracking branch 'cifs/for-next'

11 years agoMerge remote-tracking branch 'ceph/master'
Stephen Rothwell [Fri, 2 Aug 2013 02:36:59 +0000 (12:36 +1000)]
Merge remote-tracking branch 'ceph/master'

11 years agoMerge remote-tracking branch 'btrfs/next'
Stephen Rothwell [Fri, 2 Aug 2013 02:36:57 +0000 (12:36 +1000)]
Merge remote-tracking branch 'btrfs/next'

11 years agoMerge remote-tracking branch 'tile/master'
Stephen Rothwell [Fri, 2 Aug 2013 02:35:22 +0000 (12:35 +1000)]
Merge remote-tracking branch 'tile/master'

11 years agoMerge remote-tracking branch 'sh/sh-latest'
Stephen Rothwell [Fri, 2 Aug 2013 02:33:48 +0000 (12:33 +1000)]
Merge remote-tracking branch 'sh/sh-latest'

Conflicts:
arch/sh/kernel/cpu/sh2a/Makefile
include/linux/serial_sci.h

11 years agoMerge remote-tracking branch 's390/features'
Stephen Rothwell [Fri, 2 Aug 2013 02:32:13 +0000 (12:32 +1000)]
Merge remote-tracking branch 's390/features'

11 years agoMerge remote-tracking branch 'mips/mips-for-linux-next'
Stephen Rothwell [Fri, 2 Aug 2013 02:30:36 +0000 (12:30 +1000)]
Merge remote-tracking branch 'mips/mips-for-linux-next'

11 years agoMerge remote-tracking branch 'microblaze/next'
Stephen Rothwell [Fri, 2 Aug 2013 02:29:04 +0000 (12:29 +1000)]
Merge remote-tracking branch 'microblaze/next'

11 years agoMerge remote-tracking branch 'metag/for-next'
Stephen Rothwell [Fri, 2 Aug 2013 02:27:32 +0000 (12:27 +1000)]
Merge remote-tracking branch 'metag/for-next'

11 years agoMerge remote-tracking branch 'm68knommu/for-next'
Stephen Rothwell [Fri, 2 Aug 2013 02:26:00 +0000 (12:26 +1000)]
Merge remote-tracking branch 'm68knommu/for-next'

11 years agoMerge remote-tracking branch 'ia64/next'
Stephen Rothwell [Fri, 2 Aug 2013 02:24:28 +0000 (12:24 +1000)]
Merge remote-tracking branch 'ia64/next'

Conflicts:
arch/ia64/configs/generic_defconfig
arch/ia64/configs/gensparse_defconfig
arch/ia64/configs/tiger_defconfig
arch/ia64/configs/xen_domu_defconfig

11 years agoMerge remote-tracking branch 'cris/for-next'
Stephen Rothwell [Fri, 2 Aug 2013 02:22:54 +0000 (12:22 +1000)]
Merge remote-tracking branch 'cris/for-next'

Conflicts:
arch/cris/arch-v32/drivers/Kconfig

11 years agoMerge remote-tracking branch 'blackfin/for-linus'
Stephen Rothwell [Fri, 2 Aug 2013 02:22:47 +0000 (12:22 +1000)]
Merge remote-tracking branch 'blackfin/for-linus'

11 years agoMerge remote-tracking branch 'arm/for-next'
Stephen Rothwell [Fri, 2 Aug 2013 02:21:10 +0000 (12:21 +1000)]
Merge remote-tracking branch 'arm/for-next'

11 years agoMerge remote-tracking branch 'arc/for-next'
Stephen Rothwell [Fri, 2 Aug 2013 02:19:37 +0000 (12:19 +1000)]
Merge remote-tracking branch 'arc/for-next'

11 years agoMerge remote-tracking branch 'drm-intel-fixes/drm-intel-fixes'
Stephen Rothwell [Fri, 2 Aug 2013 02:14:28 +0000 (12:14 +1000)]
Merge remote-tracking branch 'drm-intel-fixes/drm-intel-fixes'

11 years agoMerge remote-tracking branch 'rr-fixes/fixes'
Stephen Rothwell [Fri, 2 Aug 2013 02:14:27 +0000 (12:14 +1000)]
Merge remote-tracking branch 'rr-fixes/fixes'

11 years agoMerge remote-tracking branch 'staging.current/staging-linus'
Stephen Rothwell [Fri, 2 Aug 2013 02:14:20 +0000 (12:14 +1000)]
Merge remote-tracking branch 'staging.current/staging-linus'

11 years agoMerge remote-tracking branch 'pci-current/for-linus'
Stephen Rothwell [Fri, 2 Aug 2013 02:14:18 +0000 (12:14 +1000)]
Merge remote-tracking branch 'pci-current/for-linus'

11 years agoMerge remote-tracking branch 'sound-current/for-linus'
Stephen Rothwell [Fri, 2 Aug 2013 02:14:17 +0000 (12:14 +1000)]
Merge remote-tracking branch 'sound-current/for-linus'

11 years agoMerge remote-tracking branch 'net/master'
Stephen Rothwell [Fri, 2 Aug 2013 02:14:16 +0000 (12:14 +1000)]
Merge remote-tracking branch 'net/master'

11 years agoMerge remote-tracking branch 'sparc/master'
Stephen Rothwell [Fri, 2 Aug 2013 02:14:16 +0000 (12:14 +1000)]
Merge remote-tracking branch 'sparc/master'

11 years agoMerge remote-tracking branch 'powerpc-merge/merge'
Stephen Rothwell [Fri, 2 Aug 2013 02:14:15 +0000 (12:14 +1000)]
Merge remote-tracking branch 'powerpc-merge/merge'

11 years agoMerge remote-tracking branch 'metag-fixes/fixes'
Stephen Rothwell [Fri, 2 Aug 2013 02:14:14 +0000 (12:14 +1000)]
Merge remote-tracking branch 'metag-fixes/fixes'

11 years agoMerge remote-tracking branch 'arm-current/fixes'
Stephen Rothwell [Fri, 2 Aug 2013 02:14:13 +0000 (12:14 +1000)]
Merge remote-tracking branch 'arm-current/fixes'

11 years agoMerge remote-tracking branch 'origin/master'
Stephen Rothwell [Fri, 2 Aug 2013 02:05:59 +0000 (12:05 +1000)]
Merge remote-tracking branch 'origin/master'

11 years agoesp_scsi: Fix tag state corruption when autosensing.
David S. Miller [Fri, 2 Aug 2013 01:08:34 +0000 (18:08 -0700)]
esp_scsi: Fix tag state corruption when autosensing.

Meelis Roos reports a crash in esp_free_lun_tag() in the presense
of a disk which has died.

The issue is that when we issue an autosense command, we do so by
hijacking the original command that caused the check-condition.

When we do so we clear out the ent->tag[] array when we issue it via
find_and_prep_issuable_command().  This is so that the autosense
command is forced to be issued non-tagged.

That is problematic, because it is the value of ent->tag[] which
determines whether we issued the original scsi command as tagged
vs. non-tagged (see esp_alloc_lun_tag()).

And that, in turn, is what trips up the sanity checks in
esp_free_lun_tag().  That function needs the original ->tag[] values
in order to free up the tag slot properly.

Fix this by remembering the original command's tag values, and
having esp_alloc_lun_tag() and esp_free_lun_tag() use them.

Reported-by: Meelis Roos <mroos@linux.ee>
Tested-by: Meelis Roos <mroos@linux.ee>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoMerge branch 'bond_rcu'
David S. Miller [Thu, 1 Aug 2013 23:42:08 +0000 (16:42 -0700)]
Merge branch 'bond_rcu'

Nikolay Aleksandrov says:

====================
 This patchset aims to lay the groundwork, and do the initial conversion to
RCUism. I decided that it'll be much better to make the bonding RCU
conversion gradual, so patches can be reviewed and tested better rather
than having one huge patch (which I did in the beginning, before this).
The first patch is straightforward and it converts the bonding to the
standard list API, simplifying a lot of code, removing unnecessary local
variables and allowing to use the nice rculist API later. It also takes
care of some minor styling issues (re-arranging local variables longest ->
shortest, removing brackets for single statement if/else, leaving new line
before return statement etc.).
 The second patch simplifies the conversion by removing unnecessary
read_lock(&bond->curr_slave_lock) in xmit paths that are to be converted
later, because we only care if the pointer is NULL or a slave there, since
we already have bond->lock the slave can't go away.
 The third patch simplifies the broadcast xmit function by removing
the use of curr_active_slave and converting to standard list API. Also this
design of the broadcast xmit function avoids a subtle double packet tx race
when converted to RCU.
 The fourth patch factors out the code that transmits skb through a slave
with given id (i.e. rr_tx_counter in rr mode, hashed value in xor mode) and
simplifies the active-backup xmit path because bond_dev_queue_xmit always
consumes the skb. The new bond_xmit_slave_id function is used in rr and xor
modes currently, but the plans are to use it in 3ad mode as well thus it's
made global. I've left the function prototype to be 81 chars so I wouldn't
break it, if this is an issue I can always break it in more lines.
 The fifth patch introduces RCU by converting attach/detach and release to
RCU. It also converts dereferencing of curr_active_slave to rcu_dereference
although it's not fully converted to RCU, that is needed for the converted
xmit paths. And it converts roundrobin, broadcast, xor and active-backup
xmit paths to RCU. The 3ad and ALB/TLB modes acquire read_lock(&bond->lock)
to make sure that no slave will be removed and to sync properly with
enslave and release as before.
 This way for the price of a little complexity, we'll be able to convert
individual parts of the bonding to RCU, and test them easier in the
process. If this patchset is accepted in some form, I'll post followups
in the next weeks that gradually convert the bonding to RCU and remove the
need for the rwlocks.
 For performance notes please refer to patch 5 (RCU conversion one).
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agobonding: initial RCU conversion
nikolay@redhat.com [Thu, 1 Aug 2013 14:54:51 +0000 (16:54 +0200)]
bonding: initial RCU conversion

This patch does the initial bonding conversion to RCU. After it the
following modes are protected by RCU alone: roundrobin, active-backup,
broadcast and xor. Modes ALB/TLB and 3ad still acquire bond->lock for
reading, and will be dealt with later. curr_active_slave needs to be
dereferenced via rcu in the converted modes because the only thing
protecting the slave after this patch is rcu_read_lock, so we need the
proper barrier for weakly ordered archs and to make sure we don't have
stale pointer. It's not tagged with __rcu yet because there's still work
to be done to remove the curr_slave_lock, so sparse will complain when
rcu_assign_pointer and rcu_dereference are used, but the alternative to use
rcu_dereference_protected would've created much bigger code churn which is
more difficult to test and review. That will be converted in time.

1. Active-backup mode
 1.1 Perf recording while doing iperf -P 4
  - old bonding: iperf spent 0.55% in bonding, system spent 0.29% CPU
                 in bonding
  - new bonding: iperf spent 0.29% in bonding, system spent 0.15% CPU
                 in bonding
 1.2. Bandwidth measurements
  - old bonding: 16.1 gbps consistently
  - new bonding: 17.5 gbps consistently

2. Round-robin mode
 2.1 Perf recording while doing iperf -P 4
  - old bonding: iperf spent 0.51% in bonding, system spent 0.24% CPU
                 in bonding
  - new bonding: iperf spent 0.16% in bonding, system spent 0.11% CPU
                 in bonding
 2.2 Bandwidth measurements
  - old bonding: 8 gbps (variable due to packet reorderings)
  - new bonding: 10 gbps (variable due to packet reorderings)

Of course the latency has improved in all converted modes, and moreover
while
doing enslave/release (since it doesn't affect tx anymore).

Also I've stress tested all modes doing enslave/release in a loop while
transmitting traffic.

Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agobonding: factor out slave id tx code and simplify xmit paths
Nikolay Aleksandrov [Thu, 1 Aug 2013 14:54:50 +0000 (16:54 +0200)]
bonding: factor out slave id tx code and simplify xmit paths

I factored out the tx xmit code which relies on slave id in
bond_xmit_slave_id. It is global because later it can be used also in
3ad mode xmit. Unnecessary obvious comments are removed. Active-backup
mode is simplified because bond_dev_queue_xmit always consumes the skb.
bond_xmit_xor becomes one line because of bond_xmit_slave_id.
bond_for_each_slave_from is not used in bond_xmit_slave_id because later
when RCU is used we can avoid important race condition by using standard
rculist routines.

Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agobonding: simplify broadcast_xmit function
Nikolay Aleksandrov [Thu, 1 Aug 2013 14:54:49 +0000 (16:54 +0200)]
bonding: simplify broadcast_xmit function

We don't need to start from the curr_active_slave as the frame will be
sent to all eligible slaves anyway, so we remove the unnecessary local
variables, checks and comments, and make it use the standard list API.
This has the nice side-effect that later when it's converted to RCU
a race condition will be avoided which could lead to double packet tx.

Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agobonding: remove unnecessary read_locks of curr_slave_lock
nikolay@redhat.com [Thu, 1 Aug 2013 14:54:48 +0000 (16:54 +0200)]
bonding: remove unnecessary read_locks of curr_slave_lock

In all the cases we already hold bond->lock for reading, so the slave
can't get away and the check != NULL is sufficient. curr_active_slave
can still change after the read_lock is unlocked prior to use of the
dereferenced value, so there's no need for it. It either contains a
valid slave which we use (and can't get away), or it is NULL which is
checked.
In some places the read_lock of curr_slave_lock was left because we need
it not to change while performing some action (e.g. syncing current
active slave's addresses, sending ARP requests through the active slave)
such cases will be dealt with individually while converting to RCU.

Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agobonding: convert to list API and replace bond's custom list
nikolay@redhat.com [Thu, 1 Aug 2013 14:54:47 +0000 (16:54 +0200)]
bonding: convert to list API and replace bond's custom list

This patch aims to remove struct bonding's first_slave and struct
slave's next and prev pointers, and replace them with the standard Linux
list API. The old macros are converted to list API as well and some new
primitives are available now. The checks if there're slaves that used
slave_cnt have been replaced by the list_empty macro.
Also a few small style fixes, changing longest -> shortest line in local
variable declarations, leaving an empty line before return and removing
unnecessary brackets.
This is the first step to gradual RCU conversion.

Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoipv6: bump genid when delete/add address
fan.du [Thu, 1 Aug 2013 09:44:44 +0000 (17:44 +0800)]
ipv6: bump genid when delete/add address

Server           Client
2001:1::803/64  <-> 2001:1::805/64
2001:2::804/64  <-> 2001:2::806/64

Server side fib binary tree looks like this:

                                   (2001:/64)
                                   /
                                  /
                   ffff88002103c380
                 /                 \
     (2)        /                   \
 (2001::803/128)                     ffff880037ac07c0
                                    /               \
                                   /                 \  (3)
                      ffff880037ac0640               (2001::806/128)
                       /             \
             (1)      /               \
        (2001::804/128)               (2001::805/128)

Delete 2001::804/64 won't cause prefix route deleted as well as rt in (3)
destinate to 2001::806 with source address as 2001::804/64. That's because
2001::803/64 is still alive, which make onlink=1 in ipv6_del_addr, this is
where the substantial difference between same prefix configuration and
different prefix configuration :) So packet are still transmitted out to
2001::806 with source address as 2001::804/64.

So bump genid will clear rt in (3), and up layer protocol will eventually
find the right one for themselves.

This problem arised from the discussion in here:
http://marc.info/?l=linux-netdev&m=137404469219410&w=4

Signed-off-by: Fan Du <fan.du@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agomacvlan: handle set_promiscuity failures
Michael S. Tsirkin [Thu, 1 Aug 2013 10:50:10 +0000 (13:50 +0300)]
macvlan: handle set_promiscuity failures

It's quite unlikely that dev_set_promiscuity will fail,
but worth checking just in case.

Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agomacvlan: better mode validation
Michael S. Tsirkin [Thu, 1 Aug 2013 10:43:19 +0000 (13:43 +0300)]
macvlan: better mode validation

macvlan passthrough mode is special: it's not possible to switch to or
from it through a netlink command.

But if you try, the command will succeed, which is
confusing.

Validate input and return error to user.

Cc: Sridhar Samudrala <sri@us.ibm.com>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoMerge /home/v4l/v4l/patchwork
Mauro Carvalho Chehab [Thu, 1 Aug 2013 23:18:09 +0000 (20:18 -0300)]
Merge /home/v4l/v4l/patchwork

* /home/v4l/v4l/patchwork: (65 commits)
  [media] stk1160: Build as a module if SND is m and audio support is selected
  [media] cx23885-video: fix two warnings
  [media] cx23885[v4]: Fix interrupt storm when enabling IR receiver
  [media] S2255: Removal of unnecessary videobuf_queue_is_busy
  [media] media: lirc: Allow lirc dev to talk to rc device
  [media] media: rc: Add rc_open/close and use count to rc_dev
  [media] coda: add CODA7541 decoding support
  [media] coda: split encoder specific parts out of device_run and irq_handler
  [media] coda: dynamic IRAM setup for decoder
  [media] cx23885: Fix TeVii S471 regression since introduction of ts2020
  [media] lirc: make transmit interface consistent
  [media] lirc: validate transmission ir data
  [media] rc: allowed_protos now is a bit field
  [media] redrat3: errors on unplug
  [media] DocBook: Fix typo in V4L2_CID_JPEG_COMPRESSION_QUALITY reference
  [media] V4L: Merge struct v4l2_async_subdev_list with struct v4l2_subdev
  [media] V4L: Rename subdev field of struct v4l2_async_notifier
  [media] V4L: Add V4L2_ASYNC_MATCH_OF subdev matching type
  [media] V4L: Rename v4l2_async_bus_* to v4l2_async_match_*
  [media] V4L: Drop bus_type check in v4l2-async match functions
  ...

11 years agoMerge /home/v4l/v4l/for_upstream
Mauro Carvalho Chehab [Thu, 1 Aug 2013 23:17:54 +0000 (20:17 -0300)]
Merge /home/v4l/v4l/for_upstream

* /home/v4l/v4l/for_upstream:
  [media] em28xx: fix assignment of the eeprom data
  [media] hdpvr: fix iteration over uninitialized lists in hdpvr_probe()
  [media] usbtv: fix dependency
  [media] usbtv: Throw corrupted frames away
  [media] usbtv: Fix deinterlacing
  [media] v4l2: added missing mutex.h include to v4l2-ctrls.h
  [media] DocBook: upgrade media_api DocBook version to 4.2
  [media] ml86v7667: fix compile warning: 'ret' set but not used
  [media] s5p-g2d: Fix registration failure
  [media] media: coda: Fix DT driver data pointer for i.MX27
  [media] s5p-mfc: Fix input/output format reporting

11 years agoMerge branch 'for-davem' of git://gitorious.org/linux-can/linux-can-next
David S. Miller [Thu, 1 Aug 2013 23:14:29 +0000 (16:14 -0700)]
Merge branch 'for-davem' of git://gitorious.org/linux-can/linux-can-next

Marc Kleine-Budde says:

====================
this is a pull-request for net-next/master. It consists of two patches
by Fabio Estevam. Them first convert the flexcan driver to use
devm_ioremap_resource(), the second adds return value checking for
clk_prepare_enable().
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agobnx2x: Revising locking scheme for MAC configuration
Yuval Mintz [Thu, 1 Aug 2013 14:30:59 +0000 (17:30 +0300)]
bnx2x: Revising locking scheme for MAC configuration

On very rare occasions, repeated load/unload stress test in the presence of
our storage driver (bnx2i/bnx2fc) causes a kernel panic in bnx2x code
(NULL pointer dereference). Stack traces indicate the issue happens during MAC
configuration; thorough code review showed that indeed several races exist
in which one thread can iterate over the list of configured MACs while another
deletes entries from the same list.

This patch adds a varient on the single-writer/Multiple-reader lock mechanism -
It utilizes an already exsiting bottom-half lock, using it so that Whenever
a writer is unable to continue due to the existence of another writer/reader,
it pends its request for future deliverance.
The writer / last readers will check for the existence of such requests and
perform them instead of the original initiator.
This prevents the writer from having to sleep while waiting for the lock
to be accessible, which might cause deadlocks given the locks already
held by the writer.

Another result of this patch is that setting of Rx Mode is now made in
sleepable context - Setting of Rx Mode is made under a bottom-half lock, which
was always nontrivial for the bnx2x driver, as the HW/FW configuration requires
wait for completions.
Since sleep was impossible (due to the sleepless-context), various mechanisms
were utilized to prevent the calling thread from sleep, but the truth was that
when the caller thread (i.e, the one calling ndo_set_rx_mode()) returned, the
Rx mode was still not set in HW/FW.

bnx2x_set_rx_mode() will now overtly schedule for the Rx changes to be
configured by the sp_rtnl_task which hold the RTNL lock and is sleepable
context.

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agotipc: fix oops when creating server socket fails
Ying Xue [Thu, 1 Aug 2013 12:29:18 +0000 (08:29 -0400)]
tipc: fix oops when creating server socket fails

When creation of TIPC internal server socket fails,
we get an oops with the following dump:

BUG: unable to handle kernel NULL pointer dereference at 0000000000000020
IP: [<ffffffffa0011f49>] tipc_close_conn+0x59/0xb0 [tipc]
PGD 13719067 PUD 12008067 PMD 0
Oops: 0000 [#1] SMP DEBUG_PAGEALLOC
Modules linked in: tipc(+)
CPU: 4 PID: 4340 Comm: insmod Not tainted 3.10.0+ #1
Hardware name: Bochs Bochs, BIOS Bochs 01/01/2007
task: ffff880014360000 ti: ffff88001374c000 task.ti: ffff88001374c000
RIP: 0010:[<ffffffffa0011f49>]  [<ffffffffa0011f49>] tipc_close_conn+0x59/0xb0 [tipc]
RSP: 0018:ffff88001374dc98  EFLAGS: 00010292
RAX: 0000000000000000 RBX: ffff880012ac09d8 RCX: 0000000000000000
RDX: 0000000000000046 RSI: 0000000000000001 RDI: ffff880014360000
RBP: ffff88001374dcb8 R08: 0000000000000001 R09: 0000000000000001
R10: 0000000000000000 R11: 0000000000000000 R12: ffffffffa0016fa0
R13: ffffffffa0017010 R14: ffffffffa0017010 R15: ffff880012ac09d8
FS:  0000000000000000(0000) GS:ffff880016600000(0063) knlGS:00000000f76668d0
CS:  0010 DS: 002b ES: 002b CR0: 000000008005003b
CR2: 0000000000000020 CR3: 0000000012227000 CR4: 00000000000006e0
Stack:
ffff88001374dcb8 ffffffffa0016fa0 0000000000000000 0000000000000001
ffff88001374dcf8 ffffffffa0012922 ffff88001374dce8 00000000ffffffea
ffffffffa0017100 0000000000000000 ffff8800134241a8 ffffffffa0017150
Call Trace:
[<ffffffffa0012922>] tipc_server_stop+0xa2/0x1b0 [tipc]
[<ffffffffa0009995>] tipc_subscr_stop+0x15/0x20 [tipc]
[<ffffffffa00130f5>] tipc_core_stop+0x1d/0x33 [tipc]
[<ffffffffa001f0d4>] tipc_init+0xd4/0xf8 [tipc]
[<ffffffffa001f000>] ? 0xffffffffa001efff
[<ffffffff8100023f>] do_one_initcall+0x3f/0x150
[<ffffffff81082f4d>] ? __blocking_notifier_call_chain+0x7d/0xd0
[<ffffffff810cc58a>] load_module+0x11aa/0x19c0
[<ffffffff810c8d60>] ? show_initstate+0x50/0x50
[<ffffffff8190311c>] ? retint_restore_args+0xe/0xe
[<ffffffff810cce79>] SyS_init_module+0xd9/0x110
[<ffffffff8190dc65>] sysenter_dispatch+0x7/0x1f
Code: 6c 24 70 4c 89 ef e8 b7 04 8f e1 8b 73 04 4c 89 e7 e8 7c 9e 32 e1 41 83 ac 24
b8 00 00 00 01 4c 89 ef e8 eb 0a 8f e1 48 8b 43 08 <4c> 8b 68 20 4d 8d a5 48 03 00
00 4c 89 e7 e8 04 05 8f e1 4c 89
RIP  [<ffffffffa0011f49>] tipc_close_conn+0x59/0xb0 [tipc]
RSP <ffff88001374dc98>
CR2: 0000000000000020
---[ end trace b02321f40e4269a3 ]---

We have the following call chain:

tipc_core_start()
    ret = tipc_subscr_start()
        ret = tipc_server_start(){
                  server->enabled = 1;
                  ret = tipc_open_listening_sock()
              }

I.e., the server->enabled flag is unconditionally set to 1, whatever
the return value of tipc_open_listening_sock().

This causes a crash when tipc_core_start() tries to clean up
resources after a failed initialization:

    if (ret == failed)
        tipc_subscr_stop()
            tipc_server_stop(){
                if (server->enabled)
                    tipc_close_conn(){
                        NULL reference of con->sock-sk
                        OOPS!
                }
            }

To avoid this, tipc_server_start() should only set server->enabled
to 1 in case of a succesful socket creation. In case of failure, it
should release all allocated resources before returning.

Problem introduced in commit c5fa7b3cf3cb22e4ac60485fc2dc187fe012910f
("tipc: introduce new TIPC server infrastructure") in v3.11-rc1.
Note that it won't be seen often; it takes a module load under memory
constrained conditions in order to trigger the failure condition.

Signed-off-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agobonding: fix system hang due to fast igmp timer rescheduling
Nikolay Aleksandrov [Thu, 1 Aug 2013 09:51:42 +0000 (11:51 +0200)]
bonding: fix system hang due to fast igmp timer rescheduling

After commit 4aa5dee4d9 ("net: convert resend IGMP to notifier event")
we try to acquire rtnl in bond_resend_igmp_join_requests but it can be
scheduled with rtnl already held (e.g. when bond_change_active_slave is
called with rtnl) causing a loop of immediate reschedules + calls because
rtnl_trylock fails each time since it's being already held.
For me this issue leads to system hangs very easy:
modprobe bonding; ifconfig bond0 up; ifenslave bond0 eth0; rmmod
bonding;

The fix is to introduce a small (1 jiffy) delay which is enough for the
sections holding rtnl to finish without putting any strain on the system.
Also adjust the timer in bond_change_active_slave to be 1 jiffy, since
most of the time it's called with rtnl already held.

Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: rename CONFIG_NET_LL_RX_POLL to CONFIG_NET_RX_BUSY_POLL
Cong Wang [Thu, 1 Aug 2013 03:10:25 +0000 (11:10 +0800)]
net: rename CONFIG_NET_LL_RX_POLL to CONFIG_NET_RX_BUSY_POLL

Eliezer renames several *ll_poll to *busy_poll, but forgets
CONFIG_NET_LL_RX_POLL, so in case of confusion, rename it too.

Cc: Eliezer Tamir <eliezer.tamir@linux.intel.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Cong Wang <amwang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: fix a compile error when CONFIG_NET_LL_RX_POLL is not set
Cong Wang [Thu, 1 Aug 2013 03:10:24 +0000 (11:10 +0800)]
net: fix a compile error when CONFIG_NET_LL_RX_POLL is not set

When CONFIG_NET_LL_RX_POLL is not set, I got:

net/socket.c: In function ‘sock_poll’:
net/socket.c:1165:4: error: implicit declaration of function ‘sk_busy_loop’ [-Werror=implicit-function-declaration]

Fix this by adding a nop when !CONFIG_NET_LL_RX_POLL.

Cc: Eliezer Tamir <eliezer.tamir@linux.intel.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Cong Wang <amwang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet/mlx4_core: VFs must ignore the enable_64b_cqe_eqe module param
Jack Morgenstein [Thu, 1 Aug 2013 16:55:01 +0000 (19:55 +0300)]
net/mlx4_core: VFs must ignore the enable_64b_cqe_eqe module param

Slaves get the 64B CQE/EQE state from QUERY_HCA, not from the module parameter.

If the parameter is set to zero, the slave outputs an incorrect/irrelevant
warning message that 64B CQEs/EQEs are supported but not enabled (even if the
hypervisor has enabled 64B CQEs/EQEs).

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet/mlx4_core: Don't give VFs MAC addresses which are derived from the PF MAC
Or Gerlitz [Thu, 1 Aug 2013 16:55:00 +0000 (19:55 +0300)]
net/mlx4_core: Don't give VFs MAC addresses which are derived from the PF MAC

If the user has not assigned a MAC address to a VM, then don't give it MAC which
is based on the PF one. The current derivation scheme is wrong and leads to VM
MAC collisions when the number of cards/hypervisors becomes big enough.

Instead, just give it zeros and let them figure out what to do with that.

Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agotile: support PTP using the tilegx mPIPE (IEEE 1588)
Chris Metcalf [Thu, 1 Aug 2013 15:36:42 +0000 (11:36 -0400)]
tile: support PTP using the tilegx mPIPE (IEEE 1588)

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agotile: remove deprecated NETIF_F_LLTX flag from tile drivers
Chris Metcalf [Thu, 1 Aug 2013 15:36:42 +0000 (11:36 -0400)]
tile: remove deprecated NETIF_F_LLTX flag from tile drivers

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agotile: make "tile_net.custom" a proper bool module parameter
Chris Metcalf [Thu, 1 Aug 2013 15:36:42 +0000 (11:36 -0400)]
tile: make "tile_net.custom" a proper bool module parameter

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agotile: support TSO for IPv6 in tilegx network driver
Chris Metcalf [Thu, 1 Aug 2013 15:36:42 +0000 (11:36 -0400)]
tile: support TSO for IPv6 in tilegx network driver

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agotile: support multiple mPIPE shims in tilegx network driver
Chris Metcalf [Thu, 1 Aug 2013 15:36:42 +0000 (11:36 -0400)]
tile: support multiple mPIPE shims in tilegx network driver

The initial driver support was for a single mPIPE shim on the chip
(as is the case for the Gx36 hardware).  The Gx72 chip has two mPIPE
shims, so we extend the driver to handle that case.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agotile: enable GRO in the tilegx network driver
Chris Metcalf [Thu, 1 Aug 2013 15:36:42 +0000 (11:36 -0400)]
tile: enable GRO in the tilegx network driver

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agotile: fix panic bug in napi support for tilegx network driver
Chris Metcalf [Thu, 1 Aug 2013 15:36:42 +0000 (11:36 -0400)]
tile: fix panic bug in napi support for tilegx network driver

The code used to call napi_disable() in an interrupt handler
(from smp_call_function), which in turn could call msleep().
Unfortunately you can't sleep in an interrupt context.

Luckily it turns out all the NAPI support functions are
just operating on data structures and not on any deeply
per-cpu data, so we can arrange to set up and tear down all
the NAPI state on the core driving the process, and just
do the IRQ enable/disable as a smp_call_function thing.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agotile: update dev->stats directly in tilegx network driver
Chris Metcalf [Thu, 1 Aug 2013 15:36:42 +0000 (11:36 -0400)]
tile: update dev->stats directly in tilegx network driver

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agotile: support jumbo frames in the tilegx network driver
Chris Metcalf [Thu, 1 Aug 2013 15:36:42 +0000 (11:36 -0400)]
tile: support jumbo frames in the tilegx network driver

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agotile: remove dead is_dup_ack() function from tilepro net driver
Chris Metcalf [Thu, 1 Aug 2013 15:36:42 +0000 (11:36 -0400)]
tile: remove dead is_dup_ack() function from tilepro net driver

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agotile: avoid bug in tilepro net driver built with old hypervisor
Chris Metcalf [Thu, 1 Aug 2013 15:36:42 +0000 (11:36 -0400)]
tile: avoid bug in tilepro net driver built with old hypervisor

Building against headers from an older Tilera hypervisor can cause
the frags[] array to be overrun.  Don't enable TSO in that case.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agotile: support rx_dropped/rx_errors in tilepro net driver
Chris Metcalf [Thu, 1 Aug 2013 15:36:42 +0000 (11:36 -0400)]
tile: support rx_dropped/rx_errors in tilepro net driver

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agotile: set hw_features and vlan_features in setup
Chris Metcalf [Thu, 1 Aug 2013 15:36:42 +0000 (11:36 -0400)]
tile: set hw_features and vlan_features in setup

This change allows the user to configure various features of the tile
networking drivers on and off.  There is no change to the default
initialization state of either the tilegx or tilepro drivers.

Neither driver needs the ndo_fix_features or ndo_set_features callbacks,
since the generic code already handles the dependencies for
fix_features, and there is no hardware state to tweak in set_features.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoipv6: prevent race between address creation and removal
Jiri Benc [Thu, 1 Aug 2013 08:41:28 +0000 (10:41 +0200)]
ipv6: prevent race between address creation and removal

There's a race in IPv6 automatic addess assignment. The address is created
with zero lifetime when it's added to various address lists. Before it gets
assigned the correct lifetime, there's a window where a new address may be
configured. This causes the semi-initiated address to be deleted in
addrconf_verify.

This was discovered as a reference leak caused by concurrent run of
__ipv6_ifa_notify for both RTM_NEWADDR and RTM_DELADDR with the same
address.

Fix this by setting the lifetime before the address is added to
inet6_addr_lst.

A few notes:

1. In addrconf_prefix_rcv, by setting update_lft to zero, the
   if (update_lft) { ... } condition is no longer executed for newly
   created addresses. This is okay, as the ifp fields are set in
   ipv6_add_addr now and ipv6_ifa_notify is called (and has been called)
   through addrconf_dad_start.

2. The removal of the whole block under ifp->lock in inet6_addr_add is okay,
   too, as tstamp is initialized to jiffies in ipv6_add_addr.

Signed-off-by: Jiri Benc <jbenc@redhat.com>
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoipv6: move peer_addr init into ipv6_add_addr()
Jiri Pirko [Thu, 1 Aug 2013 08:41:27 +0000 (10:41 +0200)]
ipv6: move peer_addr init into ipv6_add_addr()

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoipv6: update ip6_rt_last_gc every time GC is run
Michal Kubeček [Thu, 1 Aug 2013 08:04:24 +0000 (10:04 +0200)]
ipv6: update ip6_rt_last_gc every time GC is run

As pointed out by Eric Dumazet, net->ipv6.ip6_rt_last_gc should
hold the last time garbage collector was run so that we should
update it whenever fib6_run_gc() calls fib6_clean_all(), not only
if we got there from ip6_dst_gc().

Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoipv6: prevent fib6_run_gc() contention
Michal Kubeček [Thu, 1 Aug 2013 08:04:14 +0000 (10:04 +0200)]
ipv6: prevent fib6_run_gc() contention

On a high-traffic router with many processors and many IPv6 dst
entries, soft lockup in fib6_run_gc() can occur when number of
entries reaches gc_thresh.

This happens because fib6_run_gc() uses fib6_gc_lock to allow
only one thread to run the garbage collector but ip6_dst_gc()
doesn't update net->ipv6.ip6_rt_last_gc until fib6_run_gc()
returns. On a system with many entries, this can take some time
so that in the meantime, other threads pass the tests in
ip6_dst_gc() (ip6_rt_last_gc is still not updated) and wait for
the lock. They then have to run the garbage collector one after
another which blocks them for quite long.

Resolve this by replacing special value ~0UL of expire parameter
to fib6_run_gc() by explicit "force" parameter to choose between
spin_lock_bh() and spin_trylock_bh() and call fib6_run_gc() with
force=false if gc_thresh is reached but not max_size.

Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoPCI: mvebu: Disable prefetchable memory support in PCI-to-PCI bridge
Thomas Petazzoni [Thu, 1 Aug 2013 13:44:19 +0000 (15:44 +0200)]
PCI: mvebu: Disable prefetchable memory support in PCI-to-PCI bridge

The Marvell PCIe driver uses an emulated PCI-to-PCI bridge to be able
to dynamically set up MBus address decoding windows for PCI I/O and
memory regions depending on the PCI devices enumerated by Linux.

However, this emulated PCI-to-PCI bridge logic makes the Linux PCI
core believe that prefetchable memory regions are supported (because
the registers are read/write), while in fact no adress decoding window
is ever created for such regions. Since the Marvell MBus address
decoding windows do not distinguish memory regions and prefetchable
memory regions, this patch takes a simple approach: change the
PCI-to-PCI bridge emulation to let the Linux PCI core know that we
don't support prefetchable memory regions.

To achieve this, we simply make the prefetchable memory base a
read-only register that always returns 0. Reading/writing all the
other prefetchable memory related registers has no effect.

This problem was originally reported by Finn Hoffmann
<finn@uni-bremen.de>, who couldn't get a RTL8111/8168B PCI NIC working
on the NSA310 Kirkwood platform after updating to 3.11-rc. The problem
was that the PCI-to-PCI bridge emulation was making the Linux PCI core
believe that we support prefetchable memory, so the Linux PCI core was
only filling the prefetchable memory base and limit registers, which
does not lead to a MBus window being created. The below patch has been
confirmed by Finn Hoffmann to fix his problem on Kirkwood, and has
otherwise been successfully tested on the Armada XP GP platform with a
e1000e PCIe NIC and a Marvell SATA PCIe card.

Reported-by: Finn Hoffmann <finn@uni-bremen.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
11 years agotile: optimize strnlen using SIMD instructions
Ken Steele [Thu, 1 Aug 2013 19:55:07 +0000 (15:55 -0400)]
tile: optimize strnlen using SIMD instructions

Using strlen as a model, add length checking to create strnlen.

Signed-off-by: Ken Steele <ken@tilera.com>
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
11 years agotile: optimize and clean up string functions
Chris Metcalf [Thu, 1 Aug 2013 19:52:17 +0000 (15:52 -0400)]
tile: optimize and clean up string functions

This change cleans up the string code in a number of ways:

- For memcpy(), fix bug in prefetch and increase distance to 3 lines;
  optimize for unaligned data; do all loads before wh64 to make memcpy
  safe for forward-overlapping calls; etc.  Performance is improved.

- Use new copy_byte() function on tilegx to spread a single byte value
  out into a full word using the shufflebytes instruction.

- Clean up header include ordering to be more canonical, and remove
  spurious #undefs of function names.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
11 years agogianfar: Remove unused field grp_id from gfar_priv_grp
Claudiu Manoil [Thu, 1 Aug 2013 07:07:05 +0000 (10:07 +0300)]
gianfar: Remove unused field grp_id from gfar_priv_grp

grp->grp_id is obsolete. It has no use in the current driver.
Remove it from gfar_priv_grp and put the 'rstat' member
in its place, in the 2nd cache line, as rstat needs fast access.

Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoMerge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville...
David S. Miller [Thu, 1 Aug 2013 19:57:52 +0000 (12:57 -0700)]
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless

John W. Linville says:

====================
This pull request is intended for the 3.11 stream.  It is a bit
larger than usual, as it includes pulls from most of my feeder trees
as well...

For the Bluetooth bits, Gustavo says:

"A few fixes and devices ID additions for 3.11:

 * There are 4 new ath3k device ids
 * Fixed stack memory usage in ath3k.
 * Fixed the init process of BlueFRITZ! devices, they were failing to init
   due to an unsupported command we sent.
 * Fixed wrong use of PTR_ERR in btusb code that was preventing intel devices
   to work properly.
 * Fixed race condition between hci_register_dev() and hci_dev_open() that
   could cause a NULL pointer dereference.
 * Fixed race condition that could call hci_req_cmd_complete() and make some
   devices to fail as showed in the log added to the commit message."

Regarding the NFC bits, Samuel says:

"We have:

1) A build failure fix for the NCI SPI transport layer due to a
   missing CRC_CCITT Kconfig dependency.

2) A netlink command rename: CMD_FW_UPLOAD was merged during the 3.11
   merge window but the typical terminology for loading a firmware to a
   target is firmware download rather than upload. In order to avoid any
   confusion in a file exported to userspace, we rename this command to
   CMD_FW_DOWNLOAD."

Samuel's item #2 isn't strictly a fix, but it seems safe and should
avoid confusion in the future.

As for the mac80211 bits, Johannes says:

"I only have three fixes this time, a fix for a suspend regression, a
patch correcting the initiator in regulatory code and one fix for mesh
station powersave."

With respect to the iwlwifi bits, Johannes says:

"We have a scan fix for passive channels, a new PCI device ID for an old
device, a NIC reset fix, an RF-Kill fix, a fix for powersave when GO
interfaces are present as well as an aggregation session fix (for a
corner case) and a workaround for a firmware design issue - it only
supports a single GTK in D3."

Bringing-up the rear with the Atheros trees, Kalle says:

"Geert Uytterhoeven fixed an ath10k build problem when NO_DMA=y. I added
a missing MAINTAINERS entry for ath10k and updated ath6kl git tree
location."

Along with the above...

Arend van Spriel fixes a brcmfmac WARNING when unplugging the device.

Avinash Patil proves a couple of minor mwifiex fixes relating to P2P mode.

Luciano Coelho updates the MAINTAINERS entry for the wilink drivers.

Stanislaw Gruszka brings an rt2x00 fix for a queue start/stop problem.

Stone Piao fixes another mwifiex problem, a command timeout related to P2P mode.

Tomasz Moń corrects an endian problem in mwifiex.

I'll remind my feeder maintainers to slowdown the patchflow.
Beyond that, please let me know if there are problems!
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoath9k: Add statistics for antenna diversity
Sujith Manoharan [Thu, 1 Aug 2013 15:27:06 +0000 (20:57 +0530)]
ath9k: Add statistics for antenna diversity

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k: Use a subroutine to calculate ALT ratio
Sujith Manoharan [Thu, 1 Aug 2013 06:23:23 +0000 (11:53 +0530)]
ath9k: Use a subroutine to calculate ALT ratio

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k: Simplify checks in quick_scan
Sujith Manoharan [Thu, 1 Aug 2013 06:23:22 +0000 (11:53 +0530)]
ath9k: Simplify checks in quick_scan

There is a function to do a ratio comparison for ALT,
so make use of it.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k: Use a helper function for checking LNA options
Sujith Manoharan [Thu, 1 Aug 2013 06:23:21 +0000 (11:53 +0530)]
ath9k: Use a helper function for checking LNA options

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>