Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F109290602
D19817.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D19817.diff
View Options
Index: head/sys/dev/mrsas/mrsas.c
===================================================================
--- head/sys/dev/mrsas/mrsas.c
+++ head/sys/dev/mrsas/mrsas.c
@@ -1182,6 +1182,39 @@
return (0);
}
+static int
+mrsas_shutdown(device_t dev)
+{
+ struct mrsas_softc *sc;
+ int i;
+
+ sc = device_get_softc(dev);
+ sc->remove_in_progress = 1;
+ if (panicstr == NULL) {
+ if (sc->ocr_thread_active)
+ wakeup(&sc->ocr_chan);
+ i = 0;
+ while (sc->reset_in_progress && i < 15) {
+ i++;
+ if ((i % MRSAS_RESET_NOTICE_INTERVAL) == 0) {
+ mrsas_dprint(sc, MRSAS_INFO,
+ "[%2d]waiting for OCR to be finished "
+ "from %s\n", i, __func__);
+ }
+ pause("mr_shutdown", hz);
+ }
+ if (sc->reset_in_progress) {
+ mrsas_dprint(sc, MRSAS_INFO,
+ "gave up waiting for OCR to be finished\n");
+ }
+ }
+
+ mrsas_flush_cache(sc);
+ mrsas_shutdown_ctlr(sc, MR_DCMD_CTRL_SHUTDOWN);
+ mrsas_disable_intr(sc);
+ return (0);
+}
+
/*
* mrsas_free_mem: Frees allocated memory
* input: Adapter instance soft state
@@ -5028,6 +5061,7 @@
DEVMETHOD(device_probe, mrsas_probe),
DEVMETHOD(device_attach, mrsas_attach),
DEVMETHOD(device_detach, mrsas_detach),
+ DEVMETHOD(device_shutdown, mrsas_shutdown),
DEVMETHOD(device_suspend, mrsas_suspend),
DEVMETHOD(device_resume, mrsas_resume),
DEVMETHOD(bus_print_child, bus_generic_print_child),
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Feb 4, 3:31 AM (21 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16438601
Default Alt Text
D19817.diff (1 KB)
Attached To
Mode
D19817: add mrsas_shutdown method
Attached
Detach File
Event Timeline
Log In to Comment