firefly-linux-kernel-4.4.55.git
10 years agogit simplify nilfs check for busy subtree
Al Viro [Sat, 24 Aug 2013 16:06:16 +0000 (12:06 -0400)]
git simplify nilfs check for busy subtree

Reviewed-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
10 years agoibmasmfs: don't bother passing superblock when not needed
Al Viro [Fri, 19 Jul 2013 14:09:56 +0000 (18:09 +0400)]
ibmasmfs: don't bother passing superblock when not needed

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
10 years agodon't pass superblock to hypfs_{mkdir,create*}
Al Viro [Fri, 19 Jul 2013 14:05:21 +0000 (18:05 +0400)]
don't pass superblock to hypfs_{mkdir,create*}

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
10 years agodon't pass superblock to hypfs_diag_create_files
Al Viro [Fri, 19 Jul 2013 13:10:21 +0000 (17:10 +0400)]
don't pass superblock to hypfs_diag_create_files

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
10 years agodon't pass superblock to hypfs_vm_create_files()
Al Viro [Fri, 19 Jul 2013 13:03:49 +0000 (17:03 +0400)]
don't pass superblock to hypfs_vm_create_files()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
10 years agooprofile: get rid of pointless forward declarations of struct super_block
Al Viro [Fri, 19 Jul 2013 12:13:30 +0000 (16:13 +0400)]
oprofile: get rid of pointless forward declarations of struct super_block

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
10 years agooprofilefs_create_...() do not need superblock argument
Al Viro [Fri, 19 Jul 2013 12:10:36 +0000 (16:10 +0400)]
oprofilefs_create_...() do not need superblock argument

same story as with oprofilefs_mkdir()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
10 years agooprofilefs_mkdir() doesn't need superblock argument
Al Viro [Fri, 19 Jul 2013 11:58:27 +0000 (15:58 +0400)]
oprofilefs_mkdir() doesn't need superblock argument

it's always equal to ->d_sb of the second argument (parent dentry),
due to either being literally that, or ->d_sb of parent's parent.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
10 years agodon't bother with passing superblock to oprofile_create_stats_files()
Al Viro [Fri, 19 Jul 2013 11:54:56 +0000 (15:54 +0400)]
don't bother with passing superblock to oprofile_create_stats_files()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
10 years agooprofile: don't bother with passing superblock to ->create_files()
Al Viro [Fri, 19 Jul 2013 11:52:42 +0000 (15:52 +0400)]
oprofile: don't bother with passing superblock to ->create_files()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
10 years agodon't bother passing sb to oprofile_create_files()
Al Viro [Fri, 19 Jul 2013 11:47:29 +0000 (15:47 +0400)]
don't bother passing sb to oprofile_create_files()

it's always root->d_sb

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
10 years agocoh901318: don't open-code simple_read_from_buffer()
Al Viro [Tue, 16 Jul 2013 13:58:45 +0000 (17:58 +0400)]
coh901318: don't open-code simple_read_from_buffer()

... and BTW, failing copy_to_user() means EFAULT, not EINVAL

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
10 years agoconstify touch_atime()
Al Viro [Tue, 16 Jul 2013 14:15:46 +0000 (18:15 +0400)]
constify touch_atime()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
10 years agovfs: allow umount to handle mountpoints without revalidating them
Jeff Layton [Fri, 26 Jul 2013 10:23:25 +0000 (06:23 -0400)]
vfs: allow umount to handle mountpoints without revalidating them

Christopher reported a regression where he was unable to unmount a NFS
filesystem where the root had gone stale. The problem is that
d_revalidate handles the root of the filesystem differently from other
dentries, but d_weak_revalidate does not. We could simply fix this by
making d_weak_revalidate return success on IS_ROOT dentries, but there
are cases where we do want to revalidate the root of the fs.

A umount is really a special case. We generally aren't interested in
anything but the dentry and vfsmount that's attached at that point. If
the inode turns out to be stale we just don't care since the intent is
to stop using it anyway.

Try to handle this situation better by treating umount as a special
case in the lookup code. Have it resolve the parent using normal
means, and then do a lookup of the final dentry without revalidating
it. In most cases, the final lookup will come out of the dcache, but
the case where there's a trailing symlink or !LAST_NORM entry on the
end complicates things a bit.

Cc: Neil Brown <neilb@suse.de>
Reported-by: Christopher T Vogan <cvogan@us.ibm.com>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
10 years agovfs: call d_op->d_prune() before unhashing dentry
Yan, Zheng [Tue, 13 Aug 2013 07:42:02 +0000 (15:42 +0800)]
vfs: call d_op->d_prune() before unhashing dentry

The d_prune dentry operation is used to notify filesystem when VFS
about to prune a hashed dentry from the dcache. There are three
code paths that prune dentries: shrink_dcache_for_umount_subtree(),
prune_dcache_sb() and d_prune_aliases(). For the d_prune_aliases()
case, VFS unhashes the dentry first, then call the d_prune dentry
operation. This confuses ceph_d_prune() (ceph uses the d_prune
dentry operation to maintain a flag indicating whether the complete
contents of a directory are in the dcache, pruning unhashed dentry
does not affect dir's completeness)

This patch fixes the issue by calling the d_prune dentry operation
in d_prune_aliases(), before unhashing the dentry. Also make VFS
only call the d_prune dentry operation for hashed dentry, to avoid
calling the d_prune dentry operation twice when dentry is pruned
by d_prune_aliases().

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
10 years agoonly regular files with FMODE_WRITE need to be on s_files
Al Viro [Fri, 30 Aug 2013 19:46:46 +0000 (15:46 -0400)]
only regular files with FMODE_WRITE need to be on s_files

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
10 years agonfsd: racy access to ->d_name in nsfd4_encode_path()
Al Viro [Sun, 1 Sep 2013 20:06:39 +0000 (16:06 -0400)]
nfsd: racy access to ->d_name in nsfd4_encode_path()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
10 years agoshm_mnt is as longterm as it gets, TYVM...
Al Viro [Sat, 31 Aug 2013 16:57:10 +0000 (12:57 -0400)]
shm_mnt is as longterm as it gets, TYVM...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
10 years agovhost_net: correctly limit the max pending buffers
Jason Wang [Mon, 2 Sep 2013 08:41:01 +0000 (16:41 +0800)]
vhost_net: correctly limit the max pending buffers

As Michael point out, We used to limit the max pending DMAs to get better cache
utilization. But it was not done correctly since it was one done when there's no
new buffers submitted from guest. Guest can easily exceeds the limitation by
keeping sending packets.

So this patch moves the check into main loop. Tests shows about 5%-10%
improvement on per cpu throughput for guest tx.

Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agovhost_net: poll vhost queue after marking DMA is done
Jason Wang [Mon, 2 Sep 2013 08:41:00 +0000 (16:41 +0800)]
vhost_net: poll vhost queue after marking DMA is done

We used to poll vhost queue before making DMA is done, this is racy if vhost
thread were waked up before marking DMA is done which can result the signal to
be missed. Fix this by always polling the vhost thread before DMA is done.

Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agovhost_net: determine whether or not to use zerocopy at one time
Jason Wang [Mon, 2 Sep 2013 08:40:59 +0000 (16:40 +0800)]
vhost_net: determine whether or not to use zerocopy at one time

Currently, even if the packet length is smaller than VHOST_GOODCOPY_LEN, if
upend_idx != done_idx we still set zcopy_used to true and rollback this choice
later. This could be avoided by determining zerocopy once by checking all
conditions at one time before.

Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agovhost: switch to use vhost_add_used_n()
Jason Wang [Mon, 2 Sep 2013 08:40:58 +0000 (16:40 +0800)]
vhost: switch to use vhost_add_used_n()

Let vhost_add_used() to use vhost_add_used_n() to reduce the code
duplication. To avoid the overhead brought by __copy_to_user(). We will use
put_user() when one used need to be added.

Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agovhost_net: use vhost_add_used_and_signal_n() in vhost_zerocopy_signal_used()
Jason Wang [Mon, 2 Sep 2013 08:40:57 +0000 (16:40 +0800)]
vhost_net: use vhost_add_used_and_signal_n() in vhost_zerocopy_signal_used()

We tend to batch the used adding and signaling in vhost_zerocopy_callback()
which may result more than 100 used buffers to be updated in
vhost_zerocopy_signal_used() in some cases. So switch to use
vhost_add_used_and_signal_n() to avoid multiple calls to
vhost_add_used_and_signal(). Which means much less times of used index
updating and memory barriers.

2% performance improvement were seen on netperf TCP_RR test.

Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agovhost_net: make vhost_zerocopy_signal_used() return void
Jason Wang [Mon, 2 Sep 2013 08:40:56 +0000 (16:40 +0800)]
vhost_net: make vhost_zerocopy_signal_used() return void

None of its caller use its return value, so let it return void.

Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: sunhme: use pci_{get,set}_drvdata()
Jingoo Han [Mon, 2 Sep 2013 08:12:41 +0000 (17:12 +0900)]
net: sunhme: use pci_{get,set}_drvdata()

Use the wrapper functions for getting and setting the driver data
using pci_dev instead of using dev_{get,set}_drvdata() with
&pdev->dev, so we can directly pass a struct pci_dev. This is
a purely cosmetic change.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: tulip: use pci_{get,set}_drvdata()
Jingoo Han [Mon, 2 Sep 2013 08:11:53 +0000 (17:11 +0900)]
net: tulip: use pci_{get,set}_drvdata()

Use the wrapper functions for getting and setting the driver data
using pci_dev instead of using dev_{get,set}_drvdata() with
&pdev->dev, so we can directly pass a struct pci_dev. This is
a purely cosmetic change.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: mdio-octeon: use platform_{get,set}_drvdata()
Jingoo Han [Mon, 2 Sep 2013 08:10:09 +0000 (17:10 +0900)]
net: mdio-octeon: use platform_{get,set}_drvdata()

Use the wrapper functions for getting and setting the driver data
using platform_device instead of using dev_{get,set}_drvdata()
with &pdev->dev, so we can directly pass a struct platform_device.
This is a purely cosmetic change.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: sunhme: use platform_{get,set}_drvdata()
Jingoo Han [Mon, 2 Sep 2013 08:08:44 +0000 (17:08 +0900)]
net: sunhme: use platform_{get,set}_drvdata()

Use the wrapper functions for getting and setting the driver data
using platform_device instead of using dev_{get,set}_drvdata()
with &pdev->dev, so we can directly pass a struct platform_device.
This is a purely cosmetic change.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: emac: use platform_{get,set}_drvdata()
Jingoo Han [Mon, 2 Sep 2013 08:06:52 +0000 (17:06 +0900)]
net: emac: use platform_{get,set}_drvdata()

Use the wrapper functions for getting and setting the driver data
using platform_device instead of using dev_{get,set}_drvdata()
with &pdev->dev, so we can directly pass a struct platform_device.
This is a purely cosmetic change.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agodrivers: net: ethernet: 8390: Kconfig: add H8300H_AKI3068NET and H8300H_H8MAX dependa...
Chen Gang [Mon, 2 Sep 2013 02:20:02 +0000 (10:20 +0800)]
drivers: net: ethernet: 8390: Kconfig: add H8300H_AKI3068NET and H8300H_H8MAX dependancy for NE_H8300

Currently only H8300H_AKI3068NET and H8300H_H8MAX define default
I/O base and IRQ values for the NE_H8300 driver.  Hence builds
for other H8300H platforms will fail as per below. Since H8300H
does not support multi platform builds, we simply limit building
the driver to those two platforms specifically.

The release error:

  drivers/net/ethernet/8390/ne-h8300.c: In function 'init_dev':
  drivers/net/ethernet/8390/ne-h8300.c:117:23: error: 'h8300_ne_base' undeclared (first use in this function)
  drivers/net/ethernet/8390/ne-h8300.c:117:23: note: each undeclared identifier is reported only once for each function it appears in
  drivers/net/ethernet/8390/ne-h8300.c:117:23: error: bit-field '<anonymous>' width not an integer constant
  drivers/net/ethernet/8390/ne-h8300.c:119:20: error: 'h8300_ne_irq' undeclared (first use in this function)
  drivers/net/ethernet/8390/ne-h8300.c: In function 'init_module':
  drivers/net/ethernet/8390/ne-h8300.c:647:21: error: 'h8300_ne_base' undeclared (first use in this function)
  drivers/net/ethernet/8390/ne-h8300.c:648:15: error: 'h8300_ne_irq' undeclared (first use in this function)
  drivers/net/ethernet/8390/ne-h8300.c:661:4: warning: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'long unsigned int' [-Wformat]

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agowireless: scan: Remove comment to compare_ether_addr
Joe Perches [Sun, 1 Sep 2013 22:48:27 +0000 (15:48 -0700)]
wireless: scan: Remove comment to compare_ether_addr

This function is being removed, so remove the reference to it.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agobatman: Remove reference to compare_ether_addr
Joe Perches [Sun, 1 Sep 2013 22:45:08 +0000 (15:45 -0700)]
batman: Remove reference to compare_ether_addr

This function is being removed, rename the reference.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agollc: Use normal etherdevice.h tests
Joe Perches [Sun, 1 Sep 2013 20:11:55 +0000 (13:11 -0700)]
llc: Use normal etherdevice.h tests

Convert the llc_<foo> static inlines to the
equivalents from etherdevice.h and remove
the llc_<foo> static inline functions.

llc_mac_null -> is_zero_ether_addr
llc_mac_multicast -> is_multicast_ether_addr
llc_mac_match -> ether_addr_equal

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agodrivers/net: Convert uses of compare_ether_addr to ether_addr_equal
Joe Perches [Sun, 1 Sep 2013 18:51:23 +0000 (11:51 -0700)]
drivers/net: Convert uses of compare_ether_addr to ether_addr_equal

Use the new bool function ether_addr_equal to add
some clarity and reduce the likelihood for misuse
of compare_ether_addr for sorting.

Done via cocci script: (and a little typing)

$ cat compare_ether_addr.cocci
@@
expression a,b;
@@
- !compare_ether_addr(a, b)
+ ether_addr_equal(a, b)

@@
expression a,b;
@@
- compare_ether_addr(a, b)
+ !ether_addr_equal(a, b)

@@
expression a,b;
@@
- !ether_addr_equal(a, b) == 0
+ ether_addr_equal(a, b)

@@
expression a,b;
@@
- !ether_addr_equal(a, b) != 0
+ !ether_addr_equal(a, b)

@@
expression a,b;
@@
- ether_addr_equal(a, b) == 0
+ !ether_addr_equal(a, b)

@@
expression a,b;
@@
- ether_addr_equal(a, b) != 0
+ ether_addr_equal(a, b)

@@
expression a,b;
@@
- !!ether_addr_equal(a, b)
+ ether_addr_equal(a, b)

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoUSB2NET : SR9700 : One chip USB 1.1 USB2NET SR9700Device Driver Support
Liu Junliang [Sun, 1 Sep 2013 11:38:08 +0000 (19:38 +0800)]
USB2NET : SR9700 : One chip USB 1.1 USB2NET SR9700Device Driver Support

Signed-off-by: Liu Junliang <liujunliang_ljl@163.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agotg3: Don't turn off led on 5719 serdes port 0
Nithin Sujir [Sat, 31 Aug 2013 00:01:36 +0000 (17:01 -0700)]
tg3: Don't turn off led on 5719 serdes port 0

Turning off led on port 0 of the 5719 serdes causes all other ports to
lose power and stop functioning. Add tg3_phy_led_bug() function to check
for this condition. We use a switch() in tg3_phy_led_bug() for
consistency with the tg3_phy_power_bug() function.

Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoMerge branch 'calxedaxgmac'
David S. Miller [Wed, 4 Sep 2013 02:21:35 +0000 (22:21 -0400)]
Merge branch 'calxedaxgmac'

A set of calxedaxgmac bug fixes from Rob Herring.

Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: calxedaxgmac: fix xgmac_xmit DMA mapping error handling
Rob Herring [Fri, 30 Aug 2013 21:49:29 +0000 (16:49 -0500)]
net: calxedaxgmac: fix xgmac_xmit DMA mapping error handling

On a DMA mapping error in xgmac_xmit, we should simply free the skb and
return NETDEV_TX_OK rather than -EIO. In the case of errors in mapping
frags, we need to undo everything that has been setup.

Reported-by: Andreas Herrmann <andreas.herrmann@calxeda.com>
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: calxedaxgmac: fix rx DMA mapping API size mismatches
Rob Herring [Fri, 30 Aug 2013 21:49:28 +0000 (16:49 -0500)]
net: calxedaxgmac: fix rx DMA mapping API size mismatches

Fix the mismatch in the DMA mapping and unmapping sizes for receive. The
unmap size must be equal to the map size and should not be the actual
received frame length. The map size should also be adjusted by the
NET_IP_ALIGN size since the h/w buffer size (dma_buf_sz) includes this
offset.

Also, add a missing dma_mapping_error check in xgmac_rx_refill.

Reported-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: calxedaxgmac: remove some unused statistic counters
Rob Herring [Fri, 30 Aug 2013 21:49:27 +0000 (16:49 -0500)]
net: calxedaxgmac: remove some unused statistic counters

rx_sa_filter_fail and tx_undeflow events are unused and impossible
to occur based on how the h/w is used. We never filter on source MAC
address and TX store and forward mode prevents underflow events.

Reported-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: calxedaxgmac: fix various errors in xgmac_set_rx_mode
Rob Herring [Fri, 30 Aug 2013 21:49:26 +0000 (16:49 -0500)]
net: calxedaxgmac: fix various errors in xgmac_set_rx_mode

Fix xgmac_set_rx_mode to handle several conditions that were not handled
correctly as Lennert Buytenhek describes:

If we have, say, 100 unicast addresses, and 5 multicast addresses, the
unicast address count check will evaluate to true, and set use_hash to
true.  The multicast address check will however evaluate to false, and
use_hash won't be set to true again, and XGMAC_FRAME_FILTER_HMC won't
be OR'd into XGMAC_FRAME_FILTER, but since use_hash was still true
from the unicast check, netdev_for_each_mc_addr() will program the
multicast addresses into the hash table instead of using the MAC
address registers, but since the HMC bit wasn't set, the hash table
won't be checked for multicast addresses on receive, and we'll stop
receiving multicast packets entirely.

Also, there is no code that zeroes out MAC address registers reg..31
at the end of this function, meaning that under the right conditions,
unicast/multicast addresses that were previously in the filter but
were then deleted won't be cleared out.

Reported-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: calxedaxgmac: enable interrupts after napi_enable
Rob Herring [Fri, 30 Aug 2013 21:49:25 +0000 (16:49 -0500)]
net: calxedaxgmac: enable interrupts after napi_enable

Fix a race condition where the interrupt handler may have called
napi_schedule before napi_enable is called. This would disable interrupts
and never actually schedule napi to run.

Reported-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: calxedaxgmac: fix race with tx queue stop/wake
Rob Herring [Fri, 30 Aug 2013 21:49:24 +0000 (16:49 -0500)]
net: calxedaxgmac: fix race with tx queue stop/wake

Since the xgmac transmit start and completion work locklessly, it is
possible for xgmac_xmit to stop the tx queue after the xgmac_tx_complete
has run resulting in the tx queue never being woken up. Fix this by
ensuring that ring buffer index updates are visible and recheck the ring
space after stopping the queue. Also fix an off-by-one bug where we need
to stop the queue when the ring buffer space is equal to MAX_SKB_FRAGS.

The implementation used here was copied from
drivers/net/ethernet/broadcom/tg3.c.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Reviewed-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: calxedaxgmac: update ring buffer tx_head after barriers
Rob Herring [Fri, 30 Aug 2013 21:49:23 +0000 (16:49 -0500)]
net: calxedaxgmac: update ring buffer tx_head after barriers

Ensure that the descriptor writes are visible before the ring buffer head
is updated. Since writel is a barrier, we can simply update the head after
the writel.

Reported-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: calxedaxgmac: fix possible skb free before tx complete
Rob Herring [Fri, 30 Aug 2013 21:49:22 +0000 (16:49 -0500)]
net: calxedaxgmac: fix possible skb free before tx complete

The TX completion code may have freed an skb before the entire sg list
was transmitted. The DMA unmap calls for the fragments could also get
skipped. Now set the skb pointer on every entry in the ring, not just
the head of the sg list. We then use the FS (first segment) bit in the
descriptors to determine skb head vs. fragment.

This also fixes similar bug in xgmac_free_tx_skbufs where clean-up of
a sg list that wraps at the end of the ring buffer would not get
unmapped.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: calxedaxgmac: fix race between xgmac_tx_complete and xgmac_tx_err
Rob Herring [Fri, 30 Aug 2013 21:49:21 +0000 (16:49 -0500)]
net: calxedaxgmac: fix race between xgmac_tx_complete and xgmac_tx_err

It is possible for the xgmac_tx_complete to run concurrently with
xgmac_tx_err since there are no locks. Fix this by moving the tx
error handling to a workqueue so we can disable napi while we reset
the transmitter.

Reported-by: Andreas Herrmann <andreas.herrmann@calxeda.com>
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: calxedaxgmac: read correct field in xgmac_desc_get_buf_len
Rob Herring [Fri, 30 Aug 2013 21:49:20 +0000 (16:49 -0500)]
net: calxedaxgmac: read correct field in xgmac_desc_get_buf_len

xgmac_desc_get_buf_len appears to have a copy/paste error. flags is the
wrong field to read. We should be reading buf_size field. cpu_to_le32
should also be le32_to_cpu. This never really mattered as this function
is only used for DMA mapping calls which happen to be nops with coherent
DMA.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: calxedaxgmac: remove NETIF_F_FRAGLIST setting
Rob Herring [Fri, 30 Aug 2013 21:49:19 +0000 (16:49 -0500)]
net: calxedaxgmac: remove NETIF_F_FRAGLIST setting

The xgmac does not actually handle frag lists, so this option should not
be set. It does not appear to have had any impact though.

Reported-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agobe2net: set and query VEB/VEPA mode of the PF interface
Ajit Khaparde [Fri, 30 Aug 2013 20:01:16 +0000 (15:01 -0500)]
be2net: set and query VEB/VEPA mode of the PF interface

SkyHawk-R can support VEB or VEPA mode.
This patch will allow the user to set/query this switch setting.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: fix comment typo for __skb_alloc_pages()
Florian Fainelli [Fri, 30 Aug 2013 14:36:14 +0000 (15:36 +0100)]
net: fix comment typo for __skb_alloc_pages()

The name of the function in the comment is __skb_alloc_page() while we
are actually commenting __skb_alloc_pages(). Fix this typo and make it
a valid kernel doc comment.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoipv6: ipv6_create_tempaddr cleanup
Petr Holasek [Fri, 30 Aug 2013 15:02:38 +0000 (17:02 +0200)]
ipv6: ipv6_create_tempaddr cleanup

This two-liner removes max_addresses variable which is now unecessary related
to patch [ipv6: remove max_addresses check from ipv6_create_tempaddr].

Signed-off-by: Petr Holasek <pholasek@redhat.com>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Acked-by: Ding Tianhong <dingtianhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agogianfar: Fix reported number of sent bytes to BQL
Claudiu Manoil [Fri, 30 Aug 2013 12:01:15 +0000 (15:01 +0300)]
gianfar: Fix reported number of sent bytes to BQL

Fix the amount of sent bytes reported to BQL by reporting the
number of bytes on wire in the xmit routine, and recording that
value for each skb in order to be correctly confirmed on Tx
confirmation cleanup.

Reporting skb->len to BQL just before exiting xmit is not correct
due to possible insertions of TOE block and alignment bytes in the
skb->data, which are being stripped off by the controller before
transmission on wire.  This led to mismatch of (incorrectly)
reported bytes to BQL b/w xmit and Tx confirmation, resulting in
Tx timeout firing, for the h/w tx timestamping acceleration case.

There's no easy way to obtain the number of bytes on wire in the Tx
confirmation routine, so skb->cb is used to convey that information
from xmit to Tx confirmation, for now (as proposed by Eric). Revived
the currently unused GFAR_CB() construct for that purpose.

Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoICMPv6: treat dest unreachable codes 5 and 6 as EACCES, not EPROTO
Jiri Bohac [Fri, 30 Aug 2013 09:18:45 +0000 (11:18 +0200)]
ICMPv6: treat dest unreachable codes 5 and 6 as EACCES, not EPROTO

RFC 4443 has defined two additional codes for ICMPv6 type 1 (destination
unreachable) messages:
        5 - Source address failed ingress/egress policy
6 - Reject route to destination

Now they are treated as protocol error and icmpv6_err_convert() converts them
to EPROTO.

RFC 4443 says:
"Codes 5 and 6 are more informative subsets of code 1."

Treat codes 5 and 6 as code 1 (EACCES)

Btw, connect() returning -EPROTO confuses firefox, so that fallback to
other/IPv4 addresses does not work:
https://bugzilla.mozilla.org/show_bug.cgi?id=910773

Signed-off-by: Jiri Bohac <jbohac@suse.cz>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonetconsole: avoid a crash with multiple sysfs writers
Dan Aloni [Fri, 30 Aug 2013 10:59:46 +0000 (13:59 +0300)]
netconsole: avoid a crash with multiple sysfs writers

When my 'ifup eth' script was fired multiple times and ran concurrent on
my laptop, for some obscure /etc scripting reason, it was revealed
that the store_enabled() function in netconsole doesn't handle it nicely,
as recorded by the Oops below (a syslog paste, but not mangled too much
to prevent from discerning the traceback).

On Linux 3.10.4, this patch seeks to remedy the problem, and it has been
running stable on my laptop for a few days.

[52608.609325] BUG: unable to handle kernel NULL pointer dereference at 00000000000003e0
[52608.609331] IP: [<ffffffff81532a17>] __netpoll_cleanup+0x27/0xe0
[52608.609339] PGD 15e51a067 PUD 15433e067 PMD 0
[52608.609343] Oops: 0000 [#1] SMP re firewire_ohci firewire_core crc_itu_t [last unloaded: kvm_intel]
[52608.609347] Modules linked in: kvm_intel tun vfat fat ppdev parport_pc parport fuse ipt_MASQUERADE usb_storage nf_conntrack_netbios_ns nf_conn [..garbled..]
[52608.609433] RAX: 0000000000000000 RBX: ffff880210bbcc68 RCX: 0000000000000000
[52608.609435] RDX: 0000000000000000 RSI: ffff8801ba447da0 RDI: ffff880210bbcc68
[52608.609437] RBP: ffff8801ba447e18 R08: 0000000000000000 R09: 0000000000000001
[52608.609439] R10: 000000000000000a R11: f000000000000000 R12: ffff880210bbcc68
[52608.609441] R13: ffff88020bc41000 R14: 0000000000000002 R15: 000000000000000200000000000
[52608.609443] FS:  00007f38d7bff740(0000) GS:ffff88021dc40000(0000) knlGS:0000000000000000
[52608.609446] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003300000000001427e0
[52608.609448] CR2: 00000000000003e0 CR3: 0000000154103000 CR4: 00000000001427e0
[52608.609450] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[52608.609452] netpoll: netconsole: local port 6665ess 10.0.0.27
[52608.609454] netpoll: netconsole: local IPv4 address 10.0.0.27
[52608.609456] netpoll: netconsole: interface 'em1'
[52608.609457] netpoll: netconsole: remote port 514ress 10.0.0.15
[52608.609459] netpoll: netconsole: remote IPv4 address 10.0.0.15:65:a8:9a:c7
[52608.609461] netpoll: netconsole: remote ethernet address 1c:6f:65:a8:9a:c7
[52608.609463] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[52608.609464] Stack:801ba447e08 ffff880210bbcc68 ffffffffffffffea ffff88020bc41000
[52608.609466]  ffff8801ba447e08 ffff880210bbcc68 ffffffffffffffea ffff88020bc41000
[52608.609471]  0000000000000002 0000000000000002 ffff8801ba447e38 ffffffff81532af4
[52608.609475]  0000000000000000 ffff880210bbcc00 ffff8801ba447e78 ffffffff81420e7c
[52608.609479] Call Trace:
[52608.609484]  [<ffffffff81532af4>] netpoll_cleanup+0x24/0x50
[52608.609489]  [<ffffffff81420e7c>] store_enabled+0x5c/0xe0
[52608.609492]  [<ffffffff81420abe>] netconsole_target_attr_store+0x2e/0x40
[52608.609498]  [<ffffffff811ff2a2>] configfs_write_file+0xd2/0x130
[52608.609503]  [<ffffffff81188f95>] vfs_write+0xc5/0x1f0
[52608.609506]  [<ffffffff81189482>] SyS_write+0x52/0xa0/0x10
[52608.609511]  [<ffffffff81628c2e>] ? do_page_fault+0xe/0x10
[52608.609516]  [<ffffffff8162d402>] system_call_fastpath+0x16/0x1b
[52608.609517] Code: 1f 44 00 00 0f 1f 44 00 00 55 48 89 e5 48 83 ec 30 4c 89 65 e0 48 89 5d d8 49 89 fc 4c 89 6d e8 4c 89 75 f0 4c 89 7d f8 48 8 [..garbled..]
[52608.609559] RIP  [<ffffffff81532a17>] __netpoll_cleanup+0x27/0xe0
[52608.609563]  RSP <ffff8801ba447de8>
[52608.609564] CR2: 00000000000003e0
[52608.609567] ---[ end trace d25ec343349b61d2 ]---

Signed-off-by: Dan Aloni <alonid@postram.com>
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
CC: David S. Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agosh_eth: Enable Rx descriptor word 0 shift for r8a7790
Kouei Abe [Fri, 30 Aug 2013 03:41:08 +0000 (12:41 +0900)]
sh_eth: Enable Rx descriptor word 0 shift for r8a7790

This corrects an oversight when r8a7790 support was added to sh_eth.

Signed-off-by: Kouei Abe <kouei.abe.cp@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agosh_eth: Fix cache invalidation omission of receive buffer
Kouei Abe [Fri, 30 Aug 2013 03:41:07 +0000 (12:41 +0900)]
sh_eth: Fix cache invalidation omission of receive buffer

Signed-off-by: Kouei Abe <kouei.abe.cp@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agobonding: use rlb_client_info->vlan_id instead of ->tag
Veaceslav Falico [Thu, 29 Aug 2013 21:38:57 +0000 (23:38 +0200)]
bonding: use rlb_client_info->vlan_id instead of ->tag

Store VID in ->vlan_id (if any), and remove the useless ->tag.

CC: Jay Vosburgh <fubar@us.ibm.com>
CC: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Veaceslav Falico <vfalico@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agobonding: remove bond_vlan_used()
Veaceslav Falico [Thu, 29 Aug 2013 21:38:56 +0000 (23:38 +0200)]
bonding: remove bond_vlan_used()

We're using it currently to verify if we have vlans before getting the tag
from the skb we're about to send. It's useless because the vlan_get_tag()
verifies if the skb has the tag (and returns an error if not), and we can
receive tagged skbs only if we *already* have vlans.

Plus, the current RCUed implementation is kind of useless anyway - the we
can remove the last vlan in the moment we return from the function.

So remove the only usage of it and the whole function.

CC: Jay Vosburgh <fubar@us.ibm.com>
CC: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Veaceslav Falico <vfalico@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoMerge branch 'for-davem' of git://gitorious.org/linux-can/linux-can-next
David S. Miller [Wed, 4 Sep 2013 01:54:02 +0000 (21:54 -0400)]
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. There are two patches from Gerhard
Sittig, which improves the clock handling on mpc5121. Oliver Hartkopp
provides a patch that adds a per rule limitation of frame hops.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoMerge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville...
David S. Miller [Wed, 4 Sep 2013 01:45:31 +0000 (21:45 -0400)]
Merge branch 'for-davem' of git://git./linux/kernel/git/linville/wireless-next

John W. Linville says:

====================
Please accept this batch of updates intended for the 3.12 stream.

For the mac80211 bits, Johannes says this:

"This time I have various improvements all over the place: IBSS, mesh,
testmode, AP client powersave handling, one of the rare rfkill patches
and some code cleanup."

Also for mac80211:

"And I also have some more changes for -next, just a few small fixes and
improvements, nothing really stands out."

And for iwlwifi:

"This time I have some powersave work (notably uAPSD support), CQM
offloads, support for a new firmware API and various code cleanups."

Regarding the Bluetooth bits, Gustavo says:

"Patches to 3.12, here we have:

* implementation of a proper tty_port for RFCOMM devices, this fixes some
issues people were seeing lately in the kernel.
* Add voice_setting option for SCO, it is used for SCO Codec selection
* bugfixes, small improvements and clean ups"

For the NFC bits, Samuel says:

"With this one we have:

- A few pn533 improvements and minor fixes. Testing our pn533 driver
  against Google's NCI stack triggered a few issues that we fixed now.
  We also added Tx fragmentation support to this driver.

- More NFC secure element handling. We added a GET_SE netlink command
  for getting all the discovered secure elements, and we defined 2
  additional secure element netlink event (transaction and connectivity).
  We also fixed a couple of typos and copy-paste bugs from the secure
  element handling code.

- Firmware download support for the pn544 driver. This chipset can enter a
  special mode where it's waiting for firmware blobs to replace the
  already flashed one. We now support that mode."

With repect to the ath tree, Kalle says:

"New features in ath10k are rx/tx checsumming in hw and survey scan
implemented by Michal. Also he made fixes to different areas of the
driver, most notable being fixing the case when using two streams and
reducing the number of interface combinations to avoid firmware crashes.
Bartosz did a clean related to how we handle SoC power save in PCI
layer.

For ath6kl Mohammed and Vasanth sent each a patch to fix two infrequent
crashes."

I also pulled the wireless tree into wireless-next to support a
request from Johannes.  On top of all that, there are the usual
sort of driver updates.  The mwifiex, brcmfmac, brcmsmac, ath9k,
and rt2x00 drivers all get some attention, as does the bcma bus and
a few other random bits here and there.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: sctp: probe: allow more advanced ingress filtering by mark
Daniel Borkmann [Thu, 29 Aug 2013 16:54:49 +0000 (18:54 +0200)]
net: sctp: probe: allow more advanced ingress filtering by mark

This is a follow-up commit for commit b1dcdc68b1f4 ("net: tcp_probe:
allow more advanced ingress filtering by mark") that allows for
advanced SCTP probe module filtering based on skb mark (for a more
detailed description and advantages using mark, refer to b1dcdc68b1f4).
The current option to filter by a given port is still being preserved.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: neighbour: Remove CONFIG_ARPD
Tim Gardner [Thu, 29 Aug 2013 12:38:47 +0000 (06:38 -0600)]
net: neighbour: Remove CONFIG_ARPD

This config option is superfluous in that it only guards a call
to neigh_app_ns(). Enabling CONFIG_ARPD by default has no
change in behavior. There will now be call to __neigh_notify()
for each ARP resolution, which has no impact unless there is a
user space daemon waiting to receive the notification, i.e.,
the case for which CONFIG_ARPD was designed anyways.

Suggested-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Cc: James Morris <jmorris@namei.org>
Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
Cc: Patrick McHardy <kaber@trash.net>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Gao feng <gaofeng@cn.fujitsu.com>
Cc: Joe Perches <joe@perches.com>
Cc: Veaceslav Falico <vfalico@redhat.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Reviewed-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agovirtio-net: Set RXCSUM feature if GUEST_CSUM is available
Thomas Huth [Tue, 27 Aug 2013 15:09:02 +0000 (17:09 +0200)]
virtio-net: Set RXCSUM feature if GUEST_CSUM is available

If the VIRTIO_NET_F_GUEST_CSUM virtio feature is available, the guest
does not have to calculate the checksums on all received packets. This
is pretty much the same feature as RX checksum offloading on real
network cards, so the virtio-net driver should report this by setting
the NETIF_F_RXCSUM flag. When the user now runs "ethtool -k", he or she
can see whether the virtio-net interface has to calculate RX checksums
or not.

Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoMerge branch 'for-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup
Linus Torvalds [Wed, 4 Sep 2013 01:25:03 +0000 (18:25 -0700)]
Merge branch 'for-3.12' of git://git./linux/kernel/git/tj/cgroup

Pull cgroup updates from Tejun Heo:
 "A lot of activities on the cgroup front.  Most changes aren't visible
  to userland at all at this point and are laying foundation for the
  planned unified hierarchy.

   - The biggest change is decoupling the lifetime management of css
     (cgroup_subsys_state) from that of cgroup's.  Because controllers
     (cpu, memory, block and so on) will need to be dynamically enabled
     and disabled, css which is the association point between a cgroup
     and a controller may come and go dynamically across the lifetime of
     a cgroup.  Till now, css's were created when the associated cgroup
     was created and stayed till the cgroup got destroyed.

     Assumptions around this tight coupling permeated through cgroup
     core and controllers.  These assumptions are gradually removed,
     which consists bulk of patches, and css destruction path is
     completely decoupled from cgroup destruction path.  Note that
     decoupling of creation path is relatively easy on top of these
     changes and the patchset is pending for the next window.

   - cgroup has its own event mechanism cgroup.event_control, which is
     only used by memcg.  It is overly complex trying to achieve high
     flexibility whose benefits seem dubious at best.  Going forward,
     new events will simply generate file modified event and the
     existing mechanism is being made specific to memcg.  This pull
     request contains prepatory patches for such change.

   - Various fixes and cleanups"

Fixed up conflict in kernel/cgroup.c as per Tejun.

* 'for-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: (69 commits)
  cgroup: fix cgroup_css() invocation in css_from_id()
  cgroup: make cgroup_write_event_control() use css_from_dir() instead of __d_cgrp()
  cgroup: make cgroup_event hold onto cgroup_subsys_state instead of cgroup
  cgroup: implement CFTYPE_NO_PREFIX
  cgroup: make cgroup_css() take cgroup_subsys * instead and allow NULL subsys
  cgroup: rename cgroup_css_from_dir() to css_from_dir() and update its syntax
  cgroup: fix cgroup_write_event_control()
  cgroup: fix subsystem file accesses on the root cgroup
  cgroup: change cgroup_from_id() to css_from_id()
  cgroup: use css_get() in cgroup_create() to check CSS_ROOT
  cpuset: remove an unncessary forward declaration
  cgroup: RCU protect each cgroup_subsys_state release
  cgroup: move subsys file removal to kill_css()
  cgroup: factor out kill_css()
  cgroup: decouple cgroup_subsys_state destruction from cgroup destruction
  cgroup: replace cgroup->css_kill_cnt with ->nr_css
  cgroup: bounce cgroup_subsys_state ref kill confirmation to a work item
  cgroup: move cgroup->subsys[] assignment to online_css()
  cgroup: reorganize css init / exit paths
  cgroup: add __rcu modifier to cgroup->subsys[]
  ...

10 years agoMerge branch 'for-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata
Linus Torvalds [Wed, 4 Sep 2013 01:19:53 +0000 (18:19 -0700)]
Merge branch 'for-3.12' of git://git./linux/kernel/git/tj/libata

Pull libata changes from Tejun Heo:
 "Two interesting changes.

   - libata acpi handling has been restructured so that the association
     between ata devices and ACPI handles are less convoluted.  This
     change shouldn't change visible behavior.

   - Queued TRIM support, which enables sending TRIM to the device
     without draining in-flight RW commands, is added.  Currently only
     enabled for ahci (and likely to stay that way for the foreseeable
     future).

  Other changes are driver-specific updates / fixes"

* 'for-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata:
  libata: bugfix: Remove __le32 in ata_tf_to_fis()
  libata: acpi: Remove ata_dev_acpi_handle stub in libata.h
  libata: Add support for queued DSM TRIM
  libata: Add support for SEND/RECEIVE FPDMA QUEUED
  libata: Add H2D FIS "auxiliary" port flag
  libata: Populate host-to-device FIS "auxiliary" field
  ata: acpi: rework the ata acpi bind support
  sata, highbank: send extra clock cycles in SGPIO patterns
  sata, highbank: set tx_atten override bits
  devicetree: create a separate binding description for sata_highbank
  drivers/ata/sata_rcar.c: simplify use of devm_ioremap_resource
  sata highbank: enable 64-bit DMA mask when using LPAE
  ata: pata_samsung_cf: add missing __iomem annotation
  ata: pata_arasan: Staticize local symbols
  sata_mv: Remove unneeded CONFIG_HAVE_CLK ifdefs
  ata: use dev_get_platdata()
  sata_mv: Remove unneeded forward declaration
  libata: acpi: remove dead code for ata_acpi_(un)bind
  libata: move 'struct ata_taskfile' and friends from ata.h to libata.h

10 years agoMerge branch 'for-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq
Linus Torvalds [Wed, 4 Sep 2013 01:19:21 +0000 (18:19 -0700)]
Merge branch 'for-3.12' of git://git./linux/kernel/git/tj/wq

Pull workqueue updates from Tejun Heo:
 "Nothing interesting.  All are doc / comment updates"

* 'for-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
  workqueue: Correct/Drop references to gcwq in Documentation
  workqueue: Fix manage_workers() RETURNS description
  workqueue: Comment correction in file header
  workqueue: mark WQ_NON_REENTRANT deprecated

10 years agoMerge branch 'for-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu
Linus Torvalds [Wed, 4 Sep 2013 01:18:08 +0000 (18:18 -0700)]
Merge branch 'for-3.12' of git://git./linux/kernel/git/tj/percpu

Pull single percpu update from Tejun Heo:
 "Just a single patch to update type verification macro for percpu
  accessors.

  Christoph is trying to replace __get_cpu_var() with this_cpu accessors
  which needs this update.  There are still some issues to be resolved
  but eventually the conversion patches are likely to be routed through
  different trees, so I think it'd be convenient to merge this commit
  early"

* 'for-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu:
  percpu: Make __verify_pcu_ptr handle per cpu pointers to arrays

10 years agoMerge branch 'addr_assign_type'
David S. Miller [Wed, 4 Sep 2013 00:57:57 +0000 (20:57 -0400)]
Merge branch 'addr_assign_type'

Bjørn Mork says:

====================
net: set addr_assign_type when inheriting a dev_addr

Copying the dev_addr from a parent device is an operation
common to a number of drivers. The addr_assign_type should
be updated accordingly, either by reusing the value from
the source device or explicitly indicating that the address
is stolen by setting addr_assign_type to NET_ADDR_STOLEN.

This patch set adds a helper copying both the dev_addr and
the addr_assign_type, and use this helper in drivers which
don't currently set the addr_assign_type. Using NET_ADDR_STOLEN
might be more appropriate in some of these cases.  Please
let me know, and I'll update the patch accordingly.

Changes in v2:
 - assuming addr_len == ETH_ALEN to allow optimized memcpy
 - dropped the vt6656 patch due to addr_len being unset in that driver
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agostaging: vt6655: inherit addr_assign_type along with dev_addr
Bjørn Mork [Fri, 30 Aug 2013 16:08:52 +0000 (18:08 +0200)]
staging: vt6655: inherit addr_assign_type along with dev_addr

A device inheriting a random or set address should reflect this in
its addr_assign_type.

Cc: Forest Bond <forest@alittletooquiet.net>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: libertas: inherit addr_assign_type along with dev_addr
Bjørn Mork [Fri, 30 Aug 2013 16:08:51 +0000 (18:08 +0200)]
net: libertas: inherit addr_assign_type along with dev_addr

A device inheriting a random or set address should reflect this in
its addr_assign_type.

Acked-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: hostap: inherit addr_assign_type along with dev_addr
Bjørn Mork [Fri, 30 Aug 2013 16:08:50 +0000 (18:08 +0200)]
net: hostap: inherit addr_assign_type along with dev_addr

A device inheriting a random or set address should reflect this in
its addr_assign_type.

Cc: Jouni Malinen <j@w1.fi>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: airo: inherit addr_assign_type along with dev_addr
Bjørn Mork [Fri, 30 Aug 2013 16:08:49 +0000 (18:08 +0200)]
net: airo: inherit addr_assign_type along with dev_addr

A device inheriting a random or set address should reflect this in
its addr_assign_type.

Acked-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: team: inherit addr_assign_type along with dev_addr
Bjørn Mork [Fri, 30 Aug 2013 16:08:48 +0000 (18:08 +0200)]
net: team: inherit addr_assign_type along with dev_addr

A device inheriting a random or set address should reflect this in
its addr_assign_type.

Cc: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: macvlan: inherit addr_assign_type along with dev_addr
Bjørn Mork [Fri, 30 Aug 2013 16:08:47 +0000 (18:08 +0200)]
net: macvlan: inherit addr_assign_type along with dev_addr

A device inheriting a random or set address should reflect this in
its addr_assign_type.

Cc: Patrick McHardy <kaber@trash.net>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: dsa: inherit addr_assign_type along with dev_addr
Bjørn Mork [Fri, 30 Aug 2013 16:08:46 +0000 (18:08 +0200)]
net: dsa: inherit addr_assign_type along with dev_addr

A device inheriting a random or set address should reflect this in
its addr_assign_type.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: vlan: inherit addr_assign_type along with dev_addr
Bjørn Mork [Fri, 30 Aug 2013 16:08:45 +0000 (18:08 +0200)]
net: vlan: inherit addr_assign_type along with dev_addr

A device inheriting a random or set address should reflect this in
its addr_assign_type.

Cc: Patrick McHardy <kaber@trash.net>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: etherdevice: add address inherit helper
Bjørn Mork [Fri, 30 Aug 2013 16:08:44 +0000 (18:08 +0200)]
net: etherdevice: add address inherit helper

Some etherdevices inherit their address from a parent or
master device. The addr_assign_type should be updated along
with the address in these cases.  Adding a helper function
to simplify this.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoMerge tag 'pci-v3.12-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaa...
Linus Torvalds [Tue, 3 Sep 2013 23:24:35 +0000 (16:24 -0700)]
Merge tag 'pci-v3.12-changes' of git://git./linux/kernel/git/helgaas/pci

Pull PCI changes from Bjorn Helgaas:

  PCI device hotplug:
    - Use PCIe native hotplug, not ACPI hotplug, when possible (Neil Horman)
    - Assign resources on per-host bridge basis (Yinghai Lu)

  MPS (Max Payload Size):
    - Allow larger MPS settings below hotplug-capable Root Port (Yijing Wang)
    - Add warnings about unsafe MPS settings (Yijing Wang)
    - Simplify interface and messages (Bjorn Helgaas)

  SR-IOV:
    - Return -ENOSYS on non-SR-IOV devices (Stefan Assmann)
    - Update NumVFs register when disabling SR-IOV (Yijing Wang)

  Virtualization:
    - Add bus and slot reset support (Alex Williamson)
    - Fix ACS (Access Control Services) issues (Alex Williamson)

  Miscellaneous:
    - Simplify PCIe Capability accessors (Bjorn Helgaas)
    - Add pcibios_pm_ops for arch-specific hibernate stuff (Sebastian Ott)
    - Disable decoding during BAR sizing only when necessary (Zoltan Kiss)
    - Delay enabling bridges until they're needed (Yinghai Lu)
    - Split Designware support into Synopsys and Exynos parts (Jingoo Han)
    - Convert class code to use dev_groups (Greg Kroah-Hartman)
    - Cleanup Designware and Exynos I/O access wrappers (Seungwon Jeon)
    - Fix bridge I/O window alignment (Bjorn Helgaas)
    - Add pci_wait_for_pending_transaction() (Casey Leedom)
    - Use devm_ioremap_resource() in Marvell driver (Tushar Behera)

* tag 'pci-v3.12-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (63 commits)
  PCI/ACPI: Fix _OSC ordering to allow PCIe hotplug use when available
  PCI: exynos: Add I/O access wrappers
  PCI: designware: Drop "addr" arg from dw_pcie_readl_rc()/dw_pcie_writel_rc()
  PCI: Remove pcie_cap_has_devctl()
  PCI: Support PCIe Capability Slot registers only for ports with slots
  PCI: Remove PCIe Capability version checks
  PCI: Allow PCIe Capability link-related register access for switches
  PCI: Add offsets of PCIe capability registers
  PCI: Tidy bitmasks and spacing of PCIe capability definitions
  PCI: Remove obsolete comment reference to pci_pcie_cap2()
  PCI: Clarify PCI_EXP_TYPE_PCI_BRIDGE comment
  PCI: Rename PCIe capability definitions to follow convention
  PCI: Warn if unsafe MPS settings detected
  PCI: Fix MPS peer-to-peer DMA comment syntax
  PCI: Disable decoding for BAR sizing only when it was actually enabled
  PCI: Add comment about needing pci_msi_off() even when CONFIG_PCI_MSI=n
  PCI: Add pcibios_pm_ops for optional arch-specific hibernate functionality
  PCI: Don't restrict MPS for slots below Root Ports
  PCI: Simplify MPS test for Downstream Port
  PCI: Remove unnecessary check for pcie_get_mps() failure
  ...

10 years agoMerge tag 'drm/for-3.12-rc1' of git://anongit.freedesktop.org/tegra/linux into drm...
Dave Airlie [Tue, 3 Sep 2013 23:01:02 +0000 (09:01 +1000)]
Merge tag 'drm/for-3.12-rc1' of git://anongit.freedesktop.org/tegra/linux into drm-next

drm/tegra: Changes for v3.12-rc1

Only a couple of small patches this time around. These are mostly fixes
for minor bugs that showed up, but there is also some preparatory work
that will come in handy for future patches.

* tag 'drm/for-3.12-rc1' of git://anongit.freedesktop.org/tegra/linux:
  drm/tegra: Parse device tree earlier
  gpu: host1x: Sort drivers by probe order
  gpu: host1x: Check for valid host1x pointer
  gpu: host1x: returning success instead of -ENOMEM
  gpu: host1x: fix an integer overflow check
  drm/tegra: hdmi: Make sure clock is enabled before dumping registers

10 years agoMerge tag 'pm+acpi-3.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
Linus Torvalds [Tue, 3 Sep 2013 22:59:39 +0000 (15:59 -0700)]
Merge tag 'pm+acpi-3.12-rc1' of git://git./linux/kernel/git/rafael/linux-pm

Pull ACPI and power management updates from Rafael Wysocki:

 1) ACPI-based PCI hotplug (ACPIPHP) subsystem rework and introduction
    of Intel Thunderbolt support on systems that use ACPI for signalling
    Thunderbolt hotplug events.  This also should make ACPIPHP work in
    some cases in which it was known to have problems.  From
    Rafael J Wysocki, Mika Westerberg and Kirill A Shutemov.

 2) ACPI core code cleanups and dock station support cleanups from
    Jiang Liu and Rafael J Wysocki.

 3) Fixes for locking problems related to ACPI device hotplug from
    Rafael J Wysocki.

 4) ACPICA update to version 20130725 includig fixes, cleanups, support
    for more than 256 GPEs per GPE block and a change to make the ACPI
    PM Timer optional (we've seen systems without the PM Timer in the
    field already).  One of the fixes, related to the DeRefOf operator,
    is necessary to prevent some Windows 8 oriented AML from causing
    problems to happen.  From Bob Moore, Lv Zheng, and Jung-uk Kim.

 5) Removal of the old and long deprecated /proc/acpi/event interface
    and related driver changes from Thomas Renninger.

 6) ACPI and Xen changes to make the reduced hardware sleep work with
    the latter from Ben Guthro.

 7) ACPI video driver cleanups and a blacklist of systems that should
    not tell the BIOS that they are compatible with Windows 8 (or ACPI
    backlight and possibly other things will not work on them).  From
    Felipe Contreras.

 8) Assorted ACPI fixes and cleanups from Aaron Lu, Hanjun Guo,
    Kuppuswamy Sathyanarayanan, Lan Tianyu, Sachin Kamat, Tang Chen,
    Toshi Kani, and Wei Yongjun.

 9) cpufreq ondemand governor target frequency selection change to
    reduce oscillations between min and max frequencies (essentially,
    it causes the governor to choose target frequencies proportional
    to load) from Stratos Karafotis.

10) cpufreq fixes allowing sysfs attributes file permissions to be
    preserved over suspend/resume cycles Srivatsa S Bhat.

11) Removal of Device Tree parsing for CPU device nodes from multiple
    cpufreq drivers that required some changes related to
    of_get_cpu_node() to be made in a few architectures and in the
    driver core.  From Sudeep KarkadaNagesha.

12) cpufreq core fixes and cleanups related to mutual exclusion and
    driver module references from Viresh Kumar, Lukasz Majewski and
    Rafael J Wysocki.

13) Assorted cpufreq fixes and cleanups from Amit Daniel Kachhap,
    Bartlomiej Zolnierkiewicz, Hanjun Guo, Jingoo Han, Joseph Lo,
    Julia Lawall, Li Zhong, Mark Brown, Sascha Hauer, Stephen Boyd,
    Stratos Karafotis, and Viresh Kumar.

14) Fixes to prevent race conditions in coupled cpuidle from happening
    from Colin Cross.

15) cpuidle core fixes and cleanups from Daniel Lezcano and
    Tuukka Tikkanen.

16) Assorted cpuidle fixes and cleanups from Daniel Lezcano,
    Geert Uytterhoeven, Jingoo Han, Julia Lawall, Linus Walleij,
    and Sahara.

17) System sleep tracing changes from Todd E Brandt and Shuah Khan.

18) PNP subsystem conversion to using struct dev_pm_ops for power
    management from Shuah Khan.

* tag 'pm+acpi-3.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (217 commits)
  cpufreq: Don't use smp_processor_id() in preemptible context
  cpuidle: coupled: fix race condition between pokes and safe state
  cpuidle: coupled: abort idle if pokes are pending
  cpuidle: coupled: disable interrupts after entering safe state
  ACPI / hotplug: Remove containers synchronously
  driver core / ACPI: Avoid device hot remove locking issues
  cpufreq: governor: Fix typos in comments
  cpufreq: governors: Remove duplicate check of target freq in supported range
  cpufreq: Fix timer/workqueue corruption due to double queueing
  ACPI / EC: Add ASUSTEK L4R to quirk list in order to validate ECDT
  ACPI / thermal: Add check of "_TZD" availability and evaluating result
  cpufreq: imx6q: Fix clock enable balance
  ACPI: blacklist win8 OSI for buggy laptops
  cpufreq: tegra: fix the wrong clock name
  cpuidle: Change struct menu_device field types
  cpuidle: Add a comment warning about possible overflow
  cpuidle: Fix variable domains in get_typical_interval()
  cpuidle: Fix menu_device->intervals type
  cpuidle: CodingStyle: Break up multiple assignments on single line
  cpuidle: Check called function parameter in get_typical_interval()
  ...

10 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending
Linus Torvalds [Tue, 3 Sep 2013 22:50:41 +0000 (15:50 -0700)]
Merge git://git./linux/kernel/git/nab/target-pending

Pull SCSI target fixes from Nicholas Bellinger:
 "The first patch is to address a long standing issue where INQUIRY
  vendor + model response data was not correctly padded with ASCII
  spaces, causing MSFT and Falconstor multipath stacks to not function
  with our LUNs.

  The second -> forth patches are additional iscsi-target regression
  fixes for the post >= v3.10 iser-target changes.  The second and third
  are failure cases that have appeared during further testing, and the
  forth is only reproducible with malformed NOP packets.

  The fifth patch is a v3.11 specific regression caused by a recent
  optimization that showed up during WRITE I/O failure testing.

  I'll be sending Patch #1 and Patch #5 to Greg-KH separately for
  stable"

* git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
  target: Fix se_cmd->state_list leak regression during WRITE failure
  iscsi-target: Fix potential NULL pointer in solicited NOPOUT reject
  iscsi-target: Fix iscsit_transport reference leak during NP thread reset
  iscsi-target: Fix ImmediateData=Yes failure regression in >= v3.10
  target: Fix trailing ASCII space usage in INQUIRY vendor+model

10 years agoMerge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Linus Torvalds [Tue, 3 Sep 2013 22:48:06 +0000 (15:48 -0700)]
Merge tag 'scsi-misc' of git://git./linux/kernel/git/jejb/scsi

Pull first round of SCSI updates from James Bottomley:
 "This patch set is a set of driver updates (ufs, zfcp, lpfc, mpt2/3sas,
  qla4xxx, qla2xxx [adding support for ISP8044 + other things]).

  We also have a new driver: esas2r which has a number of static checker
  problems, but which I expect to resolve over the -rc course of 3.12
  under the new driver exception.

  We also have the error return that were discussed at LSF"

* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (118 commits)
  [SCSI] sg: push file descriptor list locking down to per-device locking
  [SCSI] sg: checking sdp->detached isn't protected when open
  [SCSI] sg: no need sg_open_exclusive_lock
  [SCSI] sg: use rwsem to solve race during exclusive open
  [SCSI] scsi_debug: fix logical block provisioning support when unmap_alignment != 0
  [SCSI] scsi_debug: fix endianness bug in sdebug_build_parts()
  [SCSI] qla2xxx: Update the driver version to 8.06.00.08-k.
  [SCSI] qla2xxx: print MAC via %pMR.
  [SCSI] qla2xxx: Correction to message ids.
  [SCSI] qla2xxx: Correctly print out/in mailbox registers.
  [SCSI] qla2xxx: Add a new interface to update versions.
  [SCSI] qla2xxx: Move queue depth ramp down message to i/o debug level.
  [SCSI] qla2xxx: Select link initialization option bits from current operating mode.
  [SCSI] qla2xxx: Add loopback IDC-TIME-EXTEND aen handling support.
  [SCSI] qla2xxx: Set default critical temperature value in cases when ISPFX00 firmware doesn't provide it
  [SCSI] qla2xxx: QLAFX00 make over temperature AEN handling informational, add log for normal temperature AEN
  [SCSI] qla2xxx: Correct Interrupt Register offset for ISPFX00
  [SCSI] qla2xxx: Remove handling of Shutdown Requested AEN from qlafx00_process_aen().
  [SCSI] qla2xxx: Send all AENs for ISPFx00 to above layers.
  [SCSI] qla2xxx: Add changes in initialization for ISPFX00 cards with BIOS
  ...

10 years agolockref: Relax in cmpxchg loop
Luck, Tony [Tue, 3 Sep 2013 21:49:49 +0000 (14:49 -0700)]
lockref: Relax in cmpxchg loop

While we are likley to succeed and break out of this loop, it isn't
guaranteed.  We should be power and thread friendly if we do have to
go around for a second (or third, or more) attempt.

Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agoMerge tag 'tty-3.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Linus Torvalds [Tue, 3 Sep 2013 18:38:36 +0000 (11:38 -0700)]
Merge tag 'tty-3.12-rc1' of git://git./linux/kernel/git/gregkh/tty

Pull tty/serial driver patches from Greg KH:
 "Here's the big tty/serial driver pull request for 3.12-rc1.

  Lots of n_tty reworks to resolve some very long-standing issues,
  removing the 3-4 different locks that were taken for every character.
  This code has been beaten on for a long time in linux-next with no
  reported regressions.

  Other than that, a range of serial and tty driver updates and
  revisions.  Full details in the shortlog"

* tag 'tty-3.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (226 commits)
  hvc_xen: Remove unnecessary __GFP_ZERO from kzalloc
  serial: imx: initialize the local variable
  tty: ar933x_uart: add device tree support and binding documentation
  tty: ar933x_uart: allow to build the driver as a module
  ARM: dts: msm: Update uartdm compatible strings
  devicetree: serial: Document msm_serial bindings
  serial: unify serial bindings into a single dir
  serial: fsl-imx-uart: Cleanup duplicate device tree binding
  tty: ar933x_uart: use config_enabled() macro to clean up ifdefs
  tty: ar933x_uart: remove superfluous assignment of ar933x_uart_driver.nr
  tty: ar933x_uart: use the clk API to get the uart clock
  tty: serial: cpm_uart: Adding proper request of GPIO used by cpm_uart driver
  serial: sirf: fix the amount of serial ports
  serial: sirf: define macro for some magic numbers of USP
  serial: icom: move array overflow checks earlier
  TTY: amiserial, remove unnecessary platform_set_drvdata()
  serial: st-asc: remove unnecessary platform_set_drvdata()
  msm_serial: Send more than 1 character on the console w/ UARTDM
  msm_serial: Add support for non-GSBI UARTDM devices
  msm_serial: Switch clock consumer strings and simplify code
  ...

10 years agoMerge tag 'staging-3.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Tue, 3 Sep 2013 18:37:57 +0000 (11:37 -0700)]
Merge tag 'staging-3.12-rc1' of git://git./linux/kernel/git/gregkh/staging

Pull staging tree merge from Greg KH:
 "Here's the bit staging tree pull request for 3.12-rc1.

  Lots of staging driver updates, and fixes.  Lustre is finally enabled
  in the build, and lots of cleanup started happening in it.  There's a
  new wireless driver in here, and 2 new TTY drivers, which cause the
  overall lines added/removed to be quite large on the "added" side.

  The IIO driver updates are also coming through here, as they are tied
  to the staging iio drivers"

* tag 'staging-3.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (942 commits)
  staging: dwc2: make dwc2_core_params documentation more complete
  staging: dwc2: validate the value for phy_utmi_width
  staging: dwc2: interpret all hwcfg and related register at init time
  staging: dwc2: properly mask the GRXFSIZ register
  staging: dwc2: remove redundant register reads
  staging: dwc2: re-use hptxfsiz variable
  staging: dwc2: simplify debug output in dwc_hc_init
  staging: dwc2: add missing shift
  staging: dwc2: simplify register shift expressions
  staging: dwc2: only read the snpsid register once
  staging: dwc2: unshift non-bool register value constants
  staging: dwc2: fix off-by-one in check for max_packet_count parameter
  staging: dwc2: remove specific fifo size constants
  Staging:BCM:DDRInit.c:Renaming __FUNCTION__
  staging: bcm: remove Version.h file.
  staging: rtl8188eu: off by one in rtw_set_802_11_add_wep()
  staging: r8188eu: copying one byte too much
  staging: rtl8188eu: || vs && typo
  staging: r8188eu: off by one bugs
  staging: crystalhd: Resolve sparse 'different base types' warnings.
  ...

10 years agoMerge tag 'driver-core-3.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Tue, 3 Sep 2013 18:37:15 +0000 (11:37 -0700)]
Merge tag 'driver-core-3.12-rc1' of git://git./linux/kernel/git/gregkh/driver-core

Pull driver core patches from Greg KH:
 "Here's the big driver core pull request for 3.12-rc1.

  Lots of tiny changes here fixing up the way sysfs attributes are
  created, to try to make drivers simpler, and fix a whole class race
  conditions with creations of device attributes after the device was
  announced to userspace.

  All the various pieces are acked by the different subsystem
  maintainers"

* tag 'driver-core-3.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (119 commits)
  firmware loader: fix pending_fw_head list corruption
  drivers/base/memory.c: introduce help macro to_memory_block
  dynamic debug: line queries failing due to uninitialized local variable
  sysfs: sysfs_create_groups returns a value.
  debugfs: provide debugfs_create_x64() when disabled
  rbd: convert bus code to use bus_groups
  firmware: dcdbas: use binary attribute groups
  sysfs: add sysfs_create/remove_groups for when SYSFS is not enabled
  driver core: add #include <linux/sysfs.h> to core files.
  HID: convert bus code to use dev_groups
  Input: serio: convert bus code to use drv_groups
  Input: gameport: convert bus code to use drv_groups
  driver core: firmware: use __ATTR_RW()
  driver core: core: use DEVICE_ATTR_RO
  driver core: bus: use DRIVER_ATTR_WO()
  driver core: create write-only attribute macros for devices and drivers
  sysfs: create __ATTR_WO()
  driver-core: platform: convert bus code to use dev_groups
  workqueue: convert bus code to use dev_groups
  MEI: convert bus code to use dev_groups
  ...

10 years agoMerge tag 'char-misc-3.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregk...
Linus Torvalds [Tue, 3 Sep 2013 18:36:27 +0000 (11:36 -0700)]
Merge tag 'char-misc-3.12-rc1' of git://git./linux/kernel/git/gregkh/char-misc

Pull char/misc patches from Greg KH:
 "Here is the big char/misc driver pull request for 3.12-rc1

  Lots of driver updates all over the char/misc tree, full details in
  the shortlog"

* tag 'char-misc-3.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (62 commits)
  drivers: uio: Kconfig: add MMU dependancy for UIO
  drivers: uio: Add driver for Humusoft MF624 DAQ PCI card
  drivers: uio_pdrv_genirq: use dev_get_platdata()
  drivers: uio_pruss: use dev_get_platdata()
  drivers: uio_dmem_genirq: use dev_get_platdata()
  drivers: parport: Kconfig: exclude h8300 for PARPORT_PC
  drivers: misc: ti-st: fix potential race if st_kim_start fails
  Drivers: hv: vmbus: Do not attempt to negoatiate a new version prematurely
  misc: vmw_balloon: Remove braces to fix build for clang.
  Drivers: hv: vmbus: Fix a bug in the handling of channel offers
  vme: vme_ca91cx42.c: fix to pass correct device identity to free_irq()
  VMCI: Add support for virtual IOMMU
  VMCI: Remove non-blocking/pinned queuepair support
  uio: uio_pruss: remove unnecessary platform_set_drvdata()
  parport: amiga: remove unnecessary platform_set_drvdata()
  vme: vme_vmivme7805.c: add missing __iomem annotation
  vme: vme_ca91cx42.c: add missing __iomem annotation
  vme: vme_tsi148.c: add missing __iomem annotation
  drivers/misc/hpilo: Correct panic when an AUX iLO is detected
  uio: drop unused vma_count member in uio_device struct
  ...

10 years agoMerge tag 'usb-3.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Linus Torvalds [Tue, 3 Sep 2013 18:35:32 +0000 (11:35 -0700)]
Merge tag 'usb-3.12-rc1' of git://git./linux/kernel/git/gregkh/usb

Pull USB patches from Greg KH:
 "Here's the big USB driver pull request for 3.12-rc1

  Lots of USB driver fixes and updates.  Nothing major, just the normal
  xhci, gadget, and other driver changes.  Full details in the shortlog"

* tag 'usb-3.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (352 commits)
  usbcore: fix incorrect type in assignment in descriptors_changed()
  usbcore: compare and release one bos descriptor in usb_reset_and_verify_device()
  ehci: remove debugging statement with ehci statistics in ehci_stop()
  ehci: remove duplicate debug_async_open() prototype in ehci-dbg.c
  ehci: enable debugging code when CONFIG_DYNAMIC_DEBUG is set
  ehci: remove ehci_vdbg() verbose debugging statements
  Documentation sysfs-bus-usb: Document which files are used by libusb
  Documentation sysfs-bus-usb: Document the speed file used by libusb
  Documentation sysfs-bus-usb: Move files with known users to stable
  USB: fix build error when CONFIG_PM_SLEEP isn't enabled
  usb: r8a66597-hcd: use platform_{get,set}_drvdata()
  usb: phy-tegra-usb: use platform_{get,set}_drvdata()
  usb: acm gadget: Null termintate strings table
  dma: cppi41: off by one in desc_to_chan()
  xhci: Fix warning introduced by disabling runtime PM.
  dev-core: fix build break when DEBUG is enabled
  USB: OHCI: Allow runtime PM without system sleep
  usb: ohci-at91: remove unnecessary dev_set_drvdata()
  usb: renesas_usbhs: use platform_{get,set}_drvdata()
  usb: fotg210-udc: use platform_{get,set}_drvdata()
  ...

10 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Linus Torvalds [Tue, 3 Sep 2013 17:46:26 +0000 (10:46 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/s390/linux

Pull first batch of s390 updates from Martin Schwidefsky:
 "The most interesting change is that Martin converted s390 to generic
  hardirqs.  Which means that all current architectures have been
  converted and that CONFIG_GENERIC_HARDIRQS can be removed.  Martin
  prepared a patch for that already (see genirq branch), but the best
  time to merge that is probably at the end of the merge window / begin
  of -rc1.

  Another patch converts s390 to software referenced bits instead of
  relying on the reference bit in the storage key.  Therefore s390
  doesn't use storage keys anymore, except for kvm.

  Besides that we have improvements, cleanups and fixes in PCI, DASD and
  all over the place."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (32 commits)
  s390/pci: use virtual memory for iommu bitmap
  s390/cio: fix unlocked access of global bitmap
  s390/pci: update function handle after resume from hibernate
  s390/pci: try harder to modify a function
  s390/pci: split lpf
  s390/hibernate: add early resume function
  s390/pci: add recover sysfs knob
  s390/pci: use claim_resource
  s390/pci/hotplug: convert to be builtin only
  s390/mm: implement software referenced bits
  s390/dasd: fix statistics for recovered requests
  s390/tx: allow program interruption filtering in user space
  s390/pgtable: fix mprotect for single-threaded KVM guests
  s390/time: return with irqs disabled from psw_idle
  s390/kprobes: add support for compare and branch instructions
  s390/switch_to: fix save_access_regs() / restore_access_regs()
  s390/bitops: fix inline assembly constraints
  s390/dasd: enable raw_track_access reads without direct I/O
  s390/mm: introduce ptep_flush_lazy helper
  s390/time: clock comparator revalidation
  ...

10 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux...
Linus Torvalds [Tue, 3 Sep 2013 17:45:29 +0000 (10:45 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/geert/linux-m68k

Pull m68k updates from Geert Uytterhoeven:
 "Summary:
   - Kill harmless warning messages when running a multi-platform kernel
     on Atari
   - Correct virt/phys mixups that didn't actually hurt due to identity
     mappings"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
  m68k/atari: ARAnyM - Always use physical addresses in NatFeat calls
  m68k: Ignore disabled HSYNC interrupt on Atari for irqs_disabled()

10 years agoMerge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck...
Linus Torvalds [Tue, 3 Sep 2013 17:43:35 +0000 (10:43 -0700)]
Merge tag 'hwmon-for-linus' of git://git./linux/kernel/git/groeck/linux-staging

Pull hwmon updates from Guenter Roeck:
 - new driver for HTU21D (humidity sensor)
 - add support for Fam16h (Kabini) to k10temp
 - add support for NCT6102D/6106D and NCT6791D to nct6775 driver
 - add support for ADS1115 to ads1015 driver
 - add support for hibernate to w83627ehf and nct6775 drivers
 - some minor cleanups

* tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  hwmon: (htu21) Add Measurement Specialties HTU21D support
  hwmon: Change my email address.
  hwmon: (k10temp) Add support for Fam16h (Kabini)
  hwmon: (adt7462) ADT7462_REG_VOLT_MAX() should return 0
  hwmon: (ads1015) Add support for ADS1115
  hwmon: (w83627ehf) Add support for hibernate
  hwmon: (nct6775) Add support for hibernate
  hwmon: use dev_get_platdata()
  hwmon: (nct6775) Fix size of data->temp array
  hwmon: (nct6775) Avoid using device platform data outside probe function
  hwmon: (nct6775) Add support for NCT6791D
  hwmon: (nct6775) Add support for beep attributes
  hwmon: (nct6775) Add support for critical low/high temperature limits on NCT6106
  hwmon: (nct6775) Add support for NCT6102D/6106D
  hwmon: (nct6775) Support two SuperIO chips in the same system
  hwmon: (nct6775) Allocate attributes dynamically from templates
  hwmon: (coretemp) Atom CPUs don't support TjMax; no warning needed

10 years agoipc/msg.c: Fix lost wakeup in msgsnd().
Manfred Spraul [Tue, 3 Sep 2013 14:00:08 +0000 (16:00 +0200)]
ipc/msg.c: Fix lost wakeup in msgsnd().

The check if the queue is full and adding current to the wait queue of
pending msgsnd() operations (ss_add()) must be atomic.

Otherwise:
 - the thread that performs msgsnd() finds a full queue and decides to
   sleep.
 - the thread that performs msgrcv() first reads all messages from the
   queue and then sleeps, because the queue is empty.
 - the msgrcv() calls do not perform any wakeups, because the msgsnd()
   task has not yet called ss_add().
 - then the msgsnd()-thread first calls ss_add() and then sleeps.

Net result: msgsnd() and msgrcv() both sleep forever.

Observed with msgctl08 from ltp with a preemptible kernel.

Fix: Call ipc_lock_object() before performing the check.

The patch also moves security_msg_queue_msgsnd() under ipc_lock_object:
 - msgctl(IPC_SET) explicitely mentions that it tries to expunge any
   pending operations that are not allowed anymore with the new
   permissions.  If security_msg_queue_msgsnd() is called without locks,
   then there might be races.
 - it makes the patch much simpler.

Reported-and-tested-by: Vineet Gupta <Vineet.Gupta1@synopsys.com>
Acked-by: Rik van Riel <riel@redhat.com>
Cc: stable@vger.kernel.org # for 3.11
Signed-off-by: Manfred Spraul <manfred@colorfullife.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agoMerge tag 'regulator-v3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Linus Torvalds [Tue, 3 Sep 2013 17:09:29 +0000 (10:09 -0700)]
Merge tag 'regulator-v3.12' of git://git./linux/kernel/git/broonie/regulator

Pull regulator updates from Mark Brown:
 "Not much exciting going on with the regulator API this time around,
  lots of driver fixes and enhancements - the main thing is the addition
  of a new API to help make the stubbing code do the right thing for
  missing regulator mappings.

  Highlights:

   - A new regulator_get_optional() API call for regulators that can be
     absent in normal operation.  This currently does nothing but will
     be used to improve the stubbing code for unspecified regulators,
     helping avoid some of the issues we've seen with adding new
     regulator support.
   - Helpers for devices with multiple linear ranges of voltages in the
     same regulator.
   - Moved the helpers into a separate file since core.c is getting
     rather large.
   - New drivers for Dialog DA9210 and DA9063, Freescale pfuze100 and
     Marvell 88pm800"

* tag 'regulator-v3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (70 commits)
  regulator: da9063: Statize da9063_ldo_lim_event
  regulator: lp872x: Make REGULATOR_LP872X depend on I2C rather than I2C=y
  regulator: tps65217: Convert to use linear ranges
  regulator: da9063: Use IS_ERR to check return value of regulator_register()
  regulator: da9063: Optimize da9063_set_current_limit implementation
  regulator: build: Allow most regulators to be built as modules
  regulator: Add devm_regulator_get_exclusive()
  regulator: da9063: Add Dialog DA9063 voltage regulators support.
  regulator: ti-abb: simplify platform_get_resource_byname/devm_ioremap_resource
  hwmon: (sht15) Use devm_regulator_get_optional()
  regulator: core: Use bool for exclusivitity flag
  regulator: 88pm800: forever loop in pm800_regulator_probe()
  cpufreq: cpufreq-cpu0: Use devm_regulator_get_optional()
  regulator: da9210: Remove redundant MODULE_ALIAS
  regulator: 88pm800: Fix checking whether num_regulator is valid
  regulator: s2mps11: Fix setting ramp_delay
  regulator: s2mps11: Fix wrong arguments for regmap_update_bits() call
  regulator: palmas: Update the DT binding doc for smps10 out1 and out2
  regulator: palmas: model SMPS10 as two regulators
  regulator: core: Move list_voltage_{linear,linear_range,table} to helpers.c
  ...

10 years agoMerge tag 'spi-v3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi
Linus Torvalds [Tue, 3 Sep 2013 17:08:25 +0000 (10:08 -0700)]
Merge tag 'spi-v3.12' of git://git./linux/kernel/git/broonie/spi

Pull spi updates from Mark Brown:
 "Business as usual for SPI - some new drivers, lots of fixes and
  updates to existing drivers plus some new framework features.  Notable
  changes are:

   - Support for dual and quad data lines, commonly used by flash chips
     to improve performance, from Wang Yuhang.
   - Factored out a common pattern for runtime PM implementation into
     the core saving a bunch of code.
   - A particularly nice set of updates to the ep93xx driver from
     H Hartley Sweeten, modernising it and reducing the code size a lot.
   - New drivers for Blackfin v3, EFM32, Freescale DSPI and TI QSPI"

* tag 'spi-v3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (133 commits)
  spi/qspi: fix missing unlock on error in ti_qspi_start_transfer_one()
  spi: quad: fix the name of DT property
  spi: core: Fix spi_register_master error handling
  spi: efm32: Fix build error
  spi: altera: Use DIV_ROUND_UP to calculate hw->bytes_per_word
  spi: rspi: Add spi_master_get() call to prevent use after free
  spi: quad: Make DT properties optional
  spi: quad: Fix missing return
  spi: Use dev_get_drvdata at appropriate places
  spi: use dev_get_platdata()
  spi: nuc900: Fix mode_bits setting
  spi: simplify devm_request_mem_region/devm_ioremap
  spi: altera: Simplify altera_spi_txrx implementation for noirq case
  spi: spi-rspi: fix inconsistent spin_lock_irqsave
  spi/qspi: Add compatible string for am4372.
  spi/qspi: Fix device table entry
  spi/sirf: fix the misunderstanding about len of spi_transfer
  spi/qspi: Add dual/quad spi read support
  spi: sirf: fix error return code in spi_sirfsoc_probe()
  spi: bcm2835: Add spi_master_get() call to prevent use after free
  ...

10 years agoMerge tag 'regmap-v3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Linus Torvalds [Tue, 3 Sep 2013 17:07:40 +0000 (10:07 -0700)]
Merge tag 'regmap-v3.12' of git://git./linux/kernel/git/broonie/regmap

Pull regmap updates from Mark Brown:
 "A quiet release for regmap, some cleanups, fixes and:

   - Improved node coalescing for rbtree, reducing memory usage and
     improving performance during syncs.
   - Support for registering multiple register patches.
   - A quirk for handling interrupts that need to be clear when masked
     in regmap-irq"

* tag 'regmap-v3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
  regmap: rbtree: Make cache_present bitmap per node
  regmap: rbtree: Reduce number of nodes, take 2
  regmap: rbtree: Simplify adjacent node look-up
  regmap: debugfs: Fix continued read from registers file
  regcache-rbtree: Fix reg_stride != 1
  regmap: Allow multiple patches to be registered
  regmap: regcache: allow read-only regs to be cached
  regmap: fix regcache_reg_present() for empty cache
  regmap: core: allow a virtual range to cover its own data window
  regmap: irq: document mask/wake_invert flags
  regmap: irq: make flags bool and put them in a bitfield
  regmap: irq: Allow to acknowledge masked interrupts during initialization
  regmap: Provide __acquires/__releases annotations

10 years agoMerge branches 'cxgb4', 'flowsteer', 'ipoib', 'iser', 'mlx4', 'ocrdma' and 'qib'...
Roland Dreier [Tue, 3 Sep 2013 16:01:08 +0000 (09:01 -0700)]
Merge branches 'cxgb4', 'flowsteer', 'ipoib', 'iser', 'mlx4', 'ocrdma' and 'qib' into for-next

10 years agoRDMA/ocrdma: Fix compiler warning about int/pointer size mismatch
Roland Dreier [Tue, 3 Sep 2013 16:00:08 +0000 (09:00 -0700)]
RDMA/ocrdma: Fix compiler warning about int/pointer size mismatch

Fix:

   drivers/infiniband/hw/ocrdma/ocrdma_verbs.c: In function 'ocrdma_build_fr':
>> drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:1832:7: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     mr = (struct ocrdma_mr *)qp->dev->stag_arr[(hdr->lkey >> 8) &
          ^
   drivers/infiniband/hw/ocrdma/ocrdma_verbs.c: In function 'ocrdma_alloc_frmr':
>> drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:2661:64: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     dev->stag_arr[(mr->hwmr.lkey >> 8) & (OCRDMA_MAX_STAG - 1)] = (u64) mr;

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
10 years agoMerge branch 'lockref' (locked reference counts)
Linus Torvalds [Tue, 3 Sep 2013 15:08:21 +0000 (08:08 -0700)]
Merge branch 'lockref' (locked reference counts)

Merge lockref infrastructure code by me and Waiman Long.

I already merged some of the preparatory patches that didn't actually do
any semantic changes earlier, but this merges the actual _reason_ for
those preparatory patches.

The "lockref" structure is a combination "spinlock and reference count"
that allows optimized reference count accesses.  In particular, it
guarantees that the reference count will be updated AS IF the spinlock
was held, but using atomic accesses that cover both the reference count
and the spinlock words, we can often do the update without actually
having to take the lock.

This allows us to avoid the nastiest cases of spinlock contention on
large machines under heavy pathname lookup loads.  When updating the
dentry reference counts on a large system, we'll still end up with the
cache line bouncing around, but that's much less noticeable than
actually having to spin waiting for the lock.

* lockref:
  lockref: implement lockless reference count updates using cmpxchg()
  lockref: uninline lockref helper functions
  vfs: reimplement d_rcu_to_refcount() using lockref_get_or_lock()
  vfs: use lockref_get_not_zero() for optimistic lockless dget_parent()
  lockref: add 'lockref_get_or_lock() helper

10 years agolibata: bugfix: Remove __le32 in ata_tf_to_fis()
Marc Carino [Sun, 1 Sep 2013 15:59:01 +0000 (08:59 -0700)]
libata: bugfix: Remove __le32 in ata_tf_to_fis()

The endianness attribute on the 'aux' local variable is wrong, and can
lead to wrong endianness on big-endian machines,

Signed-off-by: Marc Carino <marc.ceeeee@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
10 years ago[SCSI] sg: push file descriptor list locking down to per-device locking
Vaughan Cao [Thu, 29 Aug 2013 02:00:39 +0000 (10:00 +0800)]
[SCSI] sg: push file descriptor list locking down to per-device locking

Push file descriptor list locking down to per-device locking. Let sg_index_lock
only protect device lookup.
sdp->detached is also set and checked with this lock held.

Signed-off-by: Vaughan Cao <vaughan.cao@oracle.com>
Acked-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>