Kieran Bingham [Fri, 8 May 2009 14:48:15 +0000 (15:48 +0100)]
sh: Add in some ptrace definitions from GDB.
Plugs in PT_TEXT_END_ADDR/PT_TEXT_ADDR/PT_DATA_ADDR/PT_TEXT_LEN
definitions.
Signed-off-by: Kieran Bingham <kieranbingham@gmail.com>
Signed-off-by: Peter Griffin <pgriffin@mpc-data.co.uk>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Yoshinori Sato [Tue, 28 Apr 2009 04:40:15 +0000 (04:40 +0000)]
serial: sh-sci: Fix up h8300 support.
- Dummy SCIF functions define.
- h8300 specific header include.
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Fri, 8 May 2009 14:48:33 +0000 (23:48 +0900)]
serial: sh-sci: Fix up section mismatch in error path.
The sci_probe_single() path attempts to use sci_remove() for the error
path, while sci_remove() is still flagged as __devexit. So, we simply
discard the section annotation.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Fri, 8 May 2009 14:28:54 +0000 (23:28 +0900)]
sh: Add clock id to sh-sci platform data on SH-Mobile CPUs.
This adds the clock specifier to all of the SH-Mobile sh-sci ports.
Impacted CPUs are SH7343/SH7366/SH7722/SH7723/SH7724.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Wed, 21 Jan 2009 15:14:30 +0000 (15:14 +0000)]
sh-sci: improve clock framework support
Use enable/disable hooks for clock framework integration.
Make sure we control the clock for the serial console as well.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Wed, 21 Jan 2009 15:14:22 +0000 (15:14 +0000)]
sh-sci: ioremap() in a single place
Handle ioremap() in sci_config_port only.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Wed, 21 Jan 2009 15:14:14 +0000 (15:14 +0000)]
sh-sci: replace sci_init_ports()
Replace sci_init_ports() with sci_init_single().
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Wed, 21 Jan 2009 15:13:50 +0000 (15:13 +0000)]
sh-sci: allow single port platform devices
Allow registration of single port sh-sci platform devices.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Wed, 21 Jan 2009 15:14:38 +0000 (15:14 +0000)]
sh-sci: use to_sci_port() if possible
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Wed, 21 Jan 2009 15:14:06 +0000 (15:14 +0000)]
sh-sci: rework serial console support
Rework sh-sci serial console code.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Wed, 21 Jan 2009 15:13:58 +0000 (15:13 +0000)]
sh-sci: remove early_sci_setup()
Remove unused early_sci_setup() function from sh-sci.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Wed, 21 Jan 2009 15:13:42 +0000 (15:13 +0000)]
sh-sci: add platform device private data
This patch adds per-platform private data to the sh-sci driver.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Fri, 8 May 2009 13:14:01 +0000 (22:14 +0900)]
sh: Kill off the GENERIC_CALIBRATE_DELAY ifndef.
Now that everyone is using the clock framework directly and we
unconditionally provide our own calibrate_delay() function, having it
wrapped in an ifndef is no longer useful. So, kill it off.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Fri, 8 May 2009 13:09:30 +0000 (22:09 +0900)]
sh: TMU platform data for SH-X3 proto CPU.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Fri, 8 May 2009 12:57:04 +0000 (21:57 +0900)]
sh: TMU platform data for SH7786.
Wires up all 12 TMU channels, with TMU0 and 1 used as clockevent and
clocksource respectively.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Fri, 8 May 2009 11:32:56 +0000 (20:32 +0900)]
sh: Always fixup unaligned userspace accesses on sh64.
sh64 has traditionally had this configurable via a Kconfig option
(CONFIG_SH64_USER_MISALIGNED_FIXUP). In practice it has never really been
terribly useful to turn this off, so just get rid of the option entirely.
We leave the sysctl around so we don't end up breaking existing root
file systems, and to allow folks that really want this off to do so at
their own risk.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Fri, 8 May 2009 11:20:56 +0000 (20:20 +0900)]
sh: Kill off extra cflags Kconfig entry.
There is no real reason to use this anymore, as the build system
generally knows what it is doing with regards to cflags mangling.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Fri, 8 May 2009 10:48:47 +0000 (19:48 +0900)]
sh: Always select RTC_LIB, not just for SUPERH32.
The RTC_LIB helpers are used in arch/sh/kernel/time.c, which was
previously only the case for the 32-bit variant. Now that this has
become the common implementation, move the RTC_LIB select to reflect
that. Fixes up the sh64 build.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Fri, 8 May 2009 09:01:03 +0000 (18:01 +0900)]
sh: Drop dead rules from arch/sh/kernel/Makefile_64.
Several of these options are specific to the SHcompact ISA and will need
to be rewritten for SHmedia if they are to be supported at all. Drop
the impossible rules for now.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Fri, 8 May 2009 08:32:18 +0000 (08:32 +0000)]
sh: TMU platform data for sh7723
This patch adds TMU platform data for sh7723. Both clockevent
and clocksource support is enabled. While at it, adjust the
CMT clocksource rating to prioritize the TMU.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Fri, 8 May 2009 08:27:19 +0000 (08:27 +0000)]
sh: enable TMU clocksource on sh7722
This patch enables the TMU clocksource on sh7722.
To prioritize TMU over CMT we also adjust the CMT
clock source rating.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Fri, 8 May 2009 08:23:29 +0000 (08:23 +0000)]
sh: clock framework update, fix count and kill off kref
This patch updates the clock framework use count code.
With this patch the enable() and disable() callbacks
only get called when counting from and to zero.
While at it the kref stuff gets replaced with an int.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Fri, 8 May 2009 08:41:59 +0000 (17:41 +0900)]
sh: Move out cayman-specific panic handler code to its own file.
This moves out the cayman-specific panic handler code to a better
location, and leaves the generic implementation a simple stub that is
still used under emulation.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Fri, 8 May 2009 08:36:57 +0000 (17:36 +0900)]
sh: Kill off unused sh64 debug code.
None of the print_page() code and associated helpers are presently used
by anything in-tree, so just kill it off.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Fri, 8 May 2009 08:25:35 +0000 (17:25 +0900)]
sh: Kill off sh64's hand-rolled syscall tracer.
This is no longer necessary, as there are now sufficient generic
alternatives available.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Fri, 8 May 2009 07:59:05 +0000 (16:59 +0900)]
sh: Kill off the global rtc_lock with extreme prejudice.
Now that all of the possible users for rtc_lock have gone away, it is no
longer necessary to keep this lock definition around.
This follows several other architectures that have either recently
dropped it or never supported it in the first place.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Fri, 8 May 2009 07:57:35 +0000 (16:57 +0900)]
sh: mach-sh03: Give the sh03 rtc its own spinlock.
This converts the sh03 rtc code off of using the global rtc_lock and on
to its own spinlock. There are no other possible users of the rtc_lock,
so serializing with it is not necessary.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Fri, 8 May 2009 07:47:48 +0000 (16:47 +0900)]
sh: Kill off dead timer sysclass pm hooks.
With the conversion to generic clockevents these are completely unused,
so just kill it off.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Fri, 8 May 2009 07:44:00 +0000 (16:44 +0900)]
sh: Kill off dead handle_timer_tick() code.
Nothing is using this anymore now that we have fully converted to generic
time, so kill it off completely.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Fri, 8 May 2009 07:36:13 +0000 (16:36 +0900)]
sh: Wire up GENERIC_CMOS_UPDATE for the platforms that need it.
Now that everything has converted over to generic timekeeping, we need an
alternate method for keeping the RTC updated for those platforms that are
still using the rtc_sh_get/set_time pairs, presently limited to SH-03 and
the Dreamcast. This wires up the GENERIC_CMOS_UPDATE hooks for those to
maintain the same behaviour.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Fri, 8 May 2009 07:17:36 +0000 (16:17 +0900)]
sh: Rename arch/sh/kernel/time_32.c to arch/sh/kernel/time.c.
This is now fully generic, and used both by _32 and _64 variants.
Rename it accordingly.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Fri, 8 May 2009 07:12:17 +0000 (16:12 +0900)]
sh: Finish the sh64 migration off of ARCH_USES_GETTIMEOFFSET.
This adds sh_tmu support to the SH-5 subtypes, which subsequently allows
us to kill off time_64.c and use the now generic time_32.c. As a bonus,
SH-5 now supports highres timers and tickless for the first time.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Fri, 8 May 2009 06:39:25 +0000 (15:39 +0900)]
sh: Move out rtc-sh registration from time_64.c to setup-sh5.c
Now that the onchip_remap() mess is sorted out, the rtc-sh support code
for SH-5 can follow the same approach as the other CPUs.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Fri, 8 May 2009 06:28:15 +0000 (15:28 +0900)]
sh: Enable new TMU driver support for all SH-3 and SH-4 CPUs.
The TMU block is supported on all SH-3 and SH-4 subtypes, so just select
it there, rather than conditionalizing it per subtype.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Thu, 7 May 2009 10:55:37 +0000 (10:55 +0000)]
sh: TMU platform data for sh7785
This patch adds TMU platform data for sh7785. Both clockevent
and clocksource support is enabled.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Thu, 7 May 2009 10:44:55 +0000 (10:44 +0000)]
sh: r7785 highlander clock fixes
Update the r7785 highlander defconfig to fix
PCLK value and that mode4 is set high.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Thu, 7 May 2009 10:31:39 +0000 (10:31 +0000)]
sh: call clock framework init() callback once
Make sure that clk->ops->init() only gets called once in
the case of CLK_ALWAYS_ENABLED. Without this patch the
init() callback may be called multiple times.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Thu, 7 May 2009 10:17:44 +0000 (10:17 +0000)]
sh: sh7785 early scif fix
This patch moves the SH4 case of EARLY_SCIF_CONSOLE_PORT
so the SH7785 default value gets used. Without this patch
the value for SH7785 is set to 0xffe80000.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Thu, 7 May 2009 09:17:20 +0000 (18:17 +0900)]
sh: Kill off unused SH-5 irq_describe cruft.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Thu, 7 May 2009 09:10:27 +0000 (18:10 +0900)]
sh: Integrate the SH-5 onchip_remap() more coherently.
Presently this is special-cased for early initialization. While there are
situations where these static early initializations are still necessary,
with minor changes it is possible to use this for the regular ioremap
implementation as well. This allows us to kill off the special-casing for
the remap completely and to start tidying up all of the SH-5
special-casing in drivers.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Thu, 7 May 2009 08:55:09 +0000 (17:55 +0900)]
sh: sh64 still needs ARCH_USES_GETTIMEOFFSET temporarily.
sh64 is still using this, so re-enable it temporarily while SH-5 gets
converted to use the generic code.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Thu, 7 May 2009 07:38:16 +0000 (16:38 +0900)]
sh: Handle shm_align_mask also for HAVE_ARCH_UNMAPPED_AREA_TOPDOWN.
Presently shm_align_mask is only looked at for the bottom up case, but we
still want this for proper colouring constraints in the topdown case.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Thu, 7 May 2009 06:24:36 +0000 (15:24 +0900)]
sh: Flag IRQSTACKS as BROKEN for now.
There still seems to be some stack corruption to sort out here, so flag
this as BROKEN until this issue is sorted out.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Sun, 3 May 2009 09:29:27 +0000 (18:29 +0900)]
sh: Move dummy clockevents broadcast timer to its new home.
The old arch/sh/kernel/timers/ directly will be going away completely
once the rest of the TMU users are migrated, so move the dummy broadcast
driver up a level in preparation.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Sun, 3 May 2009 09:18:14 +0000 (18:18 +0900)]
sh: Kill off the now unused ARCH_USES_GETTIMEOFFSET code.
Now that the stragglers (MTU2/CMT/etc.) have been rewritten and we are
selecting both GENERIC_TIME and GENERIC_CLOCKEVENTS, the get_offset()
timer op is completely unused. As a result, we are now able to kill off
the ARCH_USES_GETTIMEOFFSET references.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Sun, 3 May 2009 09:12:26 +0000 (18:12 +0900)]
sh: select both GENERIC_TIME and GENERIC_CLOCKEVENTS.
Now that the rest of the timers that didn't support clockevents have been
rewritten, both of these can be enabled by default.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Sun, 3 May 2009 09:05:42 +0000 (18:05 +0900)]
clocksource: sh_mtu2/cmt_register() should be static.
Neither of these need to be exported, so just make them static.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Sun, 3 May 2009 08:57:17 +0000 (17:57 +0900)]
sh: Consolidate MTU2/CMT/TMU timer platform data.
All of the SH timers use a roughly identical structure for platform data,
which presently is broken out for each block. Consolidate all of these
definitions, as there is no reason for them to be broken out in the first
place.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Fri, 1 May 2009 06:58:52 +0000 (06:58 +0000)]
sh: TMU platform data for sh7722
This patch adds TMU platform data for sh7722. Only clockevent
mode is enabled for now, clocksource requires this patch:
"clocksource: setup mult_orig in clocksource_enable()"
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Fri, 1 May 2009 06:51:00 +0000 (06:51 +0000)]
clocksource: SuperH TMU Timer driver
This patch adds a TMU driver for the SuperH architecture.
The TMU driver is a platform driver with early platform
support to allow using a TMU channel as clockevent or
clocksource during system bootup or later.
Clocksource or clockevent can be selected.
Both periodic and oneshot clockevents are supported.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Thu, 30 Apr 2009 07:12:09 +0000 (07:12 +0000)]
sh: remove old MTU2 driver
This patch removes the old MTU2 driver (CONFIG_SH_MTU2/timer-mtu2.c)
As replacement, select the sh_cmt driver with CONFIG_SH_TIMER_MTU2
and configure timer channel using platform data.
If multiple MTU channels are enabled using platform data, use the
earlytimer parameter on the kernel command line to select channel.
For instance, use "earlytimer=sh_mtu2.0" to select the first channel.
To verify which timer is being used, look at printouts or the timer
irq count in /proc/interrupts.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Thu, 30 Apr 2009 07:06:26 +0000 (07:06 +0000)]
sh: sh2a MTU2 platform data
This patch adds MTU2 platform data for the following cpus:
- sh7201 (3/5 channels)
- sh7203/sh7263 (2/4 channels)
- sh7206 (3/5 channels)
- MXG (3/5 channels)
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Thu, 30 Apr 2009 07:02:49 +0000 (07:02 +0000)]
clocksource: SuperH MTU2 Timer driver
This patch adds a MTU2 driver for the SuperH architecture.
The MTU2 driver is a platform driver with early platform
support to allow using a MTU2 channel as only clockevent
during system bootup.
Clocksource on sh2a is currently unsupported due to code
generation issues with 64-bit math, so at this point only
periodic clockevent support is in place.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
john stultz [Fri, 1 May 2009 20:10:28 +0000 (13:10 -0700)]
time: sh: convert to use arch_getoffset() infrastructure
Convert sh to use GENERIC_TIME via the arch_getoffset() infrastructure.
Signed-off-by: John Stultz <johnstul@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Thomas Gleixner [Sat, 2 May 2009 20:01:20 +0000 (20:01 +0000)]
sh: remove obsolete hw_interrupt_type
Impact: cleanup
Convert the last remaining users to struct irq_chip and remove the
define.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Thomas Gleixner [Sat, 2 May 2009 20:00:44 +0000 (20:00 +0000)]
sh: remove obsolete no_irq_type
Impact: cleanup
convert the last remaining users to no_irq_chip
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Sun, 3 May 2009 08:24:55 +0000 (17:24 +0900)]
Merge branch 'timers/clocksource' of git://git./linux/kernel/git/x86/linux-2.6-tip
john stultz [Fri, 1 May 2009 20:10:26 +0000 (13:10 -0700)]
timekeeping: create arch_gettimeoffset infrastructure
Some arches don't supply their own clocksource. This is mainly the
case in architectures that get their inter-tick times by reading the
counter on their interval timer. Since these timers wrap every tick,
they're not really useful as clocksources. Wrapping them to act like
one is possible but not very efficient. So we provide a callout these
arches can implement for use with the jiffies clocksource to provide
finer then tick granular time.
[ Impact: ease the migration to generic time keeping ]
Signed-off-by: John Stultz <johnstul@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Magnus Damm [Fri, 1 May 2009 05:45:46 +0000 (14:45 +0900)]
clocksource: setup mult_orig in clocksource_enable()
Setup clocksource mult_orig in clocksource_enable().
Clocksource drivers can save power by using keeping the
device clock disabled while the clocksource is unused.
In practice this means that the enable() and disable()
callbacks perform clk_enable() and clk_disable().
The enable() callback may also use clk_get_rate() to get
the clock rate from the clock framework. This information
can then be used to calculate the shift and mult variables.
Currently the mult_orig variable is setup from mult at
registration time only. This is conflicting with the above
case since the clock is disabled and the mult variable is
not yet calculated at the time of registration.
Moving the mult_orig setup code to clocksource_enable()
allows us to both handle the common case with no enable()
callback and the mult-changed-after-enable() case.
[ Impact: allow dynamic clock source usage ]
Signed-off-by: Magnus Damm <damm@igel.co.jp>
LKML-Reference: <
20090501054546.8193.10688.sendpatchset@rx1.opensource.se>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Linus Torvalds [Thu, 30 Apr 2009 04:48:16 +0000 (21:48 -0700)]
Linux 2.6.30-rc4
Linus Torvalds [Thu, 30 Apr 2009 04:25:53 +0000 (21:25 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/ecryptfs/ecryptfs-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ecryptfs/ecryptfs-2.6:
eCryptfs: Fix min function comparison warning
ecryptfs: fix printk format warning
Linus Torvalds [Thu, 30 Apr 2009 04:25:39 +0000 (21:25 -0700)]
Merge branch 'for_linus' of git://git./linux/kernel/git/mchehab/linux-2.6
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6:
V4L/DVB (11652): au0828: fix kernel oops regression on USB disconnect.
V4L/DVB (11626): cx23885: Two fixes for DViCO FusionHDTV DVB-T Dual Express
V4L/DVB (11612): mx3_camera: Fix compilation with CONFIG_PM
V4L/DVB (11570): patch: s2255drv: fix race condition on set mode
V4L/DVB (11568): cx18: Fix the handling of i2c bus registration error
V4L/DVB (11561a): move media after i2c
V4L/DVB (11516): drivers/media/video/saa5246a.c: fix use-after-free
V4L/DVB (11515): drivers/media/video/saa5249.c: fix use-after-free and leak
V4L/DVB (11494a): cx231xx Kconfig fixes
V4L/DVB (11494): cx18: Send correct input routing value to external audio multiplexers
Magnus Damm [Thu, 30 Apr 2009 04:09:26 +0000 (04:09 +0000)]
sh: remove old CMT driver
This patch removes the old CMT driver (CONFIG_SH_CMT/timer-cmt.c)
As replacement, select the sh_cmt driver with CONFIG_SH_TIMER_CMT
and configure timer channel using platform data.
If multiple CMT channels are enabled using platform data, use the
earlytimer parameter on the kernel command line to select channel.
For instance, use "earlytimer=sh_cmt.0" to select the first channel.
To verify which timer is being used, look at printouts or the timer
irq count in /proc/interrupts.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Thu, 30 Apr 2009 04:08:18 +0000 (04:08 +0000)]
sh: sh2/sh2a 16-bit CMT platform data
This patch adds 16-bit cmt platform data for the following cpus:
- sh7619 (2 channels)
- sh7203/sh7263 (2 channels)
- sh7206 (2 channels)
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Wed, 29 Apr 2009 14:50:37 +0000 (14:50 +0000)]
clocksource: sh_cmt 16-bit fixes
This patch contains various fixes for 16-bit cmt hardware.
With this applied periodic clockevents work fine on sh7203.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Thu, 30 Apr 2009 03:56:37 +0000 (12:56 +0900)]
sh: pass through ioremap() for non-mmu processors.
All 32-bit SuperH processors currently go through __ioremap_mode()
and check for IO_TRAPPED and directly mapped segments. With this
patch we simplify the MMU less case with a pass through version of
__ioremap_mode() which just returns the physical address.
The effects of this is change are:
- fix non-MMU ioremap() of high address hardware blocks (sh7203 CMT)
- make sure IO_TRAPPED is not selected
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Devin Heitmueller [Tue, 28 Apr 2009 16:14:07 +0000 (13:14 -0300)]
V4L/DVB (11652): au0828: fix kernel oops regression on USB disconnect.
A regression was introduced in hg changeset
33810c734a0d, which resulted in
a kernel panic whenever the device was disconnected from USB. The call to
4l2_device_register() was overwriting the pointer for usb_set_intfdata(), so
when au0828_usb_disconnect() was called, the usb_get_intfdata() returned a
pointer to the v4l2_device instead of the au0828_dev structure.
Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Christopher Pascoe [Mon, 27 Apr 2009 14:27:04 +0000 (11:27 -0300)]
V4L/DVB (11626): cx23885: Two fixes for DViCO FusionHDTV DVB-T Dual Express
Two fixes for DViCO FusionHDTV DVB-T Dual Express:
* Reset correct tuner when reinitializing xc3028.
* Disable the I2C gate control to avoid locking up the I2C bus.
Tested-by: John Knops <jknops@australiaonline.net.au>
Reviewed-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Christopher Pascoe <linuxdvb@itee.uq.edu.au>
Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Sascha Hauer [Fri, 24 Apr 2009 15:58:24 +0000 (12:58 -0300)]
V4L/DVB (11612): mx3_camera: Fix compilation with CONFIG_PM
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Dean Anderson [Mon, 20 Apr 2009 22:07:44 +0000 (19:07 -0300)]
V4L/DVB (11570): patch: s2255drv: fix race condition on set mode
set_modeready flag must be set before command sent to USB in
s2255_write_config.
Signed-off-by: Dean Anderson <dean@sensoray.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jean Delvare [Fri, 17 Apr 2009 13:56:51 +0000 (10:56 -0300)]
V4L/DVB (11568): cx18: Fix the handling of i2c bus registration error
* Return actual error values as returned by the i2c subsystem, rather
than 0 or 1.
* If the registration of the second bus fails, unregister the first one
before exiting, otherwise we are leaking resources.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Guennadi Liakhovetski [Tue, 21 Apr 2009 07:22:38 +0000 (04:22 -0300)]
V4L/DVB (11561a): move media after i2c
Currently drivers/media drivers are linked very early - directly after
base, block, misc, and mfd and before ata, scsi, ide, input, firewire,
usb, and i2c. This breaks static build of video4linux drivers, that use
generic CPU i2c adapter drivers and the v4l2-subdev subsystem, because
during video4linux probing the v4l2-subdev core requires a struct
i2c_adapter context, which cannot be satisfied before the i2c subsystem is
initialised. Moving drivers/media after drivers/i2c fixes this problem.
The best way to trigger action is by submitting a patch:-) So, let's see
what comes out of it - on the one hand I don't see any reason why media
has to be linked this early, and nobody was able to give me one yesterday
as this problem has been discussed on linux-media, OTOH, maybe indeed it
would be better to move i2c the whole way up above media, but that'd be
much bigger of a change, I think.
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Dan Carpenter [Tue, 14 Apr 2009 22:51:30 +0000 (19:51 -0300)]
V4L/DVB (11516): drivers/media/video/saa5246a.c: fix use-after-free
I lowered the kfree(t) down a couple lines and removed the superflous
"t->vdev = NULL;"
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Dan Carpenter [Tue, 14 Apr 2009 22:50:33 +0000 (19:50 -0300)]
V4L/DVB (11515): drivers/media/video/saa5249.c: fix use-after-free and leak
I moved the kfree() down a couple lines. t->vdev is going to be in freed
memory so there is no point setting it to NULL. I added a kfree(t) on a
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Tue, 14 Apr 2009 16:56:58 +0000 (13:56 -0300)]
V4L/DVB (11494a): cx231xx Kconfig fixes
selecting ALSA module breaks if !SND. Just remove select.
While here, let's fix the whitespacing at the Kconfig.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Andy Walls [Tue, 14 Apr 2009 00:43:31 +0000 (21:43 -0300)]
V4L/DVB (11494): cx18: Send correct input routing value to external audio multiplexers
A late v4l2_subdev framework change accidentally sent the audio input
routing value to the external multiplexer, instead of the muxer input routing
value to the external multiplexer. This change corrects that error.
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Linus Torvalds [Wed, 29 Apr 2009 14:55:45 +0000 (07:55 -0700)]
Merge git://git./linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (24 commits)
e100: do not go D3 in shutdown unless system is powering off
netfilter: revised locking for x_tables
Bluetooth: Fix connection establishment with low security requirement
Bluetooth: Add different pairing timeout for Legacy Pairing
Bluetooth: Ensure that HCI sysfs add/del is preempt safe
net: Avoid extra wakeups of threads blocked in wait_for_packet()
net: Fix typo in net_device_ops description.
ipv4: Limit size of route cache hash table
Add reference to CAPI 2.0 standard
Documentation/isdn/INTERFACE.CAPI
update Documentation/isdn/00-INDEX
ixgbe: Fix WoL functionality for 82599 KX4 devices
veth: prevent oops caused by netdev destructor
xfrm: wrong hash value for temporary SA
forcedeth: tx timeout fix
net: Fix LL_MAX_HEADER for CONFIG_TR_MODULE
mlx4_en: Handle page allocation failure during receive
mlx4_en: Fix cleanup flow on cq activation
vlan: update vlan carrier state for admin up/down
netfilter: xt_recent: fix stack overread in compat code
...
Thadeu Lima de Souza Cascardo [Wed, 29 Apr 2009 05:42:39 +0000 (22:42 -0700)]
e100: do not go D3 in shutdown unless system is powering off
After experimenting with kexec with the last merges after 2.6.29, I've
had some problems when probing e100. It would not read the eeprom. After
some bisects, I realized this has been like that since forever (at least
2.6.18). The problem is that shutdown is doing the same thing that
suspend does and puts the device in D3 state. I couldn't find a way to
get the device back to a sane state in the probe function. So, based on
some similar patches from Rafael J. Wysocki for e1000, e1000e, and ixgbe,
I wrote this one for e100.
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Acked-by: "Rafael J. Wysocki" <rjw@sisk.pl>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Wed, 29 Apr 2009 05:40:49 +0000 (22:40 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/holtmann/bluetooth-2.6
Stephen Hemminger [Wed, 29 Apr 2009 05:36:33 +0000 (22:36 -0700)]
netfilter: revised locking for x_tables
The x_tables are organized with a table structure and a per-cpu copies
of the counters and rules. On older kernels there was a reader/writer
lock per table which was a performance bottleneck. In 2.6.30-rc, this
was converted to use RCU and the counters/rules which solved the performance
problems for do_table but made replacing rules much slower because of
the necessary RCU grace period.
This version uses a per-cpu set of spinlocks and counters to allow to
table processing to proceed without the cache thrashing of a global
reader lock and keeps the same performance for table updates.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Linus Torvalds [Wed, 29 Apr 2009 00:21:20 +0000 (17:21 -0700)]
Merge branch 'drm-intel-next' of git://git./linux/kernel/git/anholt/drm-intel
* 'drm-intel-next' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel:
drm/i915: fix up error path leak in i915_cmdbuffer
drm/i915: fix unpaired i915 device mutex on entervt failure.
drm/i915: add support for G41 chipset
drm/i915: Enable ASLE if present
drm/i915: Unregister ACPI video driver when exiting
drm/i915: Register ACPI video even when not modesetting
drm/i915: fix transition to I915_TILING_NONE
drm/i915: Don't let an oops get triggered from irq_emit without dma init.
drm/i915: allow tiled front buffers on 965+
Linus Torvalds [Wed, 29 Apr 2009 00:21:07 +0000 (17:21 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/roland/infiniband
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: (21 commits)
RDMA/nes: Update iw_nes version
RDMA/nes: Fix error path in nes_accept()
RDMA/nes: Fix hang issues for large cluster dynamic connections
RDMA/nes: Increase rexmit timeout interval
RDMA/nes: Check for sequence number wrap-around
RDMA/nes: Do not set apbvt entry for loopback
RDMA/nes: Fix unused variable compile warning when INFINIBAND_NES_DEBUG=n
RDMA/nes: Fix fw_ver in /sys
RDMA/nes: Set trace length to 1 inch for SFP_D
RDMA/nes: Enable repause timer for port 1
RDMA/nes: Correct CDR loop filter setting for port 1
RDMA/nes: Modify thermo mitigation to flip SerDes1 ref clk to internal
RDMA/nes: Fix resource issues in nes_create_cq() and nes_destroy_cq()
RDMA/nes: Remove root_256()'s unused pbl_count_256 parameter
mlx4_core: Fix memory leak in mlx4_enable_msi_x()
IB/mthca: Fix timeout for INIT_HCA and a few other commands
RDMA/cxgb3: Don't zero QP attrs when moving to IDLE
RDMA/nes: Fix bugs in nes_reg_phys_mr()
RDMA/nes: Fix compiler warning at nes_verbs.c:1955
IPoIB: Disable NAPI while CQ is being drained
...
Geert Uytterhoeven [Tue, 28 Apr 2009 19:20:11 +0000 (21:20 +0200)]
m68k: arch/m68k/kernel/sun3-head.S needs <linux/init.h>
Fix this:
arch/m68k/kernel/sun3-head.S: Assembler messages:
arch/m68k/kernel/sun3-head.S:32: Error: Unknown operator -- statement `__head' ignored
Introduced by commit
6f335cab0431d5df4995bcd4fd952d4c746d5a86 ("m68k:
convert to use __HEAD and HEAD_TEXT macros."), which started using
__HEAD without adding the appropriate include.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Tue, 28 Apr 2009 23:06:48 +0000 (16:06 -0700)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
bio: fix memcpy corruption in bio_copy_user_iov()
hd: fix locking
mg_disk: fix CONFIG_LBD=y warning
mg_disk: fix locking
Linus Torvalds [Tue, 28 Apr 2009 23:06:33 +0000 (16:06 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/lrg/voltage-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6:
regulator: Fix default constraints for fixed voltage regulators
regulator/bq24022: fix bug in is_enabled function
regulator/virtual: fix strings compare predicates
regulator core: fix double-free in regulator_register() error path
drivers/regulator: fix when type is different from REGULATOR_VOLTAGE or REGULATOR_CURRENT
unreachable code in drms_uA_update()
regulator: fix header file missing kernel-doc
Roland Dreier [Tue, 28 Apr 2009 23:01:31 +0000 (16:01 -0700)]
Merge branches 'cxgb3', 'ipoib', 'mthca', 'mlx4' and 'nes' into for-linus
Linus Torvalds [Tue, 28 Apr 2009 22:55:32 +0000 (15:55 -0700)]
Merge branch 'merge' of git://git./linux/kernel/git/paulus/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
powerpc/ps3: Fix build error on UP
powerpc/cell: Select PCI for IBM_CELL_BLADE AND CELLEB
powerpc: ppc32 needs elf_read_implies_exec()
powerpc/86xx: Add device_type entry to soc for ppc9a
powerpc/44x: Correct memory size calculation for denali-based boards
maintainers: Fix PowerPC 4xx git tree
powerpc: fix for long standing bug noticed by gcc 4.4.0
Revert "powerpc: Add support for early tlbilx opcode"
Tim Abbott [Tue, 28 Apr 2009 15:47:15 +0000 (11:47 -0400)]
powerpc: Revert switch to TEXT_TEXT in linker script
Commit
edada399 broke the build on 64-bit powerpc because it moved the
__ftr_alt_* sections of a file away from the .text section, causing
link failures due to relative conditional branch targets being too far
away from the branch instructions. This happens on pretty much all
64-bit powerpc configs.
This change reverts commit
edada399 while preserving the update from
the *.refok sections to .ref.text that has happened since.
Signed-off-by: Tim Abbott <tabbott@mit.edu>
Requested-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
FUJITA Tomonori [Tue, 28 Apr 2009 18:24:29 +0000 (20:24 +0200)]
bio: fix memcpy corruption in bio_copy_user_iov()
st driver uses blk_rq_map_user() in order to just build a request out
of page frames. In this case, map_data->offset is a non zero value and
iov[0].iov_base is NULL. We need to increase nr_pages for that.
Cc: stable@kernel.org
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Tejun Heo [Tue, 28 Apr 2009 03:38:33 +0000 (12:38 +0900)]
hd: fix locking
hd dance around local irq and HD_IRQ enable without achieving much.
It ends up transferring data from irq handler with both local irq and
HD_IRQ disabled. The only place it actually does something is while
transferring the first block of a request which it does with HD_IRQ
disabled but local irq enabled.
Unfortunately, the dancing is horribly broken from locking POV. IRQ
and timeout handlers access block queue without grabbing the queue
lock and running the driver in SMP configuration crashes the whole
machine pretty quickly.
Remove meaningless irq enable/disable dancing and add proper locking
in issue, irq and timeout paths.
Signed-off-by: Tejun Heo <tj@kernel.org>
Bartlomiej Zolnierkiewicz [Tue, 28 Apr 2009 03:38:33 +0000 (12:38 +0900)]
mg_disk: fix CONFIG_LBD=y warning
drivers/block/mg_disk.c: In function ‘mg_dump_status’:
drivers/block/mg_disk.c:265: warning: format ‘%ld’ expects type ‘long int’, but
argument 2 has type ‘sector_t’
[ Impact: kill build warning ]
Cc: unsik Kim <donari75@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Tejun Heo [Tue, 28 Apr 2009 03:38:32 +0000 (12:38 +0900)]
mg_disk: fix locking
IRQ and timeout handlers call functions which expect locked queue lock
without locking it. Fix it.
While at it, convert 0s used as null pointer constant to NULLs.
[ Impact: fix locking, cleanup ]
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: unsik Kim <donari75@gmail.com>
Mark Brown [Tue, 28 Apr 2009 10:09:38 +0000 (11:09 +0100)]
regulator: Fix default constraints for fixed voltage regulators
Default voltage constraints were being provided for fixed voltage
regulator where board constraints were not provided but these constraints
used INT_MIN as the default minimum voltage which is not a valid value
since it is less than zero. Use 1uV instead.
Also set the default values we set in the constraints themselves since
otherwise the max_uV constraint we determine will not be stored in the
actual constraint strucutre and will therefore not be used.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Philipp Zabel [Tue, 28 Apr 2009 11:34:14 +0000 (13:34 +0200)]
regulator/bq24022: fix bug in is_enabled function
This seems to be fallout from last October's regulator core rework.
It got noticed only because of recent regulator framework changes.
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Mike Rapoport [Sun, 26 Apr 2009 08:49:30 +0000 (11:49 +0300)]
regulator/virtual: fix strings compare predicates
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Paul Walmsley [Sat, 25 Apr 2009 11:28:36 +0000 (05:28 -0600)]
regulator core: fix double-free in regulator_register() error path
During regulator registration, any error after device_register() will
cause a double-free on the struct regulator_dev 'rdev'. The bug is in
drivers/regulator/core.c:regulator_register():
...
scrub:
device_unregister(&rdev->dev);
clean:
kfree(rdev); <---
rdev = ERR_PTR(ret);
goto out;
...
device_unregister() calls regulator_dev_release() which frees rdev. The
subsequent kfree corrupts memory and causes some OMAP3 systems to oops on
boot in regulator_get().
Applies against 2.6.30-rc3.
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diego Liziero [Tue, 14 Apr 2009 01:04:47 +0000 (03:04 +0200)]
drivers/regulator: fix when type is different from REGULATOR_VOLTAGE or REGULATOR_CURRENT
When regulator_desc->type is something different from REGULATOR_VOLTAGE or REGULATOR_CURRENT
the if should probably return ERR_PTR(-EINVAL)
The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
@@ expression E; constant C; @@
(
- !E == C
+ E != C
)
Signed-off-by: Diego Liziero <diegoliz@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Dan Carpenter [Wed, 8 Apr 2009 10:52:39 +0000 (13:52 +0300)]
unreachable code in drms_uA_update()
I removed the extra semi-colon and indented the return statement.
The unreachable code was found by smatch (http://repo.or.cz/w/smatch.git).
The patch was compile tested.
regards,
dan carpenter
Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Randy Dunlap [Sat, 4 Apr 2009 04:31:30 +0000 (21:31 -0700)]
regulator: fix header file missing kernel-doc
Add regulator header file missing kernel-doc:
Warning(include/linux/regulator/driver.h:117): No description found for parameter 'set_mode'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
cc: Liam Girdwood <lrg@slimlogic.co.uk>
cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Marcel Holtmann [Tue, 28 Apr 2009 16:04:55 +0000 (09:04 -0700)]
Bluetooth: Fix connection establishment with low security requirement
The Bluetooth 2.1 specification introduced four different security modes
that can be mapped using Legacy Pairing and Simple Pairing. With the
usage of Simple Pairing it is required that all connections (except
the ones for SDP) are encrypted. So even the low security requirement
mandates an encrypted connection when using Simple Pairing. When using
Legacy Pairing (for Bluetooth 2.0 devices and older) this is not required
since it causes interoperability issues.
To support this properly the low security requirement translates into
different host controller transactions depending if Simple Pairing is
supported or not. However in case of Simple Pairing the command to
switch on encryption after a successful authentication is not triggered
for the low security mode. This patch fixes this and actually makes
the logic to differentiate between Simple Pairing and Legacy Pairing
a lot simpler.
Based on a report by Ville Tervo <ville.tervo@nokia.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>