2 .\" Copyright (c) 2002, Sun Microsystems, Inc.
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 HDIO 7I "Aug 13, 2002"
8 hdio \- SMD and IPI disk control operations
20 The SMC and IPI drivers have been discontinued. \fBdkio\fR(7I) is now the
21 preferred method for retrieving disk information.
25 The SMD and IPI disk drivers supplied with this release support a set of
26 \fBioctl\fR(2) requests for diagnostics and bad sector information. Basic to
27 these \fBioctl()\fR requests are the definitions in <\fBsys/hdio.h\fR>.
32 \fB\fBHDKIOCGTYPE\fR\fR
35 The argument is a pointer to a \fBhdk_type\fR structure (described below).
36 This \fBioctl()\fR gets specific information from the hard disk.
42 \fB\fBHDKIOCSTYPE\fR\fR
45 The argument is a pointer to a \fBhdk_type\fR structure (described below).
46 This \fBioctl()\fR sets specific information about the hard disk.
56 ushort_t hdkt_hsect; /* hard sector count (read only) */
57 ushort_t hdkt_promrev; /* prom revision (read only) */
58 uchar_t hdkt_drtype; /* drive type (ctlr specific) */
59 uchar_t hdkt_drstat; /* drive status (ctlr specific, ro) */
67 \fB\fBHDKIOCGBAD\fR\fR
70 The argument is a pointer to a \fBhdk_badmap\fR structure (described below).
71 This \fBioctl()\fR is used to get the bad sector map from the disk.
77 \fB\fBHDKIOCSBAD\fR\fR
80 The argument is a pointer to a \fBhdk_badmap\fR structure (described below).
81 This \fBioctl()\fR is used to set the bad sector map on the disk.
88 * Used for bad sector map
91 caddr_t hdkb_bufaddr; /* address of user's map buffer */
99 \fB\fBHDKIOCGDIAG\fR\fR
102 The argument is a pointer to a \fBhdk_diag\fR structure (described below).
103 This \fBioctl()\fR gets the most recent command that failed along with the
104 sector and error number from the hard disk.
111 * Used for disk diagnostics
114 ushort_t hdkd_errcmd; /* most recent command in error */
115 daddr_t hdkd_errsect; /* most recent sector in error */
116 uchar_t hdkd_errno; /* most recent error number */
117 uchar_t hdkd_severe; /* severity of most recent error */
125 \fBioctl\fR(2), \fBdkio\fR(7I)