Update to 2.6.38-rc5

Adjust/remove patches as appropriate.

svn path=/dists/trunk/linux-2.6/; revision=16898
This commit is contained in:
Ben Hutchings 2011-02-16 13:38:58 +00:00
parent 495b692486
commit 3f3fa452a5
24 changed files with 32 additions and 1350 deletions

12
debian/changelog vendored
View File

@ -1,15 +1,17 @@
linux-2.6 (2.6.37-1~experimental.2) UNRELEASED; urgency=low
linux-2.6 (2.6.38~rc5-1~experimental.1) UNRELEASED; urgency=low
* New upstream release candidate
- r8169: Keep firmware in memory (Closes: #609538)
- [sparc] Fix misaligned tracing information which the module loader
does not support (Closes: #609371)
- [sh4] Export cpu_core_map to fix build failure with CONFIG_SFC=m.
[ Ben Hutchings ]
* [arm] ixp4xx: Revert build fix, now applied upstream which resulted
in another build failure
* r8169: Keep firmware in memory (Closes: #609538)
* r8712u: Firmware filename is rtlwifi/rtl8712u.bin (Closes: #602450)
* [sparc] Fix misaligned tracing information which the module loader
does not support (Closes: #609371)
[ Aurelien Jarno ]
* [sh4] Export cpu_core_map to fix build failure with CONFIG_SFC=m.
* [mips/5kc-malta] Enable CONFIG_VGA_CONSOLE.
[ Bastian Blank ]

View File

@ -1,41 +0,0 @@
Subject: [PATCH] btrfs: Require CAP_SYS_ADMIN for filesystem rebalance
From: Ben Hutchings <ben@decadent.org.uk>
Date: Wed, 29 Dec 2010 14:55:03 +0000
Filesystem rebalancing (BTRFS_IOC_BALANCE) affects the entire
filesystem and may run uninterruptibly for a long time. This does not
seem to be something that an unprivileged user should be able to do.
Reported-by: Aron Xu <happyaron.xu@gmail.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
fs/btrfs/volumes.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index cc04dc1..2313e8b 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -22,6 +22,7 @@
#include <linux/blkdev.h>
#include <linux/random.h>
#include <linux/iocontext.h>
+#include <linux/capability.h>
#include <asm/div64.h>
#include "compat.h"
#include "ctree.h"
@@ -1905,6 +1906,9 @@ int btrfs_balance(struct btrfs_root *dev_root)
if (dev_root->fs_info->sb->s_flags & MS_RDONLY)
return -EROFS;
+ if (!capable(CAP_SYS_ADMIN))
+ return -EPERM;
+
mutex_lock(&dev_root->fs_info->volume_mutex);
dev_root = dev_root->fs_info->dev_root;
--
1.7.2.3

View File

@ -1,30 +0,0 @@
From 9af906ea7a41ecd3de88edb95c4e8a659d273db2 Mon Sep 17 00:00:00 2001
From: Ben Hutchings <ben@decadent.org.uk>
Date: Sat, 11 Dec 2010 06:13:45 +0000
Subject: [PATCH] drm/nouveau: Only select ACPI_VIDEO if its dependencies are met
CONFIG_ACPI_VIDEO depends on more than just CONFIG_ACPI, so add those
dependencies to the Kconfig select condition and make the code
conditional on CONFIG_ACPI_VIDEO.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
drivers/gpu/drm/nouveau/Kconfig | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/Kconfig b/drivers/gpu/drm/nouveau/Kconfig
index 72730e9..21d6c29 100644
--- a/drivers/gpu/drm/nouveau/Kconfig
+++ b/drivers/gpu/drm/nouveau/Kconfig
@@ -10,7 +10,7 @@ config DRM_NOUVEAU
select FB
select FRAMEBUFFER_CONSOLE if !EMBEDDED
select FB_BACKLIGHT if DRM_NOUVEAU_BACKLIGHT
- select ACPI_VIDEO if ACPI
+ select ACPI_VIDEO if ACPI && X86 && BACKLIGHT_CLASS_DEVICE && VIDEO_OUTPUT_CONTROL && INPUT
help
Choose this option for open-source nVidia support.
--
1.7.2.3

View File

@ -1,32 +0,0 @@
From: Ben Hutchings <ben@decadent.org.uk>
Date: Mon, 13 Dec 2010 11:39:18 +1100
Subject: [PATCH] i2c-i801: Include <linux/slab.h>
commit 830e49925da933a9d9e4b0f86077066a368b47a1 upstream.
Commit 5a0e3ad6af8660be21ca98a971cd00f331318c05 added direct inclusion
of <linux/slab.h> to those source files that appeared to need it, but
somehow missed this. On most architectures <linux/slab.h> is still
indirectly included, but there are exceptions such as alpha.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
---
drivers/i2c/busses/i2c-i801.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c
index 02835ce..7979aef 100644
--- a/drivers/i2c/busses/i2c-i801.c
+++ b/drivers/i2c/busses/i2c-i801.c
@@ -72,6 +72,7 @@
#include <linux/acpi.h>
#include <linux/io.h>
#include <linux/dmi.h>
+#include <linux/slab.h>
/* I801 SMBus address offsets */
#define SMBHSTSTS(p) (0 + (p)->smba)
--
1.7.2.3

View File

@ -1,130 +0,0 @@
From 73a575b628e2ae8e0393399387445eaf1dac3fb7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?fran=C3=A7ois=20romieu?= <romieu@fr.zoreil.com>
Date: Thu, 13 Jan 2011 13:07:53 +0000
Subject: [PATCH] r8169: keep firmware in memory.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
commit f1e02ed109df5f99abf942b8ccc99960cb09dd38 upstream.
The firmware agent is not available during resume. Loading the firmware
during open() (see eee3a96c6368f47df8df5bd4ed1843600652b337) is not
enough.
close() is run during resume through rtl8169_reset_task(), whence the
mildly natural release of firmware in the driver removal method instead.
It will help with http://bugs.debian.org/609538. It will not avoid
the 60 seconds delay when:
- there is no firmware
- the driver is loaded and the device is not up before a suspend/resume
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Tested-by: Jarek Kamiński <jarek@vilo.eu.org>
Cc: Hayes <hayeswang@realtek.com>
Cc: Ben Hutchings <benh@debian.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
drivers/net/r8169.c | 43 +++++++++++++++++++++++++++++++------------
1 files changed, 31 insertions(+), 12 deletions(-)
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index 49a6db6..a5b0271 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -508,6 +508,8 @@ struct rtl8169_private {
struct mii_if_info mii;
struct rtl8169_counters counters;
u32 saved_wolopts;
+
+ const struct firmware *fw;
};
MODULE_AUTHOR("Realtek and the Linux r8169 crew <netdev@vger.kernel.org>");
@@ -1458,6 +1460,29 @@ rtl_phy_write_fw(struct rtl8169_private *tp, const struct firmware *fw)
}
}
+static void rtl_release_firmware(struct rtl8169_private *tp)
+{
+ release_firmware(tp->fw);
+ tp->fw = NULL;
+}
+
+static int rtl_apply_firmware(struct rtl8169_private *tp, const char *fw_name)
+{
+ const struct firmware **fw = &tp->fw;
+ int rc = !*fw;
+
+ if (rc) {
+ rc = request_firmware(fw, fw_name, &tp->pci_dev->dev);
+ if (rc < 0)
+ goto out;
+ }
+
+ /* TODO: release firmware once rtl_phy_write_fw signals failures. */
+ rtl_phy_write_fw(tp, *fw);
+out:
+ return rc;
+}
+
static void rtl8169s_hw_phy_config(void __iomem *ioaddr)
{
static const struct phy_reg phy_reg_init[] = {
@@ -1833,7 +1858,6 @@ static void rtl8168d_1_hw_phy_config(struct rtl8169_private *tp)
{ 0x0d, 0xf880 }
};
void __iomem *ioaddr = tp->mmio_addr;
- const struct firmware *fw;
rtl_phy_write(ioaddr, phy_reg_init_0, ARRAY_SIZE(phy_reg_init_0));
@@ -1897,11 +1921,8 @@ static void rtl8168d_1_hw_phy_config(struct rtl8169_private *tp)
mdio_write(ioaddr, 0x1f, 0x0005);
mdio_write(ioaddr, 0x05, 0x001b);
- if (mdio_read(ioaddr, 0x06) == 0xbf00 &&
- request_firmware(&fw, FIRMWARE_8168D_1, &tp->pci_dev->dev) == 0) {
- rtl_phy_write_fw(tp, fw);
- release_firmware(fw);
- } else {
+ if ((mdio_read(ioaddr, 0x06) != 0xbf00) ||
+ (rtl_apply_firmware(tp, FIRMWARE_8168D_1) < 0)) {
netif_warn(tp, probe, tp->dev, "unable to apply firmware patch\n");
}
@@ -1951,7 +1972,6 @@ static void rtl8168d_2_hw_phy_config(struct rtl8169_private *tp)
{ 0x0d, 0xf880 }
};
void __iomem *ioaddr = tp->mmio_addr;
- const struct firmware *fw;
rtl_phy_write(ioaddr, phy_reg_init_0, ARRAY_SIZE(phy_reg_init_0));
@@ -2006,11 +2026,8 @@ static void rtl8168d_2_hw_phy_config(struct rtl8169_private *tp)
mdio_write(ioaddr, 0x1f, 0x0005);
mdio_write(ioaddr, 0x05, 0x001b);
- if (mdio_read(ioaddr, 0x06) == 0xb300 &&
- request_firmware(&fw, FIRMWARE_8168D_2, &tp->pci_dev->dev) == 0) {
- rtl_phy_write_fw(tp, fw);
- release_firmware(fw);
- } else {
+ if ((mdio_read(ioaddr, 0x06) != 0xb300) ||
+ (rtl_apply_firmware(tp, FIRMWARE_8168D_2) < 0)) {
netif_warn(tp, probe, tp->dev, "unable to apply firmware patch\n");
}
@@ -2706,6 +2723,8 @@ static void __devexit rtl8169_remove_one(struct pci_dev *pdev)
flush_scheduled_work();
+ rtl_release_firmware(tp);
+
unregister_netdev(dev);
if (pci_dev_run_wake(pdev))
--
1.7.2.3

View File

@ -1,72 +0,0 @@
From 991f3c04fdbd9084935be1e16aef55f610f35b0c Mon Sep 17 00:00:00 2001
From: Ben Hutchings <ben@decadent.org.uk>
Date: Fri, 10 Dec 2010 02:45:03 +0000
Subject: [PATCH 1/4] arm/ixp4xx: Rename FREQ macro to avoid collisions
FREQ is a ridiculously short name for a platform-specific macro in a
generic header, and it now conflicts with an enumeration in the
gspca/ov519 driver.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
arch/arm/mach-ixp4xx/common.c | 4 ++--
arch/arm/mach-ixp4xx/include/mach/timex.h | 5 +++--
drivers/input/misc/ixp4xx-beeper.c | 6 +-----
3 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c
index 0bce097..f5c42fe 100644
--- a/arch/arm/mach-ixp4xx/common.c
+++ b/arch/arm/mach-ixp4xx/common.c
@@ -415,7 +415,7 @@ static struct clocksource clocksource_ixp4xx = {
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
};
-unsigned long ixp4xx_timer_freq = FREQ;
+unsigned long ixp4xx_timer_freq = IXP4XX_TIMER_FREQ;
EXPORT_SYMBOL(ixp4xx_timer_freq);
static void __init ixp4xx_clocksource_init(void)
{
@@ -491,7 +491,7 @@ static struct clock_event_device clockevent_ixp4xx = {
static void __init ixp4xx_clockevent_init(void)
{
- clockevent_ixp4xx.mult = div_sc(FREQ, NSEC_PER_SEC,
+ clockevent_ixp4xx.mult = div_sc(IXP4XX_TIMER_FREQ, NSEC_PER_SEC,
clockevent_ixp4xx.shift);
clockevent_ixp4xx.max_delta_ns =
clockevent_delta2ns(0xfffffffe, &clockevent_ixp4xx);
diff --git a/arch/arm/mach-ixp4xx/include/mach/timex.h b/arch/arm/mach-ixp4xx/include/mach/timex.h
index 2c3f93c..c9e930f 100644
--- a/arch/arm/mach-ixp4xx/include/mach/timex.h
+++ b/arch/arm/mach-ixp4xx/include/mach/timex.h
@@ -10,6 +10,7 @@
* 66.66... MHz. We do a convulted calculation of CLOCK_TICK_RATE b/c the
* timer register ignores the bottom 2 bits of the LATCH value.
*/
-#define FREQ 66666000
-#define CLOCK_TICK_RATE (((FREQ / HZ & ~IXP4XX_OST_RELOAD_MASK) + 1) * HZ)
+#define IXP4XX_TIMER_FREQ 66666000
+#define CLOCK_TICK_RATE \
+ (((IXP4XX_TIMER_FREQ / HZ & ~IXP4XX_OST_RELOAD_MASK) + 1) * HZ)
diff --git a/drivers/input/misc/ixp4xx-beeper.c b/drivers/input/misc/ixp4xx-beeper.c
index 9dfd6e5..1f38302 100644
--- a/drivers/input/misc/ixp4xx-beeper.c
+++ b/drivers/input/misc/ixp4xx-beeper.c
@@ -69,11 +69,7 @@ static int ixp4xx_spkr_event(struct input_dev *dev, unsigned int type, unsigned
}
if (value > 20 && value < 32767)
-#ifndef FREQ
- count = (ixp4xx_get_board_tick_rate() / (value * 4)) - 1;
-#else
- count = (FREQ / (value * 4)) - 1;
-#endif
+ count = (IXP4XX_TIMER_FREQ / (value * 4)) - 1;
ixp4xx_spkr_control(pin, count);
--
1.7.2.3

View File

@ -1,10 +0,0 @@
--- a/arch/arm/mach-ixp4xx/common-pci.c 2010-11-08 09:42:38.000000000 +0000
+++ b/arch/arm/mach-ixp4xx/common-pci.c 2010-11-08 09:42:53.000000000 +0000
@@ -511,6 +511,7 @@
return -EIO;
}
+EXPORT_SYMBOL(dma_set_coherent_mask);
EXPORT_SYMBOL(ixp4xx_pci_read);
EXPORT_SYMBOL(ixp4xx_pci_write);

View File

@ -1,30 +0,0 @@
From 24ee7d79c5885275a531431c3b687b3a7919eee4 Mon Sep 17 00:00:00 2001
From: Aurelien Jarno <aurelien@aurel32.net>
Date: Tue, 18 Jan 2011 20:55:34 +0000
Subject: [PATCH] sh: Fix sh build failure when CONFIG_SFC=m
CONFIG_SFC=m uses topology_core_cpumask() which, for sh, expects
cpu_core_map to be exported. It is not. This patch exports the needed
symbol.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
---
arch/sh/kernel/topology.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/arch/sh/kernel/topology.c b/arch/sh/kernel/topology.c
index 948fdb6..38e8628 100644
--- a/arch/sh/kernel/topology.c
+++ b/arch/sh/kernel/topology.c
@@ -17,6 +17,7 @@
static DEFINE_PER_CPU(struct cpu, cpu_devices);
cpumask_t cpu_core_map[NR_CPUS];
+EXPORT_SYMBOL(cpu_core_map);
static cpumask_t cpu_coregroup_map(unsigned int cpu)
{
--
1.7.3.5

View File

@ -1,136 +0,0 @@
From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Subject: introduce __u64_aligned and U64_ALIGN() for structure alignment in custom sections (v3)
Date: Fri, 21 Jan 2011 15:36:31 -0500
Problem description:
gcc happily align on 32-byte structures defined statically. Ftrace trace events
and Tracepoints both statically define structures into custom sections (using
the "section" attribute), to then assign these to symbols with the linker
scripts to iterate the these sections as an array.
However, gcc uses different alignments for these structures when they are
defined statically than when they are globally visible and/or in an array.
Therefore iteration on these arrays sees "holes" of padding. gcc is within its
rights to increase the alignment of the statically defined structures because,
normally, there should be no other accesses to them than in the local object. We
are actually iterating on the generated structures as if they were an array
without letting gcc knowing anything about it.
This patch introduces __u64_aligned to force gcc to use the u64 type and
variable alignment, up-aligning or down-aligning the target type if necessary.
The memory accesses to the target structure are efficient (does not require
bytewise memory accesses) and the atomic pointer update guarantees required by
RCU are kept. u64 is considered as the largest type that can generate a trap for
unaligned accesses (u64 on sparc32 needs to be aligned on 64-bit).
This alignment should be used for both structure definitions and declarations
(as *both* the type and variable attribute) when using the "section"
attribute to generate arrays of structures. Given that gcc only uses the type
attribute "aligned" as a lower-bound for alignment, the structures should not
contain types which require alignment larger than that of u64. The "aligned"
variable attribute, on the other hand, forces gcc to use exactly the specified
alignment.
Also introduce the linker script U64_ALIGN() macro for specification of custom
section alignment that matches that of __u64_aligned.
Changelog since v2:
- Drop the "packed" type attribute, because it causes gcc to drop the padding
between consecutive "int" and "pointer"/"long" fields, which leads to
unaligned accesses on sparc64.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: David Miller <davem@davemloft.net>
CC: Steven Rostedt <rostedt@goodmis.org>
CC: Frederic Weisbecker <fweisbec@gmail.com>
CC: Ingo Molnar <mingo@elte.hu>
---
include/asm-generic/vmlinux.lds.h | 6 ++++
include/linux/align-section.h | 54 ++++++++++++++++++++++++++++++++++++++
include/linux/compiler.h | 2 +
3 files changed, 62 insertions(+)
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -57,6 +57,8 @@ extern void __chk_io_ptr(const volatile
# include <linux/compiler-intel.h>
#endif
+#include <linux/align-section.h>
+
/*
* Generic compiler-dependent macros required for kernel
* build go below this comment. Actual compiler/compiler version
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -69,6 +69,12 @@
*/
#define STRUCT_ALIGN() . = ALIGN(32)
+/*
+ * Align to a 8 byte boundary. For use with custom section made from structures
+ * declared and defined with __u64_aligned.
+ */
+#define U64_ALIGN() . = ALIGN(8)
+
/* The actual configuration determine if the init/exit sections
* are handled as text/data or they can be discarded (which
* often happens at runtime)
--- /dev/null
+++ b/include/linux/align-section.h
@@ -0,0 +1,54 @@
+#ifndef _LINUX_ALIGN_SECTION_H
+#define _LINUX_ALIGN_SECTION_H
+
+/*
+ * __u64_aligned:
+ *
+ * __u64_aligned should be used as type and variable attribute for structure
+ * definitions when using the "section" attribute to generate arrays of
+ * structures. U64_ALIGN() must be used prior to these section definitions in
+ * the linker script.
+ *
+ * It forces the compiler to use the u64 type alignment, up-aligning or
+ * down-aligning the target type if necessary. The memory accesses to the target
+ * structure are efficient (does not require bytewise memory accesses) and the
+ * atomic pointer update guarantees required by RCU are kept. u64 is considered
+ * as the largest type that can generate a trap for unaligned accesses (u64 on
+ * sparc32 needs to be aligned on 64-bit).
+ *
+ * Given that gcc only uses the type attribute "aligned" as a lower-bound for
+ * alignment, the structures should not contain types which require alignment
+ * larger than that of u64. The "aligned" variable attribute, on the other hand,
+ * forces gcc to use exactly the specified alignment.
+ */
+
+/*
+ * Use __u64_aligned as type and variable attribute for custom section structure
+ * declaration and definition. It should also be applied to any static or
+ * extern definition of the structure that would override the definition to
+ * which the "section" attribute is applied, e.g.
+ *
+ * struct custom {
+ * unsigned long field;
+ * ...
+ * } __u64_aligned;
+ *
+ * extern struct __u64_aligned custom;
+ * struct custom __u64_aligned __attribute__((section("__custom")) identifier;
+ *
+ * The array can then be defined with:
+ *
+ * extern struct custom __start___custom[];
+ * extern struct custom __stop___custom[];
+ *
+ * With linking performed by the linker script:
+ *
+ * U64_ALIGN();
+ * VMLINUX_SYMBOL(__start___custom) = .;
+ * *(__custom)
+ * VMLINUX_SYMBOL(__stop___custom) = .;
+ */
+
+#define __u64_aligned __attribute__((__aligned__(__alignof__(long long))))
+
+#endif /* _LINUX_ALIGN_SECTION_H */

View File

@ -1,283 +0,0 @@
From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Subject: tracing: fix sparc64 alignment crash with __u64_aligned/U64_ALIGN()
Date: Fri, 21 Jan 2011 15:36:32 -0500
Problem description:
gcc happily align structures defined statically on 32-byte. Ftrace trace events
and Tracepoints both statically define structures into sections (using the
"section" attribute), to then assign these to symbols with the linker scripts to
iterate the these sections as an array.
However, gcc uses different alignments for these structures when they are
defined statically and when they are globally visible and/or in an array.
Therefore iteration on these arrays sees "holes" of padding.
Use the __u64_aligned for type declarations and variable definitions to ensure
that gcc:
a) iterates on the correctly aligned type. (type attribute)
b) generates the definitions within the sections with the appropriate alignment.
(variable attribute)
The Ftrace code introduced the "aligned(4)" variable attribute in commit
1473e4417c79f12d91ef91a469699bfa911f510f to try to work around this problem that
showed up on x86_64, but it causes unaligned accesses on sparc64, and is
generally a bad idea on 64-bit if RCU pointers are contained within the
structure. Moreover, it did not use the same attribute as type attribute, which
could cause the iteration on the extern array structure not to match the
variable definitions for some structure sizes.
We should also ensure proper alignment of each Ftrace section in
include/asm-generic/vmlinux.lds.h.
Moving all STRUCT_ALIGN() for FTRACE_EVENTS() and TRACE_SYSCALLS() into the
definitions, so the alignment is only done if these infrastructures are
configured in. Use U64_ALIGN instead of STRUCT_ALIGN.
Also align TRACE_PRINTKS on U64_ALIGN to make sure the beginning of the section
is aligned on pointer size.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: David Miller <davem@davemloft.net>
CC: Steven Rostedt <rostedt@goodmis.org>
CC: Frederic Weisbecker <fweisbec@gmail.com>
CC: Ingo Molnar <mingo@elte.hu>
---
include/asm-generic/vmlinux.lds.h | 19 ++++++++++---------
include/linux/compiler.h | 6 +++---
include/linux/ftrace_event.h | 2 +-
include/linux/syscalls.h | 18 ++++++++----------
include/trace/ftrace.h | 8 ++++----
include/trace/syscall.h | 2 +-
kernel/trace/trace.h | 2 +-
kernel/trace/trace_export.c | 2 +-
8 files changed, 29 insertions(+), 30 deletions(-)
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -80,7 +80,7 @@ struct ftrace_branch_data {
};
unsigned long miss_hit[2];
};
-};
+} __u64_aligned;
/*
* Note: DISABLE_BRANCH_PROFILING can be used by special lowlevel code
@@ -96,7 +96,7 @@ void ftrace_likely_update(struct ftrace_
#define __branch_check__(x, expect) ({ \
int ______r; \
static struct ftrace_branch_data \
- __attribute__((__aligned__(4))) \
+ __u64_aligned \
__attribute__((section("_ftrace_annotated_branch"))) \
______f = { \
.func = __func__, \
@@ -131,7 +131,7 @@ void ftrace_likely_update(struct ftrace_
({ \
int ______r; \
static struct ftrace_branch_data \
- __attribute__((__aligned__(4))) \
+ __u64_aligned \
__attribute__((section("_ftrace_branch"))) \
______f = { \
.func = __func__, \
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -126,12 +126,11 @@ extern struct trace_event_functions exit
#define SYSCALL_TRACE_ENTER_EVENT(sname) \
static struct syscall_metadata \
- __attribute__((__aligned__(4))) __syscall_meta_##sname; \
+ __u64_aligned __syscall_meta_##sname; \
static struct ftrace_event_call \
- __attribute__((__aligned__(4))) event_enter_##sname; \
+ __u64_aligned event_enter_##sname; \
static struct ftrace_event_call __used \
- __attribute__((__aligned__(4))) \
- __attribute__((section("_ftrace_events"))) \
+ __u64_aligned __attribute__((section("_ftrace_events"))) \
event_enter_##sname = { \
.name = "sys_enter"#sname, \
.class = &event_class_syscall_enter, \
@@ -141,12 +140,11 @@ extern struct trace_event_functions exit
#define SYSCALL_TRACE_EXIT_EVENT(sname) \
static struct syscall_metadata \
- __attribute__((__aligned__(4))) __syscall_meta_##sname; \
+ __u64_aligned __syscall_meta_##sname; \
static struct ftrace_event_call \
- __attribute__((__aligned__(4))) event_exit_##sname; \
+ __u64_aligned event_exit_##sname; \
static struct ftrace_event_call __used \
- __attribute__((__aligned__(4))) \
- __attribute__((section("_ftrace_events"))) \
+ __u64_aligned __attribute__((section("_ftrace_events"))) \
event_exit_##sname = { \
.name = "sys_exit"#sname, \
.class = &event_class_syscall_exit, \
@@ -158,7 +156,7 @@ extern struct trace_event_functions exit
SYSCALL_TRACE_ENTER_EVENT(sname); \
SYSCALL_TRACE_EXIT_EVENT(sname); \
static struct syscall_metadata __used \
- __attribute__((__aligned__(4))) \
+ __u64_aligned \
__attribute__((section("__syscalls_metadata"))) \
__syscall_meta_##sname = { \
.name = "sys"#sname, \
@@ -174,7 +172,7 @@ extern struct trace_event_functions exit
SYSCALL_TRACE_ENTER_EVENT(_##sname); \
SYSCALL_TRACE_EXIT_EVENT(_##sname); \
static struct syscall_metadata __used \
- __attribute__((__aligned__(4))) \
+ __u64_aligned \
__attribute__((section("__syscalls_metadata"))) \
__syscall_meta__##sname = { \
.name = "sys_"#sname, \
--- a/include/trace/ftrace.h
+++ b/include/trace/ftrace.h
@@ -69,7 +69,7 @@
#undef DEFINE_EVENT
#define DEFINE_EVENT(template, name, proto, args) \
static struct ftrace_event_call __used \
- __attribute__((__aligned__(4))) event_##name
+ __u64_aligned event_##name;
#undef DEFINE_EVENT_PRINT
#define DEFINE_EVENT_PRINT(template, name, proto, args, print) \
@@ -434,7 +434,7 @@ static inline notrace int ftrace_get_off
* };
*
* static struct ftrace_event_call __used
- * __attribute__((__aligned__(4)))
+ * __u64_aligned
* __attribute__((section("_ftrace_events"))) event_<call> = {
* .name = "<call>",
* .class = event_class_<template>,
@@ -567,7 +567,7 @@ static struct ftrace_event_class __used
#define DEFINE_EVENT(template, call, proto, args) \
\
static struct ftrace_event_call __used \
-__attribute__((__aligned__(4))) \
+__u64_aligned \
__attribute__((section("_ftrace_events"))) event_##call = { \
.name = #call, \
.class = &event_class_##template, \
@@ -581,7 +581,7 @@ __attribute__((section("_ftrace_events")
static const char print_fmt_##call[] = print; \
\
static struct ftrace_event_call __used \
-__attribute__((__aligned__(4))) \
+__u64_aligned \
__attribute__((section("_ftrace_events"))) event_##call = { \
.name = #call, \
.class = &event_class_##template, \
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -749,7 +749,7 @@ extern const char *__stop___trace_bprint
#undef FTRACE_ENTRY
#define FTRACE_ENTRY(call, struct_name, id, tstruct, print) \
extern struct ftrace_event_call \
- __attribute__((__aligned__(4))) event_##call;
+ __u64_aligned event_##call;
#undef FTRACE_ENTRY_DUP
#define FTRACE_ENTRY_DUP(call, struct_name, id, tstruct, print) \
FTRACE_ENTRY(call, struct_name, id, PARAMS(tstruct), PARAMS(print))
--- a/kernel/trace/trace_export.c
+++ b/kernel/trace/trace_export.c
@@ -156,7 +156,7 @@ struct ftrace_event_class event_class_ft
}; \
\
struct ftrace_event_call __used \
-__attribute__((__aligned__(4))) \
+__u64_aligned \
__attribute__((section("_ftrace_events"))) event_##call = { \
.name = #call, \
.event.type = etype, \
--- a/include/linux/ftrace_event.h
+++ b/include/linux/ftrace_event.h
@@ -194,7 +194,7 @@ struct ftrace_event_call {
int perf_refcount;
struct hlist_head __percpu *perf_events;
#endif
-};
+} __u64_aligned;
#define PERF_MAX_TRACE_SIZE 2048
--- a/include/trace/syscall.h
+++ b/include/trace/syscall.h
@@ -29,7 +29,7 @@ struct syscall_metadata {
struct ftrace_event_call *enter_event;
struct ftrace_event_call *exit_event;
-};
+} __u64_aligned;
#ifdef CONFIG_FTRACE_SYSCALLS
extern unsigned long arch_syscall_addr(int nr);
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -113,7 +113,8 @@
#endif
#ifdef CONFIG_TRACE_BRANCH_PROFILING
-#define LIKELY_PROFILE() VMLINUX_SYMBOL(__start_annotated_branch_profile) = .; \
+#define LIKELY_PROFILE() U64_ALIGN(); \
+ VMLINUX_SYMBOL(__start_annotated_branch_profile) = .; \
*(_ftrace_annotated_branch) \
VMLINUX_SYMBOL(__stop_annotated_branch_profile) = .;
#else
@@ -121,7 +122,8 @@
#endif
#ifdef CONFIG_PROFILE_ALL_BRANCHES
-#define BRANCH_PROFILE() VMLINUX_SYMBOL(__start_branch_profile) = .; \
+#define BRANCH_PROFILE() U64_ALIGN(); \
+ VMLINUX_SYMBOL(__start_branch_profile) = .; \
*(_ftrace_branch) \
VMLINUX_SYMBOL(__stop_branch_profile) = .;
#else
@@ -129,7 +131,8 @@
#endif
#ifdef CONFIG_EVENT_TRACING
-#define FTRACE_EVENTS() VMLINUX_SYMBOL(__start_ftrace_events) = .; \
+#define FTRACE_EVENTS() U64_ALIGN(); \
+ VMLINUX_SYMBOL(__start_ftrace_events) = .; \
*(_ftrace_events) \
VMLINUX_SYMBOL(__stop_ftrace_events) = .;
#else
@@ -137,7 +140,8 @@
#endif
#ifdef CONFIG_TRACING
-#define TRACE_PRINTKS() VMLINUX_SYMBOL(__start___trace_bprintk_fmt) = .; \
+#define TRACE_PRINTKS() U64_ALIGN(); \
+ VMLINUX_SYMBOL(__start___trace_bprintk_fmt) = .; \
*(__trace_printk_fmt) /* Trace_printk fmt' pointer */ \
VMLINUX_SYMBOL(__stop___trace_bprintk_fmt) = .;
#else
@@ -145,7 +149,8 @@
#endif
#ifdef CONFIG_FTRACE_SYSCALLS
-#define TRACE_SYSCALLS() VMLINUX_SYMBOL(__start_syscalls_metadata) = .; \
+#define TRACE_SYSCALLS() U64_ALIGN(); \
+ VMLINUX_SYMBOL(__start_syscalls_metadata) = .; \
*(__syscalls_metadata) \
VMLINUX_SYMBOL(__stop_syscalls_metadata) = .;
#else
@@ -175,11 +180,7 @@
LIKELY_PROFILE() \
BRANCH_PROFILE() \
TRACE_PRINTKS() \
- \
- STRUCT_ALIGN(); \
FTRACE_EVENTS() \
- \
- STRUCT_ALIGN(); \
TRACE_SYSCALLS()
/*

View File

@ -1,68 +0,0 @@
From 42663d4b49617c17c75c347b6927630cfd5a715e Mon Sep 17 00:00:00 2001
From: Ben Hutchings <ben@decadent.org.uk>
Date: Fri, 10 Dec 2010 02:34:49 +0000
Subject: [PATCH 2/4] alpha: Do not use -Werror for arch/alpha
The alpha headers for I/O currently have illegal combinations of
extern inline and static inline functions calling each other. Make
the warnings non-fatal for now.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
arch/alpha/kernel/Makefile | 2 +-
arch/alpha/lib/Makefile | 1 -
arch/alpha/mm/Makefile | 2 --
arch/alpha/oprofile/Makefile | 2 +-
4 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/arch/alpha/kernel/Makefile b/arch/alpha/kernel/Makefile
index 1ee9b5b..1c77b1c 100644
--- a/arch/alpha/kernel/Makefile
+++ b/arch/alpha/kernel/Makefile
@@ -4,7 +4,7 @@
extra-y := head.o vmlinux.lds
EXTRA_AFLAGS := $(KBUILD_CFLAGS)
-EXTRA_CFLAGS := -Werror -Wno-sign-compare
+EXTRA_CFLAGS := -Wno-sign-compare
obj-y := entry.o traps.o process.o init_task.o osf_sys.o irq.o \
irq_alpha.o signal.o setup.o ptrace.o time.o \
diff --git a/arch/alpha/lib/Makefile b/arch/alpha/lib/Makefile
index 9b72c59..a2723cb 100644
--- a/arch/alpha/lib/Makefile
+++ b/arch/alpha/lib/Makefile
@@ -3,7 +3,6 @@
#
EXTRA_AFLAGS := $(KBUILD_CFLAGS)
-EXTRA_CFLAGS := -Werror
# Many of these routines have implementations tuned for ev6.
# Choose them iff we're targeting ev6 specifically.
diff --git a/arch/alpha/mm/Makefile b/arch/alpha/mm/Makefile
index 09399c5..ec693be 100644
--- a/arch/alpha/mm/Makefile
+++ b/arch/alpha/mm/Makefile
@@ -2,8 +2,6 @@
# Makefile for the linux alpha-specific parts of the memory manager.
#
-EXTRA_CFLAGS := -Werror
-
obj-y := init.o fault.o extable.o
obj-$(CONFIG_DISCONTIGMEM) += numa.o
diff --git a/arch/alpha/oprofile/Makefile b/arch/alpha/oprofile/Makefile
index 4aa5624..74cb06e 100644
--- a/arch/alpha/oprofile/Makefile
+++ b/arch/alpha/oprofile/Makefile
@@ -1,4 +1,4 @@
-EXTRA_CFLAGS := -Werror -Wno-sign-compare
+EXTRA_CFLAGS := -Wno-sign-compare
obj-$(CONFIG_OPROFILE) += oprofile.o
--
1.7.2.3

View File

@ -43,10 +43,7 @@ rm drivers/net/appletalk/cops.h
rm drivers/net/appletalk/cops_ffdrv.h
rm drivers/net/appletalk/cops_ltdrv.h
unifdef drivers/net/r8169.c -UREMOVE_DFSG
# For next version
#rm drivers/staging/ft1000/ft1000-pcmcia/boot.h
rm drivers/staging/ft1000/ft1000-pcmcia/boot.h
rm drivers/staging/keucr/init.h

View File

@ -18,13 +18,13 @@ index 1c00d05..3bf888d 100644
- adaptec/starfire_tx.bin
fw-shipped-$(CONFIG_ATARI_DSP56K) += dsp56k/bootstrap.bin
-fw-shipped-$(CONFIG_ATM_AMBASSADOR) += atmsar11.fw
-fw-shipped-$(CONFIG_BNX2X) += bnx2x/bnx2x-e1-6.0.34.0.fw \
- bnx2x/bnx2x-e1h-6.0.34.0.fw \
- bnx2x/bnx2x-e2-6.0.34.0.fw
-fw-shipped-$(CONFIG_BNX2) += bnx2/bnx2-mips-09-6.0.17.fw \
-fw-shipped-$(CONFIG_BNX2X) += bnx2x/bnx2x-e1-6.2.5.0.fw \
- bnx2x/bnx2x-e1h-6.2.5.0.fw \
- bnx2x/bnx2x-e2-6.2.5.0.fw
-fw-shipped-$(CONFIG_BNX2) += bnx2/bnx2-mips-09-6.2.1.fw \
- bnx2/bnx2-rv2p-09-6.0.17.fw \
- bnx2/bnx2-rv2p-09ax-6.0.17.fw \
- bnx2/bnx2-mips-06-6.0.15.fw \
- bnx2/bnx2-mips-06-6.2.1.fw \
- bnx2/bnx2-rv2p-06-6.0.15.fw
-fw-shipped-$(CONFIG_CASSINI) += sun/cassini.bin
-fw-shipped-$(CONFIG_COMPUTONE) += intelliport2.bin

View File

@ -1,68 +0,0 @@
From 8ee9e3b6b1f41934a67567aaefae986ff517587e Mon Sep 17 00:00:00 2001
From: Ben Hutchings <ben@decadent.org.uk>
Date: Tue, 3 Nov 2009 23:58:25 +0000
Subject: [PATCH 21/24] r8169: mark firmware for removal and mark code using it as broken
---
drivers/net/r8169.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index fa49356..3495ff6 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -1719,6 +1719,7 @@ static void rtl8168d_1_hw_phy_config(void __iomem *ioaddr)
{ 0x05, 0x8332 },
{ 0x06, 0x5561 }
};
+#ifdef REMOVE_DFSG
static const struct phy_reg phy_reg_init_2[] = {
{ 0x1f, 0x0005 },
{ 0x05, 0xffc2 },
@@ -2074,6 +2075,7 @@ static void rtl8168d_1_hw_phy_config(void __iomem *ioaddr)
{ 0x0d, 0xf880 },
{ 0x1f, 0x0000 }
};
+#endif
rtl_phy_write(ioaddr, phy_reg_init_0, ARRAY_SIZE(phy_reg_init_0));
@@ -2131,7 +2133,9 @@ static void rtl8168d_1_hw_phy_config(void __iomem *ioaddr)
mdio_plus_minus(ioaddr, 0x02, 0x0100, 0x0600);
mdio_plus_minus(ioaddr, 0x03, 0x0000, 0xe000);
+#ifdef CONFIG_BROKEN
rtl_phy_write(ioaddr, phy_reg_init_2, ARRAY_SIZE(phy_reg_init_2));
+#endif
}
static void rtl8168d_2_hw_phy_config(void __iomem *ioaddr)
@@ -2161,6 +2165,7 @@ static void rtl8168d_2_hw_phy_config(void __iomem *ioaddr)
{ 0x05, 0x8332 },
{ 0x06, 0x5561 }
};
+#ifdef REMOVE_DFSG
static const struct phy_reg phy_reg_init_1[] = {
{ 0x1f, 0x0005 },
{ 0x05, 0xffc2 },
@@ -2473,6 +2478,7 @@ static void rtl8168d_2_hw_phy_config(void __iomem *ioaddr)
{ 0x0d, 0xf880 },
{ 0x1f, 0x0000 }
};
+#endif
rtl_phy_write(ioaddr, phy_reg_init_0, ARRAY_SIZE(phy_reg_init_0));
@@ -2526,7 +2532,9 @@ static void rtl8168d_2_hw_phy_config(void __iomem *ioaddr)
mdio_write(ioaddr, 0x1f, 0x0002);
mdio_patch(ioaddr, 0x0f, 0x0017);
+#ifdef CONFIG_BROKEN
rtl_phy_write(ioaddr, phy_reg_init_1, ARRAY_SIZE(phy_reg_init_1));
+#endif
}
static void rtl8168d_3_hw_phy_config(void __iomem *ioaddr)
--
1.6.5.2

View File

@ -37,8 +37,8 @@
-endif
-
KCONFIG_CONFIG ?= .config
export KCONFIG_CONFIG
# SHELL used by kbuild
@@ -340,6 +311,36 @@ LDFLAGS_MODULE =
AFLAGS_KERNEL =
CFLAGS_GCOV = -fprofile-arcs -ftest-coverage

View File

@ -1,14 +1,14 @@
--- a/drivers/tty/sysrq.c
+++ b/drivers/tty/sysrq.c
@@ -43,7 +43,7 @@
#include <asm/irq_regs.h>
--- a/include/linux/sysrq.h
+++ b/include/linux/sysrq.h
@@ -18,7 +18,7 @@
#include <linux/types.h>
/* Whether we react on sysrq keys or just ignore them */
-static int __read_mostly sysrq_enabled = 1;
+static int __read_mostly sysrq_enabled = CONFIG_MAGIC_SYSRQ_DEFAULT_MASK;
static bool __read_mostly sysrq_always_enabled;
/* Enable/disable SYSRQ support by default (0==no, 1==yes). */
-#define SYSRQ_DEFAULT_ENABLE 1
+#define SYSRQ_DEFAULT_ENABLE CONFIG_MAGIC_SYSRQ_DEFAULT_MASK
static bool sysrq_on(void)
/* Possible values of bitmask for enabling sysrq functions */
/* 0x0001 is reserved for enable everything */
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 234ceb1..415a834 100644
--- a/lib/Kconfig.debug

View File

@ -65,7 +65,7 @@ index 5459a38..f4752b4 100644
+ if (sym && (sym->flags & SYMBOL_NEW) &&
+ sym_is_changable(sym) && sym->name && !sym_is_choice_value(sym)) {
+ if (verbose)
+ conf_write_symbol(sym, sym->type, stdout, true);
+ conf_write_symbol(sym, stdout, true);
+ else
+ printf("CONFIG_%s\n", sym->name);
+ }
@ -112,14 +112,12 @@ diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index c06f150..fbbacac 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -440,8 +440,8 @@ static void conf_write_string(bool headerfile, const char *name,
@@ -440,7 +440,7 @@ static void conf_write_string(bool headerfile, const char *name,
fputs("\"\n", out);
}
-static void conf_write_symbol(struct symbol *sym, enum symbol_type type,
- FILE *out, bool write_no)
+void conf_write_symbol(struct symbol *sym, enum symbol_type type,
+ FILE *out, bool write_no)
-static void conf_write_symbol(struct symbol *sym, FILE *out, bool write_no)
+void conf_write_symbol(struct symbol *sym, FILE *out, bool write_no)
{
const char *str;
@ -152,7 +150,7 @@ index 17342fe..6da571b 100644
P(conf_write_defconfig,int,(const char *name));
P(conf_write,int,(const char *name));
P(conf_write_autoconf,int,(void));
+P(conf_write_symbol, void,(struct symbol*, enum symbol_type, FILE*, bool));
+P(conf_write_symbol, void,(struct symbol*, FILE*, bool));
P(conf_get_changed,bool,(void));
P(conf_set_changed_callback, void,(void (*fn)(void)));
P(conf_set_message_callback, void,(void (*fn)(const char *fmt, va_list ap)));

View File

@ -1,311 +0,0 @@
From: Francois Romieu <romieu@fr.zoreil.com>
Date: Mon, 3 Jan 2011 00:35:52 +0100
Subject: [PATCH] r8169: remove the firmware of RTL8111D.
commit bca03d5f32c8ee9b5cfa1d32640a63fded6cb3c0 upstream.
The binary file of the firmware is moved to linux-firmware repository.
The firmwares are rtl_nic/rtl8168d-1.fw and rtl_nic/rtl8168d-2.fw.
The driver goes along if the firmware couldn't be found. However, it
is suggested to be done with the suitable firmware.
Some wrong PHY parameters are directly corrected in the driver.
Simple firmware checking added per Ben Hutchings suggestion.
Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Ben Hutchings <benh@debian.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
[bwh: Adjust for Debian's 2.6.37]
---
drivers/net/Kconfig | 1 +
drivers/net/r8169.c | 157 ++++++++++++++++++++++++++++++++++++++++++++-------
2 files changed, 138 insertions(+), 20 deletions(-)
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 4f1755b..c647651 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -2233,6 +2233,7 @@ config YELLOWFIN
config R8169
tristate "Realtek 8169 gigabit ethernet support"
depends on PCI
+ select FW_LOADER
select CRC32
select MII
---help---
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index c9c6f0a..49a6db6 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -24,6 +24,7 @@
#include <linux/init.h>
#include <linux/dma-mapping.h>
#include <linux/pm_runtime.h>
+#include <linux/firmware.h>
#include <asm/system.h>
#include <asm/io.h>
@@ -33,6 +34,9 @@
#define MODULENAME "r8169"
#define PFX MODULENAME ": "
+#define FIRMWARE_8168D_1 "rtl_nic/rtl8168d-1.fw"
+#define FIRMWARE_8168D_2 "rtl_nic/rtl8168d-2.fw"
+
#ifdef RTL8169_DEBUG
#define assert(expr) \
if (!(expr)) { \
@@ -514,6 +518,8 @@ module_param_named(debug, debug.msg_enable, int, 0);
MODULE_PARM_DESC(debug, "Debug verbosity level (0=none, ..., 16=all)");
MODULE_LICENSE("GPL");
MODULE_VERSION(RTL8169_VERSION);
+MODULE_FIRMWARE(FIRMWARE_8168D_1);
+MODULE_FIRMWARE(FIRMWARE_8168D_2);
static int rtl8169_open(struct net_device *dev);
static netdev_tx_t rtl8169_start_xmit(struct sk_buff *skb,
@@ -1393,6 +1399,65 @@ static void rtl_phy_write(void __iomem *ioaddr, const struct phy_reg *regs, int
}
}
+#define PHY_READ 0x00000000
+#define PHY_DATA_OR 0x10000000
+#define PHY_DATA_AND 0x20000000
+#define PHY_BJMPN 0x30000000
+#define PHY_READ_EFUSE 0x40000000
+#define PHY_READ_MAC_BYTE 0x50000000
+#define PHY_WRITE_MAC_BYTE 0x60000000
+#define PHY_CLEAR_READCOUNT 0x70000000
+#define PHY_WRITE 0x80000000
+#define PHY_READCOUNT_EQ_SKIP 0x90000000
+#define PHY_COMP_EQ_SKIPN 0xa0000000
+#define PHY_COMP_NEQ_SKIPN 0xb0000000
+#define PHY_WRITE_PREVIOUS 0xc0000000
+#define PHY_SKIPN 0xd0000000
+#define PHY_DELAY_MS 0xe0000000
+#define PHY_WRITE_ERI_WORD 0xf0000000
+
+static void
+rtl_phy_write_fw(struct rtl8169_private *tp, const struct firmware *fw)
+{
+ void __iomem *ioaddr = tp->mmio_addr;
+ __le32 *phytable = (__le32 *)fw->data;
+ struct net_device *dev = tp->dev;
+ size_t i;
+
+ if (fw->size % sizeof(*phytable)) {
+ netif_err(tp, probe, dev, "odd sized firmware %zd\n", fw->size);
+ return;
+ }
+
+ for (i = 0; i < fw->size / sizeof(*phytable); i++) {
+ u32 action = le32_to_cpu(phytable[i]);
+
+ if (!action)
+ break;
+
+ if ((action & 0xf0000000) != PHY_WRITE) {
+ netif_err(tp, probe, dev,
+ "unknown action 0x%08x\n", action);
+ return;
+ }
+ }
+
+ while (i-- != 0) {
+ u32 action = le32_to_cpu(*phytable);
+ u32 data = action & 0x0000ffff;
+ u32 reg = (action & 0x0fff0000) >> 16;
+
+ switch(action & 0xf0000000) {
+ case PHY_WRITE:
+ mdio_write(ioaddr, reg, data);
+ phytable++;
+ break;
+ default:
+ BUG();
+ }
+ }
+}
+
static void rtl8169s_hw_phy_config(void __iomem *ioaddr)
{
static const struct phy_reg phy_reg_init[] = {
@@ -1725,9 +1790,10 @@ static void rtl8168c_4_hw_phy_config(void __iomem *ioaddr)
rtl8168c_3_hw_phy_config(ioaddr);
}
-static void rtl8168d_1_hw_phy_config(void __iomem *ioaddr)
+static void rtl8168d_1_hw_phy_config(struct rtl8169_private *tp)
{
static const struct phy_reg phy_reg_init_0[] = {
+ /* Channel Estimation */
{ 0x1f, 0x0001 },
{ 0x06, 0x4064 },
{ 0x07, 0x2863 },
@@ -1744,24 +1810,41 @@ static void rtl8168d_1_hw_phy_config(void __iomem *ioaddr)
{ 0x12, 0xf49f },
{ 0x13, 0x070b },
{ 0x1a, 0x05ad },
- { 0x14, 0x94c0 }
- };
- static const struct phy_reg phy_reg_init_1[] = {
+ { 0x14, 0x94c0 },
+
+ /*
+ * Tx Error Issue
+ * enhance line driver power
+ */
{ 0x1f, 0x0002 },
{ 0x06, 0x5561 },
{ 0x1f, 0x0005 },
{ 0x05, 0x8332 },
- { 0x06, 0x5561 }
+ { 0x06, 0x5561 },
+
+ /*
+ * Can not link to 1Gbps with bad cable
+ * Decrease SNR threshold form 21.07dB to 19.04dB
+ */
+ { 0x1f, 0x0001 },
+ { 0x17, 0x0cc0 },
+
+ { 0x1f, 0x0000 },
+ { 0x0d, 0xf880 }
};
+ void __iomem *ioaddr = tp->mmio_addr;
+ const struct firmware *fw;
rtl_phy_write(ioaddr, phy_reg_init_0, ARRAY_SIZE(phy_reg_init_0));
+ /*
+ * Rx Error Issue
+ * Fine Tune Switching regulator parameter
+ */
mdio_write(ioaddr, 0x1f, 0x0002);
mdio_plus_minus(ioaddr, 0x0b, 0x0010, 0x00ef);
mdio_plus_minus(ioaddr, 0x0c, 0xa200, 0x5d00);
- rtl_phy_write(ioaddr, phy_reg_init_1, ARRAY_SIZE(phy_reg_init_1));
-
if (rtl8168d_efuse_read(ioaddr, 0x01) == 0xb1) {
static const struct phy_reg phy_reg_init[] = {
{ 0x1f, 0x0002 },
@@ -1802,22 +1885,33 @@ static void rtl8168d_1_hw_phy_config(void __iomem *ioaddr)
rtl_phy_write(ioaddr, phy_reg_init, ARRAY_SIZE(phy_reg_init));
}
+ /* RSET couple improve */
mdio_write(ioaddr, 0x1f, 0x0002);
mdio_patch(ioaddr, 0x0d, 0x0300);
mdio_patch(ioaddr, 0x0f, 0x0010);
+ /* Fine tune PLL performance */
mdio_write(ioaddr, 0x1f, 0x0002);
mdio_plus_minus(ioaddr, 0x02, 0x0100, 0x0600);
mdio_plus_minus(ioaddr, 0x03, 0x0000, 0xe000);
-#ifdef CONFIG_BROKEN
- rtl_phy_write(ioaddr, phy_reg_init_2, ARRAY_SIZE(phy_reg_init_2));
-#endif
+ mdio_write(ioaddr, 0x1f, 0x0005);
+ mdio_write(ioaddr, 0x05, 0x001b);
+ if (mdio_read(ioaddr, 0x06) == 0xbf00 &&
+ request_firmware(&fw, FIRMWARE_8168D_1, &tp->pci_dev->dev) == 0) {
+ rtl_phy_write_fw(tp, fw);
+ release_firmware(fw);
+ } else {
+ netif_warn(tp, probe, tp->dev, "unable to apply firmware patch\n");
+ }
+
+ mdio_write(ioaddr, 0x1f, 0x0000);
}
-static void rtl8168d_2_hw_phy_config(void __iomem *ioaddr)
+static void rtl8168d_2_hw_phy_config(struct rtl8169_private *tp)
{
static const struct phy_reg phy_reg_init_0[] = {
+ /* Channel Estimation */
{ 0x1f, 0x0001 },
{ 0x06, 0x4064 },
{ 0x07, 0x2863 },
@@ -1836,12 +1930,28 @@ static void rtl8168d_2_hw_phy_config(void __iomem *ioaddr)
{ 0x1a, 0x05ad },
{ 0x14, 0x94c0 },
+ /*
+ * Tx Error Issue
+ * enhance line driver power
+ */
{ 0x1f, 0x0002 },
{ 0x06, 0x5561 },
{ 0x1f, 0x0005 },
{ 0x05, 0x8332 },
- { 0x06, 0x5561 }
+ { 0x06, 0x5561 },
+
+ /*
+ * Can not link to 1Gbps with bad cable
+ * Decrease SNR threshold form 21.07dB to 19.04dB
+ */
+ { 0x1f, 0x0001 },
+ { 0x17, 0x0cc0 },
+
+ { 0x1f, 0x0000 },
+ { 0x0d, 0xf880 }
};
+ void __iomem *ioaddr = tp->mmio_addr;
+ const struct firmware *fw;
rtl_phy_write(ioaddr, phy_reg_init_0, ARRAY_SIZE(phy_reg_init_0));
@@ -1885,19 +1995,26 @@ static void rtl8168d_2_hw_phy_config(void __iomem *ioaddr)
rtl_phy_write(ioaddr, phy_reg_init, ARRAY_SIZE(phy_reg_init));
}
+ /* Fine tune PLL performance */
mdio_write(ioaddr, 0x1f, 0x0002);
mdio_plus_minus(ioaddr, 0x02, 0x0100, 0x0600);
mdio_plus_minus(ioaddr, 0x03, 0x0000, 0xe000);
- mdio_write(ioaddr, 0x1f, 0x0001);
- mdio_write(ioaddr, 0x17, 0x0cc0);
-
+ /* Switching regulator Slew rate */
mdio_write(ioaddr, 0x1f, 0x0002);
mdio_patch(ioaddr, 0x0f, 0x0017);
-#ifdef CONFIG_BROKEN
- rtl_phy_write(ioaddr, phy_reg_init_1, ARRAY_SIZE(phy_reg_init_1));
-#endif
+ mdio_write(ioaddr, 0x1f, 0x0005);
+ mdio_write(ioaddr, 0x05, 0x001b);
+ if (mdio_read(ioaddr, 0x06) == 0xb300 &&
+ request_firmware(&fw, FIRMWARE_8168D_2, &tp->pci_dev->dev) == 0) {
+ rtl_phy_write_fw(tp, fw);
+ release_firmware(fw);
+ } else {
+ netif_warn(tp, probe, tp->dev, "unable to apply firmware patch\n");
+ }
+
+ mdio_write(ioaddr, 0x1f, 0x0000);
}
static void rtl8168d_3_hw_phy_config(void __iomem *ioaddr)
@@ -2035,10 +2152,10 @@ static void rtl_hw_phy_config(struct net_device *dev)
rtl8168cp_2_hw_phy_config(ioaddr);
break;
case RTL_GIGA_MAC_VER_25:
- rtl8168d_1_hw_phy_config(ioaddr);
+ rtl8168d_1_hw_phy_config(tp);
break;
case RTL_GIGA_MAC_VER_26:
- rtl8168d_2_hw_phy_config(ioaddr);
+ rtl8168d_2_hw_phy_config(tp);
break;
case RTL_GIGA_MAC_VER_27:
rtl8168d_3_hw_phy_config(ioaddr);
--
1.7.2.3

View File

@ -1,33 +0,0 @@
From: "Stefan Lippers-Hollmann" <s.L-H@gmx.de>
Subject: staging: r8712u: Fix external firmware loading
Date: Fri, 29 Oct 2010 22:03:36 +0200
* select FW_LOADER
* declare MODULE_FIRMWARE for r8712u
Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
---
drivers/staging/rtl8712/Kconfig | 1 +
drivers/staging/rtl8712/hal_init.c | 1 +
2 files changed, 2 insertions(+)
--- a/drivers/staging/rtl8712/Kconfig
+++ b/drivers/staging/rtl8712/Kconfig
@@ -3,6 +3,7 @@ config R8712U
depends on WLAN && USB
select WIRELESS_EXT
select WEXT_PRIV
+ select FW_LOADER
default N
---help---
This option adds the Realtek RTL8712 USB device such as the D-Link DWA-130.
--- a/drivers/staging/rtl8712/hal_init.c
+++ b/drivers/staging/rtl8712/hal_init.c
@@ -58,6 +58,7 @@ static u32 rtl871x_open_fw(struct _adapt
*ppmappedfw = (u8 *)((*praw)->data);
return (*praw)->size;
}
+MODULE_FIRMWARE("rtl8712u/rtl8712u.bin");
static void fill_fwpriv(struct _adapter *padapter, struct fw_priv *pfwpriv)
{

View File

@ -3,6 +3,7 @@ Date: Tue, 26 Oct 2010 10:59:11 -0500
Subject: [PATCH 1/2] staging: r8712u: Switch driver to use external firmware from linux-firmware
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
[bwh: Adjust context for 2.6.38]
---
drivers/staging/rtl8712/TODO | 2 --
drivers/staging/rtl8712/hal_init.c | 22 +++++++++++++++++-----
@ -12,10 +13,10 @@ diff --git a/drivers/staging/rtl8712/TODO b/drivers/staging/rtl8712/TODO
index 5c88821..ed22b0b 100644
--- a/drivers/staging/rtl8712/TODO
+++ b/drivers/staging/rtl8712/TODO
@@ -4,8 +4,6 @@ TODO:
@@ -4,7 +4,5 @@ TODO:
- switch to use LIB80211
- switch to use MAC80211
- checkpatch.pl fixes - only a few remain
- sparse fixes
-- switch from large inline firmware file to use the firmware interface
- and add the file to the linux-firmware package.

View File

@ -1,55 +0,0 @@
From: Arnaud Patard (Rtp) <arnaud.patard@rtp-net.org>
Date: Sat, 13 Nov 2010 17:51:53 +0000 (+0100)
Subject: ASoC: Add support for OpenRD Ultimate
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fbroonie%2Fsound-2.6.git;a=commitdiff_plain;h=3c9e28e751cf9969c2cb2e57b5573cab86cf521a
ASoC: Add support for OpenRD Ultimate
OpenRD Ultimate & Client are similar machines so enable OpenRD client sound
support on Ultimate too
Tested-by: Robas Teodor <teodor.robas@gmail.com>
Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
diff --git a/arch/arm/mach-kirkwood/openrd-setup.c b/arch/arm/mach-kirkwood/openrd-setup.c
index c9d77fa..cfcca41 100644
--- a/arch/arm/mach-kirkwood/openrd-setup.c
+++ b/arch/arm/mach-kirkwood/openrd-setup.c
@@ -94,7 +94,7 @@ static void __init openrd_init(void)
kirkwood_i2c_init();
- if (machine_is_openrd_client()) {
+ if (machine_is_openrd_client() || machine_is_openrd_ultimate()) {
i2c_register_board_info(0, i2c_board_info,
ARRAY_SIZE(i2c_board_info));
kirkwood_audio_init();
diff --git a/sound/soc/kirkwood/Kconfig b/sound/soc/kirkwood/Kconfig
index 54258fd..8f49e16 100644
--- a/sound/soc/kirkwood/Kconfig
+++ b/sound/soc/kirkwood/Kconfig
@@ -11,7 +11,7 @@ config SND_KIRKWOOD_SOC_I2S
config SND_KIRKWOOD_SOC_OPENRD
tristate "SoC Audio support for Kirkwood Openrd Client"
- depends on SND_KIRKWOOD_SOC && MACH_OPENRD_CLIENT
+ depends on SND_KIRKWOOD_SOC && (MACH_OPENRD_CLIENT || MACH_OPENRD_ULTIMATE)
select SND_KIRKWOOD_SOC_I2S
select SND_SOC_CS42L51
help
diff --git a/sound/soc/kirkwood/kirkwood-openrd.c b/sound/soc/kirkwood/kirkwood-openrd.c
index 9d7c81e..d863afb 100644
--- a/sound/soc/kirkwood/kirkwood-openrd.c
+++ b/sound/soc/kirkwood/kirkwood-openrd.c
@@ -91,7 +91,7 @@ static int __init openrd_client_init(void)
{
int ret;
- if (!machine_is_openrd_client())
+ if (!machine_is_openrd_client() && !machine_is_openrd_ultimate())
return 0;
openrd_client_snd_device = platform_device_alloc("soc-audio", -1);

View File

@ -1,7 +0,0 @@
- bugfix/arm/ixp4xx-add-missing-export.patch
+ bugfix/sh4/sh-export-topology-core-cpumask.patch
+ bugfix/all/r8169-keep-firmware-in-memory.patch
- features/all/r8712u-Fix-external-firmware-loading.patch
+ features/all/r8712u-Firmware-changes-for-driver.patch
+ bugfix/sparc/introduce-u64-aligned.patch
+ bugfix/sparc/tracing-use-u64-aligned-as-type-and-variable-attribute.patch

View File

@ -35,16 +35,7 @@
+ bugfix/mips/mips-ide-flush-dcache.patch
+ bugfix/all/qla4xxx-Fix-build-on-some-architectures-lacking-64-bit-I-O.patch
+ bugfix/x86/Skip-looking-for-ioapic-overrides-when-ioapics-are-not-present.patch
+ bugfix/arm/ixp4xx-add-missing-export.patch
+ features/arm/asoc-openrd-ultimate.patch
+ bugfix/all/dm-Deal-with-merge_bvec_fn-in-component-devices-bett.patch
+ features/all/Kbuild-kconfig-Verbose-version-of-listnewconfig.patch
+ bugfix/arm/arm-ixp4xx-Rename-FREQ-macro-to-avoid-collisions-2.patch
+ debian/alpha-Do-not-use-Werror-for-arch-alpha.patch
+ bugfix/all/drm-nouveau-Only-select-ACPI_VIDEO-if-its-dependenci.patch
+ bugfix/all/i2c-i801-Include-linux-slab.h.patch
+ features/all/r8712u-Switch-driver-to-use-external-firmware.patch
+ features/all/r8712u-Fix-external-firmware-loading.patch
+ bugfix/all/btrfs-Require-CAP_SYS_ADMIN-for-filesystem-rebalance.patch
+ features/all/r8169-remove-the-firmware-of-RTL8111D.patch
+ features/all/r8712u-Firmware-changes-for-driver.patch

View File

@ -5,7 +5,6 @@
+ debian/dfsg/drivers-staging-wlags49_h2-disable.patch
+ debian/dfsg/drivers-staging-wlags49_h25-disable.patch
+ debian/dfsg/firmware-cleanup.patch
+ debian/dfsg/r8169-rtl8168d-1-2-disable.patch
+ debian/dfsg/sound-pci.patch
X debian/dfsg/files-1
+ debian/dfsg/firmware-Sierra-Wireless-CIS-copyright.patch