linux-2.6
14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
Linus Torvalds [Sun, 14 Jun 2009 20:45:49 +0000 (13:45 -0700)] 
Merge branch 'for-linus' of git://git./linux/kernel/git/jikos/hid

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
  HID: fix inverted wheel for bluetooth version of apple mighty mouse
  HID: no more reinitializtion is needed in post_reset
  HID: hidraw -- fix comment about accepted devices
  HID: Multitouch support for the N-Trig touchscreen
  HID: add new multitouch and digitizer contants
  HID: autocentering support for Logitech Force 3D Pro
  HID: fix hid-ff drivers so that devices work even without ff support
  HID: force feedback support for SmartJoy PLUS PS2/USB adapter
  HID: Wacom Graphire Bluetooth driver
  HID: autocentering support for Logitech G25 Racing Wheel

14 years agoMerge master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Sun, 14 Jun 2009 20:45:05 +0000 (13:45 -0700)] 
Merge master.kernel.org:/home/rmk/linux-2.6-arm

* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] 5545/2: add flush_kernel_dcache_page() for ARM

14 years agokallsyms: generalize text region handling
Mike Frysinger [Mon, 8 Jun 2009 23:12:13 +0000 (19:12 -0400)] 
kallsyms: generalize text region handling

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
14 years agokallsyms: support kernel symbols in Blackfin on-chip memory
Robin Getz [Mon, 10 Jul 2006 06:25:40 +0000 (06:25 +0000)] 
kallsyms: support kernel symbols in Blackfin on-chip memory

The Blackfin arch has a discontiguous .text layout due to having on-chip
instruction memory and no virtual memory support.  As such, we need to
add explicit checks for these additional .text regions.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
14 years agoMerge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Sun, 14 Jun 2009 20:42:43 +0000 (13:42 -0700)] 
Merge branch 'for-linus' of /home/rmk/linux-2.6-arm

* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (417 commits)
  MAINTAINERS: EB110ATX is not ebsa110
  MAINTAINERS: update Eric Miao's email address and status
  fb: add support of LCD display controller on pxa168/910 (base layer)
  [ARM] 5552/1: ep93xx get_uart_rate(): use EP93XX_SYSCON_PWRCNT and EP93XX_SYSCON_PWRCN
  [ARM] pxa/sharpsl_pm: zaurus needs generic pxa suspend/resume routines
  [ARM] 5544/1: Trust PrimeCell resource sizes
  [ARM] pxa/sharpsl_pm: cleanup of gpio-related code.
  [ARM] pxa/sharpsl_pm: drop set_irq_type calls
  [ARM] pxa/sharpsl_pm: merge pxa-specific code into generic one
  [ARM] pxa/sharpsl_pm: merge the two sharpsl_pm.c since it's now pxa specific
  [ARM] sa1100: remove unused collie_pm.c
  [ARM] pxa: fix the conflicting non-static declarations of global_gpios[]
  [ARM] 5550/1: Add default configure file for w90p910 platform
  [ARM] 5549/1: Add clock api for w90p910 platform.
  [ARM] 5548/1: Add gpio api for w90p910 platform
  [ARM] 5551/1: Add multi-function pin api for w90p910 platform.
  [ARM] Make ARM_VIC_NR depend on ARM_VIC
  [ARM] 5546/1: ARM PL022 SSP/SPI driver v3
  ARM: OMAP4: SMP: Update defconfig for OMAP4430
  ARM: OMAP4: SMP: Enable SMP support for OMAP4430
  ...

14 years agodocumentation: make version fix
Adam Lackorzynski [Sun, 14 Jun 2009 20:38:59 +0000 (22:38 +0200)] 
documentation: make version fix

The Makefiles in the build directories use the internal make variable
MAKEFILE_LIST which is available from make 3.80 only.  (The patch would be
valid back to 2.6.25)

Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
14 years agokbuild: fix a compile warning
Amerigo Wang [Wed, 10 Jun 2009 19:48:23 +0000 (12:48 -0700)] 
kbuild: fix a compile warning

gcc-4.4.1:

 HOSTCC  scripts/basic/fixdep
scripts/basic/fixdep.c: In function 'traps':
scripts/basic/fixdep.c:377: warning: dereferencing type-punned pointer will break strict-aliasing rules
scripts/basic/fixdep.c:379: warning: dereferencing type-punned pointer will break strict-aliasing rules

(Apparently -fno-strict-aliasing will fix this too)

Signed-off-by: WANG Cong <amwang@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
14 years agoMerge branches 'cxgb3', 'ehca', 'misc', 'mlx4', 'mthca' and 'nes' into for-linus
Roland Dreier [Sun, 14 Jun 2009 20:31:19 +0000 (13:31 -0700)] 
Merge branches 'cxgb3', 'ehca', 'misc', 'mlx4', 'mthca' and 'nes' into for-linus

14 years agomlx4_core: Don't double-free IRQs when falling back from MSI-X to INTx
Roland Dreier [Sun, 14 Jun 2009 20:30:45 +0000 (13:30 -0700)] 
mlx4_core: Don't double-free IRQs when falling back from MSI-X to INTx

When both MSI-X and legacy INTx fail to generate an interrupt, the
driver frees the MSI-X interrupts twice.  Fix this by clearing the
have_irq flag for the MSI-X interrupts when they are freed the first
time.  This is the same bug that was reported in ib_mthca by Yinghai
Lu <yhlu.kernel@gmail.com>.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
14 years agogitignore: Add GNU GLOBAL files to top .gitignore
Jani Nikula [Thu, 11 Jun 2009 09:21:47 +0000 (12:21 +0300)] 
gitignore: Add GNU GLOBAL files to top .gitignore

Ignore GPATH, GRTAGS, GSYMS, and GTAGS generated by GNU GLOBAL.

Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
14 years agokbuild: fix delay in setlocalversion on readonly source
Nico Schottelius [Fri, 12 Jun 2009 07:59:52 +0000 (09:59 +0200)] 
kbuild: fix delay in setlocalversion on readonly source

Do not update index on read only media.
Idea published by Christian Kujau <lists@nerdbynature.de>.

Cc: Nico Schottelius <nico@ikn.schottelius.org>
Cc: Christian Kujau <lists@nerdbynature.de>
14 years agoREADME: fix misleading pointer to the defconf directory
Patrick Ringl [Fri, 12 Jun 2009 11:58:36 +0000 (13:58 +0200)] 
README: fix misleading pointer to the defconf directory

Signed-off-by: Patrick Ringl <patrick_@freenet.de>
Cc: Arnd Bergmann <arnd@arndb.de>
14 years agovmlinux.lds.h update
Sam Ravnborg [Sun, 14 Jun 2009 20:10:41 +0000 (22:10 +0200)] 
vmlinux.lds.h update

Updated after review by Tim Abbott.
- Use HEAD_TEXT_SECTION
- Drop use of section-names.h and delete file
- Introduce EXIT_CALL

Deleting section-names.h required a few simple
updates of init.h

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Tim Abbott <tabbott@ksplice.com>
14 years agoBluetooth: Fix issue with uninitialized nsh.type in DTL-1 driver
Marcel Holtmann [Sun, 14 Jun 2009 13:24:44 +0000 (15:24 +0200)] 
Bluetooth: Fix issue with uninitialized nsh.type in DTL-1 driver

The current build shows a warning with the DTL-1 driver:

  CC [M]  drivers/bluetooth/dtl1_cs.o
drivers/bluetooth/dtl1_cs.c: In function ‘dtl1_hci_send_frame’:
drivers/bluetooth/dtl1_cs.c:396: warning: ‘nsh.type’ may be used uninitialized in this function

Fix this by adding a proper error for unknown packet types.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
14 years agoBluetooth: Fix Kconfig issue with RFKILL integration
Marcel Holtmann [Sun, 14 Jun 2009 13:21:25 +0000 (15:21 +0200)] 
Bluetooth: Fix Kconfig issue with RFKILL integration

Since the re-write of the RFKILL subsystem it is no longer good to just
select RFKILL, but it is important to add a proper depends on rule.

Based on a report by Alexander Beregalov <a.beregalov@gmail.com>

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
14 years ago[ARM] 5545/2: add flush_kernel_dcache_page() for ARM
Nicolas Pitre [Fri, 12 Jun 2009 02:09:29 +0000 (03:09 +0100)] 
[ARM] 5545/2: add flush_kernel_dcache_page() for ARM

Without this, the default implementation is a no op which is completely
wrong with a VIVT cache, and usage of sg_copy_buffer() produces
unpredictable results.

Tested-by: Sebastian Andrzej Siewior <bigeasy@breakpoint.cc>
CC: stable@kernel.org
Signed-off-by: Nicolas Pitre <nico@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoPIM-SM: namespace changes
Tom Goff [Sun, 14 Jun 2009 10:16:13 +0000 (03:16 -0700)] 
PIM-SM: namespace changes

IPv4:
  - make PIM register vifs netns local
  - set the netns when a PIM register vif is created
  - make PIM available in all network namespaces (if CONFIG_IP_PIMSM_V2)
    by adding the protocol handler when multicast routing is initialized

IPv6:
  - make PIM register vifs netns local
  - make PIM available in all network namespaces (if CONFIG_IPV6_PIMSM_V2)
    by adding the protocol handler when multicast routing is initialized

Signed-off-by: Tom Goff <thomas.goff@boeing.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMAINTAINERS: EB110ATX is not ebsa110
Russell King [Sun, 14 Jun 2009 10:09:29 +0000 (11:09 +0100)] 
MAINTAINERS: EB110ATX is not ebsa110

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoMerge branch 'u300' into devel
Russell King [Sun, 14 Jun 2009 10:01:44 +0000 (11:01 +0100)] 
Merge branch 'u300' into devel

Conflicts:
arch/arm/Makefile
Updates:
arch/arm/mach-u300/core.c
arch/arm/mach-u300/timer.c

14 years agoMerge branch 'stmp' into devel
Russell King [Sun, 14 Jun 2009 10:01:05 +0000 (11:01 +0100)] 
Merge branch 'stmp' into devel

14 years agoMerge branch 'for-rmk' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa...
Russell King [Sun, 14 Jun 2009 10:00:16 +0000 (11:00 +0100)] 
Merge branch 'for-rmk' of git://git./linux/kernel/git/ycmiao/pxa-linux-2.6 into devel

14 years agoMerge branch 'copy_user' of git://git.marvell.com/orion into devel
Russell King [Sun, 14 Jun 2009 09:59:32 +0000 (10:59 +0100)] 
Merge branch 'copy_user' of git://git.marvell.com/orion into devel

14 years agoipv4: update ARPD help text
Timo Teräs [Thu, 11 Jun 2009 19:38:02 +0000 (19:38 +0000)] 
ipv4: update ARPD help text

Removed the statements about ARP cache size as this config option does
not affect it. The cache size is controlled by neigh_table gc thresholds.

Remove also expiremental and obsolete markings as the API originally
intended for arp caching is useful for implementing ARP-like protocols
(e.g. NHRP) in user space and has been there for a long enough time.

Signed-off-by: Timo Teras <timo.teras@iki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: use a deferred timer in rt_check_expire
Eric Dumazet [Thu, 11 Jun 2009 20:10:07 +0000 (20:10 +0000)] 
net: use a deferred timer in rt_check_expire

For the sake of power saver lovers, use a deferrable timer to fire
rt_check_expire()

As some big routers cache equilibrium depends on garbage collection
done in time, we take into account elapsed time between two
rt_check_expire() invocations to adjust the amount of slots we have to
check.

Based on an initial idea and patch from Tero Kristo

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Tero Kristo <tero.kristo@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoieee802154: fix kconfig bool/tristate muckup
Randy Dunlap [Fri, 12 Jun 2009 12:59:20 +0000 (12:59 +0000)] 
ieee802154: fix kconfig bool/tristate muckup

menuconfig IEEE802154_DRIVERS is a bool that depends on tristate IEEE802154.
If the IEEE802154 symbol is 'm', the bool becomes 'y'.
This allows tristate symbols under IEEE802154_DRIVERS to be configured as
'y' and cause build problems.
Changing the menuconfig bool to a tristate fixes this.

drivers/built-in.o: In function `fake_scan_req':
fakehard.c:(.text+0x46d625): undefined reference to `ieee802154_nl_scan_confirm'
drivers/built-in.o: In function `fake_disassoc_req':
fakehard.c:(.text+0x46d66f): undefined reference to `ieee802154_nl_disassoc_confirm'
drivers/built-in.o: In function `fake_assoc_req':
fakehard.c:(.text+0x46d6be): undefined reference to `ieee802154_nl_assoc_confirm'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Sergey Lapin <slapin@ossfans.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobonding: initialization rework
Stephen Hemminger [Fri, 12 Jun 2009 19:02:52 +0000 (19:02 +0000)] 
bonding: initialization rework

Need to rework how bonding devices are initialized to make it more
amenable to creating bonding devices via netlink.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobonding: use is_zero_ether_addr
Stephen Hemminger [Fri, 12 Jun 2009 19:02:51 +0000 (19:02 +0000)] 
bonding: use is_zero_ether_addr

Remove bogus non-portable possibly unaligned way of testing
for zero addres..

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobonding: network device names are case sensative
Stephen Hemminger [Fri, 12 Jun 2009 19:02:50 +0000 (19:02 +0000)] 
bonding: network device names are case sensative

The bonding device acts unlike all other Linux network device functions
in that it ignores case of device names. The developer must have come
from windows!

Cleanup the management of names and use standard routines where possible.
Flag places where bonding device still doesn't work right with network
namespaces.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobonding: elminate bad refcount code
Stephen Hemminger [Fri, 12 Jun 2009 19:02:49 +0000 (19:02 +0000)] 
bonding: elminate bad refcount code

The "expected_refcount" stuff in bonding sysfs module is a mistake.
Sysfs does proper refcounting, and it is okay to remove a bond device
that has some user process holding the file open.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobonding: fix style issues
Stephen Hemminger [Fri, 12 Jun 2009 19:02:48 +0000 (19:02 +0000)] 
bonding: fix style issues

Resolve some of the complaints from checkpatch, and remove "magic emacs format"
comments, and useless MODULE_SUPPORTED_DEVICE(). But should not
change actual code.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobonding: fix destructor
Stephen Hemminger [Fri, 12 Jun 2009 19:02:47 +0000 (19:02 +0000)] 
bonding: fix destructor

It is not safe to use a network device destructor that is a function in
the module, since it can be called after module is unloaded if sysfs
handle is open.

When eventually using netlink, the device cleanup code needs to be done
via uninit function.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobonding: remove bonding read/write semaphore
Stephen Hemminger [Fri, 12 Jun 2009 19:02:46 +0000 (19:02 +0000)] 
bonding: remove bonding read/write semaphore

The whole read/write semaphore locking can be removed. It doesn't add any
protection that isn't already done by using the RTNL mutex properly.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobonding: initialize before registration
Stephen Hemminger [Fri, 12 Jun 2009 19:02:45 +0000 (19:02 +0000)] 
bonding: initialize before registration

Avoid a unnecessary carrier state transistion that happens when device
is registered.
Lockdep works better if initialization is done before registration as well.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobonding: bond_create always called with default parameters
Stephen Hemminger [Fri, 12 Jun 2009 19:02:44 +0000 (19:02 +0000)] 
bonding: bond_create always called with default parameters

bond_create() is always called with same parameters so move the argument
down.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoheaders_check fix: mn10300, setup.h
Jaswinder Singh Rajput [Sun, 14 Jun 2009 06:21:12 +0000 (11:51 +0530)] 
headers_check fix: mn10300, setup.h

fix the following 'make headers_check' warnings:

  usr/include/asm-mn10300/setup.h:14: extern's make no sense in userspace
  usr/include/asm-mn10300/setup.h:15: extern's make no sense in userspace

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
14 years agoheaders_check fix: mn10300, ptrace.h
Jaswinder Singh Rajput [Sun, 14 Jun 2009 06:19:41 +0000 (11:49 +0530)] 
headers_check fix: mn10300, ptrace.h

fix the following 'make headers_check' warning:

  usr/include/asm-mn10300/ptrace.h:80: extern's make no sense in userspace

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
14 years agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/irda-2.6
David S. Miller [Sun, 14 Jun 2009 00:08:11 +0000 (17:08 -0700)] 
Merge branch 'for-next' of git://git./linux/kernel/git/sameo/irda-2.6

14 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-next-2.6
David S. Miller [Sat, 13 Jun 2009 23:43:28 +0000 (16:43 -0700)] 
Merge branch 'master' of git://git./linux/kernel/git/kaber/nf-next-2.6

14 years agoIB/mthca: Don't double-free IRQs when falling back from MSI-X to INTx
Roland Dreier [Sat, 13 Jun 2009 22:14:09 +0000 (15:14 -0700)] 
IB/mthca: Don't double-free IRQs when falling back from MSI-X to INTx

When both MSI-X and legacy INTx fail to generate an interrupt, the
driver frees the MSI-X interrupts twice.  Fix this by clearing the
have_irq flag for the MSI-X interrupts when they are freed the first
time.

Reported-by: Yinghai Lu <yhlu.kernel@gmail.com>
Tested-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
14 years agoatmel-mci: add MCI2 register definitions
Nicolas Ferre [Fri, 12 Jun 2009 15:58:30 +0000 (17:58 +0200)] 
atmel-mci: add MCI2 register definitions

New revision of Atmel MCI interface adds new features. This is a update of
register definition in header file. This new MCI IP is called MCI2.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Signed-off-by: Pierre Ossman <pierre@ossman.eu>
14 years agoatmel-mci: Integrate AT91 specific definition in header file
Nicolas Ferre [Fri, 12 Jun 2009 15:58:29 +0000 (17:58 +0200)] 
atmel-mci: Integrate AT91 specific definition in header file

The MCI IP is shared among AVR32 and AT91 SOCs.
AT91 has specific bit definitions in the user interface of MCI SD/MMC IP.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Signed-off-by: Pierre Ossman <pierre@ossman.eu>
14 years agotmio_mmc: allow compilation for ASIC3
Philipp Zabel [Thu, 4 Jun 2009 18:12:37 +0000 (20:12 +0200)] 
tmio_mmc: allow compilation for ASIC3

Now tmio_mmc is able to drive the MMC/SD cell in ASIC3.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Acked-by: Ian Molton <spyro@f2s.com>
Signed-off-by: Pierre Ossman <pierre@ossman.eu>
14 years agommc_block: do not DMA to stack
Ben Dooks [Mon, 8 Jun 2009 22:33:57 +0000 (23:33 +0100)] 
mmc_block: do not DMA to stack

In the write recovery routine, the data to get from the card
is allocated from the stack. The DMA mapping documentation says
explicitly stack memory is not mappable by any of the DMA calls.

Change to using kmalloc() to allocate the memory for the result
from the card and then free it once we've finished with the
transaction.

[ Changed to GFP_KERNEL allocation - Pierre Ossman ]

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Pierre Ossman <pierre@ossman.eu>
14 years agosdhci: Print ADMA status and pointer on debug
Ben Dooks [Mon, 8 Jun 2009 22:33:52 +0000 (23:33 +0100)] 
sdhci: Print ADMA status and pointer on debug

If using ADMA, then we should print the ADMA error
and current pointer in sdhci_dumpregs() when any
debug is requested.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Pierre Ossman <pierre@ossman.eu>
14 years agotmio_mmc: fix clock setup
Ian Molton [Fri, 12 Jun 2009 20:53:05 +0000 (21:53 +0100)] 
tmio_mmc: fix clock setup

This patch fixes the clock setup in tmio_mmc.

  * Incorrect divider setting
  * Cruft written to the clock registers (seemingly harmless but Not
Good (tm))

It also eliminates some unnecessary ifs and tidies the loop syntax.

Thanks to Philipp Zabel who discovered the divider issue, commenting

   "Except for the SDCLK = HCLK (divider bypassed) case, the clock
    setting resulted in double the requested frequency.
    The smallest possible frequency (f_max/512) is configured with
    a divider setting 0x80, not 0x40."

Signed-off-by: Ian Molton <ian@mnementh.co.uk>
Signed-off-by: Pierre Ossman <pierre@ossman.eu>
14 years agotmio_mmc: map SD control registers after enabling the MFD cell
Philipp Zabel [Thu, 4 Jun 2009 18:12:35 +0000 (20:12 +0200)] 
tmio_mmc: map SD control registers after enabling the MFD cell

ASIC3 can disable the memory, so we need to wait for mfd_cell->enable
to enable the memory before we can map the SD control registers.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Acked-by: Ian Molton <ian@mnementh.co.uk>
Signed-off-by: Pierre Ossman <pierre@ossman.eu>
14 years agotmio_mmc: correct probe return value for num_resources != 3
Philipp Zabel [Thu, 4 Jun 2009 18:12:34 +0000 (20:12 +0200)] 
tmio_mmc: correct probe return value for num_resources != 3

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Acked-by: Ian Molton <ian@mnementh.co.uk>
Signed-off-by: Pierre Ossman <pierre@ossman.eu>
14 years agotmio_mmc: don't use set_irq_type
Philipp Zabel [Thu, 4 Jun 2009 18:12:33 +0000 (20:12 +0200)] 
tmio_mmc: don't use set_irq_type

Use an IRQF_TRIGGER_ flag in request_irq instead.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Acked-by: Ian Molton <ian@mnementh.co.uk>
Signed-off-by: Pierre Ossman <pierre@ossman.eu>
14 years agotmio_mmc: add bus_shift support
Philipp Zabel [Thu, 4 Jun 2009 18:12:32 +0000 (20:12 +0200)] 
tmio_mmc: add bus_shift support

Some ASIC3 devices in the wild are connected with the address bus shifted
by one line, so that its 16-bit registers appear 32-bit aligned in host
memory space.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Acked-by: Ian Molton <ian@mnementh.co.uk>
Signed-off-by: Pierre Ossman <pierre@ossman.eu>
14 years agoMFD,mmc: tmio_mmc: make HCLK configurable
Philipp Zabel [Thu, 4 Jun 2009 18:12:31 +0000 (20:12 +0200)] 
MFD,mmc: tmio_mmc: make HCLK configurable

The Toshiba parts all have a 24 MHz HCLK, but HTC ASIC3 has a 24.576 MHz HCLK
and AMD Imageon w228x's HCLK is 80 MHz. With this patch, the MFD driver
provides the HCLK frequency to tmio_mmc via mfd_cell->driver_data.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Acked-by: Ian Molton <ian@mnementh.co.uk>
Acked-by: Samuel Ortiz <sameo@openedhand.com>
Signed-off-by: Pierre Ossman <pierre@ossman.eu>
14 years agommc_spi: don't use EINVAL for possible transmission errors
Wolfgang Muees [Tue, 26 May 2009 07:56:19 +0000 (08:56 +0100)] 
mmc_spi: don't use EINVAL for possible transmission errors

This patch changes the reported error code for the responses
to a command from EINVAL to EFAULT/ENOSYS, as EINVAL is reserved
for non-recoverable host errors, and the responses from
the SD/MMC card may be because of recoverable transmission
errors in the command or in the response. Response codes
in SPI mode are NOT protected by a checksum, so don't trust them.

Signed-off-by: Wolfgang Muees <wolfgang.mues@auerswald.de>
Acked-by: Matt Fleming <matt@console-pimps.org>
Signed-off-by: Pierre Ossman <pierre@ossman.eu>
14 years agocb710: more cleanup for the DEBUG case.
Michał Mirosław [Sat, 13 Jun 2009 10:37:59 +0000 (12:37 +0200)] 
cb710: more cleanup for the DEBUG case.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Pierre Ossman <pierre@ossman.eu>
14 years agosdhci: platform driver for SDHCI
Richard Röjfors [Thu, 4 Jun 2009 11:57:29 +0000 (13:57 +0200)] 
sdhci: platform driver for SDHCI

Added a platform driver which uses the SDHCI core.

Signed-off-by: Richard Röjfors <richard.rojfors.ext@mocean-labs.com>
Signed-off-by: Pierre Ossman <pierre@ossman.eu>
14 years agomxcmmc: remove frequency workaround
Pierre Ossman [Tue, 9 Jun 2009 18:17:25 +0000 (20:17 +0200)] 
mxcmmc: remove frequency workaround

The MMC core has now been fixed to not send silly frequencies to the
drivers which means we can remove this workaround.

Signed-off-by: Pierre Ossman <pierre@ossman.eu>
14 years agocb710: handle DEBUG define in Makefile
Pierre Ossman [Thu, 4 Jun 2009 06:00:40 +0000 (08:00 +0200)] 
cb710: handle DEBUG define in Makefile

Signed-off-by: Pierre Ossman <pierre@ossman.eu>
14 years agocb710: add missing parenthesis
Pierre Ossman [Thu, 4 Jun 2009 05:58:57 +0000 (07:58 +0200)] 
cb710: add missing parenthesis

Signed-off-by: Pierre Ossman <pierre@ossman.eu>
14 years agocb710: fix printk format string
Pierre Ossman [Thu, 4 Jun 2009 05:53:38 +0000 (07:53 +0200)] 
cb710: fix printk format string

Signed-off-by: Pierre Ossman <pierre@ossman.eu>
14 years agommc: Driver for CB710/720 memory card reader (MMC part)
Michał Mirosław [Fri, 22 May 2009 18:33:59 +0000 (20:33 +0200)] 
mmc: Driver for CB710/720 memory card reader (MMC part)

The code is divided in two parts. There is a virtual 'bus' driver
that handles PCI device and registers three new devices one per card
reader type. The other driver handles SD/MMC part of the reader.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Pierre Ossman <pierre@ossman.eu>
14 years agopxamci: add regulator support.
Daniel Ribeiro [Thu, 21 May 2009 11:54:18 +0000 (08:54 -0300)] 
pxamci: add regulator support.

Changes pxamci.c to use the regulator subsystem. Uses the regulator case
CONFIG_REGULATOR is defined and a matching is regulator is provided, or
falls back to pdata->setpower otherwise. A warning is displayed case
both a valid regulator and pdata is set, and the regulator is used.

Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com>
Acked-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Pierre Ossman <pierre@ossman.eu>
14 years agoMMC core: limit minimum initialization frequency to 400kHz
Sascha Hauer [Thu, 9 Apr 2009 06:32:02 +0000 (08:32 +0200)] 
MMC core: limit minimum initialization frequency to 400kHz

Some controllers allow a much lower frequency than 400kHz.
Keep the minimum frequency within sensible limits.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
14 years agosdhci: avoid changing voltage needlessly
Pierre Ossman [Sun, 3 May 2009 18:45:03 +0000 (20:45 +0200)] 
sdhci: avoid changing voltage needlessly

Because of granularity issues, sometimes we told the hardware to change
to the voltage we were already at. Rework the logic so this doesn't
happen.

Signed-off-by: Pierre Ossman <pierre@ossman.eu>
14 years agommc/omap: make mmci-omap using platform_driver_probe
Uwe Kleine-König [Thu, 2 Apr 2009 17:47:41 +0000 (19:47 +0200)] 
mmc/omap: make mmci-omap using platform_driver_probe

A pointer to mmc_omap_probe which lives in .init.text is passed to the
core via platform_driver_register and so the kernel might oops if probe
is called after the init code is discarded.

As requested by David Brownell platform_driver_probe is used instead of
moving the probe function to .devinit.text.  This saves some memory, but
might have the downside that a device being registered after the call to
mmc_omap_init but before the init sections are discarded will not be
bound anymore to the driver.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Pierre Ossman <pierre@ossman.eu>
14 years agommc_spi: speedup for slow cards, less wear-out
Wolfgang Muees [Wed, 8 Apr 2009 09:14:07 +0000 (10:14 +0100)] 
mmc_spi: speedup for slow cards, less wear-out

Speedup for slow cards by transfering more data at once.
This patch also reduces the amount of wear-out of the flash
blocks because fewer partial blocks are written.

Signed-off-by: Wolfgang Muees <wolfgang.mues@auerswald.de>
Signed-off-by: Pierre Ossman <pierre@ossman.eu>
14 years agommc: mmc_rescan detects card change in one run
Jorg Schummer [Tue, 31 Mar 2009 14:51:21 +0000 (17:51 +0300)] 
mmc: mmc_rescan detects card change in one run

With this patch, mmc_rescan can detect the removal of an mmc card and
the insertion of (possibly another) card in the same run. This means
that a card change can be detected without having to call
mmc_detect_change multiple times.

This change generalises the core such that it can be easily used by
hosts which provide a mechanism to detect only the presence of a card
reader cover, which has to be taken off in order to insert a card. Other
hosts ("card detect" or "MMC_CAP_NEEDS_POLL") each receive an event when
a card is removed and when a card is inserted, so it is sufficient for
them if mmc_rescan handles only one event at a time. "Cover detect"
hosts, however, only receive events about the cover status. This means
that between 2 subsequent events, both a card removal and a card
insertion can occur. In this case, the pre-patch version of mmc_rescan
would only detect the removal of the previous card but not the insertion
of the new card.

Signed-off-by: Jorg Schummer <ext-jorg.2.schummer@nokia.com>
Signed-off-by: Pierre Ossman <pierre@ossman.eu>
14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
Linus Torvalds [Sat, 13 Jun 2009 20:22:00 +0000 (13:22 -0700)] 
Merge git://git./linux/kernel/git/jejb/scsi-rc-fixes-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
  [SCSI] cnic: fix error: implicit declaration of function ‘__symbol_get’
  [SCSI] cnic: fix undefined reference to `ip6_route_output'

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen/avr32-2.6
Linus Torvalds [Sat, 13 Jun 2009 20:18:32 +0000 (13:18 -0700)] 
Merge git://git./linux/kernel/git/hskinnemoen/avr32-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen/avr32-2.6:
  avr32: Fix oops on unaligned user access
  avr32: Add support for Mediama RMTx add-on board for ATNGW100
  avr32: Change Atmel ATNGW100 config to add choice of add-on board
  Fix MIMC200 board LCD init
  avr32: Fix clash in ATMEL_USART_ flags
  avr32: remove obsolete hw_interrupt_type
  avr32: Solves problem with inverted MCI detect pin on Merisc board
  atmel-mci: Add support for inverted detect pin

14 years agoFRV: Fix interaction with new generic header stuff
David Howells [Sat, 13 Jun 2009 12:23:54 +0000 (13:23 +0100)] 
FRV: Fix interaction with new generic header stuff

Fix interaction with new generic header stuff as added by:

commit 6103ec56c65c33774c7c38652c8204120c3c7519
Author: Arnd Bergmann <arnd@arndb.de>
Date:   Wed May 13 22:56:27 2009 +0000

    asm-generic: add generic ABI headers

The problem is that asm/signal.h has been made to include asm-generic/signal.h,
but the redundant stuff from asm/signal.h has not been discarded, leading to
multiple redefinitions.

Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMerge branch 'next-i2c' of git://aeryn.fluff.org.uk/bjdooks/linux
Linus Torvalds [Sat, 13 Jun 2009 20:15:59 +0000 (13:15 -0700)] 
Merge branch 'next-i2c' of git://aeryn.fluff.org.uk/bjdooks/linux

* 'next-i2c' of git://aeryn.fluff.org.uk/bjdooks/linux:
  i2c-ocores: Can add I2C devices to the bus
  i2c-s3c2410: move to using platform idtable to match devices
  i2c: OMAP3: Better noise suppression for fast/standard modes
  i2c: OMAP2/3: Fix scll/sclh calculations
  i2c: Blackfin TWI: implement I2C_FUNC_SMBUS_I2C_BLOCK functionality
  i2c: Blackfin TWI: fix transfer errors with repeat start
  i2c: Blackfin TWI: fix REPEAT START mode doesn't repeat
  i2c: Blackfin TWI: make sure we don't end up with a CLKDIV=0

14 years agoMerge branch 'x86-mce-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 13 Jun 2009 20:14:51 +0000 (13:14 -0700)] 
Merge branch 'x86-mce-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'x86-mce-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (80 commits)
  x86, mce: Add boot options for corrected errors
  x86, mce: Fix mce printing
  x86, mce: fix for mce counters
  x86, mce: support action-optional machine checks
  x86, mce: define MCE_VECTOR
  x86, mce: rename mce_notify_user to mce_notify_irq
  x86: fix panic with interrupts off (needed for MCE)
  x86, mce: export MCE severities coverage via debugfs
  x86, mce: implement new status bits
  x86, mce: print header/footer only once for multiple MCEs
  x86, mce: default to panic timeout for machine checks
  x86, mce: improve mce_get_rip
  x86, mce: make non Monarch panic message "Fatal machine check" too
  x86, mce: switch x86 machine check handler to Monarch election.
  x86, mce: implement panic synchronization
  x86, mce: implement bootstrapping for machine check wakeups
  x86, mce: check early in exception handler if panic is needed
  x86, mce: add table driven machine check grading
  x86, mce: remove TSC print heuristic
  x86, mce: log corrected errors when panicing
  ...

14 years agoMerge branch 'for-linus' of git://oss.sgi.com/xfs/xfs
Linus Torvalds [Sat, 13 Jun 2009 20:08:54 +0000 (13:08 -0700)] 
Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs

* 'for-linus' of git://oss.sgi.com/xfs/xfs: (23 commits)
  xfs: fix small mismerge in xfs_vn_mknod
  xfs: fix warnings with CONFIG_XFS_QUOTA disabled
  xfs: fix freeing memory in xfs_getbmap()
  xfs: use generic Posix ACL code
  xfs: remove SYNC_BDFLUSH
  xfs: remove SYNC_IOWAIT
  xfs: split xfs_sync_inodes
  xfs: use generic inode iterator in xfs_qm_dqrele_all_inodes
  xfs: introduce a per-ag inode iterator
  xfs: remove unused parameter from xfs_reclaim_inodes
  xfs: factor out inode validation for sync
  xfs: split inode flushing from xfs_sync_inodes_ag
  xfs: split inode data writeback from xfs_sync_inodes_ag
  xfs: kill xfs_qmops
  xfs: validate quota log items during log recovery
  xfs: update max log size
  xfs: prevent deadlock in xfs_qm_shake()
  xfs: fix overflow in xfs_growfs_data_private
  xfs: fix double unlock in xfs_swap_extents()
  xfs: fix getbmap vs mmap deadlock
  ...

14 years agoMerge branch 'docs-next' of git://git.lwn.net/linux-2.6
Linus Torvalds [Sat, 13 Jun 2009 20:08:34 +0000 (13:08 -0700)] 
Merge branch 'docs-next' of git://git.lwn.net/linux-2.6

* 'docs-next' of git://git.lwn.net/linux-2.6:
  Document the debugfs API
  Documentation: Add "how to write a good patch summary" to SubmittingPatches
  SubmittingPatches: fix typo
  docs: Encourage better changelogs in the development process document
  Document Reported-by in SubmittingPatches

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Linus Torvalds [Sat, 13 Jun 2009 20:08:01 +0000 (13:08 -0700)] 
Merge git://git./linux/kernel/git/herbert/crypto-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (35 commits)
  hwrng: timeriomem - Fix potential oops (request_mem_region/__devinit)
  crypto: api - Use formatting of module name
  crypto: testmgr - Allow hash test vectors longer than a page
  crypto: testmgr - Check all test vector lengths
  crypto: hifn_795x - fix __dev{init,exit} markings
  crypto: tcrypt - Do not exit on success in fips mode
  crypto: compress - Return produced bytes in crypto_{,de}compress_{update,final}
  hwrng: via_rng - Support VIA Nano hardware RNG on X86_64 builds
  hwrng: via_rng - Support VIA Nano hardware RNG
  hwrng: via_rng - The VIA Hardware RNG driver is for the CPU, not Chipset
  crypto: testmgr - Skip algs not flagged fips_allowed in fips mode
  crypto: testmgr - Mark algs allowed in fips mode
  crypto: testmgr - Add ctr(aes) test vectors
  crypto: testmgr - Dynamically allocate xbuf and axbuf
  crypto: testmgr - Print self-test pass notices in fips mode
  crypto: testmgr - Catch base cipher self-test failures in fips mode
  crypto: testmgr - Add ansi_cprng test vectors
  crypto: testmgr - Add infrastructure for ansi_cprng self-tests
  crypto: testmgr - Add self-tests for rfc4309(ccm(aes))
  crypto: testmgr - Handle AEAD test vectors expected to fail verification
  ...

14 years ago[SCSI] cnic: fix error: implicit declaration of function ‘__symbol_get’
Ingo Molnar [Sat, 13 Jun 2009 06:29:33 +0000 (08:29 +0200)] 
[SCSI] cnic: fix error: implicit declaration of function ‘__symbol_get’

 drivers/net/cnic.c: In function ‘init_bnx2_cnic’:
 drivers/net/cnic.c:2520: error: implicit declaration of function ‘__symbol_get’
 drivers/net/cnic.c:2520: warning: assignment makes pointer from integer without a cast
 make[1]: *** [drivers/net/cnic.o] Error 1
 make: *** [drivers/net/cnic.o] Error 2

Caused by not including linux/module.h

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
14 years ago[SCSI] cnic: fix undefined reference to `ip6_route_output'
Randy Dunlap [Fri, 12 Jun 2009 18:43:48 +0000 (11:43 -0700)] 
[SCSI] cnic: fix undefined reference to `ip6_route_output'

Fix cnic build for case of CONFIG_INET=n.
Fix cnic build for case of CONFIG_IPV6=m and CONFIG_CNIC=y.

Fixes these build errors:

cnic.c:(.text+0x236a1d): undefined reference to `ip_route_output_key'
cnic.c:(.text+0x15a8e8): undefined reference to `ip6_route_output'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
14 years agoavr32: Fix oops on unaligned user access
Haavard Skinnemoen [Wed, 3 Jun 2009 12:29:16 +0000 (14:29 +0200)] 
avr32: Fix oops on unaligned user access

The unaligned address exception handler (and others) does not scan the
fixup tables before oopsing. This is bad because it means passing a
badly aligned pointer from user space might crash the kernel.

Fix this by scanning the fixup tables in _exception(). This should
resolve the issue for unaligned addresses as well as other less common
exceptions that might be happening during a userspace access. The page
fault handler already does fixup processing.

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
14 years agoMerge branch 'avr32-arch' of git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoe...
Haavard Skinnemoen [Sat, 13 Jun 2009 13:34:22 +0000 (15:34 +0200)] 
Merge branch 'avr32-arch' of git://git./linux/kernel/git/hskinnemoen/avr32-2.6

14 years agox_tables: Convert printk to pr_err
Joe Perches [Sat, 13 Jun 2009 10:32:39 +0000 (12:32 +0200)] 
x_tables: Convert printk to pr_err

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
14 years agonetfilter: conntrack: optional reliable conntrack event delivery
Pablo Neira Ayuso [Sat, 13 Jun 2009 10:30:52 +0000 (12:30 +0200)] 
netfilter: conntrack: optional reliable conntrack event delivery

This patch improves ctnetlink event reliability if one broadcast
listener has set the NETLINK_BROADCAST_ERROR socket option.

The logic is the following: if an event delivery fails, we keep
the undelivered events in the missed event cache. Once the next
packet arrives, we add the new events (if any) to the missed
events in the cache and we try a new delivery, and so on. Thus,
if ctnetlink fails to deliver an event, we try to deliver them
once we see a new packet. Therefore, we may lose state
transitions but the userspace process gets in sync at some point.

At worst case, if no events were delivered to userspace, we make
sure that destroy events are successfully delivered. Basically,
if ctnetlink fails to deliver the destroy event, we remove the
conntrack entry from the hashes and we insert them in the dying
list, which contains inactive entries. Then, the conntrack timer
is added with an extra grace timeout of random32() % 15 seconds
to trigger the event again (this grace timeout is tunable via
/proc). The use of a limited random timeout value allows
distributing the "destroy" resends, thus, avoiding accumulating
lots "destroy" events at the same time. Event delivery may
re-order but we can identify them by means of the tuple plus
the conntrack ID.

The maximum number of conntrack entries (active or inactive) is
still handled by nf_conntrack_max. Thus, we may start dropping
packets at some point if we accumulate a lot of inactive conntrack
entries that did not successfully report the destroy event to
userspace.

During my stress tests consisting of setting a very small buffer
of 2048 bytes for conntrackd and the NETLINK_BROADCAST_ERROR socket
flag, and generating lots of very small connections, I noticed
very few destroy entries on the fly waiting to be resend.

A simple way to test this patch consist of creating a lot of
entries, set a very small Netlink buffer in conntrackd (+ a patch
which is not in the git tree to set the BROADCAST_ERROR flag)
and invoke `conntrack -F'.

For expectations, no changes are introduced in this patch.
Currently, event delivery is only done for new expectations (no
events from expectation expiration, removal and confirmation).
In that case, they need a per-expectation event cache to implement
the same idea that is exposed in this patch.

This patch can be useful to provide reliable flow-accouting. We
still have to add a new conntrack extension to store the creation
and destroy time.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
14 years agolist_nulls: add hlist_nulls_add_head and hlist_nulls_del
Pablo Neira Ayuso [Sat, 13 Jun 2009 10:28:57 +0000 (12:28 +0200)] 
list_nulls: add hlist_nulls_add_head and hlist_nulls_del

This patch adds the hlist_nulls_add_head() function which is
based on hlist_nulls_add_head_rcu() but without the use of
rcu_assign_pointer(). It also adds hlist_nulls_del which is
exactly the same like hlist_nulls_del_rcu().

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
14 years agonetfilter: conntrack: move helper destruction to nf_ct_helper_destroy()
Pablo Neira Ayuso [Sat, 13 Jun 2009 10:28:22 +0000 (12:28 +0200)] 
netfilter: conntrack: move helper destruction to nf_ct_helper_destroy()

This patch moves the helper destruction to a function that lives
in nf_conntrack_helper.c. This new function is used in the patch
to add ctnetlink reliable event delivery.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
14 years agonetfilter: conntrack: move event caching to conntrack extension infrastructure
Pablo Neira Ayuso [Sat, 13 Jun 2009 10:26:29 +0000 (12:26 +0200)] 
netfilter: conntrack: move event caching to conntrack extension infrastructure

This patch reworks the per-cpu event caching to use the conntrack
extension infrastructure.

The main drawback is that we consume more memory per conntrack
if event delivery is enabled. This patch is required by the
reliable event delivery that follows to this patch.

BTW, this patch allows you to enable/disable event delivery via
/proc/sys/net/netfilter/nf_conntrack_events in runtime, although
you can still disable event caching as compilation option.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
14 years agonetfilter: nf_conntrack: use mod_timer_pending() for conntrack refresh
Patrick McHardy [Sat, 13 Jun 2009 10:21:49 +0000 (12:21 +0200)] 
netfilter: nf_conntrack: use mod_timer_pending() for conntrack refresh

Use mod_timer_pending() instead of atomic sequence of del_timer()/
add_timer(). mod_timer_pending() does not rearm an inactive timer,
so we don't need the conntrack lock anymore to make sure we don't
accidentally rearm a timer of a conntrack which is in the process
of being destroyed.

With this change, we don't need to take the global lock anymore at all,
counter updates can be performed under the per-conntrack lock.

Signed-off-by: Patrick McHardy <kaber@trash.net>
14 years agonetfilter: nf_log: fix sleeping function called from invalid context
Patrick McHardy [Sat, 13 Jun 2009 10:21:10 +0000 (12:21 +0200)] 
netfilter: nf_log: fix sleeping function called from invalid context

Fix regression introduced by 17625274 "netfilter: sysctl support of
logger choice":

BUG: sleeping function called from invalid context at /mnt/s390test/linux-2.6-tip/arch/s390/include/asm/uaccess.h:234
in_atomic(): 1, irqs_disabled(): 0, pid: 3245, name: sysctl
CPU: 1 Not tainted 2.6.30-rc8-tipjun10-02053-g39ae214 #1
Process sysctl (pid: 3245, task: 000000007f675da0, ksp: 000000007eb17cf0)
0000000000000000 000000007eb17be8 0000000000000002 0000000000000000
       000000007eb17c88 000000007eb17c00 000000007eb17c00 0000000000048156
       00000000003e2de8 000000007f676118 000000007eb17f10 0000000000000000
       0000000000000000 000000007eb17be8 000000000000000d 000000007eb17c58
       00000000003e2050 000000000001635c 000000007eb17be8 000000007eb17c30
Call Trace:
(Ý<00000000000162e6>¨ show_trace+0x13a/0x148)
 Ý<00000000000349ea>¨ __might_sleep+0x13a/0x164
 Ý<0000000000050300>¨ proc_dostring+0x134/0x22c
 Ý<0000000000312b70>¨ nf_log_proc_dostring+0xfc/0x188
 Ý<0000000000136f5e>¨ proc_sys_call_handler+0xf6/0x118
 Ý<0000000000136fda>¨ proc_sys_read+0x26/0x34
 Ý<00000000000d6e9c>¨ vfs_read+0xac/0x158
 Ý<00000000000d703e>¨ SyS_read+0x56/0x88
 Ý<0000000000027f42>¨ sysc_noemu+0x10/0x16

Use the nf_log_mutex instead of RCU to fix this.

Reported-and-tested-by: Maran Pakkirisamy <maranpsamy@in.ibm.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
14 years agoclocksource: prevent selection of low resolution clocksourse also for nohz=on
Thomas Gleixner [Fri, 12 Jun 2009 09:29:27 +0000 (11:29 +0200)] 
clocksource: prevent selection of low resolution clocksourse also for nohz=on

commit 3f68535adad (clocksource: sanity check sysfs clocksource
changes) prevents selection of non high resolution capable
clocksources when high resolution mode is active, but did not take
into account that the same rules apply for highres=off nohz=on.

Check the tick device mode instead of hrtimer_hres_active() to verify
whether the system needs to be protected from a switch to jiffies or
other non highres capable clock sources.

Reported-by: Luming Yu <luming.yu@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
14 years agoi2c-ocores: Can add I2C devices to the bus
Richard Röjfors [Fri, 5 Jun 2009 13:40:32 +0000 (15:40 +0200)] 
i2c-ocores: Can add I2C devices to the bus

There is sometimes a need for the ocores driver to add devices to the
bus when installed.

i2c_register_board_info can not always be used, because the I2C devices
 are not known at an early state, they could for instance be connected
 on a I2C bus on a PCI device which has the Open Cores IP.

i2c_new_device can not be used in all cases either since the resulting
bus nummer might be unknown.

The solution is the pass a list of I2C devices in the platform data to
the Open Cores driver. This is useful for MFD drivers.

Signed-off-by: Richard Röjfors <richard.rojfors.ext@mocean-labs.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoi2c-s3c2410: move to using platform idtable to match devices
Ben Dooks [Fri, 12 Jun 2009 09:45:29 +0000 (10:45 +0100)] 
i2c-s3c2410: move to using platform idtable to match devices

Change to using platform id table to match either of the two supported
platform device names in the driver. This simplifies the driver init and
exit code

Note, log messages will now be prefixed with 's3c-i2c' instead of the
driver name, so output will be of the form of:

s3c-i2c s3c2440-i2c.0: slave address 0x10

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoi2c: OMAP3: Better noise suppression for fast/standard modes
Aaro Koskinen [Wed, 27 May 2009 14:54:46 +0000 (17:54 +0300)] 
i2c: OMAP3: Better noise suppression for fast/standard modes

Use longer noise filter period for fast and standard mode. Based on an
earlier patch by Eero Nurkkala.

Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoi2c: OMAP2/3: Fix scll/sclh calculations
Aaro Koskinen [Wed, 27 May 2009 14:54:45 +0000 (17:54 +0300)] 
i2c: OMAP2/3: Fix scll/sclh calculations

Fix scll/sclh calculations for HS and fast modes. Currently the driver
uses equal (roughly) low/high times which will result in too short
low time.

OMAP3430 TRM gives the following equations:

F/S: tLow  = (scll + 7) * internal_clk
     tHigh = (sclh + 5) * internal_clk
HS:  tLow  = (scll + 7) * fclk
     tHigh = (sclh + 5) * fclk

Furthermore, the I2C specification sets the following minimum values
for HS tLow/tHigh for capacitive bus loads 100 pF (maximum speed 3400)
and 400 pF (maximum speed 1700):

speed tLow tHigh
3400 160 ns 60 ns
1700 320 ns 120 ns

and for F/S:

speed tLow tHigh
400 1300 ns 600 ns
100 4700 ns 4000 ns

By using duty cycles 33/66 (HS, F) and 50/50 (S) we stay above these
minimum values.

Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoi2c: Blackfin TWI: implement I2C_FUNC_SMBUS_I2C_BLOCK functionality
Michael Hennerich [Wed, 27 May 2009 09:24:10 +0000 (09:24 +0000)] 
i2c: Blackfin TWI: implement I2C_FUNC_SMBUS_I2C_BLOCK functionality

Some drivers need i2c_smbus_read_i2c_block_data() functionality, so add
support for it to the Blackfin I2C bus driver.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
[ben-linux@fluff.org: shortened subject]
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoi2c: Blackfin TWI: fix transfer errors with repeat start
Frank Shew [Tue, 19 May 2009 11:23:49 +0000 (07:23 -0400)] 
i2c: Blackfin TWI: fix transfer errors with repeat start

We have a custom BF537 board with an I2C RTC (MAX DS3231) running
uclinux 2007R1 for some time. Recently during migration to 2008R1.5-RC3
we losted access to the RTC. The RTC driver calls 'i2c_transfer()' which
in turns calls 'bfin_twi_master_xfer()' in i2c-bfin-twi.c.

Compared with 2007R1, it looks like the 2008R1.5 version of i2c-bin-twi.c
has a new mode 'TWI_I2C-MODE_REPEAT' which corresponds to the Repeat Start
Condition described in the HRM. However, according to the HRM, at XMIT or
RECV interrupt and when the data count is 0, not only is the RESTART bit
supposed to be set, but MDIR must also be set if the next operation is a
receive sequence, and cleared if not. Currently there is no code that looks
at the I2C_M_RD bit in the flag from the next cur_msg and set/clear the MDIR
flag accordingly at the same time that the RSTART bit is set. Instead, MDIR
is set or cleared (by OR'ing with 0?) after the RESTART bit has been cleared
during handling of MCOMP interrupt.

It appears that this is causing our failure with reading the RTC, as a
quick patch to set/clear MDIR when RESTART is set seem to solve our problem.

Signed-off-by: Frank Shew <fshew@geometrics.com>
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
[ben-linux@fluff.org: shorted subject]
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoi2c: Blackfin TWI: fix REPEAT START mode doesn't repeat
Sonic Zhang [Tue, 19 May 2009 11:21:58 +0000 (07:21 -0400)] 
i2c: Blackfin TWI: fix REPEAT START mode doesn't repeat

Avoid rewrite TWI MASTER_CTL reg when issue next message
In i2c repeat transfer mode, byte count of next message should be filled
into part of the TWI MASTER_CTL reg when interrupt MCOMP of last
message transfer is triggered. But, other bits in this reg should
not be touched.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
[ben-linux@fluff.org: shorted subject]
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoi2c: Blackfin TWI: make sure we don't end up with a CLKDIV=0
Michael Hennerich [Mon, 18 May 2009 12:14:41 +0000 (08:14 -0400)] 
i2c: Blackfin TWI: make sure we don't end up with a CLKDIV=0

Make sure we don't end up with an invalid CLKDIV=0 in case someone
specifies 20kHz SCL or less (5 * 1024 / 20 = 0x100).

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
[ben-linux@fluff.org: shortened subject line]
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agonet: use symbolic values for ndo_start_xmit() return codes
Patrick McHardy [Fri, 12 Jun 2009 06:22:29 +0000 (06:22 +0000)] 
net: use symbolic values for ndo_start_xmit() return codes

Convert magic values 1 and -1 to NETDEV_TX_BUSY and NETDEV_TX_LOCKED respectively.

0 (NETDEV_TX_OK) is not changed to keep the noise down, except in very few cases
where its in direct proximity to one of the other values.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: fix network drivers ndo_start_xmit() return values (part 8)
Patrick McHardy [Fri, 12 Jun 2009 06:14:36 +0000 (06:14 +0000)] 
net: fix network drivers ndo_start_xmit() return values (part 8)

Fix up USB drivers that return an errno value (result of usb_submit_urb())
to qdisc_restart(), causing qdisc_restart() to print a warning and requeue/
retransmit the skb.

- hso: skb is freed: use after free
- at76_usb: skb is freed: use after free

Compile tested only.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: fix network drivers ndo_start_xmit() return values (part 7)
Patrick McHardy [Fri, 12 Jun 2009 05:34:37 +0000 (05:34 +0000)] 
net: fix network drivers ndo_start_xmit() return values (part 7)

Fix up ATM drivers that return an errno value to qdisc_restart(), causing
qdisc_restart() to print a warning an requeue/retransmit the skb.

- lec: condition can only be remedied by userspace, until that retransmissions

Compile tested only.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: fix network drivers ndo_start_xmit() return values (part 6)
Patrick McHardy [Fri, 12 Jun 2009 05:20:01 +0000 (05:20 +0000)] 
net: fix network drivers ndo_start_xmit() return values (part 6)

Fix up hamradio drivers that return an errno value to dev_queue_xmit(), causing
it to print a warning an free the skb.

- bpqether: skb is freed: use after free

Compile tested only.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: fix network drivers ndo_start_xmit() return values (part 5)
Patrick McHardy [Fri, 12 Jun 2009 05:13:07 +0000 (05:13 +0000)] 
net: fix network drivers ndo_start_xmit() return values (part 5)

Fix up s390 drivers that return an errno value to qdisc_restart(), causing
qdisc_restart() to print a warning an requeue/retransmit the skb.

- claw: impossible condition, simply remove it

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: fix network drivers ndo_start_xmit() return values (part 4)
Patrick McHardy [Fri, 12 Jun 2009 04:37:34 +0000 (04:37 +0000)] 
net: fix network drivers ndo_start_xmit() return values (part 4)

Fix up WAN drivers that return an errno value to qdisc_restart(), causing
qdisc_restart() to print a warning an requeue/retransmit the skb.

- cycx_x25: intention appears to be to requeue the skb

Does not compile cleanly for me even without this patch, so untested.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: fix network drivers ndo_start_xmit() return values (part 3)
Patrick McHardy [Fri, 12 Jun 2009 04:08:02 +0000 (04:08 +0000)] 
net: fix network drivers ndo_start_xmit() return values (part 3)

net: fix network drivers ndo_start_xmit() return values (part 3)

Fix up wireless drivers that return an errno value to qdisc_restart(), causing
qdisc_restart() to print a warning an requeue/retransmit the skb.

- airo: transmission not implemented for chip, intention is to free and abort
- ipw2200: transmission not implemented for promiscous mode, intention is to
           drop
- prism54: intention is to drop
- wl3501_cs: intention appears to be to drop
- zd1201: error counter indicates intention is to drop

All drivers compile tested.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: fix network drivers ndo_start_xmit() return values (part 2)
Patrick McHardy [Fri, 12 Jun 2009 03:17:19 +0000 (03:17 +0000)] 
net: fix network drivers ndo_start_xmit() return values (part 2)

Fix up IRDA drivers that return an errno value to qdisc_restart(), causing
qdisc_restart() to print a warning an requeue/retransmit the skb.

- donauboe: intention appears to be to have the skb retransmitted without
            error message
- irda-usb: intention is to drop silently according to comment
- kingsub-sir: skb is freed: use after free
- ks959-sir: skb is freed: use after free
- ksdazzle-sir: skb is freed: use after free
- mcs7880: skb is freed: use after free

All but donauboe compile tested.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>