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 3/4] airo: disable the PCI device when unloading module
Date: Wed, 27 Jun 2007 23:17:39 +0200 [thread overview]
Message-ID: <4682D3F3.9050202@redhat.com> (raw)
In-Reply-To: <4682D323.2010605@redhat.com>
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 63a4aaa..d46d27a 100644
--- a/drivers/net/wireless/airo.c
+++ b/drivers/net/wireless/airo.c
@@ -5603,8 +5603,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;
@@ -5616,6 +5618,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-27 21:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-27 21:14 [PATCH 0/4] airo fixes Michal Schmidt
2007-06-27 21:15 ` [PATCH 1/4] airo: don't use the interface name so much before registration Michal Schmidt
2007-06-27 21:16 ` [PATCH 2/4] airo: delay parts of initialization until the netdev is up Michal Schmidt
2007-06-27 21:17 ` Michal Schmidt [this message]
2007-06-27 21:18 ` [PATCH 4/4] airo: start with radio off Michal Schmidt
2007-06-28 5:06 ` [PATCH 0/4] airo fixes Dan Williams
2007-06-28 6:15 ` Michal Schmidt
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=4682D3F3.9050202@redhat.com \
--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.