]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.3-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 13 Apr 2012 18:35:00 +0000 (11:35 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 13 Apr 2012 18:35:00 +0000 (11:35 -0700)
added patches:
drm-i915-make-rc6-module-parameter-read-only.patch
drm-i915-properly-compute-dp-dithering-for-user-created-modes.patch
drm-i915-removed-ivb-forced-enable-of-sprite-dest-key.patch
drm-i915-ringbuffer-exclude-last-2-cachlines-of-ring-on-845g.patch
drm-radeon-kms-fix-dvo-setup-on-some-r4xx-chips.patch
drm-radeon-only-add-the-mm-i2c-bus-if-the-hw_i2c-module-param-is-set.patch
rtlwifi-add-missing-dma-buffer-unmapping-for-pci-drivers.patch
rtlwifi-preallocate-usb-read-buffers-and-eliminate-kalloc-in-read-routine.patch

queue-3.3/drm-i915-make-rc6-module-parameter-read-only.patch [new file with mode: 0644]
queue-3.3/drm-i915-properly-compute-dp-dithering-for-user-created-modes.patch [new file with mode: 0644]
queue-3.3/drm-i915-removed-ivb-forced-enable-of-sprite-dest-key.patch [new file with mode: 0644]
queue-3.3/drm-i915-ringbuffer-exclude-last-2-cachlines-of-ring-on-845g.patch [new file with mode: 0644]
queue-3.3/drm-radeon-kms-fix-dvo-setup-on-some-r4xx-chips.patch [new file with mode: 0644]
queue-3.3/drm-radeon-only-add-the-mm-i2c-bus-if-the-hw_i2c-module-param-is-set.patch [new file with mode: 0644]
queue-3.3/rtlwifi-add-missing-dma-buffer-unmapping-for-pci-drivers.patch [new file with mode: 0644]
queue-3.3/rtlwifi-preallocate-usb-read-buffers-and-eliminate-kalloc-in-read-routine.patch [new file with mode: 0644]
queue-3.3/series

diff --git a/queue-3.3/drm-i915-make-rc6-module-parameter-read-only.patch b/queue-3.3/drm-i915-make-rc6-module-parameter-read-only.patch
new file mode 100644 (file)
index 0000000..495d7af
--- /dev/null
@@ -0,0 +1,30 @@
+From f57f9c167af7cb3fd315e6a8ebe194a8aea0832a Mon Sep 17 00:00:00 2001
+From: Jesse Barnes <jbarnes@virtuousgeek.org>
+Date: Wed, 11 Apr 2012 09:39:02 -0700
+Subject: drm/i915: make rc6 module parameter read-only
+
+From: Jesse Barnes <jbarnes@virtuousgeek.org>
+
+commit f57f9c167af7cb3fd315e6a8ebe194a8aea0832a upstream.
+
+People have been getting confused and thinking this is a runtime control.
+
+Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
+Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/i915/i915_drv.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/i915/i915_drv.c
++++ b/drivers/gpu/drm/i915/i915_drv.c
+@@ -64,7 +64,7 @@ MODULE_PARM_DESC(semaphores,
+               "Use semaphores for inter-ring sync (default: -1 (use per-chip defaults))");
+ int i915_enable_rc6 __read_mostly = -1;
+-module_param_named(i915_enable_rc6, i915_enable_rc6, int, 0600);
++module_param_named(i915_enable_rc6, i915_enable_rc6, int, 0400);
+ MODULE_PARM_DESC(i915_enable_rc6,
+               "Enable power-saving render C-state 6 (default: -1 (use per-chip default)");
diff --git a/queue-3.3/drm-i915-properly-compute-dp-dithering-for-user-created-modes.patch b/queue-3.3/drm-i915-properly-compute-dp-dithering-for-user-created-modes.patch
new file mode 100644 (file)
index 0000000..c5cd9c6
--- /dev/null
@@ -0,0 +1,127 @@
+From c4867936474183332db4c19791a65fdad6474fd5 Mon Sep 17 00:00:00 2001
+From: Daniel Vetter <daniel.vetter@ffwll.ch>
+Date: Tue, 10 Apr 2012 10:42:36 +0200
+Subject: drm/i915: properly compute dp dithering for user-created modes
+
+From: Daniel Vetter <daniel.vetter@ffwll.ch>
+
+commit c4867936474183332db4c19791a65fdad6474fd5 upstream.
+
+We've only computed whether we need to fall back to 6bpc due to dp
+link bandwidth constrains in mode_valid, but not mode_fixup. Under
+various circumstances X likes to create new modes which then lack
+proper 6bpc flags (if required), resulting in mode_fixup failures and
+ultimately black screens.
+
+Chris Wilson pointed out that we still get things wrong for bpp > 24,
+but that should be fixed in another patch (and it'll be easier because
+this patch consolidates the logic).
+
+The likely culprit for this regression is
+
+commit 3d794f87238f74d80e78a7611c7fbde8a54c85c2
+Author: Keith Packard <keithp@keithp.com>
+Date:   Wed Jan 25 08:16:25 2012 -0800
+
+    drm/i915: Force explicit bpp selection for intel_dp_link_required
+
+v2: Fix indentation and tune down the too bold claim that this should
+fix the world. Both noticed by Chris Wilson.
+
+v3: Try to really git add things.
+
+Reported-and-tested-by: Brice Goglin <Brice.Goglin@ens-lyon.org>
+Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=48170
+Cc: stable@kernel.org
+Reviewed-by: Adam Jackson <ajax@redhat.com>
+Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/i915/intel_dp.c |   49 ++++++++++++++++++++++++++++------------
+ 1 file changed, 35 insertions(+), 14 deletions(-)
+
+--- a/drivers/gpu/drm/i915/intel_dp.c
++++ b/drivers/gpu/drm/i915/intel_dp.c
+@@ -219,14 +219,38 @@ intel_dp_max_data_rate(int max_link_cloc
+       return (max_link_clock * max_lanes * 8) / 10;
+ }
++static bool
++intel_dp_adjust_dithering(struct intel_dp *intel_dp,
++                        struct drm_display_mode *mode,
++                        struct drm_display_mode *adjusted_mode)
++{
++      int max_link_clock = intel_dp_link_clock(intel_dp_max_link_bw(intel_dp));
++      int max_lanes = intel_dp_max_lane_count(intel_dp);
++      int max_rate, mode_rate;
++
++      mode_rate = intel_dp_link_required(mode->clock, 24);
++      max_rate = intel_dp_max_data_rate(max_link_clock, max_lanes);
++
++      if (mode_rate > max_rate) {
++              mode_rate = intel_dp_link_required(mode->clock, 18);
++              if (mode_rate > max_rate)
++                      return false;
++
++              if (adjusted_mode)
++                      adjusted_mode->private_flags
++                              |= INTEL_MODE_DP_FORCE_6BPC;
++
++              return true;
++      }
++
++      return true;
++}
++
+ static int
+ intel_dp_mode_valid(struct drm_connector *connector,
+                   struct drm_display_mode *mode)
+ {
+       struct intel_dp *intel_dp = intel_attached_dp(connector);
+-      int max_link_clock = intel_dp_link_clock(intel_dp_max_link_bw(intel_dp));
+-      int max_lanes = intel_dp_max_lane_count(intel_dp);
+-      int max_rate, mode_rate;
+       if (is_edp(intel_dp) && intel_dp->panel_fixed_mode) {
+               if (mode->hdisplay > intel_dp->panel_fixed_mode->hdisplay)
+@@ -236,16 +260,8 @@ intel_dp_mode_valid(struct drm_connector
+                       return MODE_PANEL;
+       }
+-      mode_rate = intel_dp_link_required(mode->clock, 24);
+-      max_rate = intel_dp_max_data_rate(max_link_clock, max_lanes);
+-
+-      if (mode_rate > max_rate) {
+-                      mode_rate = intel_dp_link_required(mode->clock, 18);
+-                      if (mode_rate > max_rate)
+-                              return MODE_CLOCK_HIGH;
+-                      else
+-                              mode->private_flags |= INTEL_MODE_DP_FORCE_6BPC;
+-      }
++      if (!intel_dp_adjust_dithering(intel_dp, mode, NULL))
++              return MODE_CLOCK_HIGH;
+       if (mode->clock < 10000)
+               return MODE_CLOCK_LOW;
+@@ -673,7 +689,7 @@ intel_dp_mode_fixup(struct drm_encoder *
+       int lane_count, clock;
+       int max_lane_count = intel_dp_max_lane_count(intel_dp);
+       int max_clock = intel_dp_max_link_bw(intel_dp) == DP_LINK_BW_2_7 ? 1 : 0;
+-      int bpp = mode->private_flags & INTEL_MODE_DP_FORCE_6BPC ? 18 : 24;
++      int bpp;
+       static int bws[2] = { DP_LINK_BW_1_62, DP_LINK_BW_2_7 };
+       if (is_edp(intel_dp) && intel_dp->panel_fixed_mode) {
+@@ -687,6 +703,11 @@ intel_dp_mode_fixup(struct drm_encoder *
+               mode->clock = intel_dp->panel_fixed_mode->clock;
+       }
++      if (!intel_dp_adjust_dithering(intel_dp, mode, adjusted_mode))
++              return false;
++
++      bpp = adjusted_mode->private_flags & INTEL_MODE_DP_FORCE_6BPC ? 18 : 24;
++
+       for (lane_count = 1; lane_count <= max_lane_count; lane_count <<= 1) {
+               for (clock = 0; clock <= max_clock; clock++) {
+                       int link_avail = intel_dp_max_data_rate(intel_dp_link_clock(bws[clock]), lane_count);
diff --git a/queue-3.3/drm-i915-removed-ivb-forced-enable-of-sprite-dest-key.patch b/queue-3.3/drm-i915-removed-ivb-forced-enable-of-sprite-dest-key.patch
new file mode 100644 (file)
index 0000000..90827aa
--- /dev/null
@@ -0,0 +1,31 @@
+From b2a71642b8bfa1965700ba248a99016e4d6b685d Mon Sep 17 00:00:00 2001
+From: acreese <armin.c.reese@intel.com>
+Date: Wed, 4 Apr 2012 16:22:32 -0700
+Subject: drm/i915: Removed IVB forced enable of sprite dest key.
+
+From: acreese <armin.c.reese@intel.com>
+
+commit b2a71642b8bfa1965700ba248a99016e4d6b685d upstream.
+
+The destination color key is always enabled for IVB.  Removed
+the line that does this.
+
+Signed-off-by: Armin Reese <armin.c.reese@intel.com>
+Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
+Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/i915/intel_sprite.c |    1 -
+ 1 file changed, 1 deletion(-)
+
+--- a/drivers/gpu/drm/i915/intel_sprite.c
++++ b/drivers/gpu/drm/i915/intel_sprite.c
+@@ -95,7 +95,6 @@ ivb_update_plane(struct drm_plane *plane
+       /* must disable */
+       sprctl |= SPRITE_TRICKLE_FEED_DISABLE;
+       sprctl |= SPRITE_ENABLE;
+-      sprctl |= SPRITE_DEST_KEY;
+       /* Sizes are 0 based */
+       src_w--;
diff --git a/queue-3.3/drm-i915-ringbuffer-exclude-last-2-cachlines-of-ring-on-845g.patch b/queue-3.3/drm-i915-ringbuffer-exclude-last-2-cachlines-of-ring-on-845g.patch
new file mode 100644 (file)
index 0000000..362ced8
--- /dev/null
@@ -0,0 +1,31 @@
+From 27c1cbd06a7620b354cbb363834f3bb8df4f410d Mon Sep 17 00:00:00 2001
+From: Chris Wilson <chris@chris-wilson.co.uk>
+Date: Mon, 9 Apr 2012 13:59:46 +0100
+Subject: drm/i915/ringbuffer: Exclude last 2 cachlines of ring on 845g
+
+From: Chris Wilson <chris@chris-wilson.co.uk>
+
+commit 27c1cbd06a7620b354cbb363834f3bb8df4f410d upstream.
+
+The 845g shares the errata with i830 whereby executing a command
+within 2 cachelines of the end of the ringbuffer may cause a GPU hang.
+
+Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/i915/intel_ringbuffer.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
++++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
+@@ -1057,7 +1057,7 @@ int intel_init_ring_buffer(struct drm_de
+        * of the buffer.
+        */
+       ring->effective_size = ring->size;
+-      if (IS_I830(ring->dev))
++      if (IS_I830(ring->dev) || IS_845G(ring->dev))
+               ring->effective_size -= 128;
+       return 0;
diff --git a/queue-3.3/drm-radeon-kms-fix-dvo-setup-on-some-r4xx-chips.patch b/queue-3.3/drm-radeon-kms-fix-dvo-setup-on-some-r4xx-chips.patch
new file mode 100644 (file)
index 0000000..9c15dc8
--- /dev/null
@@ -0,0 +1,37 @@
+From afceb9319f21b18ee3bc15ee9a5f92e18ef8a8c9 Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexander.deucher@amd.com>
+Date: Tue, 3 Apr 2012 17:05:41 -0400
+Subject: drm/radeon/kms: fix DVO setup on some r4xx chips
+
+From: Alex Deucher <alexander.deucher@amd.com>
+
+commit afceb9319f21b18ee3bc15ee9a5f92e18ef8a8c9 upstream.
+
+Some r4xx chips have the wrong frev in the
+DVOEncoderControl table.  It should always be 1
+on r4xx.  Fixes modesetting on DVO on r4xx chips
+with the bad frev.
+
+Reported by twied on #radeon.
+
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Dave Airlie <airlied@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/radeon/atombios_encoders.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/gpu/drm/radeon/atombios_encoders.c
++++ b/drivers/gpu/drm/radeon/atombios_encoders.c
+@@ -230,6 +230,10 @@ atombios_dvo_setup(struct drm_encoder *e
+       if (!atom_parse_cmd_header(rdev->mode_info.atom_context, index, &frev, &crev))
+               return;
++      /* some R4xx chips have the wrong frev */
++      if (rdev->family <= CHIP_RV410)
++              frev = 1;
++
+       switch (frev) {
+       case 1:
+               switch (crev) {
diff --git a/queue-3.3/drm-radeon-only-add-the-mm-i2c-bus-if-the-hw_i2c-module-param-is-set.patch b/queue-3.3/drm-radeon-only-add-the-mm-i2c-bus-if-the-hw_i2c-module-param-is-set.patch
new file mode 100644 (file)
index 0000000..2274e0d
--- /dev/null
@@ -0,0 +1,38 @@
+From 46783150a6552f9513f08e62cfcc07125d6e502b Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexander.deucher@amd.com>
+Date: Tue, 10 Apr 2012 12:14:27 -0400
+Subject: drm/radeon: only add the mm i2c bus if the hw_i2c module param is set
+
+From: Alex Deucher <alexander.deucher@amd.com>
+
+commit 46783150a6552f9513f08e62cfcc07125d6e502b upstream.
+
+It seems it can corrupt the monitor EDID in certain cases on certain
+boards when running sensors detect.  It's rarely used anyway outside
+of AIW boards.
+
+http://lists.lm-sensors.org/pipermail/lm-sensors/2012-April/035847.html
+http://lists.freedesktop.org/archives/xorg/2011-January/052239.html
+
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Acked-by: Jean Delvare <khali@linux-fr.org>
+Signed-off-by: Dave Airlie <airlied@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/radeon/radeon_i2c.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/gpu/drm/radeon/radeon_i2c.c
++++ b/drivers/gpu/drm/radeon/radeon_i2c.c
+@@ -890,6 +890,10 @@ struct radeon_i2c_chan *radeon_i2c_creat
+       struct radeon_i2c_chan *i2c;
+       int ret;
++      /* don't add the mm_i2c bus unless hw_i2c is enabled */
++      if (rec->mm_i2c && (radeon_hw_i2c == 0))
++              return NULL;
++
+       i2c = kzalloc(sizeof(struct radeon_i2c_chan), GFP_KERNEL);
+       if (i2c == NULL)
+               return NULL;
diff --git a/queue-3.3/rtlwifi-add-missing-dma-buffer-unmapping-for-pci-drivers.patch b/queue-3.3/rtlwifi-add-missing-dma-buffer-unmapping-for-pci-drivers.patch
new file mode 100644 (file)
index 0000000..3ee058e
--- /dev/null
@@ -0,0 +1,42 @@
+From 673f7786e205c87b5d978c62827b9a66d097bebb Mon Sep 17 00:00:00 2001
+From: Larry Finger <Larry.Finger@lwfinger.net>
+Date: Mon, 26 Mar 2012 10:48:20 -0500
+Subject: rtlwifi: Add missing DMA buffer unmapping for PCI drivers
+
+From: Larry Finger <Larry.Finger@lwfinger.net>
+
+commit 673f7786e205c87b5d978c62827b9a66d097bebb upstream.
+
+In https://bugzilla.kernel.org/show_bug.cgi?id=42976, a system with driver
+rtl8192se used as an AP suffers from "Out of SW-IOMMU space" errors. These
+are caused by the DMA buffers used for beacons never being unmapped.
+
+This bug was also reported at
+https://bugs.launchpad.net/ubuntu/+source/linux/+bug/961618
+
+Reported-and-Tested-by: Da Xue <da@lessconfused.com>
+Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/wireless/rtlwifi/pci.c |    7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/wireless/rtlwifi/pci.c
++++ b/drivers/net/wireless/rtlwifi/pci.c
+@@ -921,8 +921,13 @@ static void _rtl_pci_prepare_bcn_tasklet
+       memset(&tcb_desc, 0, sizeof(struct rtl_tcb_desc));
+       ring = &rtlpci->tx_ring[BEACON_QUEUE];
+       pskb = __skb_dequeue(&ring->queue);
+-      if (pskb)
++      if (pskb) {
++              struct rtl_tx_desc *entry = &ring->desc[ring->idx];
++              pci_unmap_single(rtlpci->pdev, rtlpriv->cfg->ops->get_desc(
++                               (u8 *) entry, true, HW_DESC_TXBUFF_ADDR),
++                               pskb->len, PCI_DMA_TODEVICE);
+               kfree_skb(pskb);
++      }
+       /*NB: the beacon data buffer must be 32-bit aligned. */
+       pskb = ieee80211_beacon_get(hw, mac->vif);
diff --git a/queue-3.3/rtlwifi-preallocate-usb-read-buffers-and-eliminate-kalloc-in-read-routine.patch b/queue-3.3/rtlwifi-preallocate-usb-read-buffers-and-eliminate-kalloc-in-read-routine.patch
new file mode 100644 (file)
index 0000000..bfae04f
--- /dev/null
@@ -0,0 +1,130 @@
+From a7959c1394d4126a70a53b914ce4105f5173d0aa Mon Sep 17 00:00:00 2001
+From: Larry Finger <Larry.Finger@lwfinger.net>
+Date: Mon, 19 Mar 2012 15:44:31 -0500
+Subject: rtlwifi: Preallocate USB read buffers and eliminate kalloc in read routine
+
+From: Larry Finger <Larry.Finger@lwfinger.net>
+
+commit a7959c1394d4126a70a53b914ce4105f5173d0aa upstream.
+
+The current version of rtlwifi for USB operations uses kmalloc to
+acquire a 32-bit buffer for each read of the device. When
+_usb_read_sync() is called with the rcu_lock held, the result is
+a "sleeping function called from invalid context" BUG. This is
+reported for two cases in https://bugzilla.kernel.org/show_bug.cgi?id=42775.
+The first case has the lock originating from within rtlwifi and could
+be fixed by rearranging the locking; however, the second originates from
+within mac80211. The kmalloc() call is removed from _usb_read_sync()
+by creating a ring buffer pointer in the private area and
+allocating the buffer data in the probe routine.
+
+Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/wireless/rtlwifi/usb.c  |   34 ++++++++++++++++------------------
+ drivers/net/wireless/rtlwifi/wifi.h |    6 +++++-
+ 2 files changed, 21 insertions(+), 19 deletions(-)
+
+--- a/drivers/net/wireless/rtlwifi/usb.c
++++ b/drivers/net/wireless/rtlwifi/usb.c
+@@ -127,46 +127,38 @@ static int _usbctrl_vendorreq_sync_read(
+       return status;
+ }
+-static u32 _usb_read_sync(struct usb_device *udev, u32 addr, u16 len)
++static u32 _usb_read_sync(struct rtl_priv *rtlpriv, u32 addr, u16 len)
+ {
++      struct device *dev = rtlpriv->io.dev;
++      struct usb_device *udev = to_usb_device(dev);
+       u8 request;
+       u16 wvalue;
+       u16 index;
+-      u32 *data;
+-      u32 ret;
++      __le32 *data = &rtlpriv->usb_data[rtlpriv->usb_data_index];
+-      data = kmalloc(sizeof(u32), GFP_KERNEL);
+-      if (!data)
+-              return -ENOMEM;
+       request = REALTEK_USB_VENQT_CMD_REQ;
+       index = REALTEK_USB_VENQT_CMD_IDX; /* n/a */
+       wvalue = (u16)addr;
+       _usbctrl_vendorreq_sync_read(udev, request, wvalue, index, data, len);
+-      ret = le32_to_cpu(*data);
+-      kfree(data);
+-      return ret;
++      if (++rtlpriv->usb_data_index >= RTL_USB_MAX_RX_COUNT)
++              rtlpriv->usb_data_index = 0;
++      return le32_to_cpu(*data);
+ }
+ static u8 _usb_read8_sync(struct rtl_priv *rtlpriv, u32 addr)
+ {
+-      struct device *dev = rtlpriv->io.dev;
+-
+-      return (u8)_usb_read_sync(to_usb_device(dev), addr, 1);
++      return (u8)_usb_read_sync(rtlpriv, addr, 1);
+ }
+ static u16 _usb_read16_sync(struct rtl_priv *rtlpriv, u32 addr)
+ {
+-      struct device *dev = rtlpriv->io.dev;
+-
+-      return (u16)_usb_read_sync(to_usb_device(dev), addr, 2);
++      return (u16)_usb_read_sync(rtlpriv, addr, 2);
+ }
+ static u32 _usb_read32_sync(struct rtl_priv *rtlpriv, u32 addr)
+ {
+-      struct device *dev = rtlpriv->io.dev;
+-
+-      return _usb_read_sync(to_usb_device(dev), addr, 4);
++      return _usb_read_sync(rtlpriv, addr, 4);
+ }
+ static void _usb_write_async(struct usb_device *udev, u32 addr, u32 val,
+@@ -954,6 +946,11 @@ int __devinit rtl_usb_probe(struct usb_i
+               return -ENOMEM;
+       }
+       rtlpriv = hw->priv;
++      rtlpriv->usb_data = kzalloc(RTL_USB_MAX_RX_COUNT * sizeof(u32),
++                                  GFP_KERNEL);
++      if (!rtlpriv->usb_data)
++              return -ENOMEM;
++      rtlpriv->usb_data_index = 0;
+       init_completion(&rtlpriv->firmware_loading_complete);
+       SET_IEEE80211_DEV(hw, &intf->dev);
+       udev = interface_to_usbdev(intf);
+@@ -1023,6 +1020,7 @@ void rtl_usb_disconnect(struct usb_inter
+       /* rtl_deinit_rfkill(hw); */
+       rtl_usb_deinit(hw);
+       rtl_deinit_core(hw);
++      kfree(rtlpriv->usb_data);
+       rtlpriv->cfg->ops->deinit_sw_leds(hw);
+       rtlpriv->cfg->ops->deinit_sw_vars(hw);
+       _rtl_usb_io_handler_release(hw);
+--- a/drivers/net/wireless/rtlwifi/wifi.h
++++ b/drivers/net/wireless/rtlwifi/wifi.h
+@@ -65,7 +65,7 @@
+ #define QOS_QUEUE_NUM                         4
+ #define RTL_MAC80211_NUM_QUEUE                        5
+ #define REALTEK_USB_VENQT_MAX_BUF_SIZE                254
+-
++#define RTL_USB_MAX_RX_COUNT                  100
+ #define QBSS_LOAD_SIZE                                5
+ #define MAX_WMMELE_LENGTH                     64
+@@ -1627,6 +1627,10 @@ struct rtl_priv {
+          interface or hardware */
+       unsigned long status;
++      /* data buffer pointer for USB reads */
++      __le32 *usb_data;
++      int usb_data_index;
++
+       /*This must be the last item so
+          that it points to the data allocated
+          beyond  this structure like:
index 8c7efe2e8bbcb55d053e52382ebc70040012c238..7def5a1cc66394a966a04669e2b2f4fde9a81703 100644 (file)
@@ -1 +1,9 @@
 btrfs-fix-regression-in-scrub-path-resolving.patch
+drm-radeon-kms-fix-dvo-setup-on-some-r4xx-chips.patch
+drm-i915-removed-ivb-forced-enable-of-sprite-dest-key.patch
+drm-i915-ringbuffer-exclude-last-2-cachlines-of-ring-on-845g.patch
+drm-radeon-only-add-the-mm-i2c-bus-if-the-hw_i2c-module-param-is-set.patch
+drm-i915-properly-compute-dp-dithering-for-user-created-modes.patch
+drm-i915-make-rc6-module-parameter-read-only.patch
+rtlwifi-preallocate-usb-read-buffers-and-eliminate-kalloc-in-read-routine.patch
+rtlwifi-add-missing-dma-buffer-unmapping-for-pci-drivers.patch