From: Greg Kroah-Hartman Date: Fri, 1 Jun 2012 07:07:42 +0000 (+0800) Subject: 3.3-stable patches X-Git-Tag: v3.0.33~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=462f3305097b75cf07889df552f19dae23413974;p=thirdparty%2Fkernel%2Fstable-queue.git 3.3-stable patches 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 --- 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 index 00000000000..b9f82cce094 --- /dev/null +++ b/queue-3.3/md-avoid-oops-when-reshaping-raid1-to-raid0.patch @@ -0,0 +1,58 @@ +From 24b961f811a3e790a9b93604d2594bfb6cce4fa4 Mon Sep 17 00:00:00 2001 +From: Jes Sorensen +Date: Sun, 1 Apr 2012 23:48:38 +1000 +Subject: md: Avoid OOPS when reshaping raid1 to raid0 + +From: Jes Sorensen + +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 +Signed-off-by: NeilBrown +Signed-off-by: Greg Kroah-Hartman + +--- + 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 index 00000000000..6a07fc46cd5 --- /dev/null +++ b/queue-3.3/rtlwifi-rtl8192de-fix-firmware-initialization.patch @@ -0,0 +1,51 @@ +From 0298dc9f2273fb2d596ae10d7700f054bfce601d Mon Sep 17 00:00:00 2001 +From: Larry Finger +Date: Tue, 3 Apr 2012 15:31:41 -0500 +Subject: rtlwifi: rtl8192de: Fix firmware initialization + +From: Larry Finger + +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 +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + 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, diff --git a/queue-3.3/series b/queue-3.3/series index 59b215fb0e3..2c8e90c6d2c 100644 --- a/queue-3.3/series +++ b/queue-3.3/series @@ -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 index 00000000000..bd97a2d0d41 --- /dev/null +++ b/queue-3.3/spi-mpc83xx-fix-null-pdata-dereference-bug.patch @@ -0,0 +1,40 @@ +From 5039a86973cd35bdb2f64d28ee12f13fe2bb5a4c Mon Sep 17 00:00:00 2001 +From: Kenth Eriksson +Date: Fri, 30 Mar 2012 17:05:30 +0200 +Subject: spi/mpc83xx: fix NULL pdata dereference bug + +From: Kenth Eriksson + +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 +Acked-by: Joakim Tjernlund +Signed-off-by: Grant Likely +Signed-off-by: Greg Kroah-Hartman + +--- + 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); diff --git a/queue-3.3/spi-spi-fsl-spi-reference-correct-pdata-in.patch b/queue-3.3/spi-spi-fsl-spi-reference-correct-pdata-in.patch index 753e345748b..850f0c24395 100644 --- a/queue-3.3/spi-spi-fsl-spi-reference-correct-pdata-in.patch +++ b/queue-3.3/spi-spi-fsl-spi-reference-correct-pdata-in.patch @@ -29,7 +29,7 @@ Signed-off-by: Greg Kroah-Hartman --- 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) {