From: Ivo van Doorn <ivdoorn@gmail.com>
To: linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org, rt2400-devel@lists.sourceforge.net
Subject: [PATCH 03/16] rt2x00: Clean up error handling of PCI queue DMA allocation.
Date: Sat, 10 May 2008 13:39:34 +0200 [thread overview]
Message-ID: <200805101339.34222.IvDoorn@gmail.com> (raw)
In-Reply-To: <200805101337.14536.IvDoorn@gmail.com>
From: Gertjan van Wingerde <gwingerde@kpnplanet.nl>
When, for some reason, the rt2x00pci module fails to allocate DMA memory for
the queues, it tries to undo the complete initialization of the PCI device,
including freeing of the irq. This results in the following error in dmesg, as
the irq hadn't been requested yet:
[ 78.123456] Trying to free already-free IRQ 17
Fix this by implementing proper error handling code, instead of just using the
full uninitialization function.
Signed-off-by: Gertjan van Wingerde <gwingerde@kpnplanet.nl>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
---
drivers/net/wireless/rt2x00/rt2x00pci.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/rt2x00/rt2x00pci.c b/drivers/net/wireless/rt2x00/rt2x00pci.c
index 9e5d94e..c17078e 100644
--- a/drivers/net/wireless/rt2x00/rt2x00pci.c
+++ b/drivers/net/wireless/rt2x00/rt2x00pci.c
@@ -314,13 +314,14 @@ int rt2x00pci_initialize(struct rt2x00_dev *rt2x00dev)
if (status) {
ERROR(rt2x00dev, "IRQ %d allocation failed (error %d).\n",
pci_dev->irq, status);
- return status;
+ goto exit;
}
return 0;
exit:
- rt2x00pci_uninitialize(rt2x00dev);
+ queue_for_each(rt2x00dev, queue)
+ rt2x00pci_free_queue_dma(rt2x00dev, queue);
return status;
}
--
1.5.5.1
next prev parent reply other threads:[~2008-05-10 12:09 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-10 11:37 Please pull 'upstream' branch of rt2x00 Ivo van Doorn
2008-05-10 11:38 ` [PATCH 01/16] rt2x00: Don't use pskb_expand_head() Ivo van Doorn
2008-05-10 11:38 ` [PATCH 02/16] rt2x00: Fix broken recover-on-error path Ivo van Doorn
2008-05-10 11:39 ` Ivo van Doorn [this message]
2008-05-10 11:40 ` [PATCH 04/16] mac80211: Don't encrypt beacons Ivo van Doorn
2008-05-10 16:11 ` Johannes Berg
2008-05-10 11:40 ` [PATCH 05/16] mac80211: Add RTNL version of ieee80211_iterate_active_interfaces Ivo van Doorn
2008-05-10 11:41 ` [PATCH 06/16] rt2x00: trim skb_frame_desc to 32 bytes Ivo van Doorn
2008-05-10 11:42 ` [PATCH 07/16] rt2x00: Fix TX status reporting Ivo van Doorn
2008-05-10 11:42 ` [PATCH 08/16] rt2x00: Remove ieee80211_tx_control argument from write_tx_desc() Ivo van Doorn
2008-05-10 11:43 ` [PATCH 09/16] rt2x00: Fix queue related oops in case of deselected mac80211 multi-queue feature Ivo van Doorn
2008-05-10 11:43 ` [PATCH 10/16] rt2x00: Preserve descriptor information after memmove() Ivo van Doorn
2008-05-10 11:44 ` [PATCH 11/16] rt2x00: Only initialize the minimum needed fields of PCI TX descriptors Ivo van Doorn
2008-05-10 11:45 ` [PATCH 16/16] rt2x00: Release rt2x00 2.1.6 Ivo van Doorn
2008-05-10 11:45 ` [PATCH 15/16] rt2x00: Remove extra + Ivo van Doorn
2008-05-10 11:46 ` [PATCH 14/16] rt2x00: Merge RX and TX entry private data Ivo van Doorn
2008-05-10 11:46 ` [PATCH 13/16] rt2x00: Remove redundant flags/dev_flags initializations Ivo van Doorn
2008-05-10 11:46 ` [PATCH 12/16] rt2x00: Split rt2x00lib_write_tx_desc() Ivo van Doorn
2008-05-10 12:48 ` Please pull 'upstream' branch of rt2x00 drago01
2008-05-10 13:06 ` Ivo van Doorn
2008-05-10 13:15 ` drago01
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200805101339.34222.IvDoorn@gmail.com \
--to=ivdoorn@gmail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=rt2400-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).