]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
12 years agoMerge remote-tracking branch 'block/for-next'
Stephen Rothwell [Wed, 24 Oct 2012 01:09:45 +0000 (12:09 +1100)]
Merge remote-tracking branch 'block/for-next'

Conflicts:
init/Kconfig

12 years agoMerge remote-tracking branch 'cgroup/for-next'
Stephen Rothwell [Wed, 24 Oct 2012 01:05:22 +0000 (12:05 +1100)]
Merge remote-tracking branch 'cgroup/for-next'

12 years agoMerge remote-tracking branch 'input/next'
Stephen Rothwell [Wed, 24 Oct 2012 01:03:36 +0000 (12:03 +1100)]
Merge remote-tracking branch 'input/next'

12 years agoMerge remote-tracking branch 'virtio/virtio-next'
Stephen Rothwell [Wed, 24 Oct 2012 01:01:58 +0000 (12:01 +1100)]
Merge remote-tracking branch 'virtio/virtio-next'

12 years agoMerge remote-tracking branch 'modules/modules-next'
Stephen Rothwell [Wed, 24 Oct 2012 00:55:09 +0000 (11:55 +1100)]
Merge remote-tracking branch 'modules/modules-next'

Conflicts:
kernel/module.c

12 years agoMerge remote-tracking branch 'sound-asoc/for-next'
Stephen Rothwell [Wed, 24 Oct 2012 00:53:29 +0000 (11:53 +1100)]
Merge remote-tracking branch 'sound-asoc/for-next'

12 years agoMerge remote-tracking branch 'sound/for-next'
Stephen Rothwell [Wed, 24 Oct 2012 00:51:40 +0000 (11:51 +1100)]
Merge remote-tracking branch 'sound/for-next'

12 years agoMerge remote-tracking branch 'crypto/master'
Stephen Rothwell [Wed, 24 Oct 2012 00:49:58 +0000 (11:49 +1100)]
Merge remote-tracking branch 'crypto/master'

12 years agoMerge remote-tracking branch 'l2-mtd/master'
Stephen Rothwell [Wed, 24 Oct 2012 00:48:19 +0000 (11:48 +1100)]
Merge remote-tracking branch 'l2-mtd/master'

12 years agoMerge remote-tracking branch 'mtd/master'
Stephen Rothwell [Wed, 24 Oct 2012 00:46:38 +0000 (11:46 +1100)]
Merge remote-tracking branch 'mtd/master'

12 years agoMerge remote-tracking branch 'wireless-next/master'
Stephen Rothwell [Wed, 24 Oct 2012 00:44:33 +0000 (11:44 +1100)]
Merge remote-tracking branch 'wireless-next/master'

12 years agoMerge remote-tracking branch 'net-next/master'
Stephen Rothwell [Wed, 24 Oct 2012 00:42:45 +0000 (11:42 +1100)]
Merge remote-tracking branch 'net-next/master'

12 years agoMerge remote-tracking branch 'thermal/next'
Stephen Rothwell [Wed, 24 Oct 2012 00:40:45 +0000 (11:40 +1100)]
Merge remote-tracking branch 'thermal/next'

12 years agoMerge remote-tracking branch 'cpuidle/cpuidle-next'
Stephen Rothwell [Wed, 24 Oct 2012 00:40:38 +0000 (11:40 +1100)]
Merge remote-tracking branch 'cpuidle/cpuidle-next'

Conflicts:
drivers/cpuidle/coupled.c
include/linux/cpuidle.h

12 years agoMerge remote-tracking branch 'infiniband/for-next'
Stephen Rothwell [Wed, 24 Oct 2012 00:38:44 +0000 (11:38 +1100)]
Merge remote-tracking branch 'infiniband/for-next'

12 years agoMerge remote-tracking branch 'kbuild/for-next'
Stephen Rothwell [Wed, 24 Oct 2012 00:38:32 +0000 (11:38 +1100)]
Merge remote-tracking branch 'kbuild/for-next'

12 years agoMerge remote-tracking branch 'v4l-dvb/master'
Stephen Rothwell [Wed, 24 Oct 2012 00:38:29 +0000 (11:38 +1100)]
Merge remote-tracking branch 'v4l-dvb/master'

12 years agoMerge remote-tracking branch 'hwmon-staging/hwmon-next'
Stephen Rothwell [Wed, 24 Oct 2012 00:37:02 +0000 (11:37 +1100)]
Merge remote-tracking branch 'hwmon-staging/hwmon-next'

12 years agoMerge branch 'quilt/i2c'
Stephen Rothwell [Wed, 24 Oct 2012 00:35:31 +0000 (11:35 +1100)]
Merge branch 'quilt/i2c'

12 years agoMerge remote-tracking branch 'hid/for-next'
Stephen Rothwell [Wed, 24 Oct 2012 00:33:51 +0000 (11:33 +1100)]
Merge remote-tracking branch 'hid/for-next'

12 years agoMerge remote-tracking branch 'vfs/for-next'
Stephen Rothwell [Wed, 24 Oct 2012 00:32:22 +0000 (11:32 +1100)]
Merge remote-tracking branch 'vfs/for-next'

12 years agoMerge remote-tracking branch 'xfs/for-next'
Stephen Rothwell [Wed, 24 Oct 2012 00:30:47 +0000 (11:30 +1100)]
Merge remote-tracking branch 'xfs/for-next'

12 years agoMerge remote-tracking branch 'ubifs/linux-next'
Stephen Rothwell [Wed, 24 Oct 2012 00:29:13 +0000 (11:29 +1100)]
Merge remote-tracking branch 'ubifs/linux-next'

12 years agoMerge remote-tracking branch 'v9fs/for-next'
Stephen Rothwell [Wed, 24 Oct 2012 00:29:05 +0000 (11:29 +1100)]
Merge remote-tracking branch 'v9fs/for-next'

12 years agoMerge remote-tracking branch 'ocfs2/linux-next'
Stephen Rothwell [Wed, 24 Oct 2012 00:27:16 +0000 (11:27 +1100)]
Merge remote-tracking branch 'ocfs2/linux-next'

12 years agoMerge remote-tracking branch 'nfs/linux-next'
Stephen Rothwell [Wed, 24 Oct 2012 00:25:44 +0000 (11:25 +1100)]
Merge remote-tracking branch 'nfs/linux-next'

12 years agoMerge remote-tracking branch 'logfs/master'
Stephen Rothwell [Wed, 24 Oct 2012 00:24:04 +0000 (11:24 +1100)]
Merge remote-tracking branch 'logfs/master'

12 years agoMerge remote-tracking branch 'gfs2/master'
Stephen Rothwell [Wed, 24 Oct 2012 00:22:34 +0000 (11:22 +1100)]
Merge remote-tracking branch 'gfs2/master'

12 years agoMerge remote-tracking branch 'fuse/for-next'
Stephen Rothwell [Wed, 24 Oct 2012 00:20:55 +0000 (11:20 +1100)]
Merge remote-tracking branch 'fuse/for-next'

12 years agoMerge remote-tracking branch 'cifs/for-next'
Stephen Rothwell [Wed, 24 Oct 2012 00:19:19 +0000 (11:19 +1100)]
Merge remote-tracking branch 'cifs/for-next'

12 years agoMerge remote-tracking branch 'ceph/master'
Stephen Rothwell [Wed, 24 Oct 2012 00:17:37 +0000 (11:17 +1100)]
Merge remote-tracking branch 'ceph/master'

12 years agoMerge remote-tracking branch 'unicore32/unicore32'
Stephen Rothwell [Wed, 24 Oct 2012 00:16:03 +0000 (11:16 +1100)]
Merge remote-tracking branch 'unicore32/unicore32'

12 years agoMerge remote-tracking branch 's390/features'
Stephen Rothwell [Wed, 24 Oct 2012 00:14:32 +0000 (11:14 +1100)]
Merge remote-tracking branch 's390/features'

12 years agoMerge remote-tracking branch 'mpc5xxx/next'
Stephen Rothwell [Wed, 24 Oct 2012 00:12:59 +0000 (11:12 +1100)]
Merge remote-tracking branch 'mpc5xxx/next'

12 years agoMerge remote-tracking branch 'parisc/for-next'
Stephen Rothwell [Wed, 24 Oct 2012 00:12:56 +0000 (11:12 +1100)]
Merge remote-tracking branch 'parisc/for-next'

12 years agoMerge remote-tracking branch 'mips/mips-for-linux-next'
Stephen Rothwell [Wed, 24 Oct 2012 00:11:26 +0000 (11:11 +1100)]
Merge remote-tracking branch 'mips/mips-for-linux-next'

12 years agoMerge remote-tracking branch 'microblaze/next'
Stephen Rothwell [Wed, 24 Oct 2012 00:09:56 +0000 (11:09 +1100)]
Merge remote-tracking branch 'microblaze/next'

12 years agoMerge remote-tracking branch 'm68knommu/for-next'
Stephen Rothwell [Wed, 24 Oct 2012 00:08:30 +0000 (11:08 +1100)]
Merge remote-tracking branch 'm68knommu/for-next'

Conflicts:
arch/m68k/include/asm/termios.h
arch/m68k/include/uapi/asm/auxvec.h
arch/m68k/include/uapi/asm/msgbuf.h
arch/m68k/include/uapi/asm/sembuf.h
arch/m68k/include/uapi/asm/shmbuf.h
arch/m68k/include/uapi/asm/socket.h
arch/m68k/include/uapi/asm/sockios.h
arch/m68k/include/uapi/asm/termbits.h

12 years agoMerge remote-tracking branch 'cris/for-next'
Stephen Rothwell [Wed, 24 Oct 2012 00:02:29 +0000 (11:02 +1100)]
Merge remote-tracking branch 'cris/for-next'

12 years agoMerge remote-tracking branch 'blackfin/for-linus'
Stephen Rothwell [Wed, 24 Oct 2012 00:01:01 +0000 (11:01 +1100)]
Merge remote-tracking branch 'blackfin/for-linus'

12 years agoMerge remote-tracking branch 'arm64/upstream'
Stephen Rothwell [Tue, 23 Oct 2012 23:59:30 +0000 (10:59 +1100)]
Merge remote-tracking branch 'arm64/upstream'

12 years agoMerge remote-tracking branch 'arm-perf/for-next/perf'
Stephen Rothwell [Tue, 23 Oct 2012 23:57:56 +0000 (10:57 +1100)]
Merge remote-tracking branch 'arm-perf/for-next/perf'

12 years agoMerge remote-tracking branch 'arm/for-next'
Stephen Rothwell [Tue, 23 Oct 2012 23:56:29 +0000 (10:56 +1100)]
Merge remote-tracking branch 'arm/for-next'

12 years agoMerge remote-tracking branch 'spi-current/spi/merge'
Stephen Rothwell [Tue, 23 Oct 2012 23:53:39 +0000 (10:53 +1100)]
Merge remote-tracking branch 'spi-current/spi/merge'

12 years agoMerge remote-tracking branch 'devicetree-current/devicetree/merge'
Stephen Rothwell [Tue, 23 Oct 2012 23:53:27 +0000 (10:53 +1100)]
Merge remote-tracking branch 'devicetree-current/devicetree/merge'

12 years agoMerge remote-tracking branch 'staging.current/staging-linus'
Stephen Rothwell [Tue, 23 Oct 2012 23:53:12 +0000 (10:53 +1100)]
Merge remote-tracking branch 'staging.current/staging-linus'

12 years agoMerge remote-tracking branch 'usb.current/usb-linus'
Stephen Rothwell [Tue, 23 Oct 2012 23:53:11 +0000 (10:53 +1100)]
Merge remote-tracking branch 'usb.current/usb-linus'

12 years agoMerge remote-tracking branch 'driver-core.current/driver-core-linus'
Stephen Rothwell [Tue, 23 Oct 2012 23:53:10 +0000 (10:53 +1100)]
Merge remote-tracking branch 'driver-core.current/driver-core-linus'

12 years agoMerge remote-tracking branch 'sound-current/for-linus'
Stephen Rothwell [Tue, 23 Oct 2012 23:53:08 +0000 (10:53 +1100)]
Merge remote-tracking branch 'sound-current/for-linus'

12 years agoMerge remote-tracking branch 'net/master'
Stephen Rothwell [Tue, 23 Oct 2012 23:53:08 +0000 (10:53 +1100)]
Merge remote-tracking branch 'net/master'

12 years agoMerge remote-tracking branch 'arm-current/fixes'
Stephen Rothwell [Tue, 23 Oct 2012 23:53:06 +0000 (10:53 +1100)]
Merge remote-tracking branch 'arm-current/fixes'

12 years agosock-diag: Report shutdown for inet and unix sockets (v2)
Pavel Emelyanov [Tue, 23 Oct 2012 18:29:56 +0000 (22:29 +0400)]
sock-diag: Report shutdown for inet and unix sockets (v2)

Make it simple -- just put new nlattr with just sk->sk_shutdown bits.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net...
David S. Miller [Tue, 23 Oct 2012 17:26:30 +0000 (13:26 -0400)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next

12 years agoipv6: fix sparse warnings in rt6_info_hash_nhsfn()
Nicolas Dichtel [Mon, 22 Oct 2012 23:35:06 +0000 (23:35 +0000)]
ipv6: fix sparse warnings in rt6_info_hash_nhsfn()

Adding by commit 51ebd3181572 which adds the support of ECMP for IPv6.

Spotted-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: Fix smatch warnings in be_main.c
Padmanabh Ratnakar [Mon, 22 Oct 2012 23:02:44 +0000 (23:02 +0000)]
be2net: Fix smatch warnings in be_main.c

FW flashing code, even though it works correctly, makes some hidden
assumptions about buffer sizes. This is causing code analysers to
report error. Cleanup FW flashing code to remove these hidden assumptions.

Reported-by: Yuanhan Liu <yuanhan.liu@intel.com>
Signed-off-by: Vasundhara Volam <vasundhara.volam@emulex.com>
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonetlink: cleanup the unnecessary return value check
Hans Zhang [Mon, 22 Oct 2012 22:21:23 +0000 (22:21 +0000)]
netlink: cleanup the unnecessary return value check

It's no needed to check the return value of tab since the NULL situation
has been handled already, and the rtnl_msg_handlers[PF_UNSPEC] has been
initialized as non-NULL during the rtnetlink_init().

Signed-off-by: Hans Zhang <zhanghonghui@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoipv4: tcp: clean up tcp_v4_early_demux()
Eric Dumazet [Mon, 22 Oct 2012 21:42:47 +0000 (21:42 +0000)]
ipv4: tcp: clean up tcp_v4_early_demux()

Use same header helpers than tcp_v6_early_demux() because they
are a bit faster, and as they make IPv4/IPv6 versions look
the same.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Neal Cardwell <ncardwell@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoipv6: tcp: clean up tcp_v6_early_demux() icsk variable
Neal Cardwell [Mon, 22 Oct 2012 21:41:48 +0000 (21:41 +0000)]
ipv6: tcp: clean up tcp_v6_early_demux() icsk variable

Remove an icsk variable, which by convention should refer to an
inet_connection_sock rather than an inet_sock. In the process, make
the tcp_v6_early_demux() code and formatting a bit more like
tcp_v4_early_demux(), to ease comparisons and maintenance.

Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge branches 'cxgb4' and 'mlx4' into for-next
Roland Dreier [Tue, 23 Oct 2012 16:03:49 +0000 (09:03 -0700)]
Merge branches 'cxgb4' and 'mlx4' into for-next

12 years agomlx4_core: Perform correct resource cleanup if mlx4_QUERY_ADAPTER() fails
Dotan Barak [Sun, 21 Oct 2012 14:59:23 +0000 (14:59 +0000)]
mlx4_core: Perform correct resource cleanup if mlx4_QUERY_ADAPTER() fails

Fixed the resource cleanup to act correctly and prevent a kernel oops when
mlx4_QUERY_ADAPTER() fails.

Signed-off-by: Dotan Barak <dotanb@dev.mellanox.co.il>
Reviewed-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
12 years agomlx4_core: Remove annoying debug messages from SR-IOV flow
Or Gerlitz [Sun, 21 Oct 2012 14:59:22 +0000 (14:59 +0000)]
mlx4_core: Remove annoying debug messages from SR-IOV flow

These debug prints left behind by commits c82e9aa0a8bc ("mlx4_core:
resource tracking for HCA resources used by guests"), 54679e148287
("mlx4: Implement QP paravirtualization and maintain phys_pkey_cache
for smp_snoop") and 993c401e2079 ("mlx4_core: Add IB port-state
machine and port mgmt event propagation") make it pretty hard to
actually use the mlx4_core debug messages when running in SRIOV/IB
mode -- for example, the module load sequence of a device with one VF
yielded 631 debug prints, with 408 of them being from this set.  Let's
just remove them.

Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
12 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
John W. Linville [Tue, 23 Oct 2012 15:41:46 +0000 (11:41 -0400)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless

Conflicts:
drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
net/mac80211/mlme.c

12 years agoALSA: usb-audio: Add quirk for Reloop Play
Didier Villevalois [Sun, 21 Oct 2012 16:29:12 +0000 (18:29 +0200)]
ALSA: usb-audio: Add quirk for Reloop Play

The Reloop Audio needs a fixed endpoint quirk with S24_3LE format and
UAC_EP_CS_ATTR_SAMPLE_RATE attribute.

Signed-off-by: Didier Villevalois <ptitjes@free.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoarm64: Move PCI_IOBASE closer to MODULES_VADDR
Catalin Marinas [Tue, 23 Oct 2012 13:51:16 +0000 (14:51 +0100)]
arm64: Move PCI_IOBASE closer to MODULES_VADDR

This is to reuse the same pmd table that is sparsely populated with
the modules space.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
12 years agoarm64: Use pgprot_t as the last argument when invoking __ioremap()
Catalin Marinas [Tue, 23 Oct 2012 13:24:21 +0000 (14:24 +0100)]
arm64: Use pgprot_t as the last argument when invoking __ioremap()

Even if it works with since the types have the same size, the correct
type of the last __ioremap() argument is pgprot_t rather than pteval_t.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
12 years agoALSA: hda: support for wallclock timestamps
Pierre-Louis Bossart [Mon, 22 Oct 2012 21:42:16 +0000 (16:42 -0500)]
ALSA: hda: support for wallclock timestamps

Reuse code from clocksource to handle wall clock counter.
Since wrapparound occurs, the audio timestamp is reinitialized
to zero on a trigger. Synchronized linked devices will
start counting from same reference to avoid any drift.

Max buffer time is limited to 178 seconds to make sure
wall clock counter does not overflow

Wallclock timestamps are disabled on capture streams
until we figure out how to handle digital inputs.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: core: add hooks for audio timestamps
Pierre-Louis Bossart [Mon, 22 Oct 2012 21:42:15 +0000 (16:42 -0500)]
ALSA: core: add hooks for audio timestamps

ALSA did not provide any direct means to infer the audio time for A/V
sync and system/audio time correlations (eg. PulseAudio).
Applications had to track the number of samples read/written and
add/subtract the number of samples queued in the ring buffer.  This
accounting led to small errors, typically several samples, due to the
two-step process.  Computing the audio time in the kernel is more
direct, as all the information is available in the same routines.

Also add new .audio_wallclock routine to enable fine-grain synchronization
between monotonic system time and audio hardware time.
Using the wallclock, if supported in hardware, allows for a
much better sub-microsecond precision and a common drift tracking for
all devices sharing the same wall clock (master clock).

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: core: keep track of boundary wrap-around
Pierre-Louis Bossart [Mon, 22 Oct 2012 21:42:14 +0000 (16:42 -0500)]
ALSA: core: keep track of boundary wrap-around

Keep track of boundary crossing when hw_ptr
exceeds boundary limit and wraps-around. This
will help keep track of total number
of frames played/received at the kernel level

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoACPI video: Ignore errors after _DOD evaluation.
Igor Murzov [Sat, 13 Oct 2012 00:41:25 +0000 (04:41 +0400)]
ACPI video: Ignore errors after _DOD evaluation.

There are systems where video module known to work fine regardless
of broken _DOD and ignoring returned value here doesn't cause
any issues later. This should fix brightness controls on some laptops.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=47861

Signed-off-by: Igor Murzov <e-mail@date.by>
Reviewed-by: Sergey V <sftp.mtuci@gmail.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
12 years agoixgbevf: Update version string
Greg Rose [Thu, 4 Oct 2012 02:10:53 +0000 (02:10 +0000)]
ixgbevf: Update version string

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoixgbevf: fix softirq-safe to unsafe splat on internal mbx_lock
John Fastabend [Mon, 1 Oct 2012 14:52:20 +0000 (14:52 +0000)]
ixgbevf: fix softirq-safe to unsafe splat on internal mbx_lock

The lockdep splat below identifies a case where irq safe to unsafe
lock order is detected. Resolved by making mbx_lock bh.

======================================================
[ INFO: SOFTIRQ-safe -> SOFTIRQ-unsafe lock order detected ]
3.6.0-rc5jk-net-next+ #119 Not tainted
------------------------------------------------------
ip/2608 [HC0[0]:SC0[2]:HE1:SE0] is trying to acquire:
 (&(&adapter->mbx_lock)->rlock){+.+...}, at: [<ffffffffa008114e>] ixgbevf_set_rx_mode+0x36/0xd2 [ixgbevf]

and this task is already holding:
 (_xmit_ETHER){+.....}, at: [<ffffffff814097c8>] dev_set_rx_mode+0x1e/0x33
which would create a new lock dependency:
 (_xmit_ETHER){+.....} -> (&(&adapter->mbx_lock)->rlock){+.+...}

but this new dependency connects a SOFTIRQ-irq-safe lock:
 (&(&mc->mca_lock)->rlock){+.-...}
... which became SOFTIRQ-irq-safe at:
  [<ffffffff81092ee5>] __lock_acquire+0x2f2/0xdf3
  [<ffffffff81093b11>] lock_acquire+0x12b/0x158
  [<ffffffff814bdbcd>] _raw_spin_lock_bh+0x4a/0x7d
  [<ffffffffa011a740>] mld_ifc_timer_expire+0x1b2/0x282 [ipv6]
  [<ffffffff81054580>] run_timer_softirq+0x2a2/0x3ee
  [<ffffffff8104cc42>] __do_softirq+0x161/0x2b9
  [<ffffffff814c6a7c>] call_softirq+0x1c/0x30
  [<ffffffff81011bc7>] do_softirq+0x4b/0xa3
  [<ffffffff8104c8d5>] irq_exit+0x53/0xd7
  [<ffffffff814c734d>] do_IRQ+0x9d/0xb4
  [<ffffffff814be56f>] ret_from_intr+0x0/0x1a
  [<ffffffff813de21c>] cpuidle_enter+0x12/0x14
  [<ffffffff813de235>] cpuidle_enter_state+0x17/0x3f
  [<ffffffff813deb6c>] cpuidle_idle_call+0x140/0x21c
  [<ffffffff8101764c>] cpu_idle+0x79/0xcd
  [<ffffffff814a59f5>] rest_init+0x149/0x150
  [<ffffffff81ca2cbc>] start_kernel+0x37c/0x389
  [<ffffffff81ca22dd>] x86_64_start_reservations+0xb8/0xbd
  [<ffffffff81ca23e3>] x86_64_start_kernel+0x101/0x110

to a SOFTIRQ-irq-unsafe lock:
 (&(&adapter->mbx_lock)->rlock){+.+...}
... which became SOFTIRQ-irq-unsafe at:
...  [<ffffffff81092f59>] __lock_acquire+0x366/0xdf3
  [<ffffffff81093b11>] lock_acquire+0x12b/0x158
  [<ffffffff814bd862>] _raw_spin_lock+0x45/0x7a
  [<ffffffffa0080fde>] ixgbevf_negotiate_api+0x3d/0x6d [ixgbevf]
  [<ffffffffa008404b>] ixgbevf_open+0x6c/0x43e [ixgbevf]
  [<ffffffff8140b2c1>] __dev_open+0xa0/0xe6
  [<ffffffff814099b6>] __dev_change_flags+0xbe/0x142
  [<ffffffff8140b1eb>] dev_change_flags+0x21/0x57
  [<ffffffff8141a523>] do_setlink+0x2e2/0x7f4
  [<ffffffff8141ad8c>] rtnl_newlink+0x277/0x4bb
  [<ffffffff81419c08>] rtnetlink_rcv_msg+0x236/0x253
  [<ffffffff8142f92d>] netlink_rcv_skb+0x43/0x94
  [<ffffffff814199cb>] rtnetlink_rcv+0x26/0x2d
  [<ffffffff8142f6dc>] netlink_unicast+0xee/0x174
  [<ffffffff8142ff12>] netlink_sendmsg+0x26a/0x288
  [<ffffffff813f5a0d>] __sock_sendmsg_nosec+0x58/0x61
  [<ffffffff813f7d57>] __sock_sendmsg+0x3d/0x48
  [<ffffffff813f7ed9>] sock_sendmsg+0x6e/0x87
  [<ffffffff813f93d4>] __sys_sendmsg+0x206/0x288
  [<ffffffff813f95ce>] sys_sendmsg+0x42/0x60
  [<ffffffff814c57a9>] system_call_fastpath+0x16/0x1b

other info that might help us debug this:

Chain exists of:
  &(&mc->mca_lock)->rlock --> _xmit_ETHER --> &(&adapter->mbx_lock)->rlock

 Possible interrupt unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&(&adapter->mbx_lock)->rlock);
                               local_irq_disable();
                               lock(&(&mc->mca_lock)->rlock);
                               lock(_xmit_ETHER);
  <Interrupt>
    lock(&(&mc->mca_lock)->rlock);

 *** DEADLOCK ***

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Acked-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoixgbevf: Check for error on dma_map_single call
Greg Rose [Fri, 21 Sep 2012 00:14:14 +0000 (00:14 +0000)]
ixgbevf: Check for error on dma_map_single call

Ignoring the return value from a call to the kernel dma_map API functions
can cause data corruption and system instability.  Check the return value
and take appropriate action.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoixgbevf: make netif_napi_add and netif_napi_del symmetric
John Fastabend [Sun, 16 Sep 2012 08:19:46 +0000 (08:19 +0000)]
ixgbevf: make netif_napi_add and netif_napi_del symmetric

ixgbevf_alloc_q_vectors() calls netif_napi_add for each qvector
where qvectors is determined by the number of msix vectors. This
makes perfect sense.

However on cleanup when ixgbevf_free_q_vectors() is called and
for each qvector we should call netif_napi_del there is some
extra logic to add a dependency on RX queues. This patch makes
the add/del operations symmetric by removing the RX queues
dependency.

Without this if  free_netdev() is called we see the general
protection fault below in netif_napi_del when list_del_init()
is called.

# addr2line -e ./vmlinux ffffffff8140810c
net-next/include/linux/list.h:88

general protection fault: 0000 [#1] SMP
Modules linked in: bonding ixgbevf ixgbe(-) mdio libfc scsi_transport_fc scsi_tgt 8021q garp stp llc cpufreq_ondemand acpi_cpufreq freq_table mperf ipv6 uinput coretemp lpc_ich i2c_i801 shpchp hwmon i2c_core serio_raw crc32c_intel mfd_core joydev pcspkr microcode ioatdma igb dca pata_acpi ata_generic usb_storage pata_jmicron [last unloaded: bonding]
CPU 10
Pid: 4174, comm: rmmod Tainted: G        W    3.6.0-rc3jk-net-next+ #104 Supermicro X8DTN/X8DTN
RIP: 0010:[<ffffffff8140810c>]  [<ffffffff8140810c>] netif_napi_del+0x24/0x87
RSP: 0018:ffff88027f5e9b48  EFLAGS: 00010293
RAX: ffff8806224b4768 RBX: ffff8806224b46e8 RCX: 6b6b6b6b6b6b6b6b
RDX: 6b6b6b6b6b6b6b6b RSI: ffffffff810bf6c5 RDI: ffff8806224b46e8
RBP: ffff88027f5e9b58 R08: ffff88033200b180 R09: ffff88027f5e98a8
R10: ffff88033320b000 R11: ffff88027f5e9ae8 R12: 6b6b6b6b6b6b6aeb
R13: ffff8806221d11c0 R14: 0000000000000000 R15: ffff88027f5e9cf8
FS:  00007f5e58b9b700(0000) GS:ffff880333200000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 00000000010ef2b8 CR3: 0000000281fff000 CR4: 00000000000007e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process rmmod (pid: 4174, threadinfo ffff88027f5e8000, task ffff88032f888000)
Stack:
 ffff8806221d1160 6b6b6b6b6b6b6aeb ffff88027f5e9b88 ffffffff81408e46
 ffff8806221d1160 ffff8806221d1160 ffff8806221d1ae0 ffff8806221d5668
 ffff88027f5e9bb8 ffffffffa009153c ffffffffa0092a30 ffff8806221d5700
Call Trace:
 [<ffffffff81408e46>] free_netdev+0x64/0xd7
 [<ffffffffa009153c>] ixgbevf_remove+0xa6/0xbc [ixgbevf]
 [<ffffffff8127a7a1>] pci_device_remove+0x2d/0x51
 [<ffffffff8131f503>] __device_release_driver+0x6c/0xc2
 [<ffffffff8131f640>] device_release_driver+0x25/0x32
 [<ffffffff8131e821>] bus_remove_device+0x148/0x15d
 [<ffffffff8131cb6b>] device_del+0x130/0x1a4
 [<ffffffff8131cc2a>] device_unregister+0x4b/0x57
 [<ffffffff81275c27>] pci_stop_bus_device+0x63/0x85
 [...]

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Acked-by: Greg Rose <gregory.v.rose@intel.com>
Acked-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoigb: Update version
Carolyn Wyborny [Wed, 17 Oct 2012 07:01:56 +0000 (07:01 +0000)]
igb: Update version

This patch updates the igb driver version to 4.0.17.

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoigb: Update get cable length function for i210/i211
Carolyn Wyborny [Wed, 10 Oct 2012 04:42:59 +0000 (04:42 +0000)]
igb: Update get cable length function for i210/i211

There was a problem in the initial implementation of the get cable length
function for i210 and it did not work properly.  This patch fixes that
problem for i210/i211 devices.

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agomaintainers: update with official intel support link, new maintainer
Jesse Brandeburg [Tue, 9 Oct 2012 02:52:14 +0000 (02:52 +0000)]
maintainers: update with official intel support link, new maintainer

Add an official link which is designed to guide the user to the appropriate
support resource (be it community, OEM, Intel phone, Intel email, etc)

Add the current e1000 maintainer to the list of Intel maintainers.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoe1000e: Minimum packet size must be 17 bytes
Tushar Dave [Fri, 14 Sep 2012 02:21:37 +0000 (02:21 +0000)]
e1000e: Minimum packet size must be 17 bytes

This is a HW requirement. Although a buffer as short as 1 byte is allowed,
the total length of packet before, padding and CRC insertion, must be at
least 17 bytes.  So pad all small packets manually up to 17 bytes before
delivering them to HW.

Signed-off-by: Tushar Dave <tushar.n.dave@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoBlackfin: twi: Add missing __iomem annotation
Lars-Peter Clausen [Mon, 22 Oct 2012 14:09:06 +0000 (16:09 +0200)]
Blackfin: twi: Add missing __iomem annotation

Add a missing __iomem to the bfin_twi_iface struct's regs_base field. This fixes
the following sparse warnings:

Fixes the following sparse warnings:
drivers/i2c/busses/i2c-bfin-twi.c:641:26: warning: incorrect type in assignment (different address spaces)
drivers/i2c/busses/i2c-bfin-twi.c:641:26:    expected struct bfin_twi_regs  *regs_base
drivers/i2c/busses/i2c-bfin-twi.c:641:26:    got void [noderef] <asn:2>*
drivers/i2c/busses/i2c-bfin-twi.c:715:22: warning: incorrect type in argument 1 (different address spaces)
drivers/i2c/busses/i2c-bfin-twi.c:715:22:    expected void [noderef] <asn:2>*addr
drivers/i2c/busses/i2c-bfin-twi.c:715:22:    got struct bfin_twi_regs *regs_base
drivers/i2c/busses/i2c-bfin-twi.c:732:22: warning: incorrect type in argument 1 (different address spaces)
drivers/i2c/busses/i2c-bfin-twi.c:732:22:    expected void [noderef] <asn:2>*addr
drivers/i2c/busses/i2c-bfin-twi.c:732:22:    got struct bfin_twi_regs *regs_base

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
12 years agoBlackfin: Annotate strnlen_user and strlen_user 'src' parameter with __user
Lars-Peter Clausen [Mon, 22 Oct 2012 14:09:05 +0000 (16:09 +0200)]
Blackfin: Annotate strnlen_user and strlen_user 'src' parameter with __user

The 'src' parameter of strnlen_user and strlen_user is supposed to take a
userspace pointer, so annotate it with __user. This fixes the following and
similar sparse warnings:

fs/binfmt_elf_fdpic.c:671:36: warning: incorrect type in argument 1 (different address spaces)
fs/binfmt_elf_fdpic.c:671:36:    expected char const *src
fs/binfmt_elf_fdpic.c:671:36:    got char [noderef] <asn:1>*[assigned] p
fs/binfmt_elf_fdpic.c:683:36: warning: incorrect type in argument 1 (different address spaces)
fs/binfmt_elf_fdpic.c:683:36:    expected char const *src
fs/binfmt_elf_fdpic.c:683:36:    got char [noderef] <asn:1>*[assigned] p

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
12 years agoBlackfin: Annotate clear_user 'to' parameter with __user
Lars-Peter Clausen [Mon, 22 Oct 2012 14:09:04 +0000 (16:09 +0200)]
Blackfin: Annotate clear_user 'to' parameter with __user

The 'to' parameter of clear_user is supposed to take a userspace pointer, so
annotate it with __user. This fixes the following and similar sparse warnings:

fs/binfmt_elf_fdpic.c:714:35: warning: incorrect type in argument 1 (different address spaces)
fs/binfmt_elf_fdpic.c:714:35:    expected void [noderef] <asn:1>*to
fs/binfmt_elf_fdpic.c:714:35:    got void *<noident>
fs/binfmt_elf_fdpic.c:1119:29: warning: incorrect type in argument 1 (different address spaces)
fs/binfmt_elf_fdpic.c:1119:29:    expected void *to
fs/binfmt_elf_fdpic.c:1119:29:    got void [noderef] <asn:1>*<noident>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
12 years agoBlackfin: Add missing __user annotations to put_user
Lars-Peter Clausen [Mon, 22 Oct 2012 14:09:03 +0000 (16:09 +0200)]
Blackfin: Add missing __user annotations to put_user

typeof() will not inherit the __user annotation so we have to explicitly
specify this for '_p'.

This fixes the following and quite a few similar warnings from spatch:

kernel/sys.c:884:26: warning: incorrect type in initializer (different address spaces)
kernel/sys.c:884:26:    expected unsigned int *_p
kernel/sys.c:884:26:    got unsigned int [noderef] [usertype] <asn:1>*ruidp
kernel/sys.c:885:26: warning: incorrect type in initializer (different address spaces)
kernel/sys.c:885:26:    expected unsigned int *_p
kernel/sys.c:885:26:    got unsigned int [noderef] [usertype] <asn:1>*euidp
kernel/sys.c:886:26: warning: incorrect type in initializer (different address spaces)
kernel/sys.c:886:26:    expected unsigned int *_p
kernel/sys.c:886:26:    got unsigned int [noderef] [usertype] <asn:1>*suidp

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
12 years agoexynos4_tmu_driver_ids should be exynos_tmu_driver_ids.
Jonghwan Choi [Tue, 23 Oct 2012 06:54:42 +0000 (14:54 +0800)]
exynos4_tmu_driver_ids should be exynos_tmu_driver_ids.

Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com>
Reviewed-by: Amit Daniel Kachhap <amit.kachhap@linaro.org>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
12 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net...
David S. Miller [Tue, 23 Oct 2012 06:51:00 +0000 (02:51 -0400)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next

Jeff Kirsher says:

====================
This series contains updates to ixgbe only.  Only change to this series
is I dropped the "ixgbe: Add support for pipeline reset" due to
change requested by Martin Josefsson.

Alexander Duyck (7):
  ixgbe: Add support for IPv6 and UDP to ixgbe_get_headlen
  ixgbe: Add support for tracking the default user priority to SR-IOV
  ixgbe: Add support for GET_QUEUES message to get DCB configuration
  ixgbe: Enable support for VF API version 1.1 in the PF.
  ixgbevf: Add VF DCB + SR-IOV support
  ixgbe: Drop unnecessary addition from ixgbe_set_rx_buffer_len
  ixgbe: Fix possible memory leak in ixgbe_set_ringparam

Don Skidmore (1):
  ixgbe: Add function ixgbe_reset_pipeline_82599

Emil Tantilov (1):
  ixgbe: add WOL support for new subdevice id

Jacob Keller (1):
  ixgbe: (PTP) refactor init, cyclecounter and reset

Tushar Dave (1):
  ixgbe: Correcting small packet padding

Wei Yongjun (1):
  ixgbe: using is_zero_ether_addr() to simplify the code
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotcp: Reject invalid ack_seq to Fast Open sockets
Jerry Chu [Mon, 22 Oct 2012 11:26:36 +0000 (11:26 +0000)]
tcp: Reject invalid ack_seq to Fast Open sockets

A packet with an invalid ack_seq may cause a TCP Fast Open socket to switch
to the unexpected TCP_CLOSING state, triggering a BUG_ON kernel panic.

When a FIN packet with an invalid ack_seq# arrives at a socket in
the TCP_FIN_WAIT1 state, rather than discarding the packet, the current
code will accept the FIN, causing state transition to TCP_CLOSING.

This may be a small deviation from RFC793, which seems to say that the
packet should be dropped. Unfortunately I did not expect this case for
Fast Open hence it will trigger a BUG_ON panic.

It turns out there is really nothing bad about a TFO socket going into
TCP_CLOSING state so I could just remove the BUG_ON statements. But after
some thought I think it's better to treat this case like TCP_SYN_RECV
and return a RST to the confused peer who caused the unacceptable ack_seq
to be generated in the first place.

Signed-off-by: H.K. Jerry Chu <hkchu@google.com>
Cc: Neal Cardwell <ncardwell@google.com>
Cc: Yuchung Cheng <ycheng@google.com>
Acked-by: Yuchung Cheng <ycheng@google.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: cdc_mbim: Device Service Stream support
Bjørn Mork [Mon, 22 Oct 2012 10:56:40 +0000 (10:56 +0000)]
net: cdc_mbim: Device Service Stream support

MBIM devices can support up to 256 generic streams called
Device Service Streams (DSS). The MBIM spec says

   The format of the Device Service Stream payload depends
   on the device service (as identified by the corresponding
   UUID) that is used when opening the data stream.

Example use cases are serial AT command interfaces and NMEA
data streams. We cannot make any assumptions about these
device services.

Adding support for Device Service Stream by extending
the MBIM session to VLAN mapping scheme, allocating
VLAN IDs 256 to 511 for DSS, using the DSS SessionID
as the lower 8bit of the VLAN ID.

Using a netdev for DSS keeps the device framing intact and
allows userspace to do whatever it want with the streams.
For example, exporting an AT command interface using DSS
session #0 to a PTY for use with a terminal application like
minicom:

  vconfig add wwan0 256
  ip link set dev wwan0 up
  ip link set dev wwan0.256 up
  socat INTERFACE:wwan0.256,type=2 PTY:,echo=0,link=/tmp/modem

Device configuration must be done using MBIM control commands
over the /dev/cdc-wdmx device. The userspace management
application should coordinate host VLAN configuration and the
device MBIM configuration using the device capabilities to
find out if it needs to set up PTY mappings etc.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: cdc_ncm: map MBIM IPS SessionID to VLAN ID
Bjørn Mork [Mon, 22 Oct 2012 10:56:39 +0000 (10:56 +0000)]
net: cdc_ncm: map MBIM IPS SessionID to VLAN ID

MBIM devices can support up to 256 independent IP Streams.
The main network device will only handle SessionID 0. Mapping
SessionIDs 1 to 255 to VLANs using the SessionID as VLAN ID
allow userspace to use these streams with traditional tools
like vconfig.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: cdc_ncm: do not bind to NCM compatible MBIM devices
Bjørn Mork [Mon, 22 Oct 2012 10:56:38 +0000 (10:56 +0000)]
net: cdc_ncm: do not bind to NCM compatible MBIM devices

The MBIM specification allows a MBIM device to disguise
itself as NCM for backwards compatibility, using additional
altsettings with different subclass (control) or protocol
(data):

C:* #Ifs= 2 Cfg#= 1 Atr=80 MxPwr=100mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0d Prot=00 Driver=cdc_mbim
E:  Ad=81(I) Atr=03(Int.) MxPS=  64 Ivl=7ms
I:* If#= 0 Alt= 1 #EPs= 1 Cls=02(comm.) Sub=0e Prot=00 Driver=cdc_mbim
E:  Ad=81(I) Atr=03(Int.) MxPS=  64 Ivl=7ms
I:  If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_mbim
I:  If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_mbim
E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
I:* If#= 1 Alt= 2 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms

If the MBIM driver is enabled then that should have priority
for devices providing such a NCM 1.0 backward compatibility
mode.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Greg Suarez <gsuarez@smithmicro.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: cdc_mbim: build the MBIM driver
Bjørn Mork [Mon, 22 Oct 2012 10:56:37 +0000 (10:56 +0000)]
net: cdc_mbim: build the MBIM driver

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: cdc_mbim: adding MBIM driver
Greg Suarez [Mon, 22 Oct 2012 10:56:36 +0000 (10:56 +0000)]
net: cdc_mbim: adding MBIM driver

The CDC Mobile Broadband Interface Model (MBIM) specification
extends CDC NCM by
 - removing the redundant ethernet header from the point-to-point
   USB channel
 - adding support for multiple IP (v4 and/or v6) sessions multiplexed
   on the same USB channel
 - adding a MBIM control channel encapsulated in CDC
 - adding Device Service Streams (DSS), which are non IP generic data
   streams multiplexed on the same USB channel as the IP sessions

MBIM devices are managed using the dedicated control channel, and no
data will flow on the data channel until a control session has been
established.  This driver has no knowledge of MBIM control messages.
It just exports the control channel to a /dev/cdc-wdmX character
device for userspace management applications. Such an application is
therefore required to use this driver.

This patch implements basic MBIM support, reusing the NCM and WDM driver
APIs, currently limited to IP sessions with SessionID 0. DSS and
multiplexed IP sessions are not yet supported.

Signed-off-by: Greg Suarez <gsuarez@smithmicro.com>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: cdc_ncm: export shared symbols and definitions
Bjørn Mork [Mon, 22 Oct 2012 10:56:35 +0000 (10:56 +0000)]
net: cdc_ncm: export shared symbols and definitions

Move symbols and definitons which can be shared with a
MBIM driver in a new header.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: cdc_ncm: refactoring for tx multiplexing
Bjørn Mork [Mon, 22 Oct 2012 10:56:34 +0000 (10:56 +0000)]
net: cdc_ncm: refactoring for tx multiplexing

Adding multiplexed NDP support to cdc_ncm_fill_tx_frame, allowing
transmissions of multiple independent sessions within the same NTB.

Refactoring the code quite a bit to avoid having to store copies
of multiple NDPs being prepared for tx. The old code would still
reserve enough room for a maximum sized NDP in the skb so we might
as well keep them in the skb while they are being prepared.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: cdc_ncm: splitting rx_fixup for code reuse
Bjørn Mork [Mon, 22 Oct 2012 10:56:33 +0000 (10:56 +0000)]
net: cdc_ncm: splitting rx_fixup for code reuse

Verifying and handling received MBIM and NCM frames will need
to be different in three areas:
 - verifying the NDP signature
 - checking valid datagram length
 - datagram header manipulation

This makes it inconvenient to share rx_fixup in whole.  But
some verification parts are common.  Split these out in separate
functions.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: cdc_ncm: process chained NDPs
Bjørn Mork [Mon, 22 Oct 2012 10:56:32 +0000 (10:56 +0000)]
net: cdc_ncm: process chained NDPs

The NCM 1.0 spefication makes provisions for linking more than
one NDP into a single NTB. This is important for MBIM support,
where these NDPs might be of different types.

Following the chain of NDPs is also correct for NCM, and will
not change anything in the common case where there is only
one NDP

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: cdc_ncm: refactor bind preparing for MBIM support
Greg Suarez [Mon, 22 Oct 2012 10:56:31 +0000 (10:56 +0000)]
net: cdc_ncm: refactor bind preparing for MBIM support

NCM and MBIM can share most of the bind function.  Split
out the shareable part and add MBIM functional descriptor
parsing.

Signed-off-by: Greg Suarez <gsuarez@smithmicro.com>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: cdc_ncm: adding MBIM support to ncm_setup
Greg Suarez [Mon, 22 Oct 2012 10:56:30 +0000 (10:56 +0000)]
net: cdc_ncm: adding MBIM support to ncm_setup

MBIM and NCM are very similar, so we can reuse most of the
setup and bind logic in cdc_ncm for CDC MBIM devices.  Handle
a few minor differences in ncm_setup.

Signed-off-by: Greg Suarez <gsuarez@smithmicro.com>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoUSB: cdc: add MBIM constants and structures
Greg Suarez [Mon, 22 Oct 2012 10:56:29 +0000 (10:56 +0000)]
USB: cdc: add MBIM constants and structures

Based on revision 1.0 of "Universal Serial Bus Communications
Class Subclass Specification for Mobile Broadband Interface
Model" available from www.usb.org

Signed-off-by: Greg Suarez <gsuarez@smithmicro.com>
[bmork: added DSS defines]
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>
12 years agonet: cdc_ncm: workaround NTB input size firmware bug
Bjørn Mork [Mon, 22 Oct 2012 10:56:28 +0000 (10:56 +0000)]
net: cdc_ncm: workaround NTB input size firmware bug

Some devices do not support the 8 byte variants of the NTB input
size control messages despite announcing such support in their
NCM or MBIM functional descriptor.

According to the NCM specification, all devices must support the
4 byte variant regardless of whether or not the flag is set:

  If bit D5 is set in the bmNetworkCapabilities field of
  function’s NCM Functional Descriptor, the host may
  set wLength either to 4 or to 8. If wLength is 4, the
  function shall assume that wNtbInMaxDatagrams is to be
  set to zero. If wLength is 8, then the function shall
  use the provided value as the limit. The function shall
  return an error response (a STALL PID) if wLength is set
  to any other value.

We do not set wNtbInMaxDatagrams in any case, so we can just as
well unconditionally use the 4 byte variant without losing any
functionality.  This works around the known firmware bug, and
simplifies the code considerably.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet/at91_ether: add pdata flag for reverse Eth addr
Joachim Eastwood [Mon, 22 Oct 2012 08:45:34 +0000 (08:45 +0000)]
net/at91_ether: add pdata flag for reverse Eth addr

This will allow us to remove the last mach include from at91_ether
and also make it easier to share address setup with macb.

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet/at91_ether: select MACB in Kconfig
Joachim Eastwood [Mon, 22 Oct 2012 08:45:33 +0000 (08:45 +0000)]
net/at91_ether: select MACB in Kconfig

Now that HAVE_NET_MACB is gone let's just select MACB to
satisfy the dependecies in at91_ether.

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet/cadence: get rid of HAVE_NET_MACB
Joachim Eastwood [Mon, 22 Oct 2012 08:45:32 +0000 (08:45 +0000)]
net/cadence: get rid of HAVE_NET_MACB

macb is a platform driver and there is nothing that prevents
this driver from being built on non-ARM/AVR32 platforms.

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>