From 2363325c3bb670a695c9e48d850e4b400162c85a Mon Sep 17 00:00:00 2001 From: Chris Wright Date: Wed, 13 Dec 2006 23:37:03 -0800 Subject: [PATCH] added patches to 2.6.18 queue --- queue-2.6.18/arm-add-sys_-at-syscalls.patch | 61 +++++++++++++++ ...fix-signal-lock-status-detection-bug.patch | 48 ++++++++++++ ...c_pmac-platform-code-to-driver-probe.patch | 64 +++++++++++++++ queue-2.6.18/series | 4 + ...ken-tuner_lg_ntsc_tape-radio-support.patch | 78 +++++++++++++++++++ 5 files changed, 255 insertions(+) create mode 100644 queue-2.6.18/arm-add-sys_-at-syscalls.patch create mode 100644 queue-2.6.18/dvb-lgdt330x-fix-signal-lock-status-detection-bug.patch create mode 100644 queue-2.6.18/ieee1394-ohci1394-add-ppc_pmac-platform-code-to-driver-probe.patch create mode 100644 queue-2.6.18/v4l-fix-broken-tuner_lg_ntsc_tape-radio-support.patch diff --git a/queue-2.6.18/arm-add-sys_-at-syscalls.patch b/queue-2.6.18/arm-add-sys_-at-syscalls.patch new file mode 100644 index 00000000000..e1a11b348af --- /dev/null +++ b/queue-2.6.18/arm-add-sys_-at-syscalls.patch @@ -0,0 +1,61 @@ +From stable-bounces@linux.kernel.org Wed Dec 13 06:18:12 2006 +Date: Wed, 13 Dec 2006 14:12:15 +0000 +From: Russell King +To: stable@kernel.org +Message-ID: <20061213141215.GA21171@dyn-67.arm.linux.org.uk> +Subject: ARM: Add sys_*at syscalls + +Later glibc requires the *at syscalls. Add them. + +Signed-off-by: Russell King +Signed-off-by: Chris Wright +--- + arch/arm/kernel/calls.S | 13 +++++++++++++ + include/asm-arm/unistd.h | 13 +++++++++++++ + 2 files changed, 26 insertions(+) + +bca0b8e75f6b7cf52cf52c967286b72d84f9b37e +--- linux-2.6.18.5.orig/arch/arm/kernel/calls.S ++++ linux-2.6.18.5/arch/arm/kernel/calls.S +@@ -331,6 +331,19 @@ + CALL(sys_mbind) + /* 320 */ CALL(sys_get_mempolicy) + CALL(sys_set_mempolicy) ++ CALL(sys_openat) ++ CALL(sys_mkdirat) ++ CALL(sys_mknodat) ++/* 325 */ CALL(sys_fchownat) ++ CALL(sys_futimesat) ++ CALL(sys_fstatat64) ++ CALL(sys_unlinkat) ++ CALL(sys_renameat) ++/* 330 */ CALL(sys_linkat) ++ CALL(sys_symlinkat) ++ CALL(sys_readlinkat) ++ CALL(sys_fchmodat) ++ CALL(sys_faccessat) + #ifndef syscalls_counted + .equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls + #define syscalls_counted +--- linux-2.6.18.5.orig/include/asm-arm/unistd.h ++++ linux-2.6.18.5/include/asm-arm/unistd.h +@@ -347,6 +347,19 @@ + #define __NR_mbind (__NR_SYSCALL_BASE+319) + #define __NR_get_mempolicy (__NR_SYSCALL_BASE+320) + #define __NR_set_mempolicy (__NR_SYSCALL_BASE+321) ++#define __NR_openat (__NR_SYSCALL_BASE+322) ++#define __NR_mkdirat (__NR_SYSCALL_BASE+323) ++#define __NR_mknodat (__NR_SYSCALL_BASE+324) ++#define __NR_fchownat (__NR_SYSCALL_BASE+325) ++#define __NR_futimesat (__NR_SYSCALL_BASE+326) ++#define __NR_fstatat64 (__NR_SYSCALL_BASE+327) ++#define __NR_unlinkat (__NR_SYSCALL_BASE+328) ++#define __NR_renameat (__NR_SYSCALL_BASE+329) ++#define __NR_linkat (__NR_SYSCALL_BASE+330) ++#define __NR_symlinkat (__NR_SYSCALL_BASE+331) ++#define __NR_readlinkat (__NR_SYSCALL_BASE+332) ++#define __NR_fchmodat (__NR_SYSCALL_BASE+333) ++#define __NR_faccessat (__NR_SYSCALL_BASE+334) + + /* + * The following SWIs are ARM private. diff --git a/queue-2.6.18/dvb-lgdt330x-fix-signal-lock-status-detection-bug.patch b/queue-2.6.18/dvb-lgdt330x-fix-signal-lock-status-detection-bug.patch new file mode 100644 index 00000000000..66f16d9fb7c --- /dev/null +++ b/queue-2.6.18/dvb-lgdt330x-fix-signal-lock-status-detection-bug.patch @@ -0,0 +1,48 @@ +From chrisw@hera.kernel.org Wed Dec 13 23:18:02 2006 +Message-ID: <457E3F63.2010208@linuxtv.org> +Date: Tue, 12 Dec 2006 00:34:27 -0500 +From: Michael Krufky +To: stable@kernel.org +Cc: v4l-dvb maintainer list , Adrian Bunk +Subject: DVB: lgdt330x: fix signal / lock status detection bug + +In some cases when using VSB, the AGC status register has been known to +falsely report "no signal" when in fact there is a carrier lock. The +datasheet labels these status flags as QAM only, yet the lgdt330x +module is using these flags for both QAM and VSB. + +This patch allows for the carrier recovery lock status register to be +tested, even if the agc signal status register falsely reports no signal. + +Thanks to jcrews from #linuxtv in irc, for initially reporting this bug. + +Signed-off-by: Michael Krufky +Signed-off-by: Chris Wright + +--- + + drivers/media/dvb/frontends/lgdt330x.c | 6 ------ + 1 file changed, 6 deletions(-) + +--- linux-2.6.18.5.orig/drivers/media/dvb/frontends/lgdt330x.c ++++ linux-2.6.18.5/drivers/media/dvb/frontends/lgdt330x.c +@@ -435,9 +435,6 @@ static int lgdt3302_read_status(struct d + /* Test signal does not exist flag */ + /* as well as the AGC lock flag. */ + *status |= FE_HAS_SIGNAL; +- } else { +- /* Without a signal all other status bits are meaningless */ +- return 0; + } + + /* +@@ -500,9 +497,6 @@ static int lgdt3303_read_status(struct d + /* Test input signal does not exist flag */ + /* as well as the AGC lock flag. */ + *status |= FE_HAS_SIGNAL; +- } else { +- /* Without a signal all other status bits are meaningless */ +- return 0; + } + + /* Carrier Recovery Lock Status Register */ diff --git a/queue-2.6.18/ieee1394-ohci1394-add-ppc_pmac-platform-code-to-driver-probe.patch b/queue-2.6.18/ieee1394-ohci1394-add-ppc_pmac-platform-code-to-driver-probe.patch new file mode 100644 index 00000000000..6aef6e4976a --- /dev/null +++ b/queue-2.6.18/ieee1394-ohci1394-add-ppc_pmac-platform-code-to-driver-probe.patch @@ -0,0 +1,64 @@ +From chrisw@hera.kernel.org Wed Dec 13 23:18:22 2006 +Message-ID: <457F7AD0.3030005@gentoo.org> +Date: Tue, 12 Dec 2006 23:00:16 -0500 +From: Daniel Drake +To: stable@kernel.org +Cc: stefanr@s5r6.in-berlin.de +Subject: ieee1394: ohci1394: add PPC_PMAC platform code to driver probe + +From: Stefan Richter + +Fixes http://bugzilla.kernel.org/show_bug.cgi?id=7431 +iBook G3 threw a machine check exception and put the display backlight +to full brightness after ohci1394 was unloaded and reloaded. + +Signed-off-by: Stefan Richter +[dsd@gentoo.org: also added missing if condition, commit + 63cca59e89892497e95e1e9c7156d3345fb7e2e8] +Signed-off-by: Daniel Drake +Acked-by: Stefan Richter +Signed-off-by: Chris Wright +--- +It fixes a kernel oops which occurs when the ohci1394 driver is reloaded on PPC +http://bugs.gentoo.org/154851 + + drivers/ieee1394/ohci1394.c | 21 ++++++++++++++++----- + 1 file changed, 16 insertions(+), 5 deletions(-) + +--- linux-2.6.18.5.orig/drivers/ieee1394/ohci1394.c ++++ linux-2.6.18.5/drivers/ieee1394/ohci1394.c +@@ -3218,6 +3218,19 @@ static int __devinit ohci1394_pci_probe( + struct ti_ohci *ohci; /* shortcut to currently handled device */ + resource_size_t ohci_base; + ++#ifdef CONFIG_PPC_PMAC ++ /* Necessary on some machines if ohci1394 was loaded/ unloaded before */ ++ if (machine_is(powermac)) { ++ struct device_node *of_node = pci_device_to_OF_node(dev); ++ ++ if (of_node) { ++ pmac_call_feature(PMAC_FTR_1394_CABLE_POWER, of_node, ++ 0, 1); ++ pmac_call_feature(PMAC_FTR_1394_ENABLE, of_node, 0, 1); ++ } ++ } ++#endif /* CONFIG_PPC_PMAC */ ++ + if (pci_enable_device(dev)) + FAIL(-ENXIO, "Failed to enable OHCI hardware"); + pci_set_master(dev); +@@ -3506,11 +3519,9 @@ static void ohci1394_pci_remove(struct p + #endif + + #ifdef CONFIG_PPC_PMAC +- /* On UniNorth, power down the cable and turn off the chip +- * clock when the module is removed to save power on +- * laptops. Turning it back ON is done by the arch code when +- * pci_enable_device() is called */ +- { ++ /* On UniNorth, power down the cable and turn off the chip clock ++ * to save power on laptops */ ++ if (machine_is(powermac)) { + struct device_node* of_node; + + of_node = pci_device_to_OF_node(ohci->dev); diff --git a/queue-2.6.18/series b/queue-2.6.18/series index f88bbb86aea..9928fc5f33d 100644 --- a/queue-2.6.18/series +++ b/queue-2.6.18/series @@ -13,3 +13,7 @@ dm-snapshot-fix-freeing-pending-exception.patch ipsec-fix-inetpeer-leak-in-ipv4-xfrm-dst-entries.patch irda-incorrect-ttp-header-reservation.patch bonding-incorrect-bonding-state-reported-via-ioctl.patch +dvb-lgdt330x-fix-signal-lock-status-detection-bug.patch +v4l-fix-broken-tuner_lg_ntsc_tape-radio-support.patch +ieee1394-ohci1394-add-ppc_pmac-platform-code-to-driver-probe.patch +arm-add-sys_-at-syscalls.patch diff --git a/queue-2.6.18/v4l-fix-broken-tuner_lg_ntsc_tape-radio-support.patch b/queue-2.6.18/v4l-fix-broken-tuner_lg_ntsc_tape-radio-support.patch new file mode 100644 index 00000000000..35b82bb44dd --- /dev/null +++ b/queue-2.6.18/v4l-fix-broken-tuner_lg_ntsc_tape-radio-support.patch @@ -0,0 +1,78 @@ +From chrisw@hera.kernel.org Wed Dec 13 23:20:08 2006 +Message-ID: <457E3FE7.5090709@linuxtv.org> +Date: Tue, 12 Dec 2006 00:36:39 -0500 +From: Michael Krufky +To: stable@kernel.org +Cc: Hans Verkuil , v4l-dvb maintainer list , Mauro Carvalho Chehab +Subject: V4L: Fix broken TUNER_LG_NTSC_TAPE radio support + +From: Hans Verkuil + +The TUNER_LG_NTSC_TAPE is identical in all respects to the +TUNER_PHILIPS_FM1236_MK3. So use the params struct for the Philips tuner. +Also add this LG_NTSC_TAPE tuner to the switches where radio specific +parameters are set so it behaves like a TUNER_PHILIPS_FM1236_MK3. This +change fixes the radio support for this tuner (the wrong bandswitch byte +was used). + +Thanks to Andy Walls for finding this bug. + +Signed-off-by: Hans Verkuil +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Michael Krufky +Signed-off-by: Chris Wright + +--- + + drivers/media/video/tuner-simple.c | 2 ++ + drivers/media/video/tuner-types.c | 14 ++------------ + 2 files changed, 4 insertions(+), 12 deletions(-) + +--- linux-2.6.18.5.orig/drivers/media/video/tuner-simple.c ++++ linux-2.6.18.5/drivers/media/video/tuner-simple.c +@@ -108,6 +108,7 @@ static int tuner_stereo(struct i2c_clien + case TUNER_PHILIPS_FM1216ME_MK3: + case TUNER_PHILIPS_FM1236_MK3: + case TUNER_PHILIPS_FM1256_IH3: ++ case TUNER_LG_NTSC_TAPE: + stereo = ((status & TUNER_SIGNAL) == TUNER_STEREO_MK3); + break; + default: +@@ -419,6 +420,7 @@ static void default_set_radio_freq(struc + case TUNER_PHILIPS_FM1216ME_MK3: + case TUNER_PHILIPS_FM1236_MK3: + case TUNER_PHILIPS_FMD1216ME_MK3: ++ case TUNER_LG_NTSC_TAPE: + buffer[3] = 0x19; + break; + case TUNER_TNF_5335MF: +--- linux-2.6.18.5.orig/drivers/media/video/tuner-types.c ++++ linux-2.6.18.5/drivers/media/video/tuner-types.c +@@ -671,16 +671,6 @@ static struct tuner_params tuner_panason + }, + }; + +-/* ------------ TUNER_LG_NTSC_TAPE - LGINNOTEK NTSC ------------ */ +- +-static struct tuner_params tuner_lg_ntsc_tape_params[] = { +- { +- .type = TUNER_PARAM_TYPE_NTSC, +- .ranges = tuner_fm1236_mk3_ntsc_ranges, +- .count = ARRAY_SIZE(tuner_fm1236_mk3_ntsc_ranges), +- }, +-}; +- + /* ------------ TUNER_TNF_8831BGFF - Philips PAL ------------ */ + + static struct tuner_range tuner_tnf_8831bgff_pal_ranges[] = { +@@ -1331,8 +1321,8 @@ struct tunertype tuners[] = { + }, + [TUNER_LG_NTSC_TAPE] = { /* LGINNOTEK NTSC */ + .name = "LG NTSC (TAPE series)", +- .params = tuner_lg_ntsc_tape_params, +- .count = ARRAY_SIZE(tuner_lg_ntsc_tape_params), ++ .params = tuner_fm1236_mk3_params, ++ .count = ARRAY_SIZE(tuner_fm1236_mk3_params), + }, + [TUNER_TNF_8831BGFF] = { /* Philips PAL */ + .name = "Tenna TNF 8831 BGFF)", -- 2.47.3