nuke lenny backported features or bugfixes
svn path=/dists/trunk/linux-2.6/; revision=11929
This commit is contained in:
parent
4a6f5b6c8c
commit
cccb37c877
|
@ -1,36 +0,0 @@
|
|||
From 87d9173ea0c820021cf49e4c675b3821cfb4f0eb Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
||||
Date: Sat, 19 Jul 2008 00:35:43 -0400
|
||||
Subject: [PATCH] Input: i8042 - add Arima-Rioworks HDAMB board to noloop list
|
||||
|
||||
The board does not raise AUX IRQ in response to AUX LOOP command.
|
||||
|
||||
Reported-by: Guillaume Morin <guillaume@morinfr.org>
|
||||
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
|
||||
---
|
||||
drivers/input/serio/i8042-x86ia64io.h | 9 +++++++++
|
||||
1 files changed, 9 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h
|
||||
index 5d46d64..fe732a5 100644
|
||||
--- a/drivers/input/serio/i8042-x86ia64io.h
|
||||
+++ b/drivers/input/serio/i8042-x86ia64io.h
|
||||
@@ -70,6 +70,15 @@ static inline void i8042_write_command(int val)
|
||||
static struct dmi_system_id __initdata i8042_dmi_noloop_table[] = {
|
||||
{
|
||||
/* AUX LOOP command does not raise AUX IRQ */
|
||||
+ .ident = "Arima-Rioworks HDAMB",
|
||||
+ .matches = {
|
||||
+ DMI_MATCH(DMI_BOARD_VENDOR, "RIOWORKS"),
|
||||
+ DMI_MATCH(DMI_BOARD_NAME, "HDAMB"),
|
||||
+ DMI_MATCH(DMI_BOARD_VERSION, "Rev E"),
|
||||
+ },
|
||||
+ },
|
||||
+ {
|
||||
+ /* AUX LOOP command does not raise AUX IRQ */
|
||||
.ident = "ASUS P65UP5",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
|
||||
--
|
||||
1.5.6.2
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
From: Jeff Garzik <jeff@garzik.org>
|
||||
Date: Wed, 23 Jul 2008 01:17:38 +0000 (-0400)
|
||||
Subject: [netdrvr] atl1d: fix !CONFIG_PM build
|
||||
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=d6f8aa8586dabe605454f3c98a5c1a577c3e0cfb
|
||||
|
||||
[netdrvr] atl1d: fix !CONFIG_PM build
|
||||
|
||||
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
|
||||
---
|
||||
|
||||
diff --git a/drivers/net/atl1e/atl1e_main.c b/drivers/net/atl1e/atl1e_main.c
|
||||
index 367c727..35264c2 100644
|
||||
--- a/drivers/net/atl1e/atl1e_main.c
|
||||
+++ b/drivers/net/atl1e/atl1e_main.c
|
||||
@@ -2073,7 +2073,6 @@ static int atl1e_close(struct net_device *netdev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-#ifdef CONFIG_PM
|
||||
static int atl1e_suspend(struct pci_dev *pdev, pm_message_t state)
|
||||
{
|
||||
struct net_device *netdev = pci_get_drvdata(pdev);
|
||||
@@ -2207,6 +2206,7 @@ suspend_exit:
|
||||
return 0;
|
||||
}
|
||||
|
||||
+#ifdef CONFIG_PM
|
||||
static int atl1e_resume(struct pci_dev *pdev)
|
||||
{
|
||||
struct net_device *netdev = pci_get_drvdata(pdev);
|
|
@ -1,23 +0,0 @@
|
|||
commit abbc9d1b25637b1948a4718fa8f7b257233136bc
|
||||
Author: Kailang Yang <kailang@realtek.com.tw>
|
||||
Date: Tue May 27 11:48:01 2008 +0200
|
||||
|
||||
[ALSA] hda - Add ICH9 controller support (8086:2911)
|
||||
|
||||
Added the missing PCI ID for ICH9 controller (8086:2911)
|
||||
|
||||
Signed-off-by: Kailang Yang <kailang@realtek.com.tw>
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
|
||||
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
|
||||
index 7f62196..6e2dc4f 100644
|
||||
--- a/sound/pci/hda/hda_intel.c
|
||||
+++ b/sound/pci/hda/hda_intel.c
|
||||
@@ -2184,6 +2184,7 @@ static struct pci_device_id azx_ids[] = {
|
||||
{ PCI_DEVICE(0x8086, 0x27d8), .driver_data = AZX_DRIVER_ICH },
|
||||
{ PCI_DEVICE(0x8086, 0x269a), .driver_data = AZX_DRIVER_ICH },
|
||||
{ PCI_DEVICE(0x8086, 0x284b), .driver_data = AZX_DRIVER_ICH },
|
||||
+ { PCI_DEVICE(0x8086, 0x2911), .driver_data = AZX_DRIVER_ICH },
|
||||
{ PCI_DEVICE(0x8086, 0x293e), .driver_data = AZX_DRIVER_ICH },
|
||||
{ PCI_DEVICE(0x8086, 0x293f), .driver_data = AZX_DRIVER_ICH },
|
||||
{ PCI_DEVICE(0x8086, 0x3a3e), .driver_data = AZX_DRIVER_ICH },
|
|
@ -1,172 +0,0 @@
|
|||
commit 17bba1b72d190742c99a140154f0abac9c1996c3
|
||||
Author: Jiang zhe <zhe.jiang@intel.com>
|
||||
Date: Wed Jun 4 12:11:07 2008 +0200
|
||||
|
||||
[ALSA] hda - support intel DG33 motherboards
|
||||
|
||||
These two motherboards's pin configuration are not covered by driver.
|
||||
I wrote a new model to support them.
|
||||
|
||||
Signed-off-by: Jiang zhe <zhe.jiang@intel.com>
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
|
||||
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
|
||||
index cb3e028..048cb84 100644
|
||||
--- a/sound/pci/hda/patch_realtek.c
|
||||
+++ b/sound/pci/hda/patch_realtek.c
|
||||
@@ -209,6 +209,7 @@ enum {
|
||||
ALC883_MITAC,
|
||||
ALC883_CLEVO_M720,
|
||||
ALC883_FUJITSU_PI2515,
|
||||
+ ALC883_3ST_6ch_INTEL,
|
||||
ALC883_AUTO,
|
||||
ALC883_MODEL_LAST,
|
||||
};
|
||||
@@ -6603,6 +6604,16 @@ static struct hda_input_mux alc883_capture_source = {
|
||||
},
|
||||
};
|
||||
|
||||
+static struct hda_input_mux alc883_3stack_6ch_intel = {
|
||||
+ .num_items = 4,
|
||||
+ .items = {
|
||||
+ { "Mic", 0x1 },
|
||||
+ { "Front Mic", 0x0 },
|
||||
+ { "Line", 0x2 },
|
||||
+ { "CD", 0x4 },
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
static struct hda_input_mux alc883_lenovo_101e_capture_source = {
|
||||
.num_items = 2,
|
||||
.items = {
|
||||
@@ -6684,6 +6695,48 @@ static struct hda_channel_mode alc883_3ST_6ch_modes[3] = {
|
||||
};
|
||||
|
||||
/*
|
||||
+ * 2ch mode
|
||||
+ */
|
||||
+static struct hda_verb alc883_3ST_ch2_intel_init[] = {
|
||||
+ { 0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 },
|
||||
+ { 0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE },
|
||||
+ { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN },
|
||||
+ { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE },
|
||||
+ { } /* end */
|
||||
+};
|
||||
+
|
||||
+/*
|
||||
+ * 4ch mode
|
||||
+ */
|
||||
+static struct hda_verb alc883_3ST_ch4_intel_init[] = {
|
||||
+ { 0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 },
|
||||
+ { 0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE },
|
||||
+ { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
|
||||
+ { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE },
|
||||
+ { 0x1a, AC_VERB_SET_CONNECT_SEL, 0x01 },
|
||||
+ { } /* end */
|
||||
+};
|
||||
+
|
||||
+/*
|
||||
+ * 6ch mode
|
||||
+ */
|
||||
+static struct hda_verb alc883_3ST_ch6_intel_init[] = {
|
||||
+ { 0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
|
||||
+ { 0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE },
|
||||
+ { 0x19, AC_VERB_SET_CONNECT_SEL, 0x02 },
|
||||
+ { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
|
||||
+ { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE },
|
||||
+ { 0x1a, AC_VERB_SET_CONNECT_SEL, 0x01 },
|
||||
+ { } /* end */
|
||||
+};
|
||||
+
|
||||
+static struct hda_channel_mode alc883_3ST_6ch_intel_modes[3] = {
|
||||
+ { 2, alc883_3ST_ch2_intel_init },
|
||||
+ { 4, alc883_3ST_ch4_intel_init },
|
||||
+ { 6, alc883_3ST_ch6_intel_init },
|
||||
+};
|
||||
+
|
||||
+/*
|
||||
* 6ch mode
|
||||
*/
|
||||
static struct hda_verb alc883_sixstack_ch6_init[] = {
|
||||
@@ -6915,6 +6968,45 @@ static struct snd_kcontrol_new alc883_3ST_6ch_mixer[] = {
|
||||
{ } /* end */
|
||||
};
|
||||
|
||||
+static struct snd_kcontrol_new alc883_3ST_6ch_intel_mixer[] = {
|
||||
+ HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
|
||||
+ HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT),
|
||||
+ HDA_CODEC_VOLUME("Surround Playback Volume", 0x0d, 0x0, HDA_OUTPUT),
|
||||
+ HDA_BIND_MUTE("Surround Playback Switch", 0x0d, 2, HDA_INPUT),
|
||||
+ HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0e, 1, 0x0,
|
||||
+ HDA_OUTPUT),
|
||||
+ HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x0e, 2, 0x0, HDA_OUTPUT),
|
||||
+ HDA_BIND_MUTE_MONO("Center Playback Switch", 0x0e, 1, 2, HDA_INPUT),
|
||||
+ HDA_BIND_MUTE_MONO("LFE Playback Switch", 0x0e, 2, 2, HDA_INPUT),
|
||||
+ HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT),
|
||||
+ HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT),
|
||||
+ HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT),
|
||||
+ HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT),
|
||||
+ HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT),
|
||||
+ HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x1, HDA_INPUT),
|
||||
+ HDA_CODEC_VOLUME("Mic Boost", 0x19, 0, HDA_INPUT),
|
||||
+ HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x1, HDA_INPUT),
|
||||
+ HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
|
||||
+ HDA_CODEC_VOLUME("Front Mic Boost", 0x18, 0, HDA_INPUT),
|
||||
+ HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
|
||||
+ HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x0b, 0x05, HDA_INPUT),
|
||||
+ HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x0b, 0x05, HDA_INPUT),
|
||||
+ HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT),
|
||||
+ HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT),
|
||||
+ HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x09, 0x0, HDA_INPUT),
|
||||
+ HDA_CODEC_MUTE_IDX("Capture Switch", 1, 0x09, 0x0, HDA_INPUT),
|
||||
+ {
|
||||
+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
|
||||
+ /* .name = "Capture Source", */
|
||||
+ .name = "Input Source",
|
||||
+ .count = 2,
|
||||
+ .info = alc883_mux_enum_info,
|
||||
+ .get = alc883_mux_enum_get,
|
||||
+ .put = alc883_mux_enum_put,
|
||||
+ },
|
||||
+ { } /* end */
|
||||
+};
|
||||
+
|
||||
static struct snd_kcontrol_new alc883_fivestack_mixer[] = {
|
||||
HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
|
||||
HDA_CODEC_MUTE("Front Playback Switch", 0x14, 0x0, HDA_OUTPUT),
|
||||
@@ -7763,6 +7855,7 @@ static const char *alc883_models[ALC883_MODEL_LAST] = {
|
||||
[ALC883_MITAC] = "mitac",
|
||||
[ALC883_CLEVO_M720] = "clevo-m720",
|
||||
[ALC883_FUJITSU_PI2515] = "fujitsu-pi2515",
|
||||
+ [ALC883_3ST_6ch_INTEL] = "3stack-6ch-intel",
|
||||
[ALC883_AUTO] = "auto",
|
||||
};
|
||||
|
||||
@@ -7820,6 +7913,8 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = {
|
||||
SND_PCI_QUIRK(0x17c0, 0x4071, "MEDION MD2", ALC883_MEDION_MD2),
|
||||
SND_PCI_QUIRK(0x17f2, 0x5000, "Albatron KI690-AM2", ALC883_6ST_DIG),
|
||||
SND_PCI_QUIRK(0x1991, 0x5625, "Haier W66", ALC883_HAIER_W66),
|
||||
+ SND_PCI_QUIRK(0x8086, 0x0001, "DG33BUC", ALC883_3ST_6ch_INTEL),
|
||||
+ SND_PCI_QUIRK(0x8086, 0x0002, "DG33FBC", ALC883_3ST_6ch_INTEL),
|
||||
SND_PCI_QUIRK(0x8086, 0xd601, "D102GGC", ALC883_3ST_6ch),
|
||||
{}
|
||||
};
|
||||
@@ -7858,6 +7953,18 @@ static struct alc_config_preset alc883_presets[] = {
|
||||
.need_dac_fix = 1,
|
||||
.input_mux = &alc883_capture_source,
|
||||
},
|
||||
+ [ALC883_3ST_6ch_INTEL] = {
|
||||
+ .mixers = { alc883_3ST_6ch_intel_mixer, alc883_chmode_mixer },
|
||||
+ .init_verbs = { alc883_init_verbs },
|
||||
+ .num_dacs = ARRAY_SIZE(alc883_dac_nids),
|
||||
+ .dac_nids = alc883_dac_nids,
|
||||
+ .dig_out_nid = ALC883_DIGOUT_NID,
|
||||
+ .dig_in_nid = ALC883_DIGIN_NID,
|
||||
+ .num_channel_mode = ARRAY_SIZE(alc883_3ST_6ch_intel_modes),
|
||||
+ .channel_mode = alc883_3ST_6ch_intel_modes,
|
||||
+ .need_dac_fix = 1,
|
||||
+ .input_mux = &alc883_3stack_6ch_intel,
|
||||
+ },
|
||||
[ALC883_6ST_DIG] = {
|
||||
.mixers = { alc883_base_mixer, alc883_chmode_mixer },
|
||||
.init_verbs = { alc883_init_verbs },
|
|
@ -1,77 +0,0 @@
|
|||
commit 3bf2e77453a87c22eb57ed4926760ac131c84459
|
||||
Author: H. Peter Anvin <hpa@zytor.com>
|
||||
Date: Sun Jul 13 21:18:02 2008 -0700
|
||||
|
||||
x86, suspend, acpi: enter Big Real Mode
|
||||
|
||||
The explanation for recent video BIOS suspend quirk failures is that
|
||||
the VESA BIOS expects to be entered in Big Real Mode (*.limit = 0xffffffff)
|
||||
instead of ordinary Real Mode (*.limit = 0xffff).
|
||||
|
||||
This patch changes the segment descriptors to Big Real Mode instead.
|
||||
|
||||
The segment descriptor registers (what Intel calls "segment cache") is
|
||||
always active. The only thing that changes based on CR0.PE is how it is
|
||||
*loaded* and the interpretation of the CS flags.
|
||||
|
||||
The segment descriptor registers contain of the following sub-registers:
|
||||
selector (the "visible" part), base, limit and flags. In protected mode
|
||||
or long mode, they are loaded from descriptors (or fs.base or gs.base can
|
||||
be manipulated directly in long mode.) In real mode, the only thing
|
||||
changed by a segment register load is the selector and the base, where the
|
||||
base <- selector << 4. In particular, *the limit and the flags are not
|
||||
changed*.
|
||||
|
||||
As far as the handling of the CS flags: a code segment cannot be writable
|
||||
in protected mode, whereas it is "just another segment" in real mode, so
|
||||
fixees some kind of quirk that kicks in for this when CR0.PE <- 0. I'm
|
||||
not sure if this is accomplished by actually changing the cs.flags register
|
||||
or just changing the interpretation; it might be something that is
|
||||
CPU-specific. In particular, the Transmeta CPUs had an explicit "CS is
|
||||
writable if you're in real mode" override, so even if you had loaded CS
|
||||
with an execute-only segment it'd be writable (but not readable!) on return
|
||||
to real mode. I'm not at all sure if that is how other CPUs behave.
|
||||
|
||||
Signed-off-by: "H. Peter Anvin" <hpa@zytor.com>
|
||||
Signed-off-by: Ingo Molnar <mingo@elte.hu>
|
||||
|
||||
regression concering 4b4f7280 see
|
||||
http://bugzilla.kernel.org/show_bug.cgi?id=11064
|
||||
http://marc.info/?l=linux-kernel&m=121584459809675&w=4
|
||||
|
||||
diff --git a/arch/x86/kernel/acpi/sleep.c b/arch/x86/kernel/acpi/sleep.c
|
||||
index 36af01f..130711f 100644
|
||||
--- a/arch/x86/kernel/acpi/sleep.c
|
||||
+++ b/arch/x86/kernel/acpi/sleep.c
|
||||
@@ -23,6 +23,15 @@ static unsigned long acpi_realmode;
|
||||
static char temp_stack[10240];
|
||||
#endif
|
||||
|
||||
+/* XXX: this macro should move to asm-x86/segment.h and be shared with the
|
||||
+ boot code... */
|
||||
+#define GDT_ENTRY(flags, base, limit) \
|
||||
+ (((u64)(base & 0xff000000) << 32) | \
|
||||
+ ((u64)flags << 40) | \
|
||||
+ ((u64)(limit & 0x00ff0000) << 32) | \
|
||||
+ ((u64)(base & 0x00ffffff) << 16) | \
|
||||
+ ((u64)(limit & 0x0000ffff)))
|
||||
+
|
||||
/**
|
||||
* acpi_save_state_mem - save kernel state
|
||||
*
|
||||
@@ -58,11 +67,11 @@ int acpi_save_state_mem(void)
|
||||
((char *)&header->wakeup_gdt - (char *)acpi_realmode))
|
||||
<< 16);
|
||||
/* GDT[1]: real-mode-like code segment */
|
||||
- header->wakeup_gdt[1] = (0x009bULL << 40) +
|
||||
- ((u64)acpi_wakeup_address << 16) + 0xffff;
|
||||
+ header->wakeup_gdt[1] =
|
||||
+ GDT_ENTRY(0x809b, acpi_wakeup_address, 0xfffff);
|
||||
/* GDT[2]: real-mode-like data segment */
|
||||
- header->wakeup_gdt[2] = (0x0093ULL << 40) +
|
||||
- ((u64)acpi_wakeup_address << 16) + 0xffff;
|
||||
+ header->wakeup_gdt[2] =
|
||||
+ GDT_ENTRY(0x8093, acpi_wakeup_address, 0xfffff);
|
||||
|
||||
#ifndef CONFIG_64BIT
|
||||
store_gdt((struct desc_ptr *)&header->pmode_gdt);
|
|
@ -1,643 +0,0 @@
|
|||
diff --git a/include/asm-x86/vm86.h b/include/asm-x86/vm86.h
|
||||
index 074b357..dc7b4bc 100644
|
||||
--- a/include/asm-x86/vm86.h
|
||||
+++ b/include/asm-x86/vm86.h
|
||||
@@ -20,6 +20,18 @@
|
||||
#define X86_VM_MASK 0 /* No VM86 support */
|
||||
#endif
|
||||
|
||||
+#ifndef __KERNEL__
|
||||
+#define TF_MASK X86_EFLAGS_TF
|
||||
+#define IF_MASK X86_EFLAGS_IF
|
||||
+#define IOPL_MASK X86_EFLAGS_IOPL
|
||||
+#define NT_MASK X86_EFLAGS_NT
|
||||
+#define VM_MASK X86_VM_MASK
|
||||
+#define AC_MASK X86_EFLAGS_AC
|
||||
+#define VIF_MASK X86_EFLAGS_VIF
|
||||
+#define VIP_MASK X86_EFLAGS_VIP
|
||||
+#define ID_MASK X86_EFLAGS_ID
|
||||
+#endif
|
||||
+
|
||||
#define BIOSSEG 0x0f000
|
||||
|
||||
#define CPU_086 0
|
||||
diff --git a/include/linux/Kbuild b/include/linux/Kbuild
|
||||
index 71d70d1..c134cb4 100644
|
||||
--- a/include/linux/Kbuild
|
||||
+++ b/include/linux/Kbuild
|
||||
@@ -363,3 +363,7 @@ unifdef-y += xattr.h
|
||||
unifdef-y += xfrm.h
|
||||
|
||||
objhdr-y += version.h
|
||||
+
|
||||
+# compatibility
|
||||
+header-y += hdsmart.h
|
||||
+header-y += lock_dlm_plock.h
|
||||
diff --git a/include/linux/hdsmart.h b/include/linux/hdsmart.h
|
||||
new file mode 100644
|
||||
index 0000000..7974a47
|
||||
--- /dev/null
|
||||
+++ b/include/linux/hdsmart.h
|
||||
@@ -0,0 +1,124 @@
|
||||
+/*
|
||||
+ * linux/include/linux/hdsmart.h
|
||||
+ *
|
||||
+ * Copyright (C) 1999-2000 Michael Cornwell <cornwell@acm.org>
|
||||
+ * Copyright (C) 2000 Andre Hedrick <andre@linux-ide.org>
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or modify
|
||||
+ * it under the terms of the GNU General Public License as published by
|
||||
+ * the Free Software Foundation; either version 2, or (at your option)
|
||||
+ * any later version.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License
|
||||
+ * (for example /usr/src/linux/COPYING); if not, write to the Free
|
||||
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
+ */
|
||||
+
|
||||
+#ifndef _LINUX_HDSMART_H
|
||||
+#define _LINUX_HDSMART_H
|
||||
+
|
||||
+#define OFFLINE_FULL_SCAN 0
|
||||
+#define SHORT_SELF_TEST 1
|
||||
+#define EXTEND_SELF_TEST 2
|
||||
+#define SHORT_CAPTIVE_SELF_TEST 129
|
||||
+#define EXTEND_CAPTIVE_SELF_TEST 130
|
||||
+
|
||||
+/* smart_attribute is the vendor specific in SFF-8035 spec */
|
||||
+typedef struct ata_smart_attribute_s {
|
||||
+ unsigned char id;
|
||||
+ unsigned short status_flag;
|
||||
+ unsigned char normalized;
|
||||
+ unsigned char worse_normal;
|
||||
+ unsigned char raw[6];
|
||||
+ unsigned char reserv;
|
||||
+} __attribute__ ((packed)) ata_smart_attribute_t;
|
||||
+
|
||||
+/* smart_values is format of the read drive Atrribute command */
|
||||
+typedef struct ata_smart_values_s {
|
||||
+ unsigned short revnumber;
|
||||
+ ata_smart_attribute_t vendor_attributes [30];
|
||||
+ unsigned char offline_data_collection_status;
|
||||
+ unsigned char self_test_exec_status;
|
||||
+ unsigned short total_time_to_complete_off_line;
|
||||
+ unsigned char vendor_specific_366;
|
||||
+ unsigned char offline_data_collection_capability;
|
||||
+ unsigned short smart_capability;
|
||||
+ unsigned char errorlog_capability;
|
||||
+ unsigned char vendor_specific_371;
|
||||
+ unsigned char short_test_completion_time;
|
||||
+ unsigned char extend_test_completion_time;
|
||||
+ unsigned char reserved_374_385 [12];
|
||||
+ unsigned char vendor_specific_386_509 [125];
|
||||
+ unsigned char chksum;
|
||||
+} __attribute__ ((packed)) ata_smart_values_t;
|
||||
+
|
||||
+/* Smart Threshold data structures */
|
||||
+/* Vendor attribute of SMART Threshold */
|
||||
+typedef struct ata_smart_threshold_entry_s {
|
||||
+ unsigned char id;
|
||||
+ unsigned char normalized_threshold;
|
||||
+ unsigned char reserved[10];
|
||||
+} __attribute__ ((packed)) ata_smart_threshold_entry_t;
|
||||
+
|
||||
+/* Format of Read SMART THreshold Command */
|
||||
+typedef struct ata_smart_thresholds_s {
|
||||
+ unsigned short revnumber;
|
||||
+ ata_smart_threshold_entry_t thres_entries[30];
|
||||
+ unsigned char reserved[149];
|
||||
+ unsigned char chksum;
|
||||
+} __attribute__ ((packed)) ata_smart_thresholds_t;
|
||||
+
|
||||
+typedef struct ata_smart_errorlog_command_struct_s {
|
||||
+ unsigned char devicecontrolreg;
|
||||
+ unsigned char featuresreg;
|
||||
+ unsigned char sector_count;
|
||||
+ unsigned char sector_number;
|
||||
+ unsigned char cylinder_low;
|
||||
+ unsigned char cylinder_high;
|
||||
+ unsigned char drive_head;
|
||||
+ unsigned char commandreg;
|
||||
+ unsigned int timestamp;
|
||||
+} __attribute__ ((packed)) ata_smart_errorlog_command_struct_t;
|
||||
+
|
||||
+typedef struct ata_smart_errorlog_error_struct_s {
|
||||
+ unsigned char error_condition;
|
||||
+ unsigned char extended_error[14];
|
||||
+ unsigned char state;
|
||||
+ unsigned short timestamp;
|
||||
+} __attribute__ ((packed)) ata_smart_errorlog_error_struct_t;
|
||||
+
|
||||
+typedef struct ata_smart_errorlog_struct_s {
|
||||
+ ata_smart_errorlog_command_struct_t commands[6];
|
||||
+ ata_smart_errorlog_error_struct_t error_struct;
|
||||
+} __attribute__ ((packed)) ata_smart_errorlog_struct_t;
|
||||
+
|
||||
+typedef struct ata_smart_errorlog_s {
|
||||
+ unsigned char revnumber;
|
||||
+ unsigned char error_log_pointer;
|
||||
+ ata_smart_errorlog_struct_t errorlog_struct[5];
|
||||
+ unsigned short ata_error_count;
|
||||
+ unsigned short non_fatal_count;
|
||||
+ unsigned short drive_timeout_count;
|
||||
+ unsigned char reserved[53];
|
||||
+ unsigned char chksum;
|
||||
+} __attribute__ ((packed)) ata_smart_errorlog_t;
|
||||
+
|
||||
+typedef struct ata_smart_selftestlog_struct_s {
|
||||
+ unsigned char selftestnumber;
|
||||
+ unsigned char selfteststatus;
|
||||
+ unsigned short timestamp;
|
||||
+ unsigned char selftestfailurecheckpoint;
|
||||
+ unsigned int lbafirstfailure;
|
||||
+ unsigned char vendorspecific[15];
|
||||
+} __attribute__ ((packed)) ata_smart_selftestlog_struct_t;
|
||||
+
|
||||
+typedef struct ata_smart_selftestlog_s {
|
||||
+ unsigned short revnumber;
|
||||
+ ata_smart_selftestlog_struct_t selftest_struct[21];
|
||||
+ unsigned char vendorspecific[2];
|
||||
+ unsigned char mostrecenttest;
|
||||
+ unsigned char resevered[2];
|
||||
+ unsigned char chksum;
|
||||
+} __attribute__ ((packed)) ata_smart_selftestlog_t;
|
||||
+
|
||||
+#endif /* _LINUX_HDSMART_H */
|
||||
diff --git a/include/linux/lock_dlm_plock.h b/include/linux/lock_dlm_plock.h
|
||||
new file mode 100644
|
||||
index 0000000..fc34151
|
||||
--- /dev/null
|
||||
+++ b/include/linux/lock_dlm_plock.h
|
||||
@@ -0,0 +1,41 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2005 Red Hat, Inc. All rights reserved.
|
||||
+ *
|
||||
+ * This copyrighted material is made available to anyone wishing to use,
|
||||
+ * modify, copy, or redistribute it subject to the terms and conditions
|
||||
+ * of the GNU General Public License v.2.
|
||||
+ */
|
||||
+
|
||||
+#ifndef __LOCK_DLM_PLOCK_DOT_H__
|
||||
+#define __LOCK_DLM_PLOCK_DOT_H__
|
||||
+
|
||||
+#define GDLM_PLOCK_MISC_NAME "lock_dlm_plock"
|
||||
+
|
||||
+#define GDLM_PLOCK_VERSION_MAJOR 1
|
||||
+#define GDLM_PLOCK_VERSION_MINOR 1
|
||||
+#define GDLM_PLOCK_VERSION_PATCH 0
|
||||
+
|
||||
+enum {
|
||||
+ GDLM_PLOCK_OP_LOCK = 1,
|
||||
+ GDLM_PLOCK_OP_UNLOCK,
|
||||
+ GDLM_PLOCK_OP_GET,
|
||||
+};
|
||||
+
|
||||
+struct gdlm_plock_info {
|
||||
+ __u32 version[3];
|
||||
+ __u8 optype;
|
||||
+ __u8 ex;
|
||||
+ __u8 wait;
|
||||
+ __u8 pad;
|
||||
+ __u32 pid;
|
||||
+ __s32 nodeid;
|
||||
+ __s32 rv;
|
||||
+ __u32 fsid;
|
||||
+ __u64 number;
|
||||
+ __u64 start;
|
||||
+ __u64 end;
|
||||
+ __u64 owner;
|
||||
+};
|
||||
+
|
||||
+#endif
|
||||
+
|
||||
diff --git a/include/linux/meye.h b/include/linux/meye.h
|
||||
index 12010ac..cb63106 100644
|
||||
--- a/include/linux/meye.h
|
||||
+++ b/include/linux/meye.h
|
||||
@@ -59,6 +59,7 @@ struct meye_params {
|
||||
/* V4L2 private controls */
|
||||
#define V4L2_CID_AGC V4L2_CID_PRIVATE_BASE
|
||||
#define V4L2_CID_MEYE_SHARPNESS (V4L2_CID_PRIVATE_BASE + 1)
|
||||
+#define V4L2_CID_SHARPNESS V4L2_CID_MEYE_SHARPNESS
|
||||
#define V4L2_CID_PICTURE (V4L2_CID_PRIVATE_BASE + 2)
|
||||
#define V4L2_CID_JPEGQUAL (V4L2_CID_PRIVATE_BASE + 3)
|
||||
#define V4L2_CID_FRAMERATE (V4L2_CID_PRIVATE_BASE + 4)
|
||||
diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h
|
||||
index 81cd36b..04b620a 100644
|
||||
--- a/include/linux/msdos_fs.h
|
||||
+++ b/include/linux/msdos_fs.h
|
||||
@@ -57,6 +57,9 @@
|
||||
#define MSDOS_DOT ". " /* ".", padded to MSDOS_NAME chars */
|
||||
#define MSDOS_DOTDOT ".. " /* "..", padded to MSDOS_NAME chars */
|
||||
|
||||
+#ifndef __KERNEL__
|
||||
+#define FAT_VALID_MEDIA(x) ((0xF8 <= (x) && (x) <= 0xFF) || (x) == 0xF0)
|
||||
+#endif
|
||||
#define FAT_FIRST_ENT(s, x) ((MSDOS_SB(s)->fat_bits == 32 ? 0x0FFFFF00 : \
|
||||
MSDOS_SB(s)->fat_bits == 16 ? 0xFF00 : 0xF00) | (x))
|
||||
|
||||
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
|
||||
index 25f8710..edd70d2 100644
|
||||
--- a/include/linux/netdevice.h
|
||||
+++ b/include/linux/netdevice.h
|
||||
@@ -116,7 +116,10 @@ struct wireless_dev;
|
||||
#define MAX_HEADER (LL_MAX_HEADER + 48)
|
||||
#endif
|
||||
|
||||
-#endif /* __KERNEL__ */
|
||||
+#else /* __KERNEL__ */
|
||||
+#define LL_MAX_HEADER 128
|
||||
+#define MAX_HEADER (LL_MAX_HEADER + 48)
|
||||
+#endif /* !__KERNEL__ */
|
||||
|
||||
struct net_device_subqueue
|
||||
{
|
||||
diff --git a/include/mtd/Kbuild b/include/mtd/Kbuild
|
||||
index 8eb018f..84b7424 100644
|
||||
--- a/include/mtd/Kbuild
|
||||
+++ b/include/mtd/Kbuild
|
||||
@@ -4,3 +4,6 @@ header-y += mtd-abi.h
|
||||
header-y += mtd-user.h
|
||||
header-y += nftl-user.h
|
||||
header-y += ubi-user.h
|
||||
+
|
||||
+# compatibility
|
||||
+header-y += ubi-header.h
|
||||
diff --git a/include/mtd/ubi-header.h b/include/mtd/ubi-header.h
|
||||
new file mode 100644
|
||||
index 0000000..292f916
|
||||
--- /dev/null
|
||||
+++ b/include/mtd/ubi-header.h
|
||||
@@ -0,0 +1,372 @@
|
||||
+/*
|
||||
+ * Copyright (c) International Business Machines Corp., 2006
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or modify
|
||||
+ * it under the terms of the GNU General Public License as published by
|
||||
+ * the Free Software Foundation; either version 2 of the License, or
|
||||
+ * (at your option) any later version.
|
||||
+ *
|
||||
+ * This program is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
|
||||
+ * the GNU General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License
|
||||
+ * along with this program; if not, write to the Free Software
|
||||
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
+ *
|
||||
+ * Authors: Artem Bityutskiy (Битюцкий Артём)
|
||||
+ * Thomas Gleixner
|
||||
+ * Frank Haverkamp
|
||||
+ * Oliver Lohmann
|
||||
+ * Andreas Arnez
|
||||
+ */
|
||||
+
|
||||
+/*
|
||||
+ * This file defines the layout of UBI headers and all the other UBI on-flash
|
||||
+ * data structures. May be included by user-space.
|
||||
+ */
|
||||
+
|
||||
+#ifndef __UBI_HEADER_H__
|
||||
+#define __UBI_HEADER_H__
|
||||
+
|
||||
+#include <asm/byteorder.h>
|
||||
+
|
||||
+/* The version of UBI images supported by this implementation */
|
||||
+#define UBI_VERSION 1
|
||||
+
|
||||
+/* The highest erase counter value supported by this implementation */
|
||||
+#define UBI_MAX_ERASECOUNTER 0x7FFFFFFF
|
||||
+
|
||||
+/* The initial CRC32 value used when calculating CRC checksums */
|
||||
+#define UBI_CRC32_INIT 0xFFFFFFFFU
|
||||
+
|
||||
+/* Erase counter header magic number (ASCII "UBI#") */
|
||||
+#define UBI_EC_HDR_MAGIC 0x55424923
|
||||
+/* Volume identifier header magic number (ASCII "UBI!") */
|
||||
+#define UBI_VID_HDR_MAGIC 0x55424921
|
||||
+
|
||||
+/*
|
||||
+ * Volume type constants used in the volume identifier header.
|
||||
+ *
|
||||
+ * @UBI_VID_DYNAMIC: dynamic volume
|
||||
+ * @UBI_VID_STATIC: static volume
|
||||
+ */
|
||||
+enum {
|
||||
+ UBI_VID_DYNAMIC = 1,
|
||||
+ UBI_VID_STATIC = 2
|
||||
+};
|
||||
+
|
||||
+/*
|
||||
+ * Volume flags used in the volume table record.
|
||||
+ *
|
||||
+ * @UBI_VTBL_AUTORESIZE_FLG: auto-resize this volume
|
||||
+ *
|
||||
+ * %UBI_VTBL_AUTORESIZE_FLG flag can be set only for one volume in the volume
|
||||
+ * table. UBI automatically re-sizes the volume which has this flag and makes
|
||||
+ * the volume to be of largest possible size. This means that if after the
|
||||
+ * initialization UBI finds out that there are available physical eraseblocks
|
||||
+ * present on the device, it automatically appends all of them to the volume
|
||||
+ * (the physical eraseblocks reserved for bad eraseblocks handling and other
|
||||
+ * reserved physical eraseblocks are not taken). So, if there is a volume with
|
||||
+ * the %UBI_VTBL_AUTORESIZE_FLG flag set, the amount of available logical
|
||||
+ * eraseblocks will be zero after UBI is loaded, because all of them will be
|
||||
+ * reserved for this volume. Note, the %UBI_VTBL_AUTORESIZE_FLG bit is cleared
|
||||
+ * after the volume had been initialized.
|
||||
+ *
|
||||
+ * The auto-resize feature is useful for device production purposes. For
|
||||
+ * example, different NAND flash chips may have different amount of initial bad
|
||||
+ * eraseblocks, depending of particular chip instance. Manufacturers of NAND
|
||||
+ * chips usually guarantee that the amount of initial bad eraseblocks does not
|
||||
+ * exceed certain percent, e.g. 2%. When one creates an UBI image which will be
|
||||
+ * flashed to the end devices in production, he does not know the exact amount
|
||||
+ * of good physical eraseblocks the NAND chip on the device will have, but this
|
||||
+ * number is required to calculate the volume sized and put them to the volume
|
||||
+ * table of the UBI image. In this case, one of the volumes (e.g., the one
|
||||
+ * which will store the root file system) is marked as "auto-resizable", and
|
||||
+ * UBI will adjust its size on the first boot if needed.
|
||||
+ *
|
||||
+ * Note, first UBI reserves some amount of physical eraseblocks for bad
|
||||
+ * eraseblock handling, and then re-sizes the volume, not vice-versa. This
|
||||
+ * means that the pool of reserved physical eraseblocks will always be present.
|
||||
+ */
|
||||
+enum {
|
||||
+ UBI_VTBL_AUTORESIZE_FLG = 0x01,
|
||||
+};
|
||||
+
|
||||
+/*
|
||||
+ * Compatibility constants used by internal volumes.
|
||||
+ *
|
||||
+ * @UBI_COMPAT_DELETE: delete this internal volume before anything is written
|
||||
+ * to the flash
|
||||
+ * @UBI_COMPAT_RO: attach this device in read-only mode
|
||||
+ * @UBI_COMPAT_PRESERVE: preserve this internal volume - do not touch its
|
||||
+ * physical eraseblocks, don't allow the wear-leveling unit to move them
|
||||
+ * @UBI_COMPAT_REJECT: reject this UBI image
|
||||
+ */
|
||||
+enum {
|
||||
+ UBI_COMPAT_DELETE = 1,
|
||||
+ UBI_COMPAT_RO = 2,
|
||||
+ UBI_COMPAT_PRESERVE = 4,
|
||||
+ UBI_COMPAT_REJECT = 5
|
||||
+};
|
||||
+
|
||||
+/* Sizes of UBI headers */
|
||||
+#define UBI_EC_HDR_SIZE sizeof(struct ubi_ec_hdr)
|
||||
+#define UBI_VID_HDR_SIZE sizeof(struct ubi_vid_hdr)
|
||||
+
|
||||
+/* Sizes of UBI headers without the ending CRC */
|
||||
+#define UBI_EC_HDR_SIZE_CRC (UBI_EC_HDR_SIZE - sizeof(__be32))
|
||||
+#define UBI_VID_HDR_SIZE_CRC (UBI_VID_HDR_SIZE - sizeof(__be32))
|
||||
+
|
||||
+/**
|
||||
+ * struct ubi_ec_hdr - UBI erase counter header.
|
||||
+ * @magic: erase counter header magic number (%UBI_EC_HDR_MAGIC)
|
||||
+ * @version: version of UBI implementation which is supposed to accept this
|
||||
+ * UBI image
|
||||
+ * @padding1: reserved for future, zeroes
|
||||
+ * @ec: the erase counter
|
||||
+ * @vid_hdr_offset: where the VID header starts
|
||||
+ * @data_offset: where the user data start
|
||||
+ * @padding2: reserved for future, zeroes
|
||||
+ * @hdr_crc: erase counter header CRC checksum
|
||||
+ *
|
||||
+ * The erase counter header takes 64 bytes and has a plenty of unused space for
|
||||
+ * future usage. The unused fields are zeroed. The @version field is used to
|
||||
+ * indicate the version of UBI implementation which is supposed to be able to
|
||||
+ * work with this UBI image. If @version is greater then the current UBI
|
||||
+ * version, the image is rejected. This may be useful in future if something
|
||||
+ * is changed radically. This field is duplicated in the volume identifier
|
||||
+ * header.
|
||||
+ *
|
||||
+ * The @vid_hdr_offset and @data_offset fields contain the offset of the the
|
||||
+ * volume identifier header and user data, relative to the beginning of the
|
||||
+ * physical eraseblock. These values have to be the same for all physical
|
||||
+ * eraseblocks.
|
||||
+ */
|
||||
+struct ubi_ec_hdr {
|
||||
+ __be32 magic;
|
||||
+ __u8 version;
|
||||
+ __u8 padding1[3];
|
||||
+ __be64 ec; /* Warning: the current limit is 31-bit anyway! */
|
||||
+ __be32 vid_hdr_offset;
|
||||
+ __be32 data_offset;
|
||||
+ __u8 padding2[36];
|
||||
+ __be32 hdr_crc;
|
||||
+} __attribute__ ((packed));
|
||||
+
|
||||
+/**
|
||||
+ * struct ubi_vid_hdr - on-flash UBI volume identifier header.
|
||||
+ * @magic: volume identifier header magic number (%UBI_VID_HDR_MAGIC)
|
||||
+ * @version: UBI implementation version which is supposed to accept this UBI
|
||||
+ * image (%UBI_VERSION)
|
||||
+ * @vol_type: volume type (%UBI_VID_DYNAMIC or %UBI_VID_STATIC)
|
||||
+ * @copy_flag: if this logical eraseblock was copied from another physical
|
||||
+ * eraseblock (for wear-leveling reasons)
|
||||
+ * @compat: compatibility of this volume (%0, %UBI_COMPAT_DELETE,
|
||||
+ * %UBI_COMPAT_IGNORE, %UBI_COMPAT_PRESERVE, or %UBI_COMPAT_REJECT)
|
||||
+ * @vol_id: ID of this volume
|
||||
+ * @lnum: logical eraseblock number
|
||||
+ * @leb_ver: version of this logical eraseblock (IMPORTANT: obsolete, to be
|
||||
+ * removed, kept only for not breaking older UBI users)
|
||||
+ * @data_size: how many bytes of data this logical eraseblock contains
|
||||
+ * @used_ebs: total number of used logical eraseblocks in this volume
|
||||
+ * @data_pad: how many bytes at the end of this physical eraseblock are not
|
||||
+ * used
|
||||
+ * @data_crc: CRC checksum of the data stored in this logical eraseblock
|
||||
+ * @padding1: reserved for future, zeroes
|
||||
+ * @sqnum: sequence number
|
||||
+ * @padding2: reserved for future, zeroes
|
||||
+ * @hdr_crc: volume identifier header CRC checksum
|
||||
+ *
|
||||
+ * The @sqnum is the value of the global sequence counter at the time when this
|
||||
+ * VID header was created. The global sequence counter is incremented each time
|
||||
+ * UBI writes a new VID header to the flash, i.e. when it maps a logical
|
||||
+ * eraseblock to a new physical eraseblock. The global sequence counter is an
|
||||
+ * unsigned 64-bit integer and we assume it never overflows. The @sqnum
|
||||
+ * (sequence number) is used to distinguish between older and newer versions of
|
||||
+ * logical eraseblocks.
|
||||
+ *
|
||||
+ * There are 2 situations when there may be more then one physical eraseblock
|
||||
+ * corresponding to the same logical eraseblock, i.e., having the same @vol_id
|
||||
+ * and @lnum values in the volume identifier header. Suppose we have a logical
|
||||
+ * eraseblock L and it is mapped to the physical eraseblock P.
|
||||
+ *
|
||||
+ * 1. Because UBI may erase physical eraseblocks asynchronously, the following
|
||||
+ * situation is possible: L is asynchronously erased, so P is scheduled for
|
||||
+ * erasure, then L is written to,i.e. mapped to another physical eraseblock P1,
|
||||
+ * so P1 is written to, then an unclean reboot happens. Result - there are 2
|
||||
+ * physical eraseblocks P and P1 corresponding to the same logical eraseblock
|
||||
+ * L. But P1 has greater sequence number, so UBI picks P1 when it attaches the
|
||||
+ * flash.
|
||||
+ *
|
||||
+ * 2. From time to time UBI moves logical eraseblocks to other physical
|
||||
+ * eraseblocks for wear-leveling reasons. If, for example, UBI moves L from P
|
||||
+ * to P1, and an unclean reboot happens before P is physically erased, there
|
||||
+ * are two physical eraseblocks P and P1 corresponding to L and UBI has to
|
||||
+ * select one of them when the flash is attached. The @sqnum field says which
|
||||
+ * PEB is the original (obviously P will have lower @sqnum) and the copy. But
|
||||
+ * it is not enough to select the physical eraseblock with the higher sequence
|
||||
+ * number, because the unclean reboot could have happen in the middle of the
|
||||
+ * copying process, so the data in P is corrupted. It is also not enough to
|
||||
+ * just select the physical eraseblock with lower sequence number, because the
|
||||
+ * data there may be old (consider a case if more data was added to P1 after
|
||||
+ * the copying). Moreover, the unclean reboot may happen when the erasure of P
|
||||
+ * was just started, so it result in unstable P, which is "mostly" OK, but
|
||||
+ * still has unstable bits.
|
||||
+ *
|
||||
+ * UBI uses the @copy_flag field to indicate that this logical eraseblock is a
|
||||
+ * copy. UBI also calculates data CRC when the data is moved and stores it at
|
||||
+ * the @data_crc field of the copy (P1). So when UBI needs to pick one physical
|
||||
+ * eraseblock of two (P or P1), the @copy_flag of the newer one (P1) is
|
||||
+ * examined. If it is cleared, the situation* is simple and the newer one is
|
||||
+ * picked. If it is set, the data CRC of the copy (P1) is examined. If the CRC
|
||||
+ * checksum is correct, this physical eraseblock is selected (P1). Otherwise
|
||||
+ * the older one (P) is selected.
|
||||
+ *
|
||||
+ * Note, there is an obsolete @leb_ver field which was used instead of @sqnum
|
||||
+ * in the past. But it is not used anymore and we keep it in order to be able
|
||||
+ * to deal with old UBI images. It will be removed at some point.
|
||||
+ *
|
||||
+ * There are 2 sorts of volumes in UBI: user volumes and internal volumes.
|
||||
+ * Internal volumes are not seen from outside and are used for various internal
|
||||
+ * UBI purposes. In this implementation there is only one internal volume - the
|
||||
+ * layout volume. Internal volumes are the main mechanism of UBI extensions.
|
||||
+ * For example, in future one may introduce a journal internal volume. Internal
|
||||
+ * volumes have their own reserved range of IDs.
|
||||
+ *
|
||||
+ * The @compat field is only used for internal volumes and contains the "degree
|
||||
+ * of their compatibility". It is always zero for user volumes. This field
|
||||
+ * provides a mechanism to introduce UBI extensions and to be still compatible
|
||||
+ * with older UBI binaries. For example, if someone introduced a journal in
|
||||
+ * future, he would probably use %UBI_COMPAT_DELETE compatibility for the
|
||||
+ * journal volume. And in this case, older UBI binaries, which know nothing
|
||||
+ * about the journal volume, would just delete this volume and work perfectly
|
||||
+ * fine. This is similar to what Ext2fs does when it is fed by an Ext3fs image
|
||||
+ * - it just ignores the Ext3fs journal.
|
||||
+ *
|
||||
+ * The @data_crc field contains the CRC checksum of the contents of the logical
|
||||
+ * eraseblock if this is a static volume. In case of dynamic volumes, it does
|
||||
+ * not contain the CRC checksum as a rule. The only exception is when the
|
||||
+ * data of the physical eraseblock was moved by the wear-leveling unit, then
|
||||
+ * the wear-leveling unit calculates the data CRC and stores it in the
|
||||
+ * @data_crc field. And of course, the @copy_flag is %in this case.
|
||||
+ *
|
||||
+ * The @data_size field is used only for static volumes because UBI has to know
|
||||
+ * how many bytes of data are stored in this eraseblock. For dynamic volumes,
|
||||
+ * this field usually contains zero. The only exception is when the data of the
|
||||
+ * physical eraseblock was moved to another physical eraseblock for
|
||||
+ * wear-leveling reasons. In this case, UBI calculates CRC checksum of the
|
||||
+ * contents and uses both @data_crc and @data_size fields. In this case, the
|
||||
+ * @data_size field contains data size.
|
||||
+ *
|
||||
+ * The @used_ebs field is used only for static volumes and indicates how many
|
||||
+ * eraseblocks the data of the volume takes. For dynamic volumes this field is
|
||||
+ * not used and always contains zero.
|
||||
+ *
|
||||
+ * The @data_pad is calculated when volumes are created using the alignment
|
||||
+ * parameter. So, effectively, the @data_pad field reduces the size of logical
|
||||
+ * eraseblocks of this volume. This is very handy when one uses block-oriented
|
||||
+ * software (say, cramfs) on top of the UBI volume.
|
||||
+ */
|
||||
+struct ubi_vid_hdr {
|
||||
+ __be32 magic;
|
||||
+ __u8 version;
|
||||
+ __u8 vol_type;
|
||||
+ __u8 copy_flag;
|
||||
+ __u8 compat;
|
||||
+ __be32 vol_id;
|
||||
+ __be32 lnum;
|
||||
+ __be32 leb_ver; /* obsolete, to be removed, don't use */
|
||||
+ __be32 data_size;
|
||||
+ __be32 used_ebs;
|
||||
+ __be32 data_pad;
|
||||
+ __be32 data_crc;
|
||||
+ __u8 padding1[4];
|
||||
+ __be64 sqnum;
|
||||
+ __u8 padding2[12];
|
||||
+ __be32 hdr_crc;
|
||||
+} __attribute__ ((packed));
|
||||
+
|
||||
+/* Internal UBI volumes count */
|
||||
+#define UBI_INT_VOL_COUNT 1
|
||||
+
|
||||
+/*
|
||||
+ * Starting ID of internal volumes. There is reserved room for 4096 internal
|
||||
+ * volumes.
|
||||
+ */
|
||||
+#define UBI_INTERNAL_VOL_START (0x7FFFFFFF - 4096)
|
||||
+
|
||||
+/* The layout volume contains the volume table */
|
||||
+
|
||||
+#define UBI_LAYOUT_VOLUME_ID UBI_INTERNAL_VOL_START
|
||||
+#define UBI_LAYOUT_VOLUME_TYPE UBI_VID_DYNAMIC
|
||||
+#define UBI_LAYOUT_VOLUME_ALIGN 1
|
||||
+#define UBI_LAYOUT_VOLUME_EBS 2
|
||||
+#define UBI_LAYOUT_VOLUME_NAME "layout volume"
|
||||
+#define UBI_LAYOUT_VOLUME_COMPAT UBI_COMPAT_REJECT
|
||||
+
|
||||
+/* The maximum number of volumes per one UBI device */
|
||||
+#define UBI_MAX_VOLUMES 128
|
||||
+
|
||||
+/* The maximum volume name length */
|
||||
+#define UBI_VOL_NAME_MAX 127
|
||||
+
|
||||
+/* Size of the volume table record */
|
||||
+#define UBI_VTBL_RECORD_SIZE sizeof(struct ubi_vtbl_record)
|
||||
+
|
||||
+/* Size of the volume table record without the ending CRC */
|
||||
+#define UBI_VTBL_RECORD_SIZE_CRC (UBI_VTBL_RECORD_SIZE - sizeof(__be32))
|
||||
+
|
||||
+/**
|
||||
+ * struct ubi_vtbl_record - a record in the volume table.
|
||||
+ * @reserved_pebs: how many physical eraseblocks are reserved for this volume
|
||||
+ * @alignment: volume alignment
|
||||
+ * @data_pad: how many bytes are unused at the end of the each physical
|
||||
+ * eraseblock to satisfy the requested alignment
|
||||
+ * @vol_type: volume type (%UBI_DYNAMIC_VOLUME or %UBI_STATIC_VOLUME)
|
||||
+ * @upd_marker: if volume update was started but not finished
|
||||
+ * @name_len: volume name length
|
||||
+ * @name: the volume name
|
||||
+ * @flags: volume flags (%UBI_VTBL_AUTORESIZE_FLG)
|
||||
+ * @padding: reserved, zeroes
|
||||
+ * @crc: a CRC32 checksum of the record
|
||||
+ *
|
||||
+ * The volume table records are stored in the volume table, which is stored in
|
||||
+ * the layout volume. The layout volume consists of 2 logical eraseblock, each
|
||||
+ * of which contains a copy of the volume table (i.e., the volume table is
|
||||
+ * duplicated). The volume table is an array of &struct ubi_vtbl_record
|
||||
+ * objects indexed by the volume ID.
|
||||
+ *
|
||||
+ * If the size of the logical eraseblock is large enough to fit
|
||||
+ * %UBI_MAX_VOLUMES records, the volume table contains %UBI_MAX_VOLUMES
|
||||
+ * records. Otherwise, it contains as many records as it can fit (i.e., size of
|
||||
+ * logical eraseblock divided by sizeof(struct ubi_vtbl_record)).
|
||||
+ *
|
||||
+ * The @upd_marker flag is used to implement volume update. It is set to %1
|
||||
+ * before update and set to %0 after the update. So if the update operation was
|
||||
+ * interrupted, UBI knows that the volume is corrupted.
|
||||
+ *
|
||||
+ * The @alignment field is specified when the volume is created and cannot be
|
||||
+ * later changed. It may be useful, for example, when a block-oriented file
|
||||
+ * system works on top of UBI. The @data_pad field is calculated using the
|
||||
+ * logical eraseblock size and @alignment. The alignment must be multiple to the
|
||||
+ * minimal flash I/O unit. If @alignment is 1, all the available space of
|
||||
+ * the physical eraseblocks is used.
|
||||
+ *
|
||||
+ * Empty records contain all zeroes and the CRC checksum of those zeroes.
|
||||
+ */
|
||||
+struct ubi_vtbl_record {
|
||||
+ __be32 reserved_pebs;
|
||||
+ __be32 alignment;
|
||||
+ __be32 data_pad;
|
||||
+ __u8 vol_type;
|
||||
+ __u8 upd_marker;
|
||||
+ __be16 name_len;
|
||||
+ __u8 name[UBI_VOL_NAME_MAX+1];
|
||||
+ __u8 flags;
|
||||
+ __u8 padding[23];
|
||||
+ __be32 crc;
|
||||
+} __attribute__ ((packed));
|
||||
+
|
||||
+#endif /* !__UBI_HEADER_H__ */
|
|
@ -1,91 +0,0 @@
|
|||
From 5ec0397679f1c1606199cfd6f3e24351891c60c3 Mon Sep 17 00:00:00 2001
|
||||
From: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
|
||||
Date: Mon, 5 May 2008 10:22:48 +0800
|
||||
Subject: [PATCH] iwlwifi : Set monitor mode for 3945
|
||||
|
||||
The patch leverages mac80211 configure_filter to enable iwl3945
|
||||
monitor mode.
|
||||
|
||||
Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
|
||||
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
||||
---
|
||||
drivers/net/wireless/iwlwifi/iwl-3945.h | 1 +
|
||||
drivers/net/wireless/iwlwifi/iwl3945-base.c | 36 ++++++++++++++++++++++++++-
|
||||
2 files changed, 36 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.h b/drivers/net/wireless/iwlwifi/iwl-3945.h
|
||||
index fb96c62..9fdc140 100644
|
||||
--- a/drivers/net/wireless/iwlwifi/iwl-3945.h
|
||||
+++ b/drivers/net/wireless/iwlwifi/iwl-3945.h
|
||||
@@ -886,6 +886,7 @@ struct iwl3945_priv {
|
||||
struct work_struct report_work;
|
||||
struct work_struct request_scan;
|
||||
struct work_struct beacon_update;
|
||||
+ struct work_struct set_monitor;
|
||||
|
||||
struct tasklet_struct irq_tasklet;
|
||||
|
||||
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
|
||||
index 7040cde..f021eba 100644
|
||||
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
|
||||
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
|
||||
@@ -6144,6 +6144,24 @@ static void iwl3945_bg_rf_kill(struct work_struct *work)
|
||||
mutex_unlock(&priv->mutex);
|
||||
}
|
||||
|
||||
+static void iwl3945_bg_set_monitor(struct work_struct *work)
|
||||
+{
|
||||
+ struct iwl3945_priv *priv = container_of(work,
|
||||
+ struct iwl3945_priv, set_monitor);
|
||||
+
|
||||
+ IWL_DEBUG(IWL_DL_STATE, "setting monitor mode\n");
|
||||
+
|
||||
+ mutex_lock(&priv->mutex);
|
||||
+
|
||||
+ if (!iwl3945_is_ready(priv))
|
||||
+ IWL_DEBUG(IWL_DL_STATE, "leave - not ready\n");
|
||||
+ else
|
||||
+ if (iwl3945_set_mode(priv, IEEE80211_IF_TYPE_MNTR) != 0)
|
||||
+ IWL_ERROR("iwl3945_set_mode() failed\n");
|
||||
+
|
||||
+ mutex_unlock(&priv->mutex);
|
||||
+}
|
||||
+
|
||||
#define IWL_SCAN_CHECK_WATCHDOG (7 * HZ)
|
||||
|
||||
static void iwl3945_bg_scan_check(struct work_struct *data)
|
||||
@@ -6996,7 +7014,22 @@ static void iwl3945_configure_filter(struct ieee80211_hw *hw,
|
||||
* XXX: dummy
|
||||
* see also iwl3945_connection_init_rx_config
|
||||
*/
|
||||
- *total_flags = 0;
|
||||
+ struct iwl3945_priv *priv = hw->priv;
|
||||
+ int new_flags = 0;
|
||||
+ if (changed_flags & (FIF_PROMISC_IN_BSS | FIF_OTHER_BSS)) {
|
||||
+ if (*total_flags & (FIF_PROMISC_IN_BSS | FIF_OTHER_BSS)) {
|
||||
+ IWL_DEBUG_MAC80211("Enter: type %d (0x%x, 0x%x)\n",
|
||||
+ IEEE80211_IF_TYPE_MNTR,
|
||||
+ changed_flags, *total_flags);
|
||||
+ /* queue work 'cuz mac80211 is holding a lock which
|
||||
+ * prevents us from issuing (synchronous) f/w cmds */
|
||||
+ queue_work(priv->workqueue, &priv->set_monitor);
|
||||
+ new_flags &= FIF_PROMISC_IN_BSS |
|
||||
+ FIF_OTHER_BSS |
|
||||
+ FIF_ALLMULTI;
|
||||
+ }
|
||||
+ }
|
||||
+ *total_flags = new_flags;
|
||||
}
|
||||
|
||||
static void iwl3945_mac_remove_interface(struct ieee80211_hw *hw,
|
||||
@@ -7872,6 +7905,7 @@ static void iwl3945_setup_deferred_work(struct iwl3945_priv *priv)
|
||||
INIT_WORK(&priv->abort_scan, iwl3945_bg_abort_scan);
|
||||
INIT_WORK(&priv->rf_kill, iwl3945_bg_rf_kill);
|
||||
INIT_WORK(&priv->beacon_update, iwl3945_bg_beacon_update);
|
||||
+ INIT_WORK(&priv->set_monitor, iwl3945_bg_set_monitor);
|
||||
INIT_DELAYED_WORK(&priv->post_associate, iwl3945_bg_post_associate);
|
||||
INIT_DELAYED_WORK(&priv->init_alive_start, iwl3945_bg_init_alive_start);
|
||||
INIT_DELAYED_WORK(&priv->alive_start, iwl3945_bg_alive_start);
|
||||
--
|
||||
1.5.5.1
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -53,15 +53,5 @@
|
|||
+ features/all/at76.patch
|
||||
+ bugfix/fix-hifn_795X-divdi3.patch
|
||||
+ bugfix/all/mtd-prevent-physmap-from-causing-request_module-runaway-loop-modprobe-net-pf-1.patch
|
||||
#+ features/all/0001-iwlwifi-Set-monitor-mode-for-3945.patch
|
||||
#+ features/all/xen/tip-x86.patch
|
||||
#+ bugfix/all/x86-acpi-sleep-x61s.patch
|
||||
+ bugfix/powerpc/mm-mol.patch
|
||||
#+ features/all/drivers-net-atl1e.patch
|
||||
#+ bugfix/all/atl1e_config_pm.patch
|
||||
#+ bugfix/all/sound_hda_ich9.patch
|
||||
#+ bugfix/all/sound_hda_intel_dg33.patch
|
||||
#+ features/x86/drivers-hp_ilo.patch
|
||||
#+ bugfix/all/Input-i8042-add-Arima-Rioworks-HDAMB-board-to-nol.patch
|
||||
#+ bugfix/powerpc/lpar-console.patch
|
||||
#+ debian/include-userspace-compat.patch
|
||||
|
|
Loading…
Reference in New Issue