mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 13:16:41 +00:00
linux:
- adding some usefull patches from fedora and moblin
This commit is contained in:
parent
9708266c5e
commit
c1e57e76ab
36
packages/linux/patches/close_debug_info_of_rt2860.diff
Normal file
36
packages/linux/patches/close_debug_info_of_rt2860.diff
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
diff --git a/drivers/staging/rt2860/rt_linux.c b/drivers/staging/rt2860/rt_linux.c
|
||||||
|
index 9357fb2..7e0b6c0 100644
|
||||||
|
--- a/drivers/staging/rt2860/rt_linux.c
|
||||||
|
+++ b/drivers/staging/rt2860/rt_linux.c
|
||||||
|
@@ -28,7 +28,7 @@
|
||||||
|
#include <linux/sched.h>
|
||||||
|
#include "rt_config.h"
|
||||||
|
|
||||||
|
-unsigned long RTDebugLevel = RT_DEBUG_ERROR;
|
||||||
|
+unsigned long RTDebugLevel = RT_DEBUG_OFF;
|
||||||
|
|
||||||
|
/* for wireless system event message */
|
||||||
|
char const *pWirelessSysEventText[IW_SYS_EVENT_TYPE_NUM] = {
|
||||||
|
diff --git a/drivers/staging/rt2860/rt_linux.h b/drivers/staging/rt2860/rt_linux.h
|
||||||
|
index f85508d..92ce551 100644
|
||||||
|
--- a/drivers/staging/rt2860/rt_linux.h
|
||||||
|
+++ b/drivers/staging/rt2860/rt_linux.h
|
||||||
|
@@ -425,16 +425,9 @@ do{ \
|
||||||
|
|
||||||
|
#define DBGPRINT(Level, Fmt) DBGPRINT_RAW(Level, Fmt)
|
||||||
|
|
||||||
|
-#define DBGPRINT_ERR(Fmt) \
|
||||||
|
-{ \
|
||||||
|
- printk("ERROR! "); \
|
||||||
|
- printk Fmt; \
|
||||||
|
-}
|
||||||
|
+#define DBGPRINT_ERR(Fmt)
|
||||||
|
|
||||||
|
-#define DBGPRINT_S(Status, Fmt) \
|
||||||
|
-{ \
|
||||||
|
- printk Fmt; \
|
||||||
|
-}
|
||||||
|
+#define DBGPRINT_S(Status, Fmt)
|
||||||
|
|
||||||
|
#else
|
||||||
|
#define DBGPRINT(Level, Fmt)
|
18
packages/linux/patches/die-floppy-die.diff
Normal file
18
packages/linux/patches/die-floppy-die.diff
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
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.
|
||||||
|
|
||||||
|
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
|
||||||
|
index 91b7530..2ea84a6 100644
|
||||||
|
--- a/drivers/block/floppy.c
|
||||||
|
+++ b/drivers/block/floppy.c
|
||||||
|
@@ -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
|
||||||
|
|
35
packages/linux/patches/hda_intel-prealloc-4mb-dmabuffer.diff
Normal file
35
packages/linux/patches/hda_intel-prealloc-4mb-dmabuffer.diff
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
|
||||||
|
index c8d9178..7d3bb15 100644
|
||||||
|
--- a/sound/pci/hda/hda_intel.c
|
||||||
|
+++ b/sound/pci/hda/hda_intel.c
|
||||||
|
@@ -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 >= AZX_MAX_PCMS) {
|
||||||
|
snd_printk(KERN_ERR SFX "Invalid PCM device number %d\n",
|
||||||
|
@@ -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);
|
||||||
|
}
|
||||||
|
+
|
||||||
|
/* buffer pre-allocation */
|
||||||
|
+
|
||||||
|
+ /* subtle, don't allocate a big buffer for modems...
|
||||||
|
+ * also, don't just test 32BIT_MASK, since azx supports
|
||||||
|
+ * 64-bit DMA in some cases.
|
||||||
|
+ */
|
||||||
|
+ /* lennart wants a 2.2MB buffer for 2sec of 48khz */
|
||||||
|
+ if (pcm->dev_class == SNDRV_PCM_CLASS_GENERIC &&
|
||||||
|
+ chip->pci->dma_mask >= DMA_32BIT_MASK)
|
||||||
|
+ prealloc_min = 4 * 1024 * 1024; /* 4MB */
|
||||||
|
+
|
||||||
|
snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG,
|
||||||
|
snd_dma_pci_data(chip->pci),
|
||||||
|
- 1024 * 64, 32 * 1024 * 1024);
|
||||||
|
+ prealloc_min, 32 * 1024 * 1024);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,60 @@
|
|||||||
|
commit 0f592e33934bf6108e33e34f00b425f98ee833ef
|
||||||
|
Author: Matthew Garrett <mjg@redhat.com>
|
||||||
|
Date: Wed Jul 8 19:04:23 2009 +0100
|
||||||
|
|
||||||
|
usb: Allow drivers to enable USB autosuspend on a per-device basis
|
||||||
|
|
||||||
|
USB autosuspend is currently only enabled by default for hubs. On other
|
||||||
|
hardware the decision is made by userspace. This is unnecessary in cases
|
||||||
|
where we know that the hardware supports autosuspend, so this patch adds
|
||||||
|
a function to allow drivers to enable it at probe time.
|
||||||
|
|
||||||
|
Signed-off-by: Matthew Garrett <mjg@redhat.com>
|
||||||
|
|
||||||
|
diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c
|
||||||
|
index 60a45f1..06d24df 100644
|
||||||
|
--- a/drivers/usb/core/driver.c
|
||||||
|
+++ b/drivers/usb/core/driver.c
|
||||||
|
@@ -1648,6 +1648,20 @@ void usb_autopm_put_interface_async(struct usb_interface *intf)
|
||||||
|
EXPORT_SYMBOL_GPL(usb_autopm_put_interface_async);
|
||||||
|
|
||||||
|
/**
|
||||||
|
+ * usb_device_autosuspend_enable - enable autosuspend on a device
|
||||||
|
+ * @udev: the usb_device to be autosuspended
|
||||||
|
+ *
|
||||||
|
+ * This routine should be called by an interface driver when it knows that
|
||||||
|
+ * the device in question supports USB autosuspend.
|
||||||
|
+ *
|
||||||
|
+ */
|
||||||
|
+void usb_device_autosuspend_enable(struct usb_device *udev)
|
||||||
|
+{
|
||||||
|
+ udev->autosuspend_disabled = 0;
|
||||||
|
+}
|
||||||
|
+EXPORT_SYMBOL_GPL(usb_device_autosuspend_enable);
|
||||||
|
+
|
||||||
|
+/**
|
||||||
|
* usb_autopm_get_interface - increment a USB interface's PM-usage counter
|
||||||
|
* @intf: the usb_interface whose counter should be incremented
|
||||||
|
*
|
||||||
|
diff --git a/include/linux/usb.h b/include/linux/usb.h
|
||||||
|
index e101a2d..dd47590 100644
|
||||||
|
--- a/include/linux/usb.h
|
||||||
|
+++ b/include/linux/usb.h
|
||||||
|
@@ -540,6 +540,7 @@ extern struct usb_device *usb_find_device(u16 vendor_id, u16 product_id);
|
||||||
|
|
||||||
|
/* USB autosuspend and autoresume */
|
||||||
|
#ifdef CONFIG_USB_SUSPEND
|
||||||
|
+extern void usb_device_autosuspend_enable(struct usb_device *udev);
|
||||||
|
extern int usb_autopm_get_interface(struct usb_interface *intf);
|
||||||
|
extern void usb_autopm_put_interface(struct usb_interface *intf);
|
||||||
|
extern int usb_autopm_get_interface_async(struct usb_interface *intf);
|
||||||
|
@@ -563,6 +564,9 @@ static inline void usb_mark_last_busy(struct usb_device *udev)
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
+static inline void usb_device_autosuspend_enable(struct usb_device *udev)
|
||||||
|
+{ }
|
||||||
|
+
|
||||||
|
static inline int usb_autopm_get_interface(struct usb_interface *intf)
|
||||||
|
{ return 0; }
|
||||||
|
static inline int usb_autopm_get_interface_async(struct usb_interface *intf)
|
19
packages/linux/patches/linux-2.6-usb-uvc-autosuspend.diff
Normal file
19
packages/linux/patches/linux-2.6-usb-uvc-autosuspend.diff
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
commit 9d4c919bcfa794c054cc33155c7e3c53ac2c5684
|
||||||
|
Author: Matthew Garrett <mjg@redhat.com>
|
||||||
|
Date: Sun Jul 19 02:24:49 2009 +0100
|
||||||
|
|
||||||
|
Enable autosuspend on UVC by default
|
||||||
|
|
||||||
|
diff --git a/drivers/media/video/uvc/uvc_driver.c b/drivers/media/video/uvc/uvc_driver.c
|
||||||
|
index 89927b7..8de516b 100644
|
||||||
|
--- a/drivers/media/video/uvc/uvc_driver.c
|
||||||
|
+++ b/drivers/media/video/uvc/uvc_driver.c
|
||||||
|
@@ -1647,6 +1647,8 @@ static int uvc_probe(struct usb_interface *intf,
|
||||||
|
"supported.\n", ret);
|
||||||
|
}
|
||||||
|
|
||||||
|
+ usb_device_autosuspend_enable(udev);
|
||||||
|
+
|
||||||
|
uvc_trace(UVC_TRACE_PROBE, "UVC device initialized.\n");
|
||||||
|
return 0;
|
||||||
|
|
@ -0,0 +1,22 @@
|
|||||||
|
--- vanilla-2.6.31-rc4/drivers/gpu/drm/i915/intel_lvds.c~ 2009-07-31 11:23:05.000000000 -0700
|
||||||
|
+++ vanilla-2.6.31-rc4/drivers/gpu/drm/i915/intel_lvds.c 2009-07-31 11:23:05.000000000 -0700
|
||||||
|
@@ -111,19 +111,12 @@ static void intel_lvds_set_power(struct
|
||||||
|
if (on) {
|
||||||
|
I915_WRITE(ctl_reg, I915_READ(ctl_reg) |
|
||||||
|
POWER_TARGET_ON);
|
||||||
|
- do {
|
||||||
|
- pp_status = I915_READ(status_reg);
|
||||||
|
- } while ((pp_status & PP_ON) == 0);
|
||||||
|
-
|
||||||
|
intel_lvds_set_backlight(dev, dev_priv->backlight_duty_cycle);
|
||||||
|
} else {
|
||||||
|
intel_lvds_set_backlight(dev, 0);
|
||||||
|
|
||||||
|
I915_WRITE(ctl_reg, I915_READ(ctl_reg) &
|
||||||
|
~POWER_TARGET_ON);
|
||||||
|
- do {
|
||||||
|
- pp_status = I915_READ(status_reg);
|
||||||
|
- } while (pp_status & PP_ON);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
58
packages/linux/patches/linux-2.6.29-kms-edid-cache.diff
Normal file
58
packages/linux/patches/linux-2.6.29-kms-edid-cache.diff
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
|
||||||
|
index a51573d..3dcf5cc 100644
|
||||||
|
--- a/drivers/gpu/drm/i915/intel_drv.h
|
||||||
|
+++ b/drivers/gpu/drm/i915/intel_drv.h
|
||||||
|
@@ -102,6 +102,7 @@ struct intel_output {
|
||||||
|
int type;
|
||||||
|
struct i2c_adapter *i2c_bus;
|
||||||
|
struct i2c_adapter *ddc_bus;
|
||||||
|
+ struct edid *edid;
|
||||||
|
bool load_detect_temp;
|
||||||
|
bool needs_tv_clock;
|
||||||
|
void *dev_priv;
|
||||||
|
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
|
||||||
|
index 3118ce2..fa0299e 100644
|
||||||
|
--- a/drivers/gpu/drm/i915/intel_lvds.c
|
||||||
|
+++ b/drivers/gpu/drm/i915/intel_lvds.c
|
||||||
|
@@ -716,6 +716,7 @@ static void intel_lvds_destroy(struct drm_connector *connector)
|
||||||
|
acpi_lid_notifier_unregister(&dev_priv->lid_notifier);
|
||||||
|
drm_sysfs_connector_remove(connector);
|
||||||
|
drm_connector_cleanup(connector);
|
||||||
|
+ kfree(intel_output->edid);
|
||||||
|
kfree(connector);
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1189,5 +1190,6 @@ failed:
|
||||||
|
intel_i2c_destroy(intel_output->ddc_bus);
|
||||||
|
drm_connector_cleanup(connector);
|
||||||
|
drm_encoder_cleanup(encoder);
|
||||||
|
+ kfree(intel_output->edid);
|
||||||
|
kfree(intel_output);
|
||||||
|
}
|
||||||
|
diff --git a/drivers/gpu/drm/i915/intel_modes.c b/drivers/gpu/drm/i915/intel_modes.c
|
||||||
|
index 67e2f46..5ac537f 100644
|
||||||
|
--- a/drivers/gpu/drm/i915/intel_modes.c
|
||||||
|
+++ b/drivers/gpu/drm/i915/intel_modes.c
|
||||||
|
@@ -74,6 +74,10 @@ int intel_ddc_get_modes(struct intel_output *intel_output)
|
||||||
|
int ret = 0;
|
||||||
|
|
||||||
|
intel_i2c_quirk_set(intel_output->base.dev, true);
|
||||||
|
+ if (intel_output->edid && intel_output->type == INTEL_OUTPUT_LVDS) {
|
||||||
|
+ printk(KERN_INFO "Skipping EDID probe due to cached edid\n");
|
||||||
|
+ return ret;
|
||||||
|
+ }
|
||||||
|
edid = drm_get_edid(&intel_output->base, intel_output->ddc_bus);
|
||||||
|
intel_i2c_quirk_set(intel_output->base.dev, false);
|
||||||
|
if (edid) {
|
||||||
|
@@ -81,7 +85,10 @@ int intel_ddc_get_modes(struct intel_output *intel_output)
|
||||||
|
edid);
|
||||||
|
ret = drm_add_edid_modes(&intel_output->base, edid);
|
||||||
|
intel_output->base.display_info.raw_edid = NULL;
|
||||||
|
- kfree(edid);
|
||||||
|
+ if (intel_output->type == INTEL_OUTPUT_LVDS)
|
||||||
|
+ intel_output->edid = edid;
|
||||||
|
+ else
|
||||||
|
+ kfree(edid);
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
118
packages/linux/patches/linux-2.6.29-kms-run-async.diff
Normal file
118
packages/linux/patches/linux-2.6.29-kms-run-async.diff
Normal file
@ -0,0 +1,118 @@
|
|||||||
|
Index: b/drivers/gpu/drm/drm_crtc_helper.c
|
||||||
|
===================================================================
|
||||||
|
--- a/drivers/gpu/drm/drm_crtc_helper.c
|
||||||
|
+++ b/drivers/gpu/drm/drm_crtc_helper.c
|
||||||
|
@@ -29,6 +29,8 @@
|
||||||
|
* Jesse Barnes <jesse.barnes@intel.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
+#include <linux/async.h>
|
||||||
|
+
|
||||||
|
#include "drmP.h"
|
||||||
|
#include "drm_crtc.h"
|
||||||
|
#include "drm_crtc_helper.h"
|
||||||
|
@@ -62,6 +64,8 @@ static void drm_mode_validate_flag(struc
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
+LIST_HEAD(drm_async_list);
|
||||||
|
+
|
||||||
|
/**
|
||||||
|
* drm_helper_probe_connector_modes - get complete set of display modes
|
||||||
|
* @dev: DRM device
|
||||||
|
@@ -916,6 +920,7 @@ bool drm_helper_plugged_event(struct drm
|
||||||
|
/* FIXME: send hotplug event */
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
+
|
||||||
|
/**
|
||||||
|
* drm_initial_config - setup a sane initial connector configuration
|
||||||
|
* @dev: DRM device
|
||||||
|
@@ -953,13 +958,26 @@ bool drm_helper_initial_config(struct dr
|
||||||
|
|
||||||
|
drm_setup_crtcs(dev);
|
||||||
|
|
||||||
|
- /* alert the driver fb layer */
|
||||||
|
dev->mode_config.funcs->fb_changed(dev);
|
||||||
|
-
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL(drm_helper_initial_config);
|
||||||
|
|
||||||
|
+static void drm_helper_initial_config_helper(void *ptr, async_cookie_t cookie)
|
||||||
|
+{
|
||||||
|
+ struct drm_device *dev = ptr;
|
||||||
|
+ drm_helper_initial_config(dev);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+void drm_helper_initial_config_async(struct drm_device *dev)
|
||||||
|
+{
|
||||||
|
+ async_schedule_domain(drm_helper_initial_config_helper,
|
||||||
|
+ dev, &drm_async_list);
|
||||||
|
+}
|
||||||
|
+EXPORT_SYMBOL(drm_helper_initial_config_async);
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+
|
||||||
|
static int drm_helper_choose_encoder_dpms(struct drm_encoder *encoder)
|
||||||
|
{
|
||||||
|
int dpms = DRM_MODE_DPMS_OFF;
|
||||||
|
Index: b/drivers/gpu/drm/drm_drv.c
|
||||||
|
===================================================================
|
||||||
|
--- a/drivers/gpu/drm/drm_drv.c
|
||||||
|
+++ b/drivers/gpu/drm/drm_drv.c
|
||||||
|
@@ -49,6 +49,7 @@
|
||||||
|
#include <linux/debugfs.h>
|
||||||
|
#include "drmP.h"
|
||||||
|
#include "drm_core.h"
|
||||||
|
+#include <linux/async.h>
|
||||||
|
|
||||||
|
|
||||||
|
static int drm_version(struct drm_device *dev, void *data,
|
||||||
|
@@ -290,6 +291,9 @@ void drm_exit(struct drm_driver *driver)
|
||||||
|
struct drm_device *dev, *tmp;
|
||||||
|
DRM_DEBUG("\n");
|
||||||
|
|
||||||
|
+ /* make sure all async DRM operations are finished */
|
||||||
|
+ async_synchronize_full_domain(&drm_async_list);
|
||||||
|
+
|
||||||
|
if (driver->driver_features & DRIVER_MODESET) {
|
||||||
|
pci_unregister_driver(&driver->pci_driver);
|
||||||
|
} else {
|
||||||
|
Index: b/include/drm/drmP.h
|
||||||
|
===================================================================
|
||||||
|
--- a/include/drm/drmP.h
|
||||||
|
+++ b/include/drm/drmP.h
|
||||||
|
@@ -328,6 +328,7 @@ struct drm_vma_entry {
|
||||||
|
pid_t pid;
|
||||||
|
};
|
||||||
|
|
||||||
|
+extern struct list_head drm_async_list;
|
||||||
|
/**
|
||||||
|
* DMA buffer.
|
||||||
|
*/
|
||||||
|
Index: b/include/drm/drm_crtc_helper.h
|
||||||
|
===================================================================
|
||||||
|
--- a/include/drm/drm_crtc_helper.h
|
||||||
|
+++ b/include/drm/drm_crtc_helper.h
|
||||||
|
@@ -92,6 +92,7 @@ extern int drm_helper_probe_single_conne
|
||||||
|
extern void drm_helper_disable_unused_functions(struct drm_device *dev);
|
||||||
|
extern int drm_helper_hotplug_stage_two(struct drm_device *dev);
|
||||||
|
extern bool drm_helper_initial_config(struct drm_device *dev);
|
||||||
|
+extern void drm_helper_initial_config_async(struct drm_device *dev);
|
||||||
|
extern int drm_crtc_helper_set_config(struct drm_mode_set *set);
|
||||||
|
extern bool drm_crtc_helper_set_mode(struct drm_crtc *crtc,
|
||||||
|
struct drm_display_mode *mode,
|
||||||
|
Index: b/drivers/gpu/drm/i915/i915_dma.c
|
||||||
|
===================================================================
|
||||||
|
--- a/drivers/gpu/drm/i915/i915_dma.c
|
||||||
|
+++ b/drivers/gpu/drm/i915/i915_dma.c
|
||||||
|
@@ -1045,7 +1045,7 @@ static int i915_load_modeset_init(struct
|
||||||
|
|
||||||
|
intel_modeset_init(dev);
|
||||||
|
|
||||||
|
- drm_helper_initial_config(dev);
|
||||||
|
+ drm_helper_initial_config_async(dev);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
|
@ -0,0 +1,22 @@
|
|||||||
|
From: Arjan van de Ven <arjan@linux.intel.com>
|
||||||
|
Date: Fri, 23 Jan 2009
|
||||||
|
|
||||||
|
Small fix changing error msg to info msg in acer wmi driver
|
||||||
|
---
|
||||||
|
---
|
||||||
|
drivers/platform/x86/acer-wmi.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
Index: linux-2.6.29/drivers/platform/x86/acer-wmi.c
|
||||||
|
===================================================================
|
||||||
|
--- linux-2.6.29.orig/drivers/platform/x86/acer-wmi.c
|
||||||
|
+++ linux-2.6.29/drivers/platform/x86/acer-wmi.c
|
||||||
|
@@ -1290,7 +1290,7 @@ static int __init acer_wmi_init(void)
|
||||||
|
AMW0_find_mailled();
|
||||||
|
|
||||||
|
if (!interface) {
|
||||||
|
- printk(ACER_ERR "No or unsupported WMI interface, unable to "
|
||||||
|
+ printk(ACER_INFO "No or unsupported WMI interface, unable to "
|
||||||
|
"load\n");
|
||||||
|
return -ENODEV;
|
||||||
|
}
|
96
packages/linux/patches/linux-2.6.29-sreadahead.diff
Normal file
96
packages/linux/patches/linux-2.6.29-sreadahead.diff
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
From 4d690855d6bdc15b753ac3c21bf507ad94d46aac Mon Sep 17 00:00:00 2001
|
||||||
|
From: Arjan van de Ven <arjan@linux.intel.com>
|
||||||
|
Date: Sun, 21 Sep 2008 11:58:27 -0700
|
||||||
|
Subject: [PATCH] superreadahead patch
|
||||||
|
|
||||||
|
---
|
||||||
|
fs/ext3/ioctl.c | 3 +++
|
||||||
|
fs/ext3/super.c | 1 +
|
||||||
|
include/linux/ext3_fs.h | 1 +
|
||||||
|
include/linux/fs.h | 2 ++
|
||||||
|
4 files changed, 7 insertions(+), 0 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/fs/ext3/ioctl.c b/fs/ext3/ioctl.c
|
||||||
|
index 8897481..08f4854 100644
|
||||||
|
--- a/fs/ext3/ioctl.c
|
||||||
|
+++ b/fs/ext3/ioctl.c
|
||||||
|
@@ -276,6 +276,9 @@ group_add_out:
|
||||||
|
mnt_drop_write(filp->f_path.mnt);
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
+ case EXT3_IOC_INODE_JIFFIES: {
|
||||||
|
+ return inode->created_when;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
|
||||||
|
default:
|
||||||
|
diff --git a/fs/ext3/super.c b/fs/ext3/super.c
|
||||||
|
index 524b349..e6e8514 100644
|
||||||
|
--- a/fs/ext3/super.c
|
||||||
|
+++ b/fs/ext3/super.c
|
||||||
|
@@ -466,6 +466,7 @@ static struct inode *ext3_alloc_inode(struct super_block *sb)
|
||||||
|
return NULL;
|
||||||
|
ei->i_block_alloc_info = NULL;
|
||||||
|
ei->vfs_inode.i_version = 1;
|
||||||
|
+ ei->vfs_inode.created_when = jiffies;
|
||||||
|
atomic_set(&ei->i_datasync_tid, 0);
|
||||||
|
atomic_set(&ei->i_sync_tid, 0);
|
||||||
|
return &ei->vfs_inode;
|
||||||
|
diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h
|
||||||
|
index 634a5e5..84d5394 100644
|
||||||
|
--- a/include/linux/ext3_fs.h
|
||||||
|
+++ b/include/linux/ext3_fs.h
|
||||||
|
@@ -250,6 +250,7 @@ struct ext3_new_group_data {
|
||||||
|
#endif
|
||||||
|
#define EXT3_IOC_GETRSVSZ _IOR('f', 5, long)
|
||||||
|
#define EXT3_IOC_SETRSVSZ _IOW('f', 6, long)
|
||||||
|
+#define EXT3_IOC_INODE_JIFFIES _IOR('f', 19, long)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ioctl commands in 32 bit emulation
|
||||||
|
diff --git a/include/linux/fs.h b/include/linux/fs.h
|
||||||
|
index 0872372..078e3fd 100644
|
||||||
|
--- a/include/linux/fs.h
|
||||||
|
+++ b/include/linux/fs.h
|
||||||
|
@@ -781,6 +781,8 @@ struct inode {
|
||||||
|
struct posix_acl *i_default_acl;
|
||||||
|
#endif
|
||||||
|
void *i_private; /* fs or device private pointer */
|
||||||
|
+
|
||||||
|
+ unsigned long created_when; /* jiffies of creation time */
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
--
|
||||||
|
1.6.0.6
|
||||||
|
|
||||||
|
--- vanilla-2.6.32-rc7/fs/btrfs/inode.c~ 2009-11-13 11:15:48.000000000 -0800
|
||||||
|
+++ vanilla-2.6.32-rc7/fs/btrfs/inode.c 2009-11-13 11:15:48.000000000 -0800
|
||||||
|
@@ -5181,6 +5181,7 @@
|
||||||
|
ei->outstanding_extents = 0;
|
||||||
|
ei->reserved_extents = 0;
|
||||||
|
ei->root = NULL;
|
||||||
|
+ ei->vfs_inode.created_when = jiffies;
|
||||||
|
spin_lock_init(&ei->accounting_lock);
|
||||||
|
btrfs_ordered_inode_tree_init(&ei->ordered_tree);
|
||||||
|
INIT_LIST_HEAD(&ei->i_orphan);
|
||||||
|
--- vanilla-2.6.32-rc7/fs/btrfs/ioctl.c~ 2009-11-13 11:16:58.000000000 -0800
|
||||||
|
+++ vanilla-2.6.32-rc7/fs/btrfs/ioctl.c 2009-11-13 11:16:58.000000000 -0800
|
||||||
|
@@ -1298,6 +1298,8 @@
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
+#define EXT3_IOC_INODE_JIFFIES _IOR('f', 19, long)
|
||||||
|
+
|
||||||
|
long btrfs_ioctl(struct file *file, unsigned int
|
||||||
|
cmd, unsigned long arg)
|
||||||
|
{
|
||||||
|
@@ -1337,6 +1338,8 @@
|
||||||
|
case BTRFS_IOC_SYNC:
|
||||||
|
btrfs_sync_fs(file->f_dentry->d_sb, 1);
|
||||||
|
return 0;
|
||||||
|
+ case EXT3_IOC_INODE_JIFFIES:
|
||||||
|
+ return fdentry(file)->d_inode->created_when;
|
||||||
|
}
|
||||||
|
|
||||||
|
return -ENOTTY;
|
11
packages/linux/patches/linux-2.6.30-no-pcspkr-modalias.diff
Normal file
11
packages/linux/patches/linux-2.6.30-no-pcspkr-modalias.diff
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
diff -up linux-2.6.30.noarch/drivers/input/misc/pcspkr.c.jx linux-2.6.30.noarch/drivers/input/misc/pcspkr.c
|
||||||
|
--- linux-2.6.30.noarch/drivers/input/misc/pcspkr.c.jx 2009-07-28 16:54:44.000000000 -0400
|
||||||
|
+++ linux-2.6.30.noarch/drivers/input/misc/pcspkr.c 2009-07-28 16:59:36.000000000 -0400
|
||||||
|
@@ -23,7 +23,6 @@
|
||||||
|
MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>");
|
||||||
|
MODULE_DESCRIPTION("PC Speaker beeper driver");
|
||||||
|
MODULE_LICENSE("GPL");
|
||||||
|
-MODULE_ALIAS("platform:pcspkr");
|
||||||
|
|
||||||
|
#if defined(CONFIG_MIPS) || defined(CONFIG_X86)
|
||||||
|
/* Use the global PIT lock ! */
|
14
packages/linux/patches/linux-2.6.31-silence-wacom.diff
Normal file
14
packages/linux/patches/linux-2.6.31-silence-wacom.diff
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
KERN_ERR is not appropriate for a printk level of a successful operation
|
||||||
|
|
||||||
|
|
||||||
|
--- linux-2.6.30/drivers/hid/hid-wacom.c~ 2009-09-04 10:37:20.000000000 -0700
|
||||||
|
+++ linux-2.6.30/drivers/hid/hid-wacom.c 2009-09-04 10:37:20.000000000 -0700
|
||||||
|
@@ -244,7 +244,7 @@
|
||||||
|
ret = hid_register_driver(&wacom_driver);
|
||||||
|
if (ret)
|
||||||
|
printk(KERN_ERR "can't register wacom driver\n");
|
||||||
|
- printk(KERN_ERR "wacom driver registered\n");
|
||||||
|
+ printk(KERN_INFO "wacom driver registered\n");
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
280
packages/linux/patches/linux-2.6.33-ahci-alpm-accounting.diff
Normal file
280
packages/linux/patches/linux-2.6.33-ahci-alpm-accounting.diff
Normal file
@ -0,0 +1,280 @@
|
|||||||
|
From f62ff8c98080b4a9e66f82f793145b863b4e183a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Arjan van de Ven <arjan@linux.intel.com>
|
||||||
|
Date: Fri, 13 Nov 2009 16:54:37 -0800
|
||||||
|
Subject: [PATCH] libata: Add ALPM power state accounting to the AHCI driver
|
||||||
|
|
||||||
|
PowerTOP wants to be able to show the user how effective the ALPM link
|
||||||
|
power management is for the user. ALPM is worth around 0.5W on a quiet
|
||||||
|
link; PowerTOP wants to be able to find cases where the "quiet link" isn't
|
||||||
|
actually quiet.
|
||||||
|
|
||||||
|
This patch adds state accounting functionality to the AHCI driver for
|
||||||
|
PowerTOP to use.
|
||||||
|
The parts of the patch are
|
||||||
|
1) the sysfs logic of exposing the stats for each state in sysfs
|
||||||
|
2) the basic accounting logic that gets update on link change interrupts
|
||||||
|
(or when the user accesses the info from sysfs)
|
||||||
|
3) a "accounting enable" flag; in order to get the accounting to work,
|
||||||
|
the driver needs to get phyrdy interrupts on link status changes.
|
||||||
|
Normally and currently this is disabled by the driver when ALPM is
|
||||||
|
on (to reduce overhead); when PowerTOP is running this will need
|
||||||
|
to be on to get usable statistics... hence the sysfs tunable.
|
||||||
|
|
||||||
|
The PowerTOP output currently looks like this:
|
||||||
|
|
||||||
|
Recent SATA AHCI link activity statistics
|
||||||
|
Active Partial Slumber Device name
|
||||||
|
0.5% 99.5% 0.0% host0
|
||||||
|
|
||||||
|
(work to resolve "host0" to a more human readable name is in progress)
|
||||||
|
|
||||||
|
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
|
||||||
|
---
|
||||||
|
drivers/ata/ahci.c | 175 +++++++++++++++++++++++++++++++++++++++++++++++++++-
|
||||||
|
1 files changed, 173 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
|
||||||
|
index a3241a1..448d684 100644
|
||||||
|
--- a/drivers/ata/ahci.c
|
||||||
|
+++ b/drivers/ata/ahci.c
|
||||||
|
@@ -72,6 +72,21 @@ MODULE_PARM_DESC(ignore_sss, "Ignore staggered spinup flag (0=don't ignore, 1=ig
|
||||||
|
static int ahci_enable_alpm(struct ata_port *ap,
|
||||||
|
enum link_pm policy);
|
||||||
|
static void ahci_disable_alpm(struct ata_port *ap);
|
||||||
|
+
|
||||||
|
+static ssize_t ahci_alpm_show_active(struct device *dev,
|
||||||
|
+ struct device_attribute *attr, char *buf);
|
||||||
|
+static ssize_t ahci_alpm_show_slumber(struct device *dev,
|
||||||
|
+ struct device_attribute *attr, char *buf);
|
||||||
|
+static ssize_t ahci_alpm_show_partial(struct device *dev,
|
||||||
|
+ struct device_attribute *attr, char *buf);
|
||||||
|
+
|
||||||
|
+static ssize_t ahci_alpm_show_accounting(struct device *dev,
|
||||||
|
+ struct device_attribute *attr, char *buf);
|
||||||
|
+
|
||||||
|
+static ssize_t ahci_alpm_set_accounting(struct device *dev,
|
||||||
|
+ struct device_attribute *attr,
|
||||||
|
+ const char *buf, size_t count);
|
||||||
|
+
|
||||||
|
static ssize_t ahci_led_show(struct ata_port *ap, char *buf);
|
||||||
|
static ssize_t ahci_led_store(struct ata_port *ap, const char *buf,
|
||||||
|
size_t size);
|
||||||
|
@@ -289,6 +304,13 @@ struct ahci_host_priv {
|
||||||
|
u32 em_loc; /* enclosure management location */
|
||||||
|
};
|
||||||
|
|
||||||
|
+enum ahci_port_states {
|
||||||
|
+ AHCI_PORT_NOLINK = 0,
|
||||||
|
+ AHCI_PORT_ACTIVE = 1,
|
||||||
|
+ AHCI_PORT_PARTIAL = 2,
|
||||||
|
+ AHCI_PORT_SLUMBER = 3
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
struct ahci_port_priv {
|
||||||
|
struct ata_link *active_link;
|
||||||
|
struct ahci_cmd_hdr *cmd_slot;
|
||||||
|
@@ -304,6 +326,14 @@ struct ahci_port_priv {
|
||||||
|
u32 intr_mask; /* interrupts to enable */
|
||||||
|
/* enclosure management info per PM slot */
|
||||||
|
struct ahci_em_priv em_priv[EM_MAX_SLOTS];
|
||||||
|
+
|
||||||
|
+ /* ALPM accounting state and stats */
|
||||||
|
+ unsigned int accounting_active:1;
|
||||||
|
+ u64 active_jiffies;
|
||||||
|
+ u64 partial_jiffies;
|
||||||
|
+ u64 slumber_jiffies;
|
||||||
|
+ int previous_state;
|
||||||
|
+ int previous_jiffies;
|
||||||
|
};
|
||||||
|
|
||||||
|
static int ahci_scr_read(struct ata_link *link, unsigned int sc_reg, u32 *val);
|
||||||
|
@@ -359,6 +389,12 @@ DEVICE_ATTR(ahci_host_cap2, S_IRUGO, ahci_show_host_cap2, NULL);
|
||||||
|
DEVICE_ATTR(ahci_host_version, S_IRUGO, ahci_show_host_version, NULL);
|
||||||
|
DEVICE_ATTR(ahci_port_cmd, S_IRUGO, ahci_show_port_cmd, NULL);
|
||||||
|
|
||||||
|
+DEVICE_ATTR(ahci_alpm_active, S_IRUGO, ahci_alpm_show_active, NULL);
|
||||||
|
+DEVICE_ATTR(ahci_alpm_partial, S_IRUGO, ahci_alpm_show_partial, NULL);
|
||||||
|
+DEVICE_ATTR(ahci_alpm_slumber, S_IRUGO, ahci_alpm_show_slumber, NULL);
|
||||||
|
+DEVICE_ATTR(ahci_alpm_accounting, S_IRUGO | S_IWUSR,
|
||||||
|
+ ahci_alpm_show_accounting, ahci_alpm_set_accounting);
|
||||||
|
+
|
||||||
|
static struct device_attribute *ahci_shost_attrs[] = {
|
||||||
|
&dev_attr_link_power_management_policy,
|
||||||
|
&dev_attr_em_message_type,
|
||||||
|
@@ -367,6 +403,10 @@ static struct device_attribute *ahci_shost_attrs[] = {
|
||||||
|
&dev_attr_ahci_host_cap2,
|
||||||
|
&dev_attr_ahci_host_version,
|
||||||
|
&dev_attr_ahci_port_cmd,
|
||||||
|
+ &dev_attr_ahci_alpm_active,
|
||||||
|
+ &dev_attr_ahci_alpm_partial,
|
||||||
|
+ &dev_attr_ahci_alpm_slumber,
|
||||||
|
+ &dev_attr_ahci_alpm_accounting,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
|
@@ -1165,9 +1205,14 @@ static int ahci_enable_alpm(struct ata_port *ap,
|
||||||
|
* getting woken up due to spurious phy ready interrupts
|
||||||
|
* TBD - Hot plug should be done via polling now, is
|
||||||
|
* that even supported?
|
||||||
|
+ *
|
||||||
|
+ * However, when accounting_active is set, we do want
|
||||||
|
+ * the interrupts for accounting purposes.
|
||||||
|
*/
|
||||||
|
- pp->intr_mask &= ~PORT_IRQ_PHYRDY;
|
||||||
|
- writel(pp->intr_mask, port_mmio + PORT_IRQ_MASK);
|
||||||
|
+ if (!pp->accounting_active) {
|
||||||
|
+ pp->intr_mask &= ~PORT_IRQ_PHYRDY;
|
||||||
|
+ writel(pp->intr_mask, port_mmio + PORT_IRQ_MASK);
|
||||||
|
+ }
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Set a flag to indicate that we should ignore all PhyRdy
|
||||||
|
@@ -2157,6 +2202,137 @@ static void ahci_error_intr(struct ata_port *ap, u32 irq_stat)
|
||||||
|
ata_port_abort(ap);
|
||||||
|
}
|
||||||
|
|
||||||
|
+static int get_current_alpm_state(struct ata_port *ap)
|
||||||
|
+{
|
||||||
|
+ u32 status = 0;
|
||||||
|
+
|
||||||
|
+ ahci_scr_read(&ap->link, SCR_STATUS, &status);
|
||||||
|
+
|
||||||
|
+ /* link status is in bits 11-8 */
|
||||||
|
+ status = status >> 8;
|
||||||
|
+ status = status & 0x7;
|
||||||
|
+
|
||||||
|
+ if (status == 6)
|
||||||
|
+ return AHCI_PORT_SLUMBER;
|
||||||
|
+ if (status == 2)
|
||||||
|
+ return AHCI_PORT_PARTIAL;
|
||||||
|
+ if (status == 1)
|
||||||
|
+ return AHCI_PORT_ACTIVE;
|
||||||
|
+ return AHCI_PORT_NOLINK;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static void account_alpm_stats(struct ata_port *ap)
|
||||||
|
+{
|
||||||
|
+ struct ahci_port_priv *pp;
|
||||||
|
+
|
||||||
|
+ int new_state;
|
||||||
|
+ u64 new_jiffies, jiffies_delta;
|
||||||
|
+
|
||||||
|
+ if (ap == NULL)
|
||||||
|
+ return;
|
||||||
|
+ pp = ap->private_data;
|
||||||
|
+
|
||||||
|
+ new_state = get_current_alpm_state(ap);
|
||||||
|
+ new_jiffies = jiffies;
|
||||||
|
+
|
||||||
|
+ jiffies_delta = new_jiffies - pp->previous_jiffies;
|
||||||
|
+
|
||||||
|
+ switch (pp->previous_state) {
|
||||||
|
+ case AHCI_PORT_NOLINK:
|
||||||
|
+ pp->active_jiffies = 0;
|
||||||
|
+ pp->partial_jiffies = 0;
|
||||||
|
+ pp->slumber_jiffies = 0;
|
||||||
|
+ break;
|
||||||
|
+ case AHCI_PORT_ACTIVE:
|
||||||
|
+ pp->active_jiffies += jiffies_delta;
|
||||||
|
+ break;
|
||||||
|
+ case AHCI_PORT_PARTIAL:
|
||||||
|
+ pp->partial_jiffies += jiffies_delta;
|
||||||
|
+ break;
|
||||||
|
+ case AHCI_PORT_SLUMBER:
|
||||||
|
+ pp->slumber_jiffies += jiffies_delta;
|
||||||
|
+ break;
|
||||||
|
+ default:
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+ pp->previous_state = new_state;
|
||||||
|
+ pp->previous_jiffies = new_jiffies;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static ssize_t ahci_alpm_show_active(struct device *dev,
|
||||||
|
+ struct device_attribute *attr, char *buf)
|
||||||
|
+{
|
||||||
|
+ struct Scsi_Host *shost = class_to_shost(dev);
|
||||||
|
+ struct ata_port *ap = ata_shost_to_port(shost);
|
||||||
|
+ struct ahci_port_priv *pp = ap->private_data;
|
||||||
|
+
|
||||||
|
+ account_alpm_stats(ap);
|
||||||
|
+
|
||||||
|
+ return sprintf(buf, "%u\n", jiffies_to_msecs(pp->active_jiffies));
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static ssize_t ahci_alpm_show_partial(struct device *dev,
|
||||||
|
+ struct device_attribute *attr, char *buf)
|
||||||
|
+{
|
||||||
|
+ struct Scsi_Host *shost = class_to_shost(dev);
|
||||||
|
+ struct ata_port *ap = ata_shost_to_port(shost);
|
||||||
|
+ struct ahci_port_priv *pp = ap->private_data;
|
||||||
|
+
|
||||||
|
+ account_alpm_stats(ap);
|
||||||
|
+
|
||||||
|
+ return sprintf(buf, "%u\n", jiffies_to_msecs(pp->partial_jiffies));
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static ssize_t ahci_alpm_show_slumber(struct device *dev,
|
||||||
|
+ struct device_attribute *attr, char *buf)
|
||||||
|
+{
|
||||||
|
+ struct Scsi_Host *shost = class_to_shost(dev);
|
||||||
|
+ struct ata_port *ap = ata_shost_to_port(shost);
|
||||||
|
+ struct ahci_port_priv *pp = ap->private_data;
|
||||||
|
+
|
||||||
|
+ account_alpm_stats(ap);
|
||||||
|
+
|
||||||
|
+ return sprintf(buf, "%u\n", jiffies_to_msecs(pp->slumber_jiffies));
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+static ssize_t ahci_alpm_show_accounting(struct device *dev,
|
||||||
|
+ struct device_attribute *attr, char *buf)
|
||||||
|
+{
|
||||||
|
+ struct Scsi_Host *shost = class_to_shost(dev);
|
||||||
|
+ struct ata_port *ap = ata_shost_to_port(shost);
|
||||||
|
+ struct ahci_port_priv *pp = ap->private_data;
|
||||||
|
+
|
||||||
|
+ return sprintf(buf, "%u\n", pp->accounting_active);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static ssize_t ahci_alpm_set_accounting(struct device *dev,
|
||||||
|
+ struct device_attribute *attr,
|
||||||
|
+ const char *buf, size_t count)
|
||||||
|
+{
|
||||||
|
+ unsigned long flags;
|
||||||
|
+ struct Scsi_Host *shost = class_to_shost(dev);
|
||||||
|
+ struct ata_port *ap = ata_shost_to_port(shost);
|
||||||
|
+ struct ahci_port_priv *pp = ap->private_data;
|
||||||
|
+ void __iomem *port_mmio = ahci_port_base(ap);
|
||||||
|
+
|
||||||
|
+ if (!pp)
|
||||||
|
+ return 1;
|
||||||
|
+ if (buf[0] == '0')
|
||||||
|
+ pp->accounting_active = 0;
|
||||||
|
+ if (buf[0] == '1')
|
||||||
|
+ pp->accounting_active = 1;
|
||||||
|
+
|
||||||
|
+ /* we need to enable the PHYRDY interrupt when we want accounting */
|
||||||
|
+ if (pp->accounting_active) {
|
||||||
|
+ spin_lock_irqsave(ap->lock, flags);
|
||||||
|
+ pp->intr_mask |= PORT_IRQ_PHYRDY;
|
||||||
|
+ writel(pp->intr_mask, port_mmio + PORT_IRQ_MASK);
|
||||||
|
+ spin_unlock_irqrestore(ap->lock, flags);
|
||||||
|
+ }
|
||||||
|
+ return count;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
static void ahci_port_intr(struct ata_port *ap)
|
||||||
|
{
|
||||||
|
void __iomem *port_mmio = ahci_port_base(ap);
|
||||||
|
@@ -2182,6 +2352,7 @@ static void ahci_port_intr(struct ata_port *ap)
|
||||||
|
if ((hpriv->flags & AHCI_HFLAG_NO_HOTPLUG) &&
|
||||||
|
(status & PORT_IRQ_PHYRDY)) {
|
||||||
|
status &= ~PORT_IRQ_PHYRDY;
|
||||||
|
+ account_alpm_stats(ap);
|
||||||
|
ahci_scr_write(&ap->link, SCR_ERROR, ((1 << 16) | (1 << 18)));
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
1.6.0.6
|
||||||
|
|
@ -0,0 +1,93 @@
|
|||||||
|
From 7373cc1452c551f7c3ef7523483d76d2dd16373e Mon Sep 17 00:00:00 2001
|
||||||
|
From: Li Peng <peng.li@intel.com>
|
||||||
|
Date: Tue, 19 Jan 2010 02:13:00 -0500
|
||||||
|
Subject: drm/i915: enable memory self refresh on 9xx
|
||||||
|
|
||||||
|
Enabling memory self refresh (SR) on 9xx needs to set additional
|
||||||
|
register bits. On 945, we need bit 31 of FW_BLC_SELF to enable the
|
||||||
|
write to self refresh bit and bit 16 to enable the write of self
|
||||||
|
refresh watermark. On 915, bit 12 of INSTPM is used to enable SR.
|
||||||
|
|
||||||
|
SR will take effect when CPU enters C3+ state and its entry/exit
|
||||||
|
should be automatically controlled by H/W, driver only needs to set
|
||||||
|
SR enable bits in wm update. But this isn't safe in my test on 945
|
||||||
|
because GPU is hung. So this patch explicitly enables SR when GPU
|
||||||
|
is idle, and disables SR when it is busy. In my test on a netbook of
|
||||||
|
945GSE chipset, it saves about 0.8W idle power.
|
||||||
|
|
||||||
|
Signed-off-by: Li Peng <peng.li@intel.com>
|
||||||
|
---
|
||||||
|
drivers/gpu/drm/i915/i915_reg.h | 5 ++++-
|
||||||
|
drivers/gpu/drm/i915/intel_display.c | 22 +++++++++++++++++++++-
|
||||||
|
2 files changed, 25 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
|
||||||
|
index 847006c..3921e5a 100644
|
||||||
|
--- a/drivers/gpu/drm/i915/i915_reg.h
|
||||||
|
+++ b/drivers/gpu/drm/i915/i915_reg.h
|
||||||
|
@@ -306,11 +306,14 @@
|
||||||
|
#define I915_ERROR_MEMORY_REFRESH (1<<1)
|
||||||
|
#define I915_ERROR_INSTRUCTION (1<<0)
|
||||||
|
#define INSTPM 0x020c0
|
||||||
|
+#define INSTPM_SELF_EN (1<<12) /* 915GM only */
|
||||||
|
#define ACTHD 0x020c8
|
||||||
|
#define FW_BLC 0x020d8
|
||||||
|
#define FW_BLC2 0x020dc
|
||||||
|
#define FW_BLC_SELF 0x020e0 /* 915+ only */
|
||||||
|
-#define FW_BLC_SELF_EN (1<<15)
|
||||||
|
+#define FW_BLC_SELF_EN_MASK (1<<31)
|
||||||
|
+#define FW_BLC_SELF_FIFO_MASK (1<<16) /* 945 only */
|
||||||
|
+#define FW_BLC_SELF_EN (1<<15) /* 945 only */
|
||||||
|
#define MM_BURST_LENGTH 0x00700000
|
||||||
|
#define MM_FIFO_WATERMARK 0x0001F000
|
||||||
|
#define LM_BURST_LENGTH 0x00000700
|
||||||
|
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
|
||||||
|
index 45da78e..d042955 100644
|
||||||
|
--- a/drivers/gpu/drm/i915/intel_display.c
|
||||||
|
+++ b/drivers/gpu/drm/i915/intel_display.c
|
||||||
|
@@ -2629,7 +2629,13 @@ static void i9xx_update_wm(struct drm_device *dev, int planea_clock,
|
||||||
|
srwm = total_size - sr_entries;
|
||||||
|
if (srwm < 0)
|
||||||
|
srwm = 1;
|
||||||
|
- I915_WRITE(FW_BLC_SELF, FW_BLC_SELF_EN | (srwm & 0x3f));
|
||||||
|
+ if (IS_I945G(dev) || IS_I945GM(dev))
|
||||||
|
+ I915_WRITE(FW_BLC_SELF, FW_BLC_SELF_FIFO_MASK | (srwm & 0xff));
|
||||||
|
+ else if (IS_I915GM(dev)) {
|
||||||
|
+ /* 915M has a smaller SRWM field */
|
||||||
|
+ I915_WRITE(FW_BLC_SELF, srwm & 0x3f);
|
||||||
|
+ I915_WRITE(INSTPM, I915_READ(INSTPM) | INSTPM_SELF_EN);
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
DRM_DEBUG_KMS("Setting FIFO watermarks - A: %d, B: %d, C: %d, SR %d\n",
|
||||||
|
@@ -3879,6 +3885,11 @@ static void intel_idle_update(struct work_struct *work)
|
||||||
|
|
||||||
|
mutex_lock(&dev->struct_mutex);
|
||||||
|
|
||||||
|
+ if (IS_I945G(dev) || IS_I945GM(dev)) {
|
||||||
|
+ DRM_DEBUG_DRIVER("enable memory self refresh on 945\n");
|
||||||
|
+ I915_WRITE(FW_BLC_SELF, FW_BLC_SELF_EN_MASK | FW_BLC_SELF_EN);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
|
||||||
|
/* Skip inactive CRTCs */
|
||||||
|
if (!crtc->fb)
|
||||||
|
@@ -3912,6 +3923,15 @@ void intel_mark_busy(struct drm_device *dev, struct drm_gem_object *obj)
|
||||||
|
if (!drm_core_check_feature(dev, DRIVER_MODESET))
|
||||||
|
return;
|
||||||
|
|
||||||
|
+ if (IS_I945G(dev) || IS_I945GM(dev)) {
|
||||||
|
+ u32 fw_blc_self;
|
||||||
|
+
|
||||||
|
+ DRM_DEBUG_DRIVER("disable memory self refresh on 945\n");
|
||||||
|
+ fw_blc_self = I915_READ(FW_BLC_SELF);
|
||||||
|
+ fw_blc_self &= ~FW_BLC_SELF_EN;
|
||||||
|
+ I915_WRITE(FW_BLC_SELF, fw_blc_self | FW_BLC_SELF_EN_MASK);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
if (!dev_priv->busy)
|
||||||
|
dev_priv->busy = true;
|
||||||
|
else
|
||||||
|
--
|
||||||
|
1.6.1.3
|
||||||
|
|
@ -0,0 +1,95 @@
|
|||||||
|
From d9bd8741f35be8bdb11e4ff8ac513375188dcc2c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Li Peng <peng.li@intel.com>
|
||||||
|
Date: Fri, 22 Jan 2010 20:59:59 +0800
|
||||||
|
Subject: drm/i915: enable vblank interrupt on ironlake
|
||||||
|
|
||||||
|
so far vblank interrupt on ironlake is disabled, this would cause
|
||||||
|
bad gfx performance if userspace calls drm_wait_vblank. This patch
|
||||||
|
enables vblank interrupt on ironlake and follows vblank get/put
|
||||||
|
model.
|
||||||
|
|
||||||
|
Signed-off-by: Li Peng <peng.li@intel.com>
|
||||||
|
---
|
||||||
|
drivers/gpu/drm/i915/i915_irq.c | 30 +++++++++++++++++++-----------
|
||||||
|
drivers/gpu/drm/i915/intel_display.c | 1 +
|
||||||
|
2 files changed, 20 insertions(+), 11 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
|
||||||
|
index 89a071a..e7472d8 100644
|
||||||
|
--- a/drivers/gpu/drm/i915/i915_irq.c
|
||||||
|
+++ b/drivers/gpu/drm/i915/i915_irq.c
|
||||||
|
@@ -309,6 +309,12 @@ irqreturn_t ironlake_irq_handler(struct drm_device *dev)
|
||||||
|
if (de_iir & DE_GSE)
|
||||||
|
ironlake_opregion_gse_intr(dev);
|
||||||
|
|
||||||
|
+ if (de_iir & DE_PIPEA_VBLANK)
|
||||||
|
+ drm_handle_vblank(dev, 0);
|
||||||
|
+
|
||||||
|
+ if (de_iir & DE_PIPEB_VBLANK)
|
||||||
|
+ drm_handle_vblank(dev, 1);
|
||||||
|
+
|
||||||
|
/* check event from PCH */
|
||||||
|
if ((de_iir & DE_PCH_EVENT) &&
|
||||||
|
(pch_iir & SDE_HOTPLUG_MASK)) {
|
||||||
|
@@ -844,11 +850,11 @@ int i915_enable_vblank(struct drm_device *dev, int pipe)
|
||||||
|
if (!(pipeconf & PIPEACONF_ENABLE))
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
|
- if (IS_IRONLAKE(dev))
|
||||||
|
- return 0;
|
||||||
|
-
|
||||||
|
spin_lock_irqsave(&dev_priv->user_irq_lock, irqflags);
|
||||||
|
- if (IS_I965G(dev))
|
||||||
|
+ if (IS_IRONLAKE(dev))
|
||||||
|
+ ironlake_enable_display_irq(dev_priv, (pipe == 0) ?
|
||||||
|
+ DE_PIPEA_VBLANK: DE_PIPEB_VBLANK);
|
||||||
|
+ else if (IS_I965G(dev))
|
||||||
|
i915_enable_pipestat(dev_priv, pipe,
|
||||||
|
PIPE_START_VBLANK_INTERRUPT_ENABLE);
|
||||||
|
else
|
||||||
|
@@ -866,13 +872,14 @@ void i915_disable_vblank(struct drm_device *dev, int pipe)
|
||||||
|
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
|
||||||
|
unsigned long irqflags;
|
||||||
|
|
||||||
|
- if (IS_IRONLAKE(dev))
|
||||||
|
- return;
|
||||||
|
-
|
||||||
|
spin_lock_irqsave(&dev_priv->user_irq_lock, irqflags);
|
||||||
|
- i915_disable_pipestat(dev_priv, pipe,
|
||||||
|
- PIPE_VBLANK_INTERRUPT_ENABLE |
|
||||||
|
- PIPE_START_VBLANK_INTERRUPT_ENABLE);
|
||||||
|
+ if (IS_IRONLAKE(dev))
|
||||||
|
+ ironlake_disable_display_irq(dev_priv, (pipe == 0) ?
|
||||||
|
+ DE_PIPEA_VBLANK: DE_PIPEB_VBLANK);
|
||||||
|
+ else
|
||||||
|
+ i915_disable_pipestat(dev_priv, pipe,
|
||||||
|
+ PIPE_VBLANK_INTERRUPT_ENABLE |
|
||||||
|
+ PIPE_START_VBLANK_INTERRUPT_ENABLE);
|
||||||
|
spin_unlock_irqrestore(&dev_priv->user_irq_lock, irqflags);
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1015,7 +1022,8 @@ static int ironlake_irq_postinstall(struct drm_device *dev)
|
||||||
|
{
|
||||||
|
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
|
||||||
|
/* enable kind of interrupts always enabled */
|
||||||
|
- u32 display_mask = DE_MASTER_IRQ_CONTROL | DE_GSE | DE_PCH_EVENT;
|
||||||
|
+ u32 display_mask = DE_MASTER_IRQ_CONTROL | DE_GSE | DE_PCH_EVENT |
|
||||||
|
+ DE_PIPEA_VBLANK | DE_PIPEB_VBLANK;
|
||||||
|
u32 render_mask = GT_USER_INTERRUPT;
|
||||||
|
u32 hotplug_mask = SDE_CRT_HOTPLUG | SDE_PORTB_HOTPLUG |
|
||||||
|
SDE_PORTC_HOTPLUG | SDE_PORTD_HOTPLUG;
|
||||||
|
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
|
||||||
|
index 45da78e..2cc489b 100644
|
||||||
|
--- a/drivers/gpu/drm/i915/intel_display.c
|
||||||
|
+++ b/drivers/gpu/drm/i915/intel_display.c
|
||||||
|
@@ -1638,6 +1638,7 @@ static void ironlake_crtc_dpms(struct drm_crtc *crtc, int mode)
|
||||||
|
case DRM_MODE_DPMS_OFF:
|
||||||
|
DRM_DEBUG_KMS("crtc %d dpms off\n", pipe);
|
||||||
|
|
||||||
|
+ drm_vblank_off(dev, pipe);
|
||||||
|
/* Disable display plane */
|
||||||
|
temp = I915_READ(dspcntr_reg);
|
||||||
|
if ((temp & DISPLAY_PLANE_ENABLE) != 0) {
|
||||||
|
--
|
||||||
|
1.6.6
|
||||||
|
|
@ -0,0 +1,29 @@
|
|||||||
|
From 349ff4274278d4fd4abd47c638e048f679ea1ca4 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Li Peng <peng.li@intel.com>
|
||||||
|
Date: Thu, 21 Jan 2010 18:09:13 +0800
|
||||||
|
Subject: drm/i915: Fix the device info of Pineview
|
||||||
|
|
||||||
|
Pineview doesn't has CXSR and need GTT-based hardware status page.
|
||||||
|
It fixes a X boot hung issue on Pinview since commit cfdf1f
|
||||||
|
|
||||||
|
Signed-off-by: Li Peng <peng.li@intel.com>
|
||||||
|
---
|
||||||
|
drivers/gpu/drm/i915/i915_drv.c | 2 +-
|
||||||
|
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
|
||||||
|
index 46d8896..ecac882 100644
|
||||||
|
--- a/drivers/gpu/drm/i915/i915_drv.c
|
||||||
|
+++ b/drivers/gpu/drm/i915/i915_drv.c
|
||||||
|
@@ -120,7 +120,7 @@ const static struct intel_device_info intel_gm45_info = {
|
||||||
|
|
||||||
|
const static struct intel_device_info intel_pineview_info = {
|
||||||
|
.is_g33 = 1, .is_pineview = 1, .is_mobile = 1, .is_i9xx = 1,
|
||||||
|
- .has_pipe_cxsr = 1,
|
||||||
|
+ .need_gfx_hws = 1,
|
||||||
|
.has_hotplug = 1,
|
||||||
|
};
|
||||||
|
|
||||||
|
--
|
||||||
|
1.6.6
|
||||||
|
|
48
packages/linux/patches/linux-2.6.33-rt2860-1-2.diff
Normal file
48
packages/linux/patches/linux-2.6.33-rt2860-1-2.diff
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
|
||||||
|
We should only send SIOCGIWAP event to notify wpa_supplicant about a lost
|
||||||
|
link, not to tell it about our disassociation being done. If we send such
|
||||||
|
event in both cases, this driver will drag wpa_supplicant into an infinite
|
||||||
|
loop.
|
||||||
|
|
||||||
|
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|
||||||
|
---
|
||||||
|
drivers/staging/rt2860/sta/assoc.c | 6 ++++--
|
||||||
|
drivers/staging/rt2860/sta_ioctl.c | 6 ++++++
|
||||||
|
2 files changed, 10 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
--
|
||||||
|
Index: b/drivers/staging/rt2860/sta/assoc.c
|
||||||
|
===================================================================
|
||||||
|
--- a/drivers/staging/rt2860/sta/assoc.c 2010-01-05 11:25:22.000000000 +0100
|
||||||
|
+++ b/drivers/staging/rt2860/sta/assoc.c 2010-01-05 18:09:34.000000000 +0100
|
||||||
|
@@ -818,10 +818,11 @@ void MlmeDisassocReqAction(struct rt_rtm
|
||||||
|
COPY_MAC_ADDR(pAd->StaCfg.DisassocSta, pDisassocReq->Addr);
|
||||||
|
|
||||||
|
RTMPSetTimer(&pAd->MlmeAux.DisassocTimer, Timeout); /* in mSec */
|
||||||
|
- pAd->Mlme.AssocMachine.CurrState = DISASSOC_WAIT_RSP;
|
||||||
|
|
||||||
|
- RtmpOSWrielessEventSend(pAd, SIOCGIWAP, -1, NULL, NULL, 0);
|
||||||
|
+ pAd->Mlme.AssocMachine.CurrState = DISASSOC_WAIT_RSP;
|
||||||
|
|
||||||
|
+ if (INFRA_ON(pAd) || ADHOC_ON(pAd))
|
||||||
|
+ RtmpOSWrielessEventSend(pAd, SIOCGIWAP, -1, NULL, NULL, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Index: b/drivers/staging/rt2860/sta_ioctl.c
|
||||||
|
===================================================================
|
||||||
|
--- a/drivers/staging/rt2860/sta_ioctl.c 2010-01-05 11:25:22.000000000 +0100
|
||||||
|
+++ b/drivers/staging/rt2860/sta_ioctl.c 2010-01-05 12:55:16.000000000 +0100
|
||||||
|
@@ -602,6 +602,12 @@ int rt_ioctl_siwap(struct net_device *de
|
||||||
|
DBGPRINT(RT_DEBUG_TRACE,
|
||||||
|
("MLME busy, reset MLME state machine!\n"));
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ /* No need to set our BSSID if it's not changing */
|
||||||
|
+ if (!memcmp(pAdapter->CommonCfg.Bssid, ap_addr->sa_data, ETH_ALEN) ||
|
||||||
|
+ !memcmp(pAdapter->MlmeAux.Bssid, ap_addr->sa_data, ETH_ALEN))
|
||||||
|
+ return 0;
|
||||||
|
+
|
||||||
|
/* tell CNTL state machine to call NdisMSetInformationComplete() after completing */
|
||||||
|
/* this request, because this request is initiated by NDIS. */
|
||||||
|
pAdapter->MlmeAux.CurrReqIsFromNdis = FALSE;
|
24
packages/linux/patches/linux-2.6.33-rt2860-2-2.diff
Normal file
24
packages/linux/patches/linux-2.6.33-rt2860-2-2.diff
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
|
||||||
|
When no SSID is set, the reconnect decision should entirely be left to
|
||||||
|
userspace. The driver should not decide which AP to associate with based on
|
||||||
|
arbitrary policies.
|
||||||
|
|
||||||
|
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|
||||||
|
---
|
||||||
|
drivers/staging/rt2860/common/mlme.c | 3 ++-
|
||||||
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
Index: b/drivers/staging/rt2860/common/mlme.c
|
||||||
|
===================================================================
|
||||||
|
--- a/drivers/staging/rt2860/common/mlme.c 2010-01-05 11:25:22.000000000 +0100
|
||||||
|
+++ b/drivers/staging/rt2860/common/mlme.c 2010-01-05 13:10:32.000000000 +0100
|
||||||
|
@@ -1554,7 +1554,8 @@ void MlmeAutoReconnectLastSSID(struct rt
|
||||||
|
else if ((pAd->Mlme.CntlMachine.CurrState == CNTL_IDLE) &&
|
||||||
|
(MlmeValidateSSID
|
||||||
|
(pAd->MlmeAux.AutoReconnectSsid,
|
||||||
|
- pAd->MlmeAux.AutoReconnectSsidLen) == TRUE)) {
|
||||||
|
+ pAd->MlmeAux.AutoReconnectSsidLen) == TRUE) &&
|
||||||
|
+ (pAd->MlmeAux.AutoReconnectSsidLen != 0)) {
|
||||||
|
struct rt_ndis_802_11_ssid OidSsid;
|
||||||
|
OidSsid.SsidLength = pAd->MlmeAux.AutoReconnectSsidLen;
|
||||||
|
NdisMoveMemory(OidSsid.Ssid, pAd->MlmeAux.AutoReconnectSsid,
|
120
packages/linux/patches/linux-2.6.33-vfs-tracepoints.diff
Normal file
120
packages/linux/patches/linux-2.6.33-vfs-tracepoints.diff
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
From f56c995174cf42d84fdad06beebacd56e700b05d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Arjan van de Ven <arjan@linux.intel.com>
|
||||||
|
Date: Sun, 25 Oct 2009 15:37:04 -0700
|
||||||
|
Subject: [PATCH] vfs: Add a trace point in the mark_inode_dirty function
|
||||||
|
|
||||||
|
PowerTOP would like to be able to show who is keeping the disk
|
||||||
|
busy by dirtying data. The most logical spot for this is in the vfs
|
||||||
|
in the mark_inode_dirty() function, doing this on the block level
|
||||||
|
is not possible because by the time the IO hits the block layer the
|
||||||
|
guilty party can no longer be found ("kjournald" and "pdflush" are not
|
||||||
|
useful answers to "who caused this file to be dirty).
|
||||||
|
|
||||||
|
The trace point follows the same logic/style as the block_dump code
|
||||||
|
and pretty much dumps the same data, just not to dmesg (and thus to
|
||||||
|
/var/log/messages) but via the trace events streams.
|
||||||
|
|
||||||
|
Signed-of-by: Arjan van de Ven <arjan@linux.intel.com>
|
||||||
|
---
|
||||||
|
fs/fs-writeback.c | 4 +++
|
||||||
|
fs/inode.c | 4 +++
|
||||||
|
include/trace/events/vfs.h | 53 ++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
3 files changed, 61 insertions(+), 0 deletions(-)
|
||||||
|
create mode 100644 include/trace/events/vfs.h
|
||||||
|
|
||||||
|
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
|
||||||
|
index 9d5360c..af31caf 100644
|
||||||
|
--- a/fs/fs-writeback.c
|
||||||
|
+++ b/fs/fs-writeback.c
|
||||||
|
@@ -25,6 +25,7 @@
|
||||||
|
#include <linux/blkdev.h>
|
||||||
|
#include <linux/backing-dev.h>
|
||||||
|
#include <linux/buffer_head.h>
|
||||||
|
+#include <trace/events/vfs.h>
|
||||||
|
#include "internal.h"
|
||||||
|
|
||||||
|
#define inode_to_bdi(inode) ((inode)->i_mapping->backing_dev_info)
|
||||||
|
@@ -1061,6 +1062,9 @@ void __mark_inode_dirty(struct inode *inode, int flags)
|
||||||
|
sb->s_op->dirty_inode(inode);
|
||||||
|
}
|
||||||
|
|
||||||
|
+ if (flags & (I_DIRTY_SYNC | I_DIRTY_DATASYNC | I_DIRTY_PAGES))
|
||||||
|
+ trace_dirty_inode(inode, current);
|
||||||
|
+
|
||||||
|
/*
|
||||||
|
* make sure that changes are seen by all cpus before we test i_state
|
||||||
|
* -- mikulas
|
||||||
|
diff --git a/fs/inode.c b/fs/inode.c
|
||||||
|
index 4d8e3be..a61e8ba 100644
|
||||||
|
--- a/fs/inode.c
|
||||||
|
+++ b/fs/inode.c
|
||||||
|
@@ -1624,3 +1624,7 @@ void init_special_inode(struct inode *inode, umode_t mode, dev_t rdev)
|
||||||
|
inode->i_ino);
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL(init_special_inode);
|
||||||
|
+
|
||||||
|
+#define CREATE_TRACE_POINTS
|
||||||
|
+#include <trace/events/vfs.h>
|
||||||
|
+
|
||||||
|
diff --git a/include/trace/events/vfs.h b/include/trace/events/vfs.h
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..21cf9fb
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/include/trace/events/vfs.h
|
||||||
|
@@ -0,0 +1,53 @@
|
||||||
|
+#undef TRACE_SYSTEM
|
||||||
|
+#define TRACE_SYSTEM vfs
|
||||||
|
+
|
||||||
|
+#if !defined(_TRACE_VFS_H) || defined(TRACE_HEADER_MULTI_READ)
|
||||||
|
+#define _TRACE_VFS_H
|
||||||
|
+
|
||||||
|
+/*
|
||||||
|
+ * Tracepoint for dirtying an inode:
|
||||||
|
+ */
|
||||||
|
+TRACE_EVENT(dirty_inode,
|
||||||
|
+
|
||||||
|
+ TP_PROTO(struct inode *inode, struct task_struct *task),
|
||||||
|
+
|
||||||
|
+ TP_ARGS(inode, task),
|
||||||
|
+
|
||||||
|
+ TP_STRUCT__entry(
|
||||||
|
+ __array( char, comm, TASK_COMM_LEN )
|
||||||
|
+ __field( pid_t, pid )
|
||||||
|
+ __array( char, dev, 16 )
|
||||||
|
+ __array( char, file, 32 )
|
||||||
|
+ ),
|
||||||
|
+
|
||||||
|
+ TP_fast_assign(
|
||||||
|
+ if (inode->i_ino || strcmp(inode->i_sb->s_id, "bdev")) {
|
||||||
|
+ struct dentry *dentry;
|
||||||
|
+ const char *name = "?";
|
||||||
|
+
|
||||||
|
+ dentry = d_find_alias(inode);
|
||||||
|
+ if (dentry) {
|
||||||
|
+ spin_lock(&dentry->d_lock);
|
||||||
|
+ name = (const char *) dentry->d_name.name;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ memcpy(__entry->comm, task->comm, TASK_COMM_LEN);
|
||||||
|
+ __entry->pid = task->pid;
|
||||||
|
+ strlcpy(__entry->file, name, 32);
|
||||||
|
+ strlcpy(__entry->dev, inode->i_sb->s_id, 16);
|
||||||
|
+
|
||||||
|
+ if (dentry) {
|
||||||
|
+ spin_unlock(&dentry->d_lock);
|
||||||
|
+ dput(dentry);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ ),
|
||||||
|
+
|
||||||
|
+ TP_printk("task=%i (%s) file=%s dev=%s",
|
||||||
|
+ __entry->pid, __entry->comm, __entry->file, __entry->dev)
|
||||||
|
+);
|
||||||
|
+
|
||||||
|
+#endif /* _TRACE_VFS_H */
|
||||||
|
+
|
||||||
|
+/* This part must be outside protection */
|
||||||
|
+#include <trace/define_trace.h>
|
||||||
|
--
|
||||||
|
1.6.0.6
|
||||||
|
|
52
packages/linux/patches/rtl8192_carrier_off.diff
Normal file
52
packages/linux/patches/rtl8192_carrier_off.diff
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
Toggling the link carrier is a non sense and is the grossest locking I can
|
||||||
|
think of. Moreover, it's giving a completely inaccurate status to userspace
|
||||||
|
who could for example decide to turn the interface down on carrier off
|
||||||
|
detection.
|
||||||
|
|
||||||
|
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|
||||||
|
---
|
||||||
|
drivers/staging/rtl8192e/ieee80211/ieee80211_softmac_wx.c | 2 --
|
||||||
|
drivers/staging/rtl8192e/r8192E_core.c | 1 -
|
||||||
|
2 files changed, 3 deletions(-)
|
||||||
|
|
||||||
|
Index: b/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac_wx.c
|
||||||
|
===================================================================
|
||||||
|
--- a/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac_wx.c 2010-01-15 19:31:39.000000000 +0100
|
||||||
|
+++ b/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac_wx.c 2010-01-15 19:32:07.000000000 +0100
|
||||||
|
@@ -326,7 +326,6 @@ void ieee80211_wx_sync_scan_wq(struct ie
|
||||||
|
int b40M = 0;
|
||||||
|
static int count = 0;
|
||||||
|
chan = ieee->current_network.channel;
|
||||||
|
- netif_carrier_off(ieee->dev);
|
||||||
|
|
||||||
|
if (ieee->data_hard_stop)
|
||||||
|
ieee->data_hard_stop(ieee->dev);
|
||||||
|
@@ -372,7 +371,6 @@ void ieee80211_wx_sync_scan_wq(struct ie
|
||||||
|
if(ieee->iw_mode == IW_MODE_ADHOC || ieee->iw_mode == IW_MODE_MASTER)
|
||||||
|
ieee80211_start_send_beacons(ieee);
|
||||||
|
|
||||||
|
- netif_carrier_on(ieee->dev);
|
||||||
|
count = 0;
|
||||||
|
up(&ieee->wx_sem);
|
||||||
|
|
||||||
|
Index: b/drivers/staging/rtl8192e/r8192E_core.c
|
||||||
|
===================================================================
|
||||||
|
--- a/drivers/staging/rtl8192e/r8192E_core.c 2010-01-15 20:03:06.000000000 +0100
|
||||||
|
+++ b/drivers/staging/rtl8192e/r8192E_core.c 2010-01-15 20:03:11.000000000 +0100
|
||||||
|
@@ -4046,7 +4046,6 @@ RESET_START:
|
||||||
|
del_timer_sync(&ieee->associate_timer);
|
||||||
|
cancel_delayed_work(&ieee->associate_retry_wq);
|
||||||
|
ieee80211_stop_scan(ieee);
|
||||||
|
- netif_carrier_off(dev);
|
||||||
|
up(&ieee->wx_sem);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
|
||||||
|
--
|
||||||
|
Intel Open Source Technology Centre
|
||||||
|
http://oss.intel.com/
|
||||||
|
_______________________________________________
|
||||||
|
Moblin-kernel mailing list
|
||||||
|
Moblin-kernel@linux.intel.com
|
||||||
|
http://linux.intel.com/mailman/listinfo/moblin-kernel
|
||||||
|
|
40
packages/linux/patches/rtl8192_no_WAP_unassoc.diff
Normal file
40
packages/linux/patches/rtl8192_no_WAP_unassoc.diff
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
If we're not associated, we should not send wireless events to let userspace
|
||||||
|
know that we just left an ESSID, simply because we havent yet joined it.
|
||||||
|
If we keep on doing that, wpa_supplicant could receive such events while
|
||||||
|
actually trying to join an ESSID, and thus decide to stop trying. This leads
|
||||||
|
to a lot of connection failures as this driver seems to be sending GIWAP
|
||||||
|
events quite a lot.
|
||||||
|
|
||||||
|
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|
||||||
|
---
|
||||||
|
drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c | 5 +++--
|
||||||
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
Index: b/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c
|
||||||
|
===================================================================
|
||||||
|
--- a/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c 2010-01-15 16:57:48.000000000 +0100
|
||||||
|
+++ b/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c 2010-01-15 19:31:56.000000000 +0100
|
||||||
|
@@ -2726,11 +2726,12 @@ void ieee80211_disassociate(struct ieee8
|
||||||
|
if(IS_DOT11D_ENABLE(ieee))
|
||||||
|
Dot11d_Reset(ieee);
|
||||||
|
#endif
|
||||||
|
- ieee->state = IEEE80211_NOLINK;
|
||||||
|
ieee->is_set_key = false;
|
||||||
|
ieee->link_change(ieee->dev);
|
||||||
|
//HTSetConnectBwMode(ieee, HT_CHANNEL_WIDTH_20, HT_EXTCHNL_OFFSET_NO_EXT);
|
||||||
|
- notify_wx_assoc_event(ieee);
|
||||||
|
+ if (ieee->state == IEEE80211_LINKED)
|
||||||
|
+ notify_wx_assoc_event(ieee);
|
||||||
|
+ ieee->state = IEEE80211_NOLINK;
|
||||||
|
|
||||||
|
}
|
||||||
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20))
|
||||||
|
|
||||||
|
--
|
||||||
|
Intel Open Source Technology Centre
|
||||||
|
http://oss.intel.com/
|
||||||
|
_______________________________________________
|
||||||
|
Moblin-kernel mailing list
|
||||||
|
Moblin-kernel@linux.intel.com
|
||||||
|
http://linux.intel.com/mailman/listinfo/moblin-kernel
|
||||||
|
|
41
packages/linux/patches/rtl8192_no_autoconnect.diff
Normal file
41
packages/linux/patches/rtl8192_no_autoconnect.diff
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
Getting a probe response after sending a probe request to a specific SSID
|
||||||
|
doesnt mean we're trying to associate with this SSID.
|
||||||
|
wpa_supplicant should be the only one deciding when to join an SSID, not the
|
||||||
|
kernel.
|
||||||
|
|
||||||
|
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|
||||||
|
---
|
||||||
|
drivers/staging/rtl8192e/ieee80211/ieee80211_rx.c | 4 ----
|
||||||
|
1 file changed, 4 deletions(-)
|
||||||
|
|
||||||
|
Index: b/drivers/staging/rtl8192e/ieee80211/ieee80211_rx.c
|
||||||
|
===================================================================
|
||||||
|
--- a/drivers/staging/rtl8192e/ieee80211/ieee80211_rx.c 2010-01-15 16:56:47.000000000 +0100
|
||||||
|
+++ b/drivers/staging/rtl8192e/ieee80211/ieee80211_rx.c 2010-01-15 16:57:03.000000000 +0100
|
||||||
|
@@ -2716,8 +2716,6 @@ static inline void ieee80211_process_pro
|
||||||
|
#endif
|
||||||
|
memcpy(target, &network, sizeof(*target));
|
||||||
|
list_add_tail(&target->list, &ieee->network_list);
|
||||||
|
- if(ieee->softmac_features & IEEE_SOFTMAC_ASSOCIATE)
|
||||||
|
- ieee80211_softmac_new_net(ieee,&network);
|
||||||
|
} else {
|
||||||
|
IEEE80211_DEBUG_SCAN("Updating '%s' (" MAC_FMT ") via %s.\n",
|
||||||
|
escape_essid(target->ssid,
|
||||||
|
@@ -2744,8 +2742,6 @@ static inline void ieee80211_process_pro
|
||||||
|
//YJ,add,080819,for hidden ap,end
|
||||||
|
|
||||||
|
update_network(target, &network);
|
||||||
|
- if(renew && (ieee->softmac_features & IEEE_SOFTMAC_ASSOCIATE))
|
||||||
|
- ieee80211_softmac_new_net(ieee,&network);
|
||||||
|
}
|
||||||
|
|
||||||
|
spin_unlock_irqrestore(&ieee->lock, flags);
|
||||||
|
|
||||||
|
--
|
||||||
|
Intel Open Source Technology Centre
|
||||||
|
http://oss.intel.com/
|
||||||
|
_______________________________________________
|
||||||
|
Moblin-kernel mailing list
|
||||||
|
Moblin-kernel@linux.intel.com
|
||||||
|
http://linux.intel.com/mailman/listinfo/moblin-kernel
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user