8525 some more manpage spelling errors
[unleashed.git] / usr / src / man / man9e / quiesce.9e
blobf6cc33dd117e1164ec8d3696db5ed94f558a7dbb
1 '\" te
2 .\"  Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH QUIESCE 9E "Sep 16, 2008"
7 .SH NAME
8 quiesce \- quiesce a device
9 .SH SYNOPSIS
10 .LP
11 .nf
12 #include <sys/ddi.h>
13 #include <sys/sunddi.h>
15 \fBint prefix\fR\fBquiesce\fR(\fBdev_info_t\fR \fI*dip\fR);
16 .fi
18 .LP
19 .nf
20 \fBint\fR \fBddi_quiesce_not_needed\fR(\fBdev_info_t\fR \fI*dip\fR);
21 .fi
23 .SH INTERFACE LEVEL
24 .sp
25 .LP
26 Solaris DDI specific (Solaris DDI)
27 .SH PARAMETERS
28 .sp
29 .ne 2
30 .na
31 \fB\fIdip\fR\fR
32 .ad
33 .RS 7n
34 A pointer to the device's \fBdev_info\fR structure.
35 .RE
37 .SH DESCRIPTION
38 .sp
39 .LP
40 The \fBquiesce()\fR function quiesces a device so that the device no longer
41 generates interrupts, modifies or accesses memory. The driver should reset the
42 device to a hardware state from which the device can be correctly configured by
43 the driver's \fBattach()\fR routine without a system power cycle or being
44 configured by the firmware. For devices with a defined reset state
45 configuration, the driver should return that device to that state as part of
46 the quiesce operation. Fast Reboot, where firmware is bypassed when booting to
47 a new OS image, is such a case.
48 .sp
49 .LP
50 \fBquiesce()\fR is only called for an attached device instance as one of the
51 final operations of a reboot sequence, and no other thread can be active for
52 this device. The system guarantees that no other driver entry point is active
53 or invoked while \fBquiesce()\fR is invoked. The system also guarantees that no
54 timeout or \fBtaskq\fR is invoked. The system is single-threaded and can not be
55 interrupted. Therefore, the driver's \fBquiesce()\fR implementation must not
56 use locks or timeouts, or rely on them being called. The driver must discard
57 all outstanding \fBI/O\fR instead of waiting for completion. At the conclusion
58 of the \fBquiesce()\fR operation, the driver must guarantee that the device no
59 longer has access to memory or interrupts.
60 .sp
61 .LP
62 The only \fBDDI\fR interfaces that can be called by the \fBquiesce()\fR
63 implementation are non-blocking functions, such as the \fBddi_get*()\fR and
64 \fBddi_put*()\fR functions.
65 .sp
66 .LP
67 If \fBquiesce()\fR determines a particular instance of the device cannot be
68 quiesced when requested because of some exceptional condition, \fBquiesce()\fR
69 returns \fBDDI_FAILURE\fR. This rarely happens.
70 .sp
71 .LP
72 If a driver has previously implemented the obsolete \fBreset()\fR interface,
73 its functionality must be merged into \fBquiesce()\fR. The driver's
74 \fBreset()\fR routine is no longer called if an implementation of
75 \fBquiesce()\fR is present.
76 .sp
77 .LP
78 \fBddi_quiesce_not_needed()\fR always returns \fBDDI_SUCCESS\fR. A driver can
79 set its \fBdevo_quiesce\fR device function to \fBddi_quiesce_not_needed()\fR to
80 indicate that the device it manages does not need to be quiesced.
81 .SH RETURN VALUES
82 .sp
83 .LP
84 \fBquiesce()\fR returns the following:
85 .sp
86 .ne 2
87 .na
88 \fB\fBDDI_SUCCESS\fR\fR
89 .ad
90 .RS 15n
91 The device has been successfully quiesced.
92 .RE
94 .sp
95 .ne 2
96 .na
97 \fB\fBDDI_FAILURE\fR\fR
98 .ad
99 .RS 15n
100 The operation failed.
103 .SH CONTEXT
106 This function is called from kernel context only.
107 .SH SEE ALSO
110 \fBreboot\fR(1M), \fBuadmin\fR(1M), \fBuadmin\fR(2), \fBattach\fR(9E),
111 \fBdetach\fR(9E), \fBddi_add_intr\fR(9F), \fBddi_map_regs\fR(9F),
112 \fBpci_config_setup\fR(9F), \fBtimeout\fR(9F), \fBdev_ops\fR(9S)
113 .SH NOTES
116 When \fBquiesce()\fR is called, the system is single-threaded, therefore the
117 driver's \fBquiesce()\fR implementation must not be blocked. For example, the
118 implementation must not create or tear down mappings, call \fBFMA\fR functions,
119 or create or cancel callbacks.