Add 2.6.33 branch to git repository.
This commit is contained in:
parent
d47af17904
commit
b5010d0d56
@ -1,21 +1,40 @@
|
||||
From e2e8fc4ed31157e9e9e9cbc70febf08c77233aea Mon Sep 17 00:00:00 2001
|
||||
From: Kyle McMartin <kyle@dreadnought.i.jkkm.org>
|
||||
Date: Thu, 20 May 2010 10:17:58 -0400
|
||||
Subject: add-appleir-driver
|
||||
commit 92c912df2a0725d719263357176f98b2201a2acd
|
||||
Author: Bastien Nocera <hadess@hadess.net>
|
||||
Date: Wed Apr 21 14:51:58 2010 +0100
|
||||
|
||||
---
|
||||
Documentation/input/appleir.txt | 45 ++++
|
||||
drivers/hid/hid-apple.c | 4 -
|
||||
drivers/hid/hid-core.c | 9 +-
|
||||
drivers/hid/hid-ids.h | 1 +
|
||||
drivers/hid/usbhid/hid-core.c | 1 +
|
||||
drivers/input/misc/Kconfig | 13 ++
|
||||
drivers/input/misc/Makefile | 1 +
|
||||
drivers/input/misc/appleir.c | 453 +++++++++++++++++++++++++++++++++++++++
|
||||
include/linux/hid.h | 2 +
|
||||
9 files changed, 522 insertions(+), 7 deletions(-)
|
||||
create mode 100644 Documentation/input/appleir.txt
|
||||
create mode 100644 drivers/input/misc/appleir.c
|
||||
Input: add appleir USB driver
|
||||
|
||||
This driver was originally written by James McKenzie, updated by
|
||||
Greg Kroah-Hartman, further updated by myself, with suspend support
|
||||
added.
|
||||
|
||||
More recent versions of the IR receiver are also supported through
|
||||
a patch by Alex Karpenko.
|
||||
|
||||
Tested on a MacbookAir1,1
|
||||
|
||||
Signed-off-by: Bastien Nocera <hadess@hadess.net>
|
||||
|
||||
commit 6ffcbf68913840e9e882db14441576ffee6eba0c
|
||||
Author: Bastien Nocera <hadess@hadess.net>
|
||||
Date: Fri Apr 16 17:19:50 2010 +0100
|
||||
|
||||
Add HID_QUIRK_HIDDEV_FORCE and HID_QUIRK_NO_IGNORE
|
||||
|
||||
Add two quirks to make it possible for usbhid module options to
|
||||
override whether a device is ignored (HID_QUIRK_NO_IGNORE) and
|
||||
whether to connect a hiddev device (HID_QUIRK_HIDDEV_FORCE).
|
||||
|
||||
Passing HID_QUIRK_NO_IGNORE for your device means that it will
|
||||
not be ignored by the HID layer, even if present in a blacklist.
|
||||
|
||||
HID_QUIRK_HIDDEV_FORCE will force the creation of a hiddev for that
|
||||
device, making it accessible from user-space.
|
||||
|
||||
Tested with an Apple IR Receiver, switching it from using appleir
|
||||
to using lirc's macmini driver.
|
||||
|
||||
Signed-off-by: Bastien Nocera <hadess@hadess.net>
|
||||
|
||||
diff --git a/Documentation/input/appleir.txt b/Documentation/input/appleir.txt
|
||||
new file mode 100644
|
||||
@ -69,10 +88,10 @@ index 0000000..0267a4b
|
||||
+This should force the creation of a hiddev device for the receiver, and
|
||||
+make it usable under lirc.
|
||||
diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c
|
||||
index bba05d0..0059d5a 100644
|
||||
index 5b4d66d..b0e1811 100644
|
||||
--- a/drivers/hid/hid-apple.c
|
||||
+++ b/drivers/hid/hid-apple.c
|
||||
@@ -361,10 +361,6 @@ static void apple_remove(struct hid_device *hdev)
|
||||
@@ -353,10 +353,6 @@ static void apple_remove(struct hid_device *hdev)
|
||||
}
|
||||
|
||||
static const struct hid_device_id apple_devices[] = {
|
||||
@ -84,10 +103,10 @@ index bba05d0..0059d5a 100644
|
||||
.driver_data = APPLE_MIGHTYMOUSE | APPLE_INVERT_HWHEEL },
|
||||
|
||||
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
|
||||
index 143e788..387bb59 100644
|
||||
index 8455f3d..e795d8c 100644
|
||||
--- a/drivers/hid/hid-core.c
|
||||
+++ b/drivers/hid/hid-core.c
|
||||
@@ -1167,6 +1167,8 @@ int hid_connect(struct hid_device *hdev, unsigned int connect_mask)
|
||||
@@ -1170,6 +1170,8 @@ int hid_connect(struct hid_device *hdev, unsigned int connect_mask)
|
||||
unsigned int i;
|
||||
int len;
|
||||
|
||||
@ -96,26 +115,26 @@ index 143e788..387bb59 100644
|
||||
if (hdev->bus != BUS_USB)
|
||||
connect_mask &= ~HID_CONNECT_HIDDEV;
|
||||
if (hid_hiddev(hdev))
|
||||
@@ -1248,8 +1250,6 @@ static const struct hid_device_id hid_blacklist[] = {
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_3M, USB_DEVICE_ID_3M1968) },
|
||||
@@ -1250,8 +1252,6 @@ EXPORT_SYMBOL_GPL(hid_disconnect);
|
||||
static const struct hid_device_id hid_blacklist[] = {
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_WCP32PU) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_X5_005D) },
|
||||
- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ATV_IRCONTROL) },
|
||||
- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL4) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MIGHTYMOUSE) },
|
||||
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGICMOUSE) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_ANSI) },
|
||||
@@ -1553,6 +1553,9 @@ static const struct hid_device_id hid_ignore_list[] = {
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_ASUS, USB_DEVICE_ID_ASUS_T91MT)},
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK, USB_DEVICE_ID_ASUSTEK_LCM)},
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK, USB_DEVICE_ID_ASUSTEK_LCM2)},
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_ISO) },
|
||||
@@ -1545,6 +1545,9 @@ static const struct hid_device_id hid_ignore_list[] = {
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_ALCOR, USB_DEVICE_ID_ALCOR_USBRS232) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_ASUS, USB_DEVICE_ID_ASUS_LCM)},
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_ASUS, USB_DEVICE_ID_ASUS_LCM2)},
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL) },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ATV_IRCONTROL) },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL4) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_AVERMEDIA, USB_DEVICE_ID_AVER_FM_MR800) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_BERKSHIRE, USB_DEVICE_ID_BERKSHIRE_PCWD) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_CIDC, 0x0103) },
|
||||
@@ -1757,7 +1760,7 @@ int hid_add_device(struct hid_device *hdev)
|
||||
@@ -1749,7 +1752,7 @@ int hid_add_device(struct hid_device *hdev)
|
||||
|
||||
/* we need to kill them here, otherwise they will stay allocated to
|
||||
* wait for coming driver */
|
||||
@ -125,10 +144,10 @@ index 143e788..387bb59 100644
|
||||
|
||||
/* XXX hack, any other cleaner solution after the driver core
|
||||
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
|
||||
index 09d2764..7275a9d 100644
|
||||
index 793691f..9255c1a 100644
|
||||
--- a/drivers/hid/hid-ids.h
|
||||
+++ b/drivers/hid/hid-ids.h
|
||||
@@ -97,6 +97,7 @@
|
||||
@@ -93,6 +93,7 @@
|
||||
#define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS 0x023b
|
||||
#define USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY 0x030a
|
||||
#define USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY 0x030b
|
||||
@ -137,10 +156,10 @@ index 09d2764..7275a9d 100644
|
||||
#define USB_DEVICE_ID_APPLE_IRCONTROL4 0x8242
|
||||
|
||||
diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c
|
||||
index 7b85b69..66b512c 100644
|
||||
index 2f84237..2de42e1 100644
|
||||
--- a/drivers/hid/usbhid/hid-core.c
|
||||
+++ b/drivers/hid/usbhid/hid-core.c
|
||||
@@ -1133,6 +1133,7 @@ static int usbhid_probe(struct usb_interface *intf, const struct usb_device_id *
|
||||
@@ -1142,6 +1142,7 @@ static int usbhid_probe(struct usb_interface *intf, const struct usb_device_id *
|
||||
hid->vendor = le16_to_cpu(dev->descriptor.idVendor);
|
||||
hid->product = le16_to_cpu(dev->descriptor.idProduct);
|
||||
hid->name[0] = 0;
|
||||
@ -149,10 +168,10 @@ index 7b85b69..66b512c 100644
|
||||
USB_INTERFACE_PROTOCOL_MOUSE)
|
||||
hid->type = HID_TYPE_USBMOUSE;
|
||||
diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig
|
||||
index 23140a3..46614b2 100644
|
||||
index 16ec523..4340986 100644
|
||||
--- a/drivers/input/misc/Kconfig
|
||||
+++ b/drivers/input/misc/Kconfig
|
||||
@@ -159,6 +159,19 @@ config INPUT_KEYSPAN_REMOTE
|
||||
@@ -149,6 +149,19 @@ config INPUT_KEYSPAN_REMOTE
|
||||
To compile this driver as a module, choose M here: the module will
|
||||
be called keyspan_remote.
|
||||
|
||||
@ -173,12 +192,12 @@ index 23140a3..46614b2 100644
|
||||
tristate "Griffin PowerMate and Contour Jog support"
|
||||
depends on USB_ARCH_HAS_HCD
|
||||
diff --git a/drivers/input/misc/Makefile b/drivers/input/misc/Makefile
|
||||
index 7e95a5d..3fa4404 100644
|
||||
index a8b8485..041e6f5 100644
|
||||
--- a/drivers/input/misc/Makefile
|
||||
+++ b/drivers/input/misc/Makefile
|
||||
@@ -6,6 +6,7 @@
|
||||
@@ -5,6 +5,7 @@
|
||||
# Each configuration option enables a list of files.
|
||||
|
||||
obj-$(CONFIG_INPUT_88PM860X_ONKEY) += 88pm860x_onkey.o
|
||||
obj-$(CONFIG_INPUT_APANEL) += apanel.o
|
||||
+obj-$(CONFIG_INPUT_APPLEIR) += appleir.o
|
||||
obj-$(CONFIG_INPUT_ATI_REMOTE) += ati_remote.o
|
||||
@ -644,7 +663,7 @@ index 0000000..cff4df6
|
||||
+module_init(appleir_init);
|
||||
+module_exit(appleir_exit);
|
||||
diff --git a/include/linux/hid.h b/include/linux/hid.h
|
||||
index b1344ec..f1f2b6f 100644
|
||||
index 8709365..662596b 100644
|
||||
--- a/include/linux/hid.h
|
||||
+++ b/include/linux/hid.h
|
||||
@@ -308,11 +308,13 @@ struct hid_item {
|
||||
@ -661,6 +680,3 @@ index b1344ec..f1f2b6f 100644
|
||||
|
||||
/*
|
||||
* This is the global environment of the parser. This information is
|
||||
--
|
||||
1.7.0.1
|
||||
|
348
alsa-usbmixer-add-possibility-to-remap-dB-values.patch
Normal file
348
alsa-usbmixer-add-possibility-to-remap-dB-values.patch
Normal file
@ -0,0 +1,348 @@
|
||||
From 82ff9c3b767ec5bfaed3d99c9ed1160e44cbfd53 Mon Sep 17 00:00:00 2001
|
||||
From: Jaroslav Kysela <perex@perex.cz>
|
||||
Date: Thu, 11 Feb 2010 17:50:44 +0100
|
||||
Subject: ALSA: usbmixer - add possibility to remap dB values
|
||||
|
||||
USB devices tends to represent dB ranges in different way than ALSA expects.
|
||||
Add possibility to override these values and add guessed values for
|
||||
SoundBlaster MP3+.
|
||||
|
||||
Also rename 'Capture Input Source' control to 'Capture Source' for
|
||||
SoundBlaster MP3+ and Extigy.
|
||||
|
||||
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
||||
---
|
||||
sound/usb/usbmixer.c | 125 +++++++++++++++++++++++++++------------------
|
||||
sound/usb/usbmixer_maps.c | 23 ++++++--
|
||||
2 files changed, 93 insertions(+), 55 deletions(-)
|
||||
|
||||
diff --git a/sound/usb/usbmixer.c b/sound/usb/usbmixer.c
|
||||
index c998220..c72ad0c 100644
|
||||
--- a/sound/usb/usbmixer.c
|
||||
+++ b/sound/usb/usbmixer.c
|
||||
@@ -123,6 +123,7 @@ struct usb_mixer_elem_info {
|
||||
int channels;
|
||||
int val_type;
|
||||
int min, max, res;
|
||||
+ int dBmin, dBmax;
|
||||
int cached;
|
||||
int cache_val[MAX_CHANNELS];
|
||||
u8 initialized;
|
||||
@@ -194,42 +195,50 @@ enum {
|
||||
*/
|
||||
#include "usbmixer_maps.c"
|
||||
|
||||
-/* get the mapped name if the unit matches */
|
||||
-static int check_mapped_name(struct mixer_build *state, int unitid, int control, char *buf, int buflen)
|
||||
+static const struct usbmix_name_map *
|
||||
+find_map(struct mixer_build *state, int unitid, int control)
|
||||
{
|
||||
- const struct usbmix_name_map *p;
|
||||
+ const struct usbmix_name_map *p = state->map;
|
||||
|
||||
- if (! state->map)
|
||||
- return 0;
|
||||
+ if (!p)
|
||||
+ return NULL;
|
||||
|
||||
for (p = state->map; p->id; p++) {
|
||||
- if (p->id == unitid && p->name &&
|
||||
- (! control || ! p->control || control == p->control)) {
|
||||
- buflen--;
|
||||
- return strlcpy(buf, p->name, buflen);
|
||||
- }
|
||||
+ if (p->id == unitid &&
|
||||
+ (!control || !p->control || control == p->control))
|
||||
+ return p;
|
||||
}
|
||||
- return 0;
|
||||
+ return NULL;
|
||||
}
|
||||
|
||||
-/* check whether the control should be ignored */
|
||||
-static int check_ignored_ctl(struct mixer_build *state, int unitid, int control)
|
||||
+/* get the mapped name if the unit matches */
|
||||
+static int
|
||||
+check_mapped_name(const struct usbmix_name_map *p, char *buf, int buflen)
|
||||
{
|
||||
- const struct usbmix_name_map *p;
|
||||
+ if (!p || !p->name)
|
||||
+ return 0;
|
||||
|
||||
- if (! state->map)
|
||||
+ buflen--;
|
||||
+ return strlcpy(buf, p->name, buflen);
|
||||
+}
|
||||
+
|
||||
+/* check whether the control should be ignored */
|
||||
+static inline int
|
||||
+check_ignored_ctl(const struct usbmix_name_map *p)
|
||||
+{
|
||||
+ if (!p || p->name || p->dB)
|
||||
return 0;
|
||||
- for (p = state->map; p->id; p++) {
|
||||
- if (p->id == unitid && ! p->name &&
|
||||
- (! control || ! p->control || control == p->control)) {
|
||||
- /*
|
||||
- printk(KERN_DEBUG "ignored control %d:%d\n",
|
||||
- unitid, control);
|
||||
- */
|
||||
- return 1;
|
||||
- }
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+/* dB mapping */
|
||||
+static inline void check_mapped_dB(const struct usbmix_name_map *p,
|
||||
+ struct usb_mixer_elem_info *cval)
|
||||
+{
|
||||
+ if (p && p->dB) {
|
||||
+ cval->dBmin = p->dB->min;
|
||||
+ cval->dBmax = p->dB->max;
|
||||
}
|
||||
- return 0;
|
||||
}
|
||||
|
||||
/* get the mapped selector source name */
|
||||
@@ -466,20 +475,8 @@ static int mixer_vol_tlv(struct snd_kcontrol *kcontrol, int op_flag,
|
||||
|
||||
if (size < sizeof(scale))
|
||||
return -ENOMEM;
|
||||
- /* USB descriptions contain the dB scale in 1/256 dB unit
|
||||
- * while ALSA TLV contains in 1/100 dB unit
|
||||
- */
|
||||
- scale[2] = (convert_signed_value(cval, cval->min) * 100) / 256;
|
||||
- scale[3] = (convert_signed_value(cval, cval->max) * 100) / 256;
|
||||
- if (scale[3] <= scale[2]) {
|
||||
- /* something is wrong; assume it's either from/to 0dB */
|
||||
- if (scale[2] < 0)
|
||||
- scale[3] = 0;
|
||||
- else if (scale[2] > 0)
|
||||
- scale[2] = 0;
|
||||
- else /* totally crap, return an error */
|
||||
- return -EINVAL;
|
||||
- }
|
||||
+ scale[2] = cval->dBmin;
|
||||
+ scale[3] = cval->dBmax;
|
||||
if (copy_to_user(_tlv, scale, sizeof(scale)))
|
||||
return -EFAULT;
|
||||
return 0;
|
||||
@@ -720,6 +717,7 @@ static int get_min_max(struct usb_mixer_elem_info *cval, int default_min)
|
||||
cval->min = default_min;
|
||||
cval->max = cval->min + 1;
|
||||
cval->res = 1;
|
||||
+ cval->dBmin = cval->dBmax = 0;
|
||||
|
||||
if (cval->val_type == USB_MIXER_BOOLEAN ||
|
||||
cval->val_type == USB_MIXER_INV_BOOLEAN) {
|
||||
@@ -787,6 +785,24 @@ static int get_min_max(struct usb_mixer_elem_info *cval, int default_min)
|
||||
|
||||
cval->initialized = 1;
|
||||
}
|
||||
+
|
||||
+ /* USB descriptions contain the dB scale in 1/256 dB unit
|
||||
+ * while ALSA TLV contains in 1/100 dB unit
|
||||
+ */
|
||||
+ cval->dBmin = (convert_signed_value(cval, cval->min) * 100) / 256;
|
||||
+ cval->dBmax = (convert_signed_value(cval, cval->max) * 100) / 256;
|
||||
+ if (cval->dBmin > cval->dBmax) {
|
||||
+ /* something is wrong; assume it's either from/to 0dB */
|
||||
+ if (cval->dBmin < 0)
|
||||
+ cval->dBmax = 0;
|
||||
+ else if (cval->dBmin > 0)
|
||||
+ cval->dBmin = 0;
|
||||
+ if (cval->dBmin > cval->dBmax) {
|
||||
+ /* totally crap, return an error */
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -912,6 +928,7 @@ static void build_feature_ctl(struct mixer_build *state, unsigned char *desc,
|
||||
int nameid = desc[desc[0] - 1];
|
||||
struct snd_kcontrol *kctl;
|
||||
struct usb_mixer_elem_info *cval;
|
||||
+ const struct usbmix_name_map *map;
|
||||
|
||||
control++; /* change from zero-based to 1-based value */
|
||||
|
||||
@@ -920,7 +937,8 @@ static void build_feature_ctl(struct mixer_build *state, unsigned char *desc,
|
||||
return;
|
||||
}
|
||||
|
||||
- if (check_ignored_ctl(state, unitid, control))
|
||||
+ map = find_map(state, unitid, control);
|
||||
+ if (check_ignored_ctl(map))
|
||||
return;
|
||||
|
||||
cval = kzalloc(sizeof(*cval), GFP_KERNEL);
|
||||
@@ -954,10 +972,11 @@ static void build_feature_ctl(struct mixer_build *state, unsigned char *desc,
|
||||
}
|
||||
kctl->private_free = usb_mixer_elem_free;
|
||||
|
||||
- len = check_mapped_name(state, unitid, control, kctl->id.name, sizeof(kctl->id.name));
|
||||
+ len = check_mapped_name(map, kctl->id.name, sizeof(kctl->id.name));
|
||||
mapped_name = len != 0;
|
||||
if (! len && nameid)
|
||||
- len = snd_usb_copy_string_desc(state, nameid, kctl->id.name, sizeof(kctl->id.name));
|
||||
+ len = snd_usb_copy_string_desc(state, nameid,
|
||||
+ kctl->id.name, sizeof(kctl->id.name));
|
||||
|
||||
switch (control) {
|
||||
case USB_FEATURE_MUTE:
|
||||
@@ -995,6 +1014,7 @@ static void build_feature_ctl(struct mixer_build *state, unsigned char *desc,
|
||||
kctl->vd[0].access |=
|
||||
SNDRV_CTL_ELEM_ACCESS_TLV_READ |
|
||||
SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK;
|
||||
+ check_mapped_dB(map, cval);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1122,8 +1142,10 @@ static void build_mixer_unit_ctl(struct mixer_build *state, unsigned char *desc,
|
||||
unsigned int num_outs = desc[5 + input_pins];
|
||||
unsigned int i, len;
|
||||
struct snd_kcontrol *kctl;
|
||||
+ const struct usbmix_name_map *map;
|
||||
|
||||
- if (check_ignored_ctl(state, unitid, 0))
|
||||
+ map = find_map(state, unitid, 0);
|
||||
+ if (check_ignored_ctl(map))
|
||||
return;
|
||||
|
||||
cval = kzalloc(sizeof(*cval), GFP_KERNEL);
|
||||
@@ -1152,7 +1174,7 @@ static void build_mixer_unit_ctl(struct mixer_build *state, unsigned char *desc,
|
||||
}
|
||||
kctl->private_free = usb_mixer_elem_free;
|
||||
|
||||
- len = check_mapped_name(state, unitid, 0, kctl->id.name, sizeof(kctl->id.name));
|
||||
+ len = check_mapped_name(map, kctl->id.name, sizeof(kctl->id.name));
|
||||
if (! len)
|
||||
len = get_term_name(state, iterm, kctl->id.name, sizeof(kctl->id.name), 0);
|
||||
if (! len)
|
||||
@@ -1342,6 +1364,7 @@ static int build_audio_procunit(struct mixer_build *state, int unitid, unsigned
|
||||
int i, err, nameid, type, len;
|
||||
struct procunit_info *info;
|
||||
struct procunit_value_info *valinfo;
|
||||
+ const struct usbmix_name_map *map;
|
||||
static struct procunit_value_info default_value_info[] = {
|
||||
{ 0x01, "Switch", USB_MIXER_BOOLEAN },
|
||||
{ 0 }
|
||||
@@ -1371,7 +1394,8 @@ static int build_audio_procunit(struct mixer_build *state, int unitid, unsigned
|
||||
/* FIXME: bitmap might be longer than 8bit */
|
||||
if (! (dsc[12 + num_ins] & (1 << (valinfo->control - 1))))
|
||||
continue;
|
||||
- if (check_ignored_ctl(state, unitid, valinfo->control))
|
||||
+ map = find_map(state, unitid, valinfo->control);
|
||||
+ if (check_ignored_ctl(map))
|
||||
continue;
|
||||
cval = kzalloc(sizeof(*cval), GFP_KERNEL);
|
||||
if (! cval) {
|
||||
@@ -1402,8 +1426,9 @@ static int build_audio_procunit(struct mixer_build *state, int unitid, unsigned
|
||||
}
|
||||
kctl->private_free = usb_mixer_elem_free;
|
||||
|
||||
- if (check_mapped_name(state, unitid, cval->control, kctl->id.name, sizeof(kctl->id.name)))
|
||||
- ;
|
||||
+ if (check_mapped_name(map, kctl->id.name,
|
||||
+ sizeof(kctl->id.name)))
|
||||
+ /* nothing */ ;
|
||||
else if (info->name)
|
||||
strlcpy(kctl->id.name, info->name, sizeof(kctl->id.name));
|
||||
else {
|
||||
@@ -1542,6 +1567,7 @@ static int parse_audio_selector_unit(struct mixer_build *state, int unitid, unsi
|
||||
int err;
|
||||
struct usb_mixer_elem_info *cval;
|
||||
struct snd_kcontrol *kctl;
|
||||
+ const struct usbmix_name_map *map;
|
||||
char **namelist;
|
||||
|
||||
if (! num_ins || desc[0] < 5 + num_ins) {
|
||||
@@ -1557,7 +1583,8 @@ static int parse_audio_selector_unit(struct mixer_build *state, int unitid, unsi
|
||||
if (num_ins == 1) /* only one ? nonsense! */
|
||||
return 0;
|
||||
|
||||
- if (check_ignored_ctl(state, unitid, 0))
|
||||
+ map = find_map(state, unitid, 0);
|
||||
+ if (check_ignored_ctl(map))
|
||||
return 0;
|
||||
|
||||
cval = kzalloc(sizeof(*cval), GFP_KERNEL);
|
||||
@@ -1612,7 +1639,7 @@ static int parse_audio_selector_unit(struct mixer_build *state, int unitid, unsi
|
||||
kctl->private_free = usb_mixer_selector_elem_free;
|
||||
|
||||
nameid = desc[desc[0] - 1];
|
||||
- len = check_mapped_name(state, unitid, 0, kctl->id.name, sizeof(kctl->id.name));
|
||||
+ len = check_mapped_name(map, kctl->id.name, sizeof(kctl->id.name));
|
||||
if (len)
|
||||
;
|
||||
else if (nameid)
|
||||
diff --git a/sound/usb/usbmixer_maps.c b/sound/usb/usbmixer_maps.c
|
||||
index 77c3588..79e903a 100644
|
||||
--- a/sound/usb/usbmixer_maps.c
|
||||
+++ b/sound/usb/usbmixer_maps.c
|
||||
@@ -19,11 +19,16 @@
|
||||
*
|
||||
*/
|
||||
|
||||
+struct usbmix_dB_map {
|
||||
+ u32 min;
|
||||
+ u32 max;
|
||||
+};
|
||||
|
||||
struct usbmix_name_map {
|
||||
int id;
|
||||
const char *name;
|
||||
int control;
|
||||
+ struct usbmix_dB_map *dB;
|
||||
};
|
||||
|
||||
struct usbmix_selector_map {
|
||||
@@ -72,7 +77,7 @@ static struct usbmix_name_map extigy_map[] = {
|
||||
{ 8, "Line Playback" }, /* FU */
|
||||
/* 9: IT mic */
|
||||
{ 10, "Mic Playback" }, /* FU */
|
||||
- { 11, "Capture Input Source" }, /* SU */
|
||||
+ { 11, "Capture Source" }, /* SU */
|
||||
{ 12, "Capture" }, /* FU */
|
||||
/* 13: OT pcm capture */
|
||||
/* 14: MU (w/o controls) */
|
||||
@@ -102,6 +107,9 @@ static struct usbmix_name_map extigy_map[] = {
|
||||
* e.g. no Master and fake PCM volume
|
||||
* Pavel Mihaylov <bin@bash.info>
|
||||
*/
|
||||
+static struct usbmix_dB_map mp3plus_dB_1 = {-4781, 0}; /* just guess */
|
||||
+static struct usbmix_dB_map mp3plus_dB_2 = {-1781, 618}; /* just guess */
|
||||
+
|
||||
static struct usbmix_name_map mp3plus_map[] = {
|
||||
/* 1: IT pcm */
|
||||
/* 2: IT mic */
|
||||
@@ -110,16 +118,19 @@ static struct usbmix_name_map mp3plus_map[] = {
|
||||
/* 5: OT digital out */
|
||||
/* 6: OT speaker */
|
||||
/* 7: OT pcm capture */
|
||||
- { 8, "Capture Input Source" }, /* FU, default PCM Capture Source */
|
||||
+ { 8, "Capture Source" }, /* FU, default PCM Capture Source */
|
||||
/* (Mic, Input 1 = Line input, Input 2 = Optical input) */
|
||||
{ 9, "Master Playback" }, /* FU, default Speaker 1 */
|
||||
/* { 10, "Mic Capture", 1 }, */ /* FU, Mic Capture */
|
||||
- /* { 10, "Mic Capture", 2 }, */ /* FU, Mic Capture */
|
||||
+ { 10, /* "Mic Capture", */ NULL, 2, .dB = &mp3plus_dB_2 },
|
||||
+ /* FU, Mic Capture */
|
||||
{ 10, "Mic Boost", 7 }, /* FU, default Auto Gain Input */
|
||||
- { 11, "Line Capture" }, /* FU, default PCM Capture */
|
||||
+ { 11, "Line Capture", .dB = &mp3plus_dB_2 },
|
||||
+ /* FU, default PCM Capture */
|
||||
{ 12, "Digital In Playback" }, /* FU, default PCM 1 */
|
||||
- /* { 13, "Mic Playback" }, */ /* FU, default Mic Playback */
|
||||
- { 14, "Line Playback" }, /* FU, default Speaker */
|
||||
+ { 13, /* "Mic Playback", */ .dB = &mp3plus_dB_1 },
|
||||
+ /* FU, default Mic Playback */
|
||||
+ { 14, "Line Playback", .dB = &mp3plus_dB_1 }, /* FU, default Speaker */
|
||||
/* 15: MU */
|
||||
{ 0 } /* terminator */
|
||||
};
|
||||
--
|
||||
1.7.0.1
|
||||
|
@ -1,47 +0,0 @@
|
||||
From: Chuck Ebbert <cebbert@redhat.com>
|
||||
|
||||
CIFS: Fix DNS resolver build
|
||||
|
||||
In file included from fs/cifs/dns_resolve.c:29:
|
||||
fs/cifs/dns_resolve.h:27: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'cifs_init_dns_resolver'
|
||||
|
||||
Just remove the __init and __exit attributes from the init and exit
|
||||
functions. __exit was removed upstream in 51c20fcced5badee0e2021c6c89f44aa3cbd72aa
|
||||
anyway, and there's no point trying to save every byte by fixing
|
||||
this properly.
|
||||
|
||||
Signed-Off-By: Chuck Ebbert <cebbert@redhat.com>
|
||||
|
||||
--- a/fs/cifs/dns_resolve.c
|
||||
+++ b/fs/cifs/dns_resolve.c
|
||||
@@ -176,7 +176,7 @@ out:
|
||||
return rc;
|
||||
}
|
||||
|
||||
-int __init cifs_init_dns_resolver(void)
|
||||
+int cifs_init_dns_resolver(void)
|
||||
{
|
||||
struct cred *cred;
|
||||
struct key *keyring;
|
||||
@@ -226,7 +226,7 @@ failed_put_cred:
|
||||
return ret;
|
||||
}
|
||||
|
||||
-void __exit cifs_exit_dns_resolver(void)
|
||||
+void cifs_exit_dns_resolver(void)
|
||||
{
|
||||
key_revoke(dns_resolver_cache->thread_keyring);
|
||||
unregister_key_type(&key_type_dns_resolver);
|
||||
--- a/fs/cifs/dns_resolve.h
|
||||
+++ b/fs/cifs/dns_resolve.h
|
||||
@@ -24,8 +24,8 @@
|
||||
#define _DNS_RESOLVE_H
|
||||
|
||||
#ifdef __KERNEL__
|
||||
-extern int __init cifs_init_dns_resolver(void);
|
||||
-extern void __exit cifs_exit_dns_resolver(void);
|
||||
+extern int cifs_init_dns_resolver(void);
|
||||
+extern void cifs_exit_dns_resolver(void);
|
||||
extern int dns_resolve_server_name_to_ip(const char *unc, char **ip_addr);
|
||||
#endif /* KERNEL */
|
||||
|
202
cifs-fix-malicious-redirect-problem-in-the-dns-lookup-code.patch
Normal file
202
cifs-fix-malicious-redirect-problem-in-the-dns-lookup-code.patch
Normal file
@ -0,0 +1,202 @@
|
||||
From: David Howells <dhowells@redhat.com>
|
||||
Date: Thu, 22 Jul 2010 11:53:18 +0000 (+0100)
|
||||
Subject: CIFS: Fix a malicious redirect problem in the DNS lookup code
|
||||
X-Git-Tag: v2.6.35-rc6~6
|
||||
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=4c0c03ca54f72fdd5912516ad0a23ec5cf01bda7
|
||||
|
||||
CIFS: Fix a malicious redirect problem in the DNS lookup code
|
||||
|
||||
[ trivial backport to 2.6.3[23] : cebbert@redhat.com ]
|
||||
|
||||
Fix the security problem in the CIFS filesystem DNS lookup code in which a
|
||||
malicious redirect could be installed by a random user by simply adding a
|
||||
result record into one of their keyrings with add_key() and then invoking a
|
||||
CIFS CFS lookup [CVE-2010-2524].
|
||||
|
||||
This is done by creating an internal keyring specifically for the caching of
|
||||
DNS lookups. To enforce the use of this keyring, the module init routine
|
||||
creates a set of override credentials with the keyring installed as the thread
|
||||
keyring and instructs request_key() to only install lookup result keys in that
|
||||
keyring.
|
||||
|
||||
The override is then applied around the call to request_key().
|
||||
|
||||
This has some additional benefits when a kernel service uses this module to
|
||||
request a key:
|
||||
|
||||
(1) The result keys are owned by root, not the user that caused the lookup.
|
||||
|
||||
(2) The result keys don't pop up in the user's keyrings.
|
||||
|
||||
(3) The result keys don't come out of the quota of the user that caused the
|
||||
lookup.
|
||||
|
||||
The keyring can be viewed as root by doing cat /proc/keys:
|
||||
|
||||
2a0ca6c3 I----- 1 perm 1f030000 0 0 keyring .dns_resolver: 1/4
|
||||
|
||||
It can then be listed with 'keyctl list' by root.
|
||||
|
||||
# keyctl list 0x2a0ca6c3
|
||||
1 key in keyring:
|
||||
726766307: --alswrv 0 0 dns_resolver: foo.bar.com
|
||||
|
||||
Signed-off-by: David Howells <dhowells@redhat.com>
|
||||
Reviewed-and-Tested-by: Jeff Layton <jlayton@redhat.com>
|
||||
Acked-by: Steve French <smfrench@gmail.com>
|
||||
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
||||
---
|
||||
|
||||
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
|
||||
index 484e52b..2cb1a70 100644
|
||||
--- a/fs/cifs/cifsfs.c
|
||||
+++ b/fs/cifs/cifsfs.c
|
||||
@@ -923,7 +923,7 @@ init_cifs(void)
|
||||
goto out_unregister_filesystem;
|
||||
#endif
|
||||
#ifdef CONFIG_CIFS_DFS_UPCALL
|
||||
- rc = register_key_type(&key_type_dns_resolver);
|
||||
+ rc = cifs_init_dns_resolver();
|
||||
if (rc)
|
||||
goto out_unregister_key_type;
|
||||
#endif
|
||||
@@ -935,7 +935,7 @@ init_cifs(void)
|
||||
|
||||
out_unregister_resolver_key:
|
||||
#ifdef CONFIG_CIFS_DFS_UPCALL
|
||||
- unregister_key_type(&key_type_dns_resolver);
|
||||
+ cifs_exit_dns_resolver();
|
||||
out_unregister_key_type:
|
||||
#endif
|
||||
#ifdef CONFIG_CIFS_UPCALL
|
||||
@@ -961,7 +961,7 @@ exit_cifs(void)
|
||||
cifs_proc_clean();
|
||||
#ifdef CONFIG_CIFS_DFS_UPCALL
|
||||
cifs_dfs_release_automount_timer();
|
||||
- unregister_key_type(&key_type_dns_resolver);
|
||||
+ cifs_exit_dns_resolver();
|
||||
#endif
|
||||
#ifdef CONFIG_CIFS_UPCALL
|
||||
unregister_key_type(&cifs_spnego_key_type);
|
||||
diff --git a/fs/cifs/dns_resolve.c b/fs/cifs/dns_resolve.c
|
||||
index 4db2c5e..49315cb 100644
|
||||
--- a/fs/cifs/dns_resolve.c
|
||||
+++ b/fs/cifs/dns_resolve.c
|
||||
@@ -24,12 +24,16 @@
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
+#include <linux/keyctl.h>
|
||||
+#include <linux/key-type.h>
|
||||
#include <keys/user-type.h>
|
||||
#include "dns_resolve.h"
|
||||
#include "cifsglob.h"
|
||||
#include "cifsproto.h"
|
||||
#include "cifs_debug.h"
|
||||
|
||||
+static const struct cred *dns_resolver_cache;
|
||||
+
|
||||
/* Checks if supplied name is IP address
|
||||
* returns:
|
||||
* 1 - name is IP
|
||||
@@ -94,6 +98,7 @@ struct key_type key_type_dns_resolver = {
|
||||
int
|
||||
dns_resolve_server_name_to_ip(const char *unc, char **ip_addr)
|
||||
{
|
||||
+ const struct cred *saved_cred;
|
||||
int rc = -EAGAIN;
|
||||
struct key *rkey = ERR_PTR(-EAGAIN);
|
||||
char *name;
|
||||
@@ -133,8 +138,15 @@ dns_resolve_server_name_to_ip(const char *unc, char **ip_addr)
|
||||
goto skip_upcall;
|
||||
}
|
||||
|
||||
+ saved_cred = override_creds(dns_resolver_cache);
|
||||
rkey = request_key(&key_type_dns_resolver, name, "");
|
||||
+ revert_creds(saved_cred);
|
||||
if (!IS_ERR(rkey)) {
|
||||
+ if (!(rkey->perm & KEY_USR_VIEW)) {
|
||||
+ down_read(&rkey->sem);
|
||||
+ rkey->perm |= KEY_USR_VIEW;
|
||||
+ up_read(&rkey->sem);
|
||||
+ }
|
||||
len = rkey->type_data.x[0];
|
||||
data = rkey->payload.data;
|
||||
} else {
|
||||
@@ -165,4 +177,61 @@ out:
|
||||
return rc;
|
||||
}
|
||||
|
||||
+int __init cifs_init_dns_resolver(void)
|
||||
+{
|
||||
+ struct cred *cred;
|
||||
+ struct key *keyring;
|
||||
+ int ret;
|
||||
+
|
||||
+ printk(KERN_NOTICE "Registering the %s key type\n",
|
||||
+ key_type_dns_resolver.name);
|
||||
+
|
||||
+ /* create an override credential set with a special thread keyring in
|
||||
+ * which DNS requests are cached
|
||||
+ *
|
||||
+ * this is used to prevent malicious redirections from being installed
|
||||
+ * with add_key().
|
||||
+ */
|
||||
+ cred = prepare_kernel_cred(NULL);
|
||||
+ if (!cred)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ keyring = key_alloc(&key_type_keyring, ".dns_resolver", 0, 0, cred,
|
||||
+ (KEY_POS_ALL & ~KEY_POS_SETATTR) |
|
||||
+ KEY_USR_VIEW | KEY_USR_READ,
|
||||
+ KEY_ALLOC_NOT_IN_QUOTA);
|
||||
+ if (IS_ERR(keyring)) {
|
||||
+ ret = PTR_ERR(keyring);
|
||||
+ goto failed_put_cred;
|
||||
+ }
|
||||
+
|
||||
+ ret = key_instantiate_and_link(keyring, NULL, 0, NULL, NULL);
|
||||
+ if (ret < 0)
|
||||
+ goto failed_put_key;
|
||||
+
|
||||
+ ret = register_key_type(&key_type_dns_resolver);
|
||||
+ if (ret < 0)
|
||||
+ goto failed_put_key;
|
||||
+
|
||||
+ /* instruct request_key() to use this special keyring as a cache for
|
||||
+ * the results it looks up */
|
||||
+ cred->thread_keyring = keyring;
|
||||
+ cred->jit_keyring = KEY_REQKEY_DEFL_THREAD_KEYRING;
|
||||
+ dns_resolver_cache = cred;
|
||||
+ return 0;
|
||||
+
|
||||
+failed_put_key:
|
||||
+ key_put(keyring);
|
||||
+failed_put_cred:
|
||||
+ put_cred(cred);
|
||||
+ return ret;
|
||||
+}
|
||||
|
||||
+void __exit cifs_exit_dns_resolver(void)
|
||||
+{
|
||||
+ key_revoke(dns_resolver_cache->thread_keyring);
|
||||
+ unregister_key_type(&key_type_dns_resolver);
|
||||
+ put_cred(dns_resolver_cache);
|
||||
+ printk(KERN_NOTICE "Unregistered %s key type\n",
|
||||
+ key_type_dns_resolver.name);
|
||||
+}
|
||||
diff --git a/fs/cifs/dns_resolve.h b/fs/cifs/dns_resolve.h
|
||||
index 966e928..26b9eaa 100644
|
||||
--- a/fs/cifs/dns_resolve.h
|
||||
+++ b/fs/cifs/dns_resolve.h
|
||||
@@ -24,8 +24,8 @@
|
||||
#define _DNS_RESOLVE_H
|
||||
|
||||
#ifdef __KERNEL__
|
||||
-#include <linux/key-type.h>
|
||||
-extern struct key_type key_type_dns_resolver;
|
||||
+extern int __init cifs_init_dns_resolver(void);
|
||||
+extern void __exit cifs_exit_dns_resolver(void);
|
||||
extern int dns_resolve_server_name_to_ip(const char *unc, char **ip_addr);
|
||||
#endif /* KERNEL */
|
||||
|
@ -105,6 +105,3 @@ CONFIG_RCU_FANOUT=32
|
||||
# CONFIG_OC_ETM is not set
|
||||
|
||||
# CONFIG_MTD_PISMO is not set
|
||||
|
||||
CONFIG_PERF_EVENTS=y
|
||||
CONFIG_PERF_COUNTERS=y
|
||||
|
13
config-debug
13
config-debug
@ -8,7 +8,6 @@ CONFIG_DEBUG_LOCK_ALLOC=y
|
||||
CONFIG_PROVE_LOCKING=y
|
||||
CONFIG_DEBUG_VM=y
|
||||
CONFIG_DEBUG_SPINLOCK=y
|
||||
CONFIG_PROVE_RCU=y
|
||||
|
||||
CONFIG_FAULT_INJECTION=y
|
||||
CONFIG_FAILSLAB=y
|
||||
@ -64,6 +63,10 @@ CONFIG_DEBUG_PERF_USE_VMALLOC=y
|
||||
|
||||
CONFIG_JBD2_DEBUG=y
|
||||
|
||||
CONFIG_FUNCTION_TRACER=y
|
||||
CONFIG_STACK_TRACER=y
|
||||
CONFIG_DYNAMIC_FTRACE=y
|
||||
|
||||
CONFIG_DEBUG_CFQ_IOSCHED=y
|
||||
|
||||
CONFIG_DRBD_FAULT_INJECTION=y
|
||||
@ -73,11 +76,3 @@ CONFIG_IWLWIFI_DEVICE_TRACING=y
|
||||
|
||||
CONFIG_DEBUG_OBJECTS_WORK=y
|
||||
# CONFIG_DEBUG_STRICT_USER_COPY_CHECKS is not set
|
||||
|
||||
CONFIG_DMADEVICES_DEBUG=y
|
||||
CONFIG_DMADEVICES_VDEBUG=y
|
||||
|
||||
CONFIG_PM_ADVANCED_DEBUG=y
|
||||
|
||||
CONFIG_CEPH_FS_PRETTYDEBUG=y
|
||||
CONFIG_QUOTA_DEBUG=y
|
||||
|
275
config-generic
275
config-generic
File diff suppressed because it is too large
Load Diff
@ -8,7 +8,11 @@
|
||||
CONFIG_IA64=y
|
||||
CONFIG_64BIT=y
|
||||
# CONFIG_XEN is not set
|
||||
# CONFIG_ARCH_XEN is not set
|
||||
# CONFIG_XEN_PRIVILEGED_GUEST is not set
|
||||
# CONFIG_XEN_VT is not set
|
||||
CONFIG_MMU=y
|
||||
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
|
||||
CONFIG_EFI=y
|
||||
# CONFIG_ITANIUM is not set
|
||||
CONFIG_MCKINLEY=y
|
||||
@ -52,6 +56,7 @@ CONFIG_EFI_PCDP=y
|
||||
#
|
||||
# IDE chipset support/bugfixes
|
||||
#
|
||||
CONFIG_IDE_MAX_HWIFS=4
|
||||
CONFIG_BLK_DEV_SGIIOC4=y
|
||||
|
||||
#
|
||||
@ -99,6 +104,7 @@ CONFIG_AGP_SGI_TIOCA=y
|
||||
# SGI
|
||||
#
|
||||
CONFIG_SGI_SNSC=y
|
||||
CONFIG_IA64_SGI_SN_XP=y
|
||||
CONFIG_SGI_TIOCX=y
|
||||
CONFIG_SGI_MBCS=m
|
||||
CONFIG_SGI_IOC3=m
|
||||
@ -122,10 +128,12 @@ CONFIG_ACPI_AC=y
|
||||
# CONFIG_ACPI_ASUS is not set
|
||||
CONFIG_ACPI_PROCFS_POWER=y
|
||||
CONFIG_ACPI_SYSFS_POWER=y
|
||||
# CONFIG_ACPI_BAY is not set
|
||||
# CONFIG_ACPI_BATTERY is not set
|
||||
CONFIG_ACPI_BLACKLIST_YEAR=0
|
||||
CONFIG_ACPI_BUTTON=y
|
||||
# CONFIG_ACPI_DOCK is not set
|
||||
CONFIG_ACPI_EC=y
|
||||
CONFIG_ACPI_FAN=y
|
||||
CONFIG_ACPI_HOTPLUG_MEMORY=y
|
||||
CONFIG_ACPI_NUMA=y
|
||||
@ -133,6 +141,7 @@ CONFIG_ACPI_POWER=y
|
||||
CONFIG_ACPI_PROCESSOR=y
|
||||
CONFIG_ACPI_PROCFS=y
|
||||
CONFIG_ACPI_SLEEP=y
|
||||
CONFIG_ACPI_SYSTEM=y
|
||||
CONFIG_ACPI_THERMAL=y
|
||||
# CONFIG_ACPI_TOSHIBA is not set
|
||||
CONFIG_ACPI_VIDEO=m
|
||||
@ -168,6 +177,7 @@ CONFIG_IA64_ACPI_CPUFREQ=m
|
||||
|
||||
CONFIG_NODES_SHIFT=10
|
||||
|
||||
# CONFIG_BCM43XX is not set
|
||||
|
||||
CONFIG_HW_RANDOM_INTEL=m
|
||||
|
||||
|
@ -8,7 +8,6 @@ CONFIG_SND_PCM_XRUN_DEBUG=y
|
||||
# CONFIG_PROVE_LOCKING is not set
|
||||
# CONFIG_DEBUG_VM is not set
|
||||
# CONFIG_DEBUG_SPINLOCK is not set
|
||||
# CONFIG_PROVE_RCU is not set
|
||||
|
||||
# CONFIG_FAULT_INJECTION is not set
|
||||
# CONFIG_FAILSLAB is not set
|
||||
@ -64,6 +63,10 @@ CONFIG_DEBUG_OBJECTS_ENABLE_DEFAULT=1
|
||||
|
||||
# CONFIG_JBD2_DEBUG is not set
|
||||
|
||||
# CONFIG_FUNCTION_TRACER is not set
|
||||
# CONFIG_STACK_TRACER is not set
|
||||
# CONFIG_DYNAMIC_FTRACE is not set
|
||||
|
||||
# CONFIG_DEBUG_CFQ_IOSCHED is not set
|
||||
|
||||
# CONFIG_DRBD_FAULT_INJECTION is not set
|
||||
@ -73,11 +76,3 @@ CONFIG_DEBUG_OBJECTS_ENABLE_DEFAULT=1
|
||||
|
||||
# CONFIG_DEBUG_OBJECTS_WORK is not set
|
||||
# CONFIG_DEBUG_STRICT_USER_COPY_CHECKS is not set
|
||||
|
||||
# CONFIG_DMADEVICES_DEBUG is not set
|
||||
# CONFIG_DMADEVICES_VDEBUG is not set
|
||||
|
||||
CONFIG_PM_ADVANCED_DEBUG=y
|
||||
|
||||
# CONFIG_CEPH_FS_PRETTYDEBUG is not set
|
||||
# CONFIG_QUOTA_DEBUG is not set
|
||||
|
@ -35,9 +35,11 @@ CONFIG_HIBERNATION=y
|
||||
# CONFIG_RTC is not set
|
||||
# CONFIG_GEN_RTC is not set
|
||||
# CONFIG_GEN_RTC_X is not set
|
||||
CONFIG_RTC_DRV_PPC=y
|
||||
CONFIG_RTC_DRV_GENERIC=y
|
||||
CONFIG_PROC_DEVICETREE=y
|
||||
# CONFIG_CMDLINE_BOOL is not set
|
||||
CONFIG_ELECTRA_IDE=y
|
||||
|
||||
CONFIG_ADB=y
|
||||
CONFIG_ADB_PMU=y
|
||||
@ -103,6 +105,7 @@ CONFIG_MEMORY_HOTPLUG=y
|
||||
# CONFIG_SCSI_DC390T is not set
|
||||
# CONFIG_SCSI_BUSLOGIC is not set
|
||||
|
||||
CONFIG_USB_HIDINPUT_POWERBOOK=y
|
||||
|
||||
# CONFIG_PPC_EARLY_DEBUG is not set
|
||||
|
||||
@ -140,9 +143,13 @@ CONFIG_BLK_DEV_IDE=y
|
||||
# Please see Documentation/ide.txt for help/info on IDE drives
|
||||
#
|
||||
# CONFIG_BLK_DEV_IDE_SATA is not set
|
||||
CONFIG_BLK_DEV_IDEDISK=y
|
||||
CONFIG_IDEDISK_MULTI_MODE=y
|
||||
# CONFIG_BLK_DEV_IDECS is not set
|
||||
CONFIG_BLK_DEV_IDECD=m
|
||||
# CONFIG_BLK_DEV_IDETAPE is not set
|
||||
CONFIG_BLK_DEV_IDEFLOPPY=m
|
||||
# CONFIG_BLK_DEV_IDESCSI is not set
|
||||
CONFIG_IDE_TASK_IOCTL=y
|
||||
#
|
||||
# IDE chipset support/bugfixes
|
||||
@ -150,6 +157,7 @@ CONFIG_IDE_TASK_IOCTL=y
|
||||
# CONFIG_IDE_GENERIC is not set
|
||||
# CONFIG_BLK_DEV_IDEPNP is not set
|
||||
# CONFIG_BLK_DEV_IDEPCI is not set
|
||||
CONFIG_IDEPCI_SHARE_IRQ=y
|
||||
# CONFIG_BLK_DEV_AEC62XX is not set
|
||||
# CONFIG_BLK_DEV_ALI15X3 is not set
|
||||
# CONFIG_BLK_DEV_AMD74XX is not set
|
||||
@ -158,6 +166,7 @@ CONFIG_IDE_TASK_IOCTL=y
|
||||
# CONFIG_BLK_DEV_CY82C693 is not set
|
||||
# CONFIG_BLK_DEV_CS5520 is not set
|
||||
# CONFIG_BLK_DEV_CS5530 is not set
|
||||
# CONFIG_BLK_DEV_HPT34X is not set
|
||||
# CONFIG_BLK_DEV_HPT366 is not set
|
||||
# CONFIG_BLK_DEV_JMICRON is not set
|
||||
# CONFIG_BLK_DEV_SC1200 is not set
|
||||
@ -174,6 +183,8 @@ CONFIG_IDE_TASK_IOCTL=y
|
||||
# CONFIG_BLK_DEV_VIA82CXXX is not set
|
||||
CONFIG_BLK_DEV_IDE_PMAC=y
|
||||
CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y
|
||||
CONFIG_BLK_DEV_IDEDMA_PMAC=y
|
||||
# CONFIG_IDE_ARM is not set
|
||||
CONFIG_BLK_DEV_IDEDMA=y
|
||||
# CONFIG_BLK_DEV_HD is not set
|
||||
# CONFIG_USB_STORAGE_ISD200 is not set
|
||||
@ -231,7 +242,11 @@ CONFIG_EXTRA_TARGETS=""
|
||||
# CONFIG_SERIAL_CPM is not set
|
||||
# CONFIG_SERIAL_QE is not set
|
||||
# CONFIG_I2C_CPM is not set
|
||||
# CONFIG_MT9M001_PCA9536_SWITCH is not set
|
||||
# CONFIG_MT9V022_PCA9536_SWITCH is not set
|
||||
# CONFIG_KGDB_CONSOLE is not set
|
||||
|
||||
CONFIG_MDIO_OF_GPIO=m
|
||||
|
||||
CONFIG_SERIO_XILINX_XPS_PS2=m
|
||||
|
||||
@ -328,4 +343,3 @@ CONFIG_SERIAL_GRLIB_GAISLER_APBUART=m
|
||||
# CONFIG_MMC_SDHCI_OF_ESDHC is not set
|
||||
# CONFIG_MMC_SDHCI_OF_HLWD is not set
|
||||
|
||||
# CONFIG_GPIO_SCH is not set
|
||||
|
@ -4,7 +4,9 @@ CONFIG_PPC32=y
|
||||
# CONFIG_RTAS_PROC is not set
|
||||
# CONFIG_PCMCIA_M8XX is not set
|
||||
# CONFIG_HOTPLUG_PCI is not set
|
||||
CONFIG_CLASSIC32=y
|
||||
CONFIG_CPU_FREQ_PMAC=y
|
||||
CONFIG_PPC_MULTIPLATFORM=y
|
||||
CONFIG_PPC_CHRP=y
|
||||
CONFIG_PPC_PMAC=y
|
||||
CONFIG_PPC_MPC52xx=y
|
||||
@ -17,6 +19,7 @@ CONFIG_SATA_FSL=m
|
||||
# busted in .28git1
|
||||
# ERROR: "cacheable_memzero" [drivers/net/gianfar_driver.ko] undefined!
|
||||
# CONFIG_GIANFAR is not set
|
||||
CONFIG_GFAR_NAPI=y
|
||||
CONFIG_USB_EHCI_FSL=y
|
||||
|
||||
CONFIG_PMAC_APM_EMU=y
|
||||
@ -51,6 +54,7 @@ CONFIG_THERM_WINDTUNNEL=m
|
||||
CONFIG_THERM_ADT746X=m
|
||||
# CONFIG_ANSLCD is not set
|
||||
|
||||
CONFIG_SENSORS_M41T00=m
|
||||
CONFIG_FB_PLATINUM=y
|
||||
CONFIG_FB_VALKYRIE=y
|
||||
CONFIG_FB_CT65550=y
|
||||
@ -65,6 +69,7 @@ CONFIG_FB_MATROX=y
|
||||
# CONFIG_KEXEC is not set
|
||||
|
||||
# CONFIG_HVC_RTAS is not set
|
||||
# CONFIG_MAMBO is not set
|
||||
|
||||
# CONFIG_UDBG_RTAS_CONSOLE is not set
|
||||
CONFIG_BRIQ_PANEL=m
|
||||
@ -82,6 +87,7 @@ CONFIG_SERIAL_MPC52xx=y
|
||||
CONFIG_SERIAL_MPC52xx_CONSOLE=y
|
||||
CONFIG_SERIAL_MPC52xx_CONSOLE_BAUD=115200
|
||||
# CONFIG_MPC5200_WDT is not set
|
||||
CONFIG_83xx_WDT=m
|
||||
CONFIG_8xxx_WDT=m
|
||||
CONFIG_GEF_WDT=m
|
||||
|
||||
@ -115,6 +121,7 @@ CONFIG_PPC_BESTCOMM_GEN_BD=m
|
||||
|
||||
CONFIG_FORCE_MAX_ZONEORDER=11
|
||||
# CONFIG_PAGE_OFFSET_BOOL is not set
|
||||
CONFIG_BLK_DEV_HD_ONLY=y
|
||||
# CONFIG_FB_FSL_DIU is not set
|
||||
CONFIG_IRQSTACKS=y
|
||||
CONFIG_VIRTUALIZATION=y
|
||||
@ -171,6 +178,7 @@ CONFIG_MPC8610_HPCD=y
|
||||
# drivers/mtd/maps/sbc8240.c: In function 'init_sbc8240_mtd':
|
||||
# drivers/mtd/maps/sbc8240.c:172: warning: passing argument 1 of 'simple_map_init' from incompatible pointer type
|
||||
# drivers/mtd/maps/sbc8240.c:177: error: 'struct mtd_info' has no member named 'module'
|
||||
# CONFIG_MTD_SBC8240 is not set
|
||||
|
||||
CONFIG_MTD_NAND_FSL_UPM=m
|
||||
|
||||
|
@ -3,6 +3,9 @@ CONFIG_WINDFARM_PM91=y
|
||||
CONFIG_WINDFARM_PM121=y
|
||||
CONFIG_PPC_PMAC64=y
|
||||
CONFIG_PPC_MAPLE=y
|
||||
CONFIG_PPC_SYSTEMSIM=y
|
||||
CONFIG_BLK_DEV_SYSTEMSIM=m
|
||||
CONFIG_SYSTEMSIM_NET=m
|
||||
CONFIG_PPC_CELL=y
|
||||
CONFIG_PPC_IBM_CELL_BLADE=y
|
||||
CONFIG_PPC_ISERIES=y
|
||||
@ -15,12 +18,16 @@ CONFIG_PPC_CELLEB=y
|
||||
CONFIG_PPC_CELL_QPACE=y
|
||||
CONFIG_PS3_HTAB_SIZE=20
|
||||
# CONFIG_PS3_DYNAMIC_DMA is not set
|
||||
# CONFIG_PS3_USE_LPAR_ADDR is not set
|
||||
CONFIG_PS3_ADVANCED=y
|
||||
CONFIG_PS3_HTAB_SIZE=20
|
||||
# CONFIG_PS3_DYNAMIC_DMA is not set
|
||||
CONFIG_PS3_USE_LPAR_ADDR=y
|
||||
CONFIG_PS3_VUART=y
|
||||
CONFIG_PS3_PS3AV=y
|
||||
CONFIG_PS3_STORAGE=m
|
||||
CONFIG_PS3_STORAGE_EXPECTED_NUM_DRIVES=3
|
||||
CONFIG_PS3_STORAGE_MAX_SPINUP_WAIT_TIME=10
|
||||
CONFIG_PS3_DISK=m
|
||||
CONFIG_PS3_ROM=m
|
||||
CONFIG_PS3_FLASH=m
|
||||
@ -62,11 +69,15 @@ CONFIG_SCSI_IPR_DUMP=y
|
||||
CONFIG_SPIDER_NET=m
|
||||
CONFIG_HVC_RTAS=y
|
||||
CONFIG_HVC_ISERIES=y
|
||||
CONFIG_MAMBO=y
|
||||
CONFIG_MAMBO_DISK=m
|
||||
CONFIG_MAMBO_NET=m
|
||||
CONFIG_CBE_RAS=y
|
||||
|
||||
# iSeries device drivers
|
||||
#
|
||||
CONFIG_ISERIES_VETH=m
|
||||
# CONFIG_VIOCONS is not set
|
||||
CONFIG_VIODASD=m
|
||||
CONFIG_VIOCD=m
|
||||
CONFIG_VIOTAPE=m
|
||||
@ -141,6 +152,7 @@ CONFIG_IBM_NEW_EMAC_RX_SKB_HEADROOM=0
|
||||
# CONFIG_VIRQ_DEBUG is not set
|
||||
CONFIG_ELECTRA_CF=m
|
||||
|
||||
CONFIG_SPU_TRACE=m
|
||||
CONFIG_MTD_NAND_PASEMI=m
|
||||
CONFIG_EDAC_CELL=m
|
||||
CONFIG_EDAC_CPC925=m
|
||||
@ -148,6 +160,7 @@ CONFIG_FRAME_WARN=2048
|
||||
|
||||
CONFIG_PHYP_DUMP=y
|
||||
CONFIG_FORCE_MAX_ZONEORDER=13
|
||||
CONFIG_BLK_DEV_HD_ONLY=y
|
||||
CONFIG_VIRTUALIZATION=y
|
||||
|
||||
CONFIG_VSX=y
|
||||
|
@ -57,6 +57,7 @@
|
||||
# CONFIG_SND_AD1816A is not set
|
||||
# CONFIG_SND_AD1848 is not set
|
||||
# CONFIG_SND_CS4231 is not set
|
||||
# CONFIG_SND_CS4232 is not set
|
||||
# CONFIG_SND_CS4236 is not set
|
||||
# CONFIG_SND_ES968 is not set
|
||||
# CONFIG_SND_ES1688 is not set
|
||||
@ -102,6 +103,7 @@
|
||||
|
||||
# CONFIG_ROCKETPORT is not set
|
||||
# CONFIG_R3964 is not set
|
||||
# CONFIG_TIPAR is not set
|
||||
|
||||
# CONFIG_JOYSTICK_ANALOG is not set
|
||||
# CONFIG_JOYSTICK_A3D is not set
|
||||
@ -115,6 +117,8 @@
|
||||
# CONFIG_JOYSTICK_SIDEWINDER is not set
|
||||
# CONFIG_JOYSTICK_TMDC is not set
|
||||
# CONFIG_JOYSTICK_IFORCE is not set
|
||||
# CONFIG_JOYSTICK_IFORCE_USB=y
|
||||
# CONFIG_JOYSTICK_IFORCE_232=y
|
||||
# CONFIG_JOYSTICK_WARRIOR is not set
|
||||
# CONFIG_JOYSTICK_MAGELLAN is not set
|
||||
# CONFIG_JOYSTICK_SPACEORB is not set
|
||||
@ -133,6 +137,7 @@
|
||||
# CONFIG_RADIO_MAXIRADIO is not set
|
||||
# CONFIG_RADIO_MAESTRO is not set
|
||||
# CONFIG_RADIO_MIROPCM20 is not set
|
||||
# CONFIG_RADIO_MIROPCM20_RDS is not set
|
||||
# CONFIG_RADIO_SF16FMI is not set
|
||||
# CONFIG_RADIO_SF16FMR2 is not set
|
||||
# CONFIG_RADIO_TERRATEC is not set
|
||||
@ -140,6 +145,7 @@
|
||||
# CONFIG_RADIO_TYPHOON is not set
|
||||
# CONFIG_RADIO_ZOLTRIX is not set
|
||||
|
||||
# CONFIG_TUNER_3036 is not set
|
||||
|
||||
# CONFIG_VIDEO_PMS is not set
|
||||
# CONFIG_VIDEO_BWQCAM is not set
|
||||
@ -159,6 +165,7 @@
|
||||
# CONFIG_VIDEO_MEYE is not set
|
||||
# CONFIG_VIDEO_SAA7134 is not set
|
||||
# CONFIG_VIDEO_MXB is not set
|
||||
# CONFIG_VIDEO_DPC is not set
|
||||
# CONFIG_VIDEO_HEXIUM_ORION is not set
|
||||
# CONFIG_VIDEO_HEXIUM_GEMINI is not set
|
||||
# CONFIG_VIDEO_CX88 is not set
|
||||
@ -183,6 +190,7 @@
|
||||
# CONFIG_FB_ASILIANT is not set
|
||||
# CONFIG_FB_HGA_ACCEL is not set
|
||||
# CONFIG_FB_3DFX_ACCEL is not set
|
||||
# CONFIG_FB_TRIDENT_ACCEL is not set
|
||||
|
||||
# CONFIG_JFS_FS is not set
|
||||
# CONFIG_NCP_FS is not set
|
||||
|
14
config-s390x
14
config-s390x
@ -13,16 +13,20 @@ CONFIG_HZ_100=y
|
||||
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
|
||||
|
||||
CONFIG_MMU=y
|
||||
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
|
||||
|
||||
CONFIG_LOG_BUF_SHIFT=16
|
||||
CONFIG_NO_IDLE_HZ=y
|
||||
CONFIG_NO_IDLE_HZ_INIT=y
|
||||
|
||||
CONFIG_SMP=y
|
||||
|
||||
#
|
||||
# I/O subsystem configuration
|
||||
#
|
||||
CONFIG_MACHCHK_WARNING=y
|
||||
CONFIG_QDIO=m
|
||||
# CONFIG_QDIO_DEBUG is not set
|
||||
|
||||
#
|
||||
# Misc
|
||||
@ -35,6 +39,7 @@ CONFIG_PFAULT=y
|
||||
CONFIG_SHARED_KERNEL=y
|
||||
CONFIG_CMM=m
|
||||
CONFIG_CMM_PROC=y
|
||||
CONFIG_VIRT_TIMER=y
|
||||
# CONFIG_NETIUCV is not set
|
||||
CONFIG_SMSGIUCV=m
|
||||
|
||||
@ -99,6 +104,7 @@ CONFIG_S390_TAPE_34XX=m
|
||||
# Token Ring devices
|
||||
#
|
||||
CONFIG_TR=y
|
||||
# CONFIG_SHAPER is not set
|
||||
CONFIG_NETCONSOLE=m
|
||||
|
||||
#
|
||||
@ -114,12 +120,15 @@ CONFIG_CTC=m
|
||||
CONFIG_IUCV=m
|
||||
CONFIG_QETH=m
|
||||
CONFIG_QETH_IPV6=y
|
||||
CONFIG_QETH_VLAN=y
|
||||
CONFIG_CCWGROUP=m
|
||||
|
||||
# CONFIG_IRDA is not set
|
||||
# CONFIG_BT is not set
|
||||
# CONFIG_WIRELESS_EXT is not set
|
||||
# CONFIG_WLAN_80211 is not set
|
||||
# CONFIG_MAC80211 is not set
|
||||
# CONFIG_IEEE80211 is not set
|
||||
# CONFIG_B44 is not set
|
||||
|
||||
#
|
||||
@ -170,6 +179,7 @@ CONFIG_VMCP=m
|
||||
# CONFIG_ATA_OVER_ETH is not set
|
||||
# CONFIG_MII is not set
|
||||
|
||||
# CONFIG_BOOT_DELAY is not set
|
||||
|
||||
CONFIG_STACK_GUARD=256
|
||||
CONFIG_CMM_IUCV=y
|
||||
@ -182,6 +192,7 @@ CONFIG_MONWRITER=m
|
||||
CONFIG_ZCRYPT=m
|
||||
CONFIG_ZCRYPT_MONOLITHIC=y
|
||||
|
||||
CONFIG_S390_SWITCH_AMODE=y
|
||||
CONFIG_S390_EXEC_PROTECT=y
|
||||
CONFIG_AFIUCV=m
|
||||
CONFIG_S390_PRNG=m
|
||||
@ -192,6 +203,7 @@ CONFIG_S390_VMUR=m
|
||||
|
||||
CONFIG_NO_HZ=y
|
||||
CONFIG_HIGH_RES_TIMERS=y
|
||||
CONFIG_PAGE_STATES=y
|
||||
CONFIG_CTCM=m
|
||||
CONFIG_QETH_L2=m
|
||||
CONFIG_QETH_L3=m
|
||||
@ -222,6 +234,4 @@ CONFIG_PERF_COUNTERS=y
|
||||
CONFIG_PERF_EVENTS=y
|
||||
CONFIG_EVENT_PROFILE=y
|
||||
|
||||
CONFIG_SMSGIUCV_EVENT=m
|
||||
|
||||
# CONFIG_PREEMPT_TRACER is not set
|
||||
|
@ -35,9 +35,13 @@ CONFIG_NR_CPUS=256
|
||||
CONFIG_US3_FREQ=m
|
||||
CONFIG_US2E_FREQ=m
|
||||
CONFIG_SUN_OPENPROMFS=m
|
||||
CONFIG_SPARC32_COMPAT=y
|
||||
CONFIG_COMPAT=y
|
||||
CONFIG_UID16=y
|
||||
CONFIG_BINFMT_ELF32=y
|
||||
CONFIG_BINFMT_AOUT32=y
|
||||
CONFIG_SUNOS_EMUL=y
|
||||
CONFIG_SOLARIS_EMUL=m
|
||||
CONFIG_ENVCTRL=m
|
||||
CONFIG_DISPLAY7SEG=m
|
||||
CONFIG_WATCHDOG_CP1XXX=m
|
||||
@ -46,10 +50,14 @@ CONFIG_WATCHDOG_RIO=m
|
||||
# CONFIG_PREVENT_FIRMWARE_BUILD is not set
|
||||
# CONFIG_PARPORT is not set
|
||||
# CONFIG_BLK_DEV_FD is not set
|
||||
# CONFIG_LIRC_PVR150 is not set
|
||||
# CONFIG_LIRC_PARALLEL is not set
|
||||
# CONFIG_I2C_NFORCE2 is not set
|
||||
# CONFIG_I2C_PARPORT_LIGHT is not set
|
||||
# CONFIG_I2C_PROSAVAGE is not set
|
||||
# CONFIG_I2C_SAVAGE4 is not set
|
||||
# CONFIG_I2C_SIMTEC is not set
|
||||
# CONFIG_I2C_VOODOO3 is not set
|
||||
CONFIG_I2C_ALI1535=m
|
||||
# CONFIG_VGASTATE is not set
|
||||
# CONFIG_FB_DDC is not set
|
||||
@ -75,6 +83,7 @@ CONFIG_FB_PM2=y
|
||||
CONFIG_FB_P9100=y
|
||||
# CONFIG_FB_LEO is not set
|
||||
CONFIG_FB_XVR500=y
|
||||
CONFIG_FB_XVR1000=y
|
||||
CONFIG_FB_XVR2500=y
|
||||
# CONFIG_VGASTATE is not set
|
||||
# CONFIG_FB_DDC is not set
|
||||
@ -84,6 +93,7 @@ CONFIG_FB_XVR2500=y
|
||||
# CONFIG_AGP is not set
|
||||
# CONFIG_DRM_NOUVEAU is not set
|
||||
# CONFIG_MDA_CONSOLE is not set
|
||||
# CONFIG_PROM_CONSOLE is not set
|
||||
CONFIG_FONTS=y
|
||||
# CONFIG_FONT_8x8 is not set
|
||||
# CONFIG_FONT_8x16 is not set
|
||||
@ -105,12 +115,15 @@ CONFIG_SERIAL_SUNSAB=y
|
||||
CONFIG_SERIAL_SUNSAB_CONSOLE=y
|
||||
CONFIG_SERIAL_SUNHV=y
|
||||
CONFIG_SUN_OPENPROMIO=y
|
||||
CONFIG_SUN_MOSTEK_RTC=y
|
||||
CONFIG_OBP_FLASH=m
|
||||
# CONFIG_SUN_VIDEOPIX is not set
|
||||
# CONFIG_SERIO_SERPORT is not set
|
||||
CONFIG_BLK_DEV_FD=y
|
||||
CONFIG_SUNVDC=m
|
||||
CONFIG_SUNVNET=m
|
||||
# CONFIG_BLK_DEV_AEC62XX is not set
|
||||
# CONFIG_BLK_DEV_HPT34X is not set
|
||||
# CONFIG_BLK_DEV_HPT366 is not set
|
||||
# CONFIG_BLK_DEV_PDC202XX_OLD is not set
|
||||
# CONFIG_BLK_DEV_PDC202XX_NEW is not set
|
||||
@ -132,6 +145,9 @@ CONFIG_SUNQE=m
|
||||
# CONFIG_DM9102 is not set
|
||||
# CONFIG_HAMACHI is not set
|
||||
# CONFIG_R8169 is not set
|
||||
CONFIG_ATM_FORE200E_SBA=y
|
||||
CONFIG_ATM_FORE200E_SBA_DEFAULT_FW=y
|
||||
# CONFIG_ATM_FORE200E_SBA_FW is not set
|
||||
CONFIG_ATM_FORE200E_USE_TASKLET=y
|
||||
CONFIG_ATM_FORE200E_DEBUG=0
|
||||
CONFIG_ATM_FORE200E_TX_RETRY=16
|
||||
@ -146,6 +162,7 @@ CONFIG_SND_SUN_CS4231=m
|
||||
# CONFIG_SND_SUN_DBRI is not set
|
||||
CONFIG_PARPORT_SUNBPP=m
|
||||
CONFIG_LOGO_SUN_CLUT224=y
|
||||
CONFIG_SUN_BPP=m
|
||||
CONFIG_MTD_SUN_UFLASH=m
|
||||
CONFIG_MYRI_SBUS=m
|
||||
# CONFIG_SGI_IOC4 is not set
|
||||
@ -196,6 +213,3 @@ CONFIG_EVENT_PROFILE=y
|
||||
|
||||
CONFIG_EARLYFB=y
|
||||
CONFIG_SERIAL_GRLIB_GAISLER_APBUART=m
|
||||
|
||||
CONFIG_GRETH=m
|
||||
CONFIG_FB_XVR1000=y
|
||||
|
@ -8,10 +8,13 @@ CONFIG_UID16=y
|
||||
#
|
||||
# Enable summit and co via the generic arch
|
||||
#
|
||||
# CONFIG_X86_PC is not set
|
||||
CONFIG_X86_GENERICARCH=y
|
||||
CONFIG_X86_EXTENDED_PLATFORM=y
|
||||
CONFIG_X86_32_NON_STANDARD=y
|
||||
|
||||
# CONFIG_X86_ELAN is not set
|
||||
# CONFIG_X86_VOYAGER is not set
|
||||
# CONFIG_X86_NUMAQ is not set
|
||||
# CONFIG_X86_SUMMIT is not set
|
||||
CONFIG_X86_BIGSMP=y
|
||||
@ -33,17 +36,34 @@ CONFIG_M686=y
|
||||
# CONFIG_MK8 is not set
|
||||
# CONFIG_MCRUSOE is not set
|
||||
# CONFIG_MWINCHIPC6 is not set
|
||||
# CONFIG_MWINCHIP2 is not set
|
||||
# CONFIG_MWINCHIP3D is not set
|
||||
# CONFIG_MCYRIXIII is not set
|
||||
# CONFIG_MVIAC3_2 is not set
|
||||
CONFIG_SMP=y
|
||||
CONFIG_NR_CPUS=32
|
||||
CONFIG_X86_GENERIC=y
|
||||
# CONFIG_X86_PPRO_FENCE is not set
|
||||
CONFIG_X86_CMPXCHG=y
|
||||
CONFIG_X86_L1_CACHE_SHIFT=7
|
||||
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
|
||||
CONFIG_X86_PPRO_FENCE=y
|
||||
CONFIG_X86_WP_WORKS_OK=y
|
||||
CONFIG_X86_INVLPG=y
|
||||
CONFIG_X86_BSWAP=y
|
||||
CONFIG_X86_POPAD_OK=y
|
||||
CONFIG_X86_GOOD_APIC=y
|
||||
CONFIG_X86_INTEL_USERCOPY=y
|
||||
CONFIG_X86_USE_PPRO_CHECKSUM=y
|
||||
CONFIG_HPET=y
|
||||
CONFIG_HPET_TIMER=y
|
||||
# CONFIG_HPET_RTC_IRQ is not set
|
||||
# CONFIG_HPET_MMAP is not set
|
||||
CONFIG_X86_LOCAL_APIC=y
|
||||
CONFIG_X86_IO_APIC=y
|
||||
CONFIG_X86_TSC=y
|
||||
CONFIG_X86_MCE=y
|
||||
# CONFIG_X86_MCE_NONFATAL is not set
|
||||
CONFIG_X86_MCE_P4THERMAL=y
|
||||
CONFIG_TOSHIBA=m
|
||||
CONFIG_I8K=m
|
||||
CONFIG_SONYPI=m
|
||||
@ -51,6 +71,7 @@ CONFIG_SONYPI_COMPAT=y
|
||||
CONFIG_MICROCODE=m
|
||||
CONFIG_X86_MSR=y
|
||||
CONFIG_X86_CPUID=y
|
||||
# CONFIG_X86_CPU_DEBUG is not set
|
||||
CONFIG_EDD=m
|
||||
# CONFIG_EDD_OFF is not set
|
||||
# CONFIG_NUMA is not set
|
||||
@ -100,6 +121,16 @@ CONFIG_SECCOMP=y
|
||||
|
||||
CONFIG_CAPI_EICON=y
|
||||
|
||||
CONFIG_I2O=m
|
||||
CONFIG_I2O_BLOCK=m
|
||||
CONFIG_I2O_SCSI=m
|
||||
CONFIG_I2O_PROC=m
|
||||
CONFIG_I2O_CONFIG=y
|
||||
CONFIG_I2O_EXT_ADAPTEC=y
|
||||
CONFIG_I2O_EXT_ADAPTEC_DMA64=y
|
||||
CONFIG_I2O_CONFIG_OLD_IOCTL=y
|
||||
CONFIG_I2O_BUS=m
|
||||
|
||||
#
|
||||
# APM (Advanced Power Management) BIOS Support
|
||||
#
|
||||
@ -109,10 +140,12 @@ CONFIG_APM=y
|
||||
CONFIG_APM_CPU_IDLE=y
|
||||
# CONFIG_APM_DISPLAY_BLANK is not set
|
||||
# CONFIG_APM_ALLOW_INTS is not set
|
||||
# CONFIG_APM_REAL_MODE_POWER_OFF is not set
|
||||
|
||||
#
|
||||
# Kernel debugging
|
||||
#
|
||||
CONFIG_X86_FIND_SMP_CONFIG=y
|
||||
CONFIG_X86_MPPARSE=y
|
||||
|
||||
CONFIG_ACPI=y
|
||||
@ -121,10 +154,12 @@ CONFIG_ACPI_AC=y
|
||||
CONFIG_ACPI_PROCFS_POWER=y
|
||||
CONFIG_ACPI_SYSFS_POWER=y
|
||||
CONFIG_ACPI_BATTERY=y
|
||||
CONFIG_ACPI_BAY=y
|
||||
CONFIG_ACPI_BLACKLIST_YEAR=1999
|
||||
CONFIG_ACPI_BUTTON=y
|
||||
CONFIG_ACPI_CONTAINER=m
|
||||
CONFIG_ACPI_DOCK=y
|
||||
CONFIG_ACPI_EC=y
|
||||
CONFIG_ACPI_FAN=y
|
||||
CONFIG_ACPI_NUMA=y
|
||||
CONFIG_ACPI_PROCESSOR=y
|
||||
@ -132,6 +167,7 @@ CONFIG_ACPI_POWER=y
|
||||
CONFIG_ACPI_PROCFS=y
|
||||
CONFIG_ACPI_SBS=m
|
||||
CONFIG_ACPI_SLEEP=y
|
||||
CONFIG_ACPI_SYSTEM=y
|
||||
CONFIG_ACPI_THERMAL=y
|
||||
CONFIG_TOPSTAR_LAPTOP=m
|
||||
CONFIG_ACPI_TOSHIBA=m
|
||||
@ -159,10 +195,11 @@ CONFIG_CPU_FREQ_STAT=m
|
||||
CONFIG_CPU_FREQ_STAT_DETAILS=y
|
||||
|
||||
CONFIG_X86_ACPI_CPUFREQ=m
|
||||
CONFIG_X86_PCC_CPUFREQ=m
|
||||
# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set
|
||||
# CONFIG_X86_POWERNOW_K6 is not set
|
||||
CONFIG_X86_POWERNOW_K7=y
|
||||
CONFIG_X86_POWERNOW_K8=m
|
||||
CONFIG_X86_POWERNOW_K8_ACPI=y
|
||||
# CONFIG_X86_GX_SUSPMOD is not set
|
||||
# CONFIG_X86_SPEEDSTEP_CENTRINO is not set
|
||||
CONFIG_X86_SPEEDSTEP_ICH=y
|
||||
@ -176,7 +213,9 @@ CONFIG_X86_LONGRUN=y
|
||||
# e_powersaver is dangerous
|
||||
# CONFIG_X86_E_POWERSAVER is not set
|
||||
|
||||
CONFIG_X86_SMP=y
|
||||
CONFIG_X86_HT=y
|
||||
CONFIG_X86_BIOS_REBOOT=y
|
||||
CONFIG_X86_TRAMPOLINE=y
|
||||
|
||||
#
|
||||
@ -231,16 +270,20 @@ CONFIG_I2C_AMD756=m
|
||||
CONFIG_I2C_AMD756_S4882=m
|
||||
CONFIG_I2C_AMD8111=m
|
||||
CONFIG_I2C_I801=m
|
||||
CONFIG_I2C_I810=m
|
||||
CONFIG_I2C_ISCH=m
|
||||
CONFIG_I2C_NFORCE2=m
|
||||
CONFIG_I2C_NFORCE2_S4985=m
|
||||
CONFIG_I2C_PIIX4=m
|
||||
CONFIG_I2C_PROSAVAGE=m
|
||||
CONFIG_I2C_SAVAGE4=m
|
||||
CONFIG_I2C_SIS5595=m
|
||||
CONFIG_I2C_SIS630=m
|
||||
CONFIG_I2C_SIS96X=m
|
||||
|
||||
CONFIG_I2C_VIA=m
|
||||
CONFIG_I2C_VIAPRO=m
|
||||
CONFIG_I2C_VOODOO3=m
|
||||
|
||||
CONFIG_SCx200_ACB=m
|
||||
|
||||
@ -249,7 +292,6 @@ CONFIG_SCx200_ACB=m
|
||||
CONFIG_DELL_RBU=m
|
||||
CONFIG_DCDBAS=m
|
||||
|
||||
CONFIG_GPIO_SCH=m
|
||||
CONFIG_PC8736x_GPIO=m
|
||||
# CONFIG_NSC_GPIO is not set
|
||||
CONFIG_CS5535_GPIO=m
|
||||
@ -283,16 +325,17 @@ CONFIG_HW_RANDOM_AMD=m
|
||||
CONFIG_HW_RANDOM_GEODE=m
|
||||
CONFIG_HW_RANDOM_VIA=m
|
||||
|
||||
CONFIG_USB_HIDINPUT_POWERBOOK=y
|
||||
|
||||
# CONFIG_COMPAT_VDSO is not set
|
||||
|
||||
# CONFIG_SGI_IOC4 is not set
|
||||
|
||||
CONFIG_X86_PLATFORM_DEVICES=y
|
||||
CONFIG_ACERHDF=m
|
||||
CONFIG_ASUS_LAPTOP=m
|
||||
CONFIG_COMPAL_LAPTOP=m
|
||||
CONFIG_EEEPC_LAPTOP=m
|
||||
CONFIG_EEEPC_WMI=m
|
||||
CONFIG_FUJITSU_LAPTOP=m
|
||||
# CONFIG_FUJITSU_LAPTOP_DEBUG is not set
|
||||
CONFIG_MSI_LAPTOP=m
|
||||
@ -300,7 +343,6 @@ CONFIG_SONY_LAPTOP=m
|
||||
CONFIG_DELL_LAPTOP=m
|
||||
CONFIG_ACPI_WMI=m
|
||||
CONFIG_ACER_WMI=m
|
||||
CONFIG_ACERHDF=m
|
||||
CONFIG_TC1100_WMI=m
|
||||
CONFIG_HP_WMI=m
|
||||
CONFIG_DELL_WMI=m
|
||||
@ -325,6 +367,7 @@ CONFIG_VIRTUALIZATION=y
|
||||
CONFIG_KVM=m
|
||||
CONFIG_KVM_INTEL=m
|
||||
CONFIG_KVM_AMD=m
|
||||
CONFIG_KVM_TRACE=y
|
||||
CONFIG_LGUEST=m
|
||||
|
||||
CONFIG_PARAVIRT_GUEST=y
|
||||
@ -365,6 +408,7 @@ CONFIG_THINKPAD_ACPI=m
|
||||
# CONFIG_THINKPAD_ACPI_DEBUG is not set
|
||||
# CONFIG_THINKPAD_ACPI_DEBUGFACILITIES is not set
|
||||
CONFIG_THINKPAD_ACPI_HOTKEY_POLL=y
|
||||
CONFIG_THINKPAD_ACPI_BAY=y
|
||||
CONFIG_THINKPAD_ACPI_VIDEO=y
|
||||
CONFIG_THINKPAD_ACPI_ALSA_SUPPORT=y
|
||||
# CONFIG_THINKPAD_ACPI_UNSAFE_LEDS is not set
|
||||
@ -391,8 +435,6 @@ CONFIG_MOUSE_PS2_OLPC=y
|
||||
|
||||
CONFIG_STRICT_DEVMEM=y
|
||||
|
||||
# CONFIG_NO_BOOTMEM is not set
|
||||
|
||||
# CONFIG_MEMTEST is not set
|
||||
# CONFIG_MAXSMP is not set
|
||||
CONFIG_MTRR_SANITIZER=y
|
||||
@ -438,6 +480,7 @@ CONFIG_PERF_COUNTERS=y
|
||||
CONFIG_PERF_EVENTS=y
|
||||
CONFIG_EVENT_PROFILE=y
|
||||
|
||||
# CONFIG_X86_OLD_MCE is not set
|
||||
CONFIG_X86_MCE_INTEL=y
|
||||
CONFIG_X86_MCE_AMD=y
|
||||
# CONFIG_X86_ANCIENT_MCE is not set
|
||||
@ -468,6 +511,3 @@ CONFIG_ACPI_CMPC=m
|
||||
CONFIG_MSI_WMI=m
|
||||
CONFIG_TOSHIBA_BT_RFKILL=m
|
||||
# CONFIG_SAMSUNG_LAPTOP is not set
|
||||
|
||||
CONFIG_VGA_SWITCHEROO=y
|
||||
CONFIG_LPC_SCH=m
|
||||
|
@ -10,6 +10,7 @@ CONFIG_X86_EXTENDED_PLATFORM=y
|
||||
# CONFIG_X86_UV is not set
|
||||
CONFIG_X86_MSR=y
|
||||
CONFIG_X86_CPUID=y
|
||||
# CONFIG_X86_CPU_DEBUG is not set
|
||||
CONFIG_MTRR=y
|
||||
CONFIG_NUMA=y
|
||||
CONFIG_K8_NUMA=y
|
||||
@ -17,6 +18,7 @@ CONFIG_X86_64_ACPI_NUMA=y
|
||||
# CONFIG_NUMA_EMU is not set
|
||||
CONFIG_NR_CPUS=256
|
||||
CONFIG_X86_POWERNOW_K8=m
|
||||
CONFIG_X86_POWERNOW_K8_ACPI=y
|
||||
CONFIG_X86_P4_CLOCKMOD=m
|
||||
CONFIG_IA32_EMULATION=y
|
||||
# CONFIG_IA32_AOUT is not set
|
||||
@ -43,6 +45,16 @@ CONFIG_EFI_VARS=y
|
||||
CONFIG_EFI_PCDP=y
|
||||
CONFIG_FB_EFI=y
|
||||
|
||||
CONFIG_I2O=m
|
||||
CONFIG_I2O_BLOCK=m
|
||||
CONFIG_I2O_SCSI=m
|
||||
CONFIG_I2O_PROC=m
|
||||
CONFIG_I2O_CONFIG=y
|
||||
CONFIG_I2O_EXT_ADAPTEC=y
|
||||
CONFIG_I2O_EXT_ADAPTEC_DMA64=y
|
||||
CONFIG_I2O_CONFIG_OLD_IOCTL=y
|
||||
CONFIG_I2O_BUS=m
|
||||
|
||||
CONFIG_SECCOMP=y
|
||||
|
||||
CONFIG_CAPI_EICON=y
|
||||
@ -64,8 +76,8 @@ CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
|
||||
CONFIG_CPU_FREQ_TABLE=y
|
||||
CONFIG_CPU_FREQ_DEBUG=y
|
||||
# CONFIG_X86_SPEEDSTEP_CENTRINO is not set
|
||||
CONFIG_X86_PCC_CPUFREQ=m
|
||||
CONFIG_X86_ACPI_CPUFREQ=m
|
||||
# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set
|
||||
CONFIG_CPU_FREQ_STAT=m
|
||||
CONFIG_CPU_FREQ_STAT_DETAILS=y
|
||||
|
||||
@ -75,10 +87,12 @@ CONFIG_ACPI_AC=y
|
||||
CONFIG_ACPI_PROCFS_POWER=y
|
||||
CONFIG_ACPI_SYSFS_POWER=y
|
||||
CONFIG_ACPI_BATTERY=y
|
||||
CONFIG_ACPI_BAY=m
|
||||
CONFIG_ACPI_BLACKLIST_YEAR=0
|
||||
CONFIG_ACPI_BUTTON=y
|
||||
CONFIG_ACPI_CONTAINER=m
|
||||
CONFIG_ACPI_DOCK=y
|
||||
CONFIG_ACPI_EC=y
|
||||
CONFIG_ACPI_FAN=y
|
||||
CONFIG_ACPI_HOTPLUG_MEMORY=m
|
||||
CONFIG_ACPI_NUMA=y
|
||||
@ -89,6 +103,7 @@ CONFIG_ACPI_SLEEP=y
|
||||
CONFIG_ACPI_THERMAL=y
|
||||
CONFIG_ACPI_TOSHIBA=m
|
||||
CONFIG_ACPI_POWER=y
|
||||
CONFIG_ACPI_SYSTEM=y
|
||||
CONFIG_ACPI_VIDEO=m
|
||||
# Disable in F9.
|
||||
CONFIG_ACPI_PROC_EVENT=y
|
||||
@ -96,6 +111,7 @@ CONFIG_ACPI_POWER_METER=m
|
||||
CONFIG_ACPI_PROCESSOR_AGGREGATOR=m
|
||||
|
||||
CONFIG_X86_PLATFORM_DEVICES=y
|
||||
CONFIG_ACERHDF=m
|
||||
CONFIG_ASUS_LAPTOP=m
|
||||
CONFIG_COMPAL_LAPTOP=m
|
||||
CONFIG_FUJITSU_LAPTOP=m
|
||||
@ -104,11 +120,9 @@ CONFIG_MSI_LAPTOP=m
|
||||
CONFIG_SONY_LAPTOP=m
|
||||
CONFIG_SONYPI_COMPAT=y
|
||||
CONFIG_EEEPC_LAPTOP=m
|
||||
CONFIG_EEEPC_WMI=m
|
||||
CONFIG_DELL_LAPTOP=m
|
||||
CONFIG_ACPI_WMI=m
|
||||
CONFIG_ACER_WMI=m
|
||||
CONFIG_ACERHDF=m
|
||||
CONFIG_HP_WMI=m
|
||||
CONFIG_DELL_WMI=m
|
||||
|
||||
@ -116,6 +130,7 @@ CONFIG_THINKPAD_ACPI=m
|
||||
# CONFIG_THINKPAD_ACPI_DEBUG is not set
|
||||
# CONFIG_THINKPAD_ACPI_DEBUGFACILITIES is not set
|
||||
CONFIG_THINKPAD_ACPI_HOTKEY_POLL=y
|
||||
CONFIG_THINKPAD_ACPI_BAY=y
|
||||
CONFIG_THINKPAD_ACPI_VIDEO=y
|
||||
CONFIG_THINKPAD_ACPI_ALSA_SUPPORT=y
|
||||
# CONFIG_THINKPAD_ACPI_UNSAFE_LEDS is not set
|
||||
@ -130,6 +145,7 @@ CONFIG_HOTPLUG_PCI_SHPC=m
|
||||
|
||||
CONFIG_HPET=y
|
||||
# CONFIG_HPET_MMAP is not set
|
||||
# CONFIG_HPET_RTC_IRQ is not set
|
||||
CONFIG_PM=y
|
||||
|
||||
CONFIG_IPW2100=m
|
||||
@ -153,8 +169,7 @@ CONFIG_CRYPTO_AES_X86_64=m
|
||||
CONFIG_CRYPTO_TWOFISH_X86_64=m
|
||||
# CONFIG_CRYPTO_SALSA20 is not set
|
||||
CONFIG_CRYPTO_SALSA20_X86_64=m
|
||||
# -- Temporarily disabled until bugs can be sorted
|
||||
# CONFIG_CRYPTO_AES_NI_INTEL is not set
|
||||
CONFIG_CRYPTO_AES_NI_INTEL=m
|
||||
|
||||
CONFIG_X86_MCE=y
|
||||
CONFIG_X86_MCE_INTEL=y
|
||||
@ -168,6 +183,7 @@ CONFIG_I2C_AMD756_S4882=m
|
||||
CONFIG_I2C_AMD8111=m
|
||||
CONFIG_I2C_I801=m
|
||||
CONFIG_I2C_ISCH=m
|
||||
# CONFIG_I2C_I810 is not set
|
||||
CONFIG_I2C_NFORCE2_S4985=m
|
||||
CONFIG_I2C_PIIX4=m
|
||||
# CONFIG_I2C_SIS5595 is not set
|
||||
@ -211,11 +227,11 @@ CONFIG_HW_RANDOM_VIA=m
|
||||
|
||||
# CONFIG_HW_RANDOM_GEODE is not set
|
||||
|
||||
CONFIG_USB_HIDINPUT_POWERBOOK=y
|
||||
|
||||
CONFIG_DEBUG_STACKOVERFLOW=y
|
||||
CONFIG_DEBUG_NMI_TIMEOUT=5
|
||||
|
||||
CONFIG_GPIO_SCH=m
|
||||
# CONFIG_PC8736x_GPIO is not set
|
||||
|
||||
# CONFIG_DISCONTIGMEM_MANUAL is not set
|
||||
@ -235,6 +251,7 @@ CONFIG_MEMORY_HOTREMOVE=y
|
||||
# CONFIG_BLK_DEV_CS5535 is not set
|
||||
|
||||
CONFIG_CC_STACKPROTECTOR=y
|
||||
# CONFIG_CC_STACKPROTECTOR_ALL is not set
|
||||
|
||||
CONFIG_SGI_IOC4=m
|
||||
CONFIG_SGI_XP=m
|
||||
@ -272,6 +289,7 @@ CONFIG_VIRTUALIZATION=y
|
||||
CONFIG_KVM=m
|
||||
CONFIG_KVM_INTEL=m
|
||||
CONFIG_KVM_AMD=m
|
||||
CONFIG_KVM_TRACE=y
|
||||
|
||||
CONFIG_PARAVIRT_GUEST=y
|
||||
CONFIG_PARAVIRT=y
|
||||
@ -310,6 +328,8 @@ CONFIG_HP_WATCHDOG=m
|
||||
|
||||
CONFIG_FRAME_WARN=2048
|
||||
|
||||
CONFIG_MEMTEST_BOOTPARAM=y
|
||||
CONFIG_MEMTEST_BOOTPARAM_VALUE=0
|
||||
CONFIG_NODES_SHIFT=9
|
||||
CONFIG_X86_PAT=y
|
||||
# FIXME: These should be 32bit only
|
||||
@ -318,8 +338,6 @@ CONFIG_STRICT_DEVMEM=y
|
||||
|
||||
CONFIG_DIRECT_GBPAGES=y
|
||||
|
||||
# CONFIG_NO_BOOTMEM is not set
|
||||
|
||||
# CONFIG_MEMTEST is not set
|
||||
CONFIG_AMD_IOMMU=y
|
||||
CONFIG_AMD_IOMMU_STATS=y
|
||||
@ -359,6 +377,7 @@ CONFIG_HW_BRANCH_TRACER=y
|
||||
|
||||
CONFIG_X86_X2APIC=y
|
||||
CONFIG_SPARSE_IRQ=y
|
||||
CONFIG_NUMA_MIGRATE_IRQ_DESC=y
|
||||
|
||||
CONFIG_RCU_FANOUT=64
|
||||
|
||||
@ -393,6 +412,3 @@ CONFIG_CS5535_CLOCK_EVENT_SRC=m
|
||||
CONFIG_X86_DECODER_SELFTEST=y
|
||||
|
||||
CONFIG_CRYPTO_GHASH_CLMUL_NI_INTEL=m
|
||||
|
||||
CONFIG_VGA_SWITCHEROO=y
|
||||
CONFIG_LPC_SCH=m
|
||||
|
@ -1,14 +0,0 @@
|
||||
diff -up linux-2.6.32.noarch/fs/exec.c.orig linux-2.6.32.noarch/fs/exec.c
|
||||
--- linux-2.6.32.noarch/fs/exec.c.orig 2010-02-22 12:40:06.000000000 -0500
|
||||
+++ linux-2.6.32.noarch/fs/exec.c 2010-02-22 12:48:34.000000000 -0500
|
||||
@@ -1973,8 +1973,9 @@ void do_coredump(long signr, int exit_co
|
||||
/*
|
||||
* Dont allow local users get cute and trick others to coredump
|
||||
* into their pre-created files:
|
||||
+ * Note this isn't relevant to pipes
|
||||
*/
|
||||
- if (inode->i_uid != current_fsuid())
|
||||
+ if (!ispipe && (inode->i_uid != current_fsuid()))
|
||||
goto close_fail;
|
||||
if (!cprm.file->f_op)
|
||||
goto close_fail;
|
@ -1,176 +0,0 @@
|
||||
From: David Howells <dhowells@redhat.com>
|
||||
Date: Thu, 29 Jul 2010 11:45:49 +0000 (+0100)
|
||||
Subject: CRED: Fix get_task_cred() and task_state() to not resurrect dead credentials
|
||||
X-Git-Tag: v2.6.35~11
|
||||
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=de09a9771a5346029f4d11e4ac886be7f9b
|
||||
|
||||
CRED: Fix get_task_cred() and task_state() to not resurrect dead credentials
|
||||
|
||||
It's possible for get_task_cred() as it currently stands to 'corrupt' a set of
|
||||
credentials by incrementing their usage count after their replacement by the
|
||||
task being accessed.
|
||||
|
||||
What happens is that get_task_cred() can race with commit_creds():
|
||||
|
||||
TASK_1 TASK_2 RCU_CLEANER
|
||||
-->get_task_cred(TASK_2)
|
||||
rcu_read_lock()
|
||||
__cred = __task_cred(TASK_2)
|
||||
-->commit_creds()
|
||||
old_cred = TASK_2->real_cred
|
||||
TASK_2->real_cred = ...
|
||||
put_cred(old_cred)
|
||||
call_rcu(old_cred)
|
||||
[__cred->usage == 0]
|
||||
get_cred(__cred)
|
||||
[__cred->usage == 1]
|
||||
rcu_read_unlock()
|
||||
-->put_cred_rcu()
|
||||
[__cred->usage == 1]
|
||||
panic()
|
||||
|
||||
However, since a tasks credentials are generally not changed very often, we can
|
||||
reasonably make use of a loop involving reading the creds pointer and using
|
||||
atomic_inc_not_zero() to attempt to increment it if it hasn't already hit zero.
|
||||
|
||||
If successful, we can safely return the credentials in the knowledge that, even
|
||||
if the task we're accessing has released them, they haven't gone to the RCU
|
||||
cleanup code.
|
||||
|
||||
We then change task_state() in procfs to use get_task_cred() rather than
|
||||
calling get_cred() on the result of __task_cred(), as that suffers from the
|
||||
same problem.
|
||||
|
||||
Without this change, a BUG_ON in __put_cred() or in put_cred_rcu() can be
|
||||
tripped when it is noticed that the usage count is not zero as it ought to be,
|
||||
for example:
|
||||
|
||||
kernel BUG at kernel/cred.c:168!
|
||||
invalid opcode: 0000 [#1] SMP
|
||||
last sysfs file: /sys/kernel/mm/ksm/run
|
||||
CPU 0
|
||||
Pid: 2436, comm: master Not tainted 2.6.33.3-85.fc13.x86_64 #1 0HR330/OptiPlex
|
||||
745
|
||||
RIP: 0010:[<ffffffff81069881>] [<ffffffff81069881>] __put_cred+0xc/0x45
|
||||
RSP: 0018:ffff88019e7e9eb8 EFLAGS: 00010202
|
||||
RAX: 0000000000000001 RBX: ffff880161514480 RCX: 00000000ffffffff
|
||||
RDX: 00000000ffffffff RSI: ffff880140c690c0 RDI: ffff880140c690c0
|
||||
RBP: ffff88019e7e9eb8 R08: 00000000000000d0 R09: 0000000000000000
|
||||
R10: 0000000000000001 R11: 0000000000000040 R12: ffff880140c690c0
|
||||
R13: ffff88019e77aea0 R14: 00007fff336b0a5c R15: 0000000000000001
|
||||
FS: 00007f12f50d97c0(0000) GS:ffff880007400000(0000) knlGS:0000000000000000
|
||||
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
|
||||
CR2: 00007f8f461bc000 CR3: 00000001b26ce000 CR4: 00000000000006f0
|
||||
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
|
||||
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
|
||||
Process master (pid: 2436, threadinfo ffff88019e7e8000, task ffff88019e77aea0)
|
||||
Stack:
|
||||
ffff88019e7e9ec8 ffffffff810698cd ffff88019e7e9ef8 ffffffff81069b45
|
||||
<0> ffff880161514180 ffff880161514480 ffff880161514180 0000000000000000
|
||||
<0> ffff88019e7e9f28 ffffffff8106aace 0000000000000001 0000000000000246
|
||||
Call Trace:
|
||||
[<ffffffff810698cd>] put_cred+0x13/0x15
|
||||
[<ffffffff81069b45>] commit_creds+0x16b/0x175
|
||||
[<ffffffff8106aace>] set_current_groups+0x47/0x4e
|
||||
[<ffffffff8106ac89>] sys_setgroups+0xf6/0x105
|
||||
[<ffffffff81009b02>] system_call_fastpath+0x16/0x1b
|
||||
Code: 48 8d 71 ff e8 7e 4e 15 00 85 c0 78 0b 8b 75 ec 48 89 df e8 ef 4a 15 00
|
||||
48 83 c4 18 5b c9 c3 55 8b 07 8b 07 48 89 e5 85 c0 74 04 <0f> 0b eb fe 65 48 8b
|
||||
04 25 00 cc 00 00 48 3b b8 58 04 00 00 75
|
||||
RIP [<ffffffff81069881>] __put_cred+0xc/0x45
|
||||
RSP <ffff88019e7e9eb8>
|
||||
---[ end trace df391256a100ebdd ]---
|
||||
|
||||
Signed-off-by: David Howells <dhowells@redhat.com>
|
||||
Acked-by: Jiri Olsa <jolsa@redhat.com>
|
||||
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
||||
---
|
||||
|
||||
diff --git a/fs/proc/array.c b/fs/proc/array.c
|
||||
index 9b58d38..fff6572 100644
|
||||
--- a/fs/proc/array.c
|
||||
+++ b/fs/proc/array.c
|
||||
@@ -176,7 +176,7 @@ static inline void task_state(struct seq_file *m, struct pid_namespace *ns,
|
||||
if (tracer)
|
||||
tpid = task_pid_nr_ns(tracer, ns);
|
||||
}
|
||||
- cred = get_cred((struct cred *) __task_cred(p));
|
||||
+ cred = get_task_cred(p);
|
||||
seq_printf(m,
|
||||
"State:\t%s\n"
|
||||
"Tgid:\t%d\n"
|
||||
diff --git a/include/linux/cred.h b/include/linux/cred.h
|
||||
index 75c0fa8..ce40cbc 100644
|
||||
--- a/include/linux/cred.h
|
||||
+++ b/include/linux/cred.h
|
||||
@@ -153,6 +153,7 @@ struct cred {
|
||||
extern void __put_cred(struct cred *);
|
||||
extern void exit_creds(struct task_struct *);
|
||||
extern int copy_creds(struct task_struct *, unsigned long);
|
||||
+extern const struct cred *get_task_cred(struct task_struct *);
|
||||
extern struct cred *cred_alloc_blank(void);
|
||||
extern struct cred *prepare_creds(void);
|
||||
extern struct cred *prepare_exec_creds(void);
|
||||
@@ -282,26 +283,6 @@ static inline void put_cred(const struct cred *_cred)
|
||||
((const struct cred *)(rcu_dereference_check((task)->real_cred, rcu_read_lock_held() || lockdep_tasklist_lock_is_held())))
|
||||
|
||||
/**
|
||||
- * get_task_cred - Get another task's objective credentials
|
||||
- * @task: The task to query
|
||||
- *
|
||||
- * Get the objective credentials of a task, pinning them so that they can't go
|
||||
- * away. Accessing a task's credentials directly is not permitted.
|
||||
- *
|
||||
- * The caller must make sure task doesn't go away, either by holding a ref on
|
||||
- * task or by holding tasklist_lock to prevent it from being unlinked.
|
||||
- */
|
||||
-#define get_task_cred(task) \
|
||||
-({ \
|
||||
- struct cred *__cred; \
|
||||
- rcu_read_lock(); \
|
||||
- __cred = (struct cred *) __task_cred((task)); \
|
||||
- get_cred(__cred); \
|
||||
- rcu_read_unlock(); \
|
||||
- __cred; \
|
||||
-})
|
||||
-
|
||||
-/**
|
||||
* get_current_cred - Get the current task's subjective credentials
|
||||
*
|
||||
* Get the subjective credentials of the current task, pinning them so that
|
||||
diff --git a/kernel/cred.c b/kernel/cred.c
|
||||
index a2d5504..60bc8b1 100644
|
||||
--- a/kernel/cred.c
|
||||
+++ b/kernel/cred.c
|
||||
@@ -209,6 +209,31 @@ void exit_creds(struct task_struct *tsk)
|
||||
}
|
||||
}
|
||||
|
||||
+/**
|
||||
+ * get_task_cred - Get another task's objective credentials
|
||||
+ * @task: The task to query
|
||||
+ *
|
||||
+ * Get the objective credentials of a task, pinning them so that they can't go
|
||||
+ * away. Accessing a task's credentials directly is not permitted.
|
||||
+ *
|
||||
+ * The caller must also make sure task doesn't get deleted, either by holding a
|
||||
+ * ref on task or by holding tasklist_lock to prevent it from being unlinked.
|
||||
+ */
|
||||
+const struct cred *get_task_cred(struct task_struct *task)
|
||||
+{
|
||||
+ const struct cred *cred;
|
||||
+
|
||||
+ rcu_read_lock();
|
||||
+
|
||||
+ do {
|
||||
+ cred = __task_cred((task));
|
||||
+ BUG_ON(!cred);
|
||||
+ } while (!atomic_inc_not_zero(&((struct cred *)cred)->usage));
|
||||
+
|
||||
+ rcu_read_unlock();
|
||||
+ return cred;
|
||||
+}
|
||||
+
|
||||
/*
|
||||
* Allocate blank credentials, such that the credentials can be filled in at a
|
||||
* later date without risk of ENOMEM.
|
@ -1,111 +0,0 @@
|
||||
From e45009229be6a7fae49bdfa3459905668c0b0fb1 Mon Sep 17 00:00:00 2001
|
||||
From: David S. Miller <davem@davemloft.net>
|
||||
Date: Wed, 19 May 2010 14:12:03 +1000
|
||||
Subject: crypto: testmgr - Add testing for async hashing and update/final
|
||||
|
||||
Extend testmgr such that it tests async hash algorithms,
|
||||
and that for both sync and async hashes it tests both
|
||||
->digest() and ->update()/->final() sequences.
|
||||
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
---
|
||||
crypto/testmgr.c | 66 +++++++++++++++++++++++++++++++++++++++--------------
|
||||
1 files changed, 48 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/crypto/testmgr.c b/crypto/testmgr.c
|
||||
index c494d76..5c8aaa0 100644
|
||||
--- a/crypto/testmgr.c
|
||||
+++ b/crypto/testmgr.c
|
||||
@@ -153,8 +153,21 @@ static void testmgr_free_buf(char *buf[XBUFSIZE])
|
||||
free_page((unsigned long)buf[i]);
|
||||
}
|
||||
|
||||
+static int do_one_async_hash_op(struct ahash_request *req,
|
||||
+ struct tcrypt_result *tr,
|
||||
+ int ret)
|
||||
+{
|
||||
+ if (ret == -EINPROGRESS || ret == -EBUSY) {
|
||||
+ ret = wait_for_completion_interruptible(&tr->completion);
|
||||
+ if (!ret)
|
||||
+ ret = tr->err;
|
||||
+ INIT_COMPLETION(tr->completion);
|
||||
+ }
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
static int test_hash(struct crypto_ahash *tfm, struct hash_testvec *template,
|
||||
- unsigned int tcount)
|
||||
+ unsigned int tcount, bool use_digest)
|
||||
{
|
||||
const char *algo = crypto_tfm_alg_driver_name(crypto_ahash_tfm(tfm));
|
||||
unsigned int i, j, k, temp;
|
||||
@@ -206,23 +219,36 @@ static int test_hash(struct crypto_ahash *tfm, struct hash_testvec *template,
|
||||
}
|
||||
|
||||
ahash_request_set_crypt(req, sg, result, template[i].psize);
|
||||
- ret = crypto_ahash_digest(req);
|
||||
- switch (ret) {
|
||||
- case 0:
|
||||
- break;
|
||||
- case -EINPROGRESS:
|
||||
- case -EBUSY:
|
||||
- ret = wait_for_completion_interruptible(
|
||||
- &tresult.completion);
|
||||
- if (!ret && !(ret = tresult.err)) {
|
||||
- INIT_COMPLETION(tresult.completion);
|
||||
- break;
|
||||
+ if (use_digest) {
|
||||
+ ret = do_one_async_hash_op(req, &tresult,
|
||||
+ crypto_ahash_digest(req));
|
||||
+ if (ret) {
|
||||
+ pr_err("alg: hash: digest failed on test %d "
|
||||
+ "for %s: ret=%d\n", j, algo, -ret);
|
||||
+ goto out;
|
||||
+ }
|
||||
+ } else {
|
||||
+ ret = do_one_async_hash_op(req, &tresult,
|
||||
+ crypto_ahash_init(req));
|
||||
+ if (ret) {
|
||||
+ pr_err("alt: hash: init failed on test %d "
|
||||
+ "for %s: ret=%d\n", j, algo, -ret);
|
||||
+ goto out;
|
||||
+ }
|
||||
+ ret = do_one_async_hash_op(req, &tresult,
|
||||
+ crypto_ahash_update(req));
|
||||
+ if (ret) {
|
||||
+ pr_err("alt: hash: update failed on test %d "
|
||||
+ "for %s: ret=%d\n", j, algo, -ret);
|
||||
+ goto out;
|
||||
+ }
|
||||
+ ret = do_one_async_hash_op(req, &tresult,
|
||||
+ crypto_ahash_final(req));
|
||||
+ if (ret) {
|
||||
+ pr_err("alt: hash: final failed on test %d "
|
||||
+ "for %s: ret=%d\n", j, algo, -ret);
|
||||
+ goto out;
|
||||
}
|
||||
- /* fall through */
|
||||
- default:
|
||||
- printk(KERN_ERR "alg: hash: digest failed on test %d "
|
||||
- "for %s: ret=%d\n", j, algo, -ret);
|
||||
- goto out;
|
||||
}
|
||||
|
||||
if (memcmp(result, template[i].digest,
|
||||
@@ -1402,7 +1428,11 @@ static int alg_test_hash(const struct alg_test_desc *desc, const char *driver,
|
||||
return PTR_ERR(tfm);
|
||||
}
|
||||
|
||||
- err = test_hash(tfm, desc->suite.hash.vecs, desc->suite.hash.count);
|
||||
+ err = test_hash(tfm, desc->suite.hash.vecs,
|
||||
+ desc->suite.hash.count, true);
|
||||
+ if (!err)
|
||||
+ err = test_hash(tfm, desc->suite.hash.vecs,
|
||||
+ desc->suite.hash.count, false);
|
||||
|
||||
crypto_free_ahash(tfm);
|
||||
return err;
|
||||
--
|
||||
1.7.0.1
|
||||
|
9
crypto-aesni-kill-module_alias.patch
Normal file
9
crypto-aesni-kill-module_alias.patch
Normal file
@ -0,0 +1,9 @@
|
||||
diff --git a/arch/x86/crypto/aesni-intel_glue.c b/arch/x86/crypto/aesni-intel_glue.c
|
||||
index 49c552c..ae88694 100644
|
||||
--- a/arch/x86/crypto/aesni-intel_glue.c
|
||||
+++ b/arch/x86/crypto/aesni-intel_glue.c
|
||||
@@ -720,4 +720,3 @@ module_exit(aesni_exit);
|
||||
|
||||
MODULE_DESCRIPTION("Rijndael (AES) Cipher Algorithm, Intel AES-NI instructions optimized");
|
||||
MODULE_LICENSE("GPL");
|
||||
-MODULE_ALIAS("aes");
|
8287
crystalhd-2.6.34-staging.patch
Normal file
8287
crystalhd-2.6.34-staging.patch
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,30 +1,18 @@
|
||||
From 4ff58b642f80dedb20533978123d89b5ac9b1ed5 Mon Sep 17 00:00:00 2001
|
||||
From: Kyle McMartin <kyle@phobos.i.jkkm.org>
|
||||
Date: Tue, 30 Mar 2010 00:04:29 -0400
|
||||
Subject: die-floppy-die
|
||||
|
||||
Kill the floppy.ko pnp modalias. We were surviving just fine without
|
||||
autoloading floppy drivers, tyvm.
|
||||
|
||||
Please feel free to register all complaints in the wastepaper bin.
|
||||
---
|
||||
drivers/block/floppy.c | 3 +--
|
||||
1 files changed, 1 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
|
||||
index 90c4038..f4a0b90 100644
|
||||
index 91b7530..2ea84a6 100644
|
||||
--- a/drivers/block/floppy.c
|
||||
+++ b/drivers/block/floppy.c
|
||||
@@ -4619,8 +4619,7 @@ static const struct pnp_device_id floppy_pnpids[] = {
|
||||
{"PNP0700", 0},
|
||||
{}
|
||||
@@ -4631,7 +4631,7 @@ static const struct pnp_device_id floppy_pnpids[] = {
|
||||
{ "PNP0700", 0 },
|
||||
{ }
|
||||
};
|
||||
-
|
||||
-MODULE_DEVICE_TABLE(pnp, floppy_pnpids);
|
||||
+/* MODULE_DEVICE_TABLE(pnp, floppy_pnpids); */
|
||||
|
||||
#else
|
||||
|
||||
--
|
||||
1.7.0.1
|
||||
|
||||
|
@ -1,204 +0,0 @@
|
||||
From: Christoph Hellwig <hch@infradead.org>
|
||||
Date: Sun, 18 Jul 2010 21:17:09 +0000 (+0000)
|
||||
Subject: direct-io: move aio_complete into ->end_io
|
||||
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=40e2e97316af6e62affab7a392e792494b8d9dde
|
||||
|
||||
direct-io: move aio_complete into ->end_io
|
||||
|
||||
Filesystems with unwritten extent support must not complete an AIO request
|
||||
until the transaction to convert the extent has been commited. That means
|
||||
the aio_complete calls needs to be moved into the ->end_io callback so
|
||||
that the filesystem can control when to call it exactly.
|
||||
|
||||
This makes a bit of a mess out of dio_complete and the ->end_io callback
|
||||
prototype even more complicated.
|
||||
|
||||
Signed-off-by: Christoph Hellwig <hch@lst.de>
|
||||
Reviewed-by: Jan Kara <jack@suse.cz>
|
||||
Signed-off-by: Alex Elder <aelder@sgi.com>
|
||||
---
|
||||
|
||||
diff --git a/fs/direct-io.c b/fs/direct-io.c
|
||||
index 7600aac..a10cb91 100644
|
||||
--- a/fs/direct-io.c
|
||||
+++ b/fs/direct-io.c
|
||||
@@ -218,7 +218,7 @@ static struct page *dio_get_page(struct dio *dio)
|
||||
* filesystems can use it to hold additional state between get_block calls and
|
||||
* dio_complete.
|
||||
*/
|
||||
-static int dio_complete(struct dio *dio, loff_t offset, int ret)
|
||||
+static int dio_complete(struct dio *dio, loff_t offset, int ret, bool is_async)
|
||||
{
|
||||
ssize_t transferred = 0;
|
||||
|
||||
@@ -239,14 +239,6 @@ static int dio_complete(struct dio *dio, loff_t offset, int ret)
|
||||
transferred = dio->i_size - offset;
|
||||
}
|
||||
|
||||
- if (dio->end_io && dio->result)
|
||||
- dio->end_io(dio->iocb, offset, transferred,
|
||||
- dio->map_bh.b_private);
|
||||
-
|
||||
- if (dio->flags & DIO_LOCKING)
|
||||
- /* lockdep: non-owner release */
|
||||
- up_read_non_owner(&dio->inode->i_alloc_sem);
|
||||
-
|
||||
if (ret == 0)
|
||||
ret = dio->page_errors;
|
||||
if (ret == 0)
|
||||
@@ -254,6 +246,17 @@ static int dio_complete(struct dio *dio, loff_t offset, int ret)
|
||||
if (ret == 0)
|
||||
ret = transferred;
|
||||
|
||||
+ if (dio->end_io && dio->result) {
|
||||
+ dio->end_io(dio->iocb, offset, transferred,
|
||||
+ dio->map_bh.b_private, ret, is_async);
|
||||
+ } else if (is_async) {
|
||||
+ aio_complete(dio->iocb, ret, 0);
|
||||
+ }
|
||||
+
|
||||
+ if (dio->flags & DIO_LOCKING)
|
||||
+ /* lockdep: non-owner release */
|
||||
+ up_read_non_owner(&dio->inode->i_alloc_sem);
|
||||
+
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -277,8 +280,7 @@ static void dio_bio_end_aio(struct bio *bio, int error)
|
||||
spin_unlock_irqrestore(&dio->bio_lock, flags);
|
||||
|
||||
if (remaining == 0) {
|
||||
- int ret = dio_complete(dio, dio->iocb->ki_pos, 0);
|
||||
- aio_complete(dio->iocb, ret, 0);
|
||||
+ dio_complete(dio, dio->iocb->ki_pos, 0, true);
|
||||
kfree(dio);
|
||||
}
|
||||
}
|
||||
@@ -1126,7 +1128,7 @@ direct_io_worker(int rw, struct kiocb *iocb, struct inode *inode,
|
||||
spin_unlock_irqrestore(&dio->bio_lock, flags);
|
||||
|
||||
if (ret2 == 0) {
|
||||
- ret = dio_complete(dio, offset, ret);
|
||||
+ ret = dio_complete(dio, offset, ret, false);
|
||||
kfree(dio);
|
||||
} else
|
||||
BUG_ON(ret != -EIOCBQUEUED);
|
||||
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
|
||||
index 42272d6..0afc8c1 100644
|
||||
--- a/fs/ext4/inode.c
|
||||
+++ b/fs/ext4/inode.c
|
||||
@@ -3775,7 +3775,8 @@ static ext4_io_end_t *ext4_init_io_end (struct inode *inode, gfp_t flags)
|
||||
}
|
||||
|
||||
static void ext4_end_io_dio(struct kiocb *iocb, loff_t offset,
|
||||
- ssize_t size, void *private)
|
||||
+ ssize_t size, void *private, int ret,
|
||||
+ bool is_async)
|
||||
{
|
||||
ext4_io_end_t *io_end = iocb->private;
|
||||
struct workqueue_struct *wq;
|
||||
@@ -3784,7 +3785,7 @@ static void ext4_end_io_dio(struct kiocb *iocb, loff_t offset,
|
||||
|
||||
/* if not async direct IO or dio with 0 bytes write, just return */
|
||||
if (!io_end || !size)
|
||||
- return;
|
||||
+ goto out;
|
||||
|
||||
ext_debug("ext4_end_io_dio(): io_end 0x%p"
|
||||
"for inode %lu, iocb 0x%p, offset %llu, size %llu\n",
|
||||
@@ -3795,7 +3796,7 @@ static void ext4_end_io_dio(struct kiocb *iocb, loff_t offset,
|
||||
if (io_end->flag != EXT4_IO_UNWRITTEN){
|
||||
ext4_free_io_end(io_end);
|
||||
iocb->private = NULL;
|
||||
- return;
|
||||
+ goto out;
|
||||
}
|
||||
|
||||
io_end->offset = offset;
|
||||
@@ -3812,6 +3813,9 @@ static void ext4_end_io_dio(struct kiocb *iocb, loff_t offset,
|
||||
list_add_tail(&io_end->list, &ei->i_completed_io_list);
|
||||
spin_unlock_irqrestore(&ei->i_completed_io_lock, flags);
|
||||
iocb->private = NULL;
|
||||
+out:
|
||||
+ if (is_async)
|
||||
+ aio_complete(iocb, ret, 0);
|
||||
}
|
||||
|
||||
static void ext4_end_io_buffer_write(struct buffer_head *bh, int uptodate)
|
||||
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c
|
||||
index 356e976..96337a4 100644
|
||||
--- a/fs/ocfs2/aops.c
|
||||
+++ b/fs/ocfs2/aops.c
|
||||
@@ -578,7 +578,9 @@ bail:
|
||||
static void ocfs2_dio_end_io(struct kiocb *iocb,
|
||||
loff_t offset,
|
||||
ssize_t bytes,
|
||||
- void *private)
|
||||
+ void *private,
|
||||
+ int ret,
|
||||
+ bool is_async)
|
||||
{
|
||||
struct inode *inode = iocb->ki_filp->f_path.dentry->d_inode;
|
||||
int level;
|
||||
@@ -592,6 +594,9 @@ static void ocfs2_dio_end_io(struct kiocb *iocb,
|
||||
if (!level)
|
||||
up_read(&inode->i_alloc_sem);
|
||||
ocfs2_rw_unlock(inode, level);
|
||||
+
|
||||
+ if (is_async)
|
||||
+ aio_complete(iocb, ret, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c
|
||||
index 8abbf05..95d1e26 100644
|
||||
--- a/fs/xfs/linux-2.6/xfs_aops.c
|
||||
+++ b/fs/xfs/linux-2.6/xfs_aops.c
|
||||
@@ -1406,7 +1406,9 @@ xfs_end_io_direct(
|
||||
struct kiocb *iocb,
|
||||
loff_t offset,
|
||||
ssize_t size,
|
||||
- void *private)
|
||||
+ void *private,
|
||||
+ int ret,
|
||||
+ bool is_async)
|
||||
{
|
||||
xfs_ioend_t *ioend = iocb->private;
|
||||
|
||||
@@ -1452,6 +1454,9 @@ xfs_end_io_direct(
|
||||
* against double-freeing.
|
||||
*/
|
||||
iocb->private = NULL;
|
||||
+
|
||||
+ if (is_async)
|
||||
+ aio_complete(iocb, ret, 0);
|
||||
}
|
||||
|
||||
STATIC ssize_t
|
||||
diff --git a/fs/xfs/linux-2.6/xfs_aops.h b/fs/xfs/linux-2.6/xfs_aops.h
|
||||
index 319da17..c5057fb 100644
|
||||
--- a/fs/xfs/linux-2.6/xfs_aops.h
|
||||
+++ b/fs/xfs/linux-2.6/xfs_aops.h
|
||||
@@ -37,6 +37,8 @@ typedef struct xfs_ioend {
|
||||
size_t io_size; /* size of the extent */
|
||||
xfs_off_t io_offset; /* offset in the file */
|
||||
struct work_struct io_work; /* xfsdatad work queue */
|
||||
+ struct kiocb *io_iocb;
|
||||
+ int io_result;
|
||||
} xfs_ioend_t;
|
||||
|
||||
extern const struct address_space_operations xfs_address_space_operations;
|
||||
diff --git a/include/linux/fs.h b/include/linux/fs.h
|
||||
index 68ca1b0..f91affb 100644
|
||||
--- a/include/linux/fs.h
|
||||
+++ b/include/linux/fs.h
|
||||
@@ -415,7 +415,8 @@ struct buffer_head;
|
||||
typedef int (get_block_t)(struct inode *inode, sector_t iblock,
|
||||
struct buffer_head *bh_result, int create);
|
||||
typedef void (dio_iodone_t)(struct kiocb *iocb, loff_t offset,
|
||||
- ssize_t bytes, void *private);
|
||||
+ ssize_t bytes, void *private, int ret,
|
||||
+ bool is_async);
|
||||
|
||||
/*
|
||||
* Attribute flags. These should be or-ed together to figure out what
|
@ -1,6 +1,6 @@
|
||||
From 2a79554c864ac58fa2ad982f0fcee2cc2aa33eb5 Mon Sep 17 00:00:00 2001
|
||||
From d01268ff135052cd40c375c6b7ebadbee3281b4d Mon Sep 17 00:00:00 2001
|
||||
From: Bastien Nocera <hadess@hadess.net>
|
||||
Date: Thu, 20 May 2010 10:30:31 -0400
|
||||
Date: Wed, 20 Jan 2010 18:23:13 +0000
|
||||
Subject: Disable i8042 checks on Intel Apple Macs
|
||||
|
||||
As those computers never had any i8042 controllers, and the
|
||||
@ -15,10 +15,10 @@ Signed-off-by: Bastien Nocera <hadess@hadess.net>
|
||||
1 files changed, 22 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
|
||||
index 6440a8f..4d7cf98 100644
|
||||
index b54aee7..5e1e59c 100644
|
||||
--- a/drivers/input/serio/i8042.c
|
||||
+++ b/drivers/input/serio/i8042.c
|
||||
@@ -1451,6 +1451,22 @@ static struct platform_driver i8042_driver = {
|
||||
@@ -1446,12 +1446,34 @@ static struct platform_driver i8042_driver = {
|
||||
.shutdown = i8042_shutdown,
|
||||
};
|
||||
|
||||
@ -40,8 +40,7 @@ index 6440a8f..4d7cf98 100644
|
||||
+
|
||||
static int __init i8042_init(void)
|
||||
{
|
||||
struct platform_device *pdev;
|
||||
@@ -1458,6 +1474,12 @@ static int __init i8042_init(void)
|
||||
int err;
|
||||
|
||||
dbg_init();
|
||||
|
||||
|
29
drm-1024x768-85.patch
Normal file
29
drm-1024x768-85.patch
Normal file
@ -0,0 +1,29 @@
|
||||
From 65a1d7cab62b4f514eaaf608b2f16e26a0e48042 Mon Sep 17 00:00:00 2001
|
||||
From: Adam Jackson <ajax@redhat.com>
|
||||
Date: Thu, 13 May 2010 14:55:28 -0400
|
||||
Subject: [PATCH] drm/edid: Fix 1024x768@85Hz
|
||||
|
||||
Having hsync both start and end on pixel 1072 ain't gonna work very
|
||||
well. Matches the X server's list.
|
||||
|
||||
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
||||
---
|
||||
drivers/gpu/drm/drm_edid.c | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
|
||||
index 18f41d7..10348d3 100644
|
||||
--- a/drivers/gpu/drm/drm_edid.c
|
||||
+++ b/drivers/gpu/drm/drm_edid.c
|
||||
@@ -335,7 +335,7 @@ static struct drm_display_mode drm_dmt_modes[] = {
|
||||
DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
|
||||
/* 1024x768@85Hz */
|
||||
{ DRM_MODE("1024x768", DRM_MODE_TYPE_DRIVER, 94500, 1024, 1072,
|
||||
- 1072, 1376, 0, 768, 769, 772, 808, 0,
|
||||
+ 1168, 1376, 0, 768, 769, 772, 808, 0,
|
||||
DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
|
||||
/* 1152x864@75Hz */
|
||||
{ DRM_MODE("1152x864", DRM_MODE_TYPE_DRIVER, 108000, 1152, 1216,
|
||||
--
|
||||
1.7.0.1
|
||||
|
65
drm-connection-cache.patch
Normal file
65
drm-connection-cache.patch
Normal file
@ -0,0 +1,65 @@
|
||||
diff -up linux-2.6.30.noarch/drivers/gpu/drm/drm_crtc_helper.c.jx linux-2.6.30.noarch/drivers/gpu/drm/drm_crtc_helper.c
|
||||
--- linux-2.6.30.noarch/drivers/gpu/drm/drm_crtc_helper.c.jx 2009-09-09 08:57:39.000000000 -0400
|
||||
+++ linux-2.6.30.noarch/drivers/gpu/drm/drm_crtc_helper.c 2009-09-09 09:35:24.000000000 -0400
|
||||
@@ -92,6 +92,18 @@ int drm_helper_probe_single_connector_mo
|
||||
|
||||
connector->status = connector->funcs->detect(connector);
|
||||
|
||||
+ /* fast path if the driver tracks disconnection */
|
||||
+ if (connector->status == connector_status_cached) {
|
||||
+ DRM_DEBUG_KMS("%s still connected\n",
|
||||
+ drm_get_connector_name(connector));
|
||||
+ list_for_each_entry_safe(mode, t, &connector->modes, head) {
|
||||
+ count++;
|
||||
+ mode->status = MODE_OK;
|
||||
+ }
|
||||
+ connector->status = connector_status_connected;
|
||||
+ return count;
|
||||
+ }
|
||||
+
|
||||
if (connector->status == connector_status_disconnected) {
|
||||
DRM_DEBUG_KMS("%s is disconnected\n",
|
||||
drm_get_connector_name(connector));
|
||||
diff -up linux-2.6.30.noarch/drivers/gpu/drm/i915/intel_lvds.c.jx linux-2.6.30.noarch/drivers/gpu/drm/i915/intel_lvds.c
|
||||
--- linux-2.6.30.noarch/drivers/gpu/drm/i915/intel_lvds.c.jx 2009-09-09 08:57:39.000000000 -0400
|
||||
+++ linux-2.6.30.noarch/drivers/gpu/drm/i915/intel_lvds.c 2009-09-09 09:56:18.000000000 -0400
|
||||
@@ -593,7 +593,14 @@ static void intel_lvds_mode_set(struct d
|
||||
*/
|
||||
static enum drm_connector_status intel_lvds_detect(struct drm_connector *connector)
|
||||
{
|
||||
- return connector_status_connected;
|
||||
+ static int done;
|
||||
+
|
||||
+ if (!done) {
|
||||
+ done = 1;
|
||||
+ return connector_status_connected;
|
||||
+ } else {
|
||||
+ return connector_status_cached;
|
||||
+ }
|
||||
}
|
||||
|
||||
/**
|
||||
diff -up linux-2.6.30.noarch/include/drm/drm_crtc.h.jx linux-2.6.30.noarch/include/drm/drm_crtc.h
|
||||
--- linux-2.6.30.noarch/include/drm/drm_crtc.h.jx 2009-09-09 08:57:39.000000000 -0400
|
||||
+++ linux-2.6.30.noarch/include/drm/drm_crtc.h 2009-09-09 09:35:24.000000000 -0400
|
||||
@@ -172,6 +172,7 @@ enum drm_connector_status {
|
||||
connector_status_connected = 1,
|
||||
connector_status_disconnected = 2,
|
||||
connector_status_unknown = 3,
|
||||
+ connector_status_cached = 4,
|
||||
};
|
||||
|
||||
enum subpixel_order {
|
||||
diff -up linux-2.6.30.x86_64/drivers/gpu/drm/drm_crtc.c.jx linux-2.6.30.x86_64/drivers/gpu/drm/drm_crtc.c
|
||||
--- linux-2.6.30.x86_64/drivers/gpu/drm/drm_crtc.c.jx 2009-09-09 10:10:44.000000000 -0400
|
||||
+++ linux-2.6.30.x86_64/drivers/gpu/drm/drm_crtc.c 2009-09-09 11:23:14.000000000 -0400
|
||||
@@ -185,7 +185,8 @@ EXPORT_SYMBOL(drm_get_connector_name);
|
||||
|
||||
char *drm_get_connector_status_name(enum drm_connector_status status)
|
||||
{
|
||||
- if (status == connector_status_connected)
|
||||
+ if (status == connector_status_connected ||
|
||||
+ status == connector_status_cached)
|
||||
return "connected";
|
||||
else if (status == connector_status_disconnected)
|
||||
return "disconnected";
|
3494
drm-core-next.patch
Normal file
3494
drm-core-next.patch
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,74 +0,0 @@
|
||||
From 0b91f360956aa7a5aa8900d358d1bff3020182e0 Mon Sep 17 00:00:00 2001
|
||||
From: Ben Skeggs <bskeggs@redhat.com>
|
||||
Date: Thu, 1 Jul 2010 12:34:56 +1000
|
||||
Subject: [PATCH 1/2] drm: disable encoder rather than dpms off in drm_crtc_prepare_encoders()
|
||||
|
||||
Original behaviour will be preserved for drivers that don't implement
|
||||
disable() hooks for an encoder.
|
||||
|
||||
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
|
||||
---
|
||||
drivers/gpu/drm/drm_crtc_helper.c | 22 ++++++++++++++--------
|
||||
1 files changed, 14 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
|
||||
index b142ac2..32dae0e 100644
|
||||
--- a/drivers/gpu/drm/drm_crtc_helper.c
|
||||
+++ b/drivers/gpu/drm/drm_crtc_helper.c
|
||||
@@ -201,6 +201,17 @@ bool drm_helper_crtc_in_use(struct drm_crtc *crtc)
|
||||
}
|
||||
EXPORT_SYMBOL(drm_helper_crtc_in_use);
|
||||
|
||||
+static void
|
||||
+drm_encoder_disable(struct drm_encoder *encoder)
|
||||
+{
|
||||
+ struct drm_encoder_helper_funcs *encoder_funcs = encoder->helper_private;
|
||||
+
|
||||
+ if (encoder_funcs->disable)
|
||||
+ (*encoder_funcs->disable)(encoder);
|
||||
+ else
|
||||
+ (*encoder_funcs->dpms)(encoder, DRM_MODE_DPMS_OFF);
|
||||
+}
|
||||
+
|
||||
/**
|
||||
* drm_helper_disable_unused_functions - disable unused objects
|
||||
* @dev: DRM device
|
||||
@@ -215,7 +226,6 @@ void drm_helper_disable_unused_functions(struct drm_device *dev)
|
||||
{
|
||||
struct drm_encoder *encoder;
|
||||
struct drm_connector *connector;
|
||||
- struct drm_encoder_helper_funcs *encoder_funcs;
|
||||
struct drm_crtc *crtc;
|
||||
|
||||
list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
|
||||
@@ -226,12 +236,8 @@ void drm_helper_disable_unused_functions(struct drm_device *dev)
|
||||
}
|
||||
|
||||
list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) {
|
||||
- encoder_funcs = encoder->helper_private;
|
||||
if (!drm_helper_encoder_in_use(encoder)) {
|
||||
- if (encoder_funcs->disable)
|
||||
- (*encoder_funcs->disable)(encoder);
|
||||
- else
|
||||
- (*encoder_funcs->dpms)(encoder, DRM_MODE_DPMS_OFF);
|
||||
+ drm_encoder_disable(encoder);
|
||||
/* disconnector encoder from any connector */
|
||||
encoder->crtc = NULL;
|
||||
}
|
||||
@@ -292,11 +298,11 @@ drm_crtc_prepare_encoders(struct drm_device *dev)
|
||||
encoder_funcs = encoder->helper_private;
|
||||
/* Disable unused encoders */
|
||||
if (encoder->crtc == NULL)
|
||||
- (*encoder_funcs->dpms)(encoder, DRM_MODE_DPMS_OFF);
|
||||
+ drm_encoder_disable(encoder);
|
||||
/* Disable encoders whose CRTC is about to change */
|
||||
if (encoder_funcs->get_crtc &&
|
||||
encoder->crtc != (*encoder_funcs->get_crtc)(encoder))
|
||||
- (*encoder_funcs->dpms)(encoder, DRM_MODE_DPMS_OFF);
|
||||
+ drm_encoder_disable(encoder);
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
1.7.1.1
|
||||
|
48
drm-i915-add-reclaimable-to-page-allocations.patch
Normal file
48
drm-i915-add-reclaimable-to-page-allocations.patch
Normal file
@ -0,0 +1,48 @@
|
||||
From: Linus Torvalds <torvalds@linux-foundation.org>
|
||||
Date: Sun, 18 Jul 2010 16:44:37 +0000 (-0700)
|
||||
Subject: drm/i915: add 'reclaimable' to i915 self-reclaimable page allocations
|
||||
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=cd9f040df6ce46573760a507cb88192d05d27d86
|
||||
|
||||
drm/i915: add 'reclaimable' to i915 self-reclaimable page allocations
|
||||
|
||||
The hibernate issues that got fixed in commit 985b823b9192 ("drm/i915:
|
||||
fix hibernation since i915 self-reclaim fixes") turn out to have been
|
||||
incomplete. Vefa Bicakci tested lots of hibernate cycles, and without
|
||||
the __GFP_RECLAIMABLE flag the system eventually fails to resume.
|
||||
|
||||
With the flag added, Vefa can apparently hibernate forever (or until he
|
||||
gets bored running his automated scripts, whichever comes first).
|
||||
|
||||
The reclaimable flag was there originally, and was one of the flags that
|
||||
were dropped (unintentionally) by commit 4bdadb978569 ("drm/i915:
|
||||
Selectively enable self-reclaim") that introduced all these problems,
|
||||
but I didn't want to just blindly add back all the flags in commit
|
||||
985b823b9192, and it looked like __GFP_RECLAIM wasn't necessary. It
|
||||
clearly was.
|
||||
|
||||
I still suspect that there is some subtle reason we're missing that
|
||||
causes the problems, but __GFP_RECLAIMABLE is certainly not wrong to use
|
||||
in this context, and is what the code historically used. And we have no
|
||||
idea what the causes the corruption without it.
|
||||
|
||||
Reported-and-tested-by: M. Vefa Bicakci <bicave@superonline.com>
|
||||
Cc: Dave Airlie <airlied@gmail.com>
|
||||
Cc: Chris Wilson <chris@chris-wilson.co.uk>
|
||||
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
|
||||
Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
|
||||
Cc: stable@kernel.org
|
||||
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
||||
---
|
||||
|
||||
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
|
||||
index 0743858..8757ecf 100644
|
||||
--- a/drivers/gpu/drm/i915/i915_gem.c
|
||||
+++ b/drivers/gpu/drm/i915/i915_gem.c
|
||||
@@ -2241,6 +2241,7 @@ i915_gem_object_get_pages(struct drm_gem_object *obj,
|
||||
page = read_cache_page_gfp(mapping, i,
|
||||
GFP_HIGHUSER |
|
||||
__GFP_COLD |
|
||||
+ __GFP_RECLAIMABLE |
|
||||
gfpmask);
|
||||
if (IS_ERR(page))
|
||||
goto err_pages;
|
@ -1,12 +1,34 @@
|
||||
diff -up linux-2.6.33.noarch/drivers/gpu/drm/i915/intel_dp.c.dave linux-2.6.33.noarch/drivers/gpu/drm/i915/intel_dp.c
|
||||
--- linux-2.6.33.noarch/drivers/gpu/drm/i915/intel_dp.c.dave 2010-06-25 16:30:13.000000000 +1000
|
||||
+++ linux-2.6.33.noarch/drivers/gpu/drm/i915/intel_dp.c 2010-06-25 16:30:23.000000000 +1000
|
||||
@@ -129,7 +129,7 @@ intel_dp_link_required(struct drm_device
|
||||
struct drm_i915_private *dev_priv = dev->dev_private;
|
||||
|
||||
if (IS_eDP(intel_encoder))
|
||||
- return (pixel_clock * dev_priv->edp_bpp) / 8;
|
||||
+ return (pixel_clock * ALIGN(dev_priv->edp_bpp, 8)) / 8;
|
||||
else
|
||||
return pixel_clock * 3;
|
||||
--- linux-2.6.33.noarch/drivers/gpu/drm/i915/intel_dp.c.dave 2010-06-28 09:50:36.000000000 +1000
|
||||
+++ linux-2.6.33.noarch/drivers/gpu/drm/i915/intel_dp.c 2010-06-28 09:53:24.000000000 +1000
|
||||
@@ -135,6 +135,12 @@ intel_dp_link_required(struct drm_device
|
||||
}
|
||||
|
||||
static int
|
||||
+intel_dp_max_data_rate(int max_link_clock, int max_lanes)
|
||||
+{
|
||||
+ return (max_link_clock * max_lanes * 8) / 10;
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
intel_dp_mode_valid(struct drm_connector *connector,
|
||||
struct drm_display_mode *mode)
|
||||
{
|
||||
@@ -144,7 +150,7 @@ intel_dp_mode_valid(struct drm_connector
|
||||
int max_lanes = intel_dp_max_lane_count(intel_encoder);
|
||||
|
||||
if (intel_dp_link_required(connector->dev, intel_encoder, mode->clock)
|
||||
- > max_link_clock * max_lanes)
|
||||
+ > intel_dp_max_data_rate(max_link_clock, max_lanes))
|
||||
return MODE_CLOCK_HIGH;
|
||||
|
||||
if (mode->clock < 10000)
|
||||
@@ -505,7 +511,7 @@ intel_dp_mode_fixup(struct drm_encoder *
|
||||
|
||||
for (lane_count = 1; lane_count <= max_lane_count; lane_count <<= 1) {
|
||||
for (clock = 0; clock <= max_clock; clock++) {
|
||||
- int link_avail = intel_dp_link_clock(bws[clock]) * lane_count;
|
||||
+ int link_avail = intel_dp_max_data_rate(intel_dp_link_clock(bws[clock]), lane_count);
|
||||
|
||||
if (intel_dp_link_required(encoder->dev, intel_encoder, mode->clock)
|
||||
<= link_avail) {
|
||||
|
36
drm-i915-fix-hibernate-memory-corruption.patch
Normal file
36
drm-i915-fix-hibernate-memory-corruption.patch
Normal file
@ -0,0 +1,36 @@
|
||||
From 0121d50088a9e04f3bbbee14043cd89164bdf4e6 Mon Sep 17 00:00:00 2001
|
||||
From: Linus Torvalds <torvalds@linux-foundation.org>
|
||||
Date: Fri, 2 Jul 2010 09:56:19 +1000
|
||||
Subject: [PATCH] drm/i915: fix hibernation since 4bdadb9785696439c6e2b3efe34aa76df1149c83
|
||||
|
||||
Since 4bdadb9785696439c6e2b3efe34aa76df1149c83, we've been passing
|
||||
GFP_MOVABLE where we weren't before caused hibernate on Intel hardware
|
||||
to results in a lot of memory corruptions on resume.
|
||||
|
||||
[airlied: linus please enhance commit msg if you commit this]
|
||||
|
||||
http://bugzilla.kernel.org/show_bug.cgi?id=13811
|
||||
|
||||
Reported-by: Evengi Golov (in bugzilla)
|
||||
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
||||
Tested-by: M. Vefa Bicakci <bicave@superonline.com>
|
||||
---
|
||||
drivers/gpu/drm/i915/i915_gem.c | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
|
||||
index 9ded3da..0743858 100644
|
||||
--- a/drivers/gpu/drm/i915/i915_gem.c
|
||||
+++ b/drivers/gpu/drm/i915/i915_gem.c
|
||||
@@ -2239,7 +2239,7 @@ i915_gem_object_get_pages(struct drm_gem_object *obj,
|
||||
mapping = inode->i_mapping;
|
||||
for (i = 0; i < page_count; i++) {
|
||||
page = read_cache_page_gfp(mapping, i,
|
||||
- mapping_gfp_mask (mapping) |
|
||||
+ GFP_HIGHUSER |
|
||||
__GFP_COLD |
|
||||
gfpmask);
|
||||
if (IS_ERR(page))
|
||||
--
|
||||
1.7.0.1
|
||||
|
43
drm-i915-fix-non-ironlake-965-class-crashes.patch
Normal file
43
drm-i915-fix-non-ironlake-965-class-crashes.patch
Normal file
@ -0,0 +1,43 @@
|
||||
From 1918ad77f7f908ed67cf37c505c6ad4ac52f1ecf Mon Sep 17 00:00:00 2001
|
||||
From: Jesse Barnes <jbarnes@virtuousgeek.org>
|
||||
Date: Fri, 23 Apr 2010 09:32:23 -0700
|
||||
Subject: drm/i915: fix non-Ironlake 965 class crashes
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
From: Jesse Barnes <jbarnes@virtuousgeek.org>
|
||||
|
||||
commit 1918ad77f7f908ed67cf37c505c6ad4ac52f1ecf upstream.
|
||||
|
||||
My PIPE_CONTROL fix (just sent via Eric's tree) was buggy; I was
|
||||
testing a whole set of patches together and missed a conversion to the
|
||||
new HAS_PIPE_CONTROL macro, which will cause breakage on non-Ironlake
|
||||
965 class chips. Fortunately, the fix is trivial and has been tested.
|
||||
|
||||
Be sure to use the HAS_PIPE_CONTROL macro in i915_get_gem_seqno, or
|
||||
we'll end up reading the wrong graphics memory, likely causing hangs,
|
||||
crashes, or worse.
|
||||
|
||||
Reported-by: Zdenek Kabelac <zdenek.kabelac@gmail.com>
|
||||
Reported-by: Toralf Förster <toralf.foerster@gmx.de>
|
||||
Tested-by: Toralf Förster <toralf.foerster@gmx.de>
|
||||
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
|
||||
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
||||
|
||||
---
|
||||
drivers/gpu/drm/i915/i915_gem.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/gpu/drm/i915/i915_gem.c
|
||||
+++ b/drivers/gpu/drm/i915/i915_gem.c
|
||||
@@ -1785,7 +1785,7 @@ i915_get_gem_seqno(struct drm_device *de
|
||||
{
|
||||
drm_i915_private_t *dev_priv = dev->dev_private;
|
||||
|
||||
- if (IS_I965G(dev))
|
||||
+ if (HAS_PIPE_CONTROL(dev))
|
||||
return ((volatile u32 *)(dev_priv->seqno_page))[0];
|
||||
else
|
||||
return READ_HWSP(dev_priv, I915_GEM_HWS_INDEX);
|
51
drm-i915-make-G4X-style-PLL-search-more-permissive.patch
Normal file
51
drm-i915-make-G4X-style-PLL-search-more-permissive.patch
Normal file
@ -0,0 +1,51 @@
|
||||
drm/i915: Make G4X-style PLL search more permissive
|
||||
|
||||
Fixes an Ironlake laptop with a 68.940MHz 1280x800 panel and 120MHz SSC
|
||||
reference clock.
|
||||
|
||||
More generally, the 0.488% tolerance used before is just too tight to
|
||||
reliably find a PLL setting. I extracted the search algorithm and
|
||||
modified it to find the dot clocks with maximum error over the valid
|
||||
range for the given output type:
|
||||
|
||||
http://people.freedesktop.org/~ajax/intel_g4x_find_best_pll.c
|
||||
|
||||
This gave:
|
||||
|
||||
Worst dotclock for Ironlake DAC refclk is 350000kHz (error 0.00571)
|
||||
Worst dotclock for Ironlake SL-LVDS refclk is 102321kHz (error 0.00524)
|
||||
Worst dotclock for Ironlake DL-LVDS refclk is 219642kHz (error 0.00488)
|
||||
Worst dotclock for Ironlake SL-LVDS SSC refclk is 84374kHz (error 0.00529)
|
||||
Worst dotclock for Ironlake DL-LVDS SSC refclk is 183035kHz (error 0.00488)
|
||||
Worst dotclock for G4X SDVO refclk is 50000kHz (error 0.17332)
|
||||
Worst dotclock for G4X HDMI refclk is 334400kHz (error 0.00478)
|
||||
Worst dotclock for G4X SL-LVDS refclk is 95571kHz (error 0.00449)
|
||||
Worst dotclock for G4X DL-LVDS refclk is 224000kHz (error 0.00510)
|
||||
|
||||
The SDVO number looks a bit suspicious, which I haven't tracked down
|
||||
yet. But it's clear that the old threshold is too tight.
|
||||
|
||||
Signed-off-by: Adam Jackson <ajax at redhat.com>
|
||||
[ RHBZ #572799 ]
|
||||
---
|
||||
drivers/gpu/drm/i915/intel_display.c | 4 ++--
|
||||
1 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
|
||||
index a8d65b7..4b17722 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_display.c
|
||||
+++ b/drivers/gpu/drm/i915/intel_display.c
|
||||
@@ -862,8 +862,8 @@ intel_g4x_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc,
|
||||
intel_clock_t clock;
|
||||
int max_n;
|
||||
bool found;
|
||||
- /* approximately equals target * 0.00488 */
|
||||
- int err_most = (target >> 8) + (target >> 10);
|
||||
+ /* approximately equals target * 0.00585 */
|
||||
+ int err_most = (target >> 8) + (target >> 9);
|
||||
found = false;
|
||||
|
||||
if (intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS)) {
|
||||
--
|
||||
1.7.1
|
||||
|
@ -0,0 +1,333 @@
|
||||
From e552eb7038a36d9b18860f525aa02875e313fe16 Mon Sep 17 00:00:00 2001
|
||||
From: Jesse Barnes <jbarnes@virtuousgeek.org>
|
||||
Date: Wed, 21 Apr 2010 11:39:23 -0700
|
||||
Subject: drm/i915: use PIPE_CONTROL instruction on Ironlake and Sandy Bridge
|
||||
|
||||
From: Jesse Barnes <jbarnes@virtuousgeek.org>
|
||||
|
||||
commit e552eb7038a36d9b18860f525aa02875e313fe16 upstream.
|
||||
|
||||
Since 965, the hardware has supported the PIPE_CONTROL command, which
|
||||
provides fine grained GPU cache flushing control. On recent chipsets,
|
||||
this instruction is required for reliable interrupt and sequence number
|
||||
reporting in the driver.
|
||||
|
||||
So add support for this instruction, including workarounds, on Ironlake
|
||||
and Sandy Bridge hardware.
|
||||
|
||||
https://bugs.freedesktop.org/show_bug.cgi?id=27108
|
||||
|
||||
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
|
||||
Tested-by: Chris Wilson <chris@chris-wilson.co.uk>
|
||||
Signed-off-by: Eric Anholt <eric@anholt.net>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
||||
|
||||
---
|
||||
drivers/gpu/drm/i915/i915_drv.h | 4 +
|
||||
drivers/gpu/drm/i915/i915_gem.c | 145 ++++++++++++++++++++++++++++++++++++----
|
||||
drivers/gpu/drm/i915/i915_irq.c | 8 +-
|
||||
drivers/gpu/drm/i915/i915_reg.h | 11 +++
|
||||
4 files changed, 152 insertions(+), 16 deletions(-)
|
||||
|
||||
--- a/drivers/gpu/drm/i915/i915_drv.h
|
||||
+++ b/drivers/gpu/drm/i915/i915_drv.h
|
||||
@@ -206,11 +206,14 @@ typedef struct drm_i915_private {
|
||||
|
||||
drm_dma_handle_t *status_page_dmah;
|
||||
void *hw_status_page;
|
||||
+ void *seqno_page;
|
||||
dma_addr_t dma_status_page;
|
||||
uint32_t counter;
|
||||
unsigned int status_gfx_addr;
|
||||
+ unsigned int seqno_gfx_addr;
|
||||
drm_local_map_t hws_map;
|
||||
struct drm_gem_object *hws_obj;
|
||||
+ struct drm_gem_object *seqno_obj;
|
||||
struct drm_gem_object *pwrctx;
|
||||
|
||||
struct resource mch_res;
|
||||
@@ -1090,6 +1093,7 @@ extern int i915_wait_ring(struct drm_dev
|
||||
|
||||
#define INTEL_PCH_TYPE(dev) (((struct drm_i915_private *)(dev)->dev_private)->pch_type)
|
||||
#define HAS_PCH_CPT(dev) (INTEL_PCH_TYPE(dev) == PCH_CPT)
|
||||
+#define HAS_PIPE_CONTROL(dev) (IS_IRONLAKE(dev) || IS_GEN6(dev))
|
||||
|
||||
#define PRIMARY_RINGBUFFER_SIZE (128*1024)
|
||||
|
||||
--- a/drivers/gpu/drm/i915/i915_gem.c
|
||||
+++ b/drivers/gpu/drm/i915/i915_gem.c
|
||||
@@ -1559,6 +1559,13 @@ i915_gem_object_move_to_inactive(struct
|
||||
i915_verify_inactive(dev, __FILE__, __LINE__);
|
||||
}
|
||||
|
||||
+#define PIPE_CONTROL_FLUSH(addr) \
|
||||
+ OUT_RING(GFX_OP_PIPE_CONTROL | PIPE_CONTROL_QW_WRITE | \
|
||||
+ PIPE_CONTROL_DEPTH_STALL); \
|
||||
+ OUT_RING(addr | PIPE_CONTROL_GLOBAL_GTT); \
|
||||
+ OUT_RING(0); \
|
||||
+ OUT_RING(0); \
|
||||
+
|
||||
/**
|
||||
* Creates a new sequence number, emitting a write of it to the status page
|
||||
* plus an interrupt, which will trigger i915_user_interrupt_handler.
|
||||
@@ -1593,13 +1600,47 @@ i915_add_request(struct drm_device *dev,
|
||||
if (dev_priv->mm.next_gem_seqno == 0)
|
||||
dev_priv->mm.next_gem_seqno++;
|
||||
|
||||
- BEGIN_LP_RING(4);
|
||||
- OUT_RING(MI_STORE_DWORD_INDEX);
|
||||
- OUT_RING(I915_GEM_HWS_INDEX << MI_STORE_DWORD_INDEX_SHIFT);
|
||||
- OUT_RING(seqno);
|
||||
+ if (HAS_PIPE_CONTROL(dev)) {
|
||||
+ u32 scratch_addr = dev_priv->seqno_gfx_addr + 128;
|
||||
|
||||
- OUT_RING(MI_USER_INTERRUPT);
|
||||
- ADVANCE_LP_RING();
|
||||
+ /*
|
||||
+ * Workaround qword write incoherence by flushing the
|
||||
+ * PIPE_NOTIFY buffers out to memory before requesting
|
||||
+ * an interrupt.
|
||||
+ */
|
||||
+ BEGIN_LP_RING(32);
|
||||
+ OUT_RING(GFX_OP_PIPE_CONTROL | PIPE_CONTROL_QW_WRITE |
|
||||
+ PIPE_CONTROL_WC_FLUSH | PIPE_CONTROL_TC_FLUSH);
|
||||
+ OUT_RING(dev_priv->seqno_gfx_addr | PIPE_CONTROL_GLOBAL_GTT);
|
||||
+ OUT_RING(seqno);
|
||||
+ OUT_RING(0);
|
||||
+ PIPE_CONTROL_FLUSH(scratch_addr);
|
||||
+ scratch_addr += 128; /* write to separate cachelines */
|
||||
+ PIPE_CONTROL_FLUSH(scratch_addr);
|
||||
+ scratch_addr += 128;
|
||||
+ PIPE_CONTROL_FLUSH(scratch_addr);
|
||||
+ scratch_addr += 128;
|
||||
+ PIPE_CONTROL_FLUSH(scratch_addr);
|
||||
+ scratch_addr += 128;
|
||||
+ PIPE_CONTROL_FLUSH(scratch_addr);
|
||||
+ scratch_addr += 128;
|
||||
+ PIPE_CONTROL_FLUSH(scratch_addr);
|
||||
+ OUT_RING(GFX_OP_PIPE_CONTROL | PIPE_CONTROL_QW_WRITE |
|
||||
+ PIPE_CONTROL_WC_FLUSH | PIPE_CONTROL_TC_FLUSH |
|
||||
+ PIPE_CONTROL_NOTIFY);
|
||||
+ OUT_RING(dev_priv->seqno_gfx_addr | PIPE_CONTROL_GLOBAL_GTT);
|
||||
+ OUT_RING(seqno);
|
||||
+ OUT_RING(0);
|
||||
+ ADVANCE_LP_RING();
|
||||
+ } else {
|
||||
+ BEGIN_LP_RING(4);
|
||||
+ OUT_RING(MI_STORE_DWORD_INDEX);
|
||||
+ OUT_RING(I915_GEM_HWS_INDEX << MI_STORE_DWORD_INDEX_SHIFT);
|
||||
+ OUT_RING(seqno);
|
||||
+
|
||||
+ OUT_RING(MI_USER_INTERRUPT);
|
||||
+ ADVANCE_LP_RING();
|
||||
+ }
|
||||
|
||||
DRM_DEBUG_DRIVER("%d\n", seqno);
|
||||
|
||||
@@ -1744,7 +1785,10 @@ i915_get_gem_seqno(struct drm_device *de
|
||||
{
|
||||
drm_i915_private_t *dev_priv = dev->dev_private;
|
||||
|
||||
- return READ_HWSP(dev_priv, I915_GEM_HWS_INDEX);
|
||||
+ if (IS_I965G(dev))
|
||||
+ return ((volatile u32 *)(dev_priv->seqno_page))[0];
|
||||
+ else
|
||||
+ return READ_HWSP(dev_priv, I915_GEM_HWS_INDEX);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4576,6 +4620,49 @@ i915_gem_idle(struct drm_device *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
+/*
|
||||
+ * 965+ support PIPE_CONTROL commands, which provide finer grained control
|
||||
+ * over cache flushing.
|
||||
+ */
|
||||
+static int
|
||||
+i915_gem_init_pipe_control(struct drm_device *dev)
|
||||
+{
|
||||
+ drm_i915_private_t *dev_priv = dev->dev_private;
|
||||
+ struct drm_gem_object *obj;
|
||||
+ struct drm_i915_gem_object *obj_priv;
|
||||
+ int ret;
|
||||
+
|
||||
+ obj = drm_gem_object_alloc(dev, 4096);
|
||||
+ if (obj == NULL) {
|
||||
+ DRM_ERROR("Failed to allocate seqno page\n");
|
||||
+ ret = -ENOMEM;
|
||||
+ goto err;
|
||||
+ }
|
||||
+ obj_priv = obj->driver_private;
|
||||
+ obj_priv->agp_type = AGP_USER_CACHED_MEMORY;
|
||||
+
|
||||
+ ret = i915_gem_object_pin(obj, 4096);
|
||||
+ if (ret)
|
||||
+ goto err_unref;
|
||||
+
|
||||
+ dev_priv->seqno_gfx_addr = obj_priv->gtt_offset;
|
||||
+ dev_priv->seqno_page = kmap(obj_priv->pages[0]);
|
||||
+ if (dev_priv->seqno_page == NULL)
|
||||
+ goto err_unpin;
|
||||
+
|
||||
+ dev_priv->seqno_obj = obj;
|
||||
+ memset(dev_priv->seqno_page, 0, PAGE_SIZE);
|
||||
+
|
||||
+ return 0;
|
||||
+
|
||||
+err_unpin:
|
||||
+ i915_gem_object_unpin(obj);
|
||||
+err_unref:
|
||||
+ drm_gem_object_unreference(obj);
|
||||
+err:
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
static int
|
||||
i915_gem_init_hws(struct drm_device *dev)
|
||||
{
|
||||
@@ -4593,7 +4680,8 @@ i915_gem_init_hws(struct drm_device *dev
|
||||
obj = drm_gem_object_alloc(dev, 4096);
|
||||
if (obj == NULL) {
|
||||
DRM_ERROR("Failed to allocate status page\n");
|
||||
- return -ENOMEM;
|
||||
+ ret = -ENOMEM;
|
||||
+ goto err;
|
||||
}
|
||||
obj_priv = to_intel_bo(obj);
|
||||
obj_priv->agp_type = AGP_USER_CACHED_MEMORY;
|
||||
@@ -4601,7 +4689,7 @@ i915_gem_init_hws(struct drm_device *dev
|
||||
ret = i915_gem_object_pin(obj, 4096);
|
||||
if (ret != 0) {
|
||||
drm_gem_object_unreference(obj);
|
||||
- return ret;
|
||||
+ goto err_unref;
|
||||
}
|
||||
|
||||
dev_priv->status_gfx_addr = obj_priv->gtt_offset;
|
||||
@@ -4610,10 +4698,16 @@ i915_gem_init_hws(struct drm_device *dev
|
||||
if (dev_priv->hw_status_page == NULL) {
|
||||
DRM_ERROR("Failed to map status page.\n");
|
||||
memset(&dev_priv->hws_map, 0, sizeof(dev_priv->hws_map));
|
||||
- i915_gem_object_unpin(obj);
|
||||
- drm_gem_object_unreference(obj);
|
||||
- return -EINVAL;
|
||||
+ ret = -EINVAL;
|
||||
+ goto err_unpin;
|
||||
}
|
||||
+
|
||||
+ if (HAS_PIPE_CONTROL(dev)) {
|
||||
+ ret = i915_gem_init_pipe_control(dev);
|
||||
+ if (ret)
|
||||
+ goto err_unpin;
|
||||
+ }
|
||||
+
|
||||
dev_priv->hws_obj = obj;
|
||||
memset(dev_priv->hw_status_page, 0, PAGE_SIZE);
|
||||
I915_WRITE(HWS_PGA, dev_priv->status_gfx_addr);
|
||||
@@ -4621,6 +4715,30 @@ i915_gem_init_hws(struct drm_device *dev
|
||||
DRM_DEBUG_DRIVER("hws offset: 0x%08x\n", dev_priv->status_gfx_addr);
|
||||
|
||||
return 0;
|
||||
+
|
||||
+err_unpin:
|
||||
+ i915_gem_object_unpin(obj);
|
||||
+err_unref:
|
||||
+ drm_gem_object_unreference(obj);
|
||||
+err:
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+i915_gem_cleanup_pipe_control(struct drm_device *dev)
|
||||
+{
|
||||
+ drm_i915_private_t *dev_priv = dev->dev_private;
|
||||
+ struct drm_gem_object *obj;
|
||||
+ struct drm_i915_gem_object *obj_priv;
|
||||
+
|
||||
+ obj = dev_priv->seqno_obj;
|
||||
+ obj_priv = obj->driver_private;
|
||||
+ kunmap(obj_priv->pages[0]);
|
||||
+ i915_gem_object_unpin(obj);
|
||||
+ drm_gem_object_unreference(obj);
|
||||
+ dev_priv->seqno_obj = NULL;
|
||||
+
|
||||
+ dev_priv->seqno_page = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -4644,6 +4762,9 @@ i915_gem_cleanup_hws(struct drm_device *
|
||||
memset(&dev_priv->hws_map, 0, sizeof(dev_priv->hws_map));
|
||||
dev_priv->hw_status_page = NULL;
|
||||
|
||||
+ if (HAS_PIPE_CONTROL(dev))
|
||||
+ i915_gem_cleanup_pipe_control(dev);
|
||||
+
|
||||
/* Write high address into HWS_PGA when disabling. */
|
||||
I915_WRITE(HWS_PGA, 0x1ffff000);
|
||||
}
|
||||
--- a/drivers/gpu/drm/i915/i915_irq.c
|
||||
+++ b/drivers/gpu/drm/i915/i915_irq.c
|
||||
@@ -297,7 +297,7 @@ irqreturn_t ironlake_irq_handler(struct
|
||||
READ_BREADCRUMB(dev_priv);
|
||||
}
|
||||
|
||||
- if (gt_iir & GT_USER_INTERRUPT) {
|
||||
+ if (gt_iir & GT_PIPE_NOTIFY) {
|
||||
u32 seqno = i915_get_gem_seqno(dev);
|
||||
dev_priv->mm.irq_gem_seqno = seqno;
|
||||
trace_i915_gem_request_complete(dev, seqno);
|
||||
@@ -738,7 +738,7 @@ void i915_user_irq_get(struct drm_device
|
||||
spin_lock_irqsave(&dev_priv->user_irq_lock, irqflags);
|
||||
if (dev->irq_enabled && (++dev_priv->user_irq_refcount == 1)) {
|
||||
if (HAS_PCH_SPLIT(dev))
|
||||
- ironlake_enable_graphics_irq(dev_priv, GT_USER_INTERRUPT);
|
||||
+ ironlake_enable_graphics_irq(dev_priv, GT_PIPE_NOTIFY);
|
||||
else
|
||||
i915_enable_irq(dev_priv, I915_USER_INTERRUPT);
|
||||
}
|
||||
@@ -754,7 +754,7 @@ void i915_user_irq_put(struct drm_device
|
||||
BUG_ON(dev->irq_enabled && dev_priv->user_irq_refcount <= 0);
|
||||
if (dev->irq_enabled && (--dev_priv->user_irq_refcount == 0)) {
|
||||
if (HAS_PCH_SPLIT(dev))
|
||||
- ironlake_disable_graphics_irq(dev_priv, GT_USER_INTERRUPT);
|
||||
+ ironlake_disable_graphics_irq(dev_priv, GT_PIPE_NOTIFY);
|
||||
else
|
||||
i915_disable_irq(dev_priv, I915_USER_INTERRUPT);
|
||||
}
|
||||
@@ -1034,7 +1034,7 @@ static int ironlake_irq_postinstall(stru
|
||||
/* enable kind of interrupts always enabled */
|
||||
u32 display_mask = DE_MASTER_IRQ_CONTROL | DE_GSE | DE_PCH_EVENT |
|
||||
DE_PLANEA_FLIP_DONE | DE_PLANEB_FLIP_DONE;
|
||||
- u32 render_mask = GT_USER_INTERRUPT;
|
||||
+ u32 render_mask = GT_PIPE_NOTIFY;
|
||||
u32 hotplug_mask = SDE_CRT_HOTPLUG | SDE_PORTB_HOTPLUG |
|
||||
SDE_PORTC_HOTPLUG | SDE_PORTD_HOTPLUG;
|
||||
|
||||
--- a/drivers/gpu/drm/i915/i915_reg.h
|
||||
+++ b/drivers/gpu/drm/i915/i915_reg.h
|
||||
@@ -210,6 +210,16 @@
|
||||
#define ASYNC_FLIP (1<<22)
|
||||
#define DISPLAY_PLANE_A (0<<20)
|
||||
#define DISPLAY_PLANE_B (1<<20)
|
||||
+#define GFX_OP_PIPE_CONTROL ((0x3<<29)|(0x3<<27)|(0x2<<24)|2)
|
||||
+#define PIPE_CONTROL_QW_WRITE (1<<14)
|
||||
+#define PIPE_CONTROL_DEPTH_STALL (1<<13)
|
||||
+#define PIPE_CONTROL_WC_FLUSH (1<<12)
|
||||
+#define PIPE_CONTROL_IS_FLUSH (1<<11) /* MBZ on Ironlake */
|
||||
+#define PIPE_CONTROL_TC_FLUSH (1<<10) /* GM45+ only */
|
||||
+#define PIPE_CONTROL_ISP_DIS (1<<9)
|
||||
+#define PIPE_CONTROL_NOTIFY (1<<8)
|
||||
+#define PIPE_CONTROL_GLOBAL_GTT (1<<2) /* in addr dword */
|
||||
+#define PIPE_CONTROL_STALL_EN (1<<1) /* in addr word, Ironlake+ only */
|
||||
|
||||
/*
|
||||
* Fence registers
|
||||
@@ -2111,6 +2121,7 @@
|
||||
#define DEIER 0x4400c
|
||||
|
||||
/* GT interrupt */
|
||||
+#define GT_PIPE_NOTIFY (1 << 4)
|
||||
#define GT_SYNC_STATUS (1 << 2)
|
||||
#define GT_USER_INTERRUPT (1 << 0)
|
||||
|
99
drm-intel-945gm-stability-fixes.patch
Normal file
99
drm-intel-945gm-stability-fixes.patch
Normal file
@ -0,0 +1,99 @@
|
||||
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
|
||||
index 0d05c6f..b87f65d 100644
|
||||
--- a/drivers/gpu/drm/i915/i915_gem.c
|
||||
+++ b/drivers/gpu/drm/i915/i915_gem.c
|
||||
@@ -4967,6 +4967,16 @@ i915_gem_load(struct drm_device *dev)
|
||||
list_add(&dev_priv->mm.shrink_list, &shrink_list);
|
||||
spin_unlock(&shrink_list_lock);
|
||||
|
||||
+ /* On GEN3 we really need to make sure the ARB C3 LP bit is set */
|
||||
+ if (IS_GEN3(dev)) {
|
||||
+ u32 tmp = I915_READ(MI_ARB_STATE);
|
||||
+ if (!(tmp & MI_ARB_C3_LP_WRITE_ENABLE)) {
|
||||
+ /* arb state is a masked write, so set bit + bit in mask */
|
||||
+ tmp = MI_ARB_C3_LP_WRITE_ENABLE | (MI_ARB_C3_LP_WRITE_ENABLE << MI_ARB_MASK_SHIFT);
|
||||
+ I915_WRITE(MI_ARB_STATE, tmp);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
/* Old X drivers will take 0-2 for front, back, depth buffers */
|
||||
if (!drm_core_check_feature(dev, DRIVER_MODESET))
|
||||
dev_priv->fence_reg_start = 3;
|
||||
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
|
||||
index 4cbc521..4543975 100644
|
||||
--- a/drivers/gpu/drm/i915/i915_reg.h
|
||||
+++ b/drivers/gpu/drm/i915/i915_reg.h
|
||||
@@ -357,6 +357,70 @@
|
||||
#define LM_BURST_LENGTH 0x00000700
|
||||
#define LM_FIFO_WATERMARK 0x0000001F
|
||||
#define MI_ARB_STATE 0x020e4 /* 915+ only */
|
||||
+#define MI_ARB_MASK_SHIFT 16 /* shift for enable bits */
|
||||
+
|
||||
+/* Make render/texture TLB fetches lower priorty than associated data
|
||||
+ * fetches. This is not turned on by default
|
||||
+ */
|
||||
+#define MI_ARB_RENDER_TLB_LOW_PRIORITY (1 << 15)
|
||||
+
|
||||
+/* Isoch request wait on GTT enable (Display A/B/C streams).
|
||||
+ * Make isoch requests stall on the TLB update. May cause
|
||||
+ * display underruns (test mode only)
|
||||
+ */
|
||||
+#define MI_ARB_ISOCH_WAIT_GTT (1 << 14)
|
||||
+
|
||||
+/* Block grant count for isoch requests when block count is
|
||||
+ * set to a finite value.
|
||||
+ */
|
||||
+#define MI_ARB_BLOCK_GRANT_MASK (3 << 12)
|
||||
+#define MI_ARB_BLOCK_GRANT_8 (0 << 12) /* for 3 display planes */
|
||||
+#define MI_ARB_BLOCK_GRANT_4 (1 << 12) /* for 2 display planes */
|
||||
+#define MI_ARB_BLOCK_GRANT_2 (2 << 12) /* for 1 display plane */
|
||||
+#define MI_ARB_BLOCK_GRANT_0 (3 << 12) /* don't use */
|
||||
+
|
||||
+/* Enable render writes to complete in C2/C3/C4 power states.
|
||||
+ * If this isn't enabled, render writes are prevented in low
|
||||
+ * power states. That seems bad to me.
|
||||
+ */
|
||||
+#define MI_ARB_C3_LP_WRITE_ENABLE (1 << 11)
|
||||
+
|
||||
+/* This acknowledges an async flip immediately instead
|
||||
+ * of waiting for 2TLB fetches.
|
||||
+ */
|
||||
+#define MI_ARB_ASYNC_FLIP_ACK_IMMEDIATE (1 << 10)
|
||||
+
|
||||
+/* Enables non-sequential data reads through arbiter
|
||||
+ */
|
||||
+#define MI_ARB_DUAL_DATA_PHASE_DISABLE (1 << 9)
|
||||
+
|
||||
+/* Disable FSB snooping of cacheable write cycles from binner/render
|
||||
+ * command stream
|
||||
+ */
|
||||
+#define MI_ARB_CACHE_SNOOP_DISABLE (1 << 8)
|
||||
+
|
||||
+/* Arbiter time slice for non-isoch streams */
|
||||
+#define MI_ARB_TIME_SLICE_MASK (7 << 5)
|
||||
+#define MI_ARB_TIME_SLICE_1 (0 << 5)
|
||||
+#define MI_ARB_TIME_SLICE_2 (1 << 5)
|
||||
+#define MI_ARB_TIME_SLICE_4 (2 << 5)
|
||||
+#define MI_ARB_TIME_SLICE_6 (3 << 5)
|
||||
+#define MI_ARB_TIME_SLICE_8 (4 << 5)
|
||||
+#define MI_ARB_TIME_SLICE_10 (5 << 5)
|
||||
+#define MI_ARB_TIME_SLICE_14 (6 << 5)
|
||||
+#define MI_ARB_TIME_SLICE_16 (7 << 5)
|
||||
+
|
||||
+/* Low priority grace period page size */
|
||||
+#define MI_ARB_LOW_PRIORITY_GRACE_4KB (0 << 4) /* default */
|
||||
+#define MI_ARB_LOW_PRIORITY_GRACE_8KB (1 << 4)
|
||||
+
|
||||
+/* Disable display A/B trickle feed */
|
||||
+#define MI_ARB_DISPLAY_TRICKLE_FEED_DISABLE (1 << 2)
|
||||
+
|
||||
+/* Set display plane priority */
|
||||
+#define MI_ARB_DISPLAY_PRIORITY_A_B (0 << 0) /* display A > display B */
|
||||
+#define MI_ARB_DISPLAY_PRIORITY_B_A (1 << 0) /* display B > display A */
|
||||
+
|
||||
#define CACHE_MODE_0 0x02120 /* 915+ only */
|
||||
#define CM0_MASK_SHIFT 16
|
||||
#define CM0_IZ_OPT_DISABLE (1<<6)
|
||||
--
|
||||
1.7.1
|
||||
|
57
drm-intel-gen5-dither.patch
Normal file
57
drm-intel-gen5-dither.patch
Normal file
@ -0,0 +1,57 @@
|
||||
From b44ee8a479c3adb22b818b8b6aff29c6a08c1cb1 Mon Sep 17 00:00:00 2001
|
||||
From: Adam Jackson <ajax@redhat.com>
|
||||
Date: Mon, 19 Apr 2010 15:52:32 -0400
|
||||
Subject: [PATCH] drm/i915: Use spatio-temporal dithering on PCH
|
||||
|
||||
Spatial dither is better than nothing, but ST is even better.
|
||||
|
||||
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
||||
---
|
||||
drivers/gpu/drm/i915/i915_reg.h | 5 ++++-
|
||||
drivers/gpu/drm/i915/intel_display.c | 10 ++++++----
|
||||
2 files changed, 10 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
|
||||
index 527d30a..0bbbb77 100644
|
||||
--- a/drivers/gpu/drm/i915/i915_reg.h
|
||||
+++ b/drivers/gpu/drm/i915/i915_reg.h
|
||||
@@ -1922,7 +1922,10 @@
|
||||
/* Display & cursor control */
|
||||
|
||||
/* dithering flag on Ironlake */
|
||||
-#define PIPE_ENABLE_DITHER (1 << 4)
|
||||
+#define PIPE_ENABLE_DITHER (1 << 4)
|
||||
+#define PIPE_DITHER_TYPE_MASK (3 << 2)
|
||||
+#define PIPE_DITHER_TYPE_SPATIAL (0 << 2)
|
||||
+#define PIPE_DITHER_TYPE_ST01 (1 << 2)
|
||||
/* Pipe A */
|
||||
#define PIPEADSL 0x70000
|
||||
#define PIPEACONF 0x70008
|
||||
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
|
||||
index 58668c4..36ead0e 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_display.c
|
||||
+++ b/drivers/gpu/drm/i915/intel_display.c
|
||||
@@ -3676,14 +3676,16 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
|
||||
/* set the dithering flag */
|
||||
if (IS_I965G(dev)) {
|
||||
if (dev_priv->lvds_dither) {
|
||||
- if (HAS_PCH_SPLIT(dev))
|
||||
+ if (HAS_PCH_SPLIT(dev)) {
|
||||
pipeconf |= PIPE_ENABLE_DITHER;
|
||||
- else
|
||||
+ pipeconf |= PIPE_DITHER_TYPE_ST01;
|
||||
+ } else
|
||||
lvds |= LVDS_ENABLE_DITHER;
|
||||
} else {
|
||||
- if (HAS_PCH_SPLIT(dev))
|
||||
+ if (HAS_PCH_SPLIT(dev)) {
|
||||
pipeconf &= ~PIPE_ENABLE_DITHER;
|
||||
- else
|
||||
+ pipeconf &= ~PIPE_DITHER_TYPE_MASK;
|
||||
+ } else
|
||||
lvds &= ~LVDS_ENABLE_DITHER;
|
||||
}
|
||||
}
|
||||
--
|
||||
1.7.0.1
|
||||
|
@ -1,19 +1,19 @@
|
||||
diff -up linux-2.6.33.noarch/drivers/gpu/drm/i915/intel_display.c.orig linux-2.6.33.noarch/drivers/gpu/drm/i915/intel_display.c
|
||||
--- linux-2.6.33.noarch/drivers/gpu/drm/i915/intel_display.c.orig 2010-03-31 16:59:39.901995671 -0400
|
||||
+++ linux-2.6.33.noarch/drivers/gpu/drm/i915/intel_display.c 2010-03-31 17:01:05.416996744 -0400
|
||||
@@ -3757,7 +3757,6 @@ struct drm_crtc *intel_get_load_detect_p
|
||||
void intel_release_load_detect_pipe(struct intel_encoder *intel_encoder, int dpms_mode)
|
||||
diff -up linux-2.6.33.noarch/drivers/gpu/drm/i915/intel_display.c.jx linux-2.6.33.noarch/drivers/gpu/drm/i915/intel_display.c
|
||||
--- linux-2.6.33.noarch/drivers/gpu/drm/i915/intel_display.c.jx 2010-04-19 17:13:31.000000000 -0400
|
||||
+++ linux-2.6.33.noarch/drivers/gpu/drm/i915/intel_display.c 2010-04-19 17:13:59.753994103 -0400
|
||||
@@ -4141,7 +4141,6 @@ void intel_release_load_detect_pipe(stru
|
||||
struct drm_connector *connector, int dpms_mode)
|
||||
{
|
||||
struct drm_encoder *encoder = &intel_encoder->enc;
|
||||
- struct drm_device *dev = encoder->dev;
|
||||
struct drm_crtc *crtc = encoder->crtc;
|
||||
struct drm_encoder_helper_funcs *encoder_funcs = encoder->helper_private;
|
||||
struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private;
|
||||
@@ -3767,7 +3766,6 @@ void intel_release_load_detect_pipe(stru
|
||||
intel_encoder->base.encoder = NULL;
|
||||
@@ -4151,7 +4150,6 @@ void intel_release_load_detect_pipe(stru
|
||||
connector->encoder = NULL;
|
||||
intel_encoder->load_detect_temp = false;
|
||||
crtc->enabled = drm_helper_crtc_in_use(crtc);
|
||||
- drm_helper_disable_unused_functions(dev);
|
||||
}
|
||||
|
||||
/* Switch crtc and output back off if necessary */
|
||||
/* Switch crtc and encoder back off if necessary */
|
||||
|
13625
drm-intel-next.patch
13625
drm-intel-next.patch
File diff suppressed because it is too large
Load Diff
107
drm-intel-sdvo-fix-2.patch
Normal file
107
drm-intel-sdvo-fix-2.patch
Normal file
@ -0,0 +1,107 @@
|
||||
From 4fd1c5ed73fc02d8bcabcb3a457c4c4efaef2099 Mon Sep 17 00:00:00 2001
|
||||
From: Adam Jackson <ajax@redhat.com>
|
||||
Date: Thu, 29 Apr 2010 14:05:18 -0400
|
||||
Subject: [PATCH] drm/i915: Be extra careful about A/D matching for multifunction SDVO
|
||||
|
||||
If we're both RGB and TMDS capable, we'll have set up one connector for
|
||||
each. When determining connectivity, require analog/digital state in
|
||||
the EDID block to match analog/digital support in the connector.
|
||||
Otherwise, both DVI and VGA will appear to be connected.
|
||||
|
||||
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
||||
---
|
||||
drivers/gpu/drm/i915/intel_sdvo.c | 45 +++++++++++++++++-------------------
|
||||
1 files changed, 21 insertions(+), 24 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
|
||||
index f55c0d7..31ce975 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_sdvo.c
|
||||
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
|
||||
@@ -1503,16 +1503,17 @@ intel_analog_is_connected(struct drm_device *dev)
|
||||
}
|
||||
|
||||
enum drm_connector_status
|
||||
-intel_sdvo_hdmi_sink_detect(struct drm_connector *connector, u16 response)
|
||||
+intel_sdvo_hdmi_sink_detect(struct drm_connector *connector)
|
||||
{
|
||||
struct drm_encoder *encoder = intel_attached_encoder(connector);
|
||||
struct intel_encoder *intel_encoder = enc_to_intel_encoder(encoder);
|
||||
struct intel_sdvo_priv *sdvo_priv = intel_encoder->dev_priv;
|
||||
+ struct intel_connector *intel_connector = to_intel_connector(connector);
|
||||
+ struct intel_sdvo_connector *sdvo_connector = intel_connector->dev_priv;
|
||||
enum drm_connector_status status = connector_status_connected;
|
||||
struct edid *edid = NULL;
|
||||
|
||||
- edid = drm_get_edid(connector,
|
||||
- intel_encoder->ddc_bus);
|
||||
+ edid = drm_get_edid(connector, intel_encoder->ddc_bus);
|
||||
|
||||
/* This is only applied to SDVO cards with multiple outputs */
|
||||
if (edid == NULL && intel_sdvo_multifunc_encoder(intel_encoder)) {
|
||||
@@ -1525,8 +1526,7 @@ intel_sdvo_hdmi_sink_detect(struct drm_connector *connector, u16 response)
|
||||
*/
|
||||
while(temp_ddc > 1) {
|
||||
sdvo_priv->ddc_bus = temp_ddc;
|
||||
- edid = drm_get_edid(connector,
|
||||
- intel_encoder->ddc_bus);
|
||||
+ edid = drm_get_edid(connector, intel_encoder->ddc_bus);
|
||||
if (edid) {
|
||||
/*
|
||||
* When we can get the EDID, maybe it is the
|
||||
@@ -1543,28 +1543,25 @@ intel_sdvo_hdmi_sink_detect(struct drm_connector *connector, u16 response)
|
||||
/* when there is no edid and no monitor is connected with VGA
|
||||
* port, try to use the CRT ddc to read the EDID for DVI-connector
|
||||
*/
|
||||
- if (edid == NULL &&
|
||||
- sdvo_priv->analog_ddc_bus &&
|
||||
+ if (edid == NULL && sdvo_priv->analog_ddc_bus &&
|
||||
!intel_analog_is_connected(connector->dev))
|
||||
- edid = drm_get_edid(connector,
|
||||
- sdvo_priv->analog_ddc_bus);
|
||||
+ edid = drm_get_edid(connector, sdvo_priv->analog_ddc_bus);
|
||||
+
|
||||
if (edid != NULL) {
|
||||
- /* Don't report the output as connected if it's a DVI-I
|
||||
- * connector with a non-digital EDID coming out.
|
||||
- */
|
||||
- if (response & (SDVO_OUTPUT_TMDS0 | SDVO_OUTPUT_TMDS1)) {
|
||||
- if (edid->input & DRM_EDID_INPUT_DIGITAL)
|
||||
- sdvo_priv->is_hdmi =
|
||||
- drm_detect_hdmi_monitor(edid);
|
||||
- else
|
||||
- status = connector_status_disconnected;
|
||||
- }
|
||||
+ bool is_digital = !!(edid->input & DRM_EDID_INPUT_DIGITAL);
|
||||
+ bool need_digital = !!(sdvo_connector->output_flag & SDVO_TMDS_MASK);
|
||||
|
||||
- kfree(edid);
|
||||
- connector->display_info.raw_edid = NULL;
|
||||
+ /* DDC bus is shared, match EDID to connector type */
|
||||
+ if (is_digital && need_digital)
|
||||
+ sdvo_priv->is_hdmi = drm_detect_hdmi_monitor(edid);
|
||||
+ else if (is_digital != need_digital)
|
||||
+ status = connector_status_disconnected;
|
||||
|
||||
- } else if (response & (SDVO_OUTPUT_TMDS0 | SDVO_OUTPUT_TMDS1))
|
||||
+ connector->display_info.raw_edid = NULL;
|
||||
+ } else
|
||||
status = connector_status_disconnected;
|
||||
+
|
||||
+ kfree(edid);
|
||||
|
||||
return status;
|
||||
}
|
||||
@@ -1600,8 +1597,8 @@ static enum drm_connector_status intel_sdvo_detect(struct drm_connector *connect
|
||||
|
||||
if ((sdvo_connector->output_flag & response) == 0)
|
||||
ret = connector_status_disconnected;
|
||||
- else if (response & (SDVO_OUTPUT_TMDS0 | SDVO_OUTPUT_TMDS1))
|
||||
- ret = intel_sdvo_hdmi_sink_detect(connector, response);
|
||||
+ else if (response & SDVO_TMDS_MASK)
|
||||
+ ret = intel_sdvo_hdmi_sink_detect(connector);
|
||||
else
|
||||
ret = connector_status_connected;
|
||||
|
||||
--
|
||||
1.7.0.1
|
||||
|
114
drm-intel-sdvo-fix.patch
Normal file
114
drm-intel-sdvo-fix.patch
Normal file
@ -0,0 +1,114 @@
|
||||
From ef59fcdd9d7fe818d36a0072c80770c0d1a3cc9c Mon Sep 17 00:00:00 2001
|
||||
From: Adam Jackson <ajax@redhat.com>
|
||||
Date: Fri, 23 Apr 2010 16:07:40 -0400
|
||||
Subject: [PATCH] drm/i915: Fix DDC bus selection for multifunction SDVO
|
||||
|
||||
Multifunction SDVO cards stopped working after 14571b4, and would report
|
||||
something that looked remarkably like an ADD2 SPD ROM instead of EDID.
|
||||
This appears to be because DDC bus selection was utterly horked by that
|
||||
commit; controlled_output was no longer always a single bit, so
|
||||
intel_sdvo_select_ddc_bus would pick bus 0, which is (unsurprisingly)
|
||||
the SPD ROM bus, not a DDC bus.
|
||||
|
||||
So, instead of that, let's just use the DDC bus the child device table
|
||||
tells us to use. I'm guessing at the bitmask and shifting from VBIOS
|
||||
dumps, but it can't possibly be worse.
|
||||
|
||||
cf. https://bugzilla.redhat.com/584229
|
||||
|
||||
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
||||
---
|
||||
drivers/gpu/drm/i915/i915_drv.h | 1 +
|
||||
drivers/gpu/drm/i915/intel_bios.c | 1 +
|
||||
drivers/gpu/drm/i915/intel_sdvo.c | 41 ++++++++----------------------------
|
||||
3 files changed, 11 insertions(+), 32 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
|
||||
index a43a4f5..5d609a8 100644
|
||||
--- a/drivers/gpu/drm/i915/i915_drv.h
|
||||
+++ b/drivers/gpu/drm/i915/i915_drv.h
|
||||
@@ -135,6 +135,7 @@ struct sdvo_device_mapping {
|
||||
u8 slave_addr;
|
||||
u8 dvo_wiring;
|
||||
u8 initialized;
|
||||
+ u8 ddc_pin;
|
||||
};
|
||||
|
||||
struct drm_i915_error_state {
|
||||
diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
|
||||
index f9ba452..4c748d8 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_bios.c
|
||||
+++ b/drivers/gpu/drm/i915/intel_bios.c
|
||||
@@ -366,6 +366,7 @@ parse_sdvo_device_mapping(struct drm_i915_private *dev_priv,
|
||||
p_mapping->dvo_port = p_child->dvo_port;
|
||||
p_mapping->slave_addr = p_child->slave_addr;
|
||||
p_mapping->dvo_wiring = p_child->dvo_wiring;
|
||||
+ p_mapping->ddc_pin = p_child->ddc_pin;
|
||||
p_mapping->initialized = 1;
|
||||
} else {
|
||||
DRM_DEBUG_KMS("Maybe one SDVO port is shared by "
|
||||
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
|
||||
index df9f997..f55c0d7 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_sdvo.c
|
||||
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
|
||||
@@ -2053,40 +2053,17 @@ static const struct drm_encoder_funcs intel_sdvo_enc_funcs = {
|
||||
* outputs, then LVDS outputs.
|
||||
*/
|
||||
static void
|
||||
-intel_sdvo_select_ddc_bus(struct intel_sdvo_priv *dev_priv)
|
||||
+intel_sdvo_select_ddc_bus(struct drm_i915_private *dev_priv,
|
||||
+ struct intel_sdvo_priv *sdvo, u32 reg)
|
||||
{
|
||||
- uint16_t mask = 0;
|
||||
- unsigned int num_bits;
|
||||
+ struct sdvo_device_mapping *mapping;
|
||||
|
||||
- /* Make a mask of outputs less than or equal to our own priority in the
|
||||
- * list.
|
||||
- */
|
||||
- switch (dev_priv->controlled_output) {
|
||||
- case SDVO_OUTPUT_LVDS1:
|
||||
- mask |= SDVO_OUTPUT_LVDS1;
|
||||
- case SDVO_OUTPUT_LVDS0:
|
||||
- mask |= SDVO_OUTPUT_LVDS0;
|
||||
- case SDVO_OUTPUT_TMDS1:
|
||||
- mask |= SDVO_OUTPUT_TMDS1;
|
||||
- case SDVO_OUTPUT_TMDS0:
|
||||
- mask |= SDVO_OUTPUT_TMDS0;
|
||||
- case SDVO_OUTPUT_RGB1:
|
||||
- mask |= SDVO_OUTPUT_RGB1;
|
||||
- case SDVO_OUTPUT_RGB0:
|
||||
- mask |= SDVO_OUTPUT_RGB0;
|
||||
- break;
|
||||
- }
|
||||
-
|
||||
- /* Count bits to find what number we are in the priority list. */
|
||||
- mask &= dev_priv->caps.output_flags;
|
||||
- num_bits = hweight16(mask);
|
||||
- if (num_bits > 3) {
|
||||
- /* if more than 3 outputs, default to DDC bus 3 for now */
|
||||
- num_bits = 3;
|
||||
- }
|
||||
+ if (IS_SDVOB(reg))
|
||||
+ mapping = &(dev_priv->sdvo_mappings[0]);
|
||||
+ else
|
||||
+ mapping = &(dev_priv->sdvo_mappings[1]);
|
||||
|
||||
- /* Corresponds to SDVO_CONTROL_BUS_DDCx */
|
||||
- dev_priv->ddc_bus = 1 << num_bits;
|
||||
+ sdvo->ddc_bus = 1 << ((mapping->ddc_pin & 0xf0) >> 4);
|
||||
}
|
||||
|
||||
static bool
|
||||
@@ -2863,7 +2840,7 @@ bool intel_sdvo_init(struct drm_device *dev, int sdvo_reg)
|
||||
goto err_i2c;
|
||||
}
|
||||
|
||||
- intel_sdvo_select_ddc_bus(sdvo_priv);
|
||||
+ intel_sdvo_select_ddc_bus(dev_priv, sdvo_priv, sdvo_reg);
|
||||
|
||||
/* Set the input timing to the screen. Assume always input 0. */
|
||||
intel_sdvo_set_target_input(intel_encoder, true, false);
|
||||
--
|
||||
1.7.0.1
|
||||
|
44478
drm-next.patch
44478
drm-next.patch
File diff suppressed because it is too large
Load Diff
1342
drm-nouveau-abi16.patch
Normal file
1342
drm-nouveau-abi16.patch
Normal file
File diff suppressed because it is too large
Load Diff
239
drm-nouveau-acpi-edid-fallback.patch
Normal file
239
drm-nouveau-acpi-edid-fallback.patch
Normal file
@ -0,0 +1,239 @@
|
||||
From 782468d6a9fb865677c166ceffc2271e1f709cc5 Mon Sep 17 00:00:00 2001
|
||||
From: Ben Skeggs <bskeggs@redhat.com>
|
||||
Date: Fri, 16 Apr 2010 08:12:34 +1000
|
||||
Subject: [PATCH 2/3] drm-nouveau-acpi-edid-fallback
|
||||
|
||||
---
|
||||
drivers/gpu/drm/nouveau/nouveau_acpi.c | 81 ++++++++++++++++++++++++--
|
||||
drivers/gpu/drm/nouveau/nouveau_connector.c | 8 +++
|
||||
drivers/gpu/drm/nouveau/nouveau_drv.h | 20 +++++--
|
||||
drivers/gpu/drm/nouveau/nouveau_state.c | 5 +-
|
||||
4 files changed, 98 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/nouveau/nouveau_acpi.c b/drivers/gpu/drm/nouveau/nouveau_acpi.c
|
||||
index 48227e7..ac7fd04 100644
|
||||
--- a/drivers/gpu/drm/nouveau/nouveau_acpi.c
|
||||
+++ b/drivers/gpu/drm/nouveau/nouveau_acpi.c
|
||||
@@ -2,11 +2,13 @@
|
||||
#include <linux/acpi.h>
|
||||
#include <acpi/acpi_drivers.h>
|
||||
#include <acpi/acpi_bus.h>
|
||||
+#include <acpi/video.h>
|
||||
|
||||
#include "drmP.h"
|
||||
#include "drm.h"
|
||||
#include "drm_sarea.h"
|
||||
#include "drm_crtc_helper.h"
|
||||
+#include "nouveau_connector.h"
|
||||
#include "nouveau_drv.h"
|
||||
#include "nouveau_drm.h"
|
||||
#include "nv50_display.h"
|
||||
@@ -35,7 +37,7 @@ static int nouveau_dsm(struct drm_device *dev, int func, int arg, int *result)
|
||||
0xB3, 0x4D, 0x7E, 0x5F, 0xEA, 0x12, 0x9F, 0xD4,
|
||||
};
|
||||
|
||||
- struct pci_dev *pdev = dev->pdev;
|
||||
+ struct drm_nouveau_private *dev_priv = dev->dev_private;
|
||||
struct acpi_handle *handle;
|
||||
struct acpi_buffer output = { ACPI_ALLOCATE_BUFFER, NULL };
|
||||
struct acpi_object_list input;
|
||||
@@ -43,11 +45,11 @@ static int nouveau_dsm(struct drm_device *dev, int func, int arg, int *result)
|
||||
union acpi_object *obj;
|
||||
int err;
|
||||
|
||||
- handle = DEVICE_ACPI_HANDLE(&pdev->dev);
|
||||
-
|
||||
- if (!handle)
|
||||
+ if (!dev_priv->acpi_device)
|
||||
return -ENODEV;
|
||||
|
||||
+ handle = dev_priv->acpi_device->handle;
|
||||
+
|
||||
input.count = 4;
|
||||
input.pointer = params;
|
||||
params[0].type = ACPI_TYPE_BUFFER;
|
||||
@@ -62,7 +64,8 @@ static int nouveau_dsm(struct drm_device *dev, int func, int arg, int *result)
|
||||
|
||||
err = acpi_evaluate_object(handle, "_DSM", &input, &output);
|
||||
if (err) {
|
||||
- NV_INFO(dev, "failed to evaluate _DSM: %d\n", err);
|
||||
+ if (err != AE_NOT_FOUND)
|
||||
+ NV_INFO(dev, "failed to evaluate _DSM: %d\n", err);
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -86,7 +89,7 @@ static int nouveau_dsm(struct drm_device *dev, int func, int arg, int *result)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-int nouveau_hybrid_setup(struct drm_device *dev)
|
||||
+static int nouveau_hybrid_setup(struct drm_device *dev)
|
||||
{
|
||||
int result;
|
||||
|
||||
@@ -110,7 +113,7 @@ int nouveau_hybrid_setup(struct drm_device *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-bool nouveau_dsm_probe(struct drm_device *dev)
|
||||
+static bool nouveau_dsm_probe(struct drm_device *dev)
|
||||
{
|
||||
int support = 0;
|
||||
|
||||
@@ -123,3 +126,67 @@ bool nouveau_dsm_probe(struct drm_device *dev)
|
||||
|
||||
return true;
|
||||
}
|
||||
+
|
||||
+int nouveau_acpi_get_edid(struct drm_device *dev,
|
||||
+ struct drm_connector *connector,
|
||||
+ struct edid **pedid)
|
||||
+{
|
||||
+ struct drm_nouveau_private *dev_priv = dev->dev_private;
|
||||
+ void *edid;
|
||||
+ int connector_type = 0;
|
||||
+ int ret;
|
||||
+
|
||||
+ switch (connector->connector_type) {
|
||||
+ case DRM_MODE_CONNECTOR_VGA:
|
||||
+ connector_type = ACPI_VIDEO_DISPLAY_CRT;
|
||||
+ break;
|
||||
+ case DRM_MODE_CONNECTOR_Composite:
|
||||
+ case DRM_MODE_CONNECTOR_SVIDEO:
|
||||
+ case DRM_MODE_CONNECTOR_Component:
|
||||
+ case DRM_MODE_CONNECTOR_9PinDIN:
|
||||
+ connector_type = ACPI_VIDEO_DISPLAY_TV;
|
||||
+ break;
|
||||
+ case DRM_MODE_CONNECTOR_DVII:
|
||||
+ case DRM_MODE_CONNECTOR_DVID:
|
||||
+ case DRM_MODE_CONNECTOR_HDMIA:
|
||||
+ case DRM_MODE_CONNECTOR_HDMIB:
|
||||
+ case DRM_MODE_CONNECTOR_DisplayPort:
|
||||
+ connector_type = ACPI_VIDEO_DISPLAY_DVI;
|
||||
+ break;
|
||||
+ case DRM_MODE_CONNECTOR_LVDS:
|
||||
+ connector_type = ACPI_VIDEO_DISPLAY_LCD;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ ret = acpi_video_get_edid(dev_priv->acpi_device, connector_type, -1, &edid);
|
||||
+
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+
|
||||
+ *pedid = edid;
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+int nouveau_acpi_setup(struct drm_device *dev)
|
||||
+{
|
||||
+ struct pci_dev *pdev = dev->pdev;
|
||||
+ struct drm_nouveau_private *dev_priv = dev->dev_private;
|
||||
+ acpi_handle handle;
|
||||
+ struct acpi_device *acpi_dev;
|
||||
+
|
||||
+ handle = DEVICE_ACPI_HANDLE(&pdev->dev);
|
||||
+
|
||||
+ if (!handle)
|
||||
+ return -ENODEV;
|
||||
+
|
||||
+ if (acpi_bus_get_device(handle, &acpi_dev))
|
||||
+ return -ENODEV;
|
||||
+
|
||||
+ dev_priv->acpi_device = acpi_dev;
|
||||
+ dev_priv->acpi_dsm = nouveau_dsm_probe(dev);
|
||||
+
|
||||
+ if (dev_priv->acpi_dsm)
|
||||
+ nouveau_hybrid_setup(dev);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c
|
||||
index fb51958..5832b60 100644
|
||||
--- a/drivers/gpu/drm/nouveau/nouveau_connector.c
|
||||
+++ b/drivers/gpu/drm/nouveau/nouveau_connector.c
|
||||
@@ -356,6 +356,14 @@ nouveau_connector_detect_lvds(struct drm_connector *connector)
|
||||
}
|
||||
}
|
||||
|
||||
+ /* Let's try ACPI */
|
||||
+ if (status != connector_status_connected &&
|
||||
+ !dev_priv->vbios.fp_no_ddc) {
|
||||
+ nouveau_acpi_get_edid(dev, connector, &nv_connector->edid);
|
||||
+ if (nv_connector->edid)
|
||||
+ status = connector_status_connected;
|
||||
+ }
|
||||
+
|
||||
out:
|
||||
#ifdef CONFIG_ACPI
|
||||
if (status == connector_status_connected &&
|
||||
diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h
|
||||
index c31159a..675d7ac 100644
|
||||
--- a/drivers/gpu/drm/nouveau/nouveau_drv.h
|
||||
+++ b/drivers/gpu/drm/nouveau/nouveau_drv.h
|
||||
@@ -39,6 +39,8 @@
|
||||
#define NOUVEAU_FAMILY 0x0000FFFF
|
||||
#define NOUVEAU_FLAGS 0xFFFF0000
|
||||
|
||||
+#include <linux/acpi.h>
|
||||
+
|
||||
#include "ttm/ttm_bo_api.h"
|
||||
#include "ttm/ttm_bo_driver.h"
|
||||
#include "ttm/ttm_placement.h"
|
||||
@@ -615,7 +617,11 @@ struct drm_nouveau_private {
|
||||
} susres;
|
||||
|
||||
struct backlight_device *backlight;
|
||||
+
|
||||
+#ifdef CONFIG_ACPI
|
||||
bool acpi_dsm;
|
||||
+ struct acpi_device *acpi_device;
|
||||
+#endif
|
||||
|
||||
struct nouveau_channel *evo;
|
||||
|
||||
@@ -846,16 +852,20 @@ extern int nouveau_dma_wait(struct nouveau_channel *, int slots, int size);
|
||||
|
||||
/* nouveau_acpi.c */
|
||||
#ifdef CONFIG_ACPI
|
||||
-extern int nouveau_hybrid_setup(struct drm_device *dev);
|
||||
-extern bool nouveau_dsm_probe(struct drm_device *dev);
|
||||
+extern int nouveau_acpi_setup(struct drm_device *dev);
|
||||
+extern int nouveau_acpi_get_edid(struct drm_device *dev,
|
||||
+ struct drm_connector *connector,
|
||||
+ struct edid **edid);
|
||||
#else
|
||||
-static inline int nouveau_hybrid_setup(struct drm_device *dev)
|
||||
+static inline int nouveau_acpi_setup(struct drm_device *dev)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
-static inline bool nouveau_dsm_probe(struct drm_device *dev)
|
||||
+static inline int nouveau_acpi_get_edid(struct drm_device *dev,
|
||||
+ struct drm_connector *connector,
|
||||
+ struct edid **edid)
|
||||
{
|
||||
- return false;
|
||||
+ return -ENODEV;
|
||||
}
|
||||
#endif
|
||||
|
||||
diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c b/drivers/gpu/drm/nouveau/nouveau_state.c
|
||||
index 7c1d252..7ca9465 100644
|
||||
--- a/drivers/gpu/drm/nouveau/nouveau_state.c
|
||||
+++ b/drivers/gpu/drm/nouveau/nouveau_state.c
|
||||
@@ -627,10 +627,7 @@ int nouveau_load(struct drm_device *dev, unsigned long flags)
|
||||
NV_DEBUG(dev, "vendor: 0x%X device: 0x%X class: 0x%X\n",
|
||||
dev->pci_vendor, dev->pci_device, dev->pdev->class);
|
||||
|
||||
- dev_priv->acpi_dsm = nouveau_dsm_probe(dev);
|
||||
-
|
||||
- if (dev_priv->acpi_dsm)
|
||||
- nouveau_hybrid_setup(dev);
|
||||
+ nouveau_acpi_setup(dev);
|
||||
|
||||
dev_priv->wq = create_workqueue("nouveau");
|
||||
if (!dev_priv->wq)
|
||||
--
|
||||
1.7.1
|
||||
|
86
drm-nouveau-drm-fixed-header.patch
Normal file
86
drm-nouveau-drm-fixed-header.patch
Normal file
@ -0,0 +1,86 @@
|
||||
From 841045c942be3fd2bf928a7de3e730a00665347e Mon Sep 17 00:00:00 2001
|
||||
From: Ben Skeggs <bskeggs@redhat.com>
|
||||
Date: Wed, 28 Apr 2010 15:19:10 +1000
|
||||
Subject: [PATCH 3/3] drm-nouveau-drm-fixed-header
|
||||
|
||||
---
|
||||
drivers/gpu/drm/nouveau/drm_fixed.h | 67 +++++++++++++++++++++++++++++++++++
|
||||
1 files changed, 67 insertions(+), 0 deletions(-)
|
||||
create mode 100644 drivers/gpu/drm/nouveau/drm_fixed.h
|
||||
|
||||
diff --git a/drivers/gpu/drm/nouveau/drm_fixed.h b/drivers/gpu/drm/nouveau/drm_fixed.h
|
||||
new file mode 100644
|
||||
index 0000000..4a08a66
|
||||
--- /dev/null
|
||||
+++ b/drivers/gpu/drm/nouveau/drm_fixed.h
|
||||
@@ -0,0 +1,67 @@
|
||||
+/*
|
||||
+ * Copyright 2009 Red Hat Inc.
|
||||
+ *
|
||||
+ * Permission is hereby granted, free of charge, to any person obtaining a
|
||||
+ * copy of this software and associated documentation files (the "Software"),
|
||||
+ * to deal in the Software without restriction, including without limitation
|
||||
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
+ * and/or sell copies of the Software, and to permit persons to whom the
|
||||
+ * Software is furnished to do so, subject to the following conditions:
|
||||
+ *
|
||||
+ * The above copyright notice and this permission notice shall be included in
|
||||
+ * all copies or substantial portions of the Software.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
+ * OTHER DEALINGS IN THE SOFTWARE.
|
||||
+ *
|
||||
+ * Authors: Dave Airlie
|
||||
+ */
|
||||
+#ifndef DRM_FIXED_H
|
||||
+#define DRM_FIXED_H
|
||||
+
|
||||
+typedef union dfixed {
|
||||
+ u32 full;
|
||||
+} fixed20_12;
|
||||
+
|
||||
+
|
||||
+#define dfixed_const(A) (u32)(((A) << 12))/* + ((B + 0.000122)*4096)) */
|
||||
+#define dfixed_const_half(A) (u32)(((A) << 12) + 2048)
|
||||
+#define dfixed_const_666(A) (u32)(((A) << 12) + 2731)
|
||||
+#define dfixed_const_8(A) (u32)(((A) << 12) + 3277)
|
||||
+#define dfixed_mul(A, B) ((u64)((u64)(A).full * (B).full + 2048) >> 12)
|
||||
+#define dfixed_init(A) { .full = dfixed_const((A)) }
|
||||
+#define dfixed_init_half(A) { .full = dfixed_const_half((A)) }
|
||||
+#define dfixed_trunc(A) ((A).full >> 12)
|
||||
+
|
||||
+static inline u32 dfixed_floor(fixed20_12 A)
|
||||
+{
|
||||
+ u32 non_frac = dfixed_trunc(A);
|
||||
+
|
||||
+ return dfixed_const(non_frac);
|
||||
+}
|
||||
+
|
||||
+static inline u32 dfixed_ceil(fixed20_12 A)
|
||||
+{
|
||||
+ u32 non_frac = dfixed_trunc(A);
|
||||
+
|
||||
+ if (A.full > dfixed_const(non_frac))
|
||||
+ return dfixed_const(non_frac + 1);
|
||||
+ else
|
||||
+ return dfixed_const(non_frac);
|
||||
+}
|
||||
+
|
||||
+static inline u32 dfixed_div(fixed20_12 A, fixed20_12 B)
|
||||
+{
|
||||
+ u64 tmp = ((u64)A.full << 13);
|
||||
+
|
||||
+ do_div(tmp, B.full);
|
||||
+ tmp += 1;
|
||||
+ tmp /= 2;
|
||||
+ return lower_32_bits(tmp);
|
||||
+}
|
||||
+#endif
|
||||
--
|
||||
1.7.1
|
||||
|
@ -1,107 +0,0 @@
|
||||
From 030e105efc9a29c7d34fb59fb0e0a40e54178299 Mon Sep 17 00:00:00 2001
|
||||
From: Ben Skeggs <bskeggs@redhat.com>
|
||||
Date: Wed, 30 Jun 2010 13:34:05 +1000
|
||||
Subject: [PATCH] drm/nouveau: disable acceleration on NVA3/NVA5/NVA8 by default
|
||||
|
||||
There's an GPU lockup problem for which the cause is currently unknown
|
||||
on these chipsets.
|
||||
|
||||
Until it's resolved, it's better to leave the user with a working system
|
||||
without acceleration than to have random lockups.
|
||||
|
||||
With this patch, acceleration will be off by default if a known problem
|
||||
chipset is detected, but can be re-enabled with nouveau.noaccel=0 on
|
||||
the kernel commandline.
|
||||
|
||||
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
|
||||
---
|
||||
drivers/gpu/drm/nouveau/nouveau_drv.c | 2 +-
|
||||
drivers/gpu/drm/nouveau/nouveau_drv.h | 1 +
|
||||
drivers/gpu/drm/nouveau/nouveau_state.c | 23 +++++++++++++++++++----
|
||||
3 files changed, 21 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.c b/drivers/gpu/drm/nouveau/nouveau_drv.c
|
||||
index b4d958c..02b564c 100644
|
||||
--- a/drivers/gpu/drm/nouveau/nouveau_drv.c
|
||||
+++ b/drivers/gpu/drm/nouveau/nouveau_drv.c
|
||||
@@ -72,7 +72,7 @@ int nouveau_ignorelid = 0;
|
||||
module_param_named(ignorelid, nouveau_ignorelid, int, 0400);
|
||||
|
||||
MODULE_PARM_DESC(noaccel, "Disable all acceleration");
|
||||
-int nouveau_noaccel = 0;
|
||||
+int nouveau_noaccel = -1;
|
||||
module_param_named(noaccel, nouveau_noaccel, int, 0400);
|
||||
|
||||
MODULE_PARM_DESC(nofbaccel, "Disable fbcon acceleration");
|
||||
diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h
|
||||
index 022648e..76ec783 100644
|
||||
--- a/drivers/gpu/drm/nouveau/nouveau_drv.h
|
||||
+++ b/drivers/gpu/drm/nouveau/nouveau_drv.h
|
||||
@@ -493,6 +493,7 @@ enum nouveau_card_type {
|
||||
|
||||
struct drm_nouveau_private {
|
||||
struct drm_device *dev;
|
||||
+ bool noaccel;
|
||||
|
||||
/* the card type, takes NV_* as values */
|
||||
enum nouveau_card_type card_type;
|
||||
diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c b/drivers/gpu/drm/nouveau/nouveau_state.c
|
||||
index 63c2d24..866f437 100644
|
||||
--- a/drivers/gpu/drm/nouveau/nouveau_state.c
|
||||
+++ b/drivers/gpu/drm/nouveau/nouveau_state.c
|
||||
@@ -454,7 +454,7 @@ nouveau_card_init(struct drm_device *dev)
|
||||
if (ret)
|
||||
goto out_timer;
|
||||
|
||||
- if (nouveau_noaccel)
|
||||
+ if (dev_priv->noaccel)
|
||||
engine->graph.accel_blocked = true;
|
||||
else {
|
||||
/* PGRAPH */
|
||||
@@ -509,10 +509,10 @@ out_display:
|
||||
else
|
||||
nv04_display_destroy(dev);
|
||||
out_fifo:
|
||||
- if (!nouveau_noaccel)
|
||||
+ if (!dev_priv->noaccel)
|
||||
engine->fifo.takedown(dev);
|
||||
out_graph:
|
||||
- if (!nouveau_noaccel)
|
||||
+ if (!dev_priv->noaccel)
|
||||
engine->graph.takedown(dev);
|
||||
out_fb:
|
||||
engine->fb.takedown(dev);
|
||||
@@ -548,7 +548,7 @@ static void nouveau_card_takedown(struct drm_device *dev)
|
||||
dev_priv->channel = NULL;
|
||||
}
|
||||
|
||||
- if (!nouveau_noaccel) {
|
||||
+ if (!dev_priv->noaccel) {
|
||||
engine->fifo.takedown(dev);
|
||||
engine->graph.takedown(dev);
|
||||
}
|
||||
@@ -744,6 +744,21 @@ int nouveau_load(struct drm_device *dev, unsigned long flags)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
+ if (nouveau_noaccel == -1) {
|
||||
+ switch (dev_priv->chipset) {
|
||||
+ case 0xa3:
|
||||
+ case 0xa5:
|
||||
+ case 0xa8:
|
||||
+ dev_priv->noaccel = true;
|
||||
+ break;
|
||||
+ default:
|
||||
+ dev_priv->noaccel = false;
|
||||
+ break;
|
||||
+ }
|
||||
+ } else {
|
||||
+ dev_priv->noaccel = (nouveau_noaccel != 0);
|
||||
+ }
|
||||
+
|
||||
/* Map PRAMIN BAR, or on older cards, the aperture withing BAR0 */
|
||||
if (dev_priv->card_type >= NV_40) {
|
||||
int ramin_bar = 2;
|
||||
--
|
||||
1.7.2
|
||||
|
@ -1,139 +0,0 @@
|
||||
From cfff162fe5d7a69a6a77cef306866145bf5b0567 Mon Sep 17 00:00:00 2001
|
||||
From: Ben Skeggs <bskeggs@redhat.com>
|
||||
Date: Fri, 23 Jul 2010 09:06:52 +1000
|
||||
Subject: [PATCH] drm/nouveau: fix race condition when under memory pressure
|
||||
|
||||
rhbz#602663
|
||||
|
||||
When VRAM is running out it's possible that the client's push buffers get
|
||||
evicted to main memory. When they're validated back in, the GPU may
|
||||
be used for the copy back to VRAM, but the existing synchronisation code
|
||||
only deals with inter-channel sync, not sync between PFIFO and PGRAPH on
|
||||
the same channel. This leads to PFIFO fetching from command buffers that
|
||||
haven't quite been copied by PGRAPH yet.
|
||||
|
||||
This patch marks push buffers as so, and forces any GPU-assisted buffer
|
||||
moves to be done on a different channel, which triggers the correct
|
||||
synchronisation to happen before we submit them.
|
||||
|
||||
After discussion with another nouveau developer, it was agreed that while
|
||||
this patch is fine in itself, that we'd prefer to work out a nicer, but
|
||||
likely much more invasive, fix upstream.
|
||||
|
||||
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
|
||||
---
|
||||
drivers/gpu/drm/nouveau/nouveau_bo.c | 15 +++++++++++++
|
||||
drivers/gpu/drm/nouveau/nouveau_drv.h | 1 +
|
||||
drivers/gpu/drm/nouveau/nouveau_gem.c | 36 +++++++++++++++++++++++---------
|
||||
3 files changed, 42 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c
|
||||
index d8c341d..494a219 100644
|
||||
--- a/drivers/gpu/drm/nouveau/nouveau_bo.c
|
||||
+++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
|
||||
@@ -36,6 +36,21 @@
|
||||
#include <linux/log2.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
+int
|
||||
+nouveau_bo_sync_gpu(struct nouveau_bo *nvbo, struct nouveau_channel *chan)
|
||||
+{
|
||||
+ struct nouveau_fence *prev_fence = nvbo->bo.sync_obj;
|
||||
+ int ret;
|
||||
+
|
||||
+ if (!prev_fence || nouveau_fence_channel(prev_fence) == chan)
|
||||
+ return 0;
|
||||
+
|
||||
+ spin_lock(&nvbo->bo.lock);
|
||||
+ ret = ttm_bo_wait(&nvbo->bo, false, false, false);
|
||||
+ spin_unlock(&nvbo->bo.lock);
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
static void
|
||||
nouveau_bo_del_ttm(struct ttm_buffer_object *bo)
|
||||
{
|
||||
diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h
|
||||
index 51ccd90..022648e 100644
|
||||
--- a/drivers/gpu/drm/nouveau/nouveau_drv.h
|
||||
+++ b/drivers/gpu/drm/nouveau/nouveau_drv.h
|
||||
@@ -1098,6 +1098,7 @@ extern u16 nouveau_bo_rd16(struct nouveau_bo *nvbo, unsigned index);
|
||||
extern void nouveau_bo_wr16(struct nouveau_bo *nvbo, unsigned index, u16 val);
|
||||
extern u32 nouveau_bo_rd32(struct nouveau_bo *nvbo, unsigned index);
|
||||
extern void nouveau_bo_wr32(struct nouveau_bo *nvbo, unsigned index, u32 val);
|
||||
+extern int nouveau_bo_sync_gpu(struct nouveau_bo *, struct nouveau_channel *);
|
||||
|
||||
/* nouveau_fence.c */
|
||||
struct nouveau_fence;
|
||||
diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.c b/drivers/gpu/drm/nouveau/nouveau_gem.c
|
||||
index 547f2c2..a915dcd 100644
|
||||
--- a/drivers/gpu/drm/nouveau/nouveau_gem.c
|
||||
+++ b/drivers/gpu/drm/nouveau/nouveau_gem.c
|
||||
@@ -361,16 +361,11 @@ validate_list(struct nouveau_channel *chan, struct list_head *list,
|
||||
|
||||
list_for_each_entry(nvbo, list, entry) {
|
||||
struct drm_nouveau_gem_pushbuf_bo *b = &pbbo[nvbo->pbbo_index];
|
||||
- struct nouveau_fence *prev_fence = nvbo->bo.sync_obj;
|
||||
|
||||
- if (prev_fence && nouveau_fence_channel(prev_fence) != chan) {
|
||||
- spin_lock(&nvbo->bo.lock);
|
||||
- ret = ttm_bo_wait(&nvbo->bo, false, false, false);
|
||||
- spin_unlock(&nvbo->bo.lock);
|
||||
- if (unlikely(ret)) {
|
||||
- NV_ERROR(dev, "fail wait other chan\n");
|
||||
- return ret;
|
||||
- }
|
||||
+ ret = nouveau_bo_sync_gpu(nvbo, chan);
|
||||
+ if (unlikely(ret)) {
|
||||
+ NV_ERROR(dev, "fail pre-validate sync\n");
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
ret = nouveau_gem_set_domain(nvbo->gem, b->read_domains,
|
||||
@@ -381,7 +376,7 @@ validate_list(struct nouveau_channel *chan, struct list_head *list,
|
||||
return ret;
|
||||
}
|
||||
|
||||
- nvbo->channel = chan;
|
||||
+ nvbo->channel = (b->read_domains & (1 << 31)) ? NULL : chan;
|
||||
ret = ttm_bo_validate(&nvbo->bo, &nvbo->placement,
|
||||
false, false, false);
|
||||
nvbo->channel = NULL;
|
||||
@@ -390,6 +385,12 @@ validate_list(struct nouveau_channel *chan, struct list_head *list,
|
||||
return ret;
|
||||
}
|
||||
|
||||
+ ret = nouveau_bo_sync_gpu(nvbo, chan);
|
||||
+ if (unlikely(ret)) {
|
||||
+ NV_ERROR(dev, "fail post-validate sync\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
if (nvbo->bo.offset == b->presumed.offset &&
|
||||
((nvbo->bo.mem.mem_type == TTM_PL_VRAM &&
|
||||
b->presumed.domain & NOUVEAU_GEM_DOMAIN_VRAM) ||
|
||||
@@ -615,6 +616,21 @@ nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data,
|
||||
|
||||
mutex_lock(&dev->struct_mutex);
|
||||
|
||||
+ /* Mark push buffers as being used on PFIFO, the validation code
|
||||
+ * will then make sure that if the pushbuf bo moves, that they
|
||||
+ * happen on the kernel channel, which will in turn cause a sync
|
||||
+ * to happen before we try and submit the push buffer.
|
||||
+ */
|
||||
+ for (i = 0; i < req->nr_push; i++) {
|
||||
+ if (push[i].bo_index >= req->nr_buffers) {
|
||||
+ NV_ERROR(dev, "push %d buffer not in list\n", i);
|
||||
+ ret = -EINVAL;
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ bo[push[i].bo_index].read_domains |= (1 << 31);
|
||||
+ }
|
||||
+
|
||||
/* Validate buffer list */
|
||||
ret = nouveau_gem_pushbuf_validate(chan, file_priv, bo, req->buffers,
|
||||
req->nr_buffers, &op, &do_reloc);
|
||||
--
|
||||
1.7.2
|
||||
|
File diff suppressed because it is too large
Load Diff
11726
drm-radeon-evergreen.patch
Normal file
11726
drm-radeon-evergreen.patch
Normal file
File diff suppressed because it is too large
Load Diff
30
drm-radeon-firemv-pciid.patch
Normal file
30
drm-radeon-firemv-pciid.patch
Normal file
@ -0,0 +1,30 @@
|
||||
From 79b9517a33a283c5d9db875c263670ed1e055f7e Mon Sep 17 00:00:00 2001
|
||||
From: Dave Airlie <airlied@redhat.com>
|
||||
Date: Mon, 19 Apr 2010 17:54:31 +1000
|
||||
Subject: [PATCH] drm/radeon/kms: add FireMV 2400 PCI ID.
|
||||
|
||||
This is an M24/X600 chip.
|
||||
|
||||
From RH# 581927
|
||||
|
||||
cc: stable@kernel.org
|
||||
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
||||
---
|
||||
include/drm/drm_pciids.h | 1 +
|
||||
1 files changed, 1 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/include/drm/drm_pciids.h b/include/drm/drm_pciids.h
|
||||
index 04a6ebc..2d428b0 100644
|
||||
--- a/include/drm/drm_pciids.h
|
||||
+++ b/include/drm/drm_pciids.h
|
||||
@@ -6,6 +6,7 @@
|
||||
{0x1002, 0x3150, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_IS_MOBILITY}, \
|
||||
{0x1002, 0x3152, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x3154, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
|
||||
+ {0x1002, 0x3155, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x3E50, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x3E54, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x4136, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS100|RADEON_IS_IGP}, \
|
||||
--
|
||||
1.6.6.1
|
||||
|
32
drm-radeon-fix-rs600-tlb.patch
Normal file
32
drm-radeon-fix-rs600-tlb.patch
Normal file
@ -0,0 +1,32 @@
|
||||
From 30f69f3fb20bd719b5e1bf879339914063d38f47 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Glisse <jglisse@redhat.com>
|
||||
Date: Fri, 16 Apr 2010 18:46:35 +0200
|
||||
Subject: [PATCH] drm/radeon/kms: fix rs600 tlb flush
|
||||
|
||||
Typo in in flush leaded to no flush of the RS600 tlb which
|
||||
ultimately leaded to massive system ram corruption, with
|
||||
this patch everythings seems to work properly.
|
||||
|
||||
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
|
||||
Cc: stable <stable@kernel.org>
|
||||
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
||||
---
|
||||
drivers/gpu/drm/radeon/rs600.c | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/radeon/rs600.c b/drivers/gpu/drm/radeon/rs600.c
|
||||
index abf824c..a81bc7a 100644
|
||||
--- a/drivers/gpu/drm/radeon/rs600.c
|
||||
+++ b/drivers/gpu/drm/radeon/rs600.c
|
||||
@@ -159,7 +159,7 @@ void rs600_gart_tlb_flush(struct radeon_device *rdev)
|
||||
WREG32_MC(R_000100_MC_PT0_CNTL, tmp);
|
||||
|
||||
tmp = RREG32_MC(R_000100_MC_PT0_CNTL);
|
||||
- tmp |= S_000100_INVALIDATE_ALL_L1_TLBS(1) & S_000100_INVALIDATE_L2_CACHE(1);
|
||||
+ tmp |= S_000100_INVALIDATE_ALL_L1_TLBS(1) | S_000100_INVALIDATE_L2_CACHE(1);
|
||||
WREG32_MC(R_000100_MC_PT0_CNTL, tmp);
|
||||
|
||||
tmp = RREG32_MC(R_000100_MC_PT0_CNTL);
|
||||
--
|
||||
1.6.6.1
|
||||
|
36
drm-radeon-fix-shared-ddc-handling.patch
Normal file
36
drm-radeon-fix-shared-ddc-handling.patch
Normal file
@ -0,0 +1,36 @@
|
||||
From 557b452536c9390105539a264d342d963d71b087 Mon Sep 17 00:00:00 2001
|
||||
From: Alex Deucher <alexdeucher@gmail.com>
|
||||
Date: Mon, 21 Jun 2010 12:07:52 -0400
|
||||
Subject: [PATCH] drm/radeon/kms: fix shared ddc handling
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Connectors with a shared ddc line can be connected to different
|
||||
encoders.
|
||||
|
||||
Reported by Pasi Kärkkäinen <pasik@iki.fi> on dri-devel
|
||||
|
||||
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
|
||||
---
|
||||
drivers/gpu/drm/radeon/radeon_connectors.c | 4 +++-
|
||||
1 files changed, 3 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c
|
||||
index 0c7ccc6..f58f8bd 100644
|
||||
--- a/drivers/gpu/drm/radeon/radeon_connectors.c
|
||||
+++ b/drivers/gpu/drm/radeon/radeon_connectors.c
|
||||
@@ -785,7 +785,9 @@ static enum drm_connector_status radeon_dvi_detect(struct drm_connector *connect
|
||||
if (connector == list_connector)
|
||||
continue;
|
||||
list_radeon_connector = to_radeon_connector(list_connector);
|
||||
- if (radeon_connector->devices == list_radeon_connector->devices) {
|
||||
+ if (list_radeon_connector->shared_ddc &&
|
||||
+ (list_radeon_connector->ddc_bus->rec.i2c_id ==
|
||||
+ radeon_connector->ddc_bus->rec.i2c_id)) {
|
||||
if (drm_detect_hdmi_monitor(radeon_connector->edid)) {
|
||||
if (connector->connector_type == DRM_MODE_CONNECTOR_DVID) {
|
||||
kfree(radeon_connector->edid);
|
||||
--
|
||||
1.7.0.1
|
||||
|
39
drm-radeon-kms-fix-dual-link-dvi.patch
Normal file
39
drm-radeon-kms-fix-dual-link-dvi.patch
Normal file
@ -0,0 +1,39 @@
|
||||
From b317a9ce2259e64258a802a5ca70dec45ac15dda Mon Sep 17 00:00:00 2001
|
||||
From: Alex Deucher <alexdeucher@gmail.com>
|
||||
Date: Thu, 15 Apr 2010 16:54:38 -0400
|
||||
Subject: [PATCH] drm/radeon/kms/atom: fix dual-link DVI on DCE3.2/4.0
|
||||
|
||||
Got broken during the evergreen merge.
|
||||
Fixes fdo bug 27001.
|
||||
|
||||
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
|
||||
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
||||
---
|
||||
drivers/gpu/drm/radeon/radeon_encoders.c | 4 ++++
|
||||
1 files changed, 4 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/radeon/radeon_encoders.c b/drivers/gpu/drm/radeon/radeon_encoders.c
|
||||
index c52fc30..9f7f56a 100644
|
||||
--- a/drivers/gpu/drm/radeon/radeon_encoders.c
|
||||
+++ b/drivers/gpu/drm/radeon/radeon_encoders.c
|
||||
@@ -865,6 +865,8 @@ atombios_dig_transmitter_setup(struct drm_encoder *encoder, int action, uint8_t
|
||||
else if (radeon_encoder->devices & (ATOM_DEVICE_DFP_SUPPORT)) {
|
||||
if (dig->coherent_mode)
|
||||
args.v3.acConfig.fCoherentMode = 1;
|
||||
+ if (radeon_encoder->pixel_clock > 165000)
|
||||
+ args.v3.acConfig.fDualLinkConnector = 1;
|
||||
}
|
||||
} else if (ASIC_IS_DCE32(rdev)) {
|
||||
args.v2.acConfig.ucEncoderSel = dig->dig_encoder;
|
||||
@@ -888,6 +890,8 @@ atombios_dig_transmitter_setup(struct drm_encoder *encoder, int action, uint8_t
|
||||
else if (radeon_encoder->devices & (ATOM_DEVICE_DFP_SUPPORT)) {
|
||||
if (dig->coherent_mode)
|
||||
args.v2.acConfig.fCoherentMode = 1;
|
||||
+ if (radeon_encoder->pixel_clock > 165000)
|
||||
+ args.v2.acConfig.fDualLinkConnector = 1;
|
||||
}
|
||||
} else {
|
||||
args.v1.ucConfig = ATOM_TRANSMITTER_CONFIG_CLKSRC_PPLL;
|
||||
--
|
||||
1.6.6.1
|
||||
|
97
drm-radeon-ss-fix.patch
Normal file
97
drm-radeon-ss-fix.patch
Normal file
@ -0,0 +1,97 @@
|
||||
From 7aac5b711ff4c64bad5a6027cf6d38f1bbd53efe Mon Sep 17 00:00:00 2001
|
||||
From: Dave Airlie <airlied@redhat.com>
|
||||
Date: Tue, 20 Apr 2010 18:30:37 +1000
|
||||
Subject: [PATCH] drm/radeon/kms: further spread spectrum fixes
|
||||
|
||||
Adjust modeset ordering to fix spread spectrum.
|
||||
The spread spectrum command table relies on the
|
||||
crtc routing to already be set in order to work
|
||||
properly on some asics.
|
||||
|
||||
Should fix fdo bug 25741.
|
||||
|
||||
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
|
||||
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
||||
|
||||
Conflicts:
|
||||
|
||||
drivers/gpu/drm/radeon/atombios_crtc.c
|
||||
---
|
||||
drivers/gpu/drm/radeon/atombios_crtc.c | 5 +++++
|
||||
drivers/gpu/drm/radeon/radeon_encoders.c | 25 +++++++++++++++----------
|
||||
2 files changed, 20 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c b/drivers/gpu/drm/radeon/atombios_crtc.c
|
||||
index c076eac..e70b575 100644
|
||||
--- a/drivers/gpu/drm/radeon/atombios_crtc.c
|
||||
+++ b/drivers/gpu/drm/radeon/atombios_crtc.c
|
||||
@@ -1115,6 +1115,11 @@ static bool atombios_crtc_mode_fixup(struct drm_crtc *crtc,
|
||||
|
||||
static void atombios_crtc_prepare(struct drm_crtc *crtc)
|
||||
{
|
||||
+ struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc);
|
||||
+
|
||||
+ /* pick pll */
|
||||
+ radeon_crtc->pll_id = radeon_atom_pick_pll(crtc);
|
||||
+
|
||||
atombios_lock_crtc(crtc, ATOM_ENABLE);
|
||||
atombios_crtc_dpms(crtc, DRM_MODE_DPMS_OFF);
|
||||
}
|
||||
diff --git a/drivers/gpu/drm/radeon/radeon_encoders.c b/drivers/gpu/drm/radeon/radeon_encoders.c
|
||||
index cac9e06..ff28ad8 100644
|
||||
--- a/drivers/gpu/drm/radeon/radeon_encoders.c
|
||||
+++ b/drivers/gpu/drm/radeon/radeon_encoders.c
|
||||
@@ -1207,6 +1207,9 @@ atombios_set_encoder_crtc_source(struct drm_encoder *encoder)
|
||||
}
|
||||
|
||||
atom_execute_table(rdev->mode_info.atom_context, index, (uint32_t *)&args);
|
||||
+
|
||||
+ /* update scratch regs with new routing */
|
||||
+ radeon_atombios_encoder_crtc_scratch_regs(encoder, radeon_crtc->crtc_id);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1317,19 +1320,9 @@ radeon_atom_encoder_mode_set(struct drm_encoder *encoder,
|
||||
struct drm_device *dev = encoder->dev;
|
||||
struct radeon_device *rdev = dev->dev_private;
|
||||
struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder);
|
||||
- struct radeon_crtc *radeon_crtc = to_radeon_crtc(encoder->crtc);
|
||||
|
||||
- if (radeon_encoder->active_device &
|
||||
- (ATOM_DEVICE_DFP_SUPPORT | ATOM_DEVICE_LCD_SUPPORT)) {
|
||||
- struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv;
|
||||
- if (dig)
|
||||
- dig->dig_encoder = radeon_atom_pick_dig_encoder(encoder);
|
||||
- }
|
||||
radeon_encoder->pixel_clock = adjusted_mode->clock;
|
||||
|
||||
- radeon_atombios_encoder_crtc_scratch_regs(encoder, radeon_crtc->crtc_id);
|
||||
- atombios_set_encoder_crtc_source(encoder);
|
||||
-
|
||||
if (ASIC_IS_AVIVO(rdev)) {
|
||||
if (radeon_encoder->active_device & (ATOM_DEVICE_CV_SUPPORT | ATOM_DEVICE_TV_SUPPORT))
|
||||
atombios_yuv_setup(encoder, true);
|
||||
@@ -1483,8 +1476,20 @@ radeon_atom_dac_detect(struct drm_encoder *encoder, struct drm_connector *connec
|
||||
|
||||
static void radeon_atom_encoder_prepare(struct drm_encoder *encoder)
|
||||
{
|
||||
+ struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder);
|
||||
+
|
||||
+ if (radeon_encoder->active_device &
|
||||
+ (ATOM_DEVICE_DFP_SUPPORT | ATOM_DEVICE_LCD_SUPPORT)) {
|
||||
+ struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv;
|
||||
+ if (dig)
|
||||
+ dig->dig_encoder = radeon_atom_pick_dig_encoder(encoder);
|
||||
+ }
|
||||
+
|
||||
radeon_atom_output_lock(encoder, true);
|
||||
radeon_atom_encoder_dpms(encoder, DRM_MODE_DPMS_OFF);
|
||||
+
|
||||
+ /* this is needed for the pll/ss setup to work correctly in some cases */
|
||||
+ atombios_set_encoder_crtc_source(encoder);
|
||||
}
|
||||
|
||||
static void radeon_atom_encoder_commit(struct drm_encoder *encoder)
|
||||
--
|
||||
1.6.5.2
|
||||
|
@ -1,958 +0,0 @@
|
||||
From 5b904034b0ab5195d971b139d0c0b67ab21b063c Mon Sep 17 00:00:00 2001
|
||||
From: Kyle McMartin <kyle@dreadnought.i.jkkm.org>
|
||||
Date: Mon, 21 Jun 2010 20:33:16 +0100
|
||||
Subject: Revert "drm/fbdev: rework output polling to be back in the core. (v4)"
|
||||
|
||||
This reverts commit eb1f8e4f3be898df808e2dfc131099f5831d491d.
|
||||
|
||||
Conflicts:
|
||||
|
||||
drivers/gpu/drm/drm_crtc_helper.c
|
||||
drivers/gpu/drm/i915/i915_dma.c
|
||||
drivers/gpu/drm/i915/intel_fb.c
|
||||
drivers/gpu/drm/nouveau/nouveau_fbcon.c
|
||||
drivers/gpu/drm/radeon/radeon_fb.c
|
||||
include/drm/drm_crtc_helper.h
|
||||
---
|
||||
drivers/gpu/drm/Kconfig | 2 +-
|
||||
drivers/gpu/drm/drm_crtc_helper.c | 111 ------------------------
|
||||
drivers/gpu/drm/drm_fb_helper.c | 123 +++++++++++++++++++++++----
|
||||
drivers/gpu/drm/i915/i915_dma.c | 1 -
|
||||
drivers/gpu/drm/i915/i915_irq.c | 3 +-
|
||||
drivers/gpu/drm/i915/intel_crt.c | 5 -
|
||||
drivers/gpu/drm/i915/intel_display.c | 2 -
|
||||
drivers/gpu/drm/i915/intel_dp.c | 2 -
|
||||
drivers/gpu/drm/i915/intel_drv.h | 2 +-
|
||||
drivers/gpu/drm/i915/intel_fb.c | 14 ++--
|
||||
drivers/gpu/drm/i915/intel_hdmi.c | 1 -
|
||||
drivers/gpu/drm/i915/intel_sdvo.c | 2 -
|
||||
drivers/gpu/drm/nouveau/nouveau_connector.c | 12 ---
|
||||
drivers/gpu/drm/nouveau/nouveau_display.c | 1 -
|
||||
drivers/gpu/drm/nouveau/nouveau_fbcon.c | 13 ++-
|
||||
drivers/gpu/drm/nouveau/nouveau_fbcon.h | 2 +-
|
||||
drivers/gpu/drm/nouveau/nouveau_state.c | 5 +-
|
||||
drivers/gpu/drm/nouveau/nv50_display.c | 2 +-
|
||||
drivers/gpu/drm/radeon/radeon_connectors.c | 13 ---
|
||||
drivers/gpu/drm/radeon/radeon_display.c | 10 --
|
||||
drivers/gpu/drm/radeon/radeon_fb.c | 15 +++-
|
||||
drivers/gpu/drm/radeon/radeon_irq_kms.c | 5 +-
|
||||
drivers/gpu/drm/radeon/radeon_mode.h | 3 +-
|
||||
include/drm/drm_crtc.h | 17 ----
|
||||
include/drm/drm_crtc_helper.h | 6 --
|
||||
include/drm/drm_fb_helper.h | 13 +++-
|
||||
26 files changed, 155 insertions(+), 230 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
|
||||
index c2711c6..a51a1e4 100644
|
||||
--- a/drivers/gpu/drm/Kconfig
|
||||
+++ b/drivers/gpu/drm/Kconfig
|
||||
@@ -9,7 +9,6 @@ menuconfig DRM
|
||||
depends on (AGP || AGP=n) && PCI && !EMULATED_CMPXCHG && MMU
|
||||
select I2C
|
||||
select I2C_ALGOBIT
|
||||
- select SLOW_WORK
|
||||
help
|
||||
Kernel-level support for the Direct Rendering Infrastructure (DRI)
|
||||
introduced in XFree86 4.0. If you say Y here, you need to select
|
||||
@@ -24,6 +23,7 @@ config DRM_KMS_HELPER
|
||||
depends on DRM
|
||||
select FB
|
||||
select FRAMEBUFFER_CONSOLE if !EMBEDDED
|
||||
+ select SLOW_WORK
|
||||
help
|
||||
FB and CRTC helpers for KMS drivers.
|
||||
|
||||
diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
|
||||
index 9b2a541..b142ac2 100644
|
||||
--- a/drivers/gpu/drm/drm_crtc_helper.c
|
||||
+++ b/drivers/gpu/drm/drm_crtc_helper.c
|
||||
@@ -807,114 +807,3 @@ int drm_helper_resume_force_mode(struct drm_device *dev)
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(drm_helper_resume_force_mode);
|
||||
-
|
||||
-static struct slow_work_ops output_poll_ops;
|
||||
-
|
||||
-#define DRM_OUTPUT_POLL_PERIOD (10*HZ)
|
||||
-static void output_poll_execute(struct slow_work *work)
|
||||
-{
|
||||
- struct delayed_slow_work *delayed_work = container_of(work, struct delayed_slow_work, work);
|
||||
- struct drm_device *dev = container_of(delayed_work, struct drm_device, mode_config.output_poll_slow_work);
|
||||
- struct drm_connector *connector;
|
||||
- enum drm_connector_status old_status, status;
|
||||
- bool repoll = false, changed = false;
|
||||
- int ret;
|
||||
-
|
||||
- mutex_lock(&dev->mode_config.mutex);
|
||||
- list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
|
||||
-
|
||||
- /* if this is HPD or polled don't check it -
|
||||
- TV out for instance */
|
||||
- if (!connector->polled)
|
||||
- continue;
|
||||
-
|
||||
- else if (connector->polled & (DRM_CONNECTOR_POLL_CONNECT | DRM_CONNECTOR_POLL_DISCONNECT))
|
||||
- repoll = true;
|
||||
-
|
||||
- old_status = connector->status;
|
||||
- /* if we are connected and don't want to poll for disconnect
|
||||
- skip it */
|
||||
- if (old_status == connector_status_connected &&
|
||||
- !(connector->polled & DRM_CONNECTOR_POLL_DISCONNECT) &&
|
||||
- !(connector->polled & DRM_CONNECTOR_POLL_HPD))
|
||||
- continue;
|
||||
-
|
||||
- status = connector->funcs->detect(connector);
|
||||
- if (old_status != status)
|
||||
- changed = true;
|
||||
- }
|
||||
-
|
||||
- mutex_unlock(&dev->mode_config.mutex);
|
||||
-
|
||||
- if (changed) {
|
||||
- /* send a uevent + call fbdev */
|
||||
- drm_sysfs_hotplug_event(dev);
|
||||
- if (dev->mode_config.funcs->output_poll_changed)
|
||||
- dev->mode_config.funcs->output_poll_changed(dev);
|
||||
- }
|
||||
-
|
||||
- if (repoll) {
|
||||
- ret = delayed_slow_work_enqueue(delayed_work, DRM_OUTPUT_POLL_PERIOD);
|
||||
- if (ret)
|
||||
- DRM_ERROR("delayed enqueue failed %d\n", ret);
|
||||
- }
|
||||
-}
|
||||
-
|
||||
-void drm_kms_helper_poll_disable(struct drm_device *dev)
|
||||
-{
|
||||
- if (!dev->mode_config.poll_enabled)
|
||||
- return;
|
||||
- delayed_slow_work_cancel(&dev->mode_config.output_poll_slow_work);
|
||||
-}
|
||||
-EXPORT_SYMBOL(drm_kms_helper_poll_disable);
|
||||
-
|
||||
-void drm_kms_helper_poll_enable(struct drm_device *dev)
|
||||
-{
|
||||
- bool poll = false;
|
||||
- struct drm_connector *connector;
|
||||
- int ret;
|
||||
-
|
||||
- list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
|
||||
- if (connector->polled)
|
||||
- poll = true;
|
||||
- }
|
||||
-
|
||||
- if (poll) {
|
||||
- ret = delayed_slow_work_enqueue(&dev->mode_config.output_poll_slow_work, DRM_OUTPUT_POLL_PERIOD);
|
||||
- if (ret)
|
||||
- DRM_ERROR("delayed enqueue failed %d\n", ret);
|
||||
- }
|
||||
-}
|
||||
-EXPORT_SYMBOL(drm_kms_helper_poll_enable);
|
||||
-
|
||||
-void drm_kms_helper_poll_init(struct drm_device *dev)
|
||||
-{
|
||||
- slow_work_register_user(THIS_MODULE);
|
||||
- delayed_slow_work_init(&dev->mode_config.output_poll_slow_work,
|
||||
- &output_poll_ops);
|
||||
- dev->mode_config.poll_enabled = true;
|
||||
-
|
||||
- drm_kms_helper_poll_enable(dev);
|
||||
-}
|
||||
-EXPORT_SYMBOL(drm_kms_helper_poll_init);
|
||||
-
|
||||
-void drm_kms_helper_poll_fini(struct drm_device *dev)
|
||||
-{
|
||||
- drm_kms_helper_poll_disable(dev);
|
||||
- slow_work_unregister_user(THIS_MODULE);
|
||||
-}
|
||||
-EXPORT_SYMBOL(drm_kms_helper_poll_fini);
|
||||
-
|
||||
-void drm_helper_hpd_irq_event(struct drm_device *dev)
|
||||
-{
|
||||
- if (!dev->mode_config.poll_enabled)
|
||||
- return;
|
||||
- delayed_slow_work_cancel(&dev->mode_config.output_poll_slow_work);
|
||||
- /* schedule a slow work asap */
|
||||
- delayed_slow_work_enqueue(&dev->mode_config.output_poll_slow_work, 0);
|
||||
-}
|
||||
-EXPORT_SYMBOL(drm_helper_hpd_irq_event);
|
||||
-
|
||||
-static struct slow_work_ops output_poll_ops = {
|
||||
- .execute = output_poll_execute,
|
||||
-};
|
||||
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
|
||||
index 08c4c92..dcc6601 100644
|
||||
--- a/drivers/gpu/drm/drm_fb_helper.c
|
||||
+++ b/drivers/gpu/drm/drm_fb_helper.c
|
||||
@@ -42,6 +42,8 @@ MODULE_LICENSE("GPL and additional rights");
|
||||
|
||||
static LIST_HEAD(kernel_fb_helper_list);
|
||||
|
||||
+static struct slow_work_ops output_status_change_ops;
|
||||
+
|
||||
/* simple single crtc case helper function */
|
||||
int drm_fb_helper_single_add_all_connectors(struct drm_fb_helper *fb_helper)
|
||||
{
|
||||
@@ -423,13 +425,19 @@ static void drm_fb_helper_crtc_free(struct drm_fb_helper *helper)
|
||||
|
||||
int drm_fb_helper_init(struct drm_device *dev,
|
||||
struct drm_fb_helper *fb_helper,
|
||||
- int crtc_count, int max_conn_count)
|
||||
+ int crtc_count, int max_conn_count,
|
||||
+ bool polled)
|
||||
{
|
||||
struct drm_crtc *crtc;
|
||||
int ret = 0;
|
||||
int i;
|
||||
|
||||
fb_helper->dev = dev;
|
||||
+ fb_helper->poll_enabled = polled;
|
||||
+
|
||||
+ slow_work_register_user(THIS_MODULE);
|
||||
+ delayed_slow_work_init(&fb_helper->output_status_change_slow_work,
|
||||
+ &output_status_change_ops);
|
||||
|
||||
INIT_LIST_HEAD(&fb_helper->kernel_fb_list);
|
||||
|
||||
@@ -486,6 +494,8 @@ void drm_fb_helper_fini(struct drm_fb_helper *fb_helper)
|
||||
|
||||
drm_fb_helper_crtc_free(fb_helper);
|
||||
|
||||
+ delayed_slow_work_cancel(&fb_helper->output_status_change_slow_work);
|
||||
+ slow_work_unregister_user(THIS_MODULE);
|
||||
}
|
||||
EXPORT_SYMBOL(drm_fb_helper_fini);
|
||||
|
||||
@@ -703,7 +713,7 @@ int drm_fb_helper_set_par(struct fb_info *info)
|
||||
|
||||
if (fb_helper->delayed_hotplug) {
|
||||
fb_helper->delayed_hotplug = false;
|
||||
- drm_fb_helper_hotplug_event(fb_helper);
|
||||
+ delayed_slow_work_enqueue(&fb_helper->output_status_change_slow_work, 0);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -816,7 +826,7 @@ int drm_fb_helper_single_fb_probe(struct drm_fb_helper *fb_helper,
|
||||
if (crtc_count == 0 || sizes.fb_width == -1 || sizes.fb_height == -1) {
|
||||
/* hmm everyone went away - assume VGA cable just fell out
|
||||
and will come back later. */
|
||||
- DRM_INFO("Cannot find any crtc or sizes - going 1024x768\n");
|
||||
+ DRM_ERROR("Cannot find any crtc or sizes - going 1024x768\n");
|
||||
sizes.fb_width = sizes.surface_width = 1024;
|
||||
sizes.fb_height = sizes.surface_height = 768;
|
||||
}
|
||||
@@ -1362,7 +1372,12 @@ bool drm_fb_helper_initial_config(struct drm_fb_helper *fb_helper, int bpp_sel)
|
||||
* we shouldn't end up with no modes here.
|
||||
*/
|
||||
if (count == 0) {
|
||||
- printk(KERN_INFO "No connectors reported connected with modes\n");
|
||||
+ if (fb_helper->poll_enabled) {
|
||||
+ delayed_slow_work_enqueue(&fb_helper->output_status_change_slow_work,
|
||||
+ 5*HZ);
|
||||
+ printk(KERN_INFO "No connectors reported connected with modes - started polling\n");
|
||||
+ } else
|
||||
+ printk(KERN_INFO "No connectors reported connected with modes\n");
|
||||
}
|
||||
drm_setup_crtcs(fb_helper);
|
||||
|
||||
@@ -1370,16 +1385,71 @@ bool drm_fb_helper_initial_config(struct drm_fb_helper *fb_helper, int bpp_sel)
|
||||
}
|
||||
EXPORT_SYMBOL(drm_fb_helper_initial_config);
|
||||
|
||||
-bool drm_fb_helper_hotplug_event(struct drm_fb_helper *fb_helper)
|
||||
+/* we got a hotplug irq - need to update fbcon */
|
||||
+void drm_helper_fb_hpd_irq_event(struct drm_fb_helper *fb_helper)
|
||||
+{
|
||||
+ /* if we don't have the fbdev registered yet do nothing */
|
||||
+ if (!fb_helper->fbdev)
|
||||
+ return;
|
||||
+
|
||||
+ /* schedule a slow work asap */
|
||||
+ delayed_slow_work_enqueue(&fb_helper->output_status_change_slow_work, 0);
|
||||
+}
|
||||
+EXPORT_SYMBOL(drm_helper_fb_hpd_irq_event);
|
||||
+
|
||||
+bool drm_helper_fb_hotplug_event(struct drm_fb_helper *fb_helper, bool polled)
|
||||
{
|
||||
int count = 0;
|
||||
+ int ret;
|
||||
u32 max_width, max_height, bpp_sel;
|
||||
- bool bound = false, crtcs_bound = false;
|
||||
- struct drm_crtc *crtc;
|
||||
|
||||
if (!fb_helper->fb)
|
||||
return false;
|
||||
+ DRM_DEBUG_KMS("\n");
|
||||
+
|
||||
+ max_width = fb_helper->fb->width;
|
||||
+ max_height = fb_helper->fb->height;
|
||||
+ bpp_sel = fb_helper->fb->bits_per_pixel;
|
||||
+
|
||||
+ count = drm_fb_helper_probe_connector_modes(fb_helper, max_width,
|
||||
+ max_height);
|
||||
+ if (fb_helper->poll_enabled && !polled) {
|
||||
+ if (count) {
|
||||
+ delayed_slow_work_cancel(&fb_helper->output_status_change_slow_work);
|
||||
+ } else {
|
||||
+ ret = delayed_slow_work_enqueue(&fb_helper->output_status_change_slow_work, 5*HZ);
|
||||
+ }
|
||||
+ }
|
||||
+ drm_setup_crtcs(fb_helper);
|
||||
+
|
||||
+ return drm_fb_helper_single_fb_probe(fb_helper, bpp_sel);
|
||||
+}
|
||||
+EXPORT_SYMBOL(drm_helper_fb_hotplug_event);
|
||||
+
|
||||
+/*
|
||||
+ * delayed work queue execution function
|
||||
+ * - check if fbdev is actually in use on the gpu
|
||||
+ * - if not set delayed flag and repoll if necessary
|
||||
+ * - check for connector status change
|
||||
+ * - repoll if 0 modes found
|
||||
+ *- call driver output status changed notifier
|
||||
+ */
|
||||
+static void output_status_change_execute(struct slow_work *work)
|
||||
+{
|
||||
+ struct delayed_slow_work *delayed_work = container_of(work, struct delayed_slow_work, work);
|
||||
+ struct drm_fb_helper *fb_helper = container_of(delayed_work, struct drm_fb_helper, output_status_change_slow_work);
|
||||
+ struct drm_connector *connector;
|
||||
+ enum drm_connector_status old_status, status;
|
||||
+ bool repoll, changed = false;
|
||||
+ int ret;
|
||||
+ int i;
|
||||
+ bool bound = false, crtcs_bound = false;
|
||||
+ struct drm_crtc *crtc;
|
||||
|
||||
+ repoll = fb_helper->poll_enabled;
|
||||
+
|
||||
+ /* first of all check the fbcon framebuffer is actually bound to any crtc */
|
||||
+ /* take into account that no crtc at all maybe bound */
|
||||
list_for_each_entry(crtc, &fb_helper->dev->mode_config.crtc_list, head) {
|
||||
if (crtc->fb)
|
||||
crtcs_bound = true;
|
||||
@@ -1387,21 +1457,38 @@ bool drm_fb_helper_hotplug_event(struct drm_fb_helper *fb_helper)
|
||||
bound = true;
|
||||
}
|
||||
|
||||
- if (!bound && crtcs_bound) {
|
||||
+ if (bound == false && crtcs_bound) {
|
||||
fb_helper->delayed_hotplug = true;
|
||||
- return false;
|
||||
+ goto requeue;
|
||||
}
|
||||
- DRM_DEBUG_KMS("\n");
|
||||
|
||||
- max_width = fb_helper->fb->width;
|
||||
- max_height = fb_helper->fb->height;
|
||||
- bpp_sel = fb_helper->fb->bits_per_pixel;
|
||||
+ for (i = 0; i < fb_helper->connector_count; i++) {
|
||||
+ connector = fb_helper->connector_info[i]->connector;
|
||||
+ old_status = connector->status;
|
||||
+ status = connector->funcs->detect(connector);
|
||||
+ if (old_status != status) {
|
||||
+ changed = true;
|
||||
+ }
|
||||
+ if (status == connector_status_connected && repoll) {
|
||||
+ DRM_DEBUG("%s is connected - stop polling\n", drm_get_connector_name(connector));
|
||||
+ repoll = false;
|
||||
+ }
|
||||
+ }
|
||||
|
||||
- count = drm_fb_helper_probe_connector_modes(fb_helper, max_width,
|
||||
- max_height);
|
||||
- drm_setup_crtcs(fb_helper);
|
||||
+ if (changed) {
|
||||
+ if (fb_helper->funcs->fb_output_status_changed)
|
||||
+ fb_helper->funcs->fb_output_status_changed(fb_helper);
|
||||
+ }
|
||||
|
||||
- return drm_fb_helper_single_fb_probe(fb_helper, bpp_sel);
|
||||
+requeue:
|
||||
+ if (repoll) {
|
||||
+ ret = delayed_slow_work_enqueue(delayed_work, 5*HZ);
|
||||
+ if (ret)
|
||||
+ DRM_ERROR("delayed enqueue failed %d\n", ret);
|
||||
+ }
|
||||
}
|
||||
-EXPORT_SYMBOL(drm_fb_helper_hotplug_event);
|
||||
+
|
||||
+static struct slow_work_ops output_status_change_ops = {
|
||||
+ .execute = output_status_change_execute,
|
||||
+};
|
||||
|
||||
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
|
||||
index 59a2bf8..76ace2d 100644
|
||||
--- a/drivers/gpu/drm/i915/i915_dma.c
|
||||
+++ b/drivers/gpu/drm/i915/i915_dma.c
|
||||
@@ -1430,7 +1430,6 @@ static int i915_load_modeset_init(struct drm_device *dev,
|
||||
if (ret)
|
||||
goto cleanup_irq;
|
||||
|
||||
- drm_kms_helper_poll_init(dev);
|
||||
return 0;
|
||||
|
||||
cleanup_irq:
|
||||
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
|
||||
index 2479be0..6350bd3 100644
|
||||
--- a/drivers/gpu/drm/i915/i915_irq.c
|
||||
+++ b/drivers/gpu/drm/i915/i915_irq.c
|
||||
@@ -271,7 +271,8 @@ static void i915_hotplug_work_func(struct work_struct *work)
|
||||
}
|
||||
}
|
||||
/* Just fire off a uevent and let userspace tell us what to do */
|
||||
- drm_helper_hpd_irq_event(dev);
|
||||
+ intelfb_hotplug(dev, false);
|
||||
+ drm_sysfs_hotplug_event(dev);
|
||||
}
|
||||
|
||||
static void i915_handle_rps_change(struct drm_device *dev)
|
||||
diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c
|
||||
index 22ff384..125eded 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_crt.c
|
||||
+++ b/drivers/gpu/drm/i915/intel_crt.c
|
||||
@@ -584,10 +584,5 @@ void intel_crt_init(struct drm_device *dev)
|
||||
|
||||
drm_sysfs_connector_add(connector);
|
||||
|
||||
- if (I915_HAS_HOTPLUG(dev))
|
||||
- connector->polled = DRM_CONNECTOR_POLL_HPD;
|
||||
- else
|
||||
- connector->polled = DRM_CONNECTOR_POLL_CONNECT;
|
||||
-
|
||||
dev_priv->hotplug_supported_mask |= CRT_HOTPLUG_INT_STATUS;
|
||||
}
|
||||
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
|
||||
index d753257..70537cf 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_display.c
|
||||
+++ b/drivers/gpu/drm/i915/intel_display.c
|
||||
@@ -5036,7 +5036,6 @@ intel_user_framebuffer_create(struct drm_device *dev,
|
||||
|
||||
static const struct drm_mode_config_funcs intel_mode_funcs = {
|
||||
.fb_create = intel_user_framebuffer_create,
|
||||
- .output_poll_changed = intel_fb_output_poll_changed,
|
||||
};
|
||||
|
||||
static struct drm_gem_object *
|
||||
@@ -5538,7 +5537,6 @@ void intel_modeset_cleanup(struct drm_device *dev)
|
||||
|
||||
mutex_lock(&dev->struct_mutex);
|
||||
|
||||
- drm_kms_helper_poll_fini(dev);
|
||||
intel_fbdev_fini(dev);
|
||||
|
||||
list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
|
||||
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
|
||||
index 49b54f0..1815df5 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_dp.c
|
||||
+++ b/drivers/gpu/drm/i915/intel_dp.c
|
||||
@@ -1393,8 +1393,6 @@ intel_dp_init(struct drm_device *dev, int output_reg)
|
||||
DRM_MODE_CONNECTOR_DisplayPort);
|
||||
drm_connector_helper_add(connector, &intel_dp_connector_helper_funcs);
|
||||
|
||||
- connector->polled = DRM_CONNECTOR_POLL_HPD;
|
||||
-
|
||||
if (output_reg == DP_A)
|
||||
intel_encoder->type = INTEL_OUTPUT_EDP;
|
||||
else
|
||||
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
|
||||
index df931f7..3230e8d 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_drv.h
|
||||
+++ b/drivers/gpu/drm/i915/intel_drv.h
|
||||
@@ -235,5 +235,5 @@ extern int intel_overlay_put_image(struct drm_device *dev, void *data,
|
||||
extern int intel_overlay_attrs(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
|
||||
-extern void intel_fb_output_poll_changed(struct drm_device *dev);
|
||||
+void intelfb_hotplug(struct drm_device *dev, bool polled);
|
||||
#endif /* __INTEL_DRV_H__ */
|
||||
diff --git a/drivers/gpu/drm/i915/intel_fb.c b/drivers/gpu/drm/i915/intel_fb.c
|
||||
index c3c5052..79098b3 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_fb.c
|
||||
+++ b/drivers/gpu/drm/i915/intel_fb.c
|
||||
@@ -211,6 +211,12 @@ static int intel_fb_find_or_create_single(struct drm_fb_helper *helper,
|
||||
return new_fb;
|
||||
}
|
||||
|
||||
+void intelfb_hotplug(struct drm_device *dev, bool polled)
|
||||
+{
|
||||
+ drm_i915_private_t *dev_priv = dev->dev_private;
|
||||
+ drm_helper_fb_hpd_irq_event(&dev_priv->fbdev->helper);
|
||||
+}
|
||||
+
|
||||
static struct drm_fb_helper_funcs intel_fb_helper_funcs = {
|
||||
.gamma_set = intel_crtc_fb_gamma_set,
|
||||
.gamma_get = intel_crtc_fb_gamma_get,
|
||||
@@ -256,7 +262,7 @@ int intel_fbdev_init(struct drm_device *dev)
|
||||
|
||||
ret = drm_fb_helper_init(dev, &ifbdev->helper,
|
||||
dev_priv->num_pipe,
|
||||
- INTELFB_CONN_LIMIT);
|
||||
+ INTELFB_CONN_LIMIT, false);
|
||||
if (ret) {
|
||||
kfree(ifbdev);
|
||||
return ret;
|
||||
@@ -278,9 +284,3 @@ void intel_fbdev_fini(struct drm_device *dev)
|
||||
dev_priv->fbdev = NULL;
|
||||
}
|
||||
MODULE_LICENSE("GPL and additional rights");
|
||||
-
|
||||
-void intel_fb_output_poll_changed(struct drm_device *dev)
|
||||
-{
|
||||
- drm_i915_private_t *dev_priv = dev->dev_private;
|
||||
- drm_fb_helper_hotplug_event(&dev_priv->fbdev->helper);
|
||||
-}
|
||||
diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
|
||||
index 83bd764..acaca07 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_hdmi.c
|
||||
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
|
||||
@@ -240,7 +240,6 @@ void intel_hdmi_init(struct drm_device *dev, int sdvox_reg)
|
||||
|
||||
intel_encoder->type = INTEL_OUTPUT_HDMI;
|
||||
|
||||
- connector->polled = DRM_CONNECTOR_POLL_HPD;
|
||||
connector->interlace_allowed = 0;
|
||||
connector->doublescan_allowed = 0;
|
||||
intel_encoder->crtc_mask = (1 << 0) | (1 << 1);
|
||||
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
|
||||
index 76993ac..1c716b5 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_sdvo.c
|
||||
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
|
||||
@@ -2218,7 +2218,6 @@ intel_sdvo_dvi_init(struct intel_encoder *intel_encoder, int device)
|
||||
}
|
||||
|
||||
connector = &intel_connector->base;
|
||||
- connector->polled = DRM_CONNECTOR_POLL_CONNECT | DRM_CONNECTOR_POLL_DISCONNECT;
|
||||
encoder->encoder_type = DRM_MODE_ENCODER_TMDS;
|
||||
connector->connector_type = DRM_MODE_CONNECTOR_DVID;
|
||||
|
||||
@@ -2285,7 +2284,6 @@ intel_sdvo_analog_init(struct intel_encoder *intel_encoder, int device)
|
||||
return false;
|
||||
|
||||
connector = &intel_connector->base;
|
||||
- connector->polled = DRM_CONNECTOR_POLL_CONNECT;
|
||||
encoder->encoder_type = DRM_MODE_ENCODER_DAC;
|
||||
connector->connector_type = DRM_MODE_CONNECTOR_VGA;
|
||||
sdvo_connector = intel_connector->dev_priv;
|
||||
diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c
|
||||
index 149ed22..9a61f3c 100644
|
||||
--- a/drivers/gpu/drm/nouveau/nouveau_connector.c
|
||||
+++ b/drivers/gpu/drm/nouveau/nouveau_connector.c
|
||||
@@ -846,7 +846,6 @@ nouveau_connector_create(struct drm_device *dev,
|
||||
|
||||
switch (dcb->type) {
|
||||
case DCB_CONNECTOR_VGA:
|
||||
- connector->polled = DRM_CONNECTOR_POLL_CONNECT;
|
||||
if (dev_priv->card_type >= NV_50) {
|
||||
drm_connector_attach_property(connector,
|
||||
dev->mode_config.scaling_mode_property,
|
||||
@@ -858,17 +857,6 @@ nouveau_connector_create(struct drm_device *dev,
|
||||
case DCB_CONNECTOR_TV_3:
|
||||
nv_connector->scaling_mode = DRM_MODE_SCALE_NONE;
|
||||
break;
|
||||
- case DCB_CONNECTOR_DP:
|
||||
- case DCB_CONNECTOR_eDP:
|
||||
- case DCB_CONNECTOR_HDMI_0:
|
||||
- case DCB_CONNECTOR_HDMI_1:
|
||||
- case DCB_CONNECTOR_DVI_I:
|
||||
- case DCB_CONNECTOR_DVI_D:
|
||||
- if (dev_priv->card_type >= NV_50)
|
||||
- connector->polled = DRM_CONNECTOR_POLL_HPD;
|
||||
- else
|
||||
- connector->polled = DRM_CONNECTOR_POLL_CONNECT;
|
||||
- /* fall-through */
|
||||
default:
|
||||
nv_connector->scaling_mode = DRM_MODE_SCALE_FULLSCREEN;
|
||||
|
||||
diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c
|
||||
index 74e6b4e..9d7928f 100644
|
||||
--- a/drivers/gpu/drm/nouveau/nouveau_display.c
|
||||
+++ b/drivers/gpu/drm/nouveau/nouveau_display.c
|
||||
@@ -101,6 +101,5 @@ nouveau_user_framebuffer_create(struct drm_device *dev,
|
||||
|
||||
const struct drm_mode_config_funcs nouveau_mode_config_funcs = {
|
||||
.fb_create = nouveau_user_framebuffer_create,
|
||||
- .output_poll_changed = nouveau_fbcon_output_poll_changed,
|
||||
};
|
||||
|
||||
diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
|
||||
index c9a4a0d..0a59f96 100644
|
||||
--- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c
|
||||
+++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
|
||||
@@ -326,11 +326,15 @@ nouveau_fbcon_find_or_create_single(struct drm_fb_helper *helper,
|
||||
return new_fb;
|
||||
}
|
||||
|
||||
-void
|
||||
-nouveau_fbcon_output_poll_changed(struct drm_device *dev)
|
||||
+void nouveau_fbcon_hotplug(struct drm_device *dev)
|
||||
{
|
||||
struct drm_nouveau_private *dev_priv = dev->dev_private;
|
||||
- drm_fb_helper_hotplug_event(&dev_priv->nfbdev->helper);
|
||||
+ drm_helper_fb_hpd_irq_event(&dev_priv->nfbdev->helper);
|
||||
+}
|
||||
+
|
||||
+static void nouveau_fbcon_output_status_changed(struct drm_fb_helper *fb_helper)
|
||||
+{
|
||||
+ drm_helper_fb_hotplug_event(fb_helper, true);
|
||||
}
|
||||
|
||||
int
|
||||
@@ -370,6 +374,7 @@ static struct drm_fb_helper_funcs nouveau_fbcon_helper_funcs = {
|
||||
.gamma_set = nouveau_fbcon_gamma_set,
|
||||
.gamma_get = nouveau_fbcon_gamma_get,
|
||||
.fb_probe = nouveau_fbcon_find_or_create_single,
|
||||
+ .fb_output_status_changed = nouveau_fbcon_output_status_changed,
|
||||
};
|
||||
|
||||
|
||||
@@ -387,7 +392,7 @@ int nouveau_fbcon_init(struct drm_device *dev)
|
||||
dev_priv->nfbdev = nfbdev;
|
||||
nfbdev->helper.funcs = &nouveau_fbcon_helper_funcs;
|
||||
|
||||
- ret = drm_fb_helper_init(dev, &nfbdev->helper, 2, 4);
|
||||
+ ret = drm_fb_helper_init(dev, &nfbdev->helper, 2, 4, true);
|
||||
if (ret) {
|
||||
kfree(nfbdev);
|
||||
return ret;
|
||||
diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.h b/drivers/gpu/drm/nouveau/nouveau_fbcon.h
|
||||
index e7e1268..bf8e00d 100644
|
||||
--- a/drivers/gpu/drm/nouveau/nouveau_fbcon.h
|
||||
+++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.h
|
||||
@@ -58,6 +58,6 @@ void nouveau_fbcon_zfill_all(struct drm_device *dev);
|
||||
void nouveau_fbcon_save_disable_accel(struct drm_device *dev);
|
||||
void nouveau_fbcon_restore_accel(struct drm_device *dev);
|
||||
|
||||
-void nouveau_fbcon_output_poll_changed(struct drm_device *dev);
|
||||
+void nouveau_fbcon_hotplug(struct drm_device *dev);
|
||||
#endif /* __NV50_FBCON_H__ */
|
||||
|
||||
diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c b/drivers/gpu/drm/nouveau/nouveau_state.c
|
||||
index b02a231..4dcb976 100644
|
||||
--- a/drivers/gpu/drm/nouveau/nouveau_state.c
|
||||
+++ b/drivers/gpu/drm/nouveau/nouveau_state.c
|
||||
@@ -519,10 +519,8 @@ nouveau_card_init(struct drm_device *dev)
|
||||
|
||||
dev_priv->init_state = NOUVEAU_CARD_INIT_DONE;
|
||||
|
||||
- if (drm_core_check_feature(dev, DRIVER_MODESET)) {
|
||||
+ if (drm_core_check_feature(dev, DRIVER_MODESET))
|
||||
nouveau_fbcon_init(dev);
|
||||
- drm_kms_helper_poll_init(dev);
|
||||
- }
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -844,7 +842,6 @@ int nouveau_unload(struct drm_device *dev)
|
||||
struct drm_nouveau_private *dev_priv = dev->dev_private;
|
||||
|
||||
if (drm_core_check_feature(dev, DRIVER_MODESET)) {
|
||||
- drm_kms_helper_poll_fini(dev);
|
||||
nouveau_fbcon_fini(dev);
|
||||
if (dev_priv->card_type >= NV_50)
|
||||
nv50_display_destroy(dev);
|
||||
diff --git a/drivers/gpu/drm/nouveau/nv50_display.c b/drivers/gpu/drm/nouveau/nv50_display.c
|
||||
index 580a5d1..e6a44af 100644
|
||||
--- a/drivers/gpu/drm/nouveau/nv50_display.c
|
||||
+++ b/drivers/gpu/drm/nouveau/nv50_display.c
|
||||
@@ -980,7 +980,7 @@ nv50_display_irq_hotplug_bh(struct work_struct *work)
|
||||
if (dev_priv->chipset >= 0x90)
|
||||
nv_wr32(dev, 0xe074, nv_rd32(dev, 0xe074));
|
||||
|
||||
- drm_helper_hpd_irq_event(dev);
|
||||
+ nouveau_fbcon_hotplug(dev);
|
||||
}
|
||||
|
||||
void
|
||||
diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c
|
||||
index 0c7ccc6..40a24c9 100644
|
||||
--- a/drivers/gpu/drm/radeon/radeon_connectors.c
|
||||
+++ b/drivers/gpu/drm/radeon/radeon_connectors.c
|
||||
@@ -1085,7 +1085,6 @@ radeon_add_atom_connector(struct drm_device *dev,
|
||||
drm_connector_attach_property(&radeon_connector->base,
|
||||
rdev->mode_info.load_detect_property,
|
||||
1);
|
||||
- connector->polled = DRM_CONNECTOR_POLL_CONNECT;
|
||||
break;
|
||||
case DRM_MODE_CONNECTOR_DVIA:
|
||||
drm_connector_init(dev, &radeon_connector->base, &radeon_vga_connector_funcs, connector_type);
|
||||
@@ -1212,12 +1211,6 @@ radeon_add_atom_connector(struct drm_device *dev,
|
||||
break;
|
||||
}
|
||||
|
||||
- if (hpd->hpd == RADEON_HPD_NONE) {
|
||||
- if (i2c_bus->valid)
|
||||
- connector->polled = DRM_CONNECTOR_POLL_CONNECT;
|
||||
- } else
|
||||
- connector->polled = DRM_CONNECTOR_POLL_HPD;
|
||||
-
|
||||
connector->display_info.subpixel_order = subpixel_order;
|
||||
drm_sysfs_connector_add(connector);
|
||||
return;
|
||||
@@ -1279,7 +1272,6 @@ radeon_add_legacy_connector(struct drm_device *dev,
|
||||
drm_connector_attach_property(&radeon_connector->base,
|
||||
rdev->mode_info.load_detect_property,
|
||||
1);
|
||||
- connector->polled = DRM_CONNECTOR_POLL_CONNECT;
|
||||
break;
|
||||
case DRM_MODE_CONNECTOR_DVIA:
|
||||
drm_connector_init(dev, &radeon_connector->base, &radeon_vga_connector_funcs, connector_type);
|
||||
@@ -1348,11 +1340,6 @@ radeon_add_legacy_connector(struct drm_device *dev,
|
||||
break;
|
||||
}
|
||||
|
||||
- if (hpd->hpd == RADEON_HPD_NONE) {
|
||||
- if (i2c_bus->valid)
|
||||
- connector->polled = DRM_CONNECTOR_POLL_CONNECT;
|
||||
- } else
|
||||
- connector->polled = DRM_CONNECTOR_POLL_HPD;
|
||||
connector->display_info.subpixel_order = subpixel_order;
|
||||
drm_sysfs_connector_add(connector);
|
||||
return;
|
||||
diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c
|
||||
index c73444a..ed756be 100644
|
||||
--- a/drivers/gpu/drm/radeon/radeon_display.c
|
||||
+++ b/drivers/gpu/drm/radeon/radeon_display.c
|
||||
@@ -887,15 +887,8 @@ radeon_user_framebuffer_create(struct drm_device *dev,
|
||||
return &radeon_fb->base;
|
||||
}
|
||||
|
||||
-static void radeon_output_poll_changed(struct drm_device *dev)
|
||||
-{
|
||||
- struct radeon_device *rdev = dev->dev_private;
|
||||
- radeon_fb_output_poll_changed(rdev);
|
||||
-}
|
||||
-
|
||||
static const struct drm_mode_config_funcs radeon_mode_funcs = {
|
||||
.fb_create = radeon_user_framebuffer_create,
|
||||
- .output_poll_changed = radeon_output_poll_changed
|
||||
};
|
||||
|
||||
struct drm_prop_enum_list {
|
||||
@@ -1044,8 +1037,6 @@ int radeon_modeset_init(struct radeon_device *rdev)
|
||||
radeon_pm_init(rdev);
|
||||
|
||||
radeon_fbdev_init(rdev);
|
||||
- drm_kms_helper_poll_init(rdev->ddev);
|
||||
-
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1058,7 +1049,6 @@ void radeon_modeset_fini(struct radeon_device *rdev)
|
||||
radeon_pm_fini(rdev);
|
||||
|
||||
if (rdev->mode_info.mode_config_initialized) {
|
||||
- drm_kms_helper_poll_fini(rdev->ddev);
|
||||
radeon_hpd_fini(rdev);
|
||||
drm_mode_config_cleanup(rdev->ddev);
|
||||
rdev->mode_info.mode_config_initialized = false;
|
||||
diff --git a/drivers/gpu/drm/radeon/radeon_fb.c b/drivers/gpu/drm/radeon/radeon_fb.c
|
||||
index dc1634b..7dc38f6 100644
|
||||
--- a/drivers/gpu/drm/radeon/radeon_fb.c
|
||||
+++ b/drivers/gpu/drm/radeon/radeon_fb.c
|
||||
@@ -316,9 +316,16 @@ int radeon_parse_options(char *options)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-void radeon_fb_output_poll_changed(struct radeon_device *rdev)
|
||||
+void radeonfb_hotplug(struct drm_device *dev, bool polled)
|
||||
{
|
||||
- drm_fb_helper_hotplug_event(&rdev->mode_info.rfbdev->helper);
|
||||
+ struct radeon_device *rdev = dev->dev_private;
|
||||
+
|
||||
+ drm_helper_fb_hpd_irq_event(&rdev->mode_info.rfbdev->helper);
|
||||
+}
|
||||
+
|
||||
+static void radeon_fb_output_status_changed(struct drm_fb_helper *fb_helper)
|
||||
+{
|
||||
+ drm_helper_fb_hotplug_event(fb_helper, true);
|
||||
}
|
||||
|
||||
static int radeon_fbdev_destroy(struct drm_device *dev, struct radeon_fbdev *rfbdev)
|
||||
@@ -357,6 +364,7 @@ static struct drm_fb_helper_funcs radeon_fb_helper_funcs = {
|
||||
.gamma_set = radeon_crtc_fb_gamma_set,
|
||||
.gamma_get = radeon_crtc_fb_gamma_get,
|
||||
.fb_probe = radeon_fb_find_or_create_single,
|
||||
+ .fb_output_status_changed = radeon_fb_output_status_changed,
|
||||
};
|
||||
|
||||
int radeon_fbdev_init(struct radeon_device *rdev)
|
||||
@@ -379,7 +387,7 @@ int radeon_fbdev_init(struct radeon_device *rdev)
|
||||
|
||||
ret = drm_fb_helper_init(rdev->ddev, &rfbdev->helper,
|
||||
rdev->num_crtc,
|
||||
- RADEONFB_CONN_LIMIT);
|
||||
+ RADEONFB_CONN_LIMIT, true);
|
||||
if (ret) {
|
||||
kfree(rfbdev);
|
||||
return ret;
|
||||
@@ -388,6 +396,7 @@ int radeon_fbdev_init(struct radeon_device *rdev)
|
||||
drm_fb_helper_single_add_all_connectors(&rfbdev->helper);
|
||||
drm_fb_helper_initial_config(&rfbdev->helper, bpp_sel);
|
||||
return 0;
|
||||
+
|
||||
}
|
||||
|
||||
void radeon_fbdev_fini(struct radeon_device *rdev)
|
||||
diff --git a/drivers/gpu/drm/radeon/radeon_irq_kms.c b/drivers/gpu/drm/radeon/radeon_irq_kms.c
|
||||
index 059bfa4..b0178de 100644
|
||||
--- a/drivers/gpu/drm/radeon/radeon_irq_kms.c
|
||||
+++ b/drivers/gpu/drm/radeon/radeon_irq_kms.c
|
||||
@@ -26,7 +26,6 @@
|
||||
* Jerome Glisse
|
||||
*/
|
||||
#include "drmP.h"
|
||||
-#include "drm_crtc_helper.h"
|
||||
#include "radeon_drm.h"
|
||||
#include "radeon_reg.h"
|
||||
#include "radeon.h"
|
||||
@@ -56,7 +55,9 @@ static void radeon_hotplug_work_func(struct work_struct *work)
|
||||
radeon_connector_hotplug(connector);
|
||||
}
|
||||
/* Just fire off a uevent and let userspace tell us what to do */
|
||||
- drm_helper_hpd_irq_event(dev);
|
||||
+ radeonfb_hotplug(dev, false);
|
||||
+
|
||||
+ drm_sysfs_hotplug_event(dev);
|
||||
}
|
||||
|
||||
void radeon_driver_irq_preinstall_kms(struct drm_device *dev)
|
||||
diff --git a/drivers/gpu/drm/radeon/radeon_mode.h b/drivers/gpu/drm/radeon/radeon_mode.h
|
||||
index 67358ba..fdd1611 100644
|
||||
--- a/drivers/gpu/drm/radeon/radeon_mode.h
|
||||
+++ b/drivers/gpu/drm/radeon/radeon_mode.h
|
||||
@@ -588,6 +588,5 @@ void radeon_fbdev_fini(struct radeon_device *rdev);
|
||||
void radeon_fbdev_set_suspend(struct radeon_device *rdev, int state);
|
||||
int radeon_fbdev_total_size(struct radeon_device *rdev);
|
||||
bool radeon_fbdev_robj_is_fb(struct radeon_device *rdev, struct radeon_bo *robj);
|
||||
-
|
||||
-void radeon_fb_output_poll_changed(struct radeon_device *rdev);
|
||||
+void radeonfb_hotplug(struct drm_device *dev, bool polled);
|
||||
#endif
|
||||
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
|
||||
index 93a1a31..a7148d2 100644
|
||||
--- a/include/drm/drm_crtc.h
|
||||
+++ b/include/drm/drm_crtc.h
|
||||
@@ -31,7 +31,6 @@
|
||||
#include <linux/idr.h>
|
||||
|
||||
#include <linux/fb.h>
|
||||
-#include <linux/slow-work.h>
|
||||
|
||||
struct drm_device;
|
||||
struct drm_mode_set;
|
||||
@@ -461,15 +460,6 @@ enum drm_connector_force {
|
||||
DRM_FORCE_ON_DIGITAL, /* for DVI-I use digital connector */
|
||||
};
|
||||
|
||||
-/* should we poll this connector for connects and disconnects */
|
||||
-/* hot plug detectable */
|
||||
-#define DRM_CONNECTOR_POLL_HPD (1 << 0)
|
||||
-/* poll for connections */
|
||||
-#define DRM_CONNECTOR_POLL_CONNECT (1 << 1)
|
||||
-/* can cleanly poll for disconnections without flickering the screen */
|
||||
-/* DACs should rarely do this without a lot of testing */
|
||||
-#define DRM_CONNECTOR_POLL_DISCONNECT (1 << 2)
|
||||
-
|
||||
/**
|
||||
* drm_connector - central DRM connector control structure
|
||||
* @crtc: CRTC this connector is currently connected to, NULL if none
|
||||
@@ -514,8 +504,6 @@ struct drm_connector {
|
||||
u32 property_ids[DRM_CONNECTOR_MAX_PROPERTY];
|
||||
uint64_t property_values[DRM_CONNECTOR_MAX_PROPERTY];
|
||||
|
||||
- uint8_t polled; /* DRM_CONNECTOR_POLL_* */
|
||||
-
|
||||
/* requested DPMS state */
|
||||
int dpms;
|
||||
|
||||
@@ -555,7 +543,6 @@ struct drm_mode_set {
|
||||
*/
|
||||
struct drm_mode_config_funcs {
|
||||
struct drm_framebuffer *(*fb_create)(struct drm_device *dev, struct drm_file *file_priv, struct drm_mode_fb_cmd *mode_cmd);
|
||||
- void (*output_poll_changed)(struct drm_device *dev);
|
||||
};
|
||||
|
||||
struct drm_mode_group {
|
||||
@@ -593,10 +580,6 @@ struct drm_mode_config {
|
||||
struct drm_mode_config_funcs *funcs;
|
||||
resource_size_t fb_base;
|
||||
|
||||
- /* output poll support */
|
||||
- bool poll_enabled;
|
||||
- struct delayed_slow_work output_poll_slow_work;
|
||||
-
|
||||
/* pointers to standard properties */
|
||||
struct list_head property_blob_list;
|
||||
struct drm_property *edid_property;
|
||||
diff --git a/include/drm/drm_crtc_helper.h b/include/drm/drm_crtc_helper.h
|
||||
index 1121f77..b1fa0f8 100644
|
||||
--- a/include/drm/drm_crtc_helper.h
|
||||
+++ b/include/drm/drm_crtc_helper.h
|
||||
@@ -127,10 +127,4 @@ static inline void drm_connector_helper_add(struct drm_connector *connector,
|
||||
}
|
||||
|
||||
extern int drm_helper_resume_force_mode(struct drm_device *dev);
|
||||
-extern void drm_kms_helper_poll_init(struct drm_device *dev);
|
||||
-extern void drm_kms_helper_poll_fini(struct drm_device *dev);
|
||||
-extern void drm_helper_hpd_irq_event(struct drm_device *dev);
|
||||
-
|
||||
-extern void drm_kms_helper_poll_disable(struct drm_device *dev);
|
||||
-extern void drm_kms_helper_poll_enable(struct drm_device *dev);
|
||||
#endif
|
||||
diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h
|
||||
index f0a6afc..9b55a94 100644
|
||||
--- a/include/drm/drm_fb_helper.h
|
||||
+++ b/include/drm/drm_fb_helper.h
|
||||
@@ -30,6 +30,8 @@
|
||||
#ifndef DRM_FB_HELPER_H
|
||||
#define DRM_FB_HELPER_H
|
||||
|
||||
+#include <linux/slow-work.h>
|
||||
+
|
||||
struct drm_fb_helper;
|
||||
|
||||
struct drm_fb_helper_crtc {
|
||||
@@ -69,6 +71,9 @@ struct drm_fb_helper_funcs {
|
||||
|
||||
int (*fb_probe)(struct drm_fb_helper *helper,
|
||||
struct drm_fb_helper_surface_size *sizes);
|
||||
+
|
||||
+ void (*fb_output_status_changed)(struct drm_fb_helper *helper);
|
||||
+
|
||||
};
|
||||
|
||||
struct drm_fb_helper_connector {
|
||||
@@ -90,6 +95,8 @@ struct drm_fb_helper {
|
||||
u32 pseudo_palette[17];
|
||||
struct list_head kernel_fb_list;
|
||||
|
||||
+ struct delayed_slow_work output_status_change_slow_work;
|
||||
+ bool poll_enabled;
|
||||
/* we got a hotplug but fbdev wasn't running the console
|
||||
delay until next set_par */
|
||||
bool delayed_hotplug;
|
||||
@@ -100,7 +107,7 @@ int drm_fb_helper_single_fb_probe(struct drm_fb_helper *helper,
|
||||
|
||||
int drm_fb_helper_init(struct drm_device *dev,
|
||||
struct drm_fb_helper *helper, int crtc_count,
|
||||
- int max_conn);
|
||||
+ int max_conn, bool polled);
|
||||
void drm_fb_helper_fini(struct drm_fb_helper *helper);
|
||||
int drm_fb_helper_blank(int blank, struct fb_info *info);
|
||||
int drm_fb_helper_pan_display(struct fb_var_screeninfo *var,
|
||||
@@ -123,8 +130,10 @@ void drm_fb_helper_fill_fix(struct fb_info *info, uint32_t pitch,
|
||||
|
||||
int drm_fb_helper_setcmap(struct fb_cmap *cmap, struct fb_info *info);
|
||||
|
||||
-bool drm_fb_helper_hotplug_event(struct drm_fb_helper *fb_helper);
|
||||
+bool drm_helper_fb_hotplug_event(struct drm_fb_helper *fb_helper,
|
||||
+ bool polled);
|
||||
bool drm_fb_helper_initial_config(struct drm_fb_helper *fb_helper, int bpp_sel);
|
||||
int drm_fb_helper_single_add_all_connectors(struct drm_fb_helper *fb_helper);
|
||||
|
||||
+void drm_helper_fb_hpd_irq_event(struct drm_fb_helper *fb_helper);
|
||||
#endif
|
||||
--
|
||||
1.7.0.1
|
||||
|
33
ethtool-fix-buffer-overflow.patch
Normal file
33
ethtool-fix-buffer-overflow.patch
Normal file
@ -0,0 +1,33 @@
|
||||
From: Ben Hutchings <bhutchings@solarflare.com>
|
||||
Date: Mon, 28 Jun 2010 08:44:07 +0000 (+0000)
|
||||
Subject: ethtool: Fix potential kernel buffer overflow in ETHTOOL_GRXCLSRLALL
|
||||
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fdavem%2Fnet-2.6.git;a=commitdiff_plain;h=db048b69037e7fa6a7d9e95a1271a50dc08ae233
|
||||
|
||||
ethtool: Fix potential kernel buffer overflow in ETHTOOL_GRXCLSRLALL
|
||||
|
||||
On a 32-bit machine, info.rule_cnt >= 0x40000000 leads to integer
|
||||
overflow and the buffer may be smaller than needed. Since
|
||||
ETHTOOL_GRXCLSRLALL is unprivileged, this can presumably be used for at
|
||||
least denial of service.
|
||||
|
||||
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
|
||||
Cc: stable@kernel.org
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
|
||||
diff --git a/net/core/ethtool.c b/net/core/ethtool.c
|
||||
index a0f4964..a3a7e9a 100644
|
||||
--- a/net/core/ethtool.c
|
||||
+++ b/net/core/ethtool.c
|
||||
@@ -347,8 +347,9 @@ static noinline_for_stack int ethtool_get_rxnfc(struct net_device *dev,
|
||||
|
||||
if (info.cmd == ETHTOOL_GRXCLSRLALL) {
|
||||
if (info.rule_cnt > 0) {
|
||||
- rule_buf = kmalloc(info.rule_cnt * sizeof(u32),
|
||||
- GFP_USER);
|
||||
+ if (info.rule_cnt <= KMALLOC_MAX_SIZE / sizeof(u32))
|
||||
+ rule_buf = kmalloc(info.rule_cnt * sizeof(u32),
|
||||
+ GFP_USER);
|
||||
if (!rule_buf)
|
||||
return -ENOMEM;
|
||||
}
|
62
ext4-issue-discard-operation-before-releasing-blocks.patch
Normal file
62
ext4-issue-discard-operation-before-releasing-blocks.patch
Normal file
@ -0,0 +1,62 @@
|
||||
From: Theodore Ts'o <tytso@mit.edu>
|
||||
Date: Tue, 20 Apr 2010 20:51:59 +0000 (-0400)
|
||||
Subject: ext4: Issue the discard operation *before* releasing the blocks to be reused
|
||||
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=b90f687018e6d6c77d981b09203780f7001407e5
|
||||
|
||||
ext4: Issue the discard operation *before* releasing the blocks to be reused
|
||||
|
||||
[ backported to 2.6.33 ]
|
||||
|
||||
Otherwise, we can end up having data corruption because the blocks
|
||||
could get reused and then discarded!
|
||||
|
||||
https://bugzilla.kernel.org/show_bug.cgi?id=15579
|
||||
|
||||
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
|
||||
---
|
||||
|
||||
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
|
||||
index 54df209..e5ab41b 100644
|
||||
--- a/fs/ext4/mballoc.c
|
||||
+++ b/fs/ext4/mballoc.c
|
||||
@@ -2534,6 +2534,20 @@ static void release_blocks_on_commit(journal_t *journal, transaction_t *txn)
|
||||
mb_debug(1, "gonna free %u blocks in group %u (0x%p):",
|
||||
entry->count, entry->group, entry);
|
||||
|
||||
+ if (test_opt(sb, DISCARD)) {
|
||||
+ ext4_fsblk_t discard_block;
|
||||
+ struct ext4_super_block *es = EXT4_SB(sb)->s_es;
|
||||
+
|
||||
+ discard_block = (ext4_fsblk_t)entry->group *
|
||||
+ EXT4_BLOCKS_PER_GROUP(sb)
|
||||
+ + entry->start_blk
|
||||
+ + le32_to_cpu(es->s_first_data_block);
|
||||
+ trace_ext4_discard_blocks(sb,
|
||||
+ (unsigned long long)discard_block,
|
||||
+ entry->count);
|
||||
+ sb_issue_discard(sb, discard_block, entry->count);
|
||||
+ }
|
||||
+
|
||||
err = ext4_mb_load_buddy(sb, entry->group, &e4b);
|
||||
/* we expect to find existing buddy because it's pinned */
|
||||
BUG_ON(err != 0);
|
||||
@@ -2555,19 +2566,6 @@ static void release_blocks_on_commit(journal_t *journal, transaction_t *txn)
|
||||
page_cache_release(e4b.bd_bitmap_page);
|
||||
}
|
||||
ext4_unlock_group(sb, entry->group);
|
||||
- if (test_opt(sb, DISCARD)) {
|
||||
- ext4_fsblk_t discard_block;
|
||||
- struct ext4_super_block *es = EXT4_SB(sb)->s_es;
|
||||
-
|
||||
- discard_block = (ext4_fsblk_t)entry->group *
|
||||
- EXT4_BLOCKS_PER_GROUP(sb)
|
||||
- + entry->start_blk
|
||||
- + le32_to_cpu(es->s_first_data_block);
|
||||
- trace_ext4_discard_blocks(sb,
|
||||
- (unsigned long long)discard_block,
|
||||
- entry->count);
|
||||
- sb_issue_discard(sb, discard_block, entry->count);
|
||||
- }
|
||||
kmem_cache_free(ext4_free_ext_cachep, entry);
|
||||
ext4_mb_release_desc(&e4b);
|
||||
}
|
@ -1,95 +0,0 @@
|
||||
From: jiayingz@google.com (Jiaying Zhang) <>
|
||||
Date: Tue, 27 Jul 2010 15:56:06 +0000 (-0400)
|
||||
Subject: ext4: move aio completion after unwritten extent conversion
|
||||
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftytso%2Fext4.git;a=commitdiff_plain;h=5b3ff237bef43b9e7fb7d1eb858e29b73fd664f9
|
||||
|
||||
ext4: move aio completion after unwritten extent conversion
|
||||
|
||||
This patch is to be applied upon Christoph's "direct-io: move aio_complete
|
||||
into ->end_io" patch. It adds iocb and result fields to struct ext4_io_end_t,
|
||||
so that we can call aio_complete from ext4_end_io_nolock() after the extent
|
||||
conversion has finished.
|
||||
|
||||
I have verified with Christoph's aio-dio test that used to fail after a few
|
||||
runs on an original kernel but now succeeds on the patched kernel.
|
||||
|
||||
See http://thread.gmane.org/gmane.comp.file-systems.ext4/19659 for details.
|
||||
|
||||
Signed-off-by: Jiaying Zhang <jiayingz@google.com>
|
||||
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
|
||||
---
|
||||
|
||||
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
|
||||
index 4c7d472..fbb3947 100644
|
||||
--- a/fs/ext4/ext4.h
|
||||
+++ b/fs/ext4/ext4.h
|
||||
@@ -170,13 +170,15 @@ struct mpage_da_data {
|
||||
};
|
||||
#define EXT4_IO_UNWRITTEN 0x1
|
||||
typedef struct ext4_io_end {
|
||||
- struct list_head list; /* per-file finished AIO list */
|
||||
+ struct list_head list; /* per-file finished IO list */
|
||||
struct inode *inode; /* file being written to */
|
||||
unsigned int flag; /* unwritten or not */
|
||||
struct page *page; /* page struct for buffer write */
|
||||
loff_t offset; /* offset in the file */
|
||||
ssize_t size; /* size of the extent */
|
||||
struct work_struct work; /* data work queue */
|
||||
+ struct kiocb *iocb; /* iocb struct for AIO */
|
||||
+ int result; /* error value for AIO */
|
||||
} ext4_io_end_t;
|
||||
|
||||
/*
|
||||
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
|
||||
index 609159e..46d2079 100644
|
||||
--- a/fs/ext4/inode.c
|
||||
+++ b/fs/ext4/inode.c
|
||||
@@ -3668,6 +3668,8 @@ static int ext4_end_io_nolock(ext4_io_end_t *io)
|
||||
return ret;
|
||||
}
|
||||
|
||||
+ if (io->iocb)
|
||||
+ aio_complete(io->iocb, io->result, 0);
|
||||
/* clear the DIO AIO unwritten flag */
|
||||
io->flag = 0;
|
||||
return ret;
|
||||
@@ -3767,6 +3769,8 @@ static ext4_io_end_t *ext4_init_io_end (struct inode *inode, gfp_t flags)
|
||||
io->offset = 0;
|
||||
io->size = 0;
|
||||
io->page = NULL;
|
||||
+ io->iocb = NULL;
|
||||
+ io->result = 0;
|
||||
INIT_WORK(&io->work, ext4_end_io_work);
|
||||
INIT_LIST_HEAD(&io->list);
|
||||
}
|
||||
@@ -3796,12 +3800,18 @@ static void ext4_end_io_dio(struct kiocb *iocb, loff_t offset,
|
||||
if (io_end->flag != EXT4_IO_UNWRITTEN){
|
||||
ext4_free_io_end(io_end);
|
||||
iocb->private = NULL;
|
||||
- goto out;
|
||||
+out:
|
||||
+ if (is_async)
|
||||
+ aio_complete(iocb, ret, 0);
|
||||
+ return;
|
||||
}
|
||||
|
||||
io_end->offset = offset;
|
||||
io_end->size = size;
|
||||
- io_end->flag = EXT4_IO_UNWRITTEN;
|
||||
+ if (is_async) {
|
||||
+ io_end->iocb = iocb;
|
||||
+ io_end->result = ret;
|
||||
+ }
|
||||
wq = EXT4_SB(io_end->inode->i_sb)->dio_unwritten_wq;
|
||||
|
||||
/* queue the work to convert unwritten extents to written */
|
||||
@@ -3813,9 +3823,6 @@ static void ext4_end_io_dio(struct kiocb *iocb, loff_t offset,
|
||||
list_add_tail(&io_end->list, &ei->i_completed_io_list);
|
||||
spin_unlock_irqrestore(&ei->i_completed_io_lock, flags);
|
||||
iocb->private = NULL;
|
||||
-out:
|
||||
- if (is_async)
|
||||
- aio_complete(iocb, ret, 0);
|
||||
}
|
||||
|
||||
static void ext4_end_io_buffer_write(struct buffer_head *bh, int uptodate)
|
21
fix-9p-fscache.patch
Normal file
21
fix-9p-fscache.patch
Normal file
@ -0,0 +1,21 @@
|
||||
Subject: [PATCH] 9p: fscache: fix build breakage introduced by 201a15428bd54f83eccec8b7c64a04b8f9431204
|
||||
|
||||
While building 2.6.32-rc8-git2 for Fedora I noticed the following thinko in
|
||||
201a15428bd54f83eccec8b7c64a04b8f9431204. Patch below looks to be correct?
|
||||
|
||||
Signed-off-by: Kyle McMartin <kyle@redhat.com>
|
||||
|
||||
---
|
||||
diff --git a/fs/9p/cache.c b/fs/9p/cache.c
|
||||
index bcc5357..e777961 100644
|
||||
--- a/fs/9p/cache.c
|
||||
+++ b/fs/9p/cache.c
|
||||
@@ -343,7 +343,7 @@ int __v9fs_fscache_release_page(struct page *page, gfp_t gfp)
|
||||
|
||||
BUG_ON(!vcookie->fscache);
|
||||
|
||||
- return fscache_maybe_release_page(vnode->cache, page, gfp);
|
||||
+ return fscache_maybe_release_page(vcookie->fscache, page, gfp);
|
||||
}
|
||||
|
||||
void __v9fs_fscache_invalidate_page(struct page *page)
|
@ -0,0 +1,319 @@
|
||||
commit 711909b33d6fdee149b5cb58bd888e7c10407acb
|
||||
Author: Bastien Nocera <hadess@hadess.net>
|
||||
Date: Wed Apr 21 15:24:56 2010 +0100
|
||||
|
||||
Add support for the Wacom Intuos 4 wireless
|
||||
|
||||
And to the HID blacklist.
|
||||
|
||||
Same command set as the Graphire Bluetooth tablet.
|
||||
|
||||
Signed-off-by: Bastien Nocera <hadess@hadess.net>
|
||||
|
||||
commit 1e03f3dc79ae5a9456545702f6dcac1023b06666
|
||||
Author: Antonio Ospite <ospite@studenti.unina.it>
|
||||
Date: Thu Apr 29 23:59:34 2010 +0200
|
||||
|
||||
hid/hid-sony: fix sony_set_operational_bt
|
||||
|
||||
Don't send the report type as part of the data, this prevents the
|
||||
controller from going into the operational state at all.
|
||||
|
||||
This is completely equivalent to what the code originally meant to accomplish:
|
||||
as per in net/bluetooth/hidp/core.c::hidp_output_raw_report(), by using
|
||||
HID_FEATURE_REPORT here, what will be actually sent is
|
||||
(HIDP_TRANS_SET_REPORT | HIDP_DATA_RTYPE_FEATURE) which is exactly 0x53.
|
||||
|
||||
Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
|
||||
|
||||
commit ea42416024fb33c970dbc10a6c69c0831126d75e
|
||||
Author: Jiri Kosina <jkosina@suse.cz>
|
||||
Date: Wed Feb 3 15:52:31 2010 +0100
|
||||
|
||||
HID: make Wacom modesetting failures non-fatal
|
||||
|
||||
With Wacom tablet mode-setting moved from userspace into kernel,
|
||||
we don't have to consider failures of device queries through the
|
||||
_raw callback as hard failure, as the driver can safely continue
|
||||
anyway.
|
||||
|
||||
This is consistent with the current USB driver in wacom_sys.c
|
||||
|
||||
Reported-by: Ping Cheng <pinglinux@gmail.com>
|
||||
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
|
||||
|
||||
commit a37234f5fcd6ad44ada8c477c2ab531f3ed9fbe5
|
||||
Author: Bastien Nocera <hadess@hadess.net>
|
||||
Date: Wed Jan 20 12:01:53 2010 +0000
|
||||
|
||||
HID: Enable Sixaxis controller over Bluetooth
|
||||
|
||||
Now that hid_output_raw_report works, port the PS3 Sixaxis
|
||||
Bluetooth quirk from user-space, into kernel-space.
|
||||
|
||||
Signed-off-by: Bastien Nocera <hadess@hadess.net>
|
||||
Acked-by: Marcel Holtmann <marcel@holtmann.org>
|
||||
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
|
||||
|
||||
commit 6bc702ac6551532774171d593a805c3565befb4e
|
||||
Author: Bastien Nocera <hadess@hadess.net>
|
||||
Date: Wed Jan 20 12:00:53 2010 +0000
|
||||
|
||||
HID: Implement Wacom quirk in the kernel
|
||||
|
||||
The hid-wacom driver required user-space to poke at the tablet
|
||||
to make it send data about the cursor location.
|
||||
|
||||
This patch makes it do the same thing but in the kernel.
|
||||
|
||||
Signed-off-by: Bastien Nocera <hadess@hadess.net>
|
||||
Acked-by: Marcel Holtmann <marcel@holtmann.org>
|
||||
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
|
||||
|
||||
commit 6fd920bdba1752fdd6411a55b3c17e0fda67b8d2
|
||||
Author: Jiri Kosina <jkosina@suse.cz>
|
||||
Date: Fri Jan 29 15:03:36 2010 +0100
|
||||
|
||||
HID: make raw reports possible for both feature and output reports
|
||||
|
||||
In commit 2da31939a42 ("Bluetooth: Implement raw output support for HIDP
|
||||
layer"), support for Bluetooth hid_output_raw_report was added, but it
|
||||
pushes the data to the intr socket instead of the ctrl one. This has been
|
||||
fixed by 6bf8268f9a91f1 ("Bluetooth: Use the control channel for raw HID reports")
|
||||
|
||||
Still, it is necessary to distinguish whether the report in question should be
|
||||
either FEATURE or OUTPUT. For this, we have to extend the generic HID API,
|
||||
so that hid_output_raw_report() callback provides means to specify this
|
||||
value so that it can be passed down to lower level hardware drivers (currently
|
||||
Bluetooth and USB).
|
||||
|
||||
Based on original patch by Bastien Nocera <hadess@hadess.net>
|
||||
Acked-by: Marcel Holtmann <marcel@holtmann.org>
|
||||
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
|
||||
|
||||
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
|
||||
index 8455f3d..112568e 100644
|
||||
--- a/drivers/hid/hid-core.c
|
||||
+++ b/drivers/hid/hid-core.c
|
||||
@@ -1340,6 +1340,7 @@ static const struct hid_device_id hid_blacklist[] = {
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_PETALYNX, USB_DEVICE_ID_PETALYNX_MAXTER_REMOTE) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_IR_REMOTE) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_CONTROLLER) },
|
||||
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_CONTROLLER) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_VAIO_VGX_MOUSE) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_SUNPLUS, USB_DEVICE_ID_SUNPLUS_WDESKTOP) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb300) },
|
||||
@@ -1352,6 +1353,7 @@ static const struct hid_device_id hid_blacklist[] = {
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_TWINHAN, USB_DEVICE_ID_TWINHAN_IR_REMOTE) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_SMARTJOY_PLUS) },
|
||||
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_GRAPHIRE_BLUETOOTH) },
|
||||
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS4_BLUETOOTH) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_ZEROPLUS, 0x0005) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_ZEROPLUS, 0x0030) },
|
||||
|
||||
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
|
||||
index 793691f..4ccd60b 100644
|
||||
--- a/drivers/hid/hid-ids.h
|
||||
+++ b/drivers/hid/hid-ids.h
|
||||
@@ -428,6 +428,7 @@
|
||||
|
||||
#define USB_VENDOR_ID_WACOM 0x056a
|
||||
#define USB_DEVICE_ID_WACOM_GRAPHIRE_BLUETOOTH 0x81
|
||||
+#define USB_DEVICE_ID_WACOM_INTUOS4_BLUETOOTH 0xbd
|
||||
|
||||
#define USB_VENDOR_ID_WISEGROUP 0x0925
|
||||
#define USB_DEVICE_ID_SMARTJOY_PLUS 0x0005
|
||||
diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c
|
||||
index 4e84502..e71da89 100644
|
||||
--- a/drivers/hid/hid-sony.c
|
||||
+++ b/drivers/hid/hid-sony.c
|
||||
@@ -48,7 +48,7 @@ static void sony_report_fixup(struct hid_device *hdev, __u8 *rdesc,
|
||||
* to "operational". Without this, the ps3 controller will not report any
|
||||
* events.
|
||||
*/
|
||||
-static int sony_set_operational(struct hid_device *hdev)
|
||||
+static int sony_set_operational_usb(struct hid_device *hdev)
|
||||
{
|
||||
struct usb_interface *intf = to_usb_interface(hdev->dev.parent);
|
||||
struct usb_device *dev = interface_to_usbdev(intf);
|
||||
@@ -73,6 +73,12 @@ static int sony_set_operational(struct hid_device *hdev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
+static int sony_set_operational_bt(struct hid_device *hdev)
|
||||
+{
|
||||
+ unsigned char buf[] = { 0xf4, 0x42, 0x03, 0x00, 0x00 };
|
||||
+ return hdev->hid_output_raw_report(hdev, buf, sizeof(buf), HID_FEATURE_REPORT);
|
||||
+}
|
||||
+
|
||||
static int sony_probe(struct hid_device *hdev, const struct hid_device_id *id)
|
||||
{
|
||||
int ret;
|
||||
@@ -101,7 +107,17 @@ static int sony_probe(struct hid_device *hdev, const struct hid_device_id *id)
|
||||
goto err_free;
|
||||
}
|
||||
|
||||
- ret = sony_set_operational(hdev);
|
||||
+ switch (hdev->bus) {
|
||||
+ case BUS_USB:
|
||||
+ ret = sony_set_operational_usb(hdev);
|
||||
+ break;
|
||||
+ case BUS_BLUETOOTH:
|
||||
+ ret = sony_set_operational_bt(hdev);
|
||||
+ break;
|
||||
+ default:
|
||||
+ ret = 0;
|
||||
+ }
|
||||
+
|
||||
if (ret < 0)
|
||||
goto err_stop;
|
||||
|
||||
@@ -121,6 +137,7 @@ static void sony_remove(struct hid_device *hdev)
|
||||
|
||||
static const struct hid_device_id sony_devices[] = {
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_CONTROLLER) },
|
||||
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_CONTROLLER) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_VAIO_VGX_MOUSE),
|
||||
.driver_data = VAIO_RDESC_CONSTANT },
|
||||
{ }
|
||||
diff --git a/drivers/hid/hid-wacom.c b/drivers/hid/hid-wacom.c
|
||||
index 12dcda5..91dbae3 100644
|
||||
--- a/drivers/hid/hid-wacom.c
|
||||
+++ b/drivers/hid/hid-wacom.c
|
||||
@@ -156,7 +156,9 @@ static int wacom_probe(struct hid_device *hdev,
|
||||
struct hid_input *hidinput;
|
||||
struct input_dev *input;
|
||||
struct wacom_data *wdata;
|
||||
+ char rep_data[2];
|
||||
int ret;
|
||||
+ int limit;
|
||||
|
||||
wdata = kzalloc(sizeof(*wdata), GFP_KERNEL);
|
||||
if (wdata == NULL) {
|
||||
@@ -166,6 +168,7 @@ static int wacom_probe(struct hid_device *hdev,
|
||||
|
||||
hid_set_drvdata(hdev, wdata);
|
||||
|
||||
+ /* Parse the HID report now */
|
||||
ret = hid_parse(hdev);
|
||||
if (ret) {
|
||||
dev_err(&hdev->dev, "parse failed\n");
|
||||
@@ -178,6 +181,31 @@ static int wacom_probe(struct hid_device *hdev,
|
||||
goto err_free;
|
||||
}
|
||||
|
||||
+ /*
|
||||
+ * Note that if the raw queries fail, it's not a hard failure and it
|
||||
+ * is safe to continue
|
||||
+ */
|
||||
+
|
||||
+ /* Set Wacom mode2 */
|
||||
+ rep_data[0] = 0x03; rep_data[1] = 0x00;
|
||||
+ limit = 3;
|
||||
+ do {
|
||||
+ ret = hdev->hid_output_raw_report(hdev, rep_data, 2,
|
||||
+ HID_FEATURE_REPORT);
|
||||
+ } while (ret < 0 && limit-- > 0);
|
||||
+ if (ret < 0)
|
||||
+ dev_warn(&hdev->dev, "failed to poke device #1, %d\n", ret);
|
||||
+
|
||||
+ /* 0x06 - high reporting speed, 0x05 - low speed */
|
||||
+ rep_data[0] = 0x06; rep_data[1] = 0x00;
|
||||
+ limit = 3;
|
||||
+ do {
|
||||
+ ret = hdev->hid_output_raw_report(hdev, rep_data, 2,
|
||||
+ HID_FEATURE_REPORT);
|
||||
+ } while (ret < 0 && limit-- > 0);
|
||||
+ if (ret < 0)
|
||||
+ dev_warn(&hdev->dev, "failed to poke device #2, %d\n", ret);
|
||||
+
|
||||
hidinput = list_entry(hdev->inputs.next, struct hid_input, list);
|
||||
input = hidinput->input;
|
||||
|
||||
@@ -228,7 +256,7 @@ static void wacom_remove(struct hid_device *hdev)
|
||||
|
||||
static const struct hid_device_id wacom_devices[] = {
|
||||
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_GRAPHIRE_BLUETOOTH) },
|
||||
-
|
||||
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS4_BLUETOOTH) },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(hid, wacom_devices);
|
||||
diff --git a/drivers/hid/hidraw.c b/drivers/hid/hidraw.c
|
||||
index cdd1369..d044767 100644
|
||||
--- a/drivers/hid/hidraw.c
|
||||
+++ b/drivers/hid/hidraw.c
|
||||
@@ -134,7 +134,7 @@ static ssize_t hidraw_write(struct file *file, const char __user *buffer, size_t
|
||||
goto out;
|
||||
}
|
||||
|
||||
- ret = dev->hid_output_raw_report(dev, buf, count);
|
||||
+ ret = dev->hid_output_raw_report(dev, buf, count, HID_OUTPUT_REPORT);
|
||||
out:
|
||||
kfree(buf);
|
||||
return ret;
|
||||
diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c
|
||||
index 2f84237..83c9f94 100644
|
||||
--- a/drivers/hid/usbhid/hid-core.c
|
||||
+++ b/drivers/hid/usbhid/hid-core.c
|
||||
@@ -798,7 +798,8 @@ static int hid_alloc_buffers(struct usb_device *dev, struct hid_device *hid)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static int usbhid_output_raw_report(struct hid_device *hid, __u8 *buf, size_t count)
|
||||
+static int usbhid_output_raw_report(struct hid_device *hid, __u8 *buf, size_t count,
|
||||
+ unsigned char report_type)
|
||||
{
|
||||
struct usbhid_device *usbhid = hid->driver_data;
|
||||
struct usb_device *dev = hid_to_usb_dev(hid);
|
||||
@@ -809,7 +810,7 @@ static int usbhid_output_raw_report(struct hid_device *hid, __u8 *buf, size_t co
|
||||
ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
|
||||
HID_REQ_SET_REPORT,
|
||||
USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
|
||||
- ((HID_OUTPUT_REPORT + 1) << 8) | *buf,
|
||||
+ ((report_type + 1) << 8) | *buf,
|
||||
interface->desc.bInterfaceNumber, buf + 1, count - 1,
|
||||
USB_CTRL_SET_TIMEOUT);
|
||||
|
||||
diff --git a/include/linux/hid.h b/include/linux/hid.h
|
||||
index 8709365..3661a62 100644
|
||||
--- a/include/linux/hid.h
|
||||
+++ b/include/linux/hid.h
|
||||
@@ -501,7 +501,7 @@ struct hid_device { /* device report descriptor */
|
||||
void (*hiddev_report_event) (struct hid_device *, struct hid_report *);
|
||||
|
||||
/* handler for raw output data, used by hidraw */
|
||||
- int (*hid_output_raw_report) (struct hid_device *, __u8 *, size_t);
|
||||
+ int (*hid_output_raw_report) (struct hid_device *, __u8 *, size_t, unsigned char);
|
||||
|
||||
/* debugging support via debugfs */
|
||||
unsigned short debug;
|
||||
diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c
|
||||
index fc6ec1e..280529a 100644
|
||||
--- a/net/bluetooth/hidp/core.c
|
||||
+++ b/net/bluetooth/hidp/core.c
|
||||
@@ -313,10 +313,21 @@ static int hidp_send_report(struct hidp_session *session, struct hid_report *rep
|
||||
return hidp_queue_report(session, buf, rsize);
|
||||
}
|
||||
|
||||
-static int hidp_output_raw_report(struct hid_device *hid, unsigned char *data, size_t count)
|
||||
+static int hidp_output_raw_report(struct hid_device *hid, unsigned char *data, size_t count,
|
||||
+ unsigned char report_type)
|
||||
{
|
||||
- if (hidp_send_ctrl_message(hid->driver_data,
|
||||
- HIDP_TRANS_SET_REPORT | HIDP_DATA_RTYPE_FEATURE,
|
||||
+ switch (report_type) {
|
||||
+ case HID_FEATURE_REPORT:
|
||||
+ report_type = HIDP_TRANS_SET_REPORT | HIDP_DATA_RTYPE_FEATURE;
|
||||
+ break;
|
||||
+ case HID_OUTPUT_REPORT:
|
||||
+ report_type = HIDP_TRANS_DATA | HIDP_DATA_RTYPE_OUPUT;
|
||||
+ break;
|
||||
+ default:
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ if (hidp_send_ctrl_message(hid->driver_data, report_type,
|
||||
data, count))
|
||||
return -ENOMEM;
|
||||
return count;
|
@ -1,25 +1,16 @@
|
||||
From c69fcbd1f60b0842f7c1ad2c95692ffd19c4932b Mon Sep 17 00:00:00 2001
|
||||
From: Kyle McMartin <kyle@phobos.i.jkkm.org>
|
||||
Date: Mon, 29 Mar 2010 23:56:08 -0400
|
||||
Subject: hda_intel-prealloc-4mb-dmabuffer
|
||||
|
||||
---
|
||||
sound/pci/hda/hda_intel.c | 14 +++++++++++++-
|
||||
1 files changed, 13 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
|
||||
index 4bb9067..37db515 100644
|
||||
index c8d9178..7d3bb15 100644
|
||||
--- a/sound/pci/hda/hda_intel.c
|
||||
+++ b/sound/pci/hda/hda_intel.c
|
||||
@@ -1986,6 +1986,7 @@ azx_attach_pcm_stream(struct hda_bus *bus, struct hda_codec *codec,
|
||||
@@ -1774,6 +1774,7 @@ azx_attach_pcm_stream(struct hda_bus *bus, struct hda_codec *codec,
|
||||
struct azx_pcm *apcm;
|
||||
int pcm_dev = cpcm->device;
|
||||
int s, err;
|
||||
+ size_t prealloc_min = 64*1024; /* 64KB */
|
||||
|
||||
if (pcm_dev >= HDA_MAX_PCMS) {
|
||||
if (pcm_dev >= AZX_MAX_PCMS) {
|
||||
snd_printk(KERN_ERR SFX "Invalid PCM device number %d\n",
|
||||
@@ -2019,10 +2020,21 @@ azx_attach_pcm_stream(struct hda_bus *bus, struct hda_codec *codec,
|
||||
@@ -1807,10 +1808,21 @@ azx_attach_pcm_stream(struct hda_bus *bus, struct hda_codec *codec,
|
||||
if (cpcm->stream[s].substreams)
|
||||
snd_pcm_set_ops(pcm, s, &azx_pcm_ops);
|
||||
}
|
||||
@ -42,6 +33,3 @@ index 4bb9067..37db515 100644
|
||||
return 0;
|
||||
}
|
||||
|
||||
--
|
||||
1.7.0.1
|
||||
|
||||
|
@ -1,26 +1,7 @@
|
||||
drivers/media/video/hdpvr/Makefile | 4 +-
|
||||
drivers/media/video/hdpvr/hdpvr-core.c | 12 ++---
|
||||
drivers/media/video/hdpvr/hdpvr-i2c.c | 83 ++++++++++++++++++++++----------
|
||||
drivers/media/video/hdpvr/hdpvr.h | 2 +-
|
||||
4 files changed, 64 insertions(+), 37 deletions(-)
|
||||
|
||||
diff --git a/drivers/media/video/hdpvr/Makefile b/drivers/media/video/hdpvr/Makefile
|
||||
index e0230fc..a0b9a43 100644
|
||||
--- a/drivers/media/video/hdpvr/Makefile
|
||||
+++ b/drivers/media/video/hdpvr/Makefile
|
||||
@@ -1,6 +1,4 @@
|
||||
-hdpvr-objs := hdpvr-control.o hdpvr-core.o hdpvr-video.o
|
||||
-
|
||||
-hdpvr-$(CONFIG_I2C) += hdpvr-i2c.o
|
||||
+hdpvr-objs := hdpvr-control.o hdpvr-i2c.o hdpvr-core.o hdpvr-video.o
|
||||
|
||||
obj-$(CONFIG_VIDEO_HDPVR) += hdpvr.o
|
||||
|
||||
diff --git a/drivers/media/video/hdpvr/hdpvr-core.c b/drivers/media/video/hdpvr/hdpvr-core.c
|
||||
index 2fc9865..c72793a 100644
|
||||
--- a/drivers/media/video/hdpvr/hdpvr-core.c
|
||||
+++ b/drivers/media/video/hdpvr/hdpvr-core.c
|
||||
@@ -364,9 +364,8 @@ static int hdpvr_probe(struct usb_interface *interface,
|
||||
diff -Naurp a/drivers/media/video/hdpvr/hdpvr-core.c b/drivers/media/video/hdpvr/hdpvr-core.c
|
||||
--- a/drivers/media/video/hdpvr/hdpvr-core.c 2010-07-06 17:36:44.000000000 -0400
|
||||
+++ b/drivers/media/video/hdpvr/hdpvr-core.c 2010-07-06 17:38:13.000000000 -0400
|
||||
@@ -363,9 +363,8 @@ static int hdpvr_probe(struct usb_interf
|
||||
goto error;
|
||||
}
|
||||
|
||||
@ -32,12 +13,12 @@ index 2fc9865..c72793a 100644
|
||||
if (retval < 0) {
|
||||
v4l2_err(&dev->v4l2_dev, "registering i2c adapter failed\n");
|
||||
goto error;
|
||||
@@ -412,12 +411,9 @@ static void hdpvr_disconnect(struct usb_interface *interface)
|
||||
@@ -411,12 +410,9 @@ static void hdpvr_disconnect(struct usb_
|
||||
mutex_unlock(&dev->io_mutex);
|
||||
|
||||
/* deregister I2C adapter */
|
||||
-#ifdef CONFIG_I2C
|
||||
+#if defined(CONFIG_I2C) || (CONFIG_I2C_MODULE)
|
||||
+#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
|
||||
mutex_lock(&dev->i2c_mutex);
|
||||
- if (dev->i2c_adapter)
|
||||
- i2c_del_adapter(dev->i2c_adapter);
|
||||
@ -47,10 +28,21 @@ index 2fc9865..c72793a 100644
|
||||
mutex_unlock(&dev->i2c_mutex);
|
||||
#endif /* CONFIG_I2C */
|
||||
|
||||
diff --git a/drivers/media/video/hdpvr/hdpvr-i2c.c b/drivers/media/video/hdpvr/hdpvr-i2c.c
|
||||
index 463b81b..a0557e4 100644
|
||||
--- a/drivers/media/video/hdpvr/hdpvr-i2c.c
|
||||
+++ b/drivers/media/video/hdpvr/hdpvr-i2c.c
|
||||
diff -Naurp a/drivers/media/video/hdpvr/hdpvr.h b/drivers/media/video/hdpvr/hdpvr.h
|
||||
--- a/drivers/media/video/hdpvr/hdpvr.h 2010-02-24 13:52:17.000000000 -0500
|
||||
+++ b/drivers/media/video/hdpvr/hdpvr.h 2010-07-06 17:42:20.000000000 -0400
|
||||
@@ -101,7 +101,7 @@ struct hdpvr_device {
|
||||
struct work_struct worker;
|
||||
|
||||
/* I2C adapter */
|
||||
- struct i2c_adapter *i2c_adapter;
|
||||
+ struct i2c_adapter i2c_adapter;
|
||||
/* I2C lock */
|
||||
struct mutex i2c_mutex;
|
||||
|
||||
diff -Naurp a/drivers/media/video/hdpvr/hdpvr-i2c.c b/drivers/media/video/hdpvr/hdpvr-i2c.c
|
||||
--- a/drivers/media/video/hdpvr/hdpvr-i2c.c 2010-07-06 17:36:51.000000000 -0400
|
||||
+++ b/drivers/media/video/hdpvr/hdpvr-i2c.c 2010-07-06 17:45:50.000000000 -0400
|
||||
@@ -10,6 +10,8 @@
|
||||
*
|
||||
*/
|
||||
@ -58,83 +50,87 @@ index 463b81b..a0557e4 100644
|
||||
+#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
|
||||
+
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
@@ -22,8 +24,11 @@
|
||||
#include "hdpvr.h"
|
||||
@@ -19,10 +21,13 @@
|
||||
|
||||
#define REQTYPE_I2C_READ 0xb1
|
||||
#define REQTYPE_I2C_WRITE 0xb0
|
||||
#define REQTYPE_I2C_WRITE_STATT 0xd0
|
||||
|
||||
-static int hdpvr_i2c_read(struct hdpvr_device *dev, unsigned char addr,
|
||||
- char *data, int len)
|
||||
-#define REQTYPE_I2C_WRITE_STATT 0xd0
|
||||
+#define REQTYPE_I2C_WRITE_STAT 0xd0
|
||||
+
|
||||
+#define HDPVR_HW_Z8F0811_IR_TX_I2C_ADDR 0x70
|
||||
+#define HDPVR_HW_Z8F0811_IR_RX_I2C_ADDR 0x71
|
||||
+
|
||||
+static int hdpvr_i2c_read(struct hdpvr_device *dev, int bus,
|
||||
+ unsigned char addr, char *data, int len)
|
||||
|
||||
static int hdpvr_i2c_read(struct hdpvr_device *dev, unsigned char addr,
|
||||
- char *data, int len)
|
||||
+ char *data, int len, int bus)
|
||||
{
|
||||
int ret;
|
||||
char *buf = kmalloc(len, GFP_KERNEL);
|
||||
@@ -33,7 +38,7 @@ static int hdpvr_i2c_read(struct hdpvr_device *dev, unsigned char addr,
|
||||
@@ -32,7 +37,7 @@ static int hdpvr_i2c_read(struct hdpvr_d
|
||||
ret = usb_control_msg(dev->udev,
|
||||
usb_rcvctrlpipe(dev->udev, 0),
|
||||
REQTYPE_I2C_READ, CTRL_READ_REQUEST,
|
||||
- 0x100|addr, 0, buf, len, 1000);
|
||||
+ (bus << 8) | addr, 0, buf, len, 1000);
|
||||
+ bus<<8 | addr, 0, buf, len, 1000);
|
||||
|
||||
if (ret == len) {
|
||||
memcpy(data, buf, len);
|
||||
@@ -46,8 +51,8 @@ static int hdpvr_i2c_read(struct hdpvr_device *dev, unsigned char addr,
|
||||
return ret;
|
||||
@@ -46,7 +51,7 @@ static int hdpvr_i2c_read(struct hdpvr_d
|
||||
}
|
||||
|
||||
-static int hdpvr_i2c_write(struct hdpvr_device *dev, unsigned char addr,
|
||||
static int hdpvr_i2c_write(struct hdpvr_device *dev, unsigned char addr,
|
||||
- char *data, int len)
|
||||
+static int hdpvr_i2c_write(struct hdpvr_device *dev, int bus,
|
||||
+ unsigned char addr, char *data, int len)
|
||||
+ char *data, int len, int bus)
|
||||
{
|
||||
int ret;
|
||||
char *buf = kmalloc(len, GFP_KERNEL);
|
||||
@@ -58,7 +63,7 @@ static int hdpvr_i2c_write(struct hdpvr_device *dev, unsigned char addr,
|
||||
@@ -57,17 +62,17 @@ static int hdpvr_i2c_write(struct hdpvr_
|
||||
ret = usb_control_msg(dev->udev,
|
||||
usb_sndctrlpipe(dev->udev, 0),
|
||||
REQTYPE_I2C_WRITE, CTRL_WRITE_REQUEST,
|
||||
- 0x100|addr, 0, buf, len, 1000);
|
||||
+ (bus << 8) | addr, 0, buf, len, 1000);
|
||||
+ bus<<8 | addr, 0, buf, len, 1000);
|
||||
|
||||
if (ret < 0)
|
||||
goto error;
|
||||
@@ -68,7 +73,7 @@ static int hdpvr_i2c_write(struct hdpvr_device *dev, unsigned char addr,
|
||||
REQTYPE_I2C_WRITE_STATT, CTRL_READ_REQUEST,
|
||||
|
||||
ret = usb_control_msg(dev->udev,
|
||||
usb_rcvctrlpipe(dev->udev, 0),
|
||||
- REQTYPE_I2C_WRITE_STATT, CTRL_READ_REQUEST,
|
||||
+ REQTYPE_I2C_WRITE_STAT, CTRL_READ_REQUEST,
|
||||
0, 0, buf, 2, 1000);
|
||||
|
||||
- if (ret == 2)
|
||||
+ if ((ret == 2) && (buf[1] == (len - 1)))
|
||||
+ if (ret == 2 && buf[1] == (len - 1))
|
||||
ret = 0;
|
||||
else if (ret >= 0)
|
||||
ret = -EIO;
|
||||
@@ -93,10 +98,10 @@ static int hdpvr_transfer(struct i2c_adapter *i2c_adapter, struct i2c_msg *msgs,
|
||||
addr = msgs[i].addr << 1;
|
||||
@@ -93,10 +98,10 @@ static int hdpvr_transfer(struct i2c_ada
|
||||
|
||||
if (msgs[i].flags & I2C_M_RD)
|
||||
- retval = hdpvr_i2c_read(dev, addr, msgs[i].buf,
|
||||
+ retval = hdpvr_i2c_read(dev, 1, addr, msgs[i].buf,
|
||||
msgs[i].len);
|
||||
retval = hdpvr_i2c_read(dev, addr, msgs[i].buf,
|
||||
- msgs[i].len);
|
||||
+ msgs[i].len, 1);
|
||||
else
|
||||
- retval = hdpvr_i2c_write(dev, addr, msgs[i].buf,
|
||||
+ retval = hdpvr_i2c_write(dev, 1, addr, msgs[i].buf,
|
||||
msgs[i].len);
|
||||
retval = hdpvr_i2c_write(dev, addr, msgs[i].buf,
|
||||
- msgs[i].len);
|
||||
+ msgs[i].len, 1);
|
||||
}
|
||||
|
||||
@@ -115,31 +120,59 @@ static struct i2c_algorithm hdpvr_algo = {
|
||||
mutex_unlock(&dev->i2c_mutex);
|
||||
@@ -114,31 +119,61 @@ static struct i2c_algorithm hdpvr_algo =
|
||||
.functionality = hdpvr_functionality,
|
||||
};
|
||||
|
||||
+static struct i2c_adapter hdpvr_i2c_adapter_template = {
|
||||
+ .name = "Hauppage HD PVR I2C",
|
||||
+ .owner = THIS_MODULE,
|
||||
+ .id = I2C_HW_B_HDPVR,
|
||||
+ .algo = &hdpvr_algo,
|
||||
+ .class = I2C_CLASS_TV_ANALOG,
|
||||
+static struct i2c_adapter hdpvr_i2c_adap_template = {
|
||||
+ .name = "Hauppauge HD PVR I2C",
|
||||
+ .owner = THIS_MODULE,
|
||||
+ .id = I2C_HW_B_HDPVR,
|
||||
+ .algo = &hdpvr_algo,
|
||||
+ .algo_data = NULL,
|
||||
+ .class = I2C_CLASS_TV_ANALOG,
|
||||
+};
|
||||
+
|
||||
+static struct i2c_board_info hdpvr_i2c_board_info = {
|
||||
@ -148,19 +144,19 @@ index 463b81b..a0557e4 100644
|
||||
+
|
||||
+ mutex_lock(&dev->i2c_mutex);
|
||||
+
|
||||
+ hdpvr_i2c_read(dev, 0, 0x54, buffer, 1);
|
||||
+ hdpvr_i2c_read(dev, 0x54, buffer, 1, 0);
|
||||
+
|
||||
+ buffer[0] = 0;
|
||||
+ buffer[1] = 0x8;
|
||||
+ hdpvr_i2c_write(dev, 1, 0x54, buffer, 2);
|
||||
+ hdpvr_i2c_write(dev, 0x54, buffer, 2, 1);
|
||||
+
|
||||
+ buffer[1] = 0x18;
|
||||
+ hdpvr_i2c_write(dev, 1, 0x54, buffer, 2);
|
||||
+ hdpvr_i2c_write(dev, 0x54, buffer, 2, 1);
|
||||
+
|
||||
+ mutex_unlock(&dev->i2c_mutex);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+
|
||||
int hdpvr_register_i2c_adapter(struct hdpvr_device *dev)
|
||||
{
|
||||
@ -169,8 +165,18 @@ index 463b81b..a0557e4 100644
|
||||
|
||||
- i2c_adap = kzalloc(sizeof(struct i2c_adapter), GFP_KERNEL);
|
||||
- if (i2c_adap == NULL)
|
||||
- goto error;
|
||||
+ hdpvr_activate_ir(dev);
|
||||
+
|
||||
+ memcpy(&dev->i2c_adapter, &hdpvr_i2c_adap_template,
|
||||
+ sizeof(struct i2c_adapter));
|
||||
+ dev->i2c_adapter.dev.parent = &dev->udev->dev;
|
||||
+
|
||||
+ i2c_set_adapdata(&dev->i2c_adapter, dev);
|
||||
+
|
||||
+ retval = i2c_add_adapter(&dev->i2c_adapter);
|
||||
+
|
||||
+ if (retval)
|
||||
goto error;
|
||||
|
||||
- strlcpy(i2c_adap->name, "Hauppauge HD PVR I2C",
|
||||
- sizeof(i2c_adap->name));
|
||||
@ -178,18 +184,11 @@ index 463b81b..a0557e4 100644
|
||||
- i2c_adap->class = I2C_CLASS_TV_ANALOG;
|
||||
- i2c_adap->owner = THIS_MODULE;
|
||||
- i2c_adap->dev.parent = &dev->udev->dev;
|
||||
+ memcpy(&dev->i2c_adapter, &hdpvr_i2c_adapter_template,
|
||||
+ sizeof(struct i2c_adapter));
|
||||
+ dev->i2c_adapter.dev.parent = &dev->udev->dev;
|
||||
|
||||
-
|
||||
- i2c_set_adapdata(i2c_adap, dev);
|
||||
+ i2c_set_adapdata(&dev->i2c_adapter, dev);
|
||||
|
||||
-
|
||||
- retval = i2c_add_adapter(i2c_adap);
|
||||
+ retval = i2c_add_adapter(&dev->i2c_adapter);
|
||||
+ if (retval)
|
||||
+ goto error;
|
||||
|
||||
-
|
||||
- if (!retval)
|
||||
- dev->i2c_adapter = i2c_adap;
|
||||
- else
|
||||
@ -201,16 +200,14 @@ index 463b81b..a0557e4 100644
|
||||
}
|
||||
+
|
||||
+#endif /* CONFIG_I2C */
|
||||
diff --git a/drivers/media/video/hdpvr/hdpvr.h b/drivers/media/video/hdpvr/hdpvr.h
|
||||
index 49ae25d..8a5729a 100644
|
||||
--- a/drivers/media/video/hdpvr/hdpvr.h
|
||||
+++ b/drivers/media/video/hdpvr/hdpvr.h
|
||||
@@ -102,7 +102,7 @@ struct hdpvr_device {
|
||||
struct work_struct worker;
|
||||
diff -Naurp a/drivers/media/video/hdpvr/Makefile b/drivers/media/video/hdpvr/Makefile
|
||||
--- a/drivers/media/video/hdpvr/Makefile 2010-07-06 17:36:38.000000000 -0400
|
||||
+++ b/drivers/media/video/hdpvr/Makefile 2010-07-06 17:35:17.000000000 -0400
|
||||
@@ -1,6 +1,4 @@
|
||||
-hdpvr-objs := hdpvr-control.o hdpvr-core.o hdpvr-video.o
|
||||
-
|
||||
-hdpvr-$(CONFIG_I2C) += hdpvr-i2c.o
|
||||
+hdpvr-objs := hdpvr-control.o hdpvr-core.o hdpvr-i2c.o hdpvr-video.o
|
||||
|
||||
/* I2C adapter */
|
||||
- struct i2c_adapter *i2c_adapter;
|
||||
+ struct i2c_adapter i2c_adapter;
|
||||
/* I2C lock */
|
||||
struct mutex i2c_mutex;
|
||||
obj-$(CONFIG_VIDEO_HDPVR) += hdpvr.o
|
||||
|
||||
|
@ -1,85 +0,0 @@
|
||||
From dec23057518b7035117a1a732aa48be6d34f1be8 Mon Sep 17 00:00:00 2001
|
||||
From: Andrew Lutomirski <luto@mit.edu>
|
||||
Date: Sat, 12 Jun 2010 09:21:18 +0000
|
||||
Subject: i915: Fix CRT hotplug regression in 2.6.35-rc1
|
||||
|
||||
Commit 7a772c492fcfffae812ffca78a628e76fa57fe58 has two bugs which
|
||||
made the hotplug problems on my laptop worse instead of better.
|
||||
|
||||
First, it did not, in fact, disable the CRT plug interrupt -- it
|
||||
disabled all the other hotplug interrupts. It seems rather doubtful
|
||||
that that bit of the patch fixed anything, so let's just remove it.
|
||||
(If you want to add it back, you probably meant ~CRT_HOTPLUG_INT_EN.)
|
||||
|
||||
Second, on at least my GM45, setting CRT_HOTPLUG_ACTIVATION_PERIOD_64
|
||||
and CRT_HOTPLUG_VOLTAGE_COMPARE_50 (when they were previously unset)
|
||||
causes a hotplug interrupt about three seconds later. The old code
|
||||
never restored PORT_HOTPLUG_EN so this could only happen once, but
|
||||
they new code restores those registers. So just set those bits when
|
||||
we set up the interrupt in the first place.
|
||||
|
||||
Signed-off-by: Andy Lutomirski <luto@mit.edu>
|
||||
---
|
||||
drivers/gpu/drm/i915/i915_irq.c | 12 +++++++++++-
|
||||
drivers/gpu/drm/i915/i915_reg.h | 1 -
|
||||
drivers/gpu/drm/i915/intel_crt.c | 6 ------
|
||||
3 files changed, 11 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
|
||||
index 2479be0..7acb1a6 100644
|
||||
--- a/drivers/gpu/drm/i915/i915_irq.c
|
||||
+++ b/drivers/gpu/drm/i915/i915_irq.c
|
||||
@@ -1400,8 +1400,18 @@ int i915_driver_irq_postinstall(struct drm_device *dev)
|
||||
hotplug_en |= SDVOC_HOTPLUG_INT_EN;
|
||||
if (dev_priv->hotplug_supported_mask & SDVOB_HOTPLUG_INT_STATUS)
|
||||
hotplug_en |= SDVOB_HOTPLUG_INT_EN;
|
||||
- if (dev_priv->hotplug_supported_mask & CRT_HOTPLUG_INT_STATUS)
|
||||
+ if (dev_priv->hotplug_supported_mask & CRT_HOTPLUG_INT_STATUS) {
|
||||
hotplug_en |= CRT_HOTPLUG_INT_EN;
|
||||
+
|
||||
+ /* Programming the CRT detection parameters tends
|
||||
+ to generate a spurious hotplug event about three
|
||||
+ seconds later. So just do it once.
|
||||
+ */
|
||||
+ if (IS_G4X(dev))
|
||||
+ hotplug_en |= CRT_HOTPLUG_ACTIVATION_PERIOD_64;
|
||||
+ hotplug_en |= CRT_HOTPLUG_VOLTAGE_COMPARE_50;
|
||||
+ }
|
||||
+
|
||||
/* Ignore TV since it's buggy */
|
||||
|
||||
I915_WRITE(PORT_HOTPLUG_EN, hotplug_en);
|
||||
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
|
||||
index 64b0a3a..d390b17 100644
|
||||
--- a/drivers/gpu/drm/i915/i915_reg.h
|
||||
+++ b/drivers/gpu/drm/i915/i915_reg.h
|
||||
@@ -1130,7 +1130,6 @@
|
||||
#define CRT_HOTPLUG_DETECT_DELAY_2G (1 << 4)
|
||||
#define CRT_HOTPLUG_DETECT_VOLTAGE_325MV (0 << 2)
|
||||
#define CRT_HOTPLUG_DETECT_VOLTAGE_475MV (1 << 2)
|
||||
-#define CRT_HOTPLUG_MASK (0x3fc) /* Bits 9-2 */
|
||||
|
||||
#define PORT_HOTPLUG_STAT 0x61114
|
||||
#define HDMIB_HOTPLUG_INT_STATUS (1 << 29)
|
||||
diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c
|
||||
index 22ff384..ee0732b 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_crt.c
|
||||
+++ b/drivers/gpu/drm/i915/intel_crt.c
|
||||
@@ -234,14 +234,8 @@ static bool intel_crt_detect_hotplug(struct drm_connector *connector)
|
||||
else
|
||||
tries = 1;
|
||||
hotplug_en = orig = I915_READ(PORT_HOTPLUG_EN);
|
||||
- hotplug_en &= CRT_HOTPLUG_MASK;
|
||||
hotplug_en |= CRT_HOTPLUG_FORCE_DETECT;
|
||||
|
||||
- if (IS_G4X(dev))
|
||||
- hotplug_en |= CRT_HOTPLUG_ACTIVATION_PERIOD_64;
|
||||
-
|
||||
- hotplug_en |= CRT_HOTPLUG_VOLTAGE_COMPARE_50;
|
||||
-
|
||||
for (i = 0; i < tries ; i++) {
|
||||
unsigned long timeout;
|
||||
/* turn on the FORCE_DETECT */
|
||||
--
|
||||
1.7.0.1
|
||||
|
72
ibmvscsi-fix-DMA-API-misuse.patch
Normal file
72
ibmvscsi-fix-DMA-API-misuse.patch
Normal file
@ -0,0 +1,72 @@
|
||||
From b395ecef0de15c10459856e56a590ac1fe16be76 Mon Sep 17 00:00:00 2001
|
||||
From: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
||||
Date: Fri, 2 Apr 2010 15:50:24 +0900
|
||||
Subject: [SCSI] ibmvscsi: fix DMA API misuse
|
||||
|
||||
ibmvscsi uses dma_unmap_single() for buffers mapped via
|
||||
dma_map_sg(). It works however it's the API violation. The DMA debug
|
||||
facility complains about it:
|
||||
|
||||
http://marc.info/?l=linux-scsi&m=127018555013151&w=2
|
||||
|
||||
Reported-by: Sachin Sant <sachinp@in.ibm.com>
|
||||
Tested-by: Sachin Sant <sachinp@in.ibm.com>
|
||||
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
||||
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
|
||||
|
||||
(cherry picked from a71fa1fc43a29133f13ae6ada1a389ca298c0934)
|
||||
---
|
||||
drivers/scsi/ibmvscsi/ibmvscsi.c | 29 ++---------------------------
|
||||
1 files changed, 2 insertions(+), 27 deletions(-)
|
||||
|
||||
diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c
|
||||
index e475b79..3b14bbe 100644
|
||||
--- a/drivers/scsi/ibmvscsi/ibmvscsi.c
|
||||
+++ b/drivers/scsi/ibmvscsi/ibmvscsi.c
|
||||
@@ -321,16 +321,6 @@ static void set_srp_direction(struct scsi_cmnd *cmd,
|
||||
srp_cmd->buf_fmt = fmt;
|
||||
}
|
||||
|
||||
-static void unmap_sg_list(int num_entries,
|
||||
- struct device *dev,
|
||||
- struct srp_direct_buf *md)
|
||||
-{
|
||||
- int i;
|
||||
-
|
||||
- for (i = 0; i < num_entries; ++i)
|
||||
- dma_unmap_single(dev, md[i].va, md[i].len, DMA_BIDIRECTIONAL);
|
||||
-}
|
||||
-
|
||||
/**
|
||||
* unmap_cmd_data: - Unmap data pointed in srp_cmd based on the format
|
||||
* @cmd: srp_cmd whose additional_data member will be unmapped
|
||||
@@ -348,24 +338,9 @@ static void unmap_cmd_data(struct srp_cmd *cmd,
|
||||
|
||||
if (out_fmt == SRP_NO_DATA_DESC && in_fmt == SRP_NO_DATA_DESC)
|
||||
return;
|
||||
- else if (out_fmt == SRP_DATA_DESC_DIRECT ||
|
||||
- in_fmt == SRP_DATA_DESC_DIRECT) {
|
||||
- struct srp_direct_buf *data =
|
||||
- (struct srp_direct_buf *) cmd->add_data;
|
||||
- dma_unmap_single(dev, data->va, data->len, DMA_BIDIRECTIONAL);
|
||||
- } else {
|
||||
- struct srp_indirect_buf *indirect =
|
||||
- (struct srp_indirect_buf *) cmd->add_data;
|
||||
- int num_mapped = indirect->table_desc.len /
|
||||
- sizeof(struct srp_direct_buf);
|
||||
|
||||
- if (num_mapped <= MAX_INDIRECT_BUFS) {
|
||||
- unmap_sg_list(num_mapped, dev, &indirect->desc_list[0]);
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- unmap_sg_list(num_mapped, dev, evt_struct->ext_list);
|
||||
- }
|
||||
+ if (evt_struct->cmnd)
|
||||
+ scsi_dma_unmap(evt_struct->cmnd);
|
||||
}
|
||||
|
||||
static int map_sg_list(struct scsi_cmnd *cmd, int nseg,
|
||||
--
|
||||
1.7.0.1
|
||||
|
@ -1,56 +0,0 @@
|
||||
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
||||
Date: Wed, 21 Jul 2010 07:01:19 +0000 (-0700)
|
||||
Subject: Input: synaptics - relax capability ID checks on newer hardware
|
||||
X-Git-Tag: v2.6.35-rc6~1^2
|
||||
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=3619b8fead04ab9de643712e757ef6b5f79fd1ab
|
||||
|
||||
Input: synaptics - relax capability ID checks on newer hardware
|
||||
|
||||
Older firmwares fixed the middle byte of the Synaptics capabilities
|
||||
query to 0x47, but starting with firmware 7.5 the middle byte
|
||||
represents submodel ID, sometimes also called "dash number".
|
||||
|
||||
Reported-and-tested-by: Miroslav Šulc <fordfrog@gmail.com>
|
||||
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
|
||||
---
|
||||
|
||||
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
|
||||
index 9ba9c4a..705589d 100644
|
||||
--- a/drivers/input/mouse/synaptics.c
|
||||
+++ b/drivers/input/mouse/synaptics.c
|
||||
@@ -141,8 +141,13 @@ static int synaptics_capability(struct psmouse *psmouse)
|
||||
priv->capabilities = (cap[0] << 16) | (cap[1] << 8) | cap[2];
|
||||
priv->ext_cap = priv->ext_cap_0c = 0;
|
||||
|
||||
- if (!SYN_CAP_VALID(priv->capabilities))
|
||||
+ /*
|
||||
+ * Older firmwares had submodel ID fixed to 0x47
|
||||
+ */
|
||||
+ if (SYN_ID_FULL(priv->identity) < 0x705 &&
|
||||
+ SYN_CAP_SUBMODEL_ID(priv->capabilities) != 0x47) {
|
||||
return -1;
|
||||
+ }
|
||||
|
||||
/*
|
||||
* Unless capExtended is set the rest of the flags should be ignored
|
||||
diff --git a/drivers/input/mouse/synaptics.h b/drivers/input/mouse/synaptics.h
|
||||
index 7d4d5e1..b6aa7d2 100644
|
||||
--- a/drivers/input/mouse/synaptics.h
|
||||
+++ b/drivers/input/mouse/synaptics.h
|
||||
@@ -47,7 +47,7 @@
|
||||
#define SYN_CAP_FOUR_BUTTON(c) ((c) & (1 << 3))
|
||||
#define SYN_CAP_MULTIFINGER(c) ((c) & (1 << 1))
|
||||
#define SYN_CAP_PALMDETECT(c) ((c) & (1 << 0))
|
||||
-#define SYN_CAP_VALID(c) ((((c) & 0x00ff00) >> 8) == 0x47)
|
||||
+#define SYN_CAP_SUBMODEL_ID(c) (((c) & 0x00ff00) >> 8)
|
||||
#define SYN_EXT_CAP_REQUESTS(c) (((c) & 0x700000) >> 20)
|
||||
#define SYN_CAP_MULTI_BUTTON_NO(ec) (((ec) & 0x00f000) >> 12)
|
||||
#define SYN_CAP_PRODUCT_ID(ec) (((ec) & 0xff0000) >> 16)
|
||||
@@ -66,6 +66,7 @@
|
||||
#define SYN_ID_MODEL(i) (((i) >> 4) & 0x0f)
|
||||
#define SYN_ID_MAJOR(i) ((i) & 0x0f)
|
||||
#define SYN_ID_MINOR(i) (((i) >> 16) & 0xff)
|
||||
+#define SYN_ID_FULL(i) ((SYN_ID_MAJOR(i) << 8) | SYN_ID_MINOR(i))
|
||||
#define SYN_ID_IS_SYNAPTICS(i) ((((i) >> 8) & 0xff) == 0x47)
|
||||
|
||||
/* synaptics special commands */
|
@ -1,162 +0,0 @@
|
||||
From 5b51e801eef53be8e521316eea9e78e5c4595fd4 Mon Sep 17 00:00:00 2001
|
||||
From: Wey-Yi Guy <wey-yi.w.guy@intel.com>
|
||||
Date: Thu, 4 Mar 2010 13:38:59 -0800
|
||||
Subject: [PATCH] iwlwifi: Recover TX flow failure
|
||||
|
||||
Monitors the tx statistics to detect the drop in throughput.
|
||||
When the throughput drops, the ratio of the actual_ack_count and the
|
||||
expected_ack_count also drops. At the same time, the aggregated
|
||||
ba_timeout (the number of ba timeout retries) also rises. If the
|
||||
actual_ack_count/expected_ack_count ratio is 0 and the number of ba
|
||||
timeout retries rises to BA_TIMEOUT_MAX, no tx packets can be delivered.
|
||||
Reloading the uCode and bring the system back to normal operational
|
||||
state.
|
||||
|
||||
Signed-off-by: Trieu 'Andrew' Nguyen <trieux.t.nguyen@intel.com>
|
||||
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
|
||||
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
|
||||
---
|
||||
drivers/net/wireless/iwlwifi/iwl-agn.c | 14 ++++++++-
|
||||
drivers/net/wireless/iwlwifi/iwl-dev.h | 21 +++++++++++++
|
||||
drivers/net/wireless/iwlwifi/iwl-rx.c | 50 +++++++++++++++++++++++++++++++-
|
||||
3 files changed, 83 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
|
||||
index 07a9a02..dc751cb 100644
|
||||
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
|
||||
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
|
||||
@@ -2965,10 +2965,21 @@ static int iwl_mac_ampdu_action(struct ieee80211_hw *hw,
|
||||
return ret;
|
||||
case IEEE80211_AMPDU_TX_START:
|
||||
IWL_DEBUG_HT(priv, "start Tx\n");
|
||||
- return iwl_tx_agg_start(priv, sta->addr, tid, ssn);
|
||||
+ ret = iwl_tx_agg_start(priv, sta->addr, tid, ssn);
|
||||
+ if (ret == 0) {
|
||||
+ priv->_agn.agg_tids_count++;
|
||||
+ IWL_DEBUG_HT(priv, "priv->_agn.agg_tids_count = %u\n",
|
||||
+ priv->_agn.agg_tids_count);
|
||||
+ }
|
||||
+ return ret;
|
||||
case IEEE80211_AMPDU_TX_STOP:
|
||||
IWL_DEBUG_HT(priv, "stop Tx\n");
|
||||
ret = iwl_tx_agg_stop(priv, sta->addr, tid);
|
||||
+ if ((ret == 0) && (priv->_agn.agg_tids_count > 0)) {
|
||||
+ priv->_agn.agg_tids_count--;
|
||||
+ IWL_DEBUG_HT(priv, "priv->_agn.agg_tids_count = %u\n",
|
||||
+ priv->_agn.agg_tids_count);
|
||||
+ }
|
||||
if (test_bit(STATUS_EXIT_PENDING, &priv->status))
|
||||
return 0;
|
||||
else
|
||||
@@ -3399,6 +3410,7 @@ static int iwl_init_drv(struct iwl_priv *priv)
|
||||
priv->iw_mode = NL80211_IFTYPE_STATION;
|
||||
priv->current_ht_config.smps = IEEE80211_SMPS_STATIC;
|
||||
priv->missed_beacon_threshold = IWL_MISSED_BEACON_THRESHOLD_DEF;
|
||||
+ priv->_agn.agg_tids_count = 0;
|
||||
|
||||
/* initialize force reset */
|
||||
priv->force_reset[IWL_RF_RESET].reset_duration =
|
||||
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h
|
||||
index 447e14b..e2a6b76 100644
|
||||
--- a/drivers/net/wireless/iwlwifi/iwl-dev.h
|
||||
+++ b/drivers/net/wireless/iwlwifi/iwl-dev.h
|
||||
@@ -1275,6 +1275,26 @@ struct iwl_priv {
|
||||
void *shared_virt;
|
||||
dma_addr_t shared_phys;
|
||||
/*End*/
|
||||
+ union {
|
||||
+#if defined(CONFIG_IWLAGN) || defined(CONFIG_IWLAGN_MODULE)
|
||||
+ struct {
|
||||
+ /* INT ICT Table */
|
||||
+ __le32 *ict_tbl;
|
||||
+ void *ict_tbl_vir;
|
||||
+ dma_addr_t ict_tbl_dma;
|
||||
+ dma_addr_t aligned_ict_tbl_dma;
|
||||
+ int ict_index;
|
||||
+ u32 inta;
|
||||
+ bool use_ict;
|
||||
+ /*
|
||||
+ * reporting the number of tids has AGG on. 0 means
|
||||
+ * no AGGREGATION
|
||||
+ */
|
||||
+ u8 agg_tids_count;
|
||||
+ } _agn;
|
||||
+#endif
|
||||
+ };
|
||||
+
|
||||
struct iwl_hw_params hw_params;
|
||||
|
||||
/* INT ICT Table */
|
||||
diff --git a/drivers/net/wireless/iwlwifi/iwl-rx.c b/drivers/net/wireless/iwlwifi/iwl-rx.c
|
||||
index fabc52f..f48d685 100644
|
||||
--- a/drivers/net/wireless/iwlwifi/iwl-rx.c
|
||||
+++ b/drivers/net/wireless/iwlwifi/iwl-rx.c
|
||||
@@ -617,9 +617,18 @@ static void iwl_accumulative_statistics(struct iwl_priv *priv,
|
||||
|
||||
#define REG_RECALIB_PERIOD (60)
|
||||
|
||||
+/* the threshold ratio of actual_ack_cnt to expected_ack_cnt in percent */
|
||||
+#define ACK_CNT_RATIO (50)
|
||||
+#define BA_TIMEOUT_CNT (5)
|
||||
+#define BA_TIMEOUT_MAX (16)
|
||||
+
|
||||
#define PLCP_MSG "plcp_err exceeded %u, %u, %u, %u, %u, %d, %u mSecs\n"
|
||||
/*
|
||||
- * This function checks for plcp error.
|
||||
+ * This function checks for plcp error, ACK count ratios, aggregated BA
|
||||
+ * timeout retries.
|
||||
+ * - When the ACK count ratio is 0 and aggregated BA timeout retries is
|
||||
+ * exceeding the BA_TIMEOUT_MAX, it will recover the failure by resetting
|
||||
+ * the firmware.
|
||||
* - When the plcp error is exceeding the thresholds, it will reset the radio
|
||||
* to improve the throughput.
|
||||
*/
|
||||
@@ -629,6 +638,45 @@ void iwl_recover_from_statistics(struct iwl_priv *priv,
|
||||
int combined_plcp_delta;
|
||||
unsigned int plcp_msec;
|
||||
unsigned long plcp_received_jiffies;
|
||||
+ int actual_ack_cnt_delta;
|
||||
+ int expected_ack_cnt_delta;
|
||||
+ int ba_timeout_delta;
|
||||
+
|
||||
+ actual_ack_cnt_delta =
|
||||
+ le32_to_cpu(pkt->u.stats.tx.actual_ack_cnt) -
|
||||
+ le32_to_cpu(priv->statistics.tx.actual_ack_cnt);
|
||||
+ expected_ack_cnt_delta =
|
||||
+ le32_to_cpu(pkt->u.stats.tx.expected_ack_cnt) -
|
||||
+ le32_to_cpu(priv->statistics.tx.expected_ack_cnt);
|
||||
+ ba_timeout_delta =
|
||||
+ le32_to_cpu(pkt->u.stats.tx.agg.ba_timeout) -
|
||||
+ le32_to_cpu(priv->statistics.tx.agg.ba_timeout);
|
||||
+ if ((priv->_agn.agg_tids_count > 0) &&
|
||||
+ (expected_ack_cnt_delta > 0) &&
|
||||
+ (((actual_ack_cnt_delta * 100) / expected_ack_cnt_delta)
|
||||
+ < ACK_CNT_RATIO) &&
|
||||
+ (ba_timeout_delta > BA_TIMEOUT_CNT)) {
|
||||
+ IWL_DEBUG_RADIO(priv, "actual_ack_cnt delta = %d,"
|
||||
+ " expected_ack_cnt = %d\n",
|
||||
+ actual_ack_cnt_delta, expected_ack_cnt_delta);
|
||||
+
|
||||
+#ifdef CONFIG_IWLWIFI_DEBUG
|
||||
+ IWL_DEBUG_RADIO(priv, "rx_detected_cnt delta = %d\n",
|
||||
+ priv->delta_statistics.tx.rx_detected_cnt);
|
||||
+ IWL_DEBUG_RADIO(priv,
|
||||
+ "ack_or_ba_timeout_collision delta = %d\n",
|
||||
+ priv->delta_statistics.tx.
|
||||
+ ack_or_ba_timeout_collision);
|
||||
+#endif
|
||||
+ IWL_DEBUG_RADIO(priv, "agg ba_timeout delta = %d\n",
|
||||
+ ba_timeout_delta);
|
||||
+ if ((actual_ack_cnt_delta == 0) &&
|
||||
+ (ba_timeout_delta >= BA_TIMEOUT_MAX)) {
|
||||
+ IWL_DEBUG_RADIO(priv,
|
||||
+ "call iwl_force_reset(IWL_FW_RESET)\n");
|
||||
+ iwl_force_reset(priv, IWL_FW_RESET);
|
||||
+ }
|
||||
+ }
|
||||
|
||||
/*
|
||||
* check for plcp_err and trigger radio reset if it exceeds
|
||||
--
|
||||
1.7.0.1
|
||||
|
58
iwlwifi-cancel-scan-watchdog-in-iwl_bg_abort_scan.patch
Normal file
58
iwlwifi-cancel-scan-watchdog-in-iwl_bg_abort_scan.patch
Normal file
@ -0,0 +1,58 @@
|
||||
commit a69b03e941abae00380fc6bc1877fb797a1b31e6
|
||||
Author: John W. Linville <linville@tuxdriver.com>
|
||||
Date: Mon Jun 14 14:30:25 2010 -0400
|
||||
|
||||
iwlwifi: cancel scan watchdog in iwl_bg_abort_scan
|
||||
|
||||
Avoids this:
|
||||
|
||||
WARNING: at net/mac80211/scan.c:312 ieee80211_scan_completed+0x5f/0x1f1
|
||||
[mac80211]()
|
||||
Hardware name: Latitude E5400
|
||||
Modules linked in: aes_x86_64 aes_generic fuse ipt_MASQUERADE iptable_nat
|
||||
nf_nat rfcomm sco bridge stp llc bnep l2cap sunrpc cpufreq_ondemand
|
||||
acpi_cpufreq freq_table xt_physdev ip6t_REJECT nf_conntrack_ipv6
|
||||
ip6table_filter ip6_tables ipv6 kvm_intel kvm uinput arc4 ecb
|
||||
snd_hda_codec_intelhdmi snd_hda_codec_idt snd_hda_intel iwlagn snd_hda_codec
|
||||
snd_hwdep snd_seq snd_seq_device iwlcore snd_pcm dell_wmi sdhci_pci sdhci
|
||||
iTCO_wdt tg3 dell_laptop mmc_core i2c_i801 wmi mac80211 snd_timer
|
||||
iTCO_vendor_support btusb joydev dcdbas cfg80211 bluetooth snd soundcore
|
||||
microcode rfkill snd_page_alloc firewire_ohci firewire_core crc_itu_t
|
||||
yenta_socket rsrc_nonstatic i915 drm_kms_helper drm i2c_algo_bit i2c_core video
|
||||
output [last unloaded: scsi_wait_scan]
|
||||
Pid: 979, comm: iwlagn Tainted: G W 2.6.33.3-85.fc13.x86_64 #1
|
||||
Call Trace:
|
||||
[<ffffffff8104b558>] warn_slowpath_common+0x77/0x8f
|
||||
[<ffffffff8104b57f>] warn_slowpath_null+0xf/0x11
|
||||
[<ffffffffa01bb7d9>] ieee80211_scan_completed+0x5f/0x1f1 [mac80211]
|
||||
[<ffffffffa02a23f0>] iwl_bg_scan_completed+0xbb/0x17a [iwlcore]
|
||||
[<ffffffff81060d3d>] worker_thread+0x1a4/0x232
|
||||
[<ffffffffa02a2335>] ? iwl_bg_scan_completed+0x0/0x17a [iwlcore]
|
||||
[<ffffffff81064817>] ? autoremove_wake_function+0x0/0x34
|
||||
[<ffffffff81060b99>] ? worker_thread+0x0/0x232
|
||||
[<ffffffff810643c7>] kthread+0x7a/0x82
|
||||
[<ffffffff8100a924>] kernel_thread_helper+0x4/0x10
|
||||
[<ffffffff8106434d>] ? kthread+0x0/0x82
|
||||
[<ffffffff8100a920>] ? kernel_thread_helper+0x0/0x10
|
||||
|
||||
Reported here:
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=590436
|
||||
|
||||
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
||||
Reported-by: Mihai Harpau <mishu@piatafinanciara.ro>
|
||||
Cc: stable@kernel.org
|
||||
Acked-by: Reinette Chatre <reinette.chatre@intel.com>
|
||||
|
||||
diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c
|
||||
index 5d3f51f..386c5f9 100644
|
||||
--- a/drivers/net/wireless/iwlwifi/iwl-scan.c
|
||||
+++ b/drivers/net/wireless/iwlwifi/iwl-scan.c
|
||||
@@ -491,6 +491,7 @@ void iwl_bg_abort_scan(struct work_struct *work)
|
||||
|
||||
mutex_lock(&priv->mutex);
|
||||
|
||||
+ cancel_delayed_work_sync(&priv->scan_check);
|
||||
set_bit(STATUS_SCAN_ABORTING, &priv->status);
|
||||
iwl_send_scan_abort(priv);
|
||||
|
123
iwlwifi-fix-internal-scan-race.patch
Normal file
123
iwlwifi-fix-internal-scan-race.patch
Normal file
@ -0,0 +1,123 @@
|
||||
From reinette.chatre@intel.com Thu May 13 17:49:59 2010
|
||||
Return-path: <reinette.chatre@intel.com>
|
||||
Envelope-to: linville@tuxdriver.com
|
||||
Delivery-date: Thu, 13 May 2010 17:49:59 -0400
|
||||
Received: from mga09.intel.com ([134.134.136.24])
|
||||
by smtp.tuxdriver.com with esmtp (Exim 4.63)
|
||||
(envelope-from <reinette.chatre@intel.com>)
|
||||
id 1OCgI1-0007H3-Eg
|
||||
for linville@tuxdriver.com; Thu, 13 May 2010 17:49:59 -0400
|
||||
Received: from orsmga002.jf.intel.com ([10.7.209.21])
|
||||
by orsmga102.jf.intel.com with ESMTP; 13 May 2010 14:48:04 -0700
|
||||
X-ExtLoop1: 1
|
||||
X-IronPort-AV: E=Sophos;i="4.53,224,1272870000";
|
||||
d="scan'208";a="517743256"
|
||||
Received: from rchatre-desk.amr.corp.intel.com.jf.intel.com (HELO localhost.localdomain) ([134.134.15.94])
|
||||
by orsmga002.jf.intel.com with ESMTP; 13 May 2010 14:49:12 -0700
|
||||
From: Reinette Chatre <reinette.chatre@intel.com>
|
||||
To: linville@tuxdriver.com
|
||||
Cc: linux-wireless@vger.kernel.org, ipw3945-devel@lists.sourceforge.net, Reinette Chatre <reinette.chatre@intel.com>
|
||||
Subject: [PATCH 1/2] iwlwifi: fix internal scan race
|
||||
Date: Thu, 13 May 2010 14:49:44 -0700
|
||||
Message-Id: <1273787385-9248-2-git-send-email-reinette.chatre@intel.com>
|
||||
X-Mailer: git-send-email 1.6.3.3
|
||||
In-Reply-To: <1273787385-9248-1-git-send-email-reinette.chatre@intel.com>
|
||||
References: <1273787385-9248-1-git-send-email-reinette.chatre@intel.com>
|
||||
X-Spam-Score: -4.2 (----)
|
||||
X-Spam-Status: No
|
||||
Status: RO
|
||||
Content-Length: 3370
|
||||
Lines: 91
|
||||
|
||||
From: Reinette Chatre <reinette.chatre@intel.com>
|
||||
|
||||
It is possible for internal scan to race against itself if the device is
|
||||
not returning the scan results from first requests. What happens in this
|
||||
case is the cleanup done during the abort of the first internal scan also
|
||||
cleans up part of the new scan, causing it to access memory it shouldn't.
|
||||
|
||||
Here are details:
|
||||
* First internal scan is triggered and scan command sent to device.
|
||||
* After seven seconds there is no scan results so the watchdog timer
|
||||
triggers a scan abort.
|
||||
* The scan abort succeeds and a SCAN_COMPLETE_NOTIFICATION is received for
|
||||
failed scan.
|
||||
* During processing of SCAN_COMPLETE_NOTIFICATION we clear STATUS_SCANNING
|
||||
and queue the "scan_completed" work.
|
||||
** At this time, since the problem that caused the internal scan in first
|
||||
place is still present, a new internal scan is triggered.
|
||||
The behavior at this point is a bit different between 2.6.34 and 2.6.35
|
||||
since 2.6.35 has a lot of this synchronized. The rest of the race
|
||||
description will thus be generalized.
|
||||
** As part of preparing for the scan "is_internal_short_scan" is set to
|
||||
true.
|
||||
* At this point the completion work for fist scan is run. As part of this
|
||||
there is some locking missing around the "is_internal_short_scan"
|
||||
variable and it is set to "false".
|
||||
** Now the second scan runs and it considers itself a real (not internal0
|
||||
scan and thus causes problems with wrong memory being accessed.
|
||||
|
||||
The fix is twofold.
|
||||
* Since "is_internal_short_scan" should be protected by mutex, fix this in
|
||||
scan completion work so that changes to it can be serialized.
|
||||
* Do not queue a new internal scan if one is in progress.
|
||||
|
||||
This fixes https://bugzilla.kernel.org/show_bug.cgi?id=15824
|
||||
|
||||
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
|
||||
---
|
||||
drivers/net/wireless/iwlwifi/iwl-scan.c | 21 ++++++++++++++++++---
|
||||
1 files changed, 18 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c
|
||||
index 2367286..a2c4855 100644
|
||||
--- a/drivers/net/wireless/iwlwifi/iwl-scan.c
|
||||
+++ b/drivers/net/wireless/iwlwifi/iwl-scan.c
|
||||
@@ -560,6 +560,11 @@ static void iwl_bg_start_internal_scan(struct work_struct *work)
|
||||
|
||||
mutex_lock(&priv->mutex);
|
||||
|
||||
+ if (priv->is_internal_short_scan == true) {
|
||||
+ IWL_DEBUG_SCAN(priv, "Internal scan already in progress\n");
|
||||
+ goto unlock;
|
||||
+ }
|
||||
+
|
||||
if (!iwl_is_ready_rf(priv)) {
|
||||
IWL_DEBUG_SCAN(priv, "not ready or exit pending\n");
|
||||
goto unlock;
|
||||
@@ -957,17 +962,27 @@ void iwl_bg_scan_completed(struct work_struct *work)
|
||||
{
|
||||
struct iwl_priv *priv =
|
||||
container_of(work, struct iwl_priv, scan_completed);
|
||||
+ bool internal = false;
|
||||
|
||||
IWL_DEBUG_SCAN(priv, "SCAN complete scan\n");
|
||||
|
||||
cancel_delayed_work(&priv->scan_check);
|
||||
|
||||
- if (!priv->is_internal_short_scan)
|
||||
- ieee80211_scan_completed(priv->hw, false);
|
||||
- else {
|
||||
+ mutex_lock(&priv->mutex);
|
||||
+ if (priv->is_internal_short_scan) {
|
||||
priv->is_internal_short_scan = false;
|
||||
IWL_DEBUG_SCAN(priv, "internal short scan completed\n");
|
||||
+ internal = true;
|
||||
}
|
||||
+ mutex_unlock(&priv->mutex);
|
||||
+
|
||||
+ /*
|
||||
+ * Do not hold mutex here since this will cause mac80211 to call
|
||||
+ * into driver again into functions that will attempt to take
|
||||
+ * mutex.
|
||||
+ */
|
||||
+ if (!internal)
|
||||
+ ieee80211_scan_completed(priv->hw, false);
|
||||
|
||||
if (test_bit(STATUS_EXIT_PENDING, &priv->status))
|
||||
return;
|
||||
--
|
||||
1.6.3.3
|
||||
|
||||
|
||||
|
139
iwlwifi-fix-scan-races.patch
Normal file
139
iwlwifi-fix-scan-races.patch
Normal file
@ -0,0 +1,139 @@
|
||||
commit 88be026490ed89c2ffead81a52531fbac5507e01
|
||||
Author: Johannes Berg <johannes.berg@intel.com>
|
||||
Date: Wed Apr 7 00:21:36 2010 -0700
|
||||
|
||||
iwlwifi: fix scan races
|
||||
|
||||
When an internal scan is started, nothing protects the
|
||||
is_internal_short_scan variable which can cause crashes,
|
||||
cf. https://bugzilla.kernel.org/show_bug.cgi?id=15667.
|
||||
Fix this by making the short scan request use the mutex
|
||||
for locking, which requires making the request go to a
|
||||
work struct so that it can sleep.
|
||||
|
||||
Reported-by: Peter Zijlstra <peterz@infradead.org>
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
|
||||
|
||||
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
|
||||
index e4c2e1e..ba0fdba 100644
|
||||
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
|
||||
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
|
||||
@@ -3330,6 +3330,7 @@ static void iwl_cancel_deferred_work(struct iwl_priv *priv)
|
||||
|
||||
cancel_delayed_work_sync(&priv->init_alive_start);
|
||||
cancel_delayed_work(&priv->scan_check);
|
||||
+ cancel_work_sync(&priv->start_internal_scan);
|
||||
cancel_delayed_work(&priv->alive_start);
|
||||
cancel_work_sync(&priv->beacon_update);
|
||||
del_timer_sync(&priv->statistics_periodic);
|
||||
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
|
||||
index 894bcb8..1459cdb 100644
|
||||
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
|
||||
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
|
||||
@@ -3357,7 +3357,6 @@ static void iwl_force_rf_reset(struct iwl_priv *priv)
|
||||
*/
|
||||
IWL_DEBUG_INFO(priv, "perform radio reset.\n");
|
||||
iwl_internal_short_hw_scan(priv);
|
||||
- return;
|
||||
}
|
||||
|
||||
|
||||
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
|
||||
index 732590f..36940a9 100644
|
||||
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
|
||||
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
|
||||
@@ -506,7 +506,7 @@ void iwl_init_scan_params(struct iwl_priv *priv);
|
||||
int iwl_scan_cancel(struct iwl_priv *priv);
|
||||
int iwl_scan_cancel_timeout(struct iwl_priv *priv, unsigned long ms);
|
||||
int iwl_mac_hw_scan(struct ieee80211_hw *hw, struct cfg80211_scan_request *req);
|
||||
-int iwl_internal_short_hw_scan(struct iwl_priv *priv);
|
||||
+void iwl_internal_short_hw_scan(struct iwl_priv *priv);
|
||||
int iwl_force_reset(struct iwl_priv *priv, int mode);
|
||||
u16 iwl_fill_probe_req(struct iwl_priv *priv, struct ieee80211_mgmt *frame,
|
||||
const u8 *ie, int ie_len, int left);
|
||||
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h
|
||||
index 6054c5f..ef1720a 100644
|
||||
--- a/drivers/net/wireless/iwlwifi/iwl-dev.h
|
||||
+++ b/drivers/net/wireless/iwlwifi/iwl-dev.h
|
||||
@@ -1296,6 +1296,7 @@ struct iwl_priv {
|
||||
struct work_struct tt_work;
|
||||
struct work_struct ct_enter;
|
||||
struct work_struct ct_exit;
|
||||
+ struct work_struct start_internal_scan;
|
||||
|
||||
struct tasklet_struct irq_tasklet;
|
||||
|
||||
diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c
|
||||
index bd2f7c4..5062f4e 100644
|
||||
--- a/drivers/net/wireless/iwlwifi/iwl-scan.c
|
||||
+++ b/drivers/net/wireless/iwlwifi/iwl-scan.c
|
||||
@@ -469,6 +469,8 @@ EXPORT_SYMBOL(iwl_init_scan_params);
|
||||
|
||||
static int iwl_scan_initiate(struct iwl_priv *priv)
|
||||
{
|
||||
+ WARN_ON(!mutex_is_locked(&priv->mutex));
|
||||
+
|
||||
IWL_DEBUG_INFO(priv, "Starting scan...\n");
|
||||
set_bit(STATUS_SCANNING, &priv->status);
|
||||
priv->is_internal_short_scan = false;
|
||||
@@ -546,24 +548,31 @@ EXPORT_SYMBOL(iwl_mac_hw_scan);
|
||||
* internal short scan, this function should only been called while associated.
|
||||
* It will reset and tune the radio to prevent possible RF related problem
|
||||
*/
|
||||
-int iwl_internal_short_hw_scan(struct iwl_priv *priv)
|
||||
+void iwl_internal_short_hw_scan(struct iwl_priv *priv)
|
||||
{
|
||||
- int ret = 0;
|
||||
+ queue_work(priv->workqueue, &priv->start_internal_scan);
|
||||
+}
|
||||
+
|
||||
+static void iwl_bg_start_internal_scan(struct work_struct *work)
|
||||
+{
|
||||
+ struct iwl_priv *priv =
|
||||
+ container_of(work, struct iwl_priv, start_internal_scan);
|
||||
+
|
||||
+ mutex_lock(&priv->mutex);
|
||||
|
||||
if (!iwl_is_ready_rf(priv)) {
|
||||
- ret = -EIO;
|
||||
IWL_DEBUG_SCAN(priv, "not ready or exit pending\n");
|
||||
- goto out;
|
||||
+ goto unlock;
|
||||
}
|
||||
+
|
||||
if (test_bit(STATUS_SCANNING, &priv->status)) {
|
||||
IWL_DEBUG_SCAN(priv, "Scan already in progress.\n");
|
||||
- ret = -EAGAIN;
|
||||
- goto out;
|
||||
+ goto unlock;
|
||||
}
|
||||
+
|
||||
if (test_bit(STATUS_SCAN_ABORTING, &priv->status)) {
|
||||
IWL_DEBUG_SCAN(priv, "Scan request while abort pending\n");
|
||||
- ret = -EAGAIN;
|
||||
- goto out;
|
||||
+ goto unlock;
|
||||
}
|
||||
|
||||
priv->scan_bands = 0;
|
||||
@@ -576,9 +585,8 @@ int iwl_internal_short_hw_scan(struct iwl_priv *priv)
|
||||
set_bit(STATUS_SCANNING, &priv->status);
|
||||
priv->is_internal_short_scan = true;
|
||||
queue_work(priv->workqueue, &priv->request_scan);
|
||||
-
|
||||
-out:
|
||||
- return ret;
|
||||
+ unlock:
|
||||
+ mutex_unlock(&priv->mutex);
|
||||
}
|
||||
EXPORT_SYMBOL(iwl_internal_short_hw_scan);
|
||||
|
||||
@@ -964,6 +972,7 @@ void iwl_setup_scan_deferred_work(struct iwl_priv *priv)
|
||||
INIT_WORK(&priv->scan_completed, iwl_bg_scan_completed);
|
||||
INIT_WORK(&priv->request_scan, iwl_bg_request_scan);
|
||||
INIT_WORK(&priv->abort_scan, iwl_bg_abort_scan);
|
||||
+ INIT_WORK(&priv->start_internal_scan, iwl_bg_start_internal_scan);
|
||||
INIT_DELAYED_WORK(&priv->scan_check, iwl_bg_scan_check);
|
||||
}
|
||||
EXPORT_SYMBOL(iwl_setup_scan_deferred_work);
|
@ -1,7 +1,7 @@
|
||||
From: Stanislaw Gruszka <sgruszka@redhat.com>
|
||||
To: kernel@lists.fedoraproject.org, "John W. Linville" <linville@redhat.com>
|
||||
Subject: [PATCH 2/4 2.6.34.y] iwlwifi: manage QoS by mac stack
|
||||
Date: Fri, 11 Jun 2010 17:05:12 +0200
|
||||
Subject: [PATCH 2/4 2.6.33.y] iwlwifi: manage QoS by mac stack
|
||||
Date: Fri, 11 Jun 2010 17:04:18 +0200
|
||||
|
||||
commit e61146e36b40fd9d346118c40285913236c329f3 upstream.
|
||||
|
||||
@ -26,10 +26,10 @@ Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
|
||||
5 files changed, 17 insertions(+), 171 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
|
||||
index bdff565..21c3ef0 100644
|
||||
index 5622a55..9ba4207 100644
|
||||
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
|
||||
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
|
||||
@@ -2515,7 +2515,6 @@ void iwl_post_associate(struct iwl_priv *priv)
|
||||
@@ -2327,7 +2327,6 @@ void iwl_post_associate(struct iwl_priv *priv)
|
||||
{
|
||||
struct ieee80211_conf *conf = NULL;
|
||||
int ret = 0;
|
||||
@ -37,7 +37,7 @@ index bdff565..21c3ef0 100644
|
||||
|
||||
if (priv->iw_mode == NL80211_IFTYPE_AP) {
|
||||
IWL_ERR(priv, "%s Should not be called in AP mode\n", __func__);
|
||||
@@ -2600,10 +2599,6 @@ void iwl_post_associate(struct iwl_priv *priv)
|
||||
@@ -2412,10 +2411,6 @@ void iwl_post_associate(struct iwl_priv *priv)
|
||||
if (priv->iw_mode == NL80211_IFTYPE_ADHOC)
|
||||
priv->assoc_station_added = 1;
|
||||
|
||||
@ -48,7 +48,7 @@ index bdff565..21c3ef0 100644
|
||||
/* the chain noise calibration will enabled PM upon completion
|
||||
* If chain noise has already been run, then we need to enable
|
||||
* power management here */
|
||||
@@ -2780,7 +2775,6 @@ static int iwl_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
|
||||
@@ -2602,7 +2597,6 @@ static int iwl_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
|
||||
void iwl_config_ap(struct iwl_priv *priv)
|
||||
{
|
||||
int ret = 0;
|
||||
@ -56,7 +56,7 @@ index bdff565..21c3ef0 100644
|
||||
|
||||
if (test_bit(STATUS_EXIT_PENDING, &priv->status))
|
||||
return;
|
||||
@@ -2832,10 +2826,6 @@ void iwl_config_ap(struct iwl_priv *priv)
|
||||
@@ -2654,10 +2648,6 @@ void iwl_config_ap(struct iwl_priv *priv)
|
||||
/* restore RXON assoc */
|
||||
priv->staging_rxon.filter_flags |= RXON_FILTER_ASSOC_MSK;
|
||||
iwlcore_commit_rxon(priv);
|
||||
@ -67,7 +67,7 @@ index bdff565..21c3ef0 100644
|
||||
iwl_add_bcast_station(priv);
|
||||
}
|
||||
iwl_send_beacon_cmd(priv);
|
||||
@@ -3396,11 +3386,6 @@ static int iwl_init_drv(struct iwl_priv *priv)
|
||||
@@ -3195,11 +3185,6 @@ static int iwl_init_drv(struct iwl_priv *priv)
|
||||
|
||||
iwl_init_scan_params(priv);
|
||||
|
||||
@ -80,10 +80,10 @@ index bdff565..21c3ef0 100644
|
||||
/* Set the tx_power_user_lmt to the lowest power level
|
||||
* this value will get overwritten by channel max power avg
|
||||
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
|
||||
index 049b652..2dd8aaa 100644
|
||||
index 6e9e156..d79b1e9 100644
|
||||
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
|
||||
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
|
||||
@@ -325,17 +325,13 @@ EXPORT_SYMBOL(iwl_hw_nic_init);
|
||||
@@ -301,17 +301,13 @@ EXPORT_SYMBOL(iwl_hw_nic_init);
|
||||
/*
|
||||
* QoS support
|
||||
*/
|
||||
@ -102,7 +102,7 @@ index 049b652..2dd8aaa 100644
|
||||
if (priv->qos_data.qos_active)
|
||||
priv->qos_data.def_qos_parm.qos_flags |=
|
||||
QOS_PARAM_FLG_UPDATE_EDCA_MSK;
|
||||
@@ -343,118 +339,14 @@ void iwl_activate_qos(struct iwl_priv *priv, u8 force)
|
||||
@@ -319,118 +315,14 @@ void iwl_activate_qos(struct iwl_priv *priv, u8 force)
|
||||
if (priv->current_ht_config.is_ht)
|
||||
priv->qos_data.def_qos_parm.qos_flags |= QOS_PARAM_FLG_TGN_MSK;
|
||||
|
||||
@ -227,7 +227,7 @@ index 049b652..2dd8aaa 100644
|
||||
|
||||
#define MAX_BIT_RATE_40_MHZ 150 /* Mbps */
|
||||
#define MAX_BIT_RATE_20_MHZ 72 /* Mbps */
|
||||
@@ -2306,12 +2198,6 @@ int iwl_mac_conf_tx(struct ieee80211_hw *hw, u16 queue,
|
||||
@@ -2273,12 +2165,6 @@ int iwl_mac_conf_tx(struct ieee80211_hw *hw, u16 queue,
|
||||
cpu_to_le16((params->txop * 32));
|
||||
|
||||
priv->qos_data.def_qos_parm.ac[q].reserved1 = 0;
|
||||
@ -240,7 +240,7 @@ index 049b652..2dd8aaa 100644
|
||||
|
||||
spin_unlock_irqrestore(&priv->lock, flags);
|
||||
|
||||
@@ -2587,11 +2473,8 @@ int iwl_mac_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb)
|
||||
@@ -2554,11 +2440,8 @@ int iwl_mac_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb)
|
||||
IWL_DEBUG_MAC80211(priv, "leave\n");
|
||||
spin_unlock_irqrestore(&priv->lock, flags);
|
||||
|
||||
@ -252,9 +252,9 @@ index 049b652..2dd8aaa 100644
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(iwl_mac_beacon_update);
|
||||
@@ -2833,6 +2716,15 @@ int iwl_mac_config(struct ieee80211_hw *hw, u32 changed)
|
||||
iwl_set_tx_power(priv, conf->power_level, false);
|
||||
}
|
||||
@@ -2790,6 +2673,15 @@ int iwl_mac_config(struct ieee80211_hw *hw, u32 changed)
|
||||
if (priv->cfg->ops->hcmd->set_rxon_chain)
|
||||
priv->cfg->ops->hcmd->set_rxon_chain(priv);
|
||||
|
||||
+ if (changed & IEEE80211_CONF_CHANGE_QOS) {
|
||||
+ bool qos_active = !!(conf->flags & IEEE80211_CONF_QOS);
|
||||
@ -268,7 +268,7 @@ index 049b652..2dd8aaa 100644
|
||||
if (!iwl_is_ready(priv)) {
|
||||
IWL_DEBUG_MAC80211(priv, "leave - not ready\n");
|
||||
goto out;
|
||||
@@ -2867,8 +2759,6 @@ void iwl_mac_reset_tsf(struct ieee80211_hw *hw)
|
||||
@@ -2860,8 +2752,6 @@ void iwl_mac_reset_tsf(struct ieee80211_hw *hw)
|
||||
memset(&priv->current_ht_config, 0, sizeof(struct iwl_ht_config));
|
||||
spin_unlock_irqrestore(&priv->lock, flags);
|
||||
|
||||
@ -278,10 +278,10 @@ index 049b652..2dd8aaa 100644
|
||||
priv->assoc_id = 0;
|
||||
priv->assoc_capability = 0;
|
||||
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
|
||||
index 36940a9..70af968 100644
|
||||
index b69e972..403f512 100644
|
||||
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
|
||||
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
|
||||
@@ -304,8 +304,7 @@ struct iwl_cfg {
|
||||
@@ -298,8 +298,7 @@ struct iwl_cfg {
|
||||
struct ieee80211_hw *iwl_alloc_all(struct iwl_cfg *cfg,
|
||||
struct ieee80211_ops *hw_ops);
|
||||
void iwl_hw_detect(struct iwl_priv *priv);
|
||||
@ -292,10 +292,10 @@ index 36940a9..70af968 100644
|
||||
const struct ieee80211_tx_queue_params *params);
|
||||
void iwl_set_rxon_hwcrypto(struct iwl_priv *priv, int hw_decrypt);
|
||||
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h
|
||||
index ef1720a..cc12e89 100644
|
||||
index 3822cf5..f2a9356 100644
|
||||
--- a/drivers/net/wireless/iwlwifi/iwl-dev.h
|
||||
+++ b/drivers/net/wireless/iwlwifi/iwl-dev.h
|
||||
@@ -519,30 +519,9 @@ struct iwl_ht_config {
|
||||
@@ -518,30 +518,9 @@ struct iwl_ht_config {
|
||||
u8 non_GF_STA_present;
|
||||
};
|
||||
|
||||
@ -327,10 +327,10 @@ index ef1720a..cc12e89 100644
|
||||
};
|
||||
|
||||
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
|
||||
index b74a56c..c054527 100644
|
||||
index adbb3ea..2280ba7 100644
|
||||
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
|
||||
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
|
||||
@@ -3152,8 +3152,6 @@ void iwl3945_post_associate(struct iwl_priv *priv)
|
||||
@@ -3127,8 +3127,6 @@ void iwl3945_post_associate(struct iwl_priv *priv)
|
||||
break;
|
||||
}
|
||||
|
||||
@ -339,9 +339,9 @@ index b74a56c..c054527 100644
|
||||
/* we have just associated, don't start scan too early */
|
||||
priv->next_scan_jiffies = jiffies + IWL_DELAY_NEXT_SCAN;
|
||||
}
|
||||
@@ -3861,11 +3859,6 @@ static int iwl3945_init_drv(struct iwl_priv *priv)
|
||||
@@ -3841,11 +3839,6 @@ static int iwl3945_init_drv(struct iwl_priv *priv)
|
||||
|
||||
priv->iw_mode = NL80211_IFTYPE_STATION;
|
||||
priv->missed_beacon_threshold = IWL_MISSED_BEACON_THRESHOLD_DEF;
|
||||
|
||||
- iwl_reset_qos(priv);
|
||||
-
|
||||
|
13
iwlwifi-recover_from_tx_stall.patch
Normal file
13
iwlwifi-recover_from_tx_stall.patch
Normal file
@ -0,0 +1,13 @@
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=589777#c5
|
||||
|
||||
diff -up linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-3945.c.orig linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-3945.c
|
||||
--- linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-3945.c.orig 2010-05-19 16:07:15.000000000 -0400
|
||||
+++ linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-3945.c 2010-05-19 16:09:42.000000000 -0400
|
||||
@@ -2794,6 +2794,7 @@ static struct iwl_lib_ops iwl3945_lib =
|
||||
.post_associate = iwl3945_post_associate,
|
||||
.isr = iwl_isr_legacy,
|
||||
.config_ap = iwl3945_config_ap,
|
||||
+ .recover_from_tx_stall = iwl_bg_monitor_recover,
|
||||
};
|
||||
|
||||
static struct iwl_hcmd_utils_ops iwl3945_hcmd_utils = {
|
48
iwlwifi_-Adjusting-PLCP-error-threshold-for-1000-NIC.patch
Normal file
48
iwlwifi_-Adjusting-PLCP-error-threshold-for-1000-NIC.patch
Normal file
@ -0,0 +1,48 @@
|
||||
Backport of the following upstream commit...
|
||||
|
||||
commit 6c3872e1d52290dcd506473028867cacc6b7393d
|
||||
Author: Trieu 'Andrew' Nguyen <trieux.t.nguyen@intel.com>
|
||||
Date: Mon Feb 8 13:53:05 2010 -0800
|
||||
|
||||
iwlwifi: Adjusting PLCP error threshold for 1000 NIC
|
||||
|
||||
While testing the station with the NIC 1000 family, it is found that
|
||||
the plcp error can easily exceed 50 value in 100mSecs. This creates
|
||||
unneccessary radio reset/tuning. This patch raises the PLCP error
|
||||
threshold of the NIC 1000 from 50 to 200 error count.
|
||||
|
||||
Signed-off-by: Trieu 'Andrew' Nguyen <trieux.t.nguyen@intel.com>
|
||||
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
|
||||
|
||||
diff -up linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-1000.c.orig linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-1000.c
|
||||
--- linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-1000.c.orig 2010-04-13 13:44:14.000000000 -0400
|
||||
+++ linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-1000.c 2010-04-13 13:45:51.000000000 -0400
|
||||
@@ -174,7 +174,7 @@ struct iwl_cfg iwl1000_bgn_cfg = {
|
||||
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
|
||||
.support_ct_kill_exit = true,
|
||||
.sm_ps_mode = WLAN_HT_CAP_SM_PS_DISABLED,
|
||||
- .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
|
||||
+ .plcp_delta_threshold = IWL_MAX_PLCP_ERR_EXT_LONG_THRESHOLD_DEF,
|
||||
};
|
||||
|
||||
struct iwl_cfg iwl1000_bg_cfg = {
|
||||
@@ -201,7 +201,7 @@ struct iwl_cfg iwl1000_bg_cfg = {
|
||||
.led_compensation = 51,
|
||||
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
|
||||
.support_ct_kill_exit = true,
|
||||
- .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
|
||||
+ .plcp_delta_threshold = IWL_MAX_PLCP_ERR_EXT_LONG_THRESHOLD_DEF,
|
||||
};
|
||||
|
||||
MODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_UCODE_API_MAX));
|
||||
diff -up linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-dev.h.orig linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-dev.h
|
||||
--- linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-dev.h.orig 2010-04-13 13:44:14.000000000 -0400
|
||||
+++ linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-dev.h 2010-04-13 13:45:06.000000000 -0400
|
||||
@@ -991,6 +991,7 @@ struct iwl_switch_rxon {
|
||||
#define IWL_MAX_PLCP_ERR_THRESHOLD_MIN (0)
|
||||
#define IWL_MAX_PLCP_ERR_THRESHOLD_DEF (50)
|
||||
#define IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF (100)
|
||||
+#define IWL_MAX_PLCP_ERR_EXT_LONG_THRESHOLD_DEF (200)
|
||||
#define IWL_MAX_PLCP_ERR_THRESHOLD_MAX (255)
|
||||
|
||||
enum iwl_reset {
|
@ -0,0 +1,81 @@
|
||||
Backport of the following upstream commit...
|
||||
|
||||
commit d4d59e88cb746165c6fe33eacb6f582d525c6ef1
|
||||
Author: Wey-Yi Guy <wey-yi.w.guy@intel.com>
|
||||
Date: Fri Jan 22 14:22:45 2010 -0800
|
||||
|
||||
iwlwifi: Logic to control how frequent radio should be reset if needed
|
||||
|
||||
Add additional logic for internal scan routine to control how
|
||||
frequent this function should be performed.
|
||||
|
||||
The intent of this function is to reset/re-tune the radio and bring the
|
||||
RF/PHY back to normal state, it does not make sense calling it too
|
||||
frequent,
|
||||
if reset the radio can not bring it back to normal state, it indicate
|
||||
there are other reason to cause the radio not operate correctly.
|
||||
|
||||
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
|
||||
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
|
||||
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
||||
|
||||
diff -up linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-dev.h.orig linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-dev.h
|
||||
--- linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-dev.h.orig 2010-04-13 11:53:36.000000000 -0400
|
||||
+++ linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-dev.h 2010-04-13 11:59:18.000000000 -0400
|
||||
@@ -1034,6 +1034,7 @@ struct iwl_priv {
|
||||
unsigned long scan_start;
|
||||
unsigned long scan_pass_start;
|
||||
unsigned long scan_start_tsf;
|
||||
+ unsigned long last_internal_scan_jiffies;
|
||||
void *scan;
|
||||
int scan_bands;
|
||||
struct cfg80211_scan_request *scan_request;
|
||||
diff -up linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-scan.c.orig linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-scan.c
|
||||
--- linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-scan.c.orig 2010-04-13 11:53:36.000000000 -0400
|
||||
+++ linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-scan.c 2010-04-13 12:01:06.000000000 -0400
|
||||
@@ -204,7 +204,8 @@ static void iwl_rx_scan_results_notif(st
|
||||
#endif
|
||||
|
||||
priv->last_scan_jiffies = jiffies;
|
||||
- priv->next_scan_jiffies = 0;
|
||||
+ if (!priv->is_internal_short_scan)
|
||||
+ priv->next_scan_jiffies = 0;
|
||||
}
|
||||
|
||||
/* Service SCAN_COMPLETE_NOTIFICATION (0x84) */
|
||||
@@ -251,7 +252,11 @@ static void iwl_rx_scan_complete_notif(s
|
||||
}
|
||||
|
||||
priv->last_scan_jiffies = jiffies;
|
||||
- priv->next_scan_jiffies = 0;
|
||||
+ if (!priv->is_internal_short_scan)
|
||||
+ priv->next_scan_jiffies = 0;
|
||||
+ else
|
||||
+ priv->last_internal_scan_jiffies = jiffies;
|
||||
+
|
||||
IWL_DEBUG_INFO(priv, "Setting scan to off\n");
|
||||
|
||||
clear_bit(STATUS_SCANNING, &priv->status);
|
||||
@@ -559,6 +564,8 @@ EXPORT_SYMBOL(iwl_mac_hw_scan);
|
||||
* internal short scan, this function should only been called while associated.
|
||||
* It will reset and tune the radio to prevent possible RF related problem
|
||||
*/
|
||||
+#define IWL_DELAY_NEXT_INTERNAL_SCAN (HZ*1)
|
||||
+
|
||||
int iwl_internal_short_hw_scan(struct iwl_priv *priv)
|
||||
{
|
||||
int ret = 0;
|
||||
@@ -578,6 +585,13 @@ int iwl_internal_short_hw_scan(struct iw
|
||||
ret = -EAGAIN;
|
||||
goto out;
|
||||
}
|
||||
+ if (priv->last_internal_scan_jiffies &&
|
||||
+ time_after(priv->last_internal_scan_jiffies +
|
||||
+ IWL_DELAY_NEXT_INTERNAL_SCAN, jiffies)) {
|
||||
+ IWL_DEBUG_SCAN(priv, "internal scan rejected\n");
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
priv->scan_bands = 0;
|
||||
if (priv->band == IEEE80211_BAND_5GHZ)
|
||||
priv->scan_bands |= BIT(IEEE80211_BAND_5GHZ);
|
131
iwlwifi_-Recover-TX-flow-failure.patch
Normal file
131
iwlwifi_-Recover-TX-flow-failure.patch
Normal file
@ -0,0 +1,131 @@
|
||||
Backport of the following upstream commit...
|
||||
|
||||
commit d5a0ffa3eaf9e898f25a925813f1a723be7808f8
|
||||
Author: Wey-Yi Guy <wey-yi.w.guy@intel.com>
|
||||
Date: Thu Mar 4 13:38:59 2010 -0800
|
||||
|
||||
iwlwifi: Recover TX flow failure
|
||||
|
||||
Monitors the tx statistics to detect the drop in throughput.
|
||||
When the throughput drops, the ratio of the actual_ack_count and the
|
||||
expected_ack_count also drops. At the same time, the aggregated
|
||||
ba_timeout (the number of ba timeout retries) also rises. If the
|
||||
actual_ack_count/expected_ack_count ratio is 0 and the number of ba
|
||||
timeout retries rises to BA_TIMEOUT_MAX, no tx packets can be delivered.
|
||||
Reloading the uCode and bring the system back to normal operational
|
||||
state.
|
||||
|
||||
Signed-off-by: Trieu 'Andrew' Nguyen <trieux.t.nguyen@intel.com>
|
||||
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
|
||||
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
|
||||
|
||||
diff -up linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-agn.c.orig linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-agn.c
|
||||
--- linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-agn.c.orig 2010-04-13 14:44:38.000000000 -0400
|
||||
+++ linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-agn.c 2010-04-13 14:53:47.000000000 -0400
|
||||
@@ -2783,10 +2783,21 @@ static int iwl_mac_ampdu_action(struct i
|
||||
return ret;
|
||||
case IEEE80211_AMPDU_TX_START:
|
||||
IWL_DEBUG_HT(priv, "start Tx\n");
|
||||
- return iwl_tx_agg_start(priv, sta->addr, tid, ssn);
|
||||
+ ret = iwl_tx_agg_start(priv, sta->addr, tid, ssn);
|
||||
+ if (ret == 0) {
|
||||
+ priv->agg_tids_count++;
|
||||
+ IWL_DEBUG_HT(priv, "priv->agg_tids_count = %u\n",
|
||||
+ priv->agg_tids_count);
|
||||
+ }
|
||||
+ return ret;
|
||||
case IEEE80211_AMPDU_TX_STOP:
|
||||
IWL_DEBUG_HT(priv, "stop Tx\n");
|
||||
ret = iwl_tx_agg_stop(priv, sta->addr, tid);
|
||||
+ if ((ret == 0) && (priv->agg_tids_count > 0)) {
|
||||
+ priv->agg_tids_count--;
|
||||
+ IWL_DEBUG_HT(priv, "priv->agg_tids_count = %u\n",
|
||||
+ priv->agg_tids_count);
|
||||
+ }
|
||||
if (test_bit(STATUS_EXIT_PENDING, &priv->status))
|
||||
return 0;
|
||||
else
|
||||
@@ -3204,6 +3215,7 @@ static int iwl_init_drv(struct iwl_priv
|
||||
priv->band = IEEE80211_BAND_2GHZ;
|
||||
|
||||
priv->iw_mode = NL80211_IFTYPE_STATION;
|
||||
+ priv->agg_tids_count = 0;
|
||||
|
||||
/* initialize force reset */
|
||||
priv->force_reset[IWL_RF_RESET].reset_duration =
|
||||
diff -up linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-dev.h.orig linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-dev.h
|
||||
--- linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-dev.h.orig 2010-04-13 14:44:38.000000000 -0400
|
||||
+++ linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-dev.h 2010-04-13 14:53:19.000000000 -0400
|
||||
@@ -1239,6 +1239,11 @@ struct iwl_priv {
|
||||
void *ict_tbl_vir;
|
||||
u32 inta;
|
||||
bool use_ict;
|
||||
+ /*
|
||||
+ * reporting the number of tids has AGG on. 0 means
|
||||
+ * no AGGREGATION
|
||||
+ */
|
||||
+ u8 agg_tids_count;
|
||||
|
||||
u32 inta_mask;
|
||||
/* Current association information needed to configure the
|
||||
diff -up linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-rx.c.orig linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-rx.c
|
||||
--- linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-rx.c.orig 2010-04-13 14:44:38.000000000 -0400
|
||||
+++ linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-rx.c 2010-04-13 14:56:17.000000000 -0400
|
||||
@@ -593,9 +593,18 @@ static void iwl_accumulative_statistics(
|
||||
|
||||
#define REG_RECALIB_PERIOD (60)
|
||||
|
||||
+/* the threshold ratio of actual_ack_cnt to expected_ack_cnt in percent */
|
||||
+#define ACK_CNT_RATIO (50)
|
||||
+#define BA_TIMEOUT_CNT (5)
|
||||
+#define BA_TIMEOUT_MAX (16)
|
||||
+
|
||||
#define PLCP_MSG "plcp_err exceeded %u, %u, %u, %u, %u, %d, %u mSecs\n"
|
||||
/*
|
||||
- * This function checks for plcp error.
|
||||
+ * This function checks for plcp error, ACK count ratios, aggregated BA
|
||||
+ * timeout retries.
|
||||
+ * - When the ACK count ratio is 0 and aggregated BA timeout retries is
|
||||
+ * exceeding the BA_TIMEOUT_MAX, it will recover the failure by resetting
|
||||
+ * the firmware.
|
||||
* - When the plcp error is exceeding the thresholds, it will reset the radio
|
||||
* to improve the throughput.
|
||||
*/
|
||||
@@ -605,6 +614,37 @@ void iwl_recover_from_statistics(struct
|
||||
int combined_plcp_delta;
|
||||
unsigned int plcp_msec;
|
||||
unsigned long plcp_received_jiffies;
|
||||
+ int actual_ack_cnt_delta;
|
||||
+ int expected_ack_cnt_delta;
|
||||
+ int ba_timeout_delta;
|
||||
+
|
||||
+ actual_ack_cnt_delta =
|
||||
+ le32_to_cpu(pkt->u.stats.tx.actual_ack_cnt) -
|
||||
+ le32_to_cpu(priv->statistics.tx.actual_ack_cnt);
|
||||
+ expected_ack_cnt_delta =
|
||||
+ le32_to_cpu(pkt->u.stats.tx.expected_ack_cnt) -
|
||||
+ le32_to_cpu(priv->statistics.tx.expected_ack_cnt);
|
||||
+ ba_timeout_delta =
|
||||
+ le32_to_cpu(pkt->u.stats.tx.agg.ba_timeout) -
|
||||
+ le32_to_cpu(priv->statistics.tx.agg.ba_timeout);
|
||||
+ if ((priv->agg_tids_count > 0) &&
|
||||
+ (expected_ack_cnt_delta > 0) &&
|
||||
+ (((actual_ack_cnt_delta * 100) / expected_ack_cnt_delta)
|
||||
+ < ACK_CNT_RATIO) &&
|
||||
+ (ba_timeout_delta > BA_TIMEOUT_CNT)) {
|
||||
+ IWL_DEBUG_RADIO(priv, "actual_ack_cnt delta = %d,"
|
||||
+ " expected_ack_cnt = %d\n",
|
||||
+ actual_ack_cnt_delta, expected_ack_cnt_delta);
|
||||
+
|
||||
+ IWL_DEBUG_RADIO(priv, "agg ba_timeout delta = %d\n",
|
||||
+ ba_timeout_delta);
|
||||
+ if ((actual_ack_cnt_delta == 0) &&
|
||||
+ (ba_timeout_delta >= BA_TIMEOUT_MAX)) {
|
||||
+ IWL_DEBUG_RADIO(priv,
|
||||
+ "call iwl_force_reset(IWL_FW_RESET)\n");
|
||||
+ iwl_force_reset(priv, IWL_FW_RESET);
|
||||
+ }
|
||||
+ }
|
||||
|
||||
/*
|
||||
* check for plcp_err and trigger radio reset if it exceeds
|
472
iwlwifi_-Recover-TX-flow-stall-due-to-stuck-queue.patch
Normal file
472
iwlwifi_-Recover-TX-flow-stall-due-to-stuck-queue.patch
Normal file
@ -0,0 +1,472 @@
|
||||
Backport of the following upstream commit...
|
||||
|
||||
commit b74e31a9bc1013e69b85b139072485dc153453dd
|
||||
Author: Wey-Yi Guy <wey-yi.w.guy@intel.com>
|
||||
Date: Mon Mar 1 17:23:50 2010 -0800
|
||||
|
||||
iwlwifi: Recover TX flow stall due to stuck queue
|
||||
|
||||
Monitors the internal TX queues periodically. When a queue is stuck
|
||||
for some unknown conditions causing the throughput to drop and the
|
||||
transfer is stop, the driver will force firmware reload and bring the
|
||||
system back to normal operational state.
|
||||
|
||||
The iwlwifi devices behave differently in this regard so this feature is
|
||||
made part of the ops infrastructure so we can have more control on how to
|
||||
monitor and recover from tx queue stall case per device.
|
||||
|
||||
Signed-off-by: Trieu 'Andrew' Nguyen <trieux.t.nguyen@intel.com>
|
||||
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
|
||||
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
|
||||
|
||||
diff -up linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-1000.c.orig linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-1000.c
|
||||
--- linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-1000.c.orig 2010-04-13 14:33:10.000000000 -0400
|
||||
+++ linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-1000.c 2010-04-13 14:34:23.000000000 -0400
|
||||
@@ -138,6 +138,7 @@ static struct iwl_lib_ops iwl1000_lib =
|
||||
.temperature = iwl5000_temperature,
|
||||
.set_ct_kill = iwl1000_set_ct_threshold,
|
||||
},
|
||||
+ .recover_from_tx_stall = iwl_bg_monitor_recover,
|
||||
};
|
||||
|
||||
static struct iwl_ops iwl1000_ops = {
|
||||
@@ -175,6 +176,7 @@ struct iwl_cfg iwl1000_bgn_cfg = {
|
||||
.support_ct_kill_exit = true,
|
||||
.sm_ps_mode = WLAN_HT_CAP_SM_PS_DISABLED,
|
||||
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_EXT_LONG_THRESHOLD_DEF,
|
||||
+ .monitor_recover_period = IWL_MONITORING_PERIOD,
|
||||
};
|
||||
|
||||
struct iwl_cfg iwl1000_bg_cfg = {
|
||||
@@ -202,6 +204,7 @@ struct iwl_cfg iwl1000_bg_cfg = {
|
||||
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
|
||||
.support_ct_kill_exit = true,
|
||||
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_EXT_LONG_THRESHOLD_DEF,
|
||||
+ .monitor_recover_period = IWL_MONITORING_PERIOD,
|
||||
};
|
||||
|
||||
MODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_UCODE_API_MAX));
|
||||
diff -up linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl3945-base.c.orig linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl3945-base.c
|
||||
--- linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl3945-base.c.orig 2010-04-13 14:33:10.000000000 -0400
|
||||
+++ linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl3945-base.c 2010-04-13 14:33:49.000000000 -0400
|
||||
@@ -2483,6 +2483,13 @@ static void iwl3945_alive_start(struct i
|
||||
/* After the ALIVE response, we can send commands to 3945 uCode */
|
||||
set_bit(STATUS_ALIVE, &priv->status);
|
||||
|
||||
+ if (priv->cfg->ops->lib->recover_from_tx_stall) {
|
||||
+ /* Enable timer to monitor the driver queues */
|
||||
+ mod_timer(&priv->monitor_recover,
|
||||
+ jiffies +
|
||||
+ msecs_to_jiffies(priv->cfg->monitor_recover_period));
|
||||
+ }
|
||||
+
|
||||
if (iwl_is_rfkill(priv))
|
||||
return;
|
||||
|
||||
@@ -3768,6 +3775,13 @@ static void iwl3945_setup_deferred_work(
|
||||
|
||||
iwl3945_hw_setup_deferred_work(priv);
|
||||
|
||||
+ if (priv->cfg->ops->lib->recover_from_tx_stall) {
|
||||
+ init_timer(&priv->monitor_recover);
|
||||
+ priv->monitor_recover.data = (unsigned long)priv;
|
||||
+ priv->monitor_recover.function =
|
||||
+ priv->cfg->ops->lib->recover_from_tx_stall;
|
||||
+ }
|
||||
+
|
||||
tasklet_init(&priv->irq_tasklet, (void (*)(unsigned long))
|
||||
iwl3945_irq_tasklet, (unsigned long)priv);
|
||||
}
|
||||
@@ -3780,6 +3794,8 @@ static void iwl3945_cancel_deferred_work
|
||||
cancel_delayed_work(&priv->scan_check);
|
||||
cancel_delayed_work(&priv->alive_start);
|
||||
cancel_work_sync(&priv->beacon_update);
|
||||
+ if (priv->cfg->ops->lib->recover_from_tx_stall)
|
||||
+ del_timer_sync(&priv->monitor_recover);
|
||||
}
|
||||
|
||||
static struct attribute *iwl3945_sysfs_entries[] = {
|
||||
diff -up linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-3945.c.orig linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-3945.c
|
||||
--- linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-3945.c.orig 2010-04-13 14:33:10.000000000 -0400
|
||||
+++ linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-3945.c 2010-04-13 14:33:49.000000000 -0400
|
||||
@@ -2829,6 +2829,7 @@ static struct iwl_cfg iwl3945_bg_cfg = {
|
||||
.led_compensation = 64,
|
||||
.broken_powersave = true,
|
||||
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
|
||||
+ .monitor_recover_period = IWL_MONITORING_PERIOD,
|
||||
};
|
||||
|
||||
static struct iwl_cfg iwl3945_abg_cfg = {
|
||||
@@ -2847,6 +2848,7 @@ static struct iwl_cfg iwl3945_abg_cfg =
|
||||
.led_compensation = 64,
|
||||
.broken_powersave = true,
|
||||
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
|
||||
+ .monitor_recover_period = IWL_MONITORING_PERIOD,
|
||||
};
|
||||
|
||||
struct pci_device_id iwl3945_hw_card_ids[] = {
|
||||
diff -up linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-4965.c.orig linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-4965.c
|
||||
--- linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-4965.c.orig 2010-04-13 14:33:10.000000000 -0400
|
||||
+++ linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-4965.c 2010-04-13 14:33:49.000000000 -0400
|
||||
@@ -2248,6 +2248,7 @@ struct iwl_cfg iwl4965_agn_cfg = {
|
||||
.chain_noise_num_beacons = IWL4965_CAL_NUM_BEACONS,
|
||||
.sm_ps_mode = WLAN_HT_CAP_SM_PS_DISABLED,
|
||||
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
|
||||
+ .monitor_recover_period = IWL_MONITORING_PERIOD,
|
||||
};
|
||||
|
||||
/* Module firmware */
|
||||
diff -up linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-5000.c.orig linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-5000.c
|
||||
--- linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-5000.c.orig 2010-04-13 14:33:10.000000000 -0400
|
||||
+++ linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-5000.c 2010-04-13 14:35:01.000000000 -0400
|
||||
@@ -1506,6 +1506,7 @@ struct iwl_lib_ops iwl5000_lib = {
|
||||
.temperature = iwl5000_temperature,
|
||||
.set_ct_kill = iwl5000_set_ct_threshold,
|
||||
},
|
||||
+ .recover_from_tx_stall = iwl_bg_monitor_recover,
|
||||
};
|
||||
|
||||
static struct iwl_lib_ops iwl5150_lib = {
|
||||
@@ -1558,6 +1559,7 @@ static struct iwl_lib_ops iwl5150_lib =
|
||||
.temperature = iwl5150_temperature,
|
||||
.set_ct_kill = iwl5150_set_ct_threshold,
|
||||
},
|
||||
+ .recover_from_tx_stall = iwl_bg_monitor_recover,
|
||||
};
|
||||
|
||||
static struct iwl_ops iwl5000_ops = {
|
||||
@@ -1607,6 +1609,7 @@ struct iwl_cfg iwl5300_agn_cfg = {
|
||||
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
|
||||
.sm_ps_mode = WLAN_HT_CAP_SM_PS_DISABLED,
|
||||
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
|
||||
+ .monitor_recover_period = IWL_MONITORING_PERIOD,
|
||||
};
|
||||
|
||||
struct iwl_cfg iwl5100_bgn_cfg = {
|
||||
@@ -1632,6 +1635,7 @@ struct iwl_cfg iwl5100_bgn_cfg = {
|
||||
.use_rts_for_ht = true, /* use rts/cts protection */
|
||||
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
|
||||
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
|
||||
+ .monitor_recover_period = IWL_MONITORING_PERIOD,
|
||||
};
|
||||
|
||||
struct iwl_cfg iwl5100_abg_cfg = {
|
||||
@@ -1655,6 +1659,7 @@ struct iwl_cfg iwl5100_abg_cfg = {
|
||||
.led_compensation = 51,
|
||||
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
|
||||
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
|
||||
+ .monitor_recover_period = IWL_MONITORING_PERIOD,
|
||||
};
|
||||
|
||||
struct iwl_cfg iwl5100_agn_cfg = {
|
||||
@@ -1681,6 +1686,7 @@ struct iwl_cfg iwl5100_agn_cfg = {
|
||||
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
|
||||
.sm_ps_mode = WLAN_HT_CAP_SM_PS_DISABLED,
|
||||
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
|
||||
+ .monitor_recover_period = IWL_MONITORING_PERIOD,
|
||||
};
|
||||
|
||||
struct iwl_cfg iwl5350_agn_cfg = {
|
||||
@@ -1707,6 +1713,7 @@ struct iwl_cfg iwl5350_agn_cfg = {
|
||||
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
|
||||
.sm_ps_mode = WLAN_HT_CAP_SM_PS_DISABLED,
|
||||
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
|
||||
+ .monitor_recover_period = IWL_MONITORING_PERIOD,
|
||||
};
|
||||
|
||||
struct iwl_cfg iwl5150_agn_cfg = {
|
||||
@@ -1733,6 +1740,7 @@ struct iwl_cfg iwl5150_agn_cfg = {
|
||||
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
|
||||
.sm_ps_mode = WLAN_HT_CAP_SM_PS_DISABLED,
|
||||
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
|
||||
+ .monitor_recover_period = IWL_MONITORING_PERIOD,
|
||||
};
|
||||
|
||||
struct iwl_cfg iwl5150_abg_cfg = {
|
||||
@@ -1756,6 +1764,7 @@ struct iwl_cfg iwl5150_abg_cfg = {
|
||||
.led_compensation = 51,
|
||||
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
|
||||
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
|
||||
+ .monitor_recover_period = IWL_MONITORING_PERIOD,
|
||||
};
|
||||
|
||||
MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE(IWL5000_UCODE_API_MAX));
|
||||
diff -up linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-6000.c.orig linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-6000.c
|
||||
--- linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-6000.c.orig 2010-04-13 14:33:10.000000000 -0400
|
||||
+++ linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-6000.c 2010-04-13 14:36:12.000000000 -0400
|
||||
@@ -250,6 +250,7 @@ static struct iwl_lib_ops iwl6000_lib =
|
||||
.temperature = iwl5000_temperature,
|
||||
.set_ct_kill = iwl6000_set_ct_threshold,
|
||||
},
|
||||
+ .recover_from_tx_stall = iwl_bg_monitor_recover,
|
||||
};
|
||||
|
||||
static struct iwl_ops iwl6000_ops = {
|
||||
@@ -308,6 +309,7 @@ struct iwl_cfg iwl6000i_2agn_cfg = {
|
||||
.support_ct_kill_exit = true,
|
||||
.sm_ps_mode = WLAN_HT_CAP_SM_PS_DISABLED,
|
||||
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
|
||||
+ .monitor_recover_period = IWL_MONITORING_PERIOD,
|
||||
};
|
||||
|
||||
struct iwl_cfg iwl6000i_2abg_cfg = {
|
||||
@@ -338,6 +340,7 @@ struct iwl_cfg iwl6000i_2abg_cfg = {
|
||||
.adv_thermal_throttle = true,
|
||||
.support_ct_kill_exit = true,
|
||||
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
|
||||
+ .monitor_recover_period = IWL_MONITORING_PERIOD,
|
||||
};
|
||||
|
||||
struct iwl_cfg iwl6000i_2bg_cfg = {
|
||||
@@ -368,6 +371,7 @@ struct iwl_cfg iwl6000i_2bg_cfg = {
|
||||
.adv_thermal_throttle = true,
|
||||
.support_ct_kill_exit = true,
|
||||
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
|
||||
+ .monitor_recover_period = IWL_MONITORING_PERIOD,
|
||||
};
|
||||
|
||||
struct iwl_cfg iwl6050_2agn_cfg = {
|
||||
@@ -400,6 +404,7 @@ struct iwl_cfg iwl6050_2agn_cfg = {
|
||||
.support_ct_kill_exit = true,
|
||||
.sm_ps_mode = WLAN_HT_CAP_SM_PS_DYNAMIC,
|
||||
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
|
||||
+ .monitor_recover_period = IWL_MONITORING_PERIOD,
|
||||
};
|
||||
|
||||
struct iwl_cfg iwl6050_2abg_cfg = {
|
||||
@@ -430,6 +435,7 @@ struct iwl_cfg iwl6050_2abg_cfg = {
|
||||
.adv_thermal_throttle = true,
|
||||
.support_ct_kill_exit = true,
|
||||
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
|
||||
+ .monitor_recover_period = IWL_MONITORING_PERIOD,
|
||||
};
|
||||
|
||||
struct iwl_cfg iwl6000_3agn_cfg = {
|
||||
@@ -462,6 +468,7 @@ struct iwl_cfg iwl6000_3agn_cfg = {
|
||||
.support_ct_kill_exit = true,
|
||||
.sm_ps_mode = WLAN_HT_CAP_SM_PS_DISABLED,
|
||||
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
|
||||
+ .monitor_recover_period = IWL_MONITORING_PERIOD,
|
||||
};
|
||||
|
||||
MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX));
|
||||
diff -up linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-agn.c.orig linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-agn.c
|
||||
--- linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-agn.c.orig 2010-04-13 14:33:10.000000000 -0400
|
||||
+++ linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-agn.c 2010-04-13 14:37:04.000000000 -0400
|
||||
@@ -1912,6 +1912,13 @@ static void iwl_alive_start(struct iwl_p
|
||||
/* After the ALIVE response, we can send host commands to the uCode */
|
||||
set_bit(STATUS_ALIVE, &priv->status);
|
||||
|
||||
+ if (priv->cfg->ops->lib->recover_from_tx_stall) {
|
||||
+ /* Enable timer to monitor the driver queues */
|
||||
+ mod_timer(&priv->monitor_recover,
|
||||
+ jiffies +
|
||||
+ msecs_to_jiffies(priv->cfg->monitor_recover_period));
|
||||
+ }
|
||||
+
|
||||
if (iwl_is_rfkill(priv))
|
||||
return;
|
||||
|
||||
@@ -3126,6 +3133,13 @@ static void iwl_setup_deferred_work(stru
|
||||
priv->statistics_periodic.data = (unsigned long)priv;
|
||||
priv->statistics_periodic.function = iwl_bg_statistics_periodic;
|
||||
|
||||
+ if (priv->cfg->ops->lib->recover_from_tx_stall) {
|
||||
+ init_timer(&priv->monitor_recover);
|
||||
+ priv->monitor_recover.data = (unsigned long)priv;
|
||||
+ priv->monitor_recover.function =
|
||||
+ priv->cfg->ops->lib->recover_from_tx_stall;
|
||||
+ }
|
||||
+
|
||||
if (!priv->cfg->use_isr_legacy)
|
||||
tasklet_init(&priv->irq_tasklet, (void (*)(unsigned long))
|
||||
iwl_irq_tasklet, (unsigned long)priv);
|
||||
@@ -3144,6 +3158,8 @@ static void iwl_cancel_deferred_work(str
|
||||
cancel_delayed_work(&priv->alive_start);
|
||||
cancel_work_sync(&priv->beacon_update);
|
||||
del_timer_sync(&priv->statistics_periodic);
|
||||
+ if (priv->cfg->ops->lib->recover_from_tx_stall)
|
||||
+ del_timer_sync(&priv->monitor_recover);
|
||||
}
|
||||
|
||||
static void iwl_init_hw_rates(struct iwl_priv *priv,
|
||||
diff -up linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-core.c.orig linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-core.c
|
||||
--- linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-core.c.orig 2010-04-13 14:33:10.000000000 -0400
|
||||
+++ linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-core.c 2010-04-13 14:33:49.000000000 -0400
|
||||
@@ -3263,6 +3263,99 @@ int iwl_force_reset(struct iwl_priv *pri
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
+EXPORT_SYMBOL(iwl_force_reset);
|
||||
+
|
||||
+/**
|
||||
+ * iwl_bg_monitor_recover - Timer callback to check for stuck queue and recover
|
||||
+ *
|
||||
+ * During normal condition (no queue is stuck), the timer is continually set to
|
||||
+ * execute every monitor_recover_period milliseconds after the last timer
|
||||
+ * expired. When the queue read_ptr is at the same place, the timer is
|
||||
+ * shorten to 100mSecs. This is
|
||||
+ * 1) to reduce the chance that the read_ptr may wrap around (not stuck)
|
||||
+ * 2) to detect the stuck queues quicker before the station and AP can
|
||||
+ * disassociate each other.
|
||||
+ *
|
||||
+ * This function monitors all the tx queues and recover from it if any
|
||||
+ * of the queues are stuck.
|
||||
+ * 1. It first check the cmd queue for stuck conditions. If it is stuck,
|
||||
+ * it will recover by resetting the firmware and return.
|
||||
+ * 2. Then, it checks for station association. If it associates it will check
|
||||
+ * other queues. If any queue is stuck, it will recover by resetting
|
||||
+ * the firmware.
|
||||
+ * Note: It the number of times the queue read_ptr to be at the same place to
|
||||
+ * be MAX_REPEAT+1 in order to consider to be stuck.
|
||||
+ */
|
||||
+/*
|
||||
+ * The maximum number of times the read pointer of the tx queue at the
|
||||
+ * same place without considering to be stuck.
|
||||
+ */
|
||||
+#define MAX_REPEAT (2)
|
||||
+static int iwl_check_stuck_queue(struct iwl_priv *priv, int cnt)
|
||||
+{
|
||||
+ struct iwl_tx_queue *txq;
|
||||
+ struct iwl_queue *q;
|
||||
+
|
||||
+ txq = &priv->txq[cnt];
|
||||
+ q = &txq->q;
|
||||
+ /* queue is empty, skip */
|
||||
+ if (q->read_ptr != q->write_ptr) {
|
||||
+ if (q->read_ptr == q->last_read_ptr) {
|
||||
+ /* a queue has not been read from last time */
|
||||
+ if (q->repeat_same_read_ptr > MAX_REPEAT) {
|
||||
+ IWL_ERR(priv,
|
||||
+ "queue %d stuck %d time. Fw reload.\n",
|
||||
+ q->id, q->repeat_same_read_ptr);
|
||||
+ q->repeat_same_read_ptr = 0;
|
||||
+ iwl_force_reset(priv, IWL_FW_RESET);
|
||||
+ } else {
|
||||
+ q->repeat_same_read_ptr++;
|
||||
+ IWL_DEBUG_RADIO(priv,
|
||||
+ "queue %d, not read %d time\n",
|
||||
+ q->id,
|
||||
+ q->repeat_same_read_ptr);
|
||||
+ mod_timer(&priv->monitor_recover, jiffies +
|
||||
+ msecs_to_jiffies(IWL_ONE_HUNDRED_MSECS));
|
||||
+ }
|
||||
+ return 1;
|
||||
+ } else {
|
||||
+ q->last_read_ptr = q->read_ptr;
|
||||
+ q->repeat_same_read_ptr = 0;
|
||||
+ }
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+void iwl_bg_monitor_recover(unsigned long data)
|
||||
+{
|
||||
+ struct iwl_priv *priv = (struct iwl_priv *)data;
|
||||
+ int cnt;
|
||||
+
|
||||
+ if (test_bit(STATUS_EXIT_PENDING, &priv->status))
|
||||
+ return;
|
||||
+
|
||||
+ /* monitor and check for stuck cmd queue */
|
||||
+ if (iwl_check_stuck_queue(priv, IWL_CMD_QUEUE_NUM))
|
||||
+ return;
|
||||
+
|
||||
+ /* monitor and check for other stuck queues */
|
||||
+ if (iwl_is_associated(priv)) {
|
||||
+ for (cnt = 0; cnt < priv->hw_params.max_txq_num; cnt++) {
|
||||
+ /* skip as we already checked the command queue */
|
||||
+ if (cnt == IWL_CMD_QUEUE_NUM)
|
||||
+ continue;
|
||||
+ if (iwl_check_stuck_queue(priv, cnt))
|
||||
+ return;
|
||||
+ }
|
||||
+ }
|
||||
+ /*
|
||||
+ * Reschedule the timer to occur in
|
||||
+ * priv->cfg->monitor_recover_period
|
||||
+ */
|
||||
+ mod_timer(&priv->monitor_recover,
|
||||
+ jiffies + msecs_to_jiffies(priv->cfg->monitor_recover_period));
|
||||
+}
|
||||
+EXPORT_SYMBOL(iwl_bg_monitor_recover);
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
|
||||
diff -up linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-core.h.orig linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-core.h
|
||||
--- linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-core.h.orig 2010-04-13 14:33:10.000000000 -0400
|
||||
+++ linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-core.h 2010-04-13 14:38:21.000000000 -0400
|
||||
@@ -187,6 +187,8 @@ struct iwl_lib_ops {
|
||||
|
||||
/* temperature */
|
||||
struct iwl_temp_ops temp_ops;
|
||||
+ /* recover from tx queue stall */
|
||||
+ void (*recover_from_tx_stall)(unsigned long data);
|
||||
};
|
||||
|
||||
struct iwl_led_ops {
|
||||
@@ -292,6 +294,8 @@ struct iwl_cfg {
|
||||
u8 sm_ps_mode;
|
||||
const bool support_wimax_coexist;
|
||||
u8 plcp_delta_threshold;
|
||||
+ /* timer period for monitor the driver queues */
|
||||
+ u32 monitor_recover_period;
|
||||
};
|
||||
|
||||
/***************************
|
||||
@@ -579,6 +583,9 @@ static inline u16 iwl_pcie_link_ctl(stru
|
||||
pci_read_config_word(priv->pci_dev, pos + PCI_EXP_LNKCTL, &pci_lnk_ctl);
|
||||
return pci_lnk_ctl;
|
||||
}
|
||||
+
|
||||
+void iwl_bg_monitor_recover(unsigned long data);
|
||||
+
|
||||
#ifdef CONFIG_PM
|
||||
int iwl_pci_suspend(struct pci_dev *pdev, pm_message_t state);
|
||||
int iwl_pci_resume(struct pci_dev *pdev);
|
||||
diff -up linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-dev.h.orig linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-dev.h
|
||||
--- linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-dev.h.orig 2010-04-13 14:33:10.000000000 -0400
|
||||
+++ linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-dev.h 2010-04-13 14:38:52.000000000 -0400
|
||||
@@ -183,6 +183,10 @@ struct iwl_queue {
|
||||
int n_bd; /* number of BDs in this queue */
|
||||
int write_ptr; /* 1-st empty entry (index) host_w*/
|
||||
int read_ptr; /* last used entry (index) host_r*/
|
||||
+ /* use for monitoring and recovering the stuck queue */
|
||||
+ int last_read_ptr; /* storing the last read_ptr */
|
||||
+ /* number of time read_ptr and last_read_ptr are the same */
|
||||
+ u8 repeat_same_read_ptr;
|
||||
dma_addr_t dma_addr; /* physical addr for BD's */
|
||||
int n_window; /* safe queue window */
|
||||
u32 id;
|
||||
@@ -997,6 +1001,11 @@ struct iwl_switch_rxon {
|
||||
#define IWL_DELAY_NEXT_FORCE_RF_RESET (HZ*3)
|
||||
#define IWL_DELAY_NEXT_FORCE_FW_RELOAD (HZ*5)
|
||||
|
||||
+/* timer constants use to monitor and recover stuck tx queues in mSecs */
|
||||
+#define IWL_MONITORING_PERIOD (1000)
|
||||
+#define IWL_ONE_HUNDRED_MSECS (100)
|
||||
+#define IWL_SIXTY_SECS (60000)
|
||||
+
|
||||
enum iwl_reset {
|
||||
IWL_RF_RESET = 0,
|
||||
IWL_FW_RESET,
|
||||
@@ -1295,6 +1304,7 @@ struct iwl_priv {
|
||||
u32 disable_tx_power_cal;
|
||||
struct work_struct run_time_calib_work;
|
||||
struct timer_list statistics_periodic;
|
||||
+ struct timer_list monitor_recover;
|
||||
bool hw_ready;
|
||||
/*For 3945*/
|
||||
#define IWL_DEFAULT_TX_POWER 0x0F
|
||||
diff -up linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-tx.c.orig linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-tx.c
|
||||
--- linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-tx.c.orig 2010-04-13 14:33:10.000000000 -0400
|
||||
+++ linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-tx.c 2010-04-13 14:33:49.000000000 -0400
|
||||
@@ -288,6 +288,8 @@ static int iwl_queue_init(struct iwl_pri
|
||||
q->high_mark = 2;
|
||||
|
||||
q->write_ptr = q->read_ptr = 0;
|
||||
+ q->last_read_ptr = 0;
|
||||
+ q->repeat_same_read_ptr = 0;
|
||||
|
||||
return 0;
|
||||
}
|
394
iwlwifi_-Tune-radio-to-prevent-unexpected-behavior.patch
Normal file
394
iwlwifi_-Tune-radio-to-prevent-unexpected-behavior.patch
Normal file
@ -0,0 +1,394 @@
|
||||
Backport of the following upstream commit...
|
||||
|
||||
commit 3e4fb5faefb57824f2e42305b3d5907845af978c
|
||||
Author: Trieu 'Andrew' Nguyen <trieux.t.nguyen@intel.com>
|
||||
Date: Fri Jan 22 14:22:46 2010 -0800
|
||||
|
||||
iwlwifi: Tune radio to prevent unexpected behavior
|
||||
|
||||
We have seen the throughput dropped due to external noisy environment
|
||||
and the radio is out of tune. There are lot of plcp errors indicating
|
||||
this condition. Eventually the station can get de-authenticated by the
|
||||
Access Point. By resetting and tuning the radio, the plcp errors are
|
||||
reduced or eliminated and the throughput starts to rise.
|
||||
|
||||
To prevent unexpected behavior such as drop in throughput or deauthentication,
|
||||
- The change provides the driver feature to monitor and tune the radio base on
|
||||
the statistics notification from the uCode.
|
||||
- It also allows the setting of the plcp error rate threshold via
|
||||
the plcp_delta under debugfs interface.
|
||||
|
||||
Signed-off-by: Trieu 'Andrew' Nguyen <trieux.t.nguyen@intel.com>
|
||||
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
|
||||
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
||||
|
||||
diff -up linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-1000.c.orig linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-1000.c
|
||||
--- linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-1000.c.orig 2010-04-13 14:30:36.000000000 -0400
|
||||
+++ linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-1000.c 2010-04-13 14:30:41.000000000 -0400
|
||||
@@ -174,6 +174,7 @@ struct iwl_cfg iwl1000_bgn_cfg = {
|
||||
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
|
||||
.support_ct_kill_exit = true,
|
||||
.sm_ps_mode = WLAN_HT_CAP_SM_PS_DISABLED,
|
||||
+ .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
|
||||
};
|
||||
|
||||
struct iwl_cfg iwl1000_bg_cfg = {
|
||||
@@ -200,6 +201,7 @@ struct iwl_cfg iwl1000_bg_cfg = {
|
||||
.led_compensation = 51,
|
||||
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
|
||||
.support_ct_kill_exit = true,
|
||||
+ .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
|
||||
};
|
||||
|
||||
MODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_UCODE_API_MAX));
|
||||
diff -up linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-3945.c.orig linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-3945.c
|
||||
--- linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-3945.c.orig 2010-04-13 14:30:36.000000000 -0400
|
||||
+++ linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-3945.c 2010-04-13 14:30:41.000000000 -0400
|
||||
@@ -2828,6 +2828,7 @@ static struct iwl_cfg iwl3945_bg_cfg = {
|
||||
.ht_greenfield_support = false,
|
||||
.led_compensation = 64,
|
||||
.broken_powersave = true,
|
||||
+ .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
|
||||
};
|
||||
|
||||
static struct iwl_cfg iwl3945_abg_cfg = {
|
||||
@@ -2845,6 +2846,7 @@ static struct iwl_cfg iwl3945_abg_cfg =
|
||||
.ht_greenfield_support = false,
|
||||
.led_compensation = 64,
|
||||
.broken_powersave = true,
|
||||
+ .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
|
||||
};
|
||||
|
||||
struct pci_device_id iwl3945_hw_card_ids[] = {
|
||||
diff -up linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-4965.c.orig linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-4965.c
|
||||
--- linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-4965.c.orig 2010-04-13 14:30:36.000000000 -0400
|
||||
+++ linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-4965.c 2010-04-13 14:30:41.000000000 -0400
|
||||
@@ -2247,6 +2247,7 @@ struct iwl_cfg iwl4965_agn_cfg = {
|
||||
.led_compensation = 61,
|
||||
.chain_noise_num_beacons = IWL4965_CAL_NUM_BEACONS,
|
||||
.sm_ps_mode = WLAN_HT_CAP_SM_PS_DISABLED,
|
||||
+ .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
|
||||
};
|
||||
|
||||
/* Module firmware */
|
||||
diff -up linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-5000.c.orig linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-5000.c
|
||||
--- linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-5000.c.orig 2010-04-13 14:30:36.000000000 -0400
|
||||
+++ linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-5000.c 2010-04-13 14:30:41.000000000 -0400
|
||||
@@ -1606,6 +1606,7 @@ struct iwl_cfg iwl5300_agn_cfg = {
|
||||
.use_rts_for_ht = true, /* use rts/cts protection */
|
||||
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
|
||||
.sm_ps_mode = WLAN_HT_CAP_SM_PS_DISABLED,
|
||||
+ .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
|
||||
};
|
||||
|
||||
struct iwl_cfg iwl5100_bgn_cfg = {
|
||||
@@ -1630,6 +1631,7 @@ struct iwl_cfg iwl5100_bgn_cfg = {
|
||||
.led_compensation = 51,
|
||||
.use_rts_for_ht = true, /* use rts/cts protection */
|
||||
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
|
||||
+ .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
|
||||
};
|
||||
|
||||
struct iwl_cfg iwl5100_abg_cfg = {
|
||||
@@ -1652,6 +1654,7 @@ struct iwl_cfg iwl5100_abg_cfg = {
|
||||
.use_bsm = false,
|
||||
.led_compensation = 51,
|
||||
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
|
||||
+ .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
|
||||
};
|
||||
|
||||
struct iwl_cfg iwl5100_agn_cfg = {
|
||||
@@ -1677,6 +1680,7 @@ struct iwl_cfg iwl5100_agn_cfg = {
|
||||
.use_rts_for_ht = true, /* use rts/cts protection */
|
||||
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
|
||||
.sm_ps_mode = WLAN_HT_CAP_SM_PS_DISABLED,
|
||||
+ .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
|
||||
};
|
||||
|
||||
struct iwl_cfg iwl5350_agn_cfg = {
|
||||
@@ -1702,6 +1706,7 @@ struct iwl_cfg iwl5350_agn_cfg = {
|
||||
.use_rts_for_ht = true, /* use rts/cts protection */
|
||||
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
|
||||
.sm_ps_mode = WLAN_HT_CAP_SM_PS_DISABLED,
|
||||
+ .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
|
||||
};
|
||||
|
||||
struct iwl_cfg iwl5150_agn_cfg = {
|
||||
@@ -1727,6 +1732,7 @@ struct iwl_cfg iwl5150_agn_cfg = {
|
||||
.use_rts_for_ht = true, /* use rts/cts protection */
|
||||
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
|
||||
.sm_ps_mode = WLAN_HT_CAP_SM_PS_DISABLED,
|
||||
+ .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
|
||||
};
|
||||
|
||||
struct iwl_cfg iwl5150_abg_cfg = {
|
||||
@@ -1749,6 +1755,7 @@ struct iwl_cfg iwl5150_abg_cfg = {
|
||||
.use_bsm = false,
|
||||
.led_compensation = 51,
|
||||
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
|
||||
+ .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
|
||||
};
|
||||
|
||||
MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE(IWL5000_UCODE_API_MAX));
|
||||
diff -up linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-6000.c.orig linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-6000.c
|
||||
--- linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-6000.c.orig 2010-04-13 14:30:36.000000000 -0400
|
||||
+++ linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-6000.c 2010-04-13 14:32:09.000000000 -0400
|
||||
@@ -307,6 +307,7 @@ struct iwl_cfg iwl6000i_2agn_cfg = {
|
||||
.adv_thermal_throttle = true,
|
||||
.support_ct_kill_exit = true,
|
||||
.sm_ps_mode = WLAN_HT_CAP_SM_PS_DISABLED,
|
||||
+ .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
|
||||
};
|
||||
|
||||
struct iwl_cfg iwl6000i_2abg_cfg = {
|
||||
@@ -336,6 +337,7 @@ struct iwl_cfg iwl6000i_2abg_cfg = {
|
||||
.supports_idle = true,
|
||||
.adv_thermal_throttle = true,
|
||||
.support_ct_kill_exit = true,
|
||||
+ .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
|
||||
};
|
||||
|
||||
struct iwl_cfg iwl6000i_2bg_cfg = {
|
||||
@@ -365,6 +367,7 @@ struct iwl_cfg iwl6000i_2bg_cfg = {
|
||||
.supports_idle = true,
|
||||
.adv_thermal_throttle = true,
|
||||
.support_ct_kill_exit = true,
|
||||
+ .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
|
||||
};
|
||||
|
||||
struct iwl_cfg iwl6050_2agn_cfg = {
|
||||
@@ -396,6 +399,7 @@ struct iwl_cfg iwl6050_2agn_cfg = {
|
||||
.adv_thermal_throttle = true,
|
||||
.support_ct_kill_exit = true,
|
||||
.sm_ps_mode = WLAN_HT_CAP_SM_PS_DYNAMIC,
|
||||
+ .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
|
||||
};
|
||||
|
||||
struct iwl_cfg iwl6050_2abg_cfg = {
|
||||
@@ -425,6 +429,7 @@ struct iwl_cfg iwl6050_2abg_cfg = {
|
||||
.supports_idle = true,
|
||||
.adv_thermal_throttle = true,
|
||||
.support_ct_kill_exit = true,
|
||||
+ .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
|
||||
};
|
||||
|
||||
struct iwl_cfg iwl6000_3agn_cfg = {
|
||||
@@ -456,6 +461,7 @@ struct iwl_cfg iwl6000_3agn_cfg = {
|
||||
.adv_thermal_throttle = true,
|
||||
.support_ct_kill_exit = true,
|
||||
.sm_ps_mode = WLAN_HT_CAP_SM_PS_DISABLED,
|
||||
+ .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
|
||||
};
|
||||
|
||||
MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX));
|
||||
diff -up linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-core.h.orig linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-core.h
|
||||
--- linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-core.h.orig 2010-04-13 14:30:36.000000000 -0400
|
||||
+++ linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-core.h 2010-04-13 14:30:41.000000000 -0400
|
||||
@@ -232,6 +232,8 @@ struct iwl_mod_params {
|
||||
* @support_ct_kill_exit: support ct kill exit condition
|
||||
* @sm_ps_mode: spatial multiplexing power save mode
|
||||
* @support_wimax_coexist: support wimax/wifi co-exist
|
||||
+ * @plcp_delta_threshold: plcp error rate threshold used to trigger
|
||||
+ * radio tuning when there is a high receiving plcp error rate
|
||||
*
|
||||
* We enable the driver to be backward compatible wrt API version. The
|
||||
* driver specifies which APIs it supports (with @ucode_api_max being the
|
||||
@@ -289,6 +291,7 @@ struct iwl_cfg {
|
||||
bool support_ct_kill_exit;
|
||||
u8 sm_ps_mode;
|
||||
const bool support_wimax_coexist;
|
||||
+ u8 plcp_delta_threshold;
|
||||
};
|
||||
|
||||
/***************************
|
||||
diff -up linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-debugfs.c.orig linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-debugfs.c
|
||||
--- linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-debugfs.c.orig 2010-04-13 14:30:36.000000000 -0400
|
||||
+++ linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-debugfs.c 2010-04-13 14:30:41.000000000 -0400
|
||||
@@ -1866,6 +1866,47 @@ static ssize_t iwl_dbgfs_internal_scan_w
|
||||
return count;
|
||||
}
|
||||
|
||||
+static ssize_t iwl_dbgfs_plcp_delta_read(struct file *file,
|
||||
+ char __user *user_buf,
|
||||
+ size_t count, loff_t *ppos) {
|
||||
+
|
||||
+ struct iwl_priv *priv = (struct iwl_priv *)file->private_data;
|
||||
+ int pos = 0;
|
||||
+ char buf[12];
|
||||
+ const size_t bufsz = sizeof(buf);
|
||||
+ ssize_t ret;
|
||||
+
|
||||
+ pos += scnprintf(buf + pos, bufsz - pos, "%u\n",
|
||||
+ priv->cfg->plcp_delta_threshold);
|
||||
+
|
||||
+ ret = simple_read_from_buffer(user_buf, count, ppos, buf, pos);
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static ssize_t iwl_dbgfs_plcp_delta_write(struct file *file,
|
||||
+ const char __user *user_buf,
|
||||
+ size_t count, loff_t *ppos) {
|
||||
+
|
||||
+ struct iwl_priv *priv = file->private_data;
|
||||
+ char buf[8];
|
||||
+ int buf_size;
|
||||
+ int plcp;
|
||||
+
|
||||
+ memset(buf, 0, sizeof(buf));
|
||||
+ buf_size = min(count, sizeof(buf) - 1);
|
||||
+ if (copy_from_user(buf, user_buf, buf_size))
|
||||
+ return -EFAULT;
|
||||
+ if (sscanf(buf, "%d", &plcp) != 1)
|
||||
+ return -EINVAL;
|
||||
+ if ((plcp <= IWL_MAX_PLCP_ERR_THRESHOLD_MIN) ||
|
||||
+ (plcp > IWL_MAX_PLCP_ERR_THRESHOLD_MAX))
|
||||
+ priv->cfg->plcp_delta_threshold =
|
||||
+ IWL_MAX_PLCP_ERR_THRESHOLD_DEF;
|
||||
+ else
|
||||
+ priv->cfg->plcp_delta_threshold = plcp;
|
||||
+ return count;
|
||||
+}
|
||||
+
|
||||
DEBUGFS_READ_FILE_OPS(rx_statistics);
|
||||
DEBUGFS_READ_FILE_OPS(tx_statistics);
|
||||
DEBUGFS_READ_WRITE_FILE_OPS(traffic_log);
|
||||
@@ -1881,6 +1922,7 @@ DEBUGFS_READ_FILE_OPS(power_save_status)
|
||||
DEBUGFS_WRITE_FILE_OPS(clear_ucode_statistics);
|
||||
DEBUGFS_WRITE_FILE_OPS(clear_traffic_statistics);
|
||||
DEBUGFS_WRITE_FILE_OPS(internal_scan);
|
||||
+DEBUGFS_READ_WRITE_FILE_OPS(plcp_delta);
|
||||
|
||||
/*
|
||||
* Create the debugfs files and directories
|
||||
@@ -1932,6 +1974,7 @@ int iwl_dbgfs_register(struct iwl_priv *
|
||||
DEBUGFS_ADD_FILE(clear_ucode_statistics, debug, S_IWUSR);
|
||||
DEBUGFS_ADD_FILE(clear_traffic_statistics, debug, S_IWUSR);
|
||||
DEBUGFS_ADD_FILE(internal_scan, debug, S_IWUSR);
|
||||
+ DEBUGFS_ADD_FILE(plcp_delta, debug, S_IWUSR | S_IRUSR);
|
||||
if ((priv->hw_rev & CSR_HW_REV_TYPE_MSK) != CSR_HW_REV_TYPE_3945) {
|
||||
DEBUGFS_ADD_FILE(ucode_rx_stats, debug, S_IRUSR);
|
||||
DEBUGFS_ADD_FILE(ucode_tx_stats, debug, S_IRUSR);
|
||||
@@ -1990,6 +2033,7 @@ void iwl_dbgfs_unregister(struct iwl_pri
|
||||
DEBUGFS_REMOVE(priv->dbgfs->dbgfs_debug_files.
|
||||
file_clear_traffic_statistics);
|
||||
DEBUGFS_REMOVE(priv->dbgfs->dbgfs_debug_files.file_internal_scan);
|
||||
+ DEBUGFS_REMOVE(priv->dbgfs->dbgfs_debug_files.file_plcp_delta);
|
||||
if ((priv->hw_rev & CSR_HW_REV_TYPE_MSK) != CSR_HW_REV_TYPE_3945) {
|
||||
DEBUGFS_REMOVE(priv->dbgfs->dbgfs_debug_files.
|
||||
file_ucode_rx_stats);
|
||||
diff -up linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-debug.h.orig linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-debug.h
|
||||
--- linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-debug.h.orig 2010-04-13 14:30:36.000000000 -0400
|
||||
+++ linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-debug.h 2010-04-13 14:30:41.000000000 -0400
|
||||
@@ -110,6 +110,7 @@ struct iwl_debugfs {
|
||||
struct dentry *file_clear_ucode_statistics;
|
||||
struct dentry *file_clear_traffic_statistics;
|
||||
struct dentry *file_internal_scan;
|
||||
+ struct dentry *file_plcp_delta;
|
||||
} dbgfs_debug_files;
|
||||
u32 sram_offset;
|
||||
u32 sram_len;
|
||||
diff -up linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-dev.h.orig linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-dev.h
|
||||
--- linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-dev.h.orig 2010-04-13 14:30:36.000000000 -0400
|
||||
+++ linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-dev.h 2010-04-13 14:30:41.000000000 -0400
|
||||
@@ -984,6 +984,15 @@ struct iwl_switch_rxon {
|
||||
__le16 channel;
|
||||
};
|
||||
|
||||
+/*
|
||||
+ * This is the threshold value of plcp error rate per 100mSecs. It is
|
||||
+ * used to set and check for the validity of plcp_delta.
|
||||
+ */
|
||||
+#define IWL_MAX_PLCP_ERR_THRESHOLD_MIN (0)
|
||||
+#define IWL_MAX_PLCP_ERR_THRESHOLD_DEF (50)
|
||||
+#define IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF (100)
|
||||
+#define IWL_MAX_PLCP_ERR_THRESHOLD_MAX (255)
|
||||
+
|
||||
struct iwl_priv {
|
||||
|
||||
/* ieee device used by generic ieee processing code */
|
||||
@@ -1012,6 +1021,9 @@ struct iwl_priv {
|
||||
/* ucode beacon time */
|
||||
u32 ucode_beacon_time;
|
||||
|
||||
+ /* storing the jiffies when the plcp error rate is received */
|
||||
+ unsigned long plcp_jiffies;
|
||||
+
|
||||
/* we allocate array of iwl4965_channel_info for NIC's valid channels.
|
||||
* Access via channel # using indirect index array */
|
||||
struct iwl_channel_info *channel_info; /* channel info array */
|
||||
diff -up linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-rx.c.orig linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-rx.c
|
||||
--- linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-rx.c.orig 2010-04-13 14:30:36.000000000 -0400
|
||||
+++ linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-rx.c 2010-04-13 14:30:41.000000000 -0400
|
||||
@@ -593,11 +593,15 @@ static void iwl_accumulative_statistics(
|
||||
|
||||
#define REG_RECALIB_PERIOD (60)
|
||||
|
||||
+#define PLCP_MSG "plcp_err exceeded %u, %u, %u, %u, %u, %d, %u mSecs\n"
|
||||
void iwl_rx_statistics(struct iwl_priv *priv,
|
||||
struct iwl_rx_mem_buffer *rxb)
|
||||
{
|
||||
int change;
|
||||
struct iwl_rx_packet *pkt = rxb_addr(rxb);
|
||||
+ int combined_plcp_delta;
|
||||
+ unsigned int plcp_msec;
|
||||
+ unsigned long plcp_received_jiffies;
|
||||
|
||||
IWL_DEBUG_RX(priv, "Statistics notification received (%d vs %d).\n",
|
||||
(int)sizeof(priv->statistics),
|
||||
@@ -612,6 +616,56 @@ void iwl_rx_statistics(struct iwl_priv *
|
||||
#ifdef CONFIG_IWLWIFI_DEBUG
|
||||
iwl_accumulative_statistics(priv, (__le32 *)&pkt->u.stats);
|
||||
#endif
|
||||
+ /*
|
||||
+ * check for plcp_err and trigger radio reset if it exceeds
|
||||
+ * the plcp error threshold plcp_delta.
|
||||
+ */
|
||||
+ plcp_received_jiffies = jiffies;
|
||||
+ plcp_msec = jiffies_to_msecs((long) plcp_received_jiffies -
|
||||
+ (long) priv->plcp_jiffies);
|
||||
+ priv->plcp_jiffies = plcp_received_jiffies;
|
||||
+ /*
|
||||
+ * check to make sure plcp_msec is not 0 to prevent division
|
||||
+ * by zero.
|
||||
+ */
|
||||
+ if (plcp_msec) {
|
||||
+ combined_plcp_delta =
|
||||
+ (le32_to_cpu(pkt->u.stats.rx.ofdm.plcp_err) -
|
||||
+ le32_to_cpu(priv->statistics.rx.ofdm.plcp_err)) +
|
||||
+ (le32_to_cpu(pkt->u.stats.rx.ofdm_ht.plcp_err) -
|
||||
+ le32_to_cpu(priv->statistics.rx.ofdm_ht.plcp_err));
|
||||
+
|
||||
+ if ((combined_plcp_delta > 0) &&
|
||||
+ ((combined_plcp_delta * 100) / plcp_msec) >
|
||||
+ priv->cfg->plcp_delta_threshold) {
|
||||
+ /*
|
||||
+ * if plcp_err exceed the threshold, the following
|
||||
+ * data is printed in csv format:
|
||||
+ * Text: plcp_err exceeded %d,
|
||||
+ * Received ofdm.plcp_err,
|
||||
+ * Current ofdm.plcp_err,
|
||||
+ * Received ofdm_ht.plcp_err,
|
||||
+ * Current ofdm_ht.plcp_err,
|
||||
+ * combined_plcp_delta,
|
||||
+ * plcp_msec
|
||||
+ */
|
||||
+ IWL_DEBUG_RADIO(priv, PLCP_MSG,
|
||||
+ priv->cfg->plcp_delta_threshold,
|
||||
+ le32_to_cpu(pkt->u.stats.rx.ofdm.plcp_err),
|
||||
+ le32_to_cpu(priv->statistics.rx.ofdm.plcp_err),
|
||||
+ le32_to_cpu(pkt->u.stats.rx.ofdm_ht.plcp_err),
|
||||
+ le32_to_cpu(
|
||||
+ priv->statistics.rx.ofdm_ht.plcp_err),
|
||||
+ combined_plcp_delta, plcp_msec);
|
||||
+
|
||||
+ /*
|
||||
+ * Reset the RF radio due to the high plcp
|
||||
+ * error rate
|
||||
+ */
|
||||
+ iwl_force_rf_reset(priv);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
memcpy(&priv->statistics, &pkt->u.stats, sizeof(priv->statistics));
|
||||
|
||||
set_bit(STATUS_STATISTICS, &priv->status);
|
374
iwlwifi_-add-function-to-reset_tune-radio-if-needed.patch
Normal file
374
iwlwifi_-add-function-to-reset_tune-radio-if-needed.patch
Normal file
@ -0,0 +1,374 @@
|
||||
Backport of the following upstream commit...
|
||||
|
||||
commit afbdd69af0e6a0c40676d4d4b94a0a4414708eaa
|
||||
Author: Wey-Yi Guy <wey-yi.w.guy@intel.com>
|
||||
Date: Fri Jan 22 14:22:43 2010 -0800
|
||||
|
||||
iwlwifi: add function to reset/tune radio if needed
|
||||
|
||||
Adding "radio reset" function to help reset and stabilize the radio.
|
||||
|
||||
During normal operation, sometime for unknown reason, radio encounter
|
||||
problem and can not recover by itself; the best way to
|
||||
recover from it is to reset and re-tune the radio. Currently, there is
|
||||
no RF reset command available, but since radio will get reset when
|
||||
switching channel, use internal hw scan request to force radio
|
||||
reset and get back to normal operation state.
|
||||
|
||||
The internal hw scan will only perform passive scan on the first
|
||||
available channel (not the channel being used) in associated state. The
|
||||
request should be ignored if already performing scan operation or STA is
|
||||
not in associated state.
|
||||
|
||||
Also include an "internal_scan" debugfs file to help trigger the
|
||||
internal scan from user mode.
|
||||
|
||||
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
|
||||
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
|
||||
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
||||
|
||||
diff -up linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-core.c.orig linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-core.c
|
||||
--- linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-core.c.orig 2010-04-13 11:41:15.000000000 -0400
|
||||
+++ linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-core.c 2010-04-13 11:53:36.000000000 -0400
|
||||
@@ -3197,6 +3197,30 @@ void iwl_update_stats(struct iwl_priv *p
|
||||
EXPORT_SYMBOL(iwl_update_stats);
|
||||
#endif
|
||||
|
||||
+void iwl_force_rf_reset(struct iwl_priv *priv)
|
||||
+{
|
||||
+ if (test_bit(STATUS_EXIT_PENDING, &priv->status))
|
||||
+ return;
|
||||
+
|
||||
+ if (!iwl_is_associated(priv)) {
|
||||
+ IWL_DEBUG_SCAN(priv, "force reset rejected: not associated\n");
|
||||
+ return;
|
||||
+ }
|
||||
+ /*
|
||||
+ * There is no easy and better way to force reset the radio,
|
||||
+ * the only known method is switching channel which will force to
|
||||
+ * reset and tune the radio.
|
||||
+ * Use internal short scan (single channel) operation to should
|
||||
+ * achieve this objective.
|
||||
+ * Driver should reset the radio when number of consecutive missed
|
||||
+ * beacon, or any other uCode error condition detected.
|
||||
+ */
|
||||
+ IWL_DEBUG_INFO(priv, "perform radio reset.\n");
|
||||
+ iwl_internal_short_hw_scan(priv);
|
||||
+ return;
|
||||
+}
|
||||
+EXPORT_SYMBOL(iwl_force_rf_reset);
|
||||
+
|
||||
#ifdef CONFIG_PM
|
||||
|
||||
int iwl_pci_suspend(struct pci_dev *pdev, pm_message_t state)
|
||||
diff -up linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-core.h.orig linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-core.h
|
||||
--- linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-core.h.orig 2010-02-24 13:52:17.000000000 -0500
|
||||
+++ linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-core.h 2010-04-13 11:53:36.000000000 -0400
|
||||
@@ -497,6 +497,8 @@ void iwl_init_scan_params(struct iwl_pri
|
||||
int iwl_scan_cancel(struct iwl_priv *priv);
|
||||
int iwl_scan_cancel_timeout(struct iwl_priv *priv, unsigned long ms);
|
||||
int iwl_mac_hw_scan(struct ieee80211_hw *hw, struct cfg80211_scan_request *req);
|
||||
+int iwl_internal_short_hw_scan(struct iwl_priv *priv);
|
||||
+void iwl_force_rf_reset(struct iwl_priv *priv);
|
||||
u16 iwl_fill_probe_req(struct iwl_priv *priv, struct ieee80211_mgmt *frame,
|
||||
const u8 *ie, int ie_len, int left);
|
||||
void iwl_setup_rx_scan_handlers(struct iwl_priv *priv);
|
||||
diff -up linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-debugfs.c.orig linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-debugfs.c
|
||||
--- linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-debugfs.c.orig 2010-02-24 13:52:17.000000000 -0500
|
||||
+++ linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-debugfs.c 2010-04-13 11:56:15.000000000 -0400
|
||||
@@ -1845,6 +1845,27 @@ static ssize_t iwl_dbgfs_clear_ucode_sta
|
||||
return count;
|
||||
}
|
||||
|
||||
+static ssize_t iwl_dbgfs_internal_scan_write(struct file *file,
|
||||
+ const char __user *user_buf,
|
||||
+ size_t count, loff_t *ppos)
|
||||
+{
|
||||
+ struct iwl_priv *priv = file->private_data;
|
||||
+ char buf[8];
|
||||
+ int buf_size;
|
||||
+ int scan;
|
||||
+
|
||||
+ memset(buf, 0, sizeof(buf));
|
||||
+ buf_size = min(count, sizeof(buf) - 1);
|
||||
+ if (copy_from_user(buf, user_buf, buf_size))
|
||||
+ return -EFAULT;
|
||||
+ if (sscanf(buf, "%d", &scan) != 1)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ iwl_internal_short_hw_scan(priv);
|
||||
+
|
||||
+ return count;
|
||||
+}
|
||||
+
|
||||
DEBUGFS_READ_FILE_OPS(rx_statistics);
|
||||
DEBUGFS_READ_FILE_OPS(tx_statistics);
|
||||
DEBUGFS_READ_WRITE_FILE_OPS(traffic_log);
|
||||
@@ -1859,6 +1880,7 @@ DEBUGFS_READ_FILE_OPS(tx_power);
|
||||
DEBUGFS_READ_FILE_OPS(power_save_status);
|
||||
DEBUGFS_WRITE_FILE_OPS(clear_ucode_statistics);
|
||||
DEBUGFS_WRITE_FILE_OPS(clear_traffic_statistics);
|
||||
+DEBUGFS_WRITE_FILE_OPS(internal_scan);
|
||||
|
||||
/*
|
||||
* Create the debugfs files and directories
|
||||
@@ -1909,6 +1931,7 @@ int iwl_dbgfs_register(struct iwl_priv *
|
||||
DEBUGFS_ADD_FILE(power_save_status, debug, S_IRUSR);
|
||||
DEBUGFS_ADD_FILE(clear_ucode_statistics, debug, S_IWUSR);
|
||||
DEBUGFS_ADD_FILE(clear_traffic_statistics, debug, S_IWUSR);
|
||||
+ DEBUGFS_ADD_FILE(internal_scan, debug, S_IWUSR);
|
||||
if ((priv->hw_rev & CSR_HW_REV_TYPE_MSK) != CSR_HW_REV_TYPE_3945) {
|
||||
DEBUGFS_ADD_FILE(ucode_rx_stats, debug, S_IRUSR);
|
||||
DEBUGFS_ADD_FILE(ucode_tx_stats, debug, S_IRUSR);
|
||||
@@ -1966,6 +1989,7 @@ void iwl_dbgfs_unregister(struct iwl_pri
|
||||
file_clear_ucode_statistics);
|
||||
DEBUGFS_REMOVE(priv->dbgfs->dbgfs_debug_files.
|
||||
file_clear_traffic_statistics);
|
||||
+ DEBUGFS_REMOVE(priv->dbgfs->dbgfs_debug_files.file_internal_scan);
|
||||
if ((priv->hw_rev & CSR_HW_REV_TYPE_MSK) != CSR_HW_REV_TYPE_3945) {
|
||||
DEBUGFS_REMOVE(priv->dbgfs->dbgfs_debug_files.
|
||||
file_ucode_rx_stats);
|
||||
diff -up linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-debug.h.orig linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-debug.h
|
||||
--- linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-debug.h.orig 2010-02-24 13:52:17.000000000 -0500
|
||||
+++ linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-debug.h 2010-04-13 11:54:48.000000000 -0400
|
||||
@@ -109,6 +109,7 @@ struct iwl_debugfs {
|
||||
struct dentry *file_power_save_status;
|
||||
struct dentry *file_clear_ucode_statistics;
|
||||
struct dentry *file_clear_traffic_statistics;
|
||||
+ struct dentry *file_internal_scan;
|
||||
} dbgfs_debug_files;
|
||||
u32 sram_offset;
|
||||
u32 sram_len;
|
||||
diff -up linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-dev.h.orig linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-dev.h
|
||||
--- linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-dev.h.orig 2010-02-24 13:52:17.000000000 -0500
|
||||
+++ linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-dev.h 2010-04-13 11:53:36.000000000 -0400
|
||||
@@ -1037,6 +1037,7 @@ struct iwl_priv {
|
||||
void *scan;
|
||||
int scan_bands;
|
||||
struct cfg80211_scan_request *scan_request;
|
||||
+ bool is_internal_short_scan;
|
||||
u8 scan_tx_ant[IEEE80211_NUM_BANDS];
|
||||
u8 mgmt_tx_ant;
|
||||
|
||||
diff -up linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-scan.c.orig linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-scan.c
|
||||
--- linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-scan.c.orig 2010-02-24 13:52:17.000000000 -0500
|
||||
+++ linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-scan.c 2010-04-13 11:53:36.000000000 -0400
|
||||
@@ -314,6 +314,72 @@ u16 iwl_get_passive_dwell_time(struct iw
|
||||
}
|
||||
EXPORT_SYMBOL(iwl_get_passive_dwell_time);
|
||||
|
||||
+static int iwl_get_single_channel_for_scan(struct iwl_priv *priv,
|
||||
+ enum ieee80211_band band,
|
||||
+ struct iwl_scan_channel *scan_ch)
|
||||
+{
|
||||
+ const struct ieee80211_supported_band *sband;
|
||||
+ const struct iwl_channel_info *ch_info;
|
||||
+ u16 passive_dwell = 0;
|
||||
+ u16 active_dwell = 0;
|
||||
+ int i, added = 0;
|
||||
+ u16 channel = 0;
|
||||
+
|
||||
+ sband = iwl_get_hw_mode(priv, band);
|
||||
+ if (!sband) {
|
||||
+ IWL_ERR(priv, "invalid band\n");
|
||||
+ return added;
|
||||
+ }
|
||||
+
|
||||
+ active_dwell = iwl_get_active_dwell_time(priv, band, 0);
|
||||
+ passive_dwell = iwl_get_passive_dwell_time(priv, band);
|
||||
+
|
||||
+ if (passive_dwell <= active_dwell)
|
||||
+ passive_dwell = active_dwell + 1;
|
||||
+
|
||||
+ /* only scan single channel, good enough to reset the RF */
|
||||
+ /* pick the first valid not in-use channel */
|
||||
+ if (band == IEEE80211_BAND_5GHZ) {
|
||||
+ for (i = 14; i < priv->channel_count; i++) {
|
||||
+ if (priv->channel_info[i].channel !=
|
||||
+ le16_to_cpu(priv->staging_rxon.channel)) {
|
||||
+ channel = priv->channel_info[i].channel;
|
||||
+ ch_info = iwl_get_channel_info(priv,
|
||||
+ band, channel);
|
||||
+ if (is_channel_valid(ch_info))
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ } else {
|
||||
+ for (i = 0; i < 14; i++) {
|
||||
+ if (priv->channel_info[i].channel !=
|
||||
+ le16_to_cpu(priv->staging_rxon.channel)) {
|
||||
+ channel =
|
||||
+ priv->channel_info[i].channel;
|
||||
+ ch_info = iwl_get_channel_info(priv,
|
||||
+ band, channel);
|
||||
+ if (is_channel_valid(ch_info))
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ if (channel) {
|
||||
+ scan_ch->channel = cpu_to_le16(channel);
|
||||
+ scan_ch->type = SCAN_CHANNEL_TYPE_PASSIVE;
|
||||
+ scan_ch->active_dwell = cpu_to_le16(active_dwell);
|
||||
+ scan_ch->passive_dwell = cpu_to_le16(passive_dwell);
|
||||
+ /* Set txpower levels to defaults */
|
||||
+ scan_ch->dsp_atten = 110;
|
||||
+ if (band == IEEE80211_BAND_5GHZ)
|
||||
+ scan_ch->tx_gain = ((1 << 5) | (3 << 3)) | 3;
|
||||
+ else
|
||||
+ scan_ch->tx_gain = ((1 << 5) | (5 << 3));
|
||||
+ added++;
|
||||
+ } else
|
||||
+ IWL_ERR(priv, "no valid channel found\n");
|
||||
+ return added;
|
||||
+}
|
||||
+
|
||||
static int iwl_get_channels_for_scan(struct iwl_priv *priv,
|
||||
enum ieee80211_band band,
|
||||
u8 is_active, u8 n_probes,
|
||||
@@ -421,6 +487,7 @@ static int iwl_scan_initiate(struct iwl_
|
||||
|
||||
IWL_DEBUG_INFO(priv, "Starting scan...\n");
|
||||
set_bit(STATUS_SCANNING, &priv->status);
|
||||
+ priv->is_internal_short_scan = false;
|
||||
priv->scan_start = jiffies;
|
||||
priv->scan_pass_start = priv->scan_start;
|
||||
|
||||
@@ -488,6 +555,45 @@ out_unlock:
|
||||
}
|
||||
EXPORT_SYMBOL(iwl_mac_hw_scan);
|
||||
|
||||
+/*
|
||||
+ * internal short scan, this function should only been called while associated.
|
||||
+ * It will reset and tune the radio to prevent possible RF related problem
|
||||
+ */
|
||||
+int iwl_internal_short_hw_scan(struct iwl_priv *priv)
|
||||
+{
|
||||
+ int ret = 0;
|
||||
+
|
||||
+ if (!iwl_is_ready_rf(priv)) {
|
||||
+ ret = -EIO;
|
||||
+ IWL_DEBUG_SCAN(priv, "not ready or exit pending\n");
|
||||
+ goto out;
|
||||
+ }
|
||||
+ if (test_bit(STATUS_SCANNING, &priv->status)) {
|
||||
+ IWL_DEBUG_SCAN(priv, "Scan already in progress.\n");
|
||||
+ ret = -EAGAIN;
|
||||
+ goto out;
|
||||
+ }
|
||||
+ if (test_bit(STATUS_SCAN_ABORTING, &priv->status)) {
|
||||
+ IWL_DEBUG_SCAN(priv, "Scan request while abort pending\n");
|
||||
+ ret = -EAGAIN;
|
||||
+ goto out;
|
||||
+ }
|
||||
+ priv->scan_bands = 0;
|
||||
+ if (priv->band == IEEE80211_BAND_5GHZ)
|
||||
+ priv->scan_bands |= BIT(IEEE80211_BAND_5GHZ);
|
||||
+ else
|
||||
+ priv->scan_bands |= BIT(IEEE80211_BAND_2GHZ);
|
||||
+
|
||||
+ IWL_DEBUG_SCAN(priv, "Start internal short scan...\n");
|
||||
+ set_bit(STATUS_SCANNING, &priv->status);
|
||||
+ priv->is_internal_short_scan = true;
|
||||
+ queue_work(priv->workqueue, &priv->request_scan);
|
||||
+
|
||||
+out:
|
||||
+ return ret;
|
||||
+}
|
||||
+EXPORT_SYMBOL(iwl_internal_short_hw_scan);
|
||||
+
|
||||
#define IWL_SCAN_CHECK_WATCHDOG (7 * HZ)
|
||||
|
||||
void iwl_bg_scan_check(struct work_struct *data)
|
||||
@@ -551,7 +657,8 @@ u16 iwl_fill_probe_req(struct iwl_priv *
|
||||
if (WARN_ON(left < ie_len))
|
||||
return len;
|
||||
|
||||
- memcpy(pos, ies, ie_len);
|
||||
+ if (ies)
|
||||
+ memcpy(pos, ies, ie_len);
|
||||
len += ie_len;
|
||||
left -= ie_len;
|
||||
|
||||
@@ -654,7 +761,6 @@ static void iwl_bg_request_scan(struct w
|
||||
unsigned long flags;
|
||||
|
||||
IWL_DEBUG_INFO(priv, "Scanning while associated...\n");
|
||||
-
|
||||
spin_lock_irqsave(&priv->lock, flags);
|
||||
interval = priv->beacon_int;
|
||||
spin_unlock_irqrestore(&priv->lock, flags);
|
||||
@@ -672,7 +778,9 @@ static void iwl_bg_request_scan(struct w
|
||||
scan_suspend_time, interval);
|
||||
}
|
||||
|
||||
- if (priv->scan_request->n_ssids) {
|
||||
+ if (priv->is_internal_short_scan) {
|
||||
+ IWL_DEBUG_SCAN(priv, "Start internal passive scan.\n");
|
||||
+ } else if (priv->scan_request->n_ssids) {
|
||||
int i, p = 0;
|
||||
IWL_DEBUG_SCAN(priv, "Kicking off active scan\n");
|
||||
for (i = 0; i < priv->scan_request->n_ssids; i++) {
|
||||
@@ -753,24 +861,38 @@ static void iwl_bg_request_scan(struct w
|
||||
rx_chain |= rx_ant << RXON_RX_CHAIN_FORCE_SEL_POS;
|
||||
rx_chain |= 0x1 << RXON_RX_CHAIN_DRIVER_FORCE_POS;
|
||||
scan->rx_chain = cpu_to_le16(rx_chain);
|
||||
- cmd_len = iwl_fill_probe_req(priv,
|
||||
- (struct ieee80211_mgmt *)scan->data,
|
||||
- priv->scan_request->ie,
|
||||
- priv->scan_request->ie_len,
|
||||
- IWL_MAX_SCAN_SIZE - sizeof(*scan));
|
||||
+ if (!priv->is_internal_short_scan) {
|
||||
+ cmd_len = iwl_fill_probe_req(priv,
|
||||
+ (struct ieee80211_mgmt *)scan->data,
|
||||
+ priv->scan_request->ie,
|
||||
+ priv->scan_request->ie_len,
|
||||
+ IWL_MAX_SCAN_SIZE - sizeof(*scan));
|
||||
+ } else {
|
||||
+ cmd_len = iwl_fill_probe_req(priv,
|
||||
+ (struct ieee80211_mgmt *)scan->data,
|
||||
+ NULL, 0,
|
||||
+ IWL_MAX_SCAN_SIZE - sizeof(*scan));
|
||||
|
||||
+ }
|
||||
scan->tx_cmd.len = cpu_to_le16(cmd_len);
|
||||
-
|
||||
if (iwl_is_monitor_mode(priv))
|
||||
scan->filter_flags = RXON_FILTER_PROMISC_MSK;
|
||||
|
||||
scan->filter_flags |= (RXON_FILTER_ACCEPT_GRP_MSK |
|
||||
RXON_FILTER_BCON_AWARE_MSK);
|
||||
|
||||
- scan->channel_count =
|
||||
- iwl_get_channels_for_scan(priv, band, is_active, n_probes,
|
||||
- (void *)&scan->data[le16_to_cpu(scan->tx_cmd.len)]);
|
||||
-
|
||||
+ if (priv->is_internal_short_scan) {
|
||||
+ scan->channel_count =
|
||||
+ iwl_get_single_channel_for_scan(priv, band,
|
||||
+ (void *)&scan->data[le16_to_cpu(
|
||||
+ scan->tx_cmd.len)]);
|
||||
+ } else {
|
||||
+ scan->channel_count =
|
||||
+ iwl_get_channels_for_scan(priv, band,
|
||||
+ is_active, n_probes,
|
||||
+ (void *)&scan->data[le16_to_cpu(
|
||||
+ scan->tx_cmd.len)]);
|
||||
+ }
|
||||
if (scan->channel_count == 0) {
|
||||
IWL_DEBUG_SCAN(priv, "channel count %d\n", scan->channel_count);
|
||||
goto done;
|
||||
@@ -831,7 +953,12 @@ void iwl_bg_scan_completed(struct work_s
|
||||
|
||||
cancel_delayed_work(&priv->scan_check);
|
||||
|
||||
- ieee80211_scan_completed(priv->hw, false);
|
||||
+ if (!priv->is_internal_short_scan)
|
||||
+ ieee80211_scan_completed(priv->hw, false);
|
||||
+ else {
|
||||
+ priv->is_internal_short_scan = false;
|
||||
+ IWL_DEBUG_SCAN(priv, "internal short scan completed\n");
|
||||
+ }
|
||||
|
||||
if (test_bit(STATUS_EXIT_PENDING, &priv->status))
|
||||
return;
|
@ -1,22 +1,20 @@
|
||||
From dcde3533b9f501ad079c297b3bf7659739c4c287 Mon Sep 17 00:00:00 2001
|
||||
From: Wey-Yi Guy <wey-yi.w.guy@intel.com>
|
||||
Date: Wed, 24 Feb 2010 08:28:30 -0800
|
||||
Subject: [PATCH] iwlwifi: add internal short scan support for 3945
|
||||
commit 4f4d4088b05155d4904e29d5c00316395ce32f27
|
||||
Author: Wey-Yi Guy <wey-yi.w.guy@intel.com>
|
||||
Date: Wed Feb 24 08:28:30 2010 -0800
|
||||
|
||||
Add internal short scan support for 3945 NIC, This allows 3945 NIC
|
||||
to support radio reset request like the other series of NICs.
|
||||
|
||||
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
|
||||
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
|
||||
---
|
||||
drivers/net/wireless/iwlwifi/iwl3945-base.c | 22 ++++++++++++++--------
|
||||
1 files changed, 14 insertions(+), 8 deletions(-)
|
||||
iwlwifi: add internal short scan support for 3945
|
||||
|
||||
Add internal short scan support for 3945 NIC, This allows 3945 NIC
|
||||
to support radio reset request like the other series of NICs.
|
||||
|
||||
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
|
||||
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
|
||||
|
||||
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
|
||||
index b74a56c..19c77a8 100644
|
||||
index dd33251..252df12 100644
|
||||
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
|
||||
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
|
||||
@@ -2821,7 +2821,6 @@ static void iwl3945_bg_request_scan(struct work_struct *data)
|
||||
@@ -2799,7 +2799,6 @@ static void iwl3945_bg_request_scan(struct work_struct *data)
|
||||
.len = sizeof(struct iwl3945_scan_cmd),
|
||||
.flags = CMD_SIZE_HUGE,
|
||||
};
|
||||
@ -24,7 +22,7 @@ index b74a56c..19c77a8 100644
|
||||
struct iwl3945_scan_cmd *scan;
|
||||
struct ieee80211_conf *conf = NULL;
|
||||
u8 n_probes = 0;
|
||||
@@ -2849,7 +2848,6 @@ static void iwl3945_bg_request_scan(struct work_struct *data)
|
||||
@@ -2827,7 +2826,6 @@ static void iwl3945_bg_request_scan(struct work_struct *data)
|
||||
if (test_bit(STATUS_SCAN_HW, &priv->status)) {
|
||||
IWL_DEBUG_INFO(priv, "Multiple concurrent scan requests "
|
||||
"Ignoring second request.\n");
|
||||
@ -32,7 +30,7 @@ index b74a56c..19c77a8 100644
|
||||
goto done;
|
||||
}
|
||||
|
||||
@@ -2884,7 +2882,7 @@ static void iwl3945_bg_request_scan(struct work_struct *data)
|
||||
@@ -2862,7 +2860,7 @@ static void iwl3945_bg_request_scan(struct work_struct *data)
|
||||
priv->scan = kmalloc(sizeof(struct iwl3945_scan_cmd) +
|
||||
IWL_MAX_SCAN_SIZE, GFP_KERNEL);
|
||||
if (!priv->scan) {
|
||||
@ -41,7 +39,7 @@ index b74a56c..19c77a8 100644
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
@@ -2927,7 +2925,9 @@ static void iwl3945_bg_request_scan(struct work_struct *data)
|
||||
@@ -2905,7 +2903,9 @@ static void iwl3945_bg_request_scan(struct work_struct *data)
|
||||
scan_suspend_time, interval);
|
||||
}
|
||||
|
||||
@ -52,7 +50,7 @@ index b74a56c..19c77a8 100644
|
||||
int i, p = 0;
|
||||
IWL_DEBUG_SCAN(priv, "Kicking off active scan\n");
|
||||
for (i = 0; i < priv->scan_request->n_ssids; i++) {
|
||||
@@ -2975,13 +2975,20 @@ static void iwl3945_bg_request_scan(struct work_struct *data)
|
||||
@@ -2952,13 +2952,20 @@ static void iwl3945_bg_request_scan(struct work_struct *data)
|
||||
goto done;
|
||||
}
|
||||
|
||||
@ -75,7 +73,7 @@ index b74a56c..19c77a8 100644
|
||||
/* select Rx antennas */
|
||||
scan->flags |= iwl3945_get_antenna_flags(priv);
|
||||
|
||||
@@ -3003,8 +3010,7 @@ static void iwl3945_bg_request_scan(struct work_struct *data)
|
||||
@@ -2980,8 +2987,7 @@ static void iwl3945_bg_request_scan(struct work_struct *data)
|
||||
scan->len = cpu_to_le16(cmd.len);
|
||||
|
||||
set_bit(STATUS_SCAN_HW, &priv->status);
|
||||
@ -85,6 +83,3 @@ index b74a56c..19c77a8 100644
|
||||
goto done;
|
||||
|
||||
queue_delayed_work(priv->workqueue, &priv->scan_check,
|
||||
--
|
||||
1.7.0.1
|
||||
|
@ -1,66 +1,58 @@
|
||||
From 56cf16e34b896ac40c6707eb053d45d2cab18bbd Mon Sep 17 00:00:00 2001
|
||||
From: Wey-Yi Guy <wey-yi.w.guy@intel.com>
|
||||
Date: Fri, 5 Mar 2010 14:22:46 -0800
|
||||
Subject: [PATCH] iwlwifi: code cleanup for connectivity recovery
|
||||
Backport of the following upstream commit...
|
||||
|
||||
Split the connectivity check and recovery routine into separated
|
||||
functions based on the types
|
||||
1. iwl_good_ack_health() - check for ack count
|
||||
2. iwl_good_plcp_health() - check for plcp error
|
||||
commit fa8f130c504223d25c116b3d23787f465dfb1317
|
||||
Author: Wey-Yi Guy <wey-yi.w.guy@intel.com>
|
||||
Date: Fri Mar 5 14:22:46 2010 -0800
|
||||
|
||||
Based on the type of errors being detected, different recovery methods
|
||||
will be used to bring the system back to normal operational state.
|
||||
iwlwifi: code cleanup for connectivity recovery
|
||||
|
||||
Split the connectivity check and recovery routine into separated
|
||||
functions based on the types
|
||||
1. iwl_good_ack_health() - check for ack count
|
||||
2. iwl_good_plcp_health() - check for plcp error
|
||||
|
||||
Based on the type of errors being detected, different recovery methods
|
||||
will be used to bring the system back to normal operational state.
|
||||
|
||||
Because different NIC has different HW and uCode, the behavior is also
|
||||
different; these functions thus now form part of the ops infrastructure,
|
||||
so we can have more control on how to monitor and recover from error condition
|
||||
case per device.
|
||||
|
||||
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
|
||||
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
|
||||
|
||||
Because different NIC has different HW and uCode, the behavior is also
|
||||
different; these functions thus now form part of the ops infrastructure,
|
||||
so we can have more control on how to monitor and recover from error condition
|
||||
case per device.
|
||||
|
||||
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
|
||||
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
|
||||
---
|
||||
drivers/net/wireless/iwlwifi/iwl-1000.c | 3 +-
|
||||
drivers/net/wireless/iwlwifi/iwl-4965.c | 2 +-
|
||||
drivers/net/wireless/iwlwifi/iwl-5000.c | 6 +-
|
||||
drivers/net/wireless/iwlwifi/iwl-6000.c | 6 +-
|
||||
drivers/net/wireless/iwlwifi/iwl-core.h | 11 +++-
|
||||
drivers/net/wireless/iwlwifi/iwl-rx.c | 97 +++++++++++++++++++++----------
|
||||
6 files changed, 85 insertions(+), 40 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/iwlwifi/iwl-1000.c b/drivers/net/wireless/iwlwifi/iwl-1000.c
|
||||
index 2597574..7087631 100644
|
||||
--- a/drivers/net/wireless/iwlwifi/iwl-1000.c
|
||||
+++ b/drivers/net/wireless/iwlwifi/iwl-1000.c
|
||||
@@ -212,7 +212,8 @@ static struct iwl_lib_ops iwl1000_lib = {
|
||||
diff -up linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-1000.c.orig linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-1000.c
|
||||
--- linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-1000.c.orig 2010-04-13 14:57:34.000000000 -0400
|
||||
+++ linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-1000.c 2010-04-13 15:01:00.000000000 -0400
|
||||
@@ -139,7 +139,8 @@ static struct iwl_lib_ops iwl1000_lib =
|
||||
.set_ct_kill = iwl1000_set_ct_threshold,
|
||||
},
|
||||
.add_bcast_station = iwl_add_bcast_station,
|
||||
.recover_from_tx_stall = iwl_bg_monitor_recover,
|
||||
- .recover_from_statistics = iwl_recover_from_statistics,
|
||||
+ .check_plcp_health = iwl_good_plcp_health,
|
||||
+ .check_ack_health = iwl_good_ack_health,
|
||||
};
|
||||
|
||||
static const struct iwl_ops iwl1000_ops = {
|
||||
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
|
||||
index 6dd4328..dcca310 100644
|
||||
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
|
||||
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
|
||||
@@ -2217,7 +2217,7 @@ static struct iwl_lib_ops iwl4965_lib = {
|
||||
static struct iwl_ops iwl1000_ops = {
|
||||
diff -up linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-4965.c.orig linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-4965.c
|
||||
--- linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-4965.c.orig 2010-04-13 14:57:34.000000000 -0400
|
||||
+++ linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-4965.c 2010-04-13 15:02:23.000000000 -0400
|
||||
@@ -2213,7 +2213,7 @@ static struct iwl_lib_ops iwl4965_lib =
|
||||
.temperature = iwl4965_temperature_calib,
|
||||
.set_ct_kill = iwl4965_set_ct_threshold,
|
||||
},
|
||||
.add_bcast_station = iwl_add_bcast_station,
|
||||
- .recover_from_statistics = iwl_recover_from_statistics,
|
||||
+ .check_plcp_health = iwl_good_plcp_health,
|
||||
};
|
||||
|
||||
static const struct iwl_ops iwl4965_ops = {
|
||||
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c
|
||||
index 0c2469c..8e0dd13 100644
|
||||
--- a/drivers/net/wireless/iwlwifi/iwl-5000.c
|
||||
+++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
|
||||
@@ -1501,7 +1501,8 @@ struct iwl_lib_ops iwl5000_lib = {
|
||||
static struct iwl_ops iwl4965_ops = {
|
||||
diff -up linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-5000.c.orig linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-5000.c
|
||||
--- linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-5000.c.orig 2010-04-13 14:57:34.000000000 -0400
|
||||
+++ linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-5000.c 2010-04-13 15:01:00.000000000 -0400
|
||||
@@ -1507,7 +1507,8 @@ struct iwl_lib_ops iwl5000_lib = {
|
||||
.set_ct_kill = iwl5000_set_ct_threshold,
|
||||
},
|
||||
.add_bcast_station = iwl_add_bcast_station,
|
||||
.recover_from_tx_stall = iwl_bg_monitor_recover,
|
||||
- .recover_from_statistics = iwl_recover_from_statistics,
|
||||
+ .check_plcp_health = iwl_good_plcp_health,
|
||||
@ -68,46 +60,34 @@ index 0c2469c..8e0dd13 100644
|
||||
};
|
||||
|
||||
static struct iwl_lib_ops iwl5150_lib = {
|
||||
@@ -1557,7 +1558,8 @@ static struct iwl_lib_ops iwl5150_lib = {
|
||||
@@ -1561,7 +1562,8 @@ static struct iwl_lib_ops iwl5150_lib =
|
||||
.set_ct_kill = iwl5150_set_ct_threshold,
|
||||
},
|
||||
.add_bcast_station = iwl_add_bcast_station,
|
||||
.recover_from_tx_stall = iwl_bg_monitor_recover,
|
||||
- .recover_from_statistics = iwl_recover_from_statistics,
|
||||
+ .check_plcp_health = iwl_good_plcp_health,
|
||||
+ .check_ack_health = iwl_good_ack_health,
|
||||
};
|
||||
|
||||
static const struct iwl_ops iwl5000_ops = {
|
||||
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c
|
||||
index 189a8ce..1d4fea1 100644
|
||||
--- a/drivers/net/wireless/iwlwifi/iwl-6000.c
|
||||
+++ b/drivers/net/wireless/iwlwifi/iwl-6000.c
|
||||
@@ -278,7 +278,8 @@ static struct iwl_lib_ops iwl6000_lib = {
|
||||
static struct iwl_ops iwl5000_ops = {
|
||||
diff -up linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-6000.c.orig linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-6000.c
|
||||
--- linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-6000.c.orig 2010-04-13 14:57:34.000000000 -0400
|
||||
+++ linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-6000.c 2010-04-13 15:01:00.000000000 -0400
|
||||
@@ -251,7 +251,8 @@ static struct iwl_lib_ops iwl6000_lib =
|
||||
.set_ct_kill = iwl6000_set_ct_threshold,
|
||||
},
|
||||
.add_bcast_station = iwl_add_bcast_station,
|
||||
.recover_from_tx_stall = iwl_bg_monitor_recover,
|
||||
- .recover_from_statistics = iwl_recover_from_statistics,
|
||||
+ .check_plcp_health = iwl_good_plcp_health,
|
||||
+ .check_ack_health = iwl_good_ack_health,
|
||||
};
|
||||
|
||||
static const struct iwl_ops iwl6000_ops = {
|
||||
@@ -345,7 +346,8 @@ static struct iwl_lib_ops iwl6050_lib = {
|
||||
},
|
||||
.add_bcast_station = iwl_add_bcast_station,
|
||||
.recover_from_tx_stall = iwl_bg_monitor_recover,
|
||||
- .recover_from_statistics = iwl_recover_from_statistics,
|
||||
+ .check_plcp_health = iwl_good_plcp_health,
|
||||
+ .check_ack_health = iwl_good_ack_health,
|
||||
};
|
||||
|
||||
static const struct iwl_ops iwl6050_ops = {
|
||||
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
|
||||
index d67048e..5234a85 100644
|
||||
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
|
||||
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
|
||||
@@ -193,8 +193,11 @@ struct iwl_lib_ops {
|
||||
void (*add_bcast_station)(struct iwl_priv *priv);
|
||||
static struct iwl_ops iwl6000_ops = {
|
||||
diff -up linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-core.h.orig linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-core.h
|
||||
--- linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-core.h.orig 2010-04-13 14:57:34.000000000 -0400
|
||||
+++ linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-core.h 2010-04-13 15:04:33.000000000 -0400
|
||||
@@ -189,8 +189,11 @@ struct iwl_lib_ops {
|
||||
struct iwl_temp_ops temp_ops;
|
||||
/* recover from tx queue stall */
|
||||
void (*recover_from_tx_stall)(unsigned long data);
|
||||
- /* recover from errors showed in statistics */
|
||||
@ -120,10 +100,10 @@ index d67048e..5234a85 100644
|
||||
struct iwl_rx_packet *pkt);
|
||||
};
|
||||
|
||||
@@ -438,7 +441,9 @@ void iwl_rx_missed_beacon_notif(struct iwl_priv *priv,
|
||||
@@ -435,7 +438,9 @@ int iwl_tx_queue_reclaim(struct iwl_priv
|
||||
/* Handlers */
|
||||
void iwl_rx_missed_beacon_notif(struct iwl_priv *priv,
|
||||
struct iwl_rx_mem_buffer *rxb);
|
||||
void iwl_rx_spectrum_measure_notif(struct iwl_priv *priv,
|
||||
struct iwl_rx_mem_buffer *rxb);
|
||||
-void iwl_recover_from_statistics(struct iwl_priv *priv,
|
||||
+bool iwl_good_plcp_health(struct iwl_priv *priv,
|
||||
+ struct iwl_rx_packet *pkt);
|
||||
@ -131,11 +111,10 @@ index d67048e..5234a85 100644
|
||||
struct iwl_rx_packet *pkt);
|
||||
void iwl_rx_statistics(struct iwl_priv *priv,
|
||||
struct iwl_rx_mem_buffer *rxb);
|
||||
diff --git a/drivers/net/wireless/iwlwifi/iwl-rx.c b/drivers/net/wireless/iwlwifi/iwl-rx.c
|
||||
index f48d685..506ccf7 100644
|
||||
--- a/drivers/net/wireless/iwlwifi/iwl-rx.c
|
||||
+++ b/drivers/net/wireless/iwlwifi/iwl-rx.c
|
||||
@@ -622,24 +622,18 @@ static void iwl_accumulative_statistics(struct iwl_priv *priv,
|
||||
diff -up linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-rx.c.orig linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-rx.c
|
||||
--- linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-rx.c.orig 2010-04-13 14:57:34.000000000 -0400
|
||||
+++ linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-rx.c 2010-04-13 15:01:00.000000000 -0400
|
||||
@@ -598,24 +598,18 @@ static void iwl_accumulative_statistics(
|
||||
#define BA_TIMEOUT_CNT (5)
|
||||
#define BA_TIMEOUT_MAX (16)
|
||||
|
||||
@ -170,8 +149,8 @@ index f48d685..506ccf7 100644
|
||||
int ba_timeout_delta;
|
||||
|
||||
actual_ack_cnt_delta =
|
||||
@@ -670,13 +664,27 @@ void iwl_recover_from_statistics(struct iwl_priv *priv,
|
||||
#endif
|
||||
@@ -638,13 +632,27 @@ void iwl_recover_from_statistics(struct
|
||||
|
||||
IWL_DEBUG_RADIO(priv, "agg ba_timeout delta = %d\n",
|
||||
ba_timeout_delta);
|
||||
- if ((actual_ack_cnt_delta == 0) &&
|
||||
@ -204,7 +183,7 @@ index f48d685..506ccf7 100644
|
||||
|
||||
/*
|
||||
* check for plcp_err and trigger radio reset if it exceeds
|
||||
@@ -711,7 +719,8 @@ void iwl_recover_from_statistics(struct iwl_priv *priv,
|
||||
@@ -679,7 +687,8 @@ void iwl_recover_from_statistics(struct
|
||||
* combined_plcp_delta,
|
||||
* plcp_msec
|
||||
*/
|
||||
@ -214,7 +193,7 @@ index f48d685..506ccf7 100644
|
||||
priv->cfg->plcp_delta_threshold,
|
||||
le32_to_cpu(pkt->u.stats.rx.ofdm.plcp_err),
|
||||
le32_to_cpu(priv->statistics.rx.ofdm.plcp_err),
|
||||
@@ -719,15 +728,42 @@ void iwl_recover_from_statistics(struct iwl_priv *priv,
|
||||
@@ -687,15 +696,42 @@ void iwl_recover_from_statistics(struct
|
||||
le32_to_cpu(
|
||||
priv->statistics.rx.ofdm_ht.plcp_err),
|
||||
combined_plcp_delta, plcp_msec);
|
||||
@ -263,7 +242,7 @@ index f48d685..506ccf7 100644
|
||||
|
||||
void iwl_rx_statistics(struct iwl_priv *priv,
|
||||
struct iwl_rx_mem_buffer *rxb)
|
||||
@@ -749,8 +785,7 @@ void iwl_rx_statistics(struct iwl_priv *priv,
|
||||
@@ -717,8 +753,7 @@ void iwl_rx_statistics(struct iwl_priv *
|
||||
#ifdef CONFIG_IWLWIFI_DEBUG
|
||||
iwl_accumulative_statistics(priv, (__le32 *)&pkt->u.stats);
|
||||
#endif
|
||||
@ -273,6 +252,3 @@ index f48d685..506ccf7 100644
|
||||
|
||||
memcpy(&priv->statistics, &pkt->u.stats, sizeof(priv->statistics));
|
||||
|
||||
--
|
||||
1.7.0.1
|
||||
|
@ -1,24 +1,22 @@
|
||||
From 8ac33071b4c991e302be67fd0dae1d9cc4b502e3 Mon Sep 17 00:00:00 2001
|
||||
From: Wey-Yi Guy <wey-yi.w.guy@intel.com>
|
||||
Date: Tue, 16 Mar 2010 10:46:31 -0700
|
||||
Subject: [PATCH] iwlwifi: iwl_good_ack_health() only apply to AGN device
|
||||
Backport of the following upstream commit...
|
||||
|
||||
iwl_good_ack_health() check for expected and actual ack count which only
|
||||
apply to aggregation mode. Move the function to iwlagn module.
|
||||
commit 872c8ddcbec06995c1c7caa3e41c921290a8b6df
|
||||
Author: Wey-Yi Guy <wey-yi.w.guy@intel.com>
|
||||
Date: Tue Mar 16 10:46:31 2010 -0700
|
||||
|
||||
Reported-by: Chantry Xavier <chantry.xavier@gmail.com>
|
||||
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
|
||||
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
|
||||
---
|
||||
drivers/net/wireless/iwlwifi/iwl-agn.c | 54 +++++++++++++++++++++++++++++++
|
||||
drivers/net/wireless/iwlwifi/iwl-rx.c | 55 --------------------------------
|
||||
2 files changed, 54 insertions(+), 55 deletions(-)
|
||||
iwlwifi: iwl_good_ack_health() only apply to AGN device
|
||||
|
||||
iwl_good_ack_health() check for expected and actual ack count which only
|
||||
apply to aggregation mode. Move the function to iwlagn module.
|
||||
|
||||
Reported-by: Chantry Xavier <chantry.xavier@gmail.com>
|
||||
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
|
||||
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
|
||||
|
||||
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
|
||||
index dc751cb..b5d410b 100644
|
||||
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
|
||||
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
|
||||
@@ -1448,6 +1448,60 @@ static void iwl_irq_tasklet(struct iwl_priv *priv)
|
||||
diff -up linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-agn.c.orig linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-agn.c
|
||||
--- linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-agn.c.orig 2010-04-13 15:15:47.000000000 -0400
|
||||
+++ linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-agn.c 2010-04-13 15:20:00.000000000 -0400
|
||||
@@ -1316,6 +1316,52 @@ static void iwl_irq_tasklet(struct iwl_p
|
||||
iwl_enable_interrupts(priv);
|
||||
}
|
||||
|
||||
@ -50,7 +48,7 @@ index dc751cb..b5d410b 100644
|
||||
+ ba_timeout_delta =
|
||||
+ le32_to_cpu(pkt->u.stats.tx.agg.ba_timeout) -
|
||||
+ le32_to_cpu(priv->statistics.tx.agg.ba_timeout);
|
||||
+ if ((priv->_agn.agg_tids_count > 0) &&
|
||||
+ if ((priv->agg_tids_count > 0) &&
|
||||
+ (expected_ack_cnt_delta > 0) &&
|
||||
+ (((actual_ack_cnt_delta * 100) / expected_ack_cnt_delta)
|
||||
+ < ACK_CNT_RATIO) &&
|
||||
@ -59,14 +57,6 @@ index dc751cb..b5d410b 100644
|
||||
+ " expected_ack_cnt = %d\n",
|
||||
+ actual_ack_cnt_delta, expected_ack_cnt_delta);
|
||||
+
|
||||
+#ifdef CONFIG_IWLWIFI_DEBUG
|
||||
+ IWL_DEBUG_RADIO(priv, "rx_detected_cnt delta = %d\n",
|
||||
+ priv->delta_statistics.tx.rx_detected_cnt);
|
||||
+ IWL_DEBUG_RADIO(priv,
|
||||
+ "ack_or_ba_timeout_collision delta = %d\n",
|
||||
+ priv->delta_statistics.tx.
|
||||
+ ack_or_ba_timeout_collision);
|
||||
+#endif
|
||||
+ IWL_DEBUG_RADIO(priv, "agg ba_timeout delta = %d\n",
|
||||
+ ba_timeout_delta);
|
||||
+ if (!actual_ack_cnt_delta &&
|
||||
@ -79,11 +69,22 @@ index dc751cb..b5d410b 100644
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
diff --git a/drivers/net/wireless/iwlwifi/iwl-rx.c b/drivers/net/wireless/iwlwifi/iwl-rx.c
|
||||
index 506ccf7..def5042 100644
|
||||
--- a/drivers/net/wireless/iwlwifi/iwl-rx.c
|
||||
+++ b/drivers/net/wireless/iwlwifi/iwl-rx.c
|
||||
@@ -617,61 +617,6 @@ static void iwl_accumulative_statistics(struct iwl_priv *priv,
|
||||
diff -up linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-core.h.orig linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-core.h
|
||||
--- linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-core.h.orig 2010-04-13 15:15:47.000000000 -0400
|
||||
+++ linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-core.h 2010-04-13 15:18:13.000000000 -0400
|
||||
@@ -584,6 +584,8 @@ void iwl_disable_ict(struct iwl_priv *pr
|
||||
int iwl_alloc_isr_ict(struct iwl_priv *priv);
|
||||
void iwl_free_isr_ict(struct iwl_priv *priv);
|
||||
irqreturn_t iwl_isr_ict(int irq, void *data);
|
||||
+bool iwl_good_ack_health(struct iwl_priv *priv,
|
||||
+ struct iwl_rx_packet *pkt);
|
||||
|
||||
static inline u16 iwl_pcie_link_ctl(struct iwl_priv *priv)
|
||||
{
|
||||
diff -up linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-rx.c.orig linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-rx.c
|
||||
--- linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-rx.c.orig 2010-04-13 15:15:47.000000000 -0400
|
||||
+++ linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-rx.c 2010-04-13 15:18:52.000000000 -0400
|
||||
@@ -593,53 +593,6 @@ static void iwl_accumulative_statistics(
|
||||
|
||||
#define REG_RECALIB_PERIOD (60)
|
||||
|
||||
@ -115,7 +116,7 @@ index 506ccf7..def5042 100644
|
||||
- ba_timeout_delta =
|
||||
- le32_to_cpu(pkt->u.stats.tx.agg.ba_timeout) -
|
||||
- le32_to_cpu(priv->statistics.tx.agg.ba_timeout);
|
||||
- if ((priv->_agn.agg_tids_count > 0) &&
|
||||
- if ((priv->agg_tids_count > 0) &&
|
||||
- (expected_ack_cnt_delta > 0) &&
|
||||
- (((actual_ack_cnt_delta * 100) / expected_ack_cnt_delta)
|
||||
- < ACK_CNT_RATIO) &&
|
||||
@ -124,14 +125,6 @@ index 506ccf7..def5042 100644
|
||||
- " expected_ack_cnt = %d\n",
|
||||
- actual_ack_cnt_delta, expected_ack_cnt_delta);
|
||||
-
|
||||
-#ifdef CONFIG_IWLWIFI_DEBUG
|
||||
- IWL_DEBUG_RADIO(priv, "rx_detected_cnt delta = %d\n",
|
||||
- priv->delta_statistics.tx.rx_detected_cnt);
|
||||
- IWL_DEBUG_RADIO(priv,
|
||||
- "ack_or_ba_timeout_collision delta = %d\n",
|
||||
- priv->delta_statistics.tx.
|
||||
- ack_or_ba_timeout_collision);
|
||||
-#endif
|
||||
- IWL_DEBUG_RADIO(priv, "agg ba_timeout delta = %d\n",
|
||||
- ba_timeout_delta);
|
||||
- if (!actual_ack_cnt_delta &&
|
||||
@ -145,6 +138,3 @@ index 506ccf7..def5042 100644
|
||||
/**
|
||||
* iwl_good_plcp_health - checks for plcp error.
|
||||
*
|
||||
--
|
||||
1.7.0.1
|
||||
|
@ -1,93 +1,75 @@
|
||||
From b3786de4e1033b00d522a5c457a3ea9f8376d0d0 Mon Sep 17 00:00:00 2001
|
||||
From: Wey-Yi Guy <wey-yi.w.guy@intel.com>
|
||||
Date: Thu, 4 Mar 2010 13:38:58 -0800
|
||||
Subject: [PATCH] iwlwifi: move plcp check to separated function
|
||||
Backport of the following upstream commit...
|
||||
|
||||
Move the plcp error checking into stand alone function and pointed by ops
|
||||
to accommodate devices not needing this recovery.
|
||||
commit beac5498b792ed8420885ee23e8d4f2885ee2d13
|
||||
Author: Wey-Yi Guy <wey-yi.w.guy@intel.com>
|
||||
Date: Thu Mar 4 13:38:58 2010 -0800
|
||||
|
||||
Signed-off-by: Trieu 'Andrew' Nguyen <trieux.t.nguyen@intel.com>
|
||||
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
|
||||
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
|
||||
---
|
||||
drivers/net/wireless/iwlwifi/iwl-1000.c | 1 +
|
||||
drivers/net/wireless/iwlwifi/iwl-4965.c | 1 +
|
||||
drivers/net/wireless/iwlwifi/iwl-5000.c | 2 +
|
||||
drivers/net/wireless/iwlwifi/iwl-6000.c | 2 +
|
||||
drivers/net/wireless/iwlwifi/iwl-core.h | 5 +++
|
||||
drivers/net/wireless/iwlwifi/iwl-rx.c | 58 +++++++++++++++++++------------
|
||||
6 files changed, 47 insertions(+), 22 deletions(-)
|
||||
iwlwifi: move plcp check to separated function
|
||||
|
||||
Move the plcp error checking into stand alone function and pointed by ops
|
||||
to accommodate devices not needing this recovery.
|
||||
|
||||
Signed-off-by: Trieu 'Andrew' Nguyen <trieux.t.nguyen@intel.com>
|
||||
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
|
||||
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
|
||||
|
||||
diff --git a/drivers/net/wireless/iwlwifi/iwl-1000.c b/drivers/net/wireless/iwlwifi/iwl-1000.c
|
||||
index 89dc401..2597574 100644
|
||||
--- a/drivers/net/wireless/iwlwifi/iwl-1000.c
|
||||
+++ b/drivers/net/wireless/iwlwifi/iwl-1000.c
|
||||
@@ -212,6 +212,7 @@ static struct iwl_lib_ops iwl1000_lib = {
|
||||
diff -up linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-1000.c.orig linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-1000.c
|
||||
--- linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-1000.c.orig 2010-04-13 14:40:14.000000000 -0400
|
||||
+++ linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-1000.c 2010-04-13 14:40:43.000000000 -0400
|
||||
@@ -139,6 +139,7 @@ static struct iwl_lib_ops iwl1000_lib =
|
||||
.set_ct_kill = iwl1000_set_ct_threshold,
|
||||
},
|
||||
.add_bcast_station = iwl_add_bcast_station,
|
||||
.recover_from_tx_stall = iwl_bg_monitor_recover,
|
||||
+ .recover_from_statistics = iwl_recover_from_statistics,
|
||||
};
|
||||
|
||||
static const struct iwl_ops iwl1000_ops = {
|
||||
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
|
||||
index aa49a6e..6dd4328 100644
|
||||
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
|
||||
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
|
||||
@@ -2217,6 +2217,7 @@ static struct iwl_lib_ops iwl4965_lib = {
|
||||
static struct iwl_ops iwl1000_ops = {
|
||||
diff -up linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-4965.c.orig linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-4965.c
|
||||
--- linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-4965.c.orig 2010-04-13 14:40:14.000000000 -0400
|
||||
+++ linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-4965.c 2010-04-13 14:41:23.000000000 -0400
|
||||
@@ -2213,6 +2213,7 @@ static struct iwl_lib_ops iwl4965_lib =
|
||||
.temperature = iwl4965_temperature_calib,
|
||||
.set_ct_kill = iwl4965_set_ct_threshold,
|
||||
},
|
||||
.add_bcast_station = iwl_add_bcast_station,
|
||||
+ .recover_from_statistics = iwl_recover_from_statistics,
|
||||
};
|
||||
|
||||
static const struct iwl_ops iwl4965_ops = {
|
||||
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c
|
||||
index d05fad4..0c2469c 100644
|
||||
--- a/drivers/net/wireless/iwlwifi/iwl-5000.c
|
||||
+++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
|
||||
@@ -1501,6 +1501,7 @@ struct iwl_lib_ops iwl5000_lib = {
|
||||
static struct iwl_ops iwl4965_ops = {
|
||||
diff -up linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-5000.c.orig linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-5000.c
|
||||
--- linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-5000.c.orig 2010-04-13 14:40:14.000000000 -0400
|
||||
+++ linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-5000.c 2010-04-13 14:40:43.000000000 -0400
|
||||
@@ -1507,6 +1507,7 @@ struct iwl_lib_ops iwl5000_lib = {
|
||||
.set_ct_kill = iwl5000_set_ct_threshold,
|
||||
},
|
||||
.add_bcast_station = iwl_add_bcast_station,
|
||||
.recover_from_tx_stall = iwl_bg_monitor_recover,
|
||||
+ .recover_from_statistics = iwl_recover_from_statistics,
|
||||
};
|
||||
|
||||
static struct iwl_lib_ops iwl5150_lib = {
|
||||
@@ -1556,6 +1557,7 @@ static struct iwl_lib_ops iwl5150_lib = {
|
||||
@@ -1560,6 +1561,7 @@ static struct iwl_lib_ops iwl5150_lib =
|
||||
.set_ct_kill = iwl5150_set_ct_threshold,
|
||||
},
|
||||
.add_bcast_station = iwl_add_bcast_station,
|
||||
.recover_from_tx_stall = iwl_bg_monitor_recover,
|
||||
+ .recover_from_statistics = iwl_recover_from_statistics,
|
||||
};
|
||||
|
||||
static const struct iwl_ops iwl5000_ops = {
|
||||
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c
|
||||
index 0c965cd..189a8ce 100644
|
||||
--- a/drivers/net/wireless/iwlwifi/iwl-6000.c
|
||||
+++ b/drivers/net/wireless/iwlwifi/iwl-6000.c
|
||||
@@ -278,6 +278,7 @@ static struct iwl_lib_ops iwl6000_lib = {
|
||||
static struct iwl_ops iwl5000_ops = {
|
||||
diff -up linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-6000.c.orig linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-6000.c
|
||||
--- linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-6000.c.orig 2010-04-13 14:40:14.000000000 -0400
|
||||
+++ linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-6000.c 2010-04-13 14:42:29.000000000 -0400
|
||||
@@ -251,6 +251,7 @@ static struct iwl_lib_ops iwl6000_lib =
|
||||
.set_ct_kill = iwl6000_set_ct_threshold,
|
||||
},
|
||||
.add_bcast_station = iwl_add_bcast_station,
|
||||
.recover_from_tx_stall = iwl_bg_monitor_recover,
|
||||
+ .recover_from_statistics = iwl_recover_from_statistics,
|
||||
};
|
||||
|
||||
static const struct iwl_ops iwl6000_ops = {
|
||||
@@ -344,6 +345,7 @@ static struct iwl_lib_ops iwl6050_lib = {
|
||||
},
|
||||
.add_bcast_station = iwl_add_bcast_station,
|
||||
.recover_from_tx_stall = iwl_bg_monitor_recover,
|
||||
+ .recover_from_statistics = iwl_recover_from_statistics,
|
||||
};
|
||||
|
||||
static const struct iwl_ops iwl6050_ops = {
|
||||
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
|
||||
index 9076576..d67048e 100644
|
||||
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
|
||||
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
|
||||
@@ -193,6 +193,9 @@ struct iwl_lib_ops {
|
||||
void (*add_bcast_station)(struct iwl_priv *priv);
|
||||
static struct iwl_ops iwl6000_ops = {
|
||||
diff -up linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-core.h.orig linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-core.h
|
||||
--- linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-core.h.orig 2010-04-13 14:40:14.000000000 -0400
|
||||
+++ linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-core.h 2010-04-13 14:43:12.000000000 -0400
|
||||
@@ -189,6 +189,9 @@ struct iwl_lib_ops {
|
||||
struct iwl_temp_ops temp_ops;
|
||||
/* recover from tx queue stall */
|
||||
void (*recover_from_tx_stall)(unsigned long data);
|
||||
+ /* recover from errors showed in statistics */
|
||||
@ -96,20 +78,19 @@ index 9076576..d67048e 100644
|
||||
};
|
||||
|
||||
struct iwl_led_ops {
|
||||
@@ -435,6 +438,8 @@ void iwl_rx_missed_beacon_notif(struct iwl_priv *priv,
|
||||
@@ -432,6 +435,8 @@ int iwl_tx_queue_reclaim(struct iwl_priv
|
||||
/* Handlers */
|
||||
void iwl_rx_missed_beacon_notif(struct iwl_priv *priv,
|
||||
struct iwl_rx_mem_buffer *rxb);
|
||||
void iwl_rx_spectrum_measure_notif(struct iwl_priv *priv,
|
||||
struct iwl_rx_mem_buffer *rxb);
|
||||
+void iwl_recover_from_statistics(struct iwl_priv *priv,
|
||||
+ struct iwl_rx_packet *pkt);
|
||||
void iwl_rx_statistics(struct iwl_priv *priv,
|
||||
struct iwl_rx_mem_buffer *rxb);
|
||||
void iwl_reply_statistics(struct iwl_priv *priv,
|
||||
diff --git a/drivers/net/wireless/iwlwifi/iwl-rx.c b/drivers/net/wireless/iwlwifi/iwl-rx.c
|
||||
index e5eb339..fabc52f 100644
|
||||
--- a/drivers/net/wireless/iwlwifi/iwl-rx.c
|
||||
+++ b/drivers/net/wireless/iwlwifi/iwl-rx.c
|
||||
@@ -618,28 +618,18 @@ static void iwl_accumulative_statistics(struct iwl_priv *priv,
|
||||
diff -up linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-rx.c.orig linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-rx.c
|
||||
--- linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-rx.c.orig 2010-04-13 14:40:14.000000000 -0400
|
||||
+++ linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-rx.c 2010-04-13 14:40:43.000000000 -0400
|
||||
@@ -594,28 +594,18 @@ static void iwl_accumulative_statistics(
|
||||
#define REG_RECALIB_PERIOD (60)
|
||||
|
||||
#define PLCP_MSG "plcp_err exceeded %u, %u, %u, %u, %u, %d, %u mSecs\n"
|
||||
@ -145,7 +126,7 @@ index e5eb339..fabc52f 100644
|
||||
/*
|
||||
* check for plcp_err and trigger radio reset if it exceeds
|
||||
* the plcp error threshold plcp_delta.
|
||||
@@ -660,11 +650,11 @@ void iwl_rx_statistics(struct iwl_priv *priv,
|
||||
@@ -636,11 +626,11 @@ void iwl_rx_statistics(struct iwl_priv *
|
||||
le32_to_cpu(priv->statistics.rx.ofdm_ht.plcp_err));
|
||||
|
||||
if ((combined_plcp_delta > 0) &&
|
||||
@ -160,7 +141,7 @@ index e5eb339..fabc52f 100644
|
||||
* Text: plcp_err exceeded %d,
|
||||
* Received ofdm.plcp_err,
|
||||
* Current ofdm.plcp_err,
|
||||
@@ -679,9 +669,8 @@ void iwl_rx_statistics(struct iwl_priv *priv,
|
||||
@@ -655,9 +645,8 @@ void iwl_rx_statistics(struct iwl_priv *
|
||||
le32_to_cpu(priv->statistics.rx.ofdm.plcp_err),
|
||||
le32_to_cpu(pkt->u.stats.rx.ofdm_ht.plcp_err),
|
||||
le32_to_cpu(
|
||||
@ -171,7 +152,7 @@ index e5eb339..fabc52f 100644
|
||||
/*
|
||||
* Reset the RF radio due to the high plcp
|
||||
* error rate
|
||||
@@ -689,6 +678,31 @@ void iwl_rx_statistics(struct iwl_priv *priv,
|
||||
@@ -665,6 +654,31 @@ void iwl_rx_statistics(struct iwl_priv *
|
||||
iwl_force_reset(priv, IWL_RF_RESET);
|
||||
}
|
||||
}
|
||||
@ -203,6 +184,3 @@ index e5eb339..fabc52f 100644
|
||||
|
||||
memcpy(&priv->statistics, &pkt->u.stats, sizeof(priv->statistics));
|
||||
|
||||
--
|
||||
1.7.0.1
|
||||
|
172
iwlwifi_-multiple-force-reset-mode.patch
Normal file
172
iwlwifi_-multiple-force-reset-mode.patch
Normal file
@ -0,0 +1,172 @@
|
||||
Backport of the following upstream commit...
|
||||
|
||||
commit a93e7973d0983d22fcbe5f691244736211639fe7
|
||||
Author: Wey-Yi Guy <wey-yi.w.guy@intel.com>
|
||||
Date: Wed Feb 3 11:47:19 2010 -0800
|
||||
|
||||
iwlwifi: multiple force reset mode
|
||||
|
||||
Provide the function to perform different type of uCode reset/reload operation.
|
||||
When uCode detect error and can not fix itself, this iwl_force_reset()
|
||||
function allow driver to perform the necessary reset/reload functions and help
|
||||
to bring uCode back to normal operation state.
|
||||
|
||||
Currently only 2 type of force reset are available:
|
||||
- reset radio
|
||||
- reload firmware
|
||||
|
||||
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
|
||||
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
|
||||
|
||||
diff -up linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-core.c.orig linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-core.c
|
||||
--- linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-core.c.orig 2010-04-13 13:36:35.000000000 -0400
|
||||
+++ linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-core.c 2010-04-13 13:38:40.000000000 -0400
|
||||
@@ -3197,7 +3197,7 @@ void iwl_update_stats(struct iwl_priv *p
|
||||
EXPORT_SYMBOL(iwl_update_stats);
|
||||
#endif
|
||||
|
||||
-void iwl_force_rf_reset(struct iwl_priv *priv)
|
||||
+static void iwl_force_rf_reset(struct iwl_priv *priv)
|
||||
{
|
||||
if (test_bit(STATUS_EXIT_PENDING, &priv->status))
|
||||
return;
|
||||
@@ -3219,7 +3219,47 @@ void iwl_force_rf_reset(struct iwl_priv
|
||||
iwl_internal_short_hw_scan(priv);
|
||||
return;
|
||||
}
|
||||
-EXPORT_SYMBOL(iwl_force_rf_reset);
|
||||
+
|
||||
+#define IWL_DELAY_NEXT_FORCE_RESET (HZ*3)
|
||||
+
|
||||
+int iwl_force_reset(struct iwl_priv *priv, int mode)
|
||||
+{
|
||||
+ if (test_bit(STATUS_EXIT_PENDING, &priv->status))
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ if (priv->last_force_reset_jiffies &&
|
||||
+ time_after(priv->last_force_reset_jiffies +
|
||||
+ IWL_DELAY_NEXT_FORCE_RESET, jiffies)) {
|
||||
+ IWL_DEBUG_INFO(priv, "force reset rejected\n");
|
||||
+ return -EAGAIN;
|
||||
+ }
|
||||
+
|
||||
+ IWL_DEBUG_INFO(priv, "perform force reset (%d)\n", mode);
|
||||
+
|
||||
+ switch (mode) {
|
||||
+ case IWL_RF_RESET:
|
||||
+ iwl_force_rf_reset(priv);
|
||||
+ break;
|
||||
+ case IWL_FW_RESET:
|
||||
+ IWL_ERR(priv, "On demand firmware reload\n");
|
||||
+ /* Set the FW error flag -- cleared on iwl_down */
|
||||
+ set_bit(STATUS_FW_ERROR, &priv->status);
|
||||
+ wake_up_interruptible(&priv->wait_command_queue);
|
||||
+ /*
|
||||
+ * Keep the restart process from trying to send host
|
||||
+ * commands by clearing the INIT status bit
|
||||
+ */
|
||||
+ clear_bit(STATUS_READY, &priv->status);
|
||||
+ queue_work(priv->workqueue, &priv->restart);
|
||||
+ break;
|
||||
+ default:
|
||||
+ IWL_DEBUG_INFO(priv, "invalid reset request.\n");
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+ priv->last_force_reset_jiffies = jiffies;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
|
||||
diff -up linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-core.h.orig linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-core.h
|
||||
--- linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-core.h.orig 2010-04-13 13:36:50.000000000 -0400
|
||||
+++ linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-core.h 2010-04-13 13:38:40.000000000 -0400
|
||||
@@ -501,7 +501,7 @@ int iwl_scan_cancel(struct iwl_priv *pri
|
||||
int iwl_scan_cancel_timeout(struct iwl_priv *priv, unsigned long ms);
|
||||
int iwl_mac_hw_scan(struct ieee80211_hw *hw, struct cfg80211_scan_request *req);
|
||||
int iwl_internal_short_hw_scan(struct iwl_priv *priv);
|
||||
-void iwl_force_rf_reset(struct iwl_priv *priv);
|
||||
+int iwl_force_reset(struct iwl_priv *priv, int mode);
|
||||
u16 iwl_fill_probe_req(struct iwl_priv *priv, struct ieee80211_mgmt *frame,
|
||||
const u8 *ie, int ie_len, int left);
|
||||
void iwl_setup_rx_scan_handlers(struct iwl_priv *priv);
|
||||
diff -up linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-dev.h.orig linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-dev.h
|
||||
--- linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-dev.h.orig 2010-04-13 13:36:50.000000000 -0400
|
||||
+++ linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-dev.h 2010-04-13 13:38:40.000000000 -0400
|
||||
@@ -993,6 +993,11 @@ struct iwl_switch_rxon {
|
||||
#define IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF (100)
|
||||
#define IWL_MAX_PLCP_ERR_THRESHOLD_MAX (255)
|
||||
|
||||
+enum iwl_reset {
|
||||
+ IWL_RF_RESET = 0,
|
||||
+ IWL_FW_RESET,
|
||||
+};
|
||||
+
|
||||
struct iwl_priv {
|
||||
|
||||
/* ieee device used by generic ieee processing code */
|
||||
@@ -1024,6 +1029,9 @@ struct iwl_priv {
|
||||
/* storing the jiffies when the plcp error rate is received */
|
||||
unsigned long plcp_jiffies;
|
||||
|
||||
+ /* force reset */
|
||||
+ unsigned long last_force_reset_jiffies;
|
||||
+
|
||||
/* we allocate array of iwl4965_channel_info for NIC's valid channels.
|
||||
* Access via channel # using indirect index array */
|
||||
struct iwl_channel_info *channel_info; /* channel info array */
|
||||
@@ -1046,7 +1054,6 @@ struct iwl_priv {
|
||||
unsigned long scan_start;
|
||||
unsigned long scan_pass_start;
|
||||
unsigned long scan_start_tsf;
|
||||
- unsigned long last_internal_scan_jiffies;
|
||||
void *scan;
|
||||
int scan_bands;
|
||||
struct cfg80211_scan_request *scan_request;
|
||||
diff -up linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-rx.c.orig linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-rx.c
|
||||
--- linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-rx.c.orig 2010-04-13 13:36:50.000000000 -0400
|
||||
+++ linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-rx.c 2010-04-13 13:38:40.000000000 -0400
|
||||
@@ -662,7 +662,7 @@ void iwl_rx_statistics(struct iwl_priv *
|
||||
* Reset the RF radio due to the high plcp
|
||||
* error rate
|
||||
*/
|
||||
- iwl_force_rf_reset(priv);
|
||||
+ iwl_force_reset(priv, IWL_RF_RESET);
|
||||
}
|
||||
}
|
||||
|
||||
diff -up linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-scan.c.orig linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-scan.c
|
||||
--- linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-scan.c.orig 2010-04-13 13:36:42.000000000 -0400
|
||||
+++ linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-scan.c 2010-04-13 13:38:40.000000000 -0400
|
||||
@@ -254,8 +254,6 @@ static void iwl_rx_scan_complete_notif(s
|
||||
priv->last_scan_jiffies = jiffies;
|
||||
if (!priv->is_internal_short_scan)
|
||||
priv->next_scan_jiffies = 0;
|
||||
- else
|
||||
- priv->last_internal_scan_jiffies = jiffies;
|
||||
|
||||
IWL_DEBUG_INFO(priv, "Setting scan to off\n");
|
||||
|
||||
@@ -564,8 +562,6 @@ EXPORT_SYMBOL(iwl_mac_hw_scan);
|
||||
* internal short scan, this function should only been called while associated.
|
||||
* It will reset and tune the radio to prevent possible RF related problem
|
||||
*/
|
||||
-#define IWL_DELAY_NEXT_INTERNAL_SCAN (HZ*1)
|
||||
-
|
||||
int iwl_internal_short_hw_scan(struct iwl_priv *priv)
|
||||
{
|
||||
int ret = 0;
|
||||
@@ -585,12 +581,6 @@ int iwl_internal_short_hw_scan(struct iw
|
||||
ret = -EAGAIN;
|
||||
goto out;
|
||||
}
|
||||
- if (priv->last_internal_scan_jiffies &&
|
||||
- time_after(priv->last_internal_scan_jiffies +
|
||||
- IWL_DELAY_NEXT_INTERNAL_SCAN, jiffies)) {
|
||||
- IWL_DEBUG_SCAN(priv, "internal scan rejected\n");
|
||||
- goto out;
|
||||
- }
|
||||
|
||||
priv->scan_bands = 0;
|
||||
if (priv->band == IEEE80211_BAND_5GHZ)
|
@ -0,0 +1,122 @@
|
||||
Backport of the following upstream commit...
|
||||
|
||||
commit 8a472da431998b7357e6dc562e79a3061ed56cad
|
||||
Author: Wey-Yi Guy <wey-yi.w.guy@intel.com>
|
||||
Date: Thu Feb 18 22:03:06 2010 -0800
|
||||
|
||||
iwlwifi: separated time check for different type of force reset
|
||||
|
||||
Use different timing duration check for different type of force reset,
|
||||
force reset request can come from different source and based on
|
||||
different reason; one type of reset request should not block other type of
|
||||
reset request.
|
||||
|
||||
Adding structure to keep track of different force reset request.
|
||||
|
||||
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
|
||||
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
|
||||
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
||||
|
||||
diff -up linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-agn.c.orig linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-agn.c
|
||||
--- linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-agn.c.orig 2010-04-13 13:44:14.000000000 -0400
|
||||
+++ linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-agn.c 2010-04-13 13:47:34.000000000 -0400
|
||||
@@ -3189,6 +3189,12 @@ static int iwl_init_drv(struct iwl_priv
|
||||
|
||||
priv->iw_mode = NL80211_IFTYPE_STATION;
|
||||
|
||||
+ /* initialize force reset */
|
||||
+ priv->force_reset[IWL_RF_RESET].reset_duration =
|
||||
+ IWL_DELAY_NEXT_FORCE_RF_RESET;
|
||||
+ priv->force_reset[IWL_FW_RESET].reset_duration =
|
||||
+ IWL_DELAY_NEXT_FORCE_FW_RELOAD;
|
||||
+
|
||||
/* Choose which receivers/antennas to use */
|
||||
if (priv->cfg->ops->hcmd->set_rxon_chain)
|
||||
priv->cfg->ops->hcmd->set_rxon_chain(priv);
|
||||
diff -up linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-core.c.orig linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-core.c
|
||||
--- linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-core.c.orig 2010-04-13 13:44:14.000000000 -0400
|
||||
+++ linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-core.c 2010-04-13 13:47:34.000000000 -0400
|
||||
@@ -3220,22 +3220,30 @@ static void iwl_force_rf_reset(struct iw
|
||||
return;
|
||||
}
|
||||
|
||||
-#define IWL_DELAY_NEXT_FORCE_RESET (HZ*3)
|
||||
|
||||
int iwl_force_reset(struct iwl_priv *priv, int mode)
|
||||
{
|
||||
+ struct iwl_force_reset *force_reset;
|
||||
+
|
||||
if (test_bit(STATUS_EXIT_PENDING, &priv->status))
|
||||
return -EINVAL;
|
||||
|
||||
- if (priv->last_force_reset_jiffies &&
|
||||
- time_after(priv->last_force_reset_jiffies +
|
||||
- IWL_DELAY_NEXT_FORCE_RESET, jiffies)) {
|
||||
+ if (mode >= IWL_MAX_FORCE_RESET) {
|
||||
+ IWL_DEBUG_INFO(priv, "invalid reset request.\n");
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+ force_reset = &priv->force_reset[mode];
|
||||
+ force_reset->reset_request_count++;
|
||||
+ if (force_reset->last_force_reset_jiffies &&
|
||||
+ time_after(force_reset->last_force_reset_jiffies +
|
||||
+ force_reset->reset_duration, jiffies)) {
|
||||
IWL_DEBUG_INFO(priv, "force reset rejected\n");
|
||||
+ force_reset->reset_reject_count++;
|
||||
return -EAGAIN;
|
||||
}
|
||||
-
|
||||
+ force_reset->reset_success_count++;
|
||||
+ force_reset->last_force_reset_jiffies = jiffies;
|
||||
IWL_DEBUG_INFO(priv, "perform force reset (%d)\n", mode);
|
||||
-
|
||||
switch (mode) {
|
||||
case IWL_RF_RESET:
|
||||
iwl_force_rf_reset(priv);
|
||||
@@ -3252,12 +3260,7 @@ int iwl_force_reset(struct iwl_priv *pri
|
||||
clear_bit(STATUS_READY, &priv->status);
|
||||
queue_work(priv->workqueue, &priv->restart);
|
||||
break;
|
||||
- default:
|
||||
- IWL_DEBUG_INFO(priv, "invalid reset request.\n");
|
||||
- return -EINVAL;
|
||||
}
|
||||
- priv->last_force_reset_jiffies = jiffies;
|
||||
-
|
||||
return 0;
|
||||
}
|
||||
|
||||
diff -up linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-dev.h.orig linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-dev.h
|
||||
--- linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-dev.h.orig 2010-04-13 13:45:06.000000000 -0400
|
||||
+++ linux-2.6.33.noarch/drivers/net/wireless/iwlwifi/iwl-dev.h 2010-04-13 13:47:34.000000000 -0400
|
||||
@@ -994,9 +994,21 @@ struct iwl_switch_rxon {
|
||||
#define IWL_MAX_PLCP_ERR_EXT_LONG_THRESHOLD_DEF (200)
|
||||
#define IWL_MAX_PLCP_ERR_THRESHOLD_MAX (255)
|
||||
|
||||
+#define IWL_DELAY_NEXT_FORCE_RF_RESET (HZ*3)
|
||||
+#define IWL_DELAY_NEXT_FORCE_FW_RELOAD (HZ*5)
|
||||
+
|
||||
enum iwl_reset {
|
||||
IWL_RF_RESET = 0,
|
||||
IWL_FW_RESET,
|
||||
+ IWL_MAX_FORCE_RESET,
|
||||
+};
|
||||
+
|
||||
+struct iwl_force_reset {
|
||||
+ int reset_request_count;
|
||||
+ int reset_success_count;
|
||||
+ int reset_reject_count;
|
||||
+ unsigned long reset_duration;
|
||||
+ unsigned long last_force_reset_jiffies;
|
||||
};
|
||||
|
||||
struct iwl_priv {
|
||||
@@ -1031,7 +1043,7 @@ struct iwl_priv {
|
||||
unsigned long plcp_jiffies;
|
||||
|
||||
/* force reset */
|
||||
- unsigned long last_force_reset_jiffies;
|
||||
+ struct iwl_force_reset force_reset[IWL_MAX_FORCE_RESET];
|
||||
|
||||
/* we allocate array of iwl4965_channel_info for NIC's valid channels.
|
||||
* Access via channel # using indirect index array */
|
3088
kernel.spec
3088
kernel.spec
File diff suppressed because it is too large
Load Diff
@ -1,9 +1,7 @@
|
||||
From 567b1bbf982637ce3f0ac8597af91ae8106648c8 Mon Sep 17 00:00:00 2001
|
||||
From: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
|
||||
Date: Wed, 30 Jun 2010 08:02:45 +0000 (+0800)
|
||||
Subject: KVM: MMU: fix conflict access permissions in direct sp
|
||||
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=6aa0b9dec5d6dde26ea17b0b5be8fccfe19df3c9
|
||||
|
||||
KVM: MMU: fix conflict access permissions in direct sp
|
||||
Date: Wed, 30 Jun 2010 16:02:45 +0800
|
||||
Subject: [PATCH] KVM: MMU: fix conflict access permissions in direct sp
|
||||
|
||||
In no-direct mapping, we mark sp is 'direct' when we mapping the
|
||||
guest's larger page, but its access is encoded form upper page-struct
|
||||
@ -34,12 +32,14 @@ Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
|
||||
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
|
||||
Signed-off-by: Avi Kivity <avi@redhat.com>
|
||||
---
|
||||
arch/x86/kvm/paging_tmpl.h | 1 +
|
||||
1 files changed, 1 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h
|
||||
index 89d66ca..2331bdc 100644
|
||||
index ede2131..b473c0f 100644
|
||||
--- a/arch/x86/kvm/paging_tmpl.h
|
||||
+++ b/arch/x86/kvm/paging_tmpl.h
|
||||
@@ -342,6 +342,7 @@ static u64 *FNAME(fetch)(struct kvm_vcpu *vcpu, gva_t addr,
|
||||
@@ -336,6 +336,7 @@ static u64 *FNAME(fetch)(struct kvm_vcpu *vcpu, gva_t addr,
|
||||
/* advance table_gfn when emulating 1gb pages with 4k */
|
||||
if (delta == 0)
|
||||
table_gfn += PT_INDEX(addr, level);
|
||||
@ -47,3 +47,6 @@ index 89d66ca..2331bdc 100644
|
||||
} else {
|
||||
direct = 0;
|
||||
table_gfn = gw->table_gfn[level - 2];
|
||||
--
|
||||
1.7.1
|
||||
|
||||
|
48
linux-2.6-acpi-indirect_fan_control.patch
Normal file
48
linux-2.6-acpi-indirect_fan_control.patch
Normal file
@ -0,0 +1,48 @@
|
||||
commit 0c99c5288eb9b1bbc9684b0ec0fd7efc578749b3
|
||||
Author: Zhang Rui <rui.zhang@intel.com>
|
||||
Date: Thu Dec 17 16:02:08 2009 +0800
|
||||
|
||||
ACPI: Disable explicit power state retrieval on fans
|
||||
|
||||
If the ACPI power state can be got both directly and indirectly,
|
||||
we prefer to get it indirectly.
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=531916 describes a
|
||||
system with a _PSC method for the fan that always returns "on".
|
||||
There's no benefit in us always requesting the state of the fan
|
||||
when performing transitions - we want to do everything we can
|
||||
to ensure that the fan turns on when it should do, not risk
|
||||
hardware damage by believing the hardware when it tells us the
|
||||
fan is already on. Given that the Leading Other OS(tm) works fine
|
||||
on this machine, it seems likely that it behaves in much this way.
|
||||
|
||||
inspired-by: Matthew Garrett <mjg@redhat.com>
|
||||
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
|
||||
Signed-off-by: Len Brown <len.brown@intel.com>
|
||||
|
||||
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
|
||||
index cf761b9..ae9226d 100644
|
||||
--- a/drivers/acpi/bus.c
|
||||
+++ b/drivers/acpi/bus.c
|
||||
@@ -190,16 +190,16 @@ int acpi_bus_get_power(acpi_handle handle, int *state)
|
||||
* Get the device's power state either directly (via _PSC) or
|
||||
* indirectly (via power resources).
|
||||
*/
|
||||
- if (device->power.flags.explicit_get) {
|
||||
+ if (device->power.flags.power_resources) {
|
||||
+ result = acpi_power_get_inferred_state(device);
|
||||
+ if (result)
|
||||
+ return result;
|
||||
+ } else if (device->power.flags.explicit_get) {
|
||||
status = acpi_evaluate_integer(device->handle, "_PSC",
|
||||
NULL, &psc);
|
||||
if (ACPI_FAILURE(status))
|
||||
return -ENODEV;
|
||||
device->power.state = (int)psc;
|
||||
- } else if (device->power.flags.power_resources) {
|
||||
- result = acpi_power_get_inferred_state(device);
|
||||
- if (result)
|
||||
- return result;
|
||||
}
|
||||
|
||||
*state = device->power.state;
|
51
linux-2.6-acpi-sleep-live-sci-live.patch
Normal file
51
linux-2.6-acpi-sleep-live-sci-live.patch
Normal file
@ -0,0 +1,51 @@
|
||||
commit 7ba0dea4158155a68b833982199691dbc2d4e6dc
|
||||
Author: Matthew Garrett <mjg@redhat.com>
|
||||
Date: Mon Apr 19 16:51:39 2010 -0400
|
||||
|
||||
acpi: Fall back to manually changing SCI_EN
|
||||
|
||||
The ACPI spec tells us that the ACPI SCI_EN bit is under hardware control
|
||||
and shouldn't be touched by the OS. It seems that the Leading Other OS
|
||||
ignores this and some machines expect this behaviour. We have a blacklist
|
||||
for these, but given that we're able to detect the failure case and the
|
||||
alternative to breaking the spec is letting the machine crash and burn,
|
||||
let's try falling back when we know the alternative is a mostly-dead
|
||||
machine.
|
||||
|
||||
Signed-off-by: Matthew Garrett <mjg@redhat.com>
|
||||
|
||||
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
|
||||
index f74834a..79df8d4 100644
|
||||
--- a/drivers/acpi/sleep.c
|
||||
+++ b/drivers/acpi/sleep.c
|
||||
@@ -227,6 +227,7 @@ static int acpi_suspend_begin(suspend_state_t pm_state)
|
||||
static int acpi_suspend_enter(suspend_state_t pm_state)
|
||||
{
|
||||
acpi_status status = AE_OK;
|
||||
+ acpi_status enable_status = AE_OK;
|
||||
unsigned long flags = 0;
|
||||
u32 acpi_state = acpi_target_sleep_state;
|
||||
|
||||
@@ -254,10 +255,19 @@ static int acpi_suspend_enter(suspend_state_t pm_state)
|
||||
}
|
||||
|
||||
/* If ACPI is not enabled by the BIOS, we need to enable it here. */
|
||||
- if (set_sci_en_on_resume)
|
||||
+ if (!set_sci_en_on_resume)
|
||||
+ enable_status = acpi_enable();
|
||||
+
|
||||
+ if (set_sci_en_on_resume || enable_status == AE_NO_HARDWARE_RESPONSE)
|
||||
+ /* If we're still in legacy mode then we have a problem. The
|
||||
+ * spec tells us that this bit is under hardware control, but
|
||||
+ * there's no plausible way that the OS can transition back to
|
||||
+ * legacy mode so our choices here are to either ignore the
|
||||
+ * spec or crash and burn horribly. The latter doesn't seem
|
||||
+ * like it's ever going to be the preferable choice, so let's
|
||||
+ * live dangerously.
|
||||
+ */
|
||||
acpi_write_bit_register(ACPI_BITREG_SCI_ENABLE, 1);
|
||||
- else
|
||||
- acpi_enable();
|
||||
|
||||
/* Reprogram control registers and execute _BFS */
|
||||
acpi_leave_sleep_state_prep(acpi_state);
|
@ -1,26 +1,15 @@
|
||||
From 023f5b2d1fdad6ffe33a204a4e76e38edba9d9e5 Mon Sep 17 00:00:00 2001
|
||||
From: Kyle McMartin <kyle@dreadnought.i.jkkm.org>
|
||||
Date: Thu, 20 May 2010 08:59:58 -0400
|
||||
Subject: linux-2.6-acpi-video-export-edid.patch
|
||||
|
||||
---
|
||||
drivers/acpi/video.c | 110 ++++++++++++++++++++++++++++++++++++++++++++++----
|
||||
include/acpi/video.h | 16 +++++++
|
||||
2 files changed, 118 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
|
||||
index a0c93b3..4b8bda1 100644
|
||||
--- a/drivers/acpi/video.c
|
||||
+++ b/drivers/acpi/video.c
|
||||
@@ -45,6 +45,7 @@
|
||||
diff -up linux-2.6.33.noarch/drivers/acpi/video.c.orig linux-2.6.33.noarch/drivers/acpi/video.c
|
||||
--- linux-2.6.33.noarch/drivers/acpi/video.c.orig 2010-04-12 13:42:53.637966231 -0400
|
||||
+++ linux-2.6.33.noarch/drivers/acpi/video.c 2010-04-12 13:43:07.290978352 -0400
|
||||
@@ -43,6 +43,7 @@
|
||||
#include <linux/dmi.h>
|
||||
#include <acpi/acpi_bus.h>
|
||||
#include <acpi/acpi_drivers.h>
|
||||
#include <linux/suspend.h>
|
||||
+#include <acpi/video.h>
|
||||
|
||||
#define PREFIX "ACPI: "
|
||||
|
||||
@@ -65,11 +66,6 @@
|
||||
@@ -63,11 +64,6 @@
|
||||
|
||||
#define MAX_NAME_LEN 20
|
||||
|
||||
@ -32,7 +21,7 @@ index a0c93b3..4b8bda1 100644
|
||||
#define _COMPONENT ACPI_VIDEO_COMPONENT
|
||||
ACPI_MODULE_NAME("video");
|
||||
|
||||
@@ -1748,11 +1744,27 @@ acpi_video_get_device_attr(struct acpi_video_bus *video, unsigned long device_id
|
||||
@@ -1731,11 +1727,27 @@ acpi_video_get_device_attr(struct acpi_v
|
||||
}
|
||||
|
||||
static int
|
||||
@ -61,7 +50,7 @@ index a0c93b3..4b8bda1 100644
|
||||
struct acpi_video_device *data;
|
||||
struct acpi_video_device_attrib* attribute;
|
||||
|
||||
@@ -1797,8 +1809,25 @@ acpi_video_bus_get_one_device(struct acpi_device *device,
|
||||
@@ -1780,8 +1792,25 @@ acpi_video_bus_get_one_device(struct acp
|
||||
}
|
||||
if(attribute->bios_can_detect)
|
||||
data->flags.bios = 1;
|
||||
@ -89,7 +78,7 @@ index a0c93b3..4b8bda1 100644
|
||||
|
||||
acpi_video_device_bind(video, data);
|
||||
acpi_video_device_find_cap(data);
|
||||
@@ -2032,6 +2061,71 @@ out:
|
||||
@@ -2015,6 +2044,71 @@ out:
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -161,10 +150,9 @@ index a0c93b3..4b8bda1 100644
|
||||
static int
|
||||
acpi_video_bus_get_devices(struct acpi_video_bus *video,
|
||||
struct acpi_device *device)
|
||||
diff --git a/include/acpi/video.h b/include/acpi/video.h
|
||||
index cf7be3d..551793c 100644
|
||||
--- a/include/acpi/video.h
|
||||
+++ b/include/acpi/video.h
|
||||
diff -up linux-2.6.33.noarch/include/acpi/video.h.orig linux-2.6.33.noarch/include/acpi/video.h
|
||||
--- linux-2.6.33.noarch/include/acpi/video.h.orig 2010-04-12 13:42:53.638966251 -0400
|
||||
+++ linux-2.6.33.noarch/include/acpi/video.h 2010-04-12 13:43:07.292841571 -0400
|
||||
@@ -1,12 +1,28 @@
|
||||
#ifndef __ACPI_VIDEO_H
|
||||
#define __ACPI_VIDEO_H
|
||||
@ -194,6 +182,3 @@ index cf7be3d..551793c 100644
|
||||
#endif
|
||||
|
||||
#endif
|
||||
--
|
||||
1.7.0.1
|
||||
|
||||
|
58
linux-2.6-ata-quirk.patch
Normal file
58
linux-2.6-ata-quirk.patch
Normal file
@ -0,0 +1,58 @@
|
||||
--- linux-2.6.20/arch/ia64/kernel/quirks.c 1969-12-31 19:00:00.000000000 -0500
|
||||
+++ linux-2.6.20_fix/arch/ia64/kernel/quirks.c 2007-02-13 13:56:34.000000000 -0500
|
||||
@@ -0,0 +1,45 @@
|
||||
+/*
|
||||
+ * This file contains work-arounds for ia64 platform bugs.
|
||||
+ */
|
||||
+#include <linux/pci.h>
|
||||
+
|
||||
+/*
|
||||
+ * quirk_intel_ide_controller: If an ide/ata controller is
|
||||
+ * at legacy mode, BIOS might initiates BAR(bar 0~3 and 5)
|
||||
+ * with incorrect value. This quirk will reset the incorrect
|
||||
+ * value to 0.
|
||||
+ */
|
||||
+static void __devinit quirk_intel_ide_controller(struct pci_dev *dev)
|
||||
+{
|
||||
+ unsigned int pos;
|
||||
+ struct resource *res;
|
||||
+ int fixed = 0;
|
||||
+ u8 tmp8;
|
||||
+
|
||||
+ if ((dev->class >> 8) != PCI_CLASS_STORAGE_IDE)
|
||||
+ return;
|
||||
+
|
||||
+ /* TODO: What if one channel is in native mode ... */
|
||||
+ pci_read_config_byte(dev, PCI_CLASS_PROG, &tmp8);
|
||||
+ if ((tmp8 & 5) == 5)
|
||||
+ return;
|
||||
+
|
||||
+ for( pos = 0; pos < 6; pos ++ ) {
|
||||
+ res = &dev->resource[pos];
|
||||
+ if (!(res->flags & (IORESOURCE_IO | IORESOURCE_MEM)))
|
||||
+ continue;
|
||||
+
|
||||
+ if (!res->start && res->end) {
|
||||
+ res->start = res->end = 0;
|
||||
+ res->flags = 0;
|
||||
+ fixed = 1;
|
||||
+ }
|
||||
+ }
|
||||
+ if (fixed)
|
||||
+ printk(KERN_WARNING
|
||||
+ "PCI device %s: BIOS resource configuration fixed.\n",
|
||||
+ pci_name(dev));
|
||||
+}
|
||||
+
|
||||
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_11, quirk_intel_ide_controller);
|
||||
+
|
||||
--- linux-2.6.21.noarch/arch/ia64/kernel/Makefile~ 2007-05-27 23:23:36.000000000 -0400
|
||||
+++ linux-2.6.21.noarch/arch/ia64/kernel/Makefile 2007-05-27 23:23:48.000000000 -0400
|
||||
@@ -33,6 +33,7 @@ obj-$(CONFIG_CRASH_DUMP) += crash_dump.o
|
||||
obj-$(CONFIG_IA64_UNCACHED_ALLOCATOR) += uncached.o
|
||||
obj-$(CONFIG_AUDIT) += audit.o
|
||||
obj-$(CONFIG_PCI_MSI) += msi_ia64.o
|
||||
+obj-$(CONFIG_PCI) += quirks.o
|
||||
mca_recovery-y += mca_drv.o mca_drv_asm.o
|
||||
obj-$(CONFIG_IA64_MC_ERR_INJECT)+= err_inject.o
|
||||
|
2819
linux-2.6-btrfs-update.patch
Normal file
2819
linux-2.6-btrfs-update.patch
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,26 +0,0 @@
|
||||
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c
|
||||
index 4173125..baa32a0 100644
|
||||
--- a/drivers/pci/intel-iommu.c
|
||||
+++ b/drivers/pci/intel-iommu.c
|
||||
@@ -340,7 +340,7 @@ int dmar_disabled = 0;
|
||||
int dmar_disabled = 1;
|
||||
#endif /*CONFIG_DMAR_DEFAULT_ON*/
|
||||
|
||||
-static int __initdata dmar_map_gfx = 1;
|
||||
+static int dmar_map_gfx = 1;
|
||||
static int dmar_forcedac;
|
||||
static int intel_iommu_strict;
|
||||
|
||||
@@ -3728,6 +3728,12 @@ static void __devinit quirk_iommu_rwbf(struct pci_dev *dev)
|
||||
*/
|
||||
printk(KERN_INFO "DMAR: Forcing write-buffer flush capability\n");
|
||||
rwbf_quirk = 1;
|
||||
+
|
||||
+ /* https://bugzilla.redhat.com/show_bug.cgi?id=538163 */
|
||||
+ if (dev->revision == 0x07) {
|
||||
+ printk(KERN_INFO "DMAR: Disabling IOMMU for graphics on this chipset\n");
|
||||
+ dmar_map_gfx = 0;
|
||||
+ }
|
||||
}
|
||||
|
||||
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2a40, quirk_iommu_rwbf);
|
98
linux-2.6-cpufreq-locking.patch
Normal file
98
linux-2.6-cpufreq-locking.patch
Normal file
@ -0,0 +1,98 @@
|
||||
Date: Thu, 4 Mar 2010 03:23:46 -0500
|
||||
From: Amerigo Wang <amwang@redhat.com>
|
||||
To: linux-kernel@vger.kernel.org
|
||||
Cc: Dave Jones <davej@redhat.com>, cpufreq@vger.kernel.org,
|
||||
Amerigo Wang <amwang@redhat.com>,
|
||||
Johannes Berg <johannes@sipsolutions.net>, akpm@linux-foundation.org,
|
||||
Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
|
||||
Subject: [CPUFREQ] fix a lockdep warning
|
||||
|
||||
There is no need to do sysfs_remove_link() or kobject_put() etc.
|
||||
when policy_rwsem_write is held, move them after releasing the lock.
|
||||
|
||||
This fixes the lockdep warning:
|
||||
|
||||
halt/4071 is trying to acquire lock:
|
||||
(s_active){++++.+}, at: [<c0000000001ef868>] .sysfs_addrm_finish+0x58/0xc0
|
||||
|
||||
but task is already holding lock:
|
||||
(&per_cpu(cpu_policy_rwsem, cpu)){+.+.+.}, at: [<c0000000004cd6ac>] .lock_policy_rwsem_write+0x84/0xf4
|
||||
|
||||
Reported-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
||||
Signed-off-by: WANG Cong <amwang@redhat.com>
|
||||
Cc: Johannes Berg <johannes@sipsolutions.net>
|
||||
Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
|
||||
Signed-off-by: Dave Jones <davej@redhat.com>
|
||||
|
||||
---
|
||||
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
|
||||
index 67bc2ec..e196084 100644
|
||||
--- a/drivers/cpufreq/cpufreq.c
|
||||
+++ b/drivers/cpufreq/cpufreq.c
|
||||
@@ -1113,6 +1113,8 @@ static int __cpufreq_remove_dev(struct sys_device *sys_dev)
|
||||
unsigned int cpu = sys_dev->id;
|
||||
unsigned long flags;
|
||||
struct cpufreq_policy *data;
|
||||
+ struct kobject *kobj;
|
||||
+ struct completion *cmp;
|
||||
#ifdef CONFIG_SMP
|
||||
struct sys_device *cpu_sys_dev;
|
||||
unsigned int j;
|
||||
@@ -1141,10 +1143,11 @@ static int __cpufreq_remove_dev(struct sys_device *sys_dev)
|
||||
dprintk("removing link\n");
|
||||
cpumask_clear_cpu(cpu, data->cpus);
|
||||
spin_unlock_irqrestore(&cpufreq_driver_lock, flags);
|
||||
- sysfs_remove_link(&sys_dev->kobj, "cpufreq");
|
||||
+ kobj = &sys_dev->kobj;
|
||||
cpufreq_cpu_put(data);
|
||||
cpufreq_debug_enable_ratelimit();
|
||||
unlock_policy_rwsem_write(cpu);
|
||||
+ sysfs_remove_link(kobj, "cpufreq");
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
@@ -1181,7 +1184,10 @@ static int __cpufreq_remove_dev(struct sys_device *sys_dev)
|
||||
data->governor->name, CPUFREQ_NAME_LEN);
|
||||
#endif
|
||||
cpu_sys_dev = get_cpu_sysdev(j);
|
||||
- sysfs_remove_link(&cpu_sys_dev->kobj, "cpufreq");
|
||||
+ kobj = &cpu_sys_dev->kobj;
|
||||
+ unlock_policy_rwsem_write(cpu);
|
||||
+ sysfs_remove_link(kobj, "cpufreq");
|
||||
+ lock_policy_rwsem_write(cpu);
|
||||
cpufreq_cpu_put(data);
|
||||
}
|
||||
}
|
||||
@@ -1192,19 +1198,22 @@ static int __cpufreq_remove_dev(struct sys_device *sys_dev)
|
||||
if (cpufreq_driver->target)
|
||||
__cpufreq_governor(data, CPUFREQ_GOV_STOP);
|
||||
|
||||
- kobject_put(&data->kobj);
|
||||
+ kobj = &data->kobj;
|
||||
+ cmp = &data->kobj_unregister;
|
||||
+ unlock_policy_rwsem_write(cpu);
|
||||
+ kobject_put(kobj);
|
||||
|
||||
/* we need to make sure that the underlying kobj is actually
|
||||
* not referenced anymore by anybody before we proceed with
|
||||
* unloading.
|
||||
*/
|
||||
dprintk("waiting for dropping of refcount\n");
|
||||
- wait_for_completion(&data->kobj_unregister);
|
||||
+ wait_for_completion(cmp);
|
||||
dprintk("wait complete\n");
|
||||
|
||||
+ lock_policy_rwsem_write(cpu);
|
||||
if (cpufreq_driver->exit)
|
||||
cpufreq_driver->exit(data);
|
||||
-
|
||||
unlock_policy_rwsem_write(cpu);
|
||||
|
||||
free_cpumask_var(data->related_cpus);
|
||||
|
||||
|
||||
--
|
||||
To unsubscribe from this list: send the line "unsubscribe cpufreq" in
|
||||
the body of a message to majordomo@vger.kernel.org
|
||||
More majordomo info at http://vger.kernel.org/majordomo-info.html
|
||||
|
@ -1,21 +1,3 @@
|
||||
From df42d15cd28f468ecd4c30465b98a53cce90617c Mon Sep 17 00:00:00 2001
|
||||
From: Kyle McMartin <kyle@phobos.i.jkkm.org>
|
||||
Date: Tue, 30 Mar 2010 00:16:25 -0400
|
||||
Subject: dev-crash-driver.patch
|
||||
|
||||
---
|
||||
arch/ia64/include/asm/crash.h | 90 +++++++++++++++++++++++++++++
|
||||
arch/ia64/kernel/ia64_ksyms.c | 3 +
|
||||
arch/x86/include/asm/crash.h | 75 ++++++++++++++++++++++++
|
||||
arch/x86/mm/ioremap.c | 2 +
|
||||
drivers/char/Kconfig | 2 +
|
||||
drivers/char/Makefile | 2 +
|
||||
drivers/char/crash.c | 128 +++++++++++++++++++++++++++++++++++++++++
|
||||
7 files changed, 302 insertions(+), 0 deletions(-)
|
||||
create mode 100644 arch/ia64/include/asm/crash.h
|
||||
create mode 100644 arch/x86/include/asm/crash.h
|
||||
create mode 100644 drivers/char/crash.c
|
||||
|
||||
diff --git a/arch/ia64/include/asm/crash.h b/arch/ia64/include/asm/crash.h
|
||||
new file mode 100644
|
||||
index 0000000..541af84
|
||||
@ -113,7 +95,7 @@ index 0000000..541af84
|
||||
+
|
||||
+#endif /* _ASM_IA64_CRASH_H */
|
||||
diff --git a/arch/ia64/kernel/ia64_ksyms.c b/arch/ia64/kernel/ia64_ksyms.c
|
||||
index 7f4a0ed..552fe24 100644
|
||||
index 14d39e3..cf3d040 100644
|
||||
--- a/arch/ia64/kernel/ia64_ksyms.c
|
||||
+++ b/arch/ia64/kernel/ia64_ksyms.c
|
||||
@@ -84,6 +84,9 @@ EXPORT_SYMBOL(ia64_save_scratch_fpregs);
|
||||
@ -208,23 +190,22 @@ index 0000000..dfcc006
|
||||
+
|
||||
+#endif /* _ASM_I386_CRASH_H */
|
||||
diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c
|
||||
index 5eb1ba7..3e525d2 100644
|
||||
index 334e63c..8e1ccbc 100644
|
||||
--- a/arch/x86/mm/ioremap.c
|
||||
+++ b/arch/x86/mm/ioremap.c
|
||||
@@ -24,6 +24,8 @@
|
||||
|
||||
#include "physaddr.h"
|
||||
|
||||
@@ -60,6 +60,7 @@ int page_is_ram(unsigned long pagenr)
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(page_is_ram);
|
||||
+
|
||||
|
||||
/*
|
||||
* Fix up the linear direct mapping of the kernel to avoid cache attribute
|
||||
* conflicts.
|
||||
diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
|
||||
index 3141dd3..153658c 100644
|
||||
index 08a6f50..8bc5e9a 100644
|
||||
--- a/drivers/char/Kconfig
|
||||
+++ b/drivers/char/Kconfig
|
||||
@@ -471,6 +471,8 @@ config LEGACY_PTYS
|
||||
@@ -484,6 +484,8 @@ config LEGACY_PTYS
|
||||
security. This option enables these legacy devices; on most
|
||||
systems, it is safe to say N.
|
||||
|
||||
@ -234,10 +215,10 @@ index 3141dd3..153658c 100644
|
||||
config LEGACY_PTY_COUNT
|
||||
int "Maximum number of legacy PTY in use"
|
||||
diff --git a/drivers/char/Makefile b/drivers/char/Makefile
|
||||
index f957edf..604c418 100644
|
||||
index 19a79dd..0bee860 100644
|
||||
--- a/drivers/char/Makefile
|
||||
+++ b/drivers/char/Makefile
|
||||
@@ -111,6 +111,8 @@ obj-$(CONFIG_PS3_FLASH) += ps3flash.o
|
||||
@@ -112,6 +112,8 @@ obj-$(CONFIG_PS3_FLASH) += ps3flash.o
|
||||
obj-$(CONFIG_JS_RTC) += js-rtc.o
|
||||
js-rtc-y = rtc.o
|
||||
|
||||
@ -380,6 +361,3 @@ index 0000000..e5437de
|
||||
+module_exit(crash_cleanup_module);
|
||||
+
|
||||
+MODULE_LICENSE("GPL");
|
||||
--
|
||||
1.7.0.1
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 542dee6f43067fa0101b53925aadf1d08c997cd4 Mon Sep 17 00:00:00 2001
|
||||
From: Kyle McMartin <kyle@phobos.i.jkkm.org>
|
||||
Date: Mon, 29 Mar 2010 23:40:27 -0400
|
||||
Subject: linux-2.6-debug-nmi-timeout
|
||||
From c2dcc88ee3aca407471246c38c11a100cca39076 Mon Sep 17 00:00:00 2001
|
||||
From: Kyle McMartin <kyle@treachery.i.jkkm.org>
|
||||
Date: Mon, 11 Jan 2010 08:20:51 -0500
|
||||
Subject: linux-2.6-debug-nmi-timeout.patch
|
||||
|
||||
---
|
||||
arch/x86/kernel/apic/nmi.c | 2 +-
|
||||
@ -9,23 +9,23 @@ Subject: linux-2.6-debug-nmi-timeout
|
||||
2 files changed, 9 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/arch/x86/kernel/apic/nmi.c b/arch/x86/kernel/apic/nmi.c
|
||||
index 8aa65ad..ba7d55e 100644
|
||||
index 0159a69..2bbca2b 100644
|
||||
--- a/arch/x86/kernel/apic/nmi.c
|
||||
+++ b/arch/x86/kernel/apic/nmi.c
|
||||
@@ -439,7 +439,7 @@ nmi_watchdog_tick(struct pt_regs *regs, unsigned reason)
|
||||
* wait a few IRQs (5 seconds) before doing the oops ...
|
||||
*/
|
||||
__this_cpu_inc(alert_counter);
|
||||
- if (__this_cpu_read(alert_counter) == 5 * nmi_hz)
|
||||
+ if (__this_cpu_read(alert_counter) == CONFIG_DEBUG_NMI_TIMEOUT * nmi_hz)
|
||||
__this_cpu_inc(per_cpu_var(alert_counter));
|
||||
- if (__this_cpu_read(per_cpu_var(alert_counter)) == 5 * nmi_hz)
|
||||
+ if (__this_cpu_read(per_cpu_var(alert_counter)) == CONFIG_DEBUG_NMI_TIMEOUT * nmi_hz)
|
||||
/*
|
||||
* die_nmi will return ONLY if NOTIFY_STOP happens..
|
||||
*/
|
||||
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
|
||||
index 1fafb4b..963e78b 100644
|
||||
index 25c3ed5..6d67975 100644
|
||||
--- a/lib/Kconfig.debug
|
||||
+++ b/lib/Kconfig.debug
|
||||
@@ -254,6 +254,14 @@ config SCHEDSTATS
|
||||
@@ -253,6 +253,14 @@ config SCHEDSTATS
|
||||
application, you can say N to avoid the very slight overhead
|
||||
this adds.
|
||||
|
||||
@ -41,5 +41,5 @@ index 1fafb4b..963e78b 100644
|
||||
bool "Collect kernel timers statistics"
|
||||
depends on DEBUG_KERNEL && PROC_FS
|
||||
--
|
||||
1.7.0.1
|
||||
1.6.5.2
|
||||
|
||||
|
@ -1,21 +1,6 @@
|
||||
From 14bdd0d36f5284108468bb73afd50726b07c7a84 Mon Sep 17 00:00:00 2001
|
||||
From: Kyle McMartin <kyle@phobos.i.jkkm.org>
|
||||
Date: Mon, 29 Mar 2010 23:43:49 -0400
|
||||
Subject: linux-2.6-defaults-pci_no_msi
|
||||
|
||||
---
|
||||
Documentation/kernel-parameters.txt | 3 +++
|
||||
drivers/pci/Kconfig | 12 ++++++++++++
|
||||
drivers/pci/msi.c | 9 +++++++++
|
||||
drivers/pci/pci.c | 2 ++
|
||||
drivers/pci/pci.h | 2 ++
|
||||
5 files changed, 28 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
|
||||
index e4cbca5..8154a0f 100644
|
||||
--- a/Documentation/kernel-parameters.txt
|
||||
+++ b/Documentation/kernel-parameters.txt
|
||||
@@ -1911,6 +1911,9 @@ and is between 256 and 4096 characters. It is defined in the file
|
||||
--- linux-2.6.30.noarch/Documentation/kernel-parameters.txt~ 2009-06-24 14:25:04.000000000 -0400
|
||||
+++ linux-2.6.30.noarch/Documentation/kernel-parameters.txt 2009-06-24 14:25:32.000000000 -0400
|
||||
@@ -1811,6 +1811,9 @@ and is between 256 and 4096 characters.
|
||||
check_enable_amd_mmconf [X86] check for and enable
|
||||
properly configured MMIO access to PCI
|
||||
config space on AMD family 10h CPU
|
||||
@ -26,7 +11,7 @@ index e4cbca5..8154a0f 100644
|
||||
enabled, this kernel boot option can be used to
|
||||
disable the use of MSI interrupts system-wide.
|
||||
diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig
|
||||
index 7858a11..b12fcad 100644
|
||||
index 2a4501d..209758c 100644
|
||||
--- a/drivers/pci/Kconfig
|
||||
+++ b/drivers/pci/Kconfig
|
||||
@@ -21,6 +21,18 @@ config PCI_MSI
|
||||
@ -45,14 +30,14 @@ index 7858a11..b12fcad 100644
|
||||
+
|
||||
+ If you don't know what to do here, say N.
|
||||
+
|
||||
config PCI_DEBUG
|
||||
bool "PCI Debugging"
|
||||
depends on PCI && DEBUG_KERNEL
|
||||
config PCI_LEGACY
|
||||
bool "Enable deprecated pci_find_* API"
|
||||
depends on PCI
|
||||
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
|
||||
index f9cf317..6b0539a 100644
|
||||
index 896a15d..53df583 100644
|
||||
--- a/drivers/pci/msi.c
|
||||
+++ b/drivers/pci/msi.c
|
||||
@@ -22,7 +22,11 @@
|
||||
@@ -23,7 +23,11 @@
|
||||
#include "pci.h"
|
||||
#include "msi.h"
|
||||
|
||||
@ -64,7 +49,7 @@ index f9cf317..6b0539a 100644
|
||||
|
||||
/* Arch hooks */
|
||||
|
||||
@@ -836,6 +840,11 @@ int pci_msi_enabled(void)
|
||||
@@ -786,6 +790,11 @@ int pci_msi_enabled(void)
|
||||
}
|
||||
EXPORT_SYMBOL(pci_msi_enabled);
|
||||
|
||||
@ -77,10 +62,10 @@ index f9cf317..6b0539a 100644
|
||||
{
|
||||
INIT_LIST_HEAD(&dev->msi_list);
|
||||
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
|
||||
index 1531f3a..3cb332b 100644
|
||||
index 17bd932..e9bc9fe 100644
|
||||
--- a/drivers/pci/pci.c
|
||||
+++ b/drivers/pci/pci.c
|
||||
@@ -2983,6 +2983,8 @@ static int __init pci_setup(char *str)
|
||||
@@ -2393,6 +2393,8 @@ static int __init pci_setup(char *str)
|
||||
if (*str && (str = pcibios_setup(str)) && *str) {
|
||||
if (!strcmp(str, "nomsi")) {
|
||||
pci_no_msi();
|
||||
@ -90,10 +75,10 @@ index 1531f3a..3cb332b 100644
|
||||
pci_no_aer();
|
||||
} else if (!strcmp(str, "nodomains")) {
|
||||
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
|
||||
index 4eb10f4..caa051e 100644
|
||||
index 26ddf78..85efe81 100644
|
||||
--- a/drivers/pci/pci.h
|
||||
+++ b/drivers/pci/pci.h
|
||||
@@ -122,9 +122,11 @@ extern unsigned int pci_pm_d3_delay;
|
||||
@@ -111,9 +111,11 @@ extern unsigned int pci_pm_d3_delay;
|
||||
|
||||
#ifdef CONFIG_PCI_MSI
|
||||
void pci_no_msi(void);
|
||||
@ -105,6 +90,3 @@ index 4eb10f4..caa051e 100644
|
||||
static inline void pci_msi_init_pci_dev(struct pci_dev *dev) { }
|
||||
#endif
|
||||
|
||||
--
|
||||
1.7.0.1
|
||||
|
||||
|
13
linux-2.6-defaults-pciehp.patch
Normal file
13
linux-2.6-defaults-pciehp.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/drivers/pci/hotplug/pciehp_core.c b/drivers/pci/hotplug/pciehp_core.c
|
||||
index e7f3c9e..4f2b037 100644
|
||||
--- a/drivers/pci/hotplug/pciehp_core.c
|
||||
+++ b/drivers/pci/hotplug/pciehp_core.c
|
||||
@@ -41,7 +41,7 @@ int pciehp_debug;
|
||||
int pciehp_poll_mode;
|
||||
int pciehp_poll_time;
|
||||
int pciehp_force;
|
||||
-int pciehp_passive;
|
||||
+int pciehp_passive=1;
|
||||
struct workqueue_struct *pciehp_wq;
|
||||
|
||||
#define DRIVER_VERSION "0.4"
|
319
linux-2.6-dell-laptop-rfkill-fix.patch
Normal file
319
linux-2.6-dell-laptop-rfkill-fix.patch
Normal file
@ -0,0 +1,319 @@
|
||||
From caca5447fae9bfc87ab7d4af664d8bc95db6904d Mon Sep 17 00:00:00 2001
|
||||
From: Kyle McMartin <kyle@treachery.i.jkkm.org>
|
||||
Date: Mon, 11 Jan 2010 08:08:02 -0500
|
||||
Subject: linux-2.6-dell-laptop-rfkill-fix.patch
|
||||
|
||||
---
|
||||
drivers/input/input.c | 91 ++++++++++++++++++++++++++++-----
|
||||
drivers/platform/x86/dell-laptop.c | 100 ++++++++++++++++++++++++++++++++++++
|
||||
include/linux/input.h | 5 ++
|
||||
3 files changed, 183 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/drivers/input/input.c b/drivers/input/input.c
|
||||
index ab06071..1911c3a 100644
|
||||
--- a/drivers/input/input.c
|
||||
+++ b/drivers/input/input.c
|
||||
@@ -90,19 +90,26 @@ static int input_defuzz_abs_event(int value, int old_val, int fuzz)
|
||||
*/
|
||||
static void input_pass_event(struct input_dev *dev,
|
||||
unsigned int type, unsigned int code, int value)
|
||||
-{
|
||||
- struct input_handle *handle;
|
||||
+
|
||||
+{ struct input_handle *handle;
|
||||
|
||||
rcu_read_lock();
|
||||
|
||||
handle = rcu_dereference(dev->grab);
|
||||
- if (handle)
|
||||
+ if (handle) {
|
||||
handle->handler->event(handle, type, code, value);
|
||||
- else
|
||||
- list_for_each_entry_rcu(handle, &dev->h_list, d_node)
|
||||
- if (handle->open)
|
||||
- handle->handler->event(handle,
|
||||
- type, code, value);
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ handle = rcu_dereference(dev->filter);
|
||||
+ if (handle && handle->handler->filter(handle, type, code, value))
|
||||
+ goto out;
|
||||
+
|
||||
+ list_for_each_entry_rcu(handle, &dev->h_list, d_node)
|
||||
+ if (handle->open)
|
||||
+ handle->handler->event(handle,
|
||||
+ type, code, value);
|
||||
+out:
|
||||
rcu_read_unlock();
|
||||
}
|
||||
|
||||
@@ -383,12 +390,15 @@ int input_grab_device(struct input_handle *handle)
|
||||
}
|
||||
EXPORT_SYMBOL(input_grab_device);
|
||||
|
||||
-static void __input_release_device(struct input_handle *handle)
|
||||
+static void __input_release_device(struct input_handle *handle, bool filter)
|
||||
{
|
||||
struct input_dev *dev = handle->dev;
|
||||
|
||||
- if (dev->grab == handle) {
|
||||
- rcu_assign_pointer(dev->grab, NULL);
|
||||
+ if (handle == (filter ? dev->filter : dev->grab)) {
|
||||
+ if (filter)
|
||||
+ rcu_assign_pointer(dev->filter, NULL);
|
||||
+ else
|
||||
+ rcu_assign_pointer(dev->grab, NULL);
|
||||
/* Make sure input_pass_event() notices that grab is gone */
|
||||
synchronize_rcu();
|
||||
|
||||
@@ -412,12 +422,65 @@ void input_release_device(struct input_handle *handle)
|
||||
struct input_dev *dev = handle->dev;
|
||||
|
||||
mutex_lock(&dev->mutex);
|
||||
- __input_release_device(handle);
|
||||
+ __input_release_device(handle, false);
|
||||
mutex_unlock(&dev->mutex);
|
||||
}
|
||||
EXPORT_SYMBOL(input_release_device);
|
||||
|
||||
/**
|
||||
+ * input_filter_device - allow input events to be filtered from higher layers
|
||||
+ * @handle: input handle that wants to filter the device
|
||||
+ *
|
||||
+ * When a device is filtered by an input handle all events generated by
|
||||
+ * the device are to this handle. If the filter function returns true then
|
||||
+ * the event is discarded rather than being passed to any other input handles,
|
||||
+ * otherwise it is passed to them as normal. Grabs will be handled before
|
||||
+ * filters, so a grabbed device will not deliver events to a filter function.
|
||||
+ */
|
||||
+int input_filter_device(struct input_handle *handle)
|
||||
+{
|
||||
+ struct input_dev *dev = handle->dev;
|
||||
+ int retval;
|
||||
+
|
||||
+ retval = mutex_lock_interruptible(&dev->mutex);
|
||||
+ if (retval)
|
||||
+ return retval;
|
||||
+
|
||||
+ if (dev->filter) {
|
||||
+ retval = -EBUSY;
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ rcu_assign_pointer(dev->filter, handle);
|
||||
+ synchronize_rcu();
|
||||
+
|
||||
+ out:
|
||||
+ mutex_unlock(&dev->mutex);
|
||||
+ return retval;
|
||||
+}
|
||||
+EXPORT_SYMBOL(input_filter_device);
|
||||
+
|
||||
+/**
|
||||
+ * input_unfilter_device - removes a filter from a device
|
||||
+ * @handle: input handle that owns the device
|
||||
+ *
|
||||
+ * Removes the filter from a device so that other input handles can
|
||||
+ * start receiving unfiltered input events. Upon release all handlers
|
||||
+ * attached to the device have their start() method called so they
|
||||
+ * have a change to synchronize device state with the rest of the
|
||||
+ * system.
|
||||
+ */
|
||||
+void input_unfilter_device(struct input_handle *handle)
|
||||
+{
|
||||
+ struct input_dev *dev = handle->dev;
|
||||
+
|
||||
+ mutex_lock(&dev->mutex);
|
||||
+ __input_release_device(handle, true);
|
||||
+ mutex_unlock(&dev->mutex);
|
||||
+}
|
||||
+EXPORT_SYMBOL(input_unfilter_device);
|
||||
+
|
||||
+/**
|
||||
* input_open_device - open input device
|
||||
* @handle: handle through which device is being accessed
|
||||
*
|
||||
@@ -490,7 +553,9 @@ void input_close_device(struct input_handle *handle)
|
||||
|
||||
mutex_lock(&dev->mutex);
|
||||
|
||||
- __input_release_device(handle);
|
||||
+ /* Release both grabs and filters */
|
||||
+ __input_release_device(handle, false);
|
||||
+ __input_release_device(handle, true);
|
||||
|
||||
if (!--dev->users && dev->close)
|
||||
dev->close(dev);
|
||||
diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c
|
||||
index 3780994..25247be 100644
|
||||
--- a/drivers/platform/x86/dell-laptop.c
|
||||
+++ b/drivers/platform/x86/dell-laptop.c
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <linux/rfkill.h>
|
||||
#include <linux/power_supply.h>
|
||||
#include <linux/acpi.h>
|
||||
+#include <linux/input.h>
|
||||
#include "../../firmware/dcdbas.h"
|
||||
|
||||
#define BRIGHTNESS_TOKEN 0x7d
|
||||
@@ -214,6 +215,16 @@ static const struct rfkill_ops dell_rfkill_ops = {
|
||||
.query = dell_rfkill_query,
|
||||
};
|
||||
|
||||
+static void dell_rfkill_update(void)
|
||||
+{
|
||||
+ if (wifi_rfkill)
|
||||
+ dell_rfkill_query(wifi_rfkill, (void *)1);
|
||||
+ if (bluetooth_rfkill)
|
||||
+ dell_rfkill_query(bluetooth_rfkill, (void *)2);
|
||||
+ if (wwan_rfkill)
|
||||
+ dell_rfkill_query(wwan_rfkill, (void *)3);
|
||||
+}
|
||||
+
|
||||
static int __init dell_setup_rfkill(void)
|
||||
{
|
||||
struct calling_interface_buffer buffer;
|
||||
@@ -338,6 +349,90 @@ static struct backlight_ops dell_ops = {
|
||||
.update_status = dell_send_intensity,
|
||||
};
|
||||
|
||||
+static const struct input_device_id dell_input_ids[] = {
|
||||
+ {
|
||||
+ .bustype = 0x11,
|
||||
+ .vendor = 0x01,
|
||||
+ .product = 0x01,
|
||||
+ .version = 0xab41,
|
||||
+ .flags = INPUT_DEVICE_ID_MATCH_BUS |
|
||||
+ INPUT_DEVICE_ID_MATCH_VENDOR |
|
||||
+ INPUT_DEVICE_ID_MATCH_PRODUCT |
|
||||
+ INPUT_DEVICE_ID_MATCH_VERSION
|
||||
+ },
|
||||
+ { },
|
||||
+};
|
||||
+
|
||||
+static bool dell_input_filter(struct input_handle *handle, unsigned int type,
|
||||
+ unsigned int code, int value)
|
||||
+{
|
||||
+ if (type == EV_KEY && code == KEY_WLAN && value == 1) {
|
||||
+ dell_rfkill_update();
|
||||
+ return 1;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static void dell_input_event(struct input_handle *handle, unsigned int type,
|
||||
+ unsigned int code, int value)
|
||||
+{
|
||||
+}
|
||||
+
|
||||
+static int dell_input_connect(struct input_handler *handler,
|
||||
+ struct input_dev *dev,
|
||||
+ const struct input_device_id *id)
|
||||
+{
|
||||
+ struct input_handle *handle;
|
||||
+ int error;
|
||||
+
|
||||
+ handle = kzalloc(sizeof(struct input_handle), GFP_KERNEL);
|
||||
+ if (!handle)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ handle->dev = dev;
|
||||
+ handle->handler = handler;
|
||||
+ handle->name = "dell-laptop";
|
||||
+
|
||||
+ error = input_register_handle(handle);
|
||||
+ if (error)
|
||||
+ goto err_free_handle;
|
||||
+
|
||||
+ error = input_open_device(handle);
|
||||
+ if (error)
|
||||
+ goto err_unregister_handle;
|
||||
+
|
||||
+ error = input_filter_device(handle);
|
||||
+ if (error)
|
||||
+ goto err_close_handle;
|
||||
+
|
||||
+ return 0;
|
||||
+
|
||||
+err_close_handle:
|
||||
+ input_close_device(handle);
|
||||
+err_unregister_handle:
|
||||
+ input_unregister_handle(handle);
|
||||
+err_free_handle:
|
||||
+ kfree(handle);
|
||||
+ return error;
|
||||
+}
|
||||
+
|
||||
+static void dell_input_disconnect(struct input_handle *handle)
|
||||
+{
|
||||
+ input_close_device(handle);
|
||||
+ input_unregister_handle(handle);
|
||||
+ kfree(handle);
|
||||
+}
|
||||
+
|
||||
+static struct input_handler dell_input_handler = {
|
||||
+ .name = "dell-laptop",
|
||||
+ .filter = dell_input_filter,
|
||||
+ .event = dell_input_event,
|
||||
+ .connect = dell_input_connect,
|
||||
+ .disconnect = dell_input_disconnect,
|
||||
+ .id_table = dell_input_ids,
|
||||
+};
|
||||
+
|
||||
static int __init dell_init(void)
|
||||
{
|
||||
struct calling_interface_buffer buffer;
|
||||
@@ -373,6 +468,10 @@ static int __init dell_init(void)
|
||||
goto fail_rfkill;
|
||||
}
|
||||
|
||||
+ if (input_register_handler(&dell_input_handler))
|
||||
+ printk(KERN_INFO
|
||||
+ "dell-laptop: Could not register input filter\n");
|
||||
+
|
||||
#ifdef CONFIG_ACPI
|
||||
/* In the event of an ACPI backlight being available, don't
|
||||
* register the platform controller.
|
||||
@@ -426,6 +525,7 @@ static void __exit dell_exit(void)
|
||||
{
|
||||
backlight_device_unregister(dell_backlight_device);
|
||||
dell_cleanup_rfkill();
|
||||
+ input_unregister_handler(&dell_input_handler);
|
||||
}
|
||||
|
||||
module_init(dell_init);
|
||||
diff --git a/include/linux/input.h b/include/linux/input.h
|
||||
index 7be8a65..7d49094 100644
|
||||
--- a/include/linux/input.h
|
||||
+++ b/include/linux/input.h
|
||||
@@ -1127,6 +1127,7 @@ struct input_dev {
|
||||
int (*event)(struct input_dev *dev, unsigned int type, unsigned int code, int value);
|
||||
|
||||
struct input_handle *grab;
|
||||
+ struct input_handle *filter;
|
||||
|
||||
spinlock_t event_lock;
|
||||
struct mutex mutex;
|
||||
@@ -1227,6 +1228,7 @@ struct input_handler {
|
||||
void *private;
|
||||
|
||||
void (*event)(struct input_handle *handle, unsigned int type, unsigned int code, int value);
|
||||
+ bool (*filter)(struct input_handle *handle, unsigned int type, unsigned int code, int value);
|
||||
int (*connect)(struct input_handler *handler, struct input_dev *dev, const struct input_device_id *id);
|
||||
void (*disconnect)(struct input_handle *handle);
|
||||
void (*start)(struct input_handle *handle);
|
||||
@@ -1307,6 +1309,9 @@ void input_unregister_handle(struct input_handle *);
|
||||
int input_grab_device(struct input_handle *);
|
||||
void input_release_device(struct input_handle *);
|
||||
|
||||
+int input_filter_device(struct input_handle *);
|
||||
+void input_unfilter_device(struct input_handle *);
|
||||
+
|
||||
int input_open_device(struct input_handle *);
|
||||
void input_close_device(struct input_handle *);
|
||||
|
||||
--
|
||||
1.6.5.2
|
||||
|
@ -1,12 +1,3 @@
|
||||
From 5006dd0fae6126c149868102c100cd90a20ef2e3 Mon Sep 17 00:00:00 2001
|
||||
From: Kyle McMartin <kyle@phobos.i.jkkm.org>
|
||||
Date: Mon, 29 Mar 2010 23:20:18 -0400
|
||||
Subject: execshield
|
||||
|
||||
cebbert@redhat.com: added fix for bz#220892
|
||||
|
||||
diff --git a/arch/x86/include/asm/desc.h b/arch/x86/include/asm/desc.h
|
||||
index 617bd56..526248d 100644
|
||||
--- a/arch/x86/include/asm/desc.h
|
||||
+++ b/arch/x86/include/asm/desc.h
|
||||
@@ -5,6 +5,7 @@
|
||||
@ -53,8 +44,6 @@ index 617bd56..526248d 100644
|
||||
+#endif /* CONFIG_X86_32 */
|
||||
+
|
||||
#endif /* _ASM_X86_DESC_H */
|
||||
diff --git a/arch/x86/include/asm/mmu.h b/arch/x86/include/asm/mmu.h
|
||||
index 80a1dee..8314c66 100644
|
||||
--- a/arch/x86/include/asm/mmu.h
|
||||
+++ b/arch/x86/include/asm/mmu.h
|
||||
@@ -7,12 +7,19 @@
|
||||
@ -77,8 +66,6 @@ index 80a1dee..8314c66 100644
|
||||
} mm_context_t;
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h
|
||||
index 5653f43..55dadb2 100644
|
||||
--- a/arch/x86/include/asm/paravirt.h
|
||||
+++ b/arch/x86/include/asm/paravirt.h
|
||||
@@ -289,6 +289,12 @@ static inline void set_ldt(const void *addr, unsigned entries)
|
||||
@ -94,8 +81,6 @@ index 5653f43..55dadb2 100644
|
||||
static inline void store_gdt(struct desc_ptr *dtr)
|
||||
{
|
||||
PVOP_VCALL1(pv_cpu_ops.store_gdt, dtr);
|
||||
diff --git a/arch/x86/include/asm/paravirt_types.h b/arch/x86/include/asm/paravirt_types.h
|
||||
index db9ef55..19c2793 100644
|
||||
--- a/arch/x86/include/asm/paravirt_types.h
|
||||
+++ b/arch/x86/include/asm/paravirt_types.h
|
||||
@@ -118,6 +118,9 @@ struct pv_cpu_ops {
|
||||
@ -108,8 +93,6 @@ index db9ef55..19c2793 100644
|
||||
unsigned long (*store_tr)(void);
|
||||
void (*load_tls)(struct thread_struct *t, unsigned int cpu);
|
||||
#ifdef CONFIG_X86_64
|
||||
diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h
|
||||
index b753ea5..4893156 100644
|
||||
--- a/arch/x86/include/asm/processor.h
|
||||
+++ b/arch/x86/include/asm/processor.h
|
||||
@@ -162,6 +162,9 @@ static inline int hlt_works(int cpu)
|
||||
@ -122,8 +105,6 @@ index b753ea5..4893156 100644
|
||||
extern void cpu_detect(struct cpuinfo_x86 *c);
|
||||
|
||||
extern struct pt_regs *idle_regs(struct pt_regs *);
|
||||
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
|
||||
index 4868e4a..6c8d2ca 100644
|
||||
--- a/arch/x86/kernel/cpu/common.c
|
||||
+++ b/arch/x86/kernel/cpu/common.c
|
||||
@@ -802,6 +802,20 @@ static void __cpuinit identify_cpu(struct cpuinfo_x86 *c)
|
||||
@ -147,8 +128,6 @@ index 4868e4a..6c8d2ca 100644
|
||||
/* If the model name is still unset, do table lookup. */
|
||||
if (!c->x86_model_id[0]) {
|
||||
const char *p;
|
||||
diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c
|
||||
index 1db183e..238b97d 100644
|
||||
--- a/arch/x86/kernel/paravirt.c
|
||||
+++ b/arch/x86/kernel/paravirt.c
|
||||
@@ -345,6 +345,9 @@ struct pv_cpu_ops pv_cpu_ops = {
|
||||
@ -161,11 +140,9 @@ index 1db183e..238b97d 100644
|
||||
.load_gdt = native_load_gdt,
|
||||
.load_idt = native_load_idt,
|
||||
.store_gdt = native_store_gdt,
|
||||
diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c
|
||||
index f6c6266..8ac2589 100644
|
||||
--- a/arch/x86/kernel/process_32.c
|
||||
+++ b/arch/x86/kernel/process_32.c
|
||||
@@ -251,7 +251,10 @@ int copy_thread(unsigned long clone_flags, unsigned long sp,
|
||||
@@ -257,7 +257,10 @@ int copy_thread(unsigned long clone_flags, unsigned long sp,
|
||||
void
|
||||
start_thread(struct pt_regs *regs, unsigned long new_ip, unsigned long new_sp)
|
||||
{
|
||||
@ -176,7 +153,7 @@ index f6c6266..8ac2589 100644
|
||||
regs->fs = 0;
|
||||
set_fs(USER_DS);
|
||||
regs->ds = __USER_DS;
|
||||
@@ -260,6 +263,11 @@ start_thread(struct pt_regs *regs, unsigned long new_ip, unsigned long new_sp)
|
||||
@@ -266,6 +269,11 @@ start_thread(struct pt_regs *regs, unsigned long new_ip, unsigned long new_sp)
|
||||
regs->cs = __USER_CS;
|
||||
regs->ip = new_ip;
|
||||
regs->sp = new_sp;
|
||||
@ -188,7 +165,7 @@ index f6c6266..8ac2589 100644
|
||||
/*
|
||||
* Free the old FP and other extended state
|
||||
*/
|
||||
@@ -319,6 +327,9 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
|
||||
@@ -325,6 +333,9 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
|
||||
if (preload_fpu)
|
||||
prefetch(next->xstate);
|
||||
|
||||
@ -198,7 +175,7 @@ index f6c6266..8ac2589 100644
|
||||
/*
|
||||
* Reload esp0.
|
||||
*/
|
||||
@@ -412,3 +423,40 @@ unsigned long get_wchan(struct task_struct *p)
|
||||
@@ -418,3 +429,40 @@ unsigned long get_wchan(struct task_struct *p)
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -239,8 +216,6 @@ index f6c6266..8ac2589 100644
|
||||
+ mm->context.exec_limit = 0;
|
||||
+ set_user_cs(&mm->context.user_cs, 0);
|
||||
+}
|
||||
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
|
||||
index 1168e44..c452918 100644
|
||||
--- a/arch/x86/kernel/traps.c
|
||||
+++ b/arch/x86/kernel/traps.c
|
||||
@@ -115,6 +115,76 @@ die_if_kernel(const char *str, struct pt_regs *regs, long err)
|
||||
@ -350,7 +325,7 @@ index 1168e44..c452918 100644
|
||||
tsk->thread.error_code = error_code;
|
||||
tsk->thread.trap_no = 13;
|
||||
|
||||
@@ -863,19 +956,37 @@ do_device_not_available(struct pt_regs *regs, long error_code)
|
||||
@@ -860,19 +953,37 @@ do_device_not_available(struct pt_regs *regs, long error_code)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_X86_32
|
||||
@ -397,8 +372,6 @@ index 1168e44..c452918 100644
|
||||
}
|
||||
#endif
|
||||
|
||||
diff --git a/arch/x86/mm/mmap.c b/arch/x86/mm/mmap.c
|
||||
index 1dab519..360f39d 100644
|
||||
--- a/arch/x86/mm/mmap.c
|
||||
+++ b/arch/x86/mm/mmap.c
|
||||
@@ -124,13 +124,16 @@ static unsigned long mmap_legacy_base(void)
|
||||
@ -419,8 +392,6 @@ index 1dab519..360f39d 100644
|
||||
mm->unmap_area = arch_unmap_area_topdown;
|
||||
}
|
||||
}
|
||||
diff --git a/arch/x86/mm/setup_nx.c b/arch/x86/mm/setup_nx.c
|
||||
index a3250aa..e0d9cce 100644
|
||||
--- a/arch/x86/mm/setup_nx.c
|
||||
+++ b/arch/x86/mm/setup_nx.c
|
||||
@@ -1,3 +1,4 @@
|
||||
@ -447,8 +418,6 @@ index a3250aa..e0d9cce 100644
|
||||
printk(KERN_NOTICE "Notice: NX (Execute Disable) protection "
|
||||
"missing in CPU or disabled in BIOS!\n");
|
||||
} else {
|
||||
diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c
|
||||
index 426f3a1..e0286b1 100644
|
||||
--- a/arch/x86/mm/tlb.c
|
||||
+++ b/arch/x86/mm/tlb.c
|
||||
@@ -6,6 +6,7 @@
|
||||
@ -472,8 +441,6 @@ index 426f3a1..e0286b1 100644
|
||||
/*
|
||||
* orig_rax contains the negated interrupt vector.
|
||||
* Use that to determine where the sender put the data.
|
||||
diff --git a/arch/x86/vdso/vdso32-setup.c b/arch/x86/vdso/vdso32-setup.c
|
||||
index 02b442e..957bb67 100644
|
||||
--- a/arch/x86/vdso/vdso32-setup.c
|
||||
+++ b/arch/x86/vdso/vdso32-setup.c
|
||||
@@ -331,7 +331,7 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
|
||||
@ -485,11 +452,9 @@ index 02b442e..957bb67 100644
|
||||
if (IS_ERR_VALUE(addr)) {
|
||||
ret = addr;
|
||||
goto up_fail;
|
||||
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
|
||||
index b607239..e426a3f 100644
|
||||
--- a/arch/x86/xen/enlighten.c
|
||||
+++ b/arch/x86/xen/enlighten.c
|
||||
@@ -334,6 +334,24 @@ static void xen_set_ldt(const void *addr, unsigned entries)
|
||||
@@ -333,6 +333,24 @@ static void xen_set_ldt(const void *addr, unsigned entries)
|
||||
xen_mc_issue(PARAVIRT_LAZY_CPU);
|
||||
}
|
||||
|
||||
@ -514,7 +479,7 @@ index b607239..e426a3f 100644
|
||||
static void xen_load_gdt(const struct desc_ptr *dtr)
|
||||
{
|
||||
unsigned long va = dtr->address;
|
||||
@@ -960,6 +978,9 @@ static const struct pv_cpu_ops xen_cpu_ops __initdata = {
|
||||
@@ -959,6 +977,9 @@ static const struct pv_cpu_ops xen_cpu_ops __initdata = {
|
||||
|
||||
.load_tr_desc = paravirt_nop,
|
||||
.set_ldt = xen_set_ldt,
|
||||
@ -524,11 +489,9 @@ index b607239..e426a3f 100644
|
||||
.load_gdt = xen_load_gdt,
|
||||
.load_idt = xen_load_idt,
|
||||
.load_tls = xen_load_tls,
|
||||
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
|
||||
index 535e763..d114af6 100644
|
||||
--- a/fs/binfmt_elf.c
|
||||
+++ b/fs/binfmt_elf.c
|
||||
@@ -74,7 +74,7 @@ static struct linux_binfmt elf_format = {
|
||||
@@ -73,7 +73,7 @@ static struct linux_binfmt elf_format = {
|
||||
.hasvdso = 1
|
||||
};
|
||||
|
||||
@ -537,7 +500,7 @@ index 535e763..d114af6 100644
|
||||
|
||||
static int set_brk(unsigned long start, unsigned long end)
|
||||
{
|
||||
@@ -701,6 +701,11 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
|
||||
@@ -721,6 +721,11 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
|
||||
break;
|
||||
}
|
||||
|
||||
@ -549,7 +512,7 @@ index 535e763..d114af6 100644
|
||||
/* Some simple consistency checks for the interpreter */
|
||||
if (elf_interpreter) {
|
||||
retval = -ELIBBAD;
|
||||
@@ -717,6 +722,15 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
|
||||
@@ -740,6 +745,15 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
|
||||
if (retval)
|
||||
goto out_free_dentry;
|
||||
|
||||
@ -565,7 +528,7 @@ index 535e763..d114af6 100644
|
||||
/* OK, This is the point of no return */
|
||||
current->flags &= ~PF_FORKNOEXEC;
|
||||
current->mm->def_flags = def_flags;
|
||||
@@ -724,7 +738,8 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
|
||||
@@ -747,7 +761,8 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
|
||||
/* Do this immediately, since STACK_TOP as used in setup_arg_pages
|
||||
may depend on the personality. */
|
||||
SET_PERSONALITY(loc->elf_ex);
|
||||
@ -575,7 +538,7 @@ index 535e763..d114af6 100644
|
||||
current->personality |= READ_IMPLIES_EXEC;
|
||||
|
||||
if (!(current->personality & ADDR_NO_RANDOMIZE) && randomize_va_space)
|
||||
@@ -890,7 +905,7 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
|
||||
@@ -912,7 +927,7 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
|
||||
interpreter,
|
||||
&interp_map_addr,
|
||||
load_bias);
|
||||
@ -584,11 +547,9 @@ index 535e763..d114af6 100644
|
||||
/*
|
||||
* load_elf_interp() returns relocation
|
||||
* adjustment
|
||||
diff --git a/include/linux/mm.h b/include/linux/mm.h
|
||||
index e70f21b..44e6d63 100644
|
||||
--- a/include/linux/mm.h
|
||||
+++ b/include/linux/mm.h
|
||||
@@ -1259,7 +1259,13 @@ extern int install_special_mapping(struct mm_struct *mm,
|
||||
@@ -1148,7 +1148,13 @@ extern int install_special_mapping(struct mm_struct *mm,
|
||||
unsigned long addr, unsigned long len,
|
||||
unsigned long flags, struct page **pages);
|
||||
|
||||
@ -603,11 +564,9 @@ index e70f21b..44e6d63 100644
|
||||
|
||||
extern unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
|
||||
unsigned long len, unsigned long prot,
|
||||
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
|
||||
index b8bb9a6..f478e39 100644
|
||||
--- a/include/linux/mm_types.h
|
||||
+++ b/include/linux/mm_types.h
|
||||
@@ -227,6 +227,9 @@ struct mm_struct {
|
||||
@@ -209,6 +209,9 @@ struct mm_struct {
|
||||
unsigned long (*get_unmapped_area) (struct file *filp,
|
||||
unsigned long addr, unsigned long len,
|
||||
unsigned long pgoff, unsigned long flags);
|
||||
@ -617,8 +576,6 @@ index b8bb9a6..f478e39 100644
|
||||
void (*unmap_area) (struct mm_struct *mm, unsigned long addr);
|
||||
#endif
|
||||
unsigned long mmap_base; /* base of mmap area */
|
||||
diff --git a/include/linux/resource.h b/include/linux/resource.h
|
||||
index f1e914e..d2aef9a 100644
|
||||
--- a/include/linux/resource.h
|
||||
+++ b/include/linux/resource.h
|
||||
@@ -53,8 +53,11 @@ struct rlimit {
|
||||
@ -634,8 +591,6 @@ index f1e914e..d2aef9a 100644
|
||||
|
||||
/*
|
||||
* GPG2 wants 64kB of mlocked memory, to make sure pass phrases
|
||||
diff --git a/include/linux/sched.h b/include/linux/sched.h
|
||||
index dad7f66..c5a3948 100644
|
||||
--- a/include/linux/sched.h
|
||||
+++ b/include/linux/sched.h
|
||||
@@ -102,6 +102,9 @@ struct fs_struct;
|
||||
@ -648,7 +603,7 @@ index dad7f66..c5a3948 100644
|
||||
/*
|
||||
* List of flags we want to share for kernel threads,
|
||||
* if only because they are not used by them anyway.
|
||||
@@ -390,6 +393,10 @@ extern void arch_pick_mmap_layout(struct mm_struct *mm);
|
||||
@@ -382,6 +385,10 @@ extern void arch_pick_mmap_layout(struct mm_struct *mm);
|
||||
extern unsigned long
|
||||
arch_get_unmapped_area(struct file *, unsigned long, unsigned long,
|
||||
unsigned long, unsigned long);
|
||||
@ -659,11 +614,9 @@ index dad7f66..c5a3948 100644
|
||||
extern unsigned long
|
||||
arch_get_unmapped_area_topdown(struct file *filp, unsigned long addr,
|
||||
unsigned long len, unsigned long pgoff,
|
||||
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
|
||||
index 8686b0f..a4fad81 100644
|
||||
--- a/kernel/sysctl.c
|
||||
+++ b/kernel/sysctl.c
|
||||
@@ -99,6 +99,26 @@ extern int sysctl_nr_open_min, sysctl_nr_open_max;
|
||||
@@ -87,6 +87,26 @@ extern int sysctl_nr_open_min, sysctl_nr_open_max;
|
||||
#ifndef CONFIG_MMU
|
||||
extern int sysctl_nr_trim_pages;
|
||||
#endif
|
||||
@ -687,10 +640,10 @@ index 8686b0f..a4fad81 100644
|
||||
+}
|
||||
+__setup("exec-shield=", setup_exec_shield);
|
||||
+
|
||||
#ifdef CONFIG_BLOCK
|
||||
extern int blk_iopoll_enabled;
|
||||
#endif
|
||||
@@ -400,6 +420,14 @@ static struct ctl_table kern_table[] = {
|
||||
#ifdef CONFIG_RCU_TORTURE_TEST
|
||||
extern int rcutorture_runnable;
|
||||
#endif /* #ifdef CONFIG_RCU_TORTURE_TEST */
|
||||
@@ -410,6 +430,14 @@ static struct ctl_table kern_table[] = {
|
||||
.mode = 0644,
|
||||
.proc_handler = proc_dointvec,
|
||||
},
|
||||
@ -705,10 +658,8 @@ index 8686b0f..a4fad81 100644
|
||||
#ifdef CONFIG_PROC_SYSCTL
|
||||
{
|
||||
.procname = "tainted",
|
||||
diff --git a/mm/mmap.c b/mm/mmap.c
|
||||
index 75557c6..8173284 100644
|
||||
--- a/mm/mmap.c
|
||||
+++ b/mm/mmap.c
|
||||
--- b/mm/mmap.c
|
||||
+++ linux-2.6.33.noarch/mm/mmap.c
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <linux/rmap.h>
|
||||
#include <linux/mmu_notifier.h>
|
||||
@ -736,7 +687,7 @@ index 75557c6..8173284 100644
|
||||
static void unmap_region(struct mm_struct *mm,
|
||||
struct vm_area_struct *vma, struct vm_area_struct *prev,
|
||||
unsigned long start, unsigned long end);
|
||||
@@ -388,6 +401,8 @@ static inline void
|
||||
@@ -388,6 +401,8 @@
|
||||
__vma_link_list(struct mm_struct *mm, struct vm_area_struct *vma,
|
||||
struct vm_area_struct *prev, struct rb_node *rb_parent)
|
||||
{
|
||||
@ -745,7 +696,7 @@ index 75557c6..8173284 100644
|
||||
if (prev) {
|
||||
vma->vm_next = prev->vm_next;
|
||||
prev->vm_next = vma;
|
||||
@@ -489,6 +504,8 @@ __vma_unlink(struct mm_struct *mm, struct vm_area_struct *vma,
|
||||
@@ -490,6 +505,8 @@
|
||||
rb_erase(&vma->vm_rb, &mm->mm_rb);
|
||||
if (mm->mmap_cache == vma)
|
||||
mm->mmap_cache = prev;
|
||||
@ -754,16 +705,16 @@ index 75557c6..8173284 100644
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -798,6 +815,8 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm,
|
||||
@@ -797,6 +814,8 @@
|
||||
} else /* cases 2, 5, 7 */
|
||||
err = vma_adjust(prev, prev->vm_start,
|
||||
vma_adjust(prev, prev->vm_start,
|
||||
end, prev->vm_pgoff, NULL);
|
||||
+ if (prev->vm_flags & VM_EXEC)
|
||||
+ arch_add_exec_range(mm, prev->vm_end);
|
||||
if (err)
|
||||
return NULL;
|
||||
return prev;
|
||||
@@ -952,7 +971,8 @@ unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
|
||||
}
|
||||
|
||||
@@ -947,7 +966,8 @@
|
||||
/* Obtain the address to map to. we verify (or select) it and ensure
|
||||
* that it represents a valid section of the address space.
|
||||
*/
|
||||
@ -773,7 +724,7 @@ index 75557c6..8173284 100644
|
||||
if (addr & ~PAGE_MASK)
|
||||
return addr;
|
||||
|
||||
@@ -1504,8 +1524,8 @@ void arch_unmap_area_topdown(struct mm_struct *mm, unsigned long addr)
|
||||
@@ -1479,8 +1499,8 @@
|
||||
}
|
||||
|
||||
unsigned long
|
||||
@ -784,7 +735,7 @@ index 75557c6..8173284 100644
|
||||
{
|
||||
unsigned long (*get_area)(struct file *, unsigned long,
|
||||
unsigned long, unsigned long, unsigned long);
|
||||
@@ -1518,7 +1538,11 @@ get_unmapped_area(struct file *file, unsigned long addr, unsigned long len,
|
||||
@@ -1493,7 +1513,11 @@
|
||||
if (len > TASK_SIZE)
|
||||
return -ENOMEM;
|
||||
|
||||
@ -797,7 +748,7 @@ index 75557c6..8173284 100644
|
||||
if (file && file->f_op && file->f_op->get_unmapped_area)
|
||||
get_area = file->f_op->get_unmapped_area;
|
||||
addr = get_area(file, addr, len, pgoff, flags);
|
||||
@@ -1532,8 +1556,83 @@ get_unmapped_area(struct file *file, unsigned long addr, unsigned long len,
|
||||
@@ -1507,8 +1531,83 @@
|
||||
|
||||
return arch_rebalance_pgtables(addr, len);
|
||||
}
|
||||
@ -882,33 +833,31 @@ index 75557c6..8173284 100644
|
||||
|
||||
/* Look up the first VMA which satisfies addr < vm_end, NULL if none. */
|
||||
struct vm_area_struct *find_vma(struct mm_struct *mm, unsigned long addr)
|
||||
@@ -1608,6 +1707,16 @@ out:
|
||||
@@ -1583,6 +1682,14 @@
|
||||
return prev ? prev->vm_next : vma;
|
||||
}
|
||||
|
||||
+static int over_stack_limit(unsigned long sz)
|
||||
+{
|
||||
+ struct rlimit *rlim = current->signal->rlim;
|
||||
+
|
||||
+ if (sz < EXEC_STACK_BIAS)
|
||||
+ return 0;
|
||||
+ return (sz - EXEC_STACK_BIAS) >
|
||||
+ ACCESS_ONCE(rlim[RLIMIT_STACK].rlim_cur);
|
||||
+ current->signal->rlim[RLIMIT_STACK].rlim_cur;
|
||||
+}
|
||||
+
|
||||
/*
|
||||
* Verify that the stack growth is acceptable and
|
||||
* update accounting. This is shared with both the
|
||||
@@ -1624,7 +1733,7 @@ static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, uns
|
||||
@@ -1599,7 +1706,7 @@
|
||||
return -ENOMEM;
|
||||
|
||||
/* Stack limit test */
|
||||
- if (size > ACCESS_ONCE(rlim[RLIMIT_STACK].rlim_cur))
|
||||
- if (size > rlim[RLIMIT_STACK].rlim_cur)
|
||||
+ if (over_stack_limit(size))
|
||||
return -ENOMEM;
|
||||
|
||||
/* mlock limit tests */
|
||||
@@ -1936,10 +2045,14 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma,
|
||||
@@ -1906,10 +2013,14 @@
|
||||
if (new->vm_ops && new->vm_ops->open)
|
||||
new->vm_ops->open(new);
|
||||
|
||||
@ -916,16 +865,16 @@ index 75557c6..8173284 100644
|
||||
+ if (new_below) {
|
||||
+ unsigned long old_end = vma->vm_end;
|
||||
+
|
||||
err = vma_adjust(vma, addr, vma->vm_end, vma->vm_pgoff +
|
||||
vma_adjust(vma, addr, vma->vm_end, vma->vm_pgoff +
|
||||
((addr - new->vm_start) >> PAGE_SHIFT), new);
|
||||
- else
|
||||
+ if (vma->vm_flags & VM_EXEC)
|
||||
+ arch_remove_exec_range(mm, old_end);
|
||||
+ } else
|
||||
err = vma_adjust(vma, vma->vm_start, addr, vma->vm_pgoff, new);
|
||||
vma_adjust(vma, vma->vm_start, addr, vma->vm_pgoff, new);
|
||||
|
||||
/* Success. */
|
||||
@@ -2223,6 +2336,7 @@ void exit_mmap(struct mm_struct *mm)
|
||||
return 0;
|
||||
@@ -2176,6 +2287,7 @@
|
||||
|
||||
free_pgtables(tlb, vma, FIRST_USER_ADDRESS, 0);
|
||||
tlb_finish_mmu(tlb, 0, end);
|
||||
@ -933,8 +882,6 @@ index 75557c6..8173284 100644
|
||||
|
||||
/*
|
||||
* Walk the list again, actually closing and freeing it,
|
||||
diff --git a/mm/mprotect.c b/mm/mprotect.c
|
||||
index 8bc969d..3c9b4fc 100644
|
||||
--- a/mm/mprotect.c
|
||||
+++ b/mm/mprotect.c
|
||||
@@ -26,9 +26,14 @@
|
||||
@ -971,11 +918,9 @@ index 8bc969d..3c9b4fc 100644
|
||||
mmu_notifier_invalidate_range_start(mm, start, end);
|
||||
if (is_vm_hugetlb_page(vma))
|
||||
hugetlb_change_protection(vma, start, end, vma->vm_page_prot);
|
||||
diff --git a/mm/mremap.c b/mm/mremap.c
|
||||
index e9c75ef..0a5379f 100644
|
||||
--- a/mm/mremap.c
|
||||
+++ b/mm/mremap.c
|
||||
@@ -488,10 +488,10 @@ unsigned long do_mremap(unsigned long addr,
|
||||
@@ -485,10 +485,10 @@ unsigned long do_mremap(unsigned long addr,
|
||||
if (vma->vm_flags & VM_MAYSHARE)
|
||||
map_flags |= MAP_SHARED;
|
||||
|
||||
@ -988,6 +933,3 @@ index e9c75ef..0a5379f 100644
|
||||
if (new_addr & ~PAGE_MASK) {
|
||||
ret = new_addr;
|
||||
goto out;
|
||||
--
|
||||
1.7.0.1
|
||||
|
||||
|
@ -0,0 +1,4 @@
|
||||
#
|
||||
# Patches under review and/or pending inclusion in the linux1394-git
|
||||
# tree (and/or in by the time your read this), which we want...
|
||||
#
|
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user