]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
12 years agoARM: restart: nomadik: use new restart hook
Russell King [Mon, 28 Nov 2011 10:48:02 +0000 (10:48 +0000)]
ARM: restart: nomadik: use new restart hook

Hook the Nomadik NHK platform restart code into the new restart hook.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: restart: netx: use new restart hook
Russell King [Fri, 11 Nov 2011 15:12:17 +0000 (15:12 +0000)]
ARM: restart: netx: use new restart hook

Hook these platforms restart code into the new restart hook rather
than using arch_reset().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: restart: mxs: use new restart hook
Russell King [Sat, 5 Nov 2011 15:43:30 +0000 (15:43 +0000)]
ARM: restart: mxs: use new restart hook

Hook these platforms restart code into the new restart hook rather
than using arch_reset().

Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: restart: mxc: use new restart hook
Russell King [Sun, 6 Nov 2011 17:12:08 +0000 (17:12 +0000)]
ARM: restart: mxc: use new restart hook

Hook these platforms restart code into the new restart hook rather
than using arch_reset().

Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: restart: mv78xx0: use new restart hook
Russell King [Sat, 5 Nov 2011 10:09:15 +0000 (10:09 +0000)]
ARM: restart: mv78xx0: use new restart hook

Hook these platforms restart code into the new restart hook rather than
using arch_reset().

Acked-by: Nicolas pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: restart: mmp: use new restart hook
Russell King [Sat, 5 Nov 2011 15:40:09 +0000 (15:40 +0000)]
ARM: restart: mmp: use new restart hook

Hook the Shark restart code into the new restart hook rather than
using arch_reset().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: restart: lpc32xx: use new restart hook
Russell King [Sat, 5 Nov 2011 12:17:40 +0000 (12:17 +0000)]
ARM: restart: lpc32xx: use new restart hook

Hook these platforms restart code into the arm_pm_restart hook rather
than using arch_reset().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: restart: ks8695: use new restart hook
Russell King [Fri, 11 Nov 2011 15:30:47 +0000 (15:30 +0000)]
ARM: restart: ks8695: use new restart hook

Hook these platforms restart code into the new restart hook rather
than using arch_reset().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: restart: kirkwood: use new restart hook
Russell King [Sat, 5 Nov 2011 10:03:47 +0000 (10:03 +0000)]
ARM: restart: kirkwood: use new restart hook

Hook these platforms restart code into the new restart hook rather than
using arch_reset().

Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: restart: ixp4xx: use new restart hook
Russell King [Sat, 5 Nov 2011 12:10:55 +0000 (12:10 +0000)]
ARM: restart: ixp4xx: use new restart hook

Hook these platforms restart code into the new restart hook rather
than using arch_reset().

Acked-by: Krzysztof Hałasa <khc@pm.waw.pl>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: restart: ixp23xx: use new restart hook
Russell King [Sat, 5 Nov 2011 11:35:32 +0000 (11:35 +0000)]
ARM: restart: ixp23xx: use new restart hook

Hook these platforms restart code into the new restart hook rather
than using arch_reset().

In doing so, we split out the ixdp2351 restart code into its own
platform file.

Acked-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: restart: ixp2000: use new restart hook
Russell King [Sat, 5 Nov 2011 11:46:04 +0000 (11:46 +0000)]
ARM: restart: ixp2000: use new restart hook

Hook these platforms restart code into the new restart hook rather
than using arch_reset().

In doing so, we split out the IXDP2401, IXDP2801 and IXDP2805 platform
specific restart code into their own platform files.

Acked-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: restart: iop13xx: use new restart hook
Russell King [Sun, 6 Nov 2011 10:49:50 +0000 (10:49 +0000)]
ARM: restart: iop13xx: use new restart hook

Hook these platforms restart code into the new restart hook rather
than using arch_reset().

Acked-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: restart: iop3xx: use new restart hook
Russell King [Sat, 5 Nov 2011 11:26:32 +0000 (11:26 +0000)]
ARM: restart: iop3xx: use new restart hook

Hook these platforms restart code into the arm_pm_restart hook rather
than using arch_reset().

In doing so, we split out the n2100 platform specific restart handler
into the n2100 platform file.

Acked-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: restart: integrator: use new restart hook
Russell King [Thu, 3 Nov 2011 19:54:37 +0000 (19:54 +0000)]
ARM: restart: integrator: use new restart hook

Hook these platforms restart code into the new restart hook rather
than using arch_reset().

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: restart: highbank: use new restart hook
Russell King [Sat, 5 Nov 2011 11:16:05 +0000 (11:16 +0000)]
ARM: restart: highbank: use new restart hook

Hook these platforms restart code into the new restart hook rather
than using arch_reset().

Acked-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: restart: h720x: use new restart hook
Russell King [Sat, 5 Nov 2011 11:12:35 +0000 (11:12 +0000)]
ARM: restart: h720x: use new restart hook

Hook these platforms restart code into the new restart hook rather
than using arch_reset().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: restart: footbridge: use new restart hook
Russell King [Thu, 3 Nov 2011 19:47:54 +0000 (19:47 +0000)]
ARM: restart: footbridge: use new restart hook

Hook these platforms restart code into the new restart hook rather
than using arch_reset().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: 7262/1: restart: EXYNOS: use new restart hook
Russell King [Tue, 3 Jan 2012 10:56:53 +0000 (11:56 +0100)]
ARM: 7262/1: restart: EXYNOS: use new restart hook

Hook these platforms restart code into the new restart hook rather
than using arch_reset().

[kgene.kim@samsung.com: according to local header, updated]

Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: restart: ep93xx: use new restart hook
Russell King [Sat, 5 Nov 2011 09:54:14 +0000 (09:54 +0000)]
ARM: restart: ep93xx: use new restart hook

Hook these platforms restart code into the new restart hook rather than
using arch_reset().

Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: restart: ebsa110: use new restart hook
Russell King [Thu, 3 Nov 2011 19:50:44 +0000 (19:50 +0000)]
ARM: restart: ebsa110: use new restart hook

Hook the EBSA110 platform restart code into the new restart hook rather
than using arch_reset().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: restart: dove: use new restart hook
Russell King [Sat, 5 Nov 2011 09:48:52 +0000 (09:48 +0000)]
ARM: restart: dove: use new restart hook

Hook these platforms restart code into the new restart hook rather than
using arch_reset().

Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: 7190/1: restart: davinci: use new restart hook
Sekhar Nori [Mon, 5 Dec 2011 10:29:46 +0000 (11:29 +0100)]
ARM: 7190/1: restart: davinci: use new restart hook

Rather than using DaVinci specific davinci_soc_info based
restart hook, use the restart hook available in the machine
descriptor instead.

Tested on DM365 and AM18x EVMs.

v2:
Changed to use restart hook in machine descriptor
per Russell's comment.

Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: restart: cns3xxx: use new restart hook
Russell King [Sat, 5 Nov 2011 15:32:23 +0000 (15:32 +0000)]
ARM: restart: cns3xxx: use new restart hook

Hook these platforms restart code into the new restart hook rather
than using arch_reset().

Acked-by: Anton Vorontsov <cbouatmailru@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: restart: clps711x: use new restart hook
Russell King [Sat, 5 Nov 2011 17:41:52 +0000 (17:41 +0000)]
ARM: restart: clps711x: use new restart hook

Hook these platforms restart code into the new restart hook rather
than using arch_reset().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: restart: bcmring: use new restart hook
Russell King [Fri, 11 Nov 2011 16:43:45 +0000 (16:43 +0000)]
ARM: restart: bcmring: use new restart hook

Hook the Shark restart code into the new restart hook rather than
using arch_reset().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: restart: at91: use new restart hook
Russell King [Thu, 3 Nov 2011 09:53:29 +0000 (09:53 +0000)]
ARM: restart: at91: use new restart hook

Rather than using a private function pointer, use the existing
arm_pm_restart function pointer instead.  We no longer need to enable
the I-cache in at91sam9_alt_reset() as the caches will now be on when
this function is called.

Update the function names to use the 'restart' terminology rather than
the 'reboot' terminology.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: restart: remove s3c24xx restart handler
Russell King [Thu, 3 Nov 2011 09:14:07 +0000 (09:14 +0000)]
ARM: restart: remove s3c24xx restart handler

Remove the s3c24xx restart handler, which is trying to work around
a chip bug by keeping caches on but flushed.  As we now only disable
caches when performing a soft reboot, there doesn't need to be a
work-around to do that.

Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoMerge branch 'restart-cleanup' into restart
Russell King [Thu, 5 Jan 2012 12:56:44 +0000 (12:56 +0000)]
Merge branch 'restart-cleanup' into restart

Conflicts:
arch/arm/kernel/setup.c

12 years agoMerge branch 'for-russell' of git://hansjkoch.de/git/linux-tcc into HEAD
Russell King [Thu, 5 Jan 2012 12:55:03 +0000 (12:55 +0000)]
Merge branch 'for-russell' of git://hansjkoch.de/git/linux-tcc into HEAD

Conflicts:
arch/arm/plat-omap/include/plat/common.h

12 years agoarm: Remove plat-tcc directory
Hans J. Koch [Thu, 22 Dec 2011 20:30:48 +0000 (21:30 +0100)]
arm: Remove plat-tcc directory

The Telechips ARM architecture is being removed. This patch
deletes the arch/arm/plat-tcc/ folder.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Harry Sievers <hsievers@csselectronic.com>
Signed-off-by: Hans J. Koch <hjk@hansjkoch.de>
12 years agoarm: Remove mach-tcc8k directory
Hans J. Koch [Thu, 22 Dec 2011 20:27:27 +0000 (21:27 +0100)]
arm: Remove mach-tcc8k directory

The Telechips ARM architecture is being removed. This patch
deletes the arch/arm/mach-tcc8k/ folder.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Harry Sievers <hsievers@csselectronic.com>
Signed-off-by: Hans J. Koch <hjk@hansjkoch.de>
12 years agoarm: Remove TCC subarch from Kconfig/Makefile
Hans J. Koch [Thu, 22 Dec 2011 19:46:34 +0000 (20:46 +0100)]
arm: Remove TCC subarch from Kconfig/Makefile

The Telechips subarchitecture is being completely removed.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Harry Sievers <hsievers@csselectronic.com>
Signed-off-by: Hans J. Koch <hjk@hansjkoch.de>
12 years agoARM: prom.h: Fix build error by removing unneeded header file
Fabio Estevam [Mon, 2 Jan 2012 16:19:03 +0000 (14:19 -0200)]
ARM: prom.h: Fix build error by removing unneeded header file

Fix the following build error:

  CC [M]  fs/udf/balloc.o
In file included from /home/fabio/next/linux-next/arch/arm/include/asm/prom.h:16,
                 from include/linux/of.h:140,
                 from include/asm-generic/gpio.h:7,
                 from arch/arm/plat-mxc/include/mach/irqs.h:14,
                 from /home/fabio/next/linux-next/arch/arm/include/asm/irq.h:4,
                 from /home/fabio/next/linux-next/arch/arm/include/asm/hardirq.h:6,
                 from include/linux/hardirq.h:7,
                 from include/linux/highmem.h:8,
                 from include/linux/pagemap.h:10,
                 from include/linux/buffer_head.h:13,
                 from fs/udf/udfdecl.h:11,
                 from fs/udf/balloc.c:22:
/home/fabio/next/linux-next/arch/arm/include/asm/setup.h:146: error: redefinition of 'struct tag'

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
[grant.likely: fix build failure on drivers/of/fdt.c]
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
12 years agoMerge branch 'spi/next' (early part) into spi/merge
Grant Likely [Thu, 5 Jan 2012 04:39:29 +0000 (21:39 -0700)]
Merge branch 'spi/next' (early part) into spi/merge

12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
David S. Miller [Thu, 5 Jan 2012 02:35:43 +0000 (21:35 -0500)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

12 years agomwl8k: Changing the driver version to 0.13
Yogesh Ashok Powar [Tue, 20 Dec 2011 06:09:29 +0000 (11:39 +0530)]
mwl8k: Changing the driver version to 0.13

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agofirmware: Fix an oops on reading fw_priv->fw in sysfs loading file
Neil Horman [Mon, 2 Jan 2012 20:31:23 +0000 (15:31 -0500)]
firmware: Fix an oops on reading fw_priv->fw in sysfs loading file

This oops was reported recently:
firmware_loading_store+0xf9/0x17b
dev_attr_store+0x20/0x22
sysfs_write_file+0x101/0x134
vfs_write+0xac/0xf3
sys_write+0x4a/0x6e
system_call_fastpath+0x16/0x1b

The complete backtrace was unfortunately not captured, but details can be found
here:
https://bugzilla.redhat.com/show_bug.cgi?id=769920

The cause is fairly clear.

Its caused by the fact that firmware_loading_store has a case 0 in its
switch statement that reads and writes the fw_priv->fw poniter without the
protection of the fw_lock mutex.  since there is a window between the time that
_request_firmware sets fw_priv->fw to NULL and the time the corresponding sysfs
file is unregistered, its possible for a user space application to race in, and
write a zero to the loading file, causing a NULL dereference in
firmware_loading_store.  Fix it by extending the protection of the fw_lock mutex
to cover all of the firware_loading_store function.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoDrivers:hv: Fix a bug in vmbus_driver_unregister()
K. Y. Srinivasan [Tue, 27 Dec 2011 21:49:37 +0000 (13:49 -0800)]
Drivers:hv: Fix a bug in vmbus_driver_unregister()

The function vmbus_exists() was introduced recently to deal with cases where
the vmbus driver failed to initialize and yet other Hyper-V drivers attempted
to register with the vmbus bus driver. This patch introduced a bug where
vmbus_driver_unregister() would fail to unregister the driver. This patch
fixes the problem.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Fuzhou Chen <fuzhouch@microsoft.com>
Cc: Sasha Levin <levinsasha928@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoLinux 3.2 v3.2
Linus Torvalds [Wed, 4 Jan 2012 23:55:44 +0000 (15:55 -0800)]
Linux 3.2

12 years agoMerge branch 'pm-sleep' into pm-for-linus
Rafael J. Wysocki [Wed, 4 Jan 2012 23:06:24 +0000 (00:06 +0100)]
Merge branch 'pm-sleep' into pm-for-linus

* pm-sleep:
  PM / Hibernate: Implement compat_ioctl for /dev/snapshot

12 years agoPM / Hibernate: Implement compat_ioctl for /dev/snapshot
Ben Hutchings [Tue, 27 Dec 2011 21:54:52 +0000 (22:54 +0100)]
PM / Hibernate: Implement compat_ioctl for /dev/snapshot

This allows uswsusp built for i386 to run on an x86_64 kernel (tested
with Debian package version 1.0+20110509-2).

References: http://bugs.debian.org/502816
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
12 years agodriver core: remove __must_check from device_create_file
Greg Kroah-Hartman [Wed, 4 Jan 2012 23:05:10 +0000 (15:05 -0800)]
driver core: remove __must_check from device_create_file

With the conversion of the sysdev to a real struct device, more drivers
are calling device_create_file, and some of them don't check the return
value, which isn't wise.

But as they happen to be in parts of the kernel where a warning is
considered an error (i.e. powerpc), this breaks the build.  So for now,
remove the marking on the function, which fixes the build problems.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Linus Torvalds [Wed, 4 Jan 2012 23:03:49 +0000 (15:03 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
  fix CAN MAINTAINERS SCM tree type
  mwifiex: fix crash during simultaneous scan and connect
  b43: fix regression in PIO case
  ath9k: Fix kernel panic in AR2427 in AP mode
  CAN MAINTAINERS update
  net: fsl: fec: fix build for mx23-only kernel
  sch_qfq: fix overflow in qfq_update_start()
  Revert "Bluetooth: Increase HCI reset timeout in hci_dev_do_close"

12 years agominixfs: misplaced checks lead to dentry leak
Al Viro [Wed, 4 Jan 2012 10:51:03 +0000 (10:51 +0000)]
minixfs: misplaced checks lead to dentry leak

bitmap size sanity checks should be done *before* allocating ->s_root;
there their cleanup on failure would be correct.  As it is, we do iput()
on root inode, but leak the root dentry...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: Josh Boyer <jwboyer@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoptrace: ensure JOBCTL_STOP_SIGMASK is not zero after detach
Oleg Nesterov [Wed, 4 Jan 2012 16:29:20 +0000 (17:29 +0100)]
ptrace: ensure JOBCTL_STOP_SIGMASK is not zero after detach

This is the temporary simple fix for 3.2, we need more changes in this
area.

1. do_signal_stop() assumes that the running untraced thread in the
   stopped thread group is not possible. This was our goal but it is
   not yet achieved: a stopped-but-resumed tracee can clone the running
   thread which can initiate another group-stop.

   Remove WARN_ON_ONCE(!current->ptrace).

2. A new thread always starts with ->jobctl = 0. If it is auto-attached
   and this group is stopped, __ptrace_unlink() sets JOBCTL_STOP_PENDING
   but JOBCTL_STOP_SIGMASK part is zero, this triggers WANR_ON(!signr)
   in do_jobctl_trap() if another debugger attaches.

   Change __ptrace_unlink() to set the artificial SIGSTOP for report.

   Alternatively we could change ptrace_init_task() to copy signr from
   current, but this means we can copy it for no reason and hide the
   possible similar problems.

Acked-by: Tejun Heo <tj@kernel.org>
Cc: <stable@kernel.org> [3.1]
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoptrace: partially fix the do_wait(WEXITED) vs EXIT_DEAD->EXIT_ZOMBIE race
Oleg Nesterov [Wed, 4 Jan 2012 16:29:02 +0000 (17:29 +0100)]
ptrace: partially fix the do_wait(WEXITED) vs EXIT_DEAD->EXIT_ZOMBIE race

Test-case:

int main(void)
{
int pid, status;

pid = fork();
if (!pid) {
for (;;) {
if (!fork())
return 0;
if (waitpid(-1, &status, 0) < 0) {
printf("ERR!! wait: %m\n");
return 0;
}
}
}

assert(ptrace(PTRACE_ATTACH, pid, 0,0) == 0);
assert(waitpid(-1, NULL, 0) == pid);

assert(ptrace(PTRACE_SETOPTIONS, pid, 0,
PTRACE_O_TRACEFORK) == 0);

do {
ptrace(PTRACE_CONT, pid, 0, 0);
pid = waitpid(-1, NULL, 0);
} while (pid > 0);

return 1;
}

It fails because ->real_parent sees its child in EXIT_DEAD state
while the tracer is going to change the state back to EXIT_ZOMBIE
in wait_task_zombie().

The offending commit is 823b018e which moved the EXIT_DEAD check,
but in fact we should not blame it. The original code was not
correct as well because it didn't take ptrace_reparented() into
account and because we can't really trust ->ptrace.

This patch adds the additional check to close this particular
race but it doesn't solve the whole problem. We simply can't
rely on ->ptrace in this case, it can be cleared if the tracer
is multithreaded by the exiting ->parent.

I think we should kill EXIT_DEAD altogether, we should always
remove the soon-to-be-reaped child from ->children or at least
we should never do the DEAD->ZOMBIE transition. But this is too
complex for 3.2.

Reported-and-tested-by: Denys Vlasenko <vda.linux@googlemail.com>
Tested-by: Lukasz Michalik <lmi@ift.uni.wroc.pl>
Acked-by: Tejun Heo <tj@kernel.org>
Cc: <stable@kernel.org> [3.0+]
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoMerge git://git.samba.org/sfrench/cifs-2.6
Linus Torvalds [Wed, 4 Jan 2012 22:57:55 +0000 (14:57 -0800)]
Merge git://git.samba.org/sfrench/cifs-2.6

* git://git.samba.org/sfrench/cifs-2.6:
  [CIFS] default ntlmv2 for cifs mount delayed to 3.3
  cifs: fix bad buffer length check in coalesce_t2

12 years agopowerpc: fix compile error with 85xx/p1010rdb.c
Tony Breeds [Fri, 9 Dec 2011 01:39:55 +0000 (12:39 +1100)]
powerpc: fix compile error with 85xx/p1010rdb.c

Current linux-next compiled with mpc85xx_defconfig causes this:

arch/powerpc/platforms/85xx/p1010rdb.c:41:14: error: 'np' undeclared (first use in this function)
arch/powerpc/platforms/85xx/p1023_rds.c:102:14: error: 'np' undeclared (first use in this function)

Introduced in:
  commit 996983b75cebb1bc1c2c545f20336f24ebfa17af
  Author: Kyle Moffett <Kyle.D.Moffett@boeing.com>
  Date:   Fri Dec 2 06:28:02 2011 +0000
  powerpc/mpic: Search for open-pic device-tree node if NULL

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
12 years agopowerpc: fix compile error with 85xx/p1023_rds.c
Michael Neuling [Thu, 8 Dec 2011 06:10:54 +0000 (17:10 +1100)]
powerpc: fix compile error with 85xx/p1023_rds.c

Current linux-next compiled with mpc85xx_smp_defconfig causes this:
arch/powerpc/platforms/85xx/p1023_rds.c: In function 'mpc85xx_rds_pic_init':
arch/powerpc/platforms/85xx/p1023_rds.c:102:14: error: 'np' undeclared (first use in this function)
arch/powerpc/platforms/85xx/p1023_rds.c:102:14: note: each undeclared identifier is reported only once for each function it appears in

Introduced in:
  commit 996983b75cebb1bc1c2c545f20336f24ebfa17af
  Author: Kyle Moffett <Kyle.D.Moffett@boeing.com>
  Date:   Fri Dec 2 06:28:02 2011 +0000
  powerpc/mpic: Search for open-pic device-tree node if NULL

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
12 years agopowerpc/fsl: add MSI support for the Freescale hypervisor
Timur Tabi [Tue, 13 Dec 2011 20:51:59 +0000 (14:51 -0600)]
powerpc/fsl: add MSI support for the Freescale hypervisor

Add support for vmpic-msi nodes to the fsl_msi driver.  The MSI is
virtualized by the hypervisor, so the vmpic-msi does not contain a 'reg'
property.  Instead, the driver uses hcalls.

Add support for the "msi-address-64" property to the fsl_pci driver.
The Freescale hypervisor typically puts the virtualized MSIIR register
in the page after the end of DDR, so we extend the DDR ATMU to cover it.
Any other location for MSIIR is not supported, for now.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
12 years agoarch/powerpc/sysdev/fsl_rmu.c: introduce missing kfree
Julia Lawall [Fri, 23 Dec 2011 17:39:33 +0000 (18:39 +0100)]
arch/powerpc/sysdev/fsl_rmu.c: introduce missing kfree

rmu needs to be freed before leaving the function in an error case.

A simplified version of the semantic match that finds the problem is as
follows: (http://coccinelle.lip6.fr)

// <smpl>
@r exists@
local idexpression x;
statement S;
identifier f1;
position p1,p2;
expression *ptr != NULL;
@@

x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
...
if (x == NULL) S
<... when != x
     when != if (...) { <+...x...+> }
x->f1
...>
(
 return \(0\|<+...x...+>\|ptr\);
|
 return@p2 ...;
)

@script:python@
p1 << r.p1;
p2 << r.p2;
@@

print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
12 years agopowerpc/fsl: Add support for Integrated Flash Controller
Prabhakar Kushwaha [Tue, 27 Dec 2011 12:09:13 +0000 (17:39 +0530)]
powerpc/fsl: Add support for Integrated Flash Controller

Integrated Flash Controller supports various flashes like NOR, NAND
and other devices using NOR, NAND and GPCM Machine available on it.
IFC supports four chip selects.

Signed-off-by: Dipen Dudhat <Dipen.Dudhat@freescale.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Liu Shuo <b35362@freescale.com>
Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
12 years agopowerpc/fsl: update compatiable on fsl 16550 uart nodes
Kumar Gala [Mon, 28 Nov 2011 19:58:53 +0000 (13:58 -0600)]
powerpc/fsl: update compatiable on fsl 16550 uart nodes

The Freescale serial port's are pretty much a 16550, however there are
some FSL specific bugs and features.  Add a "fsl,ns16550" compatiable
string to allow code to handle those FSL specific issues.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
12 years agopowerpc/85xx: fix PCI and localbus properties in p1022ds.dts
Timur Tabi [Fri, 9 Dec 2011 15:20:03 +0000 (09:20 -0600)]
powerpc/85xx: fix PCI and localbus properties in p1022ds.dts

PCI ranges, localbus reg and localbus chip-select 2 range do not match
the memory map setup by bootloader.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
12 years agopowerpc/85xx: re-enable ePAPR byte channel driver in corenet32_smp_defconfig
Timur Tabi [Mon, 12 Dec 2011 23:25:45 +0000 (17:25 -0600)]
powerpc/85xx: re-enable ePAPR byte channel driver in corenet32_smp_defconfig

Commit 7c4b2f09 (powerpc: Update mpc85xx/corenet 32-bit defconfigs)
accidentally disabled the ePAPR byte channel driver in the defconfig for
Freescale CoreNet platforms.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
12 years agopowerpc/fsl: Update defconfigs to enable some standard FSL HW features
Kumar Gala [Thu, 8 Dec 2011 06:55:57 +0000 (00:55 -0600)]
powerpc/fsl: Update defconfigs to enable some standard FSL HW features

corenet64_smp_defconfig:
 - enabled rapidio

corenet32_smp_defconfig:
 - enabled hugetlbfs, rapidio

mpc85xx_smp_defconfig:
 - enabled P1010RDB, hugetlbfs, SPI, SDHC, Crypto/CAAM

mpc85xx_smp_defconfig:
 - enabled hugetlbfs, SPI, SDHC, Crypto/CAAM

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
12 years agopowerpc: Add TBI PHY node to first MDIO bus
Andy Fleming [Wed, 4 Jan 2012 21:28:31 +0000 (15:28 -0600)]
powerpc: Add TBI PHY node to first MDIO bus

Systems which use the fsl_pq_mdio driver need to specify an
address for TBI PHY transactions such that the address does
not conflict with any PHYs on the bus (all transactions to
that address are directed to the onboard TBI PHY). The driver
used to scan for a free address if no address was specified,
however this ran into issues when the PHY Lib was fixed so
that all MDIO transactions were protected by a mutex. As it
is, the code was meant to serve as a transitional tool until
the device trees were all updated to specify the TBI address.

The best fix for the mutex issue was to remove the scanning code,
but it turns out some of the newer SoCs have started to omit
the tbi-phy node when SGMII is not being used. As such, these
devices will now fail unless we add a tbi-phy node to the first
mdio controller.

Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
12 years agosbc834x: put full compat string in board match check
Paul Gortmaker [Mon, 5 Dec 2011 16:41:07 +0000 (11:41 -0500)]
sbc834x: put full compat string in board match check

The commit 883c2cfc8bcc0fd00c5d9f596fb8870f481b5bda:

 "fix of_flat_dt_is_compatible() to match the full compatible string"

causes silent boot death on the sbc8349 board because it was
just looking for 8349 and not 8349E -- as originally there
were non-E (no SEC/encryption) chips available.  Just add the
E to the board detection string since all boards I've seen
were manufactured with the E versions.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
12 years agopowerpc/fsl-pci: Allow 64-bit PCIe devices to DMA to any memory address
Kumar Gala [Thu, 1 Dec 2011 05:38:18 +0000 (23:38 -0600)]
powerpc/fsl-pci: Allow 64-bit PCIe devices to DMA to any memory address

There is an issue on FSL-BookE 64-bit devices (P5020) in which PCIe
devices that are capable of doing 64-bit DMAs (like an Intel e1000) do
not function and crash the kernel if we have >4G of memory in the system.

The reason is that the existing code only sets up one inbound window for
access to system memory across PCIe.  That window is limited to a 32-bit
address space.  So on systems we'll end up utilizing SWIOTLB for dma
mappings.  However SWIOTLB dma ops implement dma_alloc_coherent() as
dma_direct_alloc_coherent().  Thus we can end up with dma addresses that
are not accessible because of the inbound window limitation.

We could possibly set the SWIOTLB alloc_coherent op to
swiotlb_alloc_coherent() however that does not address the issue since
the swiotlb_alloc_coherent() will behave almost identical to
dma_direct_alloc_coherent() since the devices coherent_dma_mask will be
greater than any address allocated by swiotlb_alloc_coherent() and thus
we'll never bounce buffer it into a range that would be dma-able.

The easiest and best solution is to just make it so that a 64-bit
capable device is able to DMA to any internal system address.

We accomplish this by opening up a second inbound window that maps all
of memory above the internal SoC address width so we can set it up to
access all of the internal SoC address space if needed.

We than fixup the dma_ops and dma_offset for PCIe devices with a dma
mask greater than the maximum internal SoC address.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
12 years agom68k/mac: Make CONFIG_HEARTBEAT unavailable on Mac
Geert Uytterhoeven [Thu, 29 Dec 2011 19:00:31 +0000 (20:00 +0100)]
m68k/mac: Make CONFIG_HEARTBEAT unavailable on Mac

mac_heartbeat() was never really implemented.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Greg Ungerer <gerg@uclinux.org>
12 years agoipv6/addrconf: speedup /proc/net/if_inet6 filling
Mihai Maruseac [Tue, 3 Jan 2012 23:31:35 +0000 (23:31 +0000)]
ipv6/addrconf: speedup /proc/net/if_inet6 filling

This ensures a linear behaviour when filling /proc/net/if_inet6 thus making
ifconfig run really fast on IPv6 only addresses. In fact, with this patch and
the IPv4 one sent a while ago, ifconfig will run in linear time regardless of
address type.

IPv4 related patch: f04565ddf52e401880f8ba51de0dff8ba51c99fd
 dev: use name hash for dev_seq_ops
 ...

Some statistics (running ifconfig > /dev/null on a different setup):

iface count / IPv6 no-patch time / IPv6 patched time / IPv4 time
----------------------------------------------------------------
      6250  |       0.23 s       |      0.13 s       |  0.11 s
     12500  |       0.62 s       |      0.28 s       |  0.22 s
     25000  |       2.91 s       |      0.57 s       |  0.46 s
     50000  |      11.37 s       |      1.21 s       |  0.94 s
    128000  |      86.78 s       |      3.05 s       |  2.54 s

Signed-off-by: Mihai Maruseac <mmaruseac@ixiacom.com>
Cc: Daniel Baluta <dbaluta@ixiacom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agor6040: place comments before code
Florian Fainelli [Wed, 4 Jan 2012 08:59:38 +0000 (08:59 +0000)]
r6040: place comments before code

checkpatch.pl complained about the line exceding 80 columns, and the
comment was actually on the same line as the code, fix that.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agor6040: use __aligned(size)
Florian Fainelli [Wed, 4 Jan 2012 08:59:37 +0000 (08:59 +0000)]
r6040: use __aligned(size)

instead of __attribute__((__aligned(size)__))

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agor6040: use definitions for MAC_SM register read/writes
Florian Fainelli [Wed, 4 Jan 2012 08:59:36 +0000 (08:59 +0000)]
r6040: use definitions for MAC_SM register read/writes

Bit 1 is the reset bit of the MAC status machine register, define and
use it.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agor6040: use MAC_RST bit definition with MCR1 read/writes
Florian Fainelli [Wed, 4 Jan 2012 08:59:35 +0000 (08:59 +0000)]
r6040: use MAC_RST bit definition with MCR1 read/writes

MAC_RST bit is already defined, use it instead of 0x1 where applicable.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agor6040: define more MCR0 register bits
Florian Fainelli [Wed, 4 Jan 2012 08:59:34 +0000 (08:59 +0000)]
r6040: define more MCR0 register bits

Define more MCR0-register bits and use them in place of the bits values.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agor6040: remove unused variables and definitions
Florian Fainelli [Wed, 4 Jan 2012 08:59:33 +0000 (08:59 +0000)]
r6040: remove unused variables and definitions

Since the conversion to phylib (3831861b: r6040: implement phylib) some
PHY-related variables and definitions are now useless, remove them.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agor6040: use an unique MDIO bus name
Florian Fainelli [Wed, 4 Jan 2012 08:50:40 +0000 (08:50 +0000)]
r6040: use an unique MDIO bus name

We should use an unique MDIO bus name which does not clash with anything
else in the system like the Fixed MDIO bus. The bus is now named:
r6040-<card number> which is unique in the system.

Reported-by: Vladimir Kolpakov <vova.kolpakov@gmail.com>
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoipv6: Check RA for sllao when configuring optimistic ipv6 address (v2)
Neil Horman [Wed, 4 Jan 2012 10:49:15 +0000 (10:49 +0000)]
ipv6: Check RA for sllao when configuring optimistic ipv6 address (v2)

Recently Dave noticed that a test we did in ipv6_add_addr to see if we next hop
route for the interface we're adding an addres to was wrong (see commit
7ffbcecbeed91e5874e9a1cfc4c0cbb07dac3069).  for one, it never triggers, and two,
it was completely wrong to begin with.  This test was meant to cover this
section of RFC 4429:

3.3 Modifications to RFC 2462 Stateless Address Autoconfiguration

   * (modifies section 5.5) A host MAY choose to configure a new address
        as an Optimistic Address.  A host that does not know the SLLAO
        of its router SHOULD NOT configure a new address as Optimistic.
        A router SHOULD NOT configure an Optimistic Address.

This patch should bring us into proper compliance with the above clause.  Since
we only add a SLAAC address after we've received a RA which may or may not
contain a source link layer address option, we can pass a pointer to that option
to addrconf_prefix_rcv (which may be null if the option is not present), and
only set the optimistic flag if the option was found in the RA.

Change notes:
(v2) modified the new parameter to addrconf_prefix_rcv to be a bool rather than
a pointer to make its use more clear as per request from davem.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
CC: "David S. Miller" <davem@davemloft.net>
CC: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomac80211: remove dead code
Mohammed Shafi Shajakhan [Fri, 30 Dec 2011 11:19:01 +0000 (16:49 +0530)]
mac80211: remove dead code

ieee80211_offchannel_enable_all_ps function is no longer used
and looks like its logic is extensively handled in
ieee80211_offchannel_stop_vifs

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwl8k: Recover from firmware crash
Yogesh Ashok Powar [Fri, 30 Dec 2011 11:05:27 +0000 (16:35 +0530)]
mwl8k: Recover from firmware crash

In case of firmware crash, reload the firmware and reconfigure it
by triggering ieee80211_hw_restart; mac80211 utility function.

V2 Addressed following comments from Lennert:
 - Stop the queues during reload
 - Removed atomic_t declaration for hw_restart
 - Extend the firmware reload support for sta firmware as well
 - Other misc changes

Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: Call driver commands after drv_start in mac80211 restart code
Yogesh Ashok Powar [Fri, 30 Dec 2011 11:04:25 +0000 (16:34 +0530)]
mac80211: Call driver commands after drv_start in mac80211 restart code

Ideally, hardware/firmware initialization is complete after the
drv_start routine. In mac80211 restart code (ieee80211_reconfig),
defer calling the driver commands i.e. setup fragmentation
threshold, rts threshold and coverage class till drv_start
routine is called.

Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
v2: Removed extra blank line added.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: tx queue enable is read only for EDMA chipsets
Mohammed Shafi Shajakhan [Wed, 28 Dec 2011 13:39:54 +0000 (19:09 +0530)]
ath9k: tx queue enable is read only for EDMA chipsets

for EDMA chip AR_Q_TXE (tx enable for each queue) is read only

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2x00: Change RF3853 to RF3053.
Gertjan van Wingerde [Wed, 28 Dec 2011 00:53:24 +0000 (01:53 +0100)]
rt2x00: Change RF3853 to RF3053.

According to the latest Ralink vendor drivers, this seems to be the real
RF chipset type.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2x00: RT3593 is also applicable to USB.
Gertjan van Wingerde [Wed, 28 Dec 2011 00:53:23 +0000 (01:53 +0100)]
rt2x00: RT3593 is also applicable to USB.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2x00usb: Zero USB padding before sending URB
Jakub Kiciński [Wed, 28 Dec 2011 00:53:22 +0000 (01:53 +0100)]
rt2x00usb: Zero USB padding before sending URB

When USB driver requires padding at the end of frame or URB it will report
this need by increasing return value of get_tx_data_len callback. Common
USB code uses that return value as desired URB length.

Ensure that appropriate part of skb's tailroom exists and is zeroed.

Signed-off-by: Jakub Kicinski <kubakici@wp.pl>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
--
 drivers/net/wireless/rt2x00/rt2x00usb.c |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2800usb: Let rt2x00usb handle USB padding
Jakub Kiciński [Wed, 28 Dec 2011 00:53:21 +0000 (01:53 +0100)]
rt2800usb: Let rt2x00usb handle USB padding

Older USB drivers does not append end padding to skb but instead report
it in size of data to be transmitted to HW. rt2800usb should follow that
behaviour. Custom write_tx_data callback which was adding pad to skb
is not be needed any more.

Thanks to this patch frames handed back from rt2800usb to mac80211 will
no longer contain end padding.

Signed-off-by: Jakub Kicinski <kubakici@wp.pl>
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2x00: Convert big if-statements to switch-statements.
Gertjan van Wingerde [Wed, 28 Dec 2011 00:53:20 +0000 (01:53 +0100)]
rt2x00: Convert big if-statements to switch-statements.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2x00: Whitespace cleanup.
Gertjan van Wingerde [Wed, 28 Dec 2011 00:53:19 +0000 (01:53 +0100)]
rt2x00: Whitespace cleanup.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2x00: Identify rt2800usb chipsets.
Gertjan van Wingerde [Wed, 28 Dec 2011 00:53:18 +0000 (01:53 +0100)]
rt2x00: Identify rt2800usb chipsets.

According to the latest USB ID database these are all RT2770 / RT2870 / RT307x
devices.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agocarl9170: move checksum and txseq into subfunctions
Christian Lamparter [Tue, 27 Dec 2011 20:01:55 +0000 (21:01 +0100)]
carl9170: move checksum and txseq into subfunctions

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2800usb: Move ID out of unknown
Larry Finger [Tue, 27 Dec 2011 18:22:51 +0000 (12:22 -0600)]
rt2800usb: Move ID out of unknown

Testing on the openSUSE wireless forum has shown that a Linksys
WUSB54GC v3 with USB ID 1737:0077 works with rt2800usb when the ID is
written to /sys/.../new_id. This ID can therefore be moved out of UNKNOWN.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: use RCU read locks for sta_info_get
Mohammed Shafi Shajakhan [Tue, 27 Dec 2011 13:24:07 +0000 (18:54 +0530)]
mac80211: use RCU read locks for sta_info_get

this is being recently introduced by the commit
a85e1d55974646a442d95911e3f7d7a891ea9ac5

Cc: Paul Stewart <pstew@google.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoipw2x00: remove reset_port functionality
Stanislav Yakovlev [Mon, 26 Dec 2011 23:31:11 +0000 (18:31 -0500)]
ipw2x00: remove reset_port functionality

Removes reset_port since it isn't used anywhere as suggested by Johannes Berg.

Signed-off-by: Stanislav Yakovlev <stas.yakovlev@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: fix kernel panic in IBSS due to a regression
Mohammed Shafi Shajakhan [Mon, 26 Dec 2011 05:13:29 +0000 (10:43 +0530)]
mac80211: fix kernel panic in IBSS due to a regression

kernel panic occurs when we create an IBSS mode and leave it for
sometime without any joiner and this is introduced by the
commit ec2b774e7c91094d8c00de579646f1162b87b01e where we don't
put proper braces for 'list_for_each_entry_safe' and we pass an
invalid 'sta' pointer to __sta_info_destroy

EIP is at __list_add+0xe/0xa0
EAX: f3b63db4 EBX: 00000000 ECX: eab88c1c EDX: 00000000
ESI: 00000000 EDI: 00000246 EBP: f3b63d80 ESP: f3b63d58
DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
Process kworker/u:2 (pid: 198, ti=f3b62000 task=f3afbea0
task.ti=f3b62000)
Stack:
00000000 00000000 f9ef9821 00000000 00000000 eab88c30
f3b63d80 c017f623
eab88bf0 eab88bf0 f3b63dd0 c066f925 00000000 00000002
00000000 f9ef9821
f3b63da0 c0180a2b eab88c1c eab88c30 00000002 f3afbea0
eab88bf4 f3b63db4
 Call Trace:
[<f9ef9821>] ? __ieee80211_stop_tx_ba_session+0x31/0x60
[mac80211]
[<c017f623>] ? debug_mutex_add_waiter+0x23/0x60
[<c066f925>] __mutex_lock_common+0xd5/0x390
[<f9ef9821>] ? __ieee80211_stop_tx_ba_session+0x31/0x60
[mac80211]
[<c0180a2b>] ? trace_hardirqs_off+0xb/0x10
[<c066fd37>] mutex_lock_nested+0x47/0x60
[<f9ef9821>] ? __ieee80211_stop_tx_ba_session+0x31/0x60
[mac80211]
[<f9ef9821>] __ieee80211_stop_tx_ba_session+0x31/0x60
[mac80211]
[<f9ef8989>] ieee80211_sta_tear_down_BA_sessions+0x39/0x60 [mac80211]
[<f9ef1a67>] __sta_info_destroy+0x57/0x780 [mac80211]
[<f9ef2223>] ieee80211_sta_expire+0x93/0xb0 [mac80211]
[<f9efc8f6>] ieee80211_ibss_work+0x2d6/0x530 [mac80211]

Cc: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: fix scan state machine
Mohammed Shafi Shajakhan [Sat, 24 Dec 2011 13:13:28 +0000 (18:43 +0530)]
mac80211: fix scan state machine

when we run high bandwidth UDP traffic and we trigger a scan, the scan
state machine seems to be looping in SUSPEND->RESUME->DECISION->SUSPEND
and SET_CHANNEL seems to be never called as 'tx_empty' is never true
while running UDP traffic. fix this by settting SET_CHANNEL state when
we get into RESUME state.

Cc: Leela Kella <leela@qca.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agonet/rfkill/rfkill-gpio.c: introduce missing kfree
Julia Lawall [Fri, 23 Dec 2011 17:39:27 +0000 (18:39 +0100)]
net/rfkill/rfkill-gpio.c: introduce missing kfree

Error handling code following a kmalloc should free the allocated data.
The label fail_alloc already does this for rfkill.

A simplified version of the semantic match that finds the problem is as
follows: (http://coccinelle.lip6.fr)

// <smpl>
@r exists@
local idexpression x;
statement S;
identifier f1;
position p1,p2;
expression *ptr != NULL;
@@

x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
...
if (x == NULL) S
<... when != x
     when != if (...) { <+...x...+> }
x->f1
...>
(
 return \(0\|<+...x...+>\|ptr\);
|
 return@p2 ...;
)

@script:python@
p1 << r.p1;
p2 << r.p2;
@@

print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: increase tx status ring buffer size
Rajkumar Manoharan [Fri, 23 Dec 2011 15:57:02 +0000 (21:27 +0530)]
ath9k_hw: increase tx status ring buffer size

AR9003 chips read tx status from ring buffer whose max number of
status descriptor is mininal compared to max number of tx buffers.
On a stress condition, it can be easily overflown which might cause
false tx hung detection. Though increasing number of max status
descriptors consumes more memory, it helps to avoid false positive
chip resets.

Cc: Paul Stewart <pstew@google.com>
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: 3945: fix hw passive scan on radar channels
Stanislaw Gruszka [Fri, 23 Dec 2011 07:13:50 +0000 (08:13 +0100)]
iwlegacy: 3945: fix hw passive scan on radar channels

Patch fix firmware error on "iw dev wlan0 scan passive" for
hardware scanning (with disable_hw_scan=0 module parameter).

 iwl3945 0000:03:00.0: Microcode SW error detected. Restarting 0x82000008.
 iwl3945 0000:03:00.0: Loaded firmware version: 15.32.2.9
 iwl3945 0000:03:00.0: Start IWL Error Log Dump:
 iwl3945 0000:03:00.0: Status: 0x0002A2E4, count: 1
 iwl3945 0000:03:00.0: Desc       Time       asrtPC blink2 ilink1  nmiPC   Line
 iwl3945 0000:03:00.0: SYSASSERT     (0x5) 0041263900 0x13756 0x0031C 0x00000 764
 iwl3945 0000:03:00.0: Error Reply type 0x000002FC cmd C_SCAN (0x80) seq 0x443E ser 0x00340000
 iwl3945 0000:03:00.0: Command C_SCAN failed: FW Error
 iwl3945 0000:03:00.0: Can't stop Rx DMA.

We have disable ability to change passive scanning to active on
particular channel when traffic is detected on that channel. Otherwise
firmware will report error, when we try to do passive scan on radar
channels.

Reported-and-debugged-by: Pedro Francisco <pedrogfrancisco@gmail.com>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: 3945: simplify calculations of retry limit
Stanislaw Gruszka [Fri, 23 Dec 2011 07:13:49 +0000 (08:13 +0100)]
iwlegacy: 3945: simplify calculations of retry limit

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: random 3945-rs.c cleanups
Stanislaw Gruszka [Fri, 23 Dec 2011 07:13:48 +0000 (08:13 +0100)]
iwlegacy: random 3945-rs.c cleanups

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: 4965: remove one il4965_hdl_beacon
Stanislaw Gruszka [Fri, 23 Dec 2011 07:13:47 +0000 (08:13 +0100)]
iwlegacy: 4965: remove one il4965_hdl_beacon

We have two such functions.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: 3945: get rid of hw_{set,get}_rate
Stanislaw Gruszka [Fri, 23 Dec 2011 07:13:46 +0000 (08:13 +0100)]
iwlegacy: 3945: get rid of hw_{set,get}_rate

Remove these helpers, some are not unused at all, one can be
unrolled in place of use.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: 4965: small tx_cmd build cleanup
Stanislaw Gruszka [Fri, 23 Dec 2011 07:13:45 +0000 (08:13 +0100)]
iwlegacy: 4965: small tx_cmd build cleanup

Get rid of two inline functions related and simplify a bit
rts_retry_limit calculations.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: 4965: toggle tx antenna inline
Stanislaw Gruszka [Fri, 23 Dec 2011 07:13:44 +0000 (08:13 +0100)]
iwlegacy: 4965: toggle tx antenna inline

Make function static and change antenna number inline.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: move some i/o helpers out of inline
Stanislaw Gruszka [Fri, 23 Dec 2011 07:13:43 +0000 (08:13 +0100)]
iwlegacy: move some i/o helpers out of inline

This save us about 20k of text size, and should have no impact on
performance as hot paths do not use much I/O.

Before:
   text    data     bss     dec     hex filename
 108512    1784     168  110464   1af80 drivers/net/wireless/iwlegacy/iwl3945.ko
 165730    2164     156  168050   29072 drivers/net/wireless/iwlegacy/iwl4965.ko
  91942     328      48   92318   1689e drivers/net/wireless/iwlegacy/iwlegacy.ko

After:
   text    data     bss     dec     hex filename
  95556    1784     168   97508   17ce4 drivers/net/wireless/iwlegacy/iwl3945.ko
 154853    2164     156  157173   265f5 drivers/net/wireless/iwlegacy/iwl4965.ko
  91634     328      48   92010   1676a drivers/net/wireless/iwlegacy/iwlegacy.ko

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: off by one in iwl3945_hw_build_tx_cmd_rate()
Dan Carpenter [Fri, 23 Dec 2011 07:13:42 +0000 (08:13 +0100)]
iwlegacy: off by one in iwl3945_hw_build_tx_cmd_rate()

We use "rate_index" like this:
rate = iwl3945_rates[rate_index].plcp;
The iwl3945_rates[] array has IWL_RATE_COUNT_3945 elements so the
limit here is off by one.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: remove iwl-sta.c
Stanislaw Gruszka [Fri, 23 Dec 2011 07:13:41 +0000 (08:13 +0100)]
iwlegacy: remove iwl-sta.c

I forgot to remove this file before.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: always clear SDATA_STATE_OFFCHANNEL flag
Eliad Peller [Thu, 22 Dec 2011 23:48:06 +0000 (01:48 +0200)]
mac80211: always clear SDATA_STATE_OFFCHANNEL flag

If the vif is stopped while it is offchannel (e.g. right
after p2p negotiation) the SDATA_STATE_OFFCHANNEL flag
is never get cleared, resulting in various bad effects
(e.g. GO can't start beaconing).

Fix it by clearing the SDATA_STATE_OFFCHANNEL flag
even if the vif is stopped.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>