* [PATCH] iwlagn: downgrade BUG_ON in interrupt
@ 2008-09-23 17:14 Johannes Berg
2008-09-23 17:18 ` [PATCH v2] " Johannes Berg
0 siblings, 1 reply; 4+ messages in thread
From: Johannes Berg @ 2008-09-23 17:14 UTC (permalink / raw)
To: John W. Linville; +Cc: linux-wireless, Tomas Winkler
This BUG_ON really shouldn't trigger, but if it does, as on my machine,
it leaves you wondering what happened because you won't see it. Let's
instead leak a bit of state and memory and at least make it possible to
report it to the kerneloops project to track it.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
--- wireless-testing.orig/drivers/net/wireless/iwlwifi/iwl-tx.c 2008-09-23 13:00:01.096489715 +0200
+++ wireless-testing/drivers/net/wireless/iwlwifi/iwl-tx.c 2008-09-23 13:02:32.195402653 +0200
@@ -1203,7 +1203,8 @@ void iwl_tx_cmd_complete(struct iwl_priv
if (txq_id != IWL_CMD_QUEUE_NUM)
IWL_ERROR("Error wrong command queue %d command id 0x%X\n",
txq_id, pkt->hdr.cmd);
- BUG_ON(txq_id != IWL_CMD_QUEUE_NUM);
+ if (WARN_ON(txq_id != IWL_CMD_QUEUE_NUM))
+ 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];
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2] iwlagn: downgrade BUG_ON in interrupt
2008-09-23 17:14 [PATCH] iwlagn: downgrade BUG_ON in interrupt Johannes Berg
@ 2008-09-23 17:18 ` Johannes Berg
2008-09-23 19:05 ` Tomas Winkler
2008-09-24 1:30 ` Zhu Yi
0 siblings, 2 replies; 4+ messages in thread
From: Johannes Berg @ 2008-09-23 17:18 UTC (permalink / raw)
To: John W. Linville; +Cc: linux-wireless, Tomas Winkler
This BUG_ON really shouldn't trigger, but if it does, as on my machine,
it leaves you wondering what happened because you won't see it. Let's
instead leak a bit of state and memory and at least make it possible to
report it to the kerneloops project to track it.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
--- wireless-testing.orig/drivers/net/wireless/iwlwifi/iwl-tx.c 2008-09-23 13:00:01.096489715 +0200
+++ wireless-testing/drivers/net/wireless/iwlwifi/iwl-tx.c 2008-09-23 19:07:14.107323109 +0200
@@ -1200,10 +1200,9 @@ void iwl_tx_cmd_complete(struct iwl_priv
/* If a Tx command is being handled and it isn't in the actual
* command queue then there a command routing bug has been introduced
* in the queue management code. */
- if (txq_id != IWL_CMD_QUEUE_NUM)
- IWL_ERROR("Error wrong command queue %d command id 0x%X\n",
- txq_id, pkt->hdr.cmd);
- BUG_ON(txq_id != IWL_CMD_QUEUE_NUM);
+ if (WARN(txq_id != IWL_CMD_QUEUE_NUM,
+ "wrong command queue %d, command id 0x%X\n", txq_id, pkt->hdr.cmd))
+ 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];
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] iwlagn: downgrade BUG_ON in interrupt
2008-09-23 17:18 ` [PATCH v2] " Johannes Berg
@ 2008-09-23 19:05 ` Tomas Winkler
2008-09-24 1:30 ` Zhu Yi
1 sibling, 0 replies; 4+ messages in thread
From: Tomas Winkler @ 2008-09-23 19:05 UTC (permalink / raw)
To: Johannes Berg; +Cc: John W. Linville, linux-wireless
On Tue, Sep 23, 2008 at 8:18 PM, Johannes Berg
<johannes@sipsolutions.net> wrote:
> This BUG_ON really shouldn't trigger, but if it does, as on my machine,
> it leaves you wondering what happened because you won't see it. Let's
> instead leak a bit of state and memory and at least make it possible to
> report it to the kerneloops project to track it.
>
> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
> ---
>
> --- wireless-testing.orig/drivers/net/wireless/iwlwifi/iwl-tx.c 2008-09-23 13:00:01.096489715 +0200
> +++ wireless-testing/drivers/net/wireless/iwlwifi/iwl-tx.c 2008-09-23 19:07:14.107323109 +0200
> @@ -1200,10 +1200,9 @@ void iwl_tx_cmd_complete(struct iwl_priv
> /* If a Tx command is being handled and it isn't in the actual
> * command queue then there a command routing bug has been introduced
> * in the queue management code. */
> - if (txq_id != IWL_CMD_QUEUE_NUM)
> - IWL_ERROR("Error wrong command queue %d command id 0x%X\n",
> - txq_id, pkt->hdr.cmd);
> - BUG_ON(txq_id != IWL_CMD_QUEUE_NUM);
> + if (WARN(txq_id != IWL_CMD_QUEUE_NUM,
> + "wrong command queue %d, command id 0x%X\n", txq_id, pkt->hdr.cmd))
> + 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];
>
>
>
Find with me
Tomas
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] iwlagn: downgrade BUG_ON in interrupt
2008-09-23 17:18 ` [PATCH v2] " Johannes Berg
2008-09-23 19:05 ` Tomas Winkler
@ 2008-09-24 1:30 ` Zhu Yi
1 sibling, 0 replies; 4+ messages in thread
From: Zhu Yi @ 2008-09-24 1:30 UTC (permalink / raw)
To: Johannes Berg; +Cc: John W. Linville, linux-wireless, Tomas Winkler
On Tue, 2008-09-23 at 11:18 -0600, Johannes Berg wrote:
> This BUG_ON really shouldn't trigger, but if it does, as on my machine,
> it leaves you wondering what happened because you won't see it. Let's
> instead leak a bit of state and memory and at least make it possible to
> report it to the kerneloops project to track it.
>
> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Ack for 2.6.27. We are also working on for the root cause btw.
Thanks,
-yi
> ---
>
> --- wireless-testing.orig/drivers/net/wireless/iwlwifi/iwl-tx.c 2008-09-23 13:00:01.096489715 +0200
> +++ wireless-testing/drivers/net/wireless/iwlwifi/iwl-tx.c 2008-09-23 19:07:14.107323109 +0200
> @@ -1200,10 +1200,9 @@ void iwl_tx_cmd_complete(struct iwl_priv
> /* If a Tx command is being handled and it isn't in the actual
> * command queue then there a command routing bug has been introduced
> * in the queue management code. */
> - if (txq_id != IWL_CMD_QUEUE_NUM)
> - IWL_ERROR("Error wrong command queue %d command id 0x%X\n",
> - txq_id, pkt->hdr.cmd);
> - BUG_ON(txq_id != IWL_CMD_QUEUE_NUM);
> + if (WARN(txq_id != IWL_CMD_QUEUE_NUM,
> + "wrong command queue %d, command id 0x%X\n", txq_id, pkt->hdr.cmd))
> + 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];
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-09-24 1:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-23 17:14 [PATCH] iwlagn: downgrade BUG_ON in interrupt Johannes Berg
2008-09-23 17:18 ` [PATCH v2] " Johannes Berg
2008-09-23 19:05 ` Tomas Winkler
2008-09-24 1:30 ` Zhu Yi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).