Due to backport of patch
linux-2.6-iwl3945-report-killswitch-changes-even-if-the-interface-is-down.patch
we have bunch of iwl3945 bugs (race conditions) that are not reproducible on vanilla 2.6.29. These patches address them (at least some of them).
[PATCH 1/3] iwl3945: release resources before shutting down (F11 backport)
Resolves RHBZ 499811 (and partially 501117), backport of upstream commit, 2.6.30 has this fix.
[PATCH 2/3] iwl3945: add debugging for wrong command queue (F11 backport)
Partially resolves RHBZ 501117. Backport of upstream commit, 2.6.30 has this commit. Bug is still reproducible, but after patch applied system not crash. Further work needed to fully resolve the problem, but I'm not sure is easy way to fix 501117 (DMA related memory corruption) other than rebase driver to that we have in 2.6.31.
[PATCH 3/3] iwl3945: fix rfkill SW and HW mishmash
Resolves RHBZ 498622. The bug is fixed in mainline from 2.6.31-rc3 due to total rewrite of rfkill framework (commit: 19d337dff95cbf76edd3ad95c0cee2732c3e1ec5 "rfkill: rewrite"). However it is reproducible on 2.6.30 as well. Perhaps I should post this patch against 2.6.30, but I'm not sure is such kind of patches, which are not backports, are acceptable in stable kernel.
I tested all patches on my laptop.
commit d552bfb65241a35d48e44ddb0d27e0454f579ab4 Author: Kolekar, Abhijeet abhijeet.kolekar@intel.com Date: Fri Dec 19 10:37:41 2008 +0800
iwl3945: release resources before shutting down
Release resource before shutting down and notify upper stack.
Signed-off-by: Abhijeet Kolekar abhijeet.kolekar@intel.com Signed-off-by: Zhu Yi yi.zhu@intel.com Signed-off-by: John W. Linville linville@tuxdriver.com --- drivers/net/wireless/iwlwifi/iwl3945-base.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index 22e7e99..8cb0fa2 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c @@ -8096,7 +8096,12 @@ static void __devexit iwl3945_pci_remove(struct pci_dev *pdev)
set_bit(STATUS_EXIT_PENDING, &priv->status);
- iwl3945_down(priv); + if (priv->mac80211_registered) { + ieee80211_unregister_hw(priv->hw); + priv->mac80211_registered = 0; + } else { + iwl3945_down(priv); + }
/* make sure we flush any pending irq or * tasklet for the driver @@ -8121,9 +8126,6 @@ static void __devexit iwl3945_pci_remove(struct pci_dev *pdev) iwl3945_unset_hw_setting(priv); iwl3945_clear_stations_table(priv);
- if (priv->mac80211_registered) - ieee80211_unregister_hw(priv->hw); - /*netif_stop_queue(dev); */ flush_workqueue(priv->workqueue);
commit 638d0eb9197d1e285451f6594184fcfc9c2a5d44 Author: Chatre, Reinette reinette.chatre@intel.com Date: Mon Jan 19 15:30:24 2009 -0800
iwl3945: add debugging for wrong command queue
We encountered a problem related to this BUG and need to obtain more debugging information. See bug report at http://marc.info/?l=linux-wireless&m=123147215829854&w=2
Signed-off-by: Reinette Chatre reinette.chatre@intel.com Signed-off-by: John W. Linville linville@tuxdriver.com --- drivers/net/wireless/iwlwifi/iwl3945-base.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index 8cb0fa2..5011a79 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c @@ -3349,7 +3349,14 @@ static void iwl3945_tx_cmd_complete(struct iwl3945_priv *priv, int cmd_index; struct iwl3945_cmd *cmd;
- BUG_ON(txq_id != IWL_CMD_QUEUE_NUM); + if (WARN(txq_id != IWL_CMD_QUEUE_NUM, + "wrong command queue %d, sequence 0x%X readp=%d writep=%d\n", + txq_id, sequence, + priv->txq[IWL_CMD_QUEUE_NUM].q.read_ptr, + priv->txq[IWL_CMD_QUEUE_NUM].q.write_ptr)) { + /* Not in F11: iwl_print_hex_dump(priv, IWL_DL_INFO , rxb, 32); */ + return; + }
cmd_index = get_cmd_index(&priv->txq[IWL_CMD_QUEUE_NUM].q, index, huge); cmd = &priv->txq[IWL_CMD_QUEUE_NUM].cmd[cmd_index];
Disable SW switch regardless of HW switch state (we can only enable radio when both SW and HW rfkill switches are off). Report to rfkill subsystem SW switch state before HW switch state to move rfkill subsystem to SOFT_BLOCK rather than HARD_BLOCK, otherwise in some conditions we would not be able to turn radio back on. --- drivers/net/wireless/iwlwifi/iwl3945-base.c | 17 +++++++---------- 1 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index 5011a79..6065921 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c @@ -8216,7 +8216,8 @@ static int iwl3945_rfkill_soft_rf_kill(void *data, enum rfkill_state state) case RFKILL_STATE_UNBLOCKED: if (iwl3945_is_rfkill_hw(priv)) { err = -EBUSY; - goto out_unlock; + /* pass error to rfkill core to make it state HARD + * BLOCKED and disable software kill switch */ } iwl3945_radio_kill_sw(priv, 0); break; @@ -8227,9 +8228,8 @@ static int iwl3945_rfkill_soft_rf_kill(void *data, enum rfkill_state state) IWL_WARNING("we received unexpected RFKILL state %d\n", state); break; } -out_unlock: - mutex_unlock(&priv->mutex);
+ mutex_unlock(&priv->mutex); return err; }
@@ -8291,15 +8291,12 @@ void iwl3945_rfkill_set_hw_state(struct iwl3945_priv *priv) if (!priv->rfkill) return;
- if (iwl3945_is_rfkill_hw(priv)) { + if (iwl3945_is_rfkill_sw(priv)) + rfkill_force_state(priv->rfkill, RFKILL_STATE_SOFT_BLOCKED); + else if (iwl3945_is_rfkill_hw(priv)) rfkill_force_state(priv->rfkill, RFKILL_STATE_HARD_BLOCKED); - return; - } - - if (!iwl3945_is_rfkill_sw(priv)) - rfkill_force_state(priv->rfkill, RFKILL_STATE_UNBLOCKED); else - rfkill_force_state(priv->rfkill, RFKILL_STATE_SOFT_BLOCKED); + rfkill_force_state(priv->rfkill, RFKILL_STATE_UNBLOCKED); } #endif
On Thu, Jul 23, 2009 at 04:35:39PM +0200, Stanislaw Gruszka wrote:
Due to backport of patch
linux-2.6-iwl3945-report-killswitch-changes-even-if-the-interface-is-down.patch
we have bunch of iwl3945 bugs (race conditions) that are not reproducible on vanilla 2.6.29. These patches address them (at least some of them).
Looks good to me. I think Kyle agreed to merge them into Fedora kernels.
Thanks!
John
On Thu, Jul 23, 2009 at 01:31:47PM -0400, John W. Linville wrote:
On Thu, Jul 23, 2009 at 04:35:39PM +0200, Stanislaw Gruszka wrote:
Due to backport of patch
linux-2.6-iwl3945-report-killswitch-changes-even-if-the-interface-is-down.patch
we have bunch of iwl3945 bugs (race conditions) that are not reproducible on vanilla 2.6.29. These patches address them (at least some of them).
Looks good to me. I think Kyle agreed to merge them into Fedora kernels.
Thanks!
Applied. (sorry John, I've got kyle@redhat but not kylem@redhat.)
cheers, Kyle
On Thu, Jul 23, 2009 at 04:35:39PM +0200, Stanislaw Gruszka wrote:
Due to backport of patch
linux-2.6-iwl3945-report-killswitch-changes-even-if-the-interface-is-down.patch
we have bunch of iwl3945 bugs (race conditions) that are not reproducible on vanilla 2.6.29. These patches address them (at least some of them).
I see in cvs that F10 is moving to 2.6.29, so these patches should go F-10 too.
Cheers Stanislaw
On Fri, Aug 14, 2009 at 04:35:03PM +0200, Stanislaw Gruszka wrote:
On Thu, Jul 23, 2009 at 04:35:39PM +0200, Stanislaw Gruszka wrote:
Due to backport of patch
linux-2.6-iwl3945-report-killswitch-changes-even-if-the-interface-is-down.patch
we have bunch of iwl3945 bugs (race conditions) that are not reproducible on vanilla 2.6.29. These patches address them (at least some of them).
I see in cvs that F10 is moving to 2.6.29, so these patches should go F-10 too.
I'm heading out for the weekend. Would someone else care to shepherd this?
John
On Fri, 14 Aug 2009 10:44:25 -0400 "John W. Linville" linville@tuxdriver.com wrote:
On Fri, Aug 14, 2009 at 04:35:03PM +0200, Stanislaw Gruszka wrote:
On Thu, Jul 23, 2009 at 04:35:39PM +0200, Stanislaw Gruszka wrote:
Due to backport of patch
linux-2.6-iwl3945-report-killswitch-changes-even-if-the-interface-is-down.patch
we have bunch of iwl3945 bugs (race conditions) that are not reproducible on vanilla 2.6.29. These patches address them (at least some of them).
I see in cvs that F10 is moving to 2.6.29, so these patches should go F-10 too.
I'm heading out for the weekend. Would someone else care to shepherd this?
I've added those three plus the recent TX queue fix from F-11.
kernel@lists.fedoraproject.org