]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
.38 patches
authorGreg Kroah-Hartman <gregkh@suse.de>
Mon, 25 Apr 2011 17:42:29 +0000 (10:42 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 25 Apr 2011 17:42:29 +0000 (10:42 -0700)
queue-2.6.38/ath9k_hw-partially-revert-fix-dma-descriptor-rx-error-bit-parsing.patch [new file with mode: 0644]
queue-2.6.38/series
queue-2.6.38/ubifs-fix-false-space-checking-failure.patch [new file with mode: 0644]

diff --git a/queue-2.6.38/ath9k_hw-partially-revert-fix-dma-descriptor-rx-error-bit-parsing.patch b/queue-2.6.38/ath9k_hw-partially-revert-fix-dma-descriptor-rx-error-bit-parsing.patch
new file mode 100644 (file)
index 0000000..dd1d5a3
--- /dev/null
@@ -0,0 +1,84 @@
+From 115dad7a7f42e68840392767323ceb9306dbdb36 Mon Sep 17 00:00:00 2001
+From: Felix Fietkau <nbd@openwrt.org>
+Date: Fri, 14 Jan 2011 00:06:27 +0100
+Subject: ath9k_hw: partially revert "fix dma descriptor rx error bit parsing"
+
+From: Felix Fietkau <nbd@openwrt.org>
+
+commit 115dad7a7f42e68840392767323ceb9306dbdb36 upstream.
+
+The rx error bit parsing was changed to consider PHY errors and various
+decryption errors separately. While correct according to the documentation,
+this is causing spurious decryption error reports in some situations.
+
+Fix this by restoring the original order of the checks in those places,
+where the errors are meant to be mutually exclusive.
+
+If a CRC error is reported, then MIC failure and decryption errors
+are irrelevant, and a PHY error is unlikely.
+
+Signed-off-by: Felix Fietkau <nbd@openwrt.org>
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/net/wireless/ath/ath9k/ar9003_mac.c |    8 ++++----
+ drivers/net/wireless/ath/ath9k/mac.c        |   14 ++++++++++----
+ 2 files changed, 14 insertions(+), 8 deletions(-)
+
+--- a/drivers/net/wireless/ath/ath9k/ar9003_mac.c
++++ b/drivers/net/wireless/ath/ath9k/ar9003_mac.c
+@@ -615,7 +615,7 @@ int ath9k_hw_process_rxdesc_edma(struct
+                */
+               if (rxsp->status11 & AR_CRCErr)
+                       rxs->rs_status |= ATH9K_RXERR_CRC;
+-              if (rxsp->status11 & AR_PHYErr) {
++              else if (rxsp->status11 & AR_PHYErr) {
+                       phyerr = MS(rxsp->status11, AR_PHYErrCode);
+                       /*
+                        * If we reach a point here where AR_PostDelimCRCErr is
+@@ -638,11 +638,11 @@ int ath9k_hw_process_rxdesc_edma(struct
+                               rxs->rs_phyerr = phyerr;
+                       }
+-              }
+-              if (rxsp->status11 & AR_DecryptCRCErr)
++              } else if (rxsp->status11 & AR_DecryptCRCErr)
+                       rxs->rs_status |= ATH9K_RXERR_DECRYPT;
+-              if (rxsp->status11 & AR_MichaelErr)
++              else if (rxsp->status11 & AR_MichaelErr)
+                       rxs->rs_status |= ATH9K_RXERR_MIC;
++
+               if (rxsp->status11 & AR_KeyMiss)
+                       rxs->rs_status |= ATH9K_RXERR_DECRYPT;
+       }
+--- a/drivers/net/wireless/ath/ath9k/mac.c
++++ b/drivers/net/wireless/ath/ath9k/mac.c
+@@ -690,17 +690,23 @@ int ath9k_hw_rxprocdesc(struct ath_hw *a
+               rs->rs_flags |= ATH9K_RX_DECRYPT_BUSY;
+       if ((ads.ds_rxstatus8 & AR_RxFrameOK) == 0) {
++              /*
++               * Treat these errors as mutually exclusive to avoid spurious
++               * extra error reports from the hardware. If a CRC error is
++               * reported, then decryption and MIC errors are irrelevant,
++               * the frame is going to be dropped either way
++               */
+               if (ads.ds_rxstatus8 & AR_CRCErr)
+                       rs->rs_status |= ATH9K_RXERR_CRC;
+-              if (ads.ds_rxstatus8 & AR_PHYErr) {
++              else if (ads.ds_rxstatus8 & AR_PHYErr) {
+                       rs->rs_status |= ATH9K_RXERR_PHY;
+                       phyerr = MS(ads.ds_rxstatus8, AR_PHYErrCode);
+                       rs->rs_phyerr = phyerr;
+-              }
+-              if (ads.ds_rxstatus8 & AR_DecryptCRCErr)
++              } else if (ads.ds_rxstatus8 & AR_DecryptCRCErr)
+                       rs->rs_status |= ATH9K_RXERR_DECRYPT;
+-              if (ads.ds_rxstatus8 & AR_MichaelErr)
++              else if (ads.ds_rxstatus8 & AR_MichaelErr)
+                       rs->rs_status |= ATH9K_RXERR_MIC;
++
+               if (ads.ds_rxstatus8 & AR_KeyMiss)
+                       rs->rs_status |= ATH9K_RXERR_DECRYPT;
+       }
index abcdb5ec7386b7c4c33bb8be25c8a1d7c8b63990..f92e50ed4249d189e0d94af31ca1d1986ed1956a 100644 (file)
@@ -28,3 +28,5 @@ kconfig-avoid-buffer-underrun-in-choice-input.patch
 ubifs-fix-master-node-recovery.patch
 ideapad-read-brightness-setting-on-brightness-key-notify.patch
 acpi-battery-fribble-sysfs-files-from-a-resume-notifier.patch
+ath9k_hw-partially-revert-fix-dma-descriptor-rx-error-bit-parsing.patch
+ubifs-fix-false-space-checking-failure.patch
diff --git a/queue-2.6.38/ubifs-fix-false-space-checking-failure.patch b/queue-2.6.38/ubifs-fix-false-space-checking-failure.patch
new file mode 100644 (file)
index 0000000..02dc58e
--- /dev/null
@@ -0,0 +1,62 @@
+From 8c230d9a5b5ec7970139acb7e2d165d7a3fe9f9e Mon Sep 17 00:00:00 2001
+From: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
+Date: Wed, 20 Apr 2011 18:02:45 +0300
+Subject: UBIFS: fix false space checking failure
+
+From: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
+
+commit 8c230d9a5b5ec7970139acb7e2d165d7a3fe9f9e upstream.
+
+This patch fixes UBIFS mount failure when the debugging support is enabled,
+we are recovering from a power cut, we were first mounter R/O and we are
+re-mounting R/W. In this case we should not assume that the amount of free
+space before we have re-mounted R/W and after are equivalent, because
+when we have mounted R/O the file-system is in a non-committed state so
+the amount of free space is slightly smaller, due to the fact that we cannot
+predict the amount of free space precisely before we commit.
+
+This patch fixes the issue by skipping the debugging check in case of
+recovery. This issue was reported by Caizhiyong <caizhiyong@huawei.com>
+here: http://thread.gmane.org/gmane.linux.drivers.mtd/34350/focus=34387
+
+Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
+Reported-by: Caizhiyong <caizhiyong@huawei.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ fs/ubifs/super.c |   18 +++++++++++++++---
+ 1 file changed, 15 insertions(+), 3 deletions(-)
+
+--- a/fs/ubifs/super.c
++++ b/fs/ubifs/super.c
+@@ -1643,15 +1643,27 @@ static int ubifs_remount_rw(struct ubifs
+       if (err)
+               goto out;
++      dbg_gen("re-mounted read-write");
++      c->remounting_rw = 0;
++
+       if (c->need_recovery) {
+               c->need_recovery = 0;
+               ubifs_msg("deferred recovery completed");
++      } else {
++              /*
++               * Do not run the debugging space check if the were doing
++               * recovery, because when we saved the information we had the
++               * file-system in a state where the TNC and lprops has been
++               * modified in memory, but all the I/O operations (including a
++               * commit) were deferred. So the file-system was in
++               * "non-committed" state. Now the file-system is in committed
++               * state, and of course the amount of free space will change
++               * because, for example, the old index size was imprecise.
++               */
++              err = dbg_check_space_info(c);
+       }
+-      dbg_gen("re-mounted read-write");
+-      c->remounting_rw = 0;
+       c->always_chk_crc = 0;
+-      err = dbg_check_space_info(c);
+       mutex_unlock(&c->umount_mutex);
+       return err;