]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
13 years agoMerge remote-tracking branch 'hwmon-staging/hwmon-next'
Stephen Rothwell [Tue, 9 Aug 2011 01:33:23 +0000 (11:33 +1000)]
Merge remote-tracking branch 'hwmon-staging/hwmon-next'

13 years agoMerge remote-tracking branch 'hid/for-next'
Stephen Rothwell [Tue, 9 Aug 2011 01:31:52 +0000 (11:31 +1000)]
Merge remote-tracking branch 'hid/for-next'

13 years agoMerge remote-tracking branch 'xfs/master'
Stephen Rothwell [Tue, 9 Aug 2011 01:30:11 +0000 (11:30 +1000)]
Merge remote-tracking branch 'xfs/master'

13 years agoMerge remote-tracking branch 'v9fs/for-next'
Stephen Rothwell [Tue, 9 Aug 2011 01:28:54 +0000 (11:28 +1000)]
Merge remote-tracking branch 'v9fs/for-next'

13 years agoMerge remote-tracking branch 'ocfs2/linux-next'
Stephen Rothwell [Tue, 9 Aug 2011 01:27:27 +0000 (11:27 +1000)]
Merge remote-tracking branch 'ocfs2/linux-next'

13 years agoMerge remote-tracking branch 'nfs/linux-next'
Stephen Rothwell [Tue, 9 Aug 2011 01:26:09 +0000 (11:26 +1000)]
Merge remote-tracking branch 'nfs/linux-next'

13 years agoMerge remote-tracking branch 'logfs/master'
Stephen Rothwell [Tue, 9 Aug 2011 01:24:54 +0000 (11:24 +1000)]
Merge remote-tracking branch 'logfs/master'

13 years agoMerge remote-tracking branch 'jfs/next'
Stephen Rothwell [Tue, 9 Aug 2011 01:23:37 +0000 (11:23 +1000)]
Merge remote-tracking branch 'jfs/next'

13 years agoMerge remote-tracking branch 'gfs2/master'
Stephen Rothwell [Tue, 9 Aug 2011 01:22:21 +0000 (11:22 +1000)]
Merge remote-tracking branch 'gfs2/master'

13 years agoMerge remote-tracking branch 'fuse/for-next'
Stephen Rothwell [Tue, 9 Aug 2011 01:21:04 +0000 (11:21 +1000)]
Merge remote-tracking branch 'fuse/for-next'

13 years agoMerge remote-tracking branch 'cifs/master'
Stephen Rothwell [Tue, 9 Aug 2011 01:20:57 +0000 (11:20 +1000)]
Merge remote-tracking branch 'cifs/master'

13 years agoMerge remote-tracking branch 'ceph/for-next'
Stephen Rothwell [Tue, 9 Aug 2011 01:20:55 +0000 (11:20 +1000)]
Merge remote-tracking branch 'ceph/for-next'

Conflicts:
fs/ceph/export.c

13 years agoMerge remote-tracking branch 'unicore32/unicore32'
Stephen Rothwell [Tue, 9 Aug 2011 01:19:34 +0000 (11:19 +1000)]
Merge remote-tracking branch 'unicore32/unicore32'

13 years agoMerge remote-tracking branch 'sh/sh-latest'
Stephen Rothwell [Tue, 9 Aug 2011 01:18:18 +0000 (11:18 +1000)]
Merge remote-tracking branch 'sh/sh-latest'

13 years agoMerge remote-tracking branch 's390/features'
Stephen Rothwell [Tue, 9 Aug 2011 01:17:05 +0000 (11:17 +1000)]
Merge remote-tracking branch 's390/features'

13 years agoMerge remote-tracking branch '52xx-and-virtex/powerpc/next'
Stephen Rothwell [Tue, 9 Aug 2011 01:15:46 +0000 (11:15 +1000)]
Merge remote-tracking branch '52xx-and-virtex/powerpc/next'

13 years agoMerge remote-tracking branch 'mips/mips-for-linux-next'
Stephen Rothwell [Tue, 9 Aug 2011 01:14:23 +0000 (11:14 +1000)]
Merge remote-tracking branch 'mips/mips-for-linux-next'

13 years agoMerge remote-tracking branch 'm68knommu/for-next'
Stephen Rothwell [Tue, 9 Aug 2011 01:14:20 +0000 (11:14 +1000)]
Merge remote-tracking branch 'm68knommu/for-next'

13 years agoMerge remote-tracking branch 'cris/for-next'
Stephen Rothwell [Tue, 9 Aug 2011 01:12:55 +0000 (11:12 +1000)]
Merge remote-tracking branch 'cris/for-next'

13 years agoMerge remote-tracking branch 'blackfin/for-linus'
Stephen Rothwell [Tue, 9 Aug 2011 01:11:43 +0000 (11:11 +1000)]
Merge remote-tracking branch 'blackfin/for-linus'

13 years agoMerge remote-tracking branch 'ux500-core/ux500-core'
Stephen Rothwell [Tue, 9 Aug 2011 01:11:40 +0000 (11:11 +1000)]
Merge remote-tracking branch 'ux500-core/ux500-core'

13 years agoMerge remote-tracking branch 's5p/for-next'
Stephen Rothwell [Tue, 9 Aug 2011 01:10:25 +0000 (11:10 +1000)]
Merge remote-tracking branch 's5p/for-next'

Conflicts:
arch/arm/mach-exynos4/Kconfig
arch/arm/mach-exynos4/mach-smdkc210.c

13 years agoMerge remote-tracking branch 'msm/for-next'
Stephen Rothwell [Tue, 9 Aug 2011 01:09:00 +0000 (11:09 +1000)]
Merge remote-tracking branch 'msm/for-next'

Conflicts:
arch/arm/mach-msm/io.c

13 years agoMerge remote-tracking branch 'arm-soc/for-next'
Stephen Rothwell [Tue, 9 Aug 2011 01:08:49 +0000 (11:08 +1000)]
Merge remote-tracking branch 'arm-soc/for-next'

Conflicts:
arch/arm/mach-exynos4/pm.c
arch/arm/mach-imx/mm-imx25.c
arch/arm/mach-imx/mm-imx31.c
arch/arm/mach-imx/mm-imx35.c
arch/arm/mach-mx5/mm.c
arch/arm/mach-omap2/cm-regbits-44xx.h

13 years agoMerge remote-tracking branch 'arm-lpae/for-next'
Stephen Rothwell [Tue, 9 Aug 2011 01:07:16 +0000 (11:07 +1000)]
Merge remote-tracking branch 'arm-lpae/for-next'

Conflicts:
arch/arm/include/asm/pgalloc.h
arch/arm/include/asm/pgtable.h
arch/arm/include/asm/proc-fns.h
arch/arm/include/asm/tlb.h
arch/arm/mm/context.c
arch/arm/mm/proc-v7.S

13 years agoMerge remote-tracking branch 'arm/for-next'
Stephen Rothwell [Tue, 9 Aug 2011 01:05:56 +0000 (11:05 +1000)]
Merge remote-tracking branch 'arm/for-next'

13 years agoMerge remote-tracking branch 'fbdev-current/fbdev-fixes-for-linus'
Stephen Rothwell [Tue, 9 Aug 2011 00:59:58 +0000 (10:59 +1000)]
Merge remote-tracking branch 'fbdev-current/fbdev-fixes-for-linus'

13 years agoMerge remote-tracking branch 'rmobile-current/rmobile-fixes-for-linus'
Stephen Rothwell [Tue, 9 Aug 2011 00:59:56 +0000 (10:59 +1000)]
Merge remote-tracking branch 'rmobile-current/rmobile-fixes-for-linus'

13 years agoMerge remote-tracking branch 'sh-current/sh-fixes-for-linus'
Stephen Rothwell [Tue, 9 Aug 2011 00:59:55 +0000 (10:59 +1000)]
Merge remote-tracking branch 'sh-current/sh-fixes-for-linus'

13 years agoMerge remote-tracking branch 'input-current/for-linus'
Stephen Rothwell [Tue, 9 Aug 2011 00:59:44 +0000 (10:59 +1000)]
Merge remote-tracking branch 'input-current/for-linus'

13 years agoMerge remote-tracking branch 'staging.current/staging-linus'
Stephen Rothwell [Tue, 9 Aug 2011 00:59:42 +0000 (10:59 +1000)]
Merge remote-tracking branch 'staging.current/staging-linus'

13 years agoMerge remote-tracking branch 'usb.current/usb-linus'
Stephen Rothwell [Tue, 9 Aug 2011 00:59:41 +0000 (10:59 +1000)]
Merge remote-tracking branch 'usb.current/usb-linus'

13 years agoMerge remote-tracking branch 'tty.current/tty-linus'
Stephen Rothwell [Tue, 9 Aug 2011 00:59:41 +0000 (10:59 +1000)]
Merge remote-tracking branch 'tty.current/tty-linus'

13 years agoMerge remote-tracking branch 'driver-core.current/driver-core-linus'
Stephen Rothwell [Tue, 9 Aug 2011 00:59:40 +0000 (10:59 +1000)]
Merge remote-tracking branch 'driver-core.current/driver-core-linus'

13 years agoMerge remote-tracking branch 'pci-current/for-linus'
Stephen Rothwell [Tue, 9 Aug 2011 00:59:38 +0000 (10:59 +1000)]
Merge remote-tracking branch 'pci-current/for-linus'

13 years agoMerge remote-tracking branch 'sound-current/for-linus'
Stephen Rothwell [Tue, 9 Aug 2011 00:59:38 +0000 (10:59 +1000)]
Merge remote-tracking branch 'sound-current/for-linus'

13 years agoMerge remote-tracking branch 'net-current/master'
Stephen Rothwell [Tue, 9 Aug 2011 00:59:37 +0000 (10:59 +1000)]
Merge remote-tracking branch 'net-current/master'

13 years agoMerge remote-tracking branch 'powerpc-merge/merge'
Stephen Rothwell [Tue, 9 Aug 2011 00:59:35 +0000 (10:59 +1000)]
Merge remote-tracking branch 'powerpc-merge/merge'

13 years agoUSB: Serial: Added device ID for Qualcomm Modem in Sagemcom's HiLo3G
Vijay Chavan [Mon, 8 Aug 2011 21:11:12 +0000 (02:41 +0530)]
USB: Serial: Added device ID for Qualcomm Modem in Sagemcom's HiLo3G

A new device ID pair is added for Qualcomm Modem present in Sagemcom's HiLo3G module.

Signed-off-by: Vijay Chavan <VijayChavan007@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agofs/9p: Add OS dependent open flags in 9p protocol
Venkateswararao Jujjuri [Wed, 3 Aug 2011 16:58:43 +0000 (16:58 +0000)]
fs/9p: Add OS dependent open flags in 9p protocol

Some of the flags are OS/arch dependent we add a 9p
protocol value which maps to asm-generic/fcntl.h values in Linux

Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
13 years ago9p: remove CONFIG_NET_9P_DEBUG option
Alex Ray [Mon, 1 Aug 2011 12:14:44 +0000 (12:14 +0000)]
9p: remove CONFIG_NET_9P_DEBUG option

Remove the CONFIG_NET_9P_DEBUG option, used to completely remove logging
functionality from v9fs.  Logging is (already) controlled with the
run-time debug= option, this gets rid of the compile-time option (which
was being misunderstood and misused).

Signed-off-by: Alex Ray <ajray@ncsu.edu>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
13 years agousb/host/pci-quirks.c: correct annotation of `ehci_dmi_nohandoff_table'
Arnaud Lacombe [Thu, 21 Jul 2011 17:16:20 +0000 (13:16 -0400)]
usb/host/pci-quirks.c: correct annotation of `ehci_dmi_nohandoff_table'

ehci_bios_handoff() is marked __devinit, `ehci_dmi_nohandoff_table' should be
marked __devinitconst, not __initconst. This fixes the following section
mismatch:

WARNING: vmlinux.o(.devinit.text+0x4f08): Section mismatch in reference from the function ehci_bios_handoff() to the variable .init.rodata:ehci_dmi_nohandoff_table
The function __devinit ehci_bios_handoff() references a variable __initconst ehci_dmi_nohandoff_table.
If ehci_dmi_nohandoff_table is only used by ehci_bios_handoff then annotate ehci_dmi_nohandoff_table with a matching annotation.

Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoserial: samsung: Fix build error
Kukjin Kim [Wed, 27 Jul 2011 23:50:38 +0000 (08:50 +0900)]
serial: samsung: Fix build error

drivers/tty/serial/samsung.c: In function 's3c24xx_serial_init':
drivers/tty/serial/samsung.c:1237: error: lvalue required as unary '&' operand

Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agodrivers/base/devtmpfs.c: correct annotation of `setup_done'
Arnaud Lacombe [Thu, 21 Jul 2011 17:16:19 +0000 (13:16 -0400)]
drivers/base/devtmpfs.c: correct annotation of `setup_done'

This fixes the following section mismatch issue:

WARNING: vmlinux.o(.text+0x1192bf): Section mismatch in reference from the function devtmpfsd() to the variable .init.data:setup_done
The function devtmpfsd() references the variable __initdata setup_done.
This is often because devtmpfsd lacks a __initdata annotation or the annotation of setup_done is wrong.

WARNING: vmlinux.o(.text+0x119342): Section mismatch in reference from the function devtmpfsd() to the variable .init.data:setup_done
The function devtmpfsd() references the variable __initdata setup_done.
This is often because devtmpfsd lacks a __initdata annotation or the annotation of setup_done is wrong.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agodriver core: fix kernel-doc warning in platform.c
Randy Dunlap [Wed, 27 Jul 2011 19:11:25 +0000 (12:11 -0700)]
driver core: fix kernel-doc warning in platform.c

Warning(drivers/base/platform.c:50): No description found for parameter 'pdev'
Warning(drivers/base/platform.c:50): Excess function parameter 'dev' description in 'arch_setup_pdev_archdata'

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agofirmware: fix google/gsmi.c build warning
Randy Dunlap [Wed, 27 Jul 2011 17:11:28 +0000 (10:11 -0700)]
firmware: fix google/gsmi.c build warning

Modify function parameter type to match expected type.  Fixes a
build warning:

drivers/firmware/google/gsmi.c:473: warning: initialization from incompatible pointer type

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Cc: Mike Waychison <mikew@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoUSB: option driver: add PID for Vodafone-Huawei K4511
Andrew Bird [Wed, 27 Jul 2011 16:03:20 +0000 (17:03 +0100)]
USB: option driver: add PID for Vodafone-Huawei K4511

This patch adds the product ID of Huawei's Vodafone K4511 mobile broadband
modem to option.c. This is necessary so that the driver gets loaded on demand
without the intervention of usb_modeswitch. This has the benefit of it becoming
available faster and also ensures that the option driver is not bound to a
network interface that should be claimed by cdc_ether.

Signed-off-by: Andrew Bird <ajb@spheresystems.co.uk>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoUSB: option driver: add PID for Vodafone-Huawei K4510
Andrew Bird [Wed, 27 Jul 2011 16:03:19 +0000 (17:03 +0100)]
USB: option driver: add PID for Vodafone-Huawei K4510

This patch adds the product ID of Huawei's Vodafone K4510 mobile broadband
modem to option.c. This is necessary so that the driver gets loaded on demand
without the intervention of usb_modeswitch. This has the benefit of it becoming
available faster and also ensures that the option driver is not bound to a
network interface that should be claimed by cdc_ether.

Signed-off-by: Andrew Bird <ajb@spheresystems.co.uk>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoUSB: option driver: add PID for Vodafone-Huawei K3771
Andrew Bird [Wed, 27 Jul 2011 16:03:18 +0000 (17:03 +0100)]
USB: option driver: add PID for Vodafone-Huawei K3771

This patch adds the product ID of Huawei's Vodafone K3771 mobile broadband
modem to option.c. This is necessary so that the driver gets loaded on demand
without the intervention of usb_modeswitch. This has the benefit of it becoming
available faster and also ensures that the option driver is not bound to a
network interface that should be claimed by cdc_ether.

Signed-off-by: Andrew Bird <ajb@spheresystems.co.uk>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoUSB: option driver: add PID for Vodafone-Huawei K3770
Andrew Bird [Wed, 27 Jul 2011 16:03:17 +0000 (17:03 +0100)]
USB: option driver: add PID for Vodafone-Huawei K3770

This patch adds the product ID of Huawei's Vodafone K3770 mobile broadband
modem to option.c. This is necessary so that the driver gets loaded on demand
without the intervention of usb_modeswitch. This has the benefit of it becoming
available faster and also ensures that the option driver is not bound to a
network interface that should be claimed by cdc_ether.

Signed-off-by: Andrew Bird <ajb@spheresystems.co.uk>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agousb: serial: ftdi_sio.c: For the FT232H FTDI_SIO_SET_BAUDRATE_REQUEST, index needs...
Uwe Bonnes [Fri, 22 Jul 2011 08:41:15 +0000 (10:41 +0200)]
usb: serial: ftdi_sio.c: For the FT232H FTDI_SIO_SET_BAUDRATE_REQUEST, index needs to be shifted too

the recent addition of the FT232H showed that baudrate was set wrong. See
gmane.linux.usb.general: "[ftdi_sio] FT232H support".  With the old code,
the MSB of the 4 encoded fractional divider bits and more important the
clock predivider bits got lost. Adding the FT232H to the code patch were
these bits are shifted solves the problem. I verified baud rates with a
scope now.

I suspect, that the BM device probably needs these bits shifted too. But
there is no predivider bit, so this is not obvious, and a missing MSB of the
encoded fractional divider only shifts the resulting baudrate minimal.
The AM has only 3 bits of encoded fractional divider, so it is not impacted.

I have no BM device to test, so I only added a comment and left the code for
the BM untouched.

Signed-off-by: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agousb/isp1760: Added missing call to usb_hcd_check_unlink_urb() during unlink
Arvid Brodin [Wed, 20 Jul 2011 01:13:46 +0000 (03:13 +0200)]
usb/isp1760: Added missing call to usb_hcd_check_unlink_urb() during unlink

Signed-off-by: Arvid Brodin <arvid.brodin@enea.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoUSB: EHCI: Fix test mode sequence
Boris Todorov [Mon, 11 Jul 2011 09:03:33 +0000 (12:03 +0300)]
USB: EHCI: Fix test mode sequence

The sequence to put port in test mode is not complete.
According EHCI specification all enabled ports must be
put in suspend.

Signed-off-by: Boris Todorov <boris.st.todorov@gmail.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoUSB: ftdi_sio: fix minor typo in get_ftdi_divisor
Ionut Nicu [Mon, 11 Jul 2011 13:46:12 +0000 (16:46 +0300)]
USB: ftdi_sio: fix minor typo in get_ftdi_divisor

Even if it's unlikely for this to cause an error,
there is a typo in the code that uses the bitwise-AND
operator instead of the logical one.

Signed-off-by: Ionut Nicu <ionut.nicu@cloudbit.ro>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoUSB: at91_udc: include linux/prefetch.h explicitly
Jean-Christophe PLAGNIOL-VILLARD [Sun, 29 May 2011 08:01:48 +0000 (10:01 +0200)]
USB: at91_udc: include linux/prefetch.h explicitly

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Patrice Vilchez <patrice.vilchez@atmel.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoUSB: usb-storage: unusual_devs entry for ARM V2M motherboard.
Nick Bowler [Wed, 13 Jul 2011 15:40:09 +0000 (11:40 -0400)]
USB: usb-storage: unusual_devs entry for ARM V2M motherboard.

Connecting the V2M to a Linux host results in a constant stream of
errors spammed to the console, all of the form

  sd 1:0:0:0: ioctl_internal_command return code = 8070000
     : Sense Key : 0x4 [current]
     : ASC=0x0 ASCQ=0x0

The errors appear to be otherwise harmless.  Add an unusual_devs entry
which eliminates all of the error messages.

Signed-off-by: Nick Bowler <nbowler@elliptictech.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agousb/ehci-mxc: add missing inclusion of mach/hardware.h
Shawn Guo [Thu, 21 Jul 2011 14:24:10 +0000 (22:24 +0800)]
usb/ehci-mxc: add missing inclusion of mach/hardware.h

As cpu_is_mx stuff is being used in the driver, header mach/hardware.h
should be explicitly included.

The missing of the header is causing today's linux-next build error
as bleow.

  CC      drivers/usb/host/ehci-hcd.o
In file included from linux-next/drivers/usb/host/ehci-hcd.c:1190:0:
linux-next/drivers/usb/host/ehci-mxc.c: In function 'ehci_mxc_drv_probe':
linux-next/drivers/usb/host/ehci-mxc.c:175:2: error: implicit declaration of function 'cpu_is_mx35'
linux-next/drivers/usb/host/ehci-mxc.c:175:2: error: implicit declaration of function 'cpu_is_mx25'
linux-next/drivers/usb/host/ehci-mxc.c:185:2: error: implicit declaration of function 'cpu_is_mx51'

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoUSB: assign instead of equal in usbtmc.c
Maxim Nikulin [Sat, 9 Jul 2011 16:44:44 +0000 (23:44 +0700)]
USB: assign instead of equal in usbtmc.c

Assign operator instead of equality test in the usbtmc_ioctl_abort_bulk_in() function.

Signed-off-by: Maxim A. Nikulin <M.A.Nikulin@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agousb: renesas_usbhs: fixup usbhsg_for_each_uep 1st pos
Kuninori Morimoto [Wed, 13 Jul 2011 05:01:29 +0000 (22:01 -0700)]
usb: renesas_usbhs: fixup usbhsg_for_each_uep 1st pos

1st pos of __usbhsg_for_each_uep() was wrong.
Expected uep were ep1, ep2, ep3...
but each uep were ep0, ep2, ep3 ...
This patch modify it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agousb: renesas_usbhs: fix DMA build by including dma-mapping.h
Kuninori Morimoto [Thu, 4 Aug 2011 04:41:26 +0000 (21:41 -0700)]
usb: renesas_usbhs: fix DMA build by including dma-mapping.h

Include dma-mapping.h to fix build of the renesas_usbhs driver

CC      drivers/usb/renesas_usbhs/mod_gadget.o
drivers/usb/renesas_usbhs/mod_gadget.c: In function 'usbhsg_dma_map':
drivers/usb/renesas_usbhs/mod_gadget.c:190: error: implicit declaration of function 'dma_map_single'
drivers/usb/renesas_usbhs/mod_gadget.c:192: error: implicit declaration of function 'dma_sync_single_for_device'
drivers/usb/renesas_usbhs/mod_gadget.c:196: error: implicit declaration of function 'dma_mapping_error'
drivers/usb/renesas_usbhs/mod_gadget.c: In function 'usbhsg_dma_unmap':
drivers/usb/renesas_usbhs/mod_gadget.c:217: error: implicit declaration of function 'dma_unmap_single'
drivers/usb/renesas_usbhs/mod_gadget.c:219: error: implicit declaration of function 'dma_sync_single_for_cpu'
make[5]: *** [drivers/usb/renesas_usbhs/mod_gadget.o] Error 1
make[4]: *** [drivers/usb/renesas_usbhs] Error 2

Reported-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agousb: gadget: net2272 - Correct includes
Geert Uytterhoeven [Mon, 8 Aug 2011 09:36:51 +0000 (11:36 +0200)]
usb: gadget: net2272 - Correct includes

<linux/irq.h> states:

 * Please do not include this file in generic code.  There is currently
 * no requirement for any architecture to implement anything held
 * within this file.

prefetch() and prefetchw() need <linux/prefetch.h> on m68k:

drivers/usb/gadget/net2272.c: In function ‘net2272_write_fifo’:
drivers/usb/gadget/net2272.c:468: error: implicit declaration of function ‘prefetch’
drivers/usb/gadget/net2272.c: In function ‘net2272_read_fifo’:
drivers/usb/gadget/net2272.c:574: error: implicit declaration of function ‘prefetchw’

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agozcache: Fix build error when sysfs is not defined
Nitin Gupta [Thu, 4 Aug 2011 22:05:24 +0000 (15:05 -0700)]
zcache: Fix build error when sysfs is not defined

Signed-off-by: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agozcache: Use div_u64 for 64-bit division
Thadeu Lima de Souza Cascardo [Thu, 4 Aug 2011 22:00:33 +0000 (19:00 -0300)]
zcache: Use div_u64 for 64-bit division

xv_get_total_size_bytes returns a u64 value and it's used in a division.
This causes build failures in 32-bit architectures, as reported by Randy
Dunlap.

Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Dan Magenheimer <dan.magenheimer@oracle.com>
Cc: Nitin Gupta <ngupta@vflare.org>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:rts_pstor: fix thread synchronization flow
wwang [Wed, 3 Aug 2011 08:00:25 +0000 (16:00 +0800)]
staging:rts_pstor: fix thread synchronization flow

Using different completion variables to synchronize different kernel threads

This patch fix a bug that may cause memory leak when driver
disconnected. This is not a very urgent bug. Because with the default
setting, driver disconnectting routine won't be called except when Linux
is shut down. But if the option auto_delink_en is set, a small number of
memory would leak out after memory card unplugged.

Signed-off-by: wwang <wei_wang@realsil.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoautofs4: fix debug printk warning uncovered by cleanup
Linus Torvalds [Mon, 8 Aug 2011 18:55:20 +0000 (11:55 -0700)]
autofs4: fix debug printk warning uncovered by cleanup

The previous comit made the autofs4 debug printouts check types against
the printout format, and uncovered this bug:

  fs/autofs4/waitq.c:106:2: warning: format ‘%08lx’ expects type ‘long unsigned int’, but argument 4 has type ‘autofs_wqt_t’

which is due to the insane type for wait_queue_token.  That thing should
be some fixed well-defined size (preferably just 'unsigned int' or
'u32') but for unexplained reasons it is randomly either 'unsigned long'
or 'unsigned int' depending on the architecture.

For now, cast it to 'unsigned long' for printing, the way we do
elsewhere.  Somebody else can try to explain the typedef mess.

(There's a reason we don't support excessive use of typedefs in the
kernel: it's usually just a good way of confusing yourself).

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoautofs4: clean up uaotfs use of debug/info/warning printouts
Linus Torvalds [Mon, 8 Aug 2011 18:35:17 +0000 (11:35 -0700)]
autofs4: clean up uaotfs use of debug/info/warning printouts

Use 'pr_debug()' for DPRINTK, which will do the proper type checking on
the arguments (without generating code) even when DEBUG isn't #defined.

Also, use the standard __VA_ARGS__ for the macros, and stop the
pointless abuse of 'do { xyz } while (0)' when the macro is already a
perfectly well-formed single statement.

Reported-by: David Howells <dhowells@redhat.com>
Suggested-by: Joe Perches <joe@perches.com>
Cc: Ian Kent <raven@themaw.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agocred: use 'const' in get_current_{user,groups}
Linus Torvalds [Mon, 8 Aug 2011 18:33:23 +0000 (11:33 -0700)]
cred: use 'const' in get_current_{user,groups}

Avoid annoying warnings from these functions ("discards qualifiers")
because they assign 'current_cred()' to a non-const pointer.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agofs/9p: Don't update file type when updating file attributes
Aneesh Kumar K.V [Mon, 25 Jul 2011 18:06:33 +0000 (18:06 +0000)]
fs/9p: Don't update file type when updating file attributes

We should only update attributes that we can change on stat2inode.
Also do file type initialization in v9fs_init_inode.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
13 years agofs/9p: Add fid before dentry instantiation
Aneesh Kumar K.V [Mon, 25 Jul 2011 18:06:32 +0000 (18:06 +0000)]
fs/9p: Add fid before dentry instantiation

d_instantiate marks the dentry positive. So a parallel lookup and mkdir of
the directory can find dentry that doesn't have fid attached. This can result
in both the code path doing v9fs_fid_add which results in v9fs_dentry leak.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
13 years agoCRED: Restore const to current_cred()
David Howells [Mon, 8 Aug 2011 14:54:53 +0000 (15:54 +0100)]
CRED: Restore const to current_cred()

Commit 3295514841c2 ("fix rcu annotations noise in cred.h") accidentally
dropped the const of current->cred inside current_cred() by the
insertion of a cast to deal with an RCU annotation loss warning from
sparce.

Use an appropriate RCU wrapper instead so as not to lose the const.

Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agofuse: mark pages accessed when written to
Johannes Weiner [Mon, 25 Jul 2011 20:35:35 +0000 (22:35 +0200)]
fuse: mark pages accessed when written to

As fuse does not use the page cache library functions when userspace
writes to a file, it did not benefit from 'c8236db mm: mark page
accessed before we write_end()' that made sure pages are properly
marked accessed when written to.

Signed-off-by: Johannes Weiner <jweiner@redhat.com>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
13 years agofuse: delete dead .write_begin and .write_end aops
Johannes Weiner [Mon, 25 Jul 2011 20:35:34 +0000 (22:35 +0200)]
fuse: delete dead .write_begin and .write_end aops

Ever since 'ea9b990 fuse: implement perform_write', the .write_begin
and .write_end aops have been dead code.

Their task - acquiring a page from the page cache, sending out a write
request and releasing the page again - is now done batch-wise to
maximize the number of pages send per userspace request.

Signed-off-by: Johannes Weiner <jweiner@redhat.com>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
13 years agofuse: fix flock
Miklos Szeredi [Mon, 8 Aug 2011 14:08:08 +0000 (16:08 +0200)]
fuse: fix flock

Commit a9ff4f87 "fuse: support BSD locking semantics" overlooked a
number of issues with supporing flock locks over existing POSIX
locking infrastructure:

  - it's not backward compatible, passing flock(2) calls to userspace
    unconditionally (if userspace sets FUSE_POSIX_LOCKS)

  - it doesn't cater for the fact that flock locks are automatically
    unlocked on file release

  - it doesn't take into account the fact that flock exclusive locks
    (write locks) don't need an fd opened for write.

The last one invalidates the original premise of the patch that flock
locks can be emulated with POSIX locks.

This patch fixes the first two issues.  The last one needs to be fixed
in userspace if the filesystem assumed that a write lock will happen
only on a file operned for write (as in the case of the current fuse
library).

Reported-by: Sebastian Pipping <webmaster@hartwork.org>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
13 years agoMerge branch 'fix/asoc' into for-linus
Takashi Iwai [Mon, 8 Aug 2011 12:30:44 +0000 (14:30 +0200)]
Merge branch 'fix/asoc' into for-linus

13 years agoMerge branch 'fix/kconfig' into for-linus
Takashi Iwai [Mon, 8 Aug 2011 12:30:29 +0000 (14:30 +0200)]
Merge branch 'fix/kconfig' into for-linus

13 years agosound: pss - don't use the deprecated function check_region
Wang Shaoyan [Mon, 8 Aug 2011 11:10:26 +0000 (19:10 +0800)]
sound: pss - don't use the deprecated function check_region

  sound/oss/pss.c: In function 'configure_nonsound_components':
  sound/oss/pss.c:676: warning: 'check_region' is deprecated (declared at include/linux/ioport.h:201)

Signed-off-by: Wang Shaoyan <wangshaoyan.pt@taobao.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux
Alex Elder [Mon, 8 Aug 2011 12:06:24 +0000 (07:06 -0500)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux

13 years agoALSA: timer - Add NULL-check for invalid slave timer
Takashi Iwai [Mon, 8 Aug 2011 10:28:22 +0000 (12:28 +0200)]
ALSA: timer - Add NULL-check for invalid slave timer

Just to be sure.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: timer - Fix Oops at closing slave timer
Takashi Iwai [Mon, 8 Aug 2011 10:24:46 +0000 (12:24 +0200)]
ALSA: timer - Fix Oops at closing slave timer

A slave-timer instance has no timer reference, and this results in
NULL-dereference at stopping the timer, typically called at closing
the device.

Reference: https://bugzilla.kernel.org/show_bug.cgi?id=40682

Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoMerge branches 'fixes' and 'pgt' into for-next
Russell King [Mon, 8 Aug 2011 08:55:53 +0000 (09:55 +0100)]
Merge branches 'fixes' and 'pgt' into for-next

13 years agoMerge branch 'wm8996-rename' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Takashi Iwai [Mon, 8 Aug 2011 08:45:31 +0000 (10:45 +0200)]
Merge branch 'wm8996-rename' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6 into fix/asoc

13 years agoARM: 7008/1: alignment: Make SIGBUS sent to userspace POSIXly correct
Dave Martin [Thu, 28 Jul 2011 13:29:40 +0000 (14:29 +0100)]
ARM: 7008/1: alignment: Make SIGBUS sent to userspace POSIXly correct

With the UM_SIGNAL alignment fault mode, no siginfo structure is
passed to userspace.

POSIX specifies how siginfo_t should be populated for alignment
faults, so this patch does just that:

  * si_signo = SIGBUS
  * si_code = BUS_ADRALN
  * si_addr = misaligned data address at which access was attempted

Signed-off-by: Dave Martin <dave.martin@linaro.org>
Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Acked-by: Kirill A. Shutemov <kirill@shutemov.name>
Reviewed-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoARM: 7007/1: alignment: Prevent ignoring of faults with ARMv6 unaligned access model
Dave Martin [Thu, 28 Jul 2011 13:28:52 +0000 (14:28 +0100)]
ARM: 7007/1: alignment: Prevent ignoring of faults with ARMv6 unaligned access model

Currently, it's possible to set the kernel to ignore alignment
faults when changing the alignment fault handling mode at runtime
via /proc/sys/alignment, even though this is undesirable on ARMv6
and above, where it can result in infinite spins where an un-fixed-
up instruction repeatedly faults.

In addition, the kernel clobbers any alignment mode specified on
the command-line if running on ARMv6 or above.

This patch factors out the necessary safety check into a couple of
new helper functions, and checks and modifies the fault handling
mode as appropriate on boot and on writes to /proc/cpu/alignment.

Prior to ARMv6, the behaviour is unchanged.

For ARMv6 and above, the behaviour changes as follows:

  * Attempting to ignore faults on ARMv6 results in the mode being
    forced to UM_FIXUP instead.  A warning is printed if this
    happened as a result of a write to /proc/cpu/alignment.  The
    user's UM_WARN bit (if present) is still honoured.

  * An alignment= argument from the kernel command-line is now
    honoured, except that the kernel will modify the specified mode
    as described above.  This is allows modes such as UM_SIGNAL and
    UM_WARN to be active immediately from boot, which is useful for
    debugging purposes.

Signed-off-by: Dave Martin <dave.martin@linaro.org>
Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoARM: 7010/1: mm: fix invalid loop for poison_init_mem
Jamie Iles [Thu, 4 Aug 2011 08:39:31 +0000 (09:39 +0100)]
ARM: 7010/1: mm: fix invalid loop for poison_init_mem

poison_init_mem() used a loop of:

while ((count = count - 4))

which has 2 problems - an off by one error so that we do one less word
than we should, and the other is that if count == 0 then we loop forever
and poison too much.  On a platform with HAVE_TCM=y but nothing in the
TCM's, this caused corruption and the platform failed to boot.

Acked-by: Stephen Boyd <sboyd@codeaurora.org>
Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Signed-off-by: Jamie Iles <jamie@jamieiles.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoARM: 7005/1: freshen up mm/proc-arm946.S
Brian S. Julin [Sun, 24 Jul 2011 15:53:50 +0000 (16:53 +0100)]
ARM: 7005/1: freshen up mm/proc-arm946.S

The file mm/proc-arm946.S contains a typo and is missing a structure
member in __arm946_proc_info.  The former prevents compilation
and the latter causes problems during boot.  It is likely this
file was manually copied from a similar file and not tested, then
later updates to the *_proc_info structures missed this file.

This patch will apply (with offset) with or without the
recent macro unification work that has been done in this directory.
This was verified against linux-next/stable last week.

See arm-linux-kernel thread:
http://lists.arm.linux.org.uk/lurker/message/20110718.103237.0106d468.en.html

Signed-off-by: Brian S. Julin <bri@abrij.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agodmaengine: PL08x: Fix trivial build error
Russell King [Sat, 6 Aug 2011 08:34:26 +0000 (09:34 +0100)]
dmaengine: PL08x: Fix trivial build error

Something changed during the 3.1 merge window in the include files
which now causes the pl08x DMA engine driver to fail to build.  Fix
this by adding the now necessary dma-mapping.h include:

drivers/dma/amba-pl08x.c: In function ■pl08x_unmap_buffers■:
drivers/dma/amba-pl08x.c:1524: error: implicit declaration of function ■dma_unmap_single■
drivers/dma/amba-pl08x.c:1527: error: implicit declaration of function ■dma_unmap_page■

Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoARM: mach-shmobile: mackerel: Add USB-DMA ID
Kuninori Morimoto [Fri, 17 Jun 2011 08:21:21 +0000 (08:21 +0000)]
ARM: mach-shmobile: mackerel: Add USB-DMA ID

This patch use channel0 as Tx, and channel1 as Rx

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux...
Paul Mundt [Mon, 8 Aug 2011 07:41:23 +0000 (16:41 +0900)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into rmobile-latest

13 years agosh: ecovec: add renesas_usbhs DMAEngine support
Kuninori Morimoto [Wed, 15 Jun 2011 06:08:32 +0000 (06:08 +0000)]
sh: ecovec: add renesas_usbhs DMAEngine support

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agommc: sdhi, mmcif: zboot: Correct clock disable logic
Simon Horman [Wed, 3 Aug 2011 06:08:54 +0000 (06:08 +0000)]
mmc: sdhi, mmcif: zboot: Correct clock disable logic

This corrects a logic-error that I made in the original implementation.

An alternate patch would be to just remove these lines and
leave the clock running as it is reconfigured later on during
boot anyway.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agoMerge branch 'common/core' into sh-latest
Paul Mundt [Mon, 8 Aug 2011 07:33:54 +0000 (16:33 +0900)]
Merge branch 'common/core' into sh-latest

13 years agosh: Fix up fallout from cpuidle changes.
Paul Mundt [Mon, 8 Aug 2011 07:30:11 +0000 (16:30 +0900)]
sh: Fix up fallout from cpuidle changes.

Fixes up the pm_idle redefinition that was introduced with the earlier
cpuidle changes.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agodp83640: increase receive time stamp buffer size
Richard Cochran [Sat, 6 Aug 2011 21:03:04 +0000 (21:03 +0000)]
dp83640: increase receive time stamp buffer size

The dp83640 buffers receive time stamps from special PHY status frames,
matching them to received PTP packets in a work queue. Because the timeout
for orphaned time stamps is so long and the buffer is so small, the driver
can drop time stamps under moderate PTP traffic.

This commit fixes the issue by decreasing the timeout to (at least) one
timer tick and increasing the buffer size.

Signed-off-by: Richard Cochran <richard.cochran@omicron.at>
Cc: <stable@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agogianfar: fix fiper alignment after resetting the time
Richard Cochran [Sat, 6 Aug 2011 21:03:03 +0000 (21:03 +0000)]
gianfar: fix fiper alignment after resetting the time

After resetting the time, the PPS signals on the FIPER output channels
are incorrectly offset from the clock time, as can be readily verified
by a looping back the FIPER to the external time stamp input.

Despite its name, setting the "Fiper Realignment Disable" bit seems to
fix the problem, at least on the P2020.

Also, following the example code from the Freescale BSP, it is not really
necessary to disable and re-enable the timer in order to reprogram the
FIPER. (The documentation is rather unclear on this point. It seems that
writing to the alarm register also disables the FIPER.)

Signed-off-by: Richard Cochran <richard.cochran@omicron.at>
Cc: <stable@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agortl8150: rtl8150_disconnect(...) does not need tasklet_disable(...)
huajun li [Sun, 7 Aug 2011 03:03:31 +0000 (03:03 +0000)]
rtl8150: rtl8150_disconnect(...) does not need tasklet_disable(...)

Executing cmd 'rmmod rtl8150' does not return(if your device connects
to host), the root cause is tasklet_disable() causes tasklet_kill()
block, remove it from rtl8150_disconnect().

Signed-off-by: Huajun Li <huajun.li.lee@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv4: use dst with ref during bcast/mcast loopback
Julian Anastasov [Sun, 7 Aug 2011 10:17:22 +0000 (10:17 +0000)]
ipv4: use dst with ref during bcast/mcast loopback

Make sure skb dst has reference when moving to
another context. Currently, I don't see protocols that can
hit it when sending broadcasts/multicasts to loopback using
noref dsts, so it is just a precaution.

Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv4: route non-local sources for raw socket
Julian Anastasov [Sun, 7 Aug 2011 09:16:09 +0000 (09:16 +0000)]
ipv4: route non-local sources for raw socket

The raw sockets can provide source address for
routing but their privileges are not considered. We
can provide non-local source address, make sure the
FLOWI_FLAG_ANYSRC flag is set if socket has privileges
for this, i.e. based on hdrincl (IP_HDRINCL) and
transparent flags.

Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonetfilter: TCP and raw fix for ip_route_me_harder
Julian Anastasov [Sun, 7 Aug 2011 09:11:00 +0000 (09:11 +0000)]
netfilter: TCP and raw fix for ip_route_me_harder

TCP in some cases uses different global (raw) socket
to send RST and ACK. The transparent flag is not set there.
Currently, it is a problem for rerouting after the previous
change.

Fix it by simplifying the checks in ip_route_me_harder
and use FLOWI_FLAG_ANYSRC even for sockets. It looks safe
because the initial routing allowed this source address to
be used and now we just have to make sure the packet is rerouted.

As a side effect this also allows rerouting for normal
raw sockets that use spoofed source addresses which was not possible
even before we eliminated the ip_route_input call.

Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Make userland include of netlink.h more sane.
David S. Miller [Mon, 8 Aug 2011 05:48:07 +0000 (22:48 -0700)]
net: Make userland include of netlink.h more sane.

Currently userland will barf when including linux/netlink.h unless it
precisely includes sys/socket.h first.  The issue is where the
definition of "sa_family_t" comes from.

We've been back and forth on how to fix this issue in the past, see:

http://thread.gmane.org/gmane.linux.debian.devel.bugs.general/622621
http://thread.gmane.org/gmane.linux.network/143380

Ben Hutchings suggested we take a hint from how we handle the
sockaddr_storage type.  First we define a "__kernel_sa_family_t"
to linux/socket.h that is always defined.

Then if __KERNEL__ is defined, we also define "sa_family_t" as
equal to "__kernel_sa_family_t".

Then in places like linux/netlink.h we use __kernel_sa_family_t
in user visible datastructures.

Reported-by: Michel Machado <michel@digirati.com.br>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv4: Fix ip_getsockopt for IP_PKTOPTIONS
Daniel Baluta [Mon, 8 Aug 2011 05:31:07 +0000 (22:31 -0700)]
ipv4: Fix ip_getsockopt for IP_PKTOPTIONS

IP_PKTOPTIONS is broken for 32-bit applications running
in COMPAT mode on 64-bit kernels.

This happens because msghdr's msg_flags field is always
set to zero. When running in COMPAT mode this should be
set to MSG_CMSG_COMPAT instead.

Signed-off-by: Tiberiu Szocs-Mihai <tszocs@ixiacom.com>
Signed-off-by: Daniel Baluta <dbaluta@ixiacom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>