From: Michal Schmidt <mschmidt@redhat.com>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org, Dan Williams <dcbw@redhat.com>,
Matteo Croce <rootkit85@yahoo.it>
Subject: [PATCH 1/5] airo: disable the PCI device when unloading module
Date: Fri, 29 Jun 2007 15:33:30 +0200 [thread overview]
Message-ID: <20070629133330.6658.44086.stgit@localhost.localdomain> (raw)
In-Reply-To: <20070629131841.6658.76381.stgit@localhost.localdomain>
Fix an assymetry between pci_{enable,disable}_device. airo did not disable
the PCI device when unloading the module. This caused suspend failures
after modprobe -r airo && modprobe airo.
Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
---
drivers/net/wireless/airo.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
index 2d3a180..57da70b 100644
--- a/drivers/net/wireless/airo.c
+++ b/drivers/net/wireless/airo.c
@@ -5597,8 +5597,10 @@ static int __devinit airo_pci_probe(struct pci_dev *pdev,
dev = _init_airo_card(pdev->irq, pdev->resource[0].start, 0, pdev, &pdev->dev);
else
dev = _init_airo_card(pdev->irq, pdev->resource[2].start, 0, pdev, &pdev->dev);
- if (!dev)
+ if (!dev) {
+ pci_disable_device(pdev);
return -ENODEV;
+ }
pci_set_drvdata(pdev, dev);
return 0;
@@ -5610,6 +5612,8 @@ static void __devexit airo_pci_remove(struct pci_dev *pdev)
airo_print_info(dev->name, "Unregistering...");
stop_airo_card(dev, 1);
+ pci_disable_device(pdev);
+ pci_set_drvdata(pdev, NULL);
}
static int airo_pci_suspend(struct pci_dev *pdev, pm_message_t state)
next prev parent reply other threads:[~2007-06-29 13:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-29 13:33 [PATCH 0/5] airo fixes (take 3) Michal Schmidt
2007-06-29 13:33 ` Michal Schmidt [this message]
2007-06-29 13:33 ` [PATCH 2/5] airo: delay some initialization until the netdev is up Michal Schmidt
2007-06-29 13:33 ` [PATCH 3/5] airo: fix a race causing initialization failures Michal Schmidt
2007-06-29 13:33 ` [PATCH 4/5] airo: simpler calling convention for enable_MAC() Michal Schmidt
2007-06-29 13:33 ` [PATCH 5/5] airo: start with radio off Michal Schmidt
2007-06-29 19:27 ` [PATCH 0/5] airo fixes (take 3) Matteo Croce
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=20070629133330.6658.44086.stgit@localhost.localdomain \
--to=mschmidt@redhat.com \
--cc=dcbw@redhat.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=rootkit85@yahoo.it \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.