diff mbox

[4/5] brcmsmac: remove PCI suspend/resume from bcma driver

Message ID alpine.LNX.2.00.1201130001320.5860@air.linux-foundation.org
State Not Applicable, archived
Delegated to: David Miller
Headers show

Commit Message

Linus Torvalds Jan. 13, 2012, 8:01 a.m. UTC
From: Linus Torvalds <torvalds@linux-foundation.org>
Date: Thu, 12 Jan 2012 23:36:52 -0800

The brcmsmac driver isn't a PCI driver any more, it's a bcma one.  The
PCI device has been resumed by the PCI driver (the generic PCI layer,
really), we should be resuming just our own driver state.

Also add pr_debug() calls to show that we now actually get the
suspend/resume events.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
---
 .../net/wireless/brcm80211/brcmsmac/mac80211_if.c  |   38 ++------------------
 1 files changed, 3 insertions(+), 35 deletions(-)

Comments

Arend van Spriel Jan. 13, 2012, 9:59 a.m. UTC | #1
On 01/13/2012 09:01 AM, Linus Torvalds wrote:
> 
> From: Linus Torvalds <torvalds@linux-foundation.org>
> Date: Thu, 12 Jan 2012 23:36:52 -0800
> 
> The brcmsmac driver isn't a PCI driver any more, it's a bcma one.  The
> PCI device has been resumed by the PCI driver (the generic PCI layer,
> really), we should be resuming just our own driver state.
> 
> Also add pr_debug() calls to show that we now actually get the
> suspend/resume events.
> 
> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

I made similar change as well last night, but did not get to test it. I
will test this series instead.

Gr. AvS


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
index 213130afdaf7..448ab9c4eb47 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
@@ -1128,13 +1128,6 @@  static int __devinit brcms_bcma_probe(struct bcma_device *pdev)
 	return 0;
 }
 
-static int brcms_pci_suspend(struct pci_dev *pdev)
-{
-	pci_save_state(pdev);
-	pci_disable_device(pdev);
-	return pci_set_power_state(pdev, PCI_D3hot);
-}
-
 static int brcms_suspend(struct bcma_device *pdev)
 {
 	struct brcms_info *wl;
@@ -1153,40 +1146,15 @@  static int brcms_suspend(struct bcma_device *pdev)
 	wl->pub->hw_up = false;
 	spin_unlock_bh(&wl->lock);
 
-	/* temporarily do suspend ourselves */
-	return brcms_pci_suspend(pdev->bus->host_pci);
-}
-
-static int brcms_pci_resume(struct pci_dev *pdev)
-{
-	int err = 0;
-	uint val;
-
-	err = pci_set_power_state(pdev, PCI_D0);
-	if (err)
-		return err;
-
-	pci_restore_state(pdev);
-
-	err = pci_enable_device(pdev);
-	if (err)
-		return err;
-
-	pci_set_master(pdev);
-
-	pci_read_config_dword(pdev, 0x40, &val);
-	if ((val & 0x0000ff00) != 0)
-		pci_write_config_dword(pdev, 0x40, val & 0xffff00ff);
+	pr_debug("brcms_suspend ok\n");
 
 	return 0;
 }
 
 static int brcms_resume(struct bcma_device *pdev)
 {
-	/*
-	*  just do pci resume for now until bcma supports it.
-	*/
-	return brcms_pci_resume(pdev->bus->host_pci);
+	pr_debug("brcms_resume ok\n");
+	return 0;
 }
 
 static struct bcma_driver brcms_bcma_driver = {