Skip to contentSkip to conversation

b44: Disable device on shutdown

PATCH New Michael Buesch 1 participant 1 message Nov 16, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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).

---

I think this should go in for 2.6.28, as it fixes a device-doesn't-work-anymore bug after a insmod-rmmod-insmod cycle.

drivers/net/b44.c +1 -0
Index: wireless-testing/drivers/net/b44.c
===================================================================
@@ -2233,6 +2233,7 @@ static void __devexit b44_remove_one(str
 	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);
Signature · 1 line
Greetings Michael.