b44: Disable device on shutdown

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Monday, March 2, 2009 - 5:00 pm

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e92aa6...
Commit:     e92aa634a33739478958f4109d6bd35b36d13532
Parent:     f8af11af85fecbfa7b95fd79c043b16ae0ee0d55
Author:     Michael Buesch <mb@bu3sch.de>
AuthorDate: Thu Feb 26 22:35:02 2009 -0800
Committer:  David S. Miller <davem@davemloft.net>
CommitDate: Thu Feb 26 22:35:02 2009 -0800

    b44: Disable device on shutdown
    
    Disable the SSB core on device shutdown.
    This has two advantages:
    1) A clean device shutdown is always desired here, because we disable
      the device's global crystal in the next statement.
    2) This fixes a bug where the device will come up with the enable-bit
      set on the next initialization (without a reboot inbetween).
      This causes breakage on the second initialization due to code that
      checks this bit (ssb_device_is_enabled() checks).
    
    Reported-by: Pantelis Koukousoulas <pktoss@gmail.com>
    Signed-off-by: Michael Buesch <mb@bu3sch.de>
    Signed-off-by: David S. Miller <davem@davemloft.net>
---
 drivers/net/b44.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/net/b44.c b/drivers/net/b44.c
index 6b8c39f..dc5f051 100644
--- a/drivers/net/b44.c
+++ b/drivers/net/b44.c
@@ -2240,6 +2240,7 @@ static void __devexit b44_remove_one(struct ssb_device *sdev)
 	struct net_device *dev = ssb_get_drvdata(sdev);
 
 	unregister_netdev(dev);
+	ssb_device_disable(sdev, 0);
 	ssb_bus_may_powerdown(sdev->bus);
 	free_netdev(dev);
 	ssb_pcihost_set_power_state(sdev, PCI_D3hot);
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
b44: Disable device on shutdown, Linux Kernel Mailing ..., (Mon Mar 2, 5:00 pm)