From: Greg Kroah-Hartman Date: Wed, 9 Nov 2011 17:11:15 +0000 (-0800) Subject: 3.1 patches X-Git-Tag: v3.0.9~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1b8ee0479fbc29ef96eb62485583ebc33d9655db;p=thirdparty%2Fkernel%2Fstable-queue.git 3.1 patches added patches: ath9k_hw-fix-regression-of-register-offset-for-ar9003-chips.patch dp83640-use-proper-function-to-free-transmit-time-stamping.patch md-raid5-abort-any-pending-parity-operations-when-array-fails.patch md-raid5-stripe_active-has-lock-semantics-add-barriers.patch --- diff --git a/queue-3.1/ath9k_hw-fix-regression-of-register-offset-for-ar9003-chips.patch b/queue-3.1/ath9k_hw-fix-regression-of-register-offset-for-ar9003-chips.patch new file mode 100644 index 00000000000..3d058f333af --- /dev/null +++ b/queue-3.1/ath9k_hw-fix-regression-of-register-offset-for-ar9003-chips.patch @@ -0,0 +1,49 @@ +From 52d6d4ef5e6d1517688e27c11c01ab303ec681dd Mon Sep 17 00:00:00 2001 +From: Rajkumar Manoharan +Date: Thu, 20 Oct 2011 14:22:43 +0530 +Subject: ath9k_hw: Fix regression of register offset for AR9003 chips + +From: Rajkumar Manoharan + +commit 52d6d4ef5e6d1517688e27c11c01ab303ec681dd upstream. + +My recent commits (3782c69d, 324c74a) introduced regression +for register offset selection that based on the macversion. +Not using parentheses in proper manner for ternary operator +leads to select wrong offset for the registers. + +This issue was observed with AR9462 chip that immediate disconnect +after the association with the following message + +ieee80211 phy3: wlan0: Failed to send nullfunc to AP 00:23:69:12:ea:47 +after 500ms, disconnecting. + +Signed-off-by: Rajkumar Manoharan +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/ath/ath9k/ar9003_phy.h | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +--- a/drivers/net/wireless/ath/ath9k/ar9003_phy.h ++++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.h +@@ -572,12 +572,12 @@ + + #define AR_PHY_TXGAIN_TABLE (AR_SM_BASE + 0x300) + +-#define AR_PHY_TX_IQCAL_CONTROL_1 (AR_SM_BASE + AR_SREV_9485(ah) ? \ +- 0x3c8 : 0x448) +-#define AR_PHY_TX_IQCAL_START (AR_SM_BASE + AR_SREV_9485(ah) ? \ +- 0x3c4 : 0x440) +-#define AR_PHY_TX_IQCAL_STATUS_B0 (AR_SM_BASE + AR_SREV_9485(ah) ? \ +- 0x3f0 : 0x48c) ++#define AR_PHY_TX_IQCAL_CONTROL_1 (AR_SM_BASE + (AR_SREV_9485(ah) ? \ ++ 0x3c8 : 0x448)) ++#define AR_PHY_TX_IQCAL_START (AR_SM_BASE + (AR_SREV_9485(ah) ? \ ++ 0x3c4 : 0x440)) ++#define AR_PHY_TX_IQCAL_STATUS_B0 (AR_SM_BASE + (AR_SREV_9485(ah) ? \ ++ 0x3f0 : 0x48c)) + #define AR_PHY_TX_IQCAL_CORR_COEFF_B0(_i) (AR_SM_BASE + \ + (AR_SREV_9485(ah) ? \ + 0x3d0 : 0x450) + ((_i) << 2)) diff --git a/queue-3.1/dp83640-use-proper-function-to-free-transmit-time-stamping.patch b/queue-3.1/dp83640-use-proper-function-to-free-transmit-time-stamping.patch new file mode 100644 index 00000000000..5152b9e547d --- /dev/null +++ b/queue-3.1/dp83640-use-proper-function-to-free-transmit-time-stamping.patch @@ -0,0 +1,36 @@ +From f5ff7cd1a84caa9545d952a37ac872ccb73825fb Mon Sep 17 00:00:00 2001 +From: Richard Cochran +Date: Fri, 21 Oct 2011 00:49:16 +0000 +Subject: dp83640: use proper function to free transmit time stamping packets + +From: Richard Cochran + +commit f5ff7cd1a84caa9545d952a37ac872ccb73825fb upstream. + +The previous commit enforces a new rule for handling the cloned packets +for transmit time stamping. These packets must not be freed using any other +function than skb_complete_tx_timestamp. This commit fixes the one and only +driver using this API. + +The driver first appeared in v3.0. + +Signed-off-by: Richard Cochran +Acked-by: Eric Dumazet +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/phy/dp83640.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/phy/dp83640.c ++++ b/drivers/net/phy/dp83640.c +@@ -1067,7 +1067,7 @@ static void dp83640_txtstamp(struct phy_ + struct dp83640_private *dp83640 = phydev->priv; + + if (!dp83640->hwts_tx_en) { +- kfree_skb(skb); ++ skb_complete_tx_timestamp(skb, NULL); + return; + } + skb_queue_tail(&dp83640->tx_queue, skb); diff --git a/queue-3.1/md-raid5-abort-any-pending-parity-operations-when-array-fails.patch b/queue-3.1/md-raid5-abort-any-pending-parity-operations-when-array-fails.patch new file mode 100644 index 00000000000..bc236a7a71b --- /dev/null +++ b/queue-3.1/md-raid5-abort-any-pending-parity-operations-when-array-fails.patch @@ -0,0 +1,48 @@ +From 9a3f530f39f4490eaa18b02719fb74ce5f4d2d86 Mon Sep 17 00:00:00 2001 +From: NeilBrown +Date: Tue, 8 Nov 2011 16:22:01 +1100 +Subject: md/raid5: abort any pending parity operations when array fails. + +From: NeilBrown + +commit 9a3f530f39f4490eaa18b02719fb74ce5f4d2d86 upstream. + +When the number of failed devices exceeds the allowed number +we must abort any active parity operations (checks or updates) as they +are no longer meaningful, and can lead to a BUG_ON in +handle_parity_checks6. + +This bug was introduce by commit 6c0069c0ae9659e3a91b68eaed06a5c6c37f45c8 +in 2.6.29. + +Reported-by: Manish Katiyar +Tested-by: Manish Katiyar +Acked-by: Dan Williams +Signed-off-by: NeilBrown +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/md/raid5.c | 12 ++++++++---- + 1 file changed, 8 insertions(+), 4 deletions(-) + +--- a/drivers/md/raid5.c ++++ b/drivers/md/raid5.c +@@ -3165,10 +3165,14 @@ static void handle_stripe(struct stripe_ + /* check if the array has lost more than max_degraded devices and, + * if so, some requests might need to be failed. + */ +- if (s.failed > conf->max_degraded && s.to_read+s.to_write+s.written) +- handle_failed_stripe(conf, sh, &s, disks, &s.return_bi); +- if (s.failed > conf->max_degraded && s.syncing) +- handle_failed_sync(conf, sh, &s); ++ if (s.failed > conf->max_degraded) { ++ sh->check_state = 0; ++ sh->reconstruct_state = 0; ++ if (s.to_read+s.to_write+s.written) ++ handle_failed_stripe(conf, sh, &s, disks, &s.return_bi); ++ if (s.syncing) ++ handle_failed_sync(conf, sh, &s); ++ } + + /* + * might be able to return some write requests if the parity blocks diff --git a/queue-3.1/md-raid5-stripe_active-has-lock-semantics-add-barriers.patch b/queue-3.1/md-raid5-stripe_active-has-lock-semantics-add-barriers.patch new file mode 100644 index 00000000000..c32e273d1b6 --- /dev/null +++ b/queue-3.1/md-raid5-stripe_active-has-lock-semantics-add-barriers.patch @@ -0,0 +1,43 @@ +From 257a4b42af7586fab4eaec7f04e6896b86551843 Mon Sep 17 00:00:00 2001 +From: Dan Williams +Date: Tue, 8 Nov 2011 16:22:06 +1100 +Subject: md/raid5: STRIPE_ACTIVE has lock semantics, add barriers + +From: Dan Williams + +commit 257a4b42af7586fab4eaec7f04e6896b86551843 upstream. + +All updates that occur under STRIPE_ACTIVE should be globally visible +when STRIPE_ACTIVE clears. test_and_set_bit() implies a barrier, but +clear_bit() does not. + +This is suitable for 3.1-stable. + +Signed-off-by: Dan Williams +Signed-off-by: NeilBrown +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/md/raid5.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/md/raid5.c ++++ b/drivers/md/raid5.c +@@ -3116,7 +3116,7 @@ static void handle_stripe(struct stripe_ + struct r5dev *pdev, *qdev; + + clear_bit(STRIPE_HANDLE, &sh->state); +- if (test_and_set_bit(STRIPE_ACTIVE, &sh->state)) { ++ if (test_and_set_bit_lock(STRIPE_ACTIVE, &sh->state)) { + /* already being handled, ensure it gets handled + * again when current action finishes */ + set_bit(STRIPE_HANDLE, &sh->state); +@@ -3381,7 +3381,7 @@ finish: + + return_io(s.return_bi); + +- clear_bit(STRIPE_ACTIVE, &sh->state); ++ clear_bit_unlock(STRIPE_ACTIVE, &sh->state); + } + + static void raid5_activate_delayed(raid5_conf_t *conf) diff --git a/queue-3.1/series b/queue-3.1/series index 0c441485514..f88a10428e8 100644 --- a/queue-3.1/series +++ b/queue-3.1/series @@ -249,3 +249,7 @@ mtd-pxa3xx_nand-fix-nand-detection-issue.patch mtd-pxa3xx_nand-fix-blank-page-ecc-mismatch.patch pm-suspend-off-by-one-in-pm_suspend.patch crypto-cryptd-use-subsys_initcall-to-prevent-races-with-aesni.patch +dp83640-use-proper-function-to-free-transmit-time-stamping.patch +ath9k_hw-fix-regression-of-register-offset-for-ar9003-chips.patch +md-raid5-abort-any-pending-parity-operations-when-array-fails.patch +md-raid5-stripe_active-has-lock-semantics-add-barriers.patch