]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.3-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 1 Jun 2012 07:07:42 +0000 (15:07 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 1 Jun 2012 07:09:50 +0000 (15:09 +0800)
added patches:
md-avoid-oops-when-reshaping-raid1-to-raid0.patch
rtlwifi-rtl8192de-fix-firmware-initialization.patch
spi-mpc83xx-fix-null-pdata-dereference-bug.patch

queue-3.3/md-avoid-oops-when-reshaping-raid1-to-raid0.patch [new file with mode: 0644]
queue-3.3/rtlwifi-rtl8192de-fix-firmware-initialization.patch [new file with mode: 0644]
queue-3.3/series
queue-3.3/spi-mpc83xx-fix-null-pdata-dereference-bug.patch [new file with mode: 0644]
queue-3.3/spi-spi-fsl-spi-reference-correct-pdata-in.patch

diff --git a/queue-3.3/md-avoid-oops-when-reshaping-raid1-to-raid0.patch b/queue-3.3/md-avoid-oops-when-reshaping-raid1-to-raid0.patch
new file mode 100644 (file)
index 0000000..b9f82cc
--- /dev/null
@@ -0,0 +1,58 @@
+From 24b961f811a3e790a9b93604d2594bfb6cce4fa4 Mon Sep 17 00:00:00 2001
+From: Jes Sorensen <Jes.Sorensen@redhat.com>
+Date: Sun, 1 Apr 2012 23:48:38 +1000
+Subject: md: Avoid OOPS when reshaping raid1 to raid0
+
+From: Jes Sorensen <Jes.Sorensen@redhat.com>
+
+commit 24b961f811a3e790a9b93604d2594bfb6cce4fa4 upstream.
+
+raid1 arrays do not have the notion of chunk size. Calculate the
+largest chunk sector size we can use to avoid a divide by zero OOPS
+when aligning the size of the new array to the chunk size.
+
+Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
+Signed-off-by: NeilBrown <neilb@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/md/raid0.c |   18 +++++++++++++++++-
+ 1 file changed, 17 insertions(+), 1 deletion(-)
+
+--- a/drivers/md/raid0.c
++++ b/drivers/md/raid0.c
+@@ -609,6 +609,7 @@ static void *raid0_takeover_raid10(struc
+ static void *raid0_takeover_raid1(struct mddev *mddev)
+ {
+       struct r0conf *priv_conf;
++      int chunksect;
+       /* Check layout:
+        *  - (N - 1) mirror drives must be already faulty
+@@ -619,10 +620,25 @@ static void *raid0_takeover_raid1(struct
+               return ERR_PTR(-EINVAL);
+       }
++      /*
++       * a raid1 doesn't have the notion of chunk size, so
++       * figure out the largest suitable size we can use.
++       */
++      chunksect = 64 * 2; /* 64K by default */
++
++      /* The array must be an exact multiple of chunksize */
++      while (chunksect && (mddev->array_sectors & (chunksect - 1)))
++              chunksect >>= 1;
++
++      if ((chunksect << 9) < PAGE_SIZE)
++              /* array size does not allow a suitable chunk size */
++              return ERR_PTR(-EINVAL);
++
+       /* Set new parameters */
+       mddev->new_level = 0;
+       mddev->new_layout = 0;
+-      mddev->new_chunk_sectors = 128; /* by default set chunk size to 64k */
++      mddev->new_chunk_sectors = chunksect;
++      mddev->chunk_sectors = chunksect;
+       mddev->delta_disks = 1 - mddev->raid_disks;
+       mddev->raid_disks = 1;
+       /* make sure it will be not marked as dirty */
diff --git a/queue-3.3/rtlwifi-rtl8192de-fix-firmware-initialization.patch b/queue-3.3/rtlwifi-rtl8192de-fix-firmware-initialization.patch
new file mode 100644 (file)
index 0000000..6a07fc4
--- /dev/null
@@ -0,0 +1,51 @@
+From 0298dc9f2273fb2d596ae10d7700f054bfce601d Mon Sep 17 00:00:00 2001
+From: Larry Finger <Larry.Finger@lwfinger.net>
+Date: Tue, 3 Apr 2012 15:31:41 -0500
+Subject: rtlwifi: rtl8192de: Fix firmware initialization
+
+From: Larry Finger <Larry.Finger@lwfinger.net>
+
+commit 0298dc9f2273fb2d596ae10d7700f054bfce601d upstream.
+
+Before the switch to asynchronous firmware loading (mainline commit b0302ab),
+it was necessary to load firmware when initializing the first of the units
+in a dual-mac system. After the change, it is necessary to load firmware in
+both units.
+
+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/rtl8192de/sw.c |    6 ------
+ 1 file changed, 6 deletions(-)
+
+--- a/drivers/net/wireless/rtlwifi/rtl8192de/sw.c
++++ b/drivers/net/wireless/rtlwifi/rtl8192de/sw.c
+@@ -94,7 +94,6 @@ static int rtl92d_init_sw_vars(struct ie
+       u8 tid;
+       struct rtl_priv *rtlpriv = rtl_priv(hw);
+       struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
+-      static int header_print;
+       rtlpriv->dm.dm_initialgain_enable = true;
+       rtlpriv->dm.dm_flag = 0;
+@@ -174,10 +173,6 @@ static int rtl92d_init_sw_vars(struct ie
+       for (tid = 0; tid < 8; tid++)
+               skb_queue_head_init(&rtlpriv->mac80211.skb_waitq[tid]);
+-      /* Only load firmware for first MAC */
+-      if (header_print)
+-              return 0;
+-
+       /* for firmware buf */
+       rtlpriv->rtlhal.pfirmware = vzalloc(0x8000);
+       if (!rtlpriv->rtlhal.pfirmware) {
+@@ -189,7 +184,6 @@ static int rtl92d_init_sw_vars(struct ie
+       rtlpriv->max_fw_size = 0x8000;
+       pr_info("Driver for Realtek RTL8192DE WLAN interface\n");
+       pr_info("Loading firmware file %s\n", rtlpriv->cfg->fw_name);
+-      header_print++;
+       /* request fw */
+       err = request_firmware_nowait(THIS_MODULE, 1, rtlpriv->cfg->fw_name,
index 59b215fb0e3ed765eccf151cec8f0aa289cf9266..2c8e90c6d2c986be515a8fa9f563688e32e15b0f 100644 (file)
@@ -7,6 +7,7 @@ parisc-fix-crash-in-flush_icache_page_asm-on-pa1.1.patch
 parisc-fix-panic-on-prefetch-null-on-pa7300lc.patch
 isdn-gigaset-ratelimit-capi-message-dumps.patch
 vfs-make-aio-use-the-proper-rw_verify_area-area-helpers.patch
+spi-mpc83xx-fix-null-pdata-dereference-bug.patch
 cfg80211-warn-if-db.txt-is-empty-with-config_cfg80211_internal_regdb.patch
 regulator-core-release-regulator-regulator-supplies-on-error.patch
 fix-blocking-allocations-called-very-early-during-bootup.patch
@@ -89,3 +90,5 @@ arm-7409-1-do-not-call-flush_cache_user_range-with-mmap_sem-held.patch
 mce-fix-vm86-handling-for-32bit-mce-handler.patch
 i2c-davinci-free-requested-irq-in-remove.patch
 i2c-tegra-notify-transfer-complete-after-clearing-status.patch
+rtlwifi-rtl8192de-fix-firmware-initialization.patch
+md-avoid-oops-when-reshaping-raid1-to-raid0.patch
diff --git a/queue-3.3/spi-mpc83xx-fix-null-pdata-dereference-bug.patch b/queue-3.3/spi-mpc83xx-fix-null-pdata-dereference-bug.patch
new file mode 100644 (file)
index 0000000..bd97a2d
--- /dev/null
@@ -0,0 +1,40 @@
+From 5039a86973cd35bdb2f64d28ee12f13fe2bb5a4c Mon Sep 17 00:00:00 2001
+From: Kenth Eriksson <kenth.eriksson@transmode.com>
+Date: Fri, 30 Mar 2012 17:05:30 +0200
+Subject: spi/mpc83xx: fix NULL pdata dereference bug
+
+From: Kenth Eriksson <kenth.eriksson@transmode.com>
+
+commit 5039a86973cd35bdb2f64d28ee12f13fe2bb5a4c upstream.
+
+Commit 178db7d3, "spi: Fix device unregistration when unregistering
+the bus master", changed device initialization to be children of the
+bus master, not children of the bus masters parent device. The pdata
+pointer used in fsl_spi_chipselect must updated to reflect the changed
+initialization.
+
+Signed-off-by: Kenth Eriksson <kenth.eriksson@transmode.com>
+Acked-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
+Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/spi/spi-fsl-spi.c |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/spi/spi-fsl-spi.c
++++ b/drivers/spi/spi-fsl-spi.c
+@@ -139,10 +139,12 @@ static void fsl_spi_change_mode(struct s
+ static void fsl_spi_chipselect(struct spi_device *spi, int value)
+ {
+       struct mpc8xxx_spi *mpc8xxx_spi = spi_master_get_devdata(spi->master);
+-      struct fsl_spi_platform_data *pdata = spi->dev.parent->platform_data;
++      struct fsl_spi_platform_data *pdata;
+       bool pol = spi->mode & SPI_CS_HIGH;
+       struct spi_mpc8xxx_cs   *cs = spi->controller_state;
++      pdata = spi->dev.parent->parent->platform_data;
++
+       if (value == BITBANG_CS_INACTIVE) {
+               if (pdata->cs_control)
+                       pdata->cs_control(spi, !pol);
index 753e345748b8705a5101a35585d60e06f560db51..850f0c24395102f52f1f79ec5ddca15cefb6fa1e 100644 (file)
@@ -29,7 +29,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 
 --- a/drivers/spi/spi-fsl-spi.c
 +++ b/drivers/spi/spi-fsl-spi.c
-@@ -931,7 +931,7 @@ err:
+@@ -933,7 +933,7 @@ err:
  
  static void fsl_spi_cs_control(struct spi_device *spi, bool on)
  {