8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / man / man9f / csx_Parse_CISTPL_FORMAT.9f
blobc5e9abb1d755dabffee9720dd4526ac6d5bdf345
1 '\" te
2 .\"  Copyright (c) 1997, 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 CSX_PARSE_CISTPL_FORMAT 9F "Jan 24, 1997"
7 .SH NAME
8 csx_Parse_CISTPL_FORMAT \- parse the Data Recording Format tuple
9 .SH SYNOPSIS
10 .LP
11 .nf
12 #include <sys/pccard.h>
16 \fBint32_t\fR \fBcsx_Parse_CISTPL_FORMAT\fR(\fBclient_handle_t\fR \fIch\fR, \fBtuple_t *\fR\fItu\fR,
17      \fBcistpl_format_t *\fR\fIpt\fR);
18 .fi
20 .SH INTERFACE LEVEL
21 .sp
22 .LP
23 Solaris \fBDDI \fRSpecific (Solaris \fBDDI) \fR
24 .SH PARAMETERS
25 .sp
26 .ne 2
27 .na
28 \fB\fIch\fR\fR
29 .ad
30 .RS 6n
31 Client handle returned from \fBcsx_RegisterClient\fR(9F).
32 .RE
34 .sp
35 .ne 2
36 .na
37 \fB\fItu\fR\fR
38 .ad
39 .RS 6n
40 Pointer to a \fBtuple_t\fR structure (see \fBtuple\fR(9S)) returned by a call
41 to \fBcsx_GetFirstTuple\fR(9F) or \fBcsx_GetNextTuple\fR(9F).
42 .RE
44 .sp
45 .ne 2
46 .na
47 \fB\fIpt\fR\fR
48 .ad
49 .RS 6n
50 Pointer to a \fBcistpl_format_t\fR structure which contains the parsed
51 \fBCISTPL_FORMAT\fR tuple information upon return from this function.
52 .RE
54 .SH DESCRIPTION
55 .sp
56 .LP
57 This function parses the Data Recording Format tuple, \fBCISTPL_FORMAT,\fR into
58 a form usable by \fBPC \fRCard drivers.
59 .sp
60 .LP
61 The \fBCISTPL_FORMAT\fR tuple indicates the data recording format for a device
62 partition.
63 .SH STRUCTURE MEMBERS
64 .sp
65 .LP
66 The structure members of \fBcistpl_format_t\fR are:
67 .sp
68 .in +2
69 .nf
70 uint32_t     type;
71 uint32_t     edc_length;
72 uint32_t     edc_type;
73 uint32_t     offset;
74 uint32_t     nbytes;
75 uint32_t     dev.disk.bksize;
76 uint32_t     dev.disk.nblocks;
77 uint32_t     dev.disk.edcloc;
78 uint32_t     dev.mem.flags;
79 uint32_t     dev.mem.reserved;
80 caddr_t      dev.mem.address;
81 uint32_t     dev.mem.edcloc;
82 .fi
83 .in -2
85 .sp
86 .LP
87 The fields are defined as follows:
88 .sp
89 .ne 2
90 .na
91 \fB\fBtype\fR\fR
92 .ad
93 .RS 20n
94 This field indicates the type of device:
95 .sp
96 .ne 2
97 .na
98 \fBTPLFMTTYPE_DISK\fR
99 .ad
100 .RS 19n
101 disk-like device
105 .ne 2
107 \fBTPLFMTTYPE_MEM\fR
109 .RS 19n
110 memory-like device
114 .ne 2
116 \fBTPLFMTTYPE_VS\fR
118 .RS 19n
119 vendor-specific device
125 .ne 2
127 \fB\fBedc_length\fR\fR
129 .RS 20n
130 This field indicates the error detection code length.
134 .ne 2
136 \fB\fBedc_type\fR\fR
138 .RS 20n
139 This field indicates the error detection code type.
143 .ne 2
145 \fB\fBoffset\fR\fR
147 .RS 20n
148 This field indicates the offset of the first byte of data in this partition.
152 .ne 2
154 \fB\fBnbytes\fR\fR
156 .RS 20n
157 This field indicates the number of bytes of data in this partition
161 .ne 2
163 \fB\fBdev.disk.bksize\fR\fR
165 .RS 20n
166 This field indicates the block size, for disk devices.
170 .ne 2
172 \fB\fBdev.disk.nblocks\fR\fR
174 .RS 20n
175 This field indicates the number of blocks, for disk devices.
179 .ne 2
181 \fB\fBdev.disk.edcloc\fR\fR
183 .RS 20n
184 This field indicates the location of the error detection code, for disk
185 devices.
189 .ne 2
191 \fB\fBdev.mem.flags\fR\fR
193 .RS 20n
194 This field provides flags, for memory devices.  Valid flags are:
196 .ne 2
198 \fBTPLFMTFLAGS_ADDR\fR
200 .RS 20n
201 address is valid
205 .ne 2
207 \fBTPLFMTFLAGS_AUTO\fR
209 .RS 20n
210 automatically map memory region
216 .ne 2
218 \fB\fBdev.mem.reserved\fR\fR
220 .RS 20n
221 This field is reserved.
225 .ne 2
227 \fB\fBdev.mem.address\fR\fR
229 .RS 20n
230 This field indicates the physical address, for memory devices.
234 .ne 2
236 \fB\fBdev.mem.edcloc\fR\fR
238 .RS 20n
239 This field indicates the location of the error detection code, for memory
240 devices.
243 .SH RETURN VALUES
245 .ne 2
247 \fB\fBCS_SUCCESS\fR\fR
249 .RS 27n
250 Successful operation.
254 .ne 2
256 \fB\fBCS_BAD_HANDLE\fR\fR
258 .RS 27n
259 Client handle is invalid.
263 .ne 2
265 \fB\fBCS_UNKNOWN_TUPLE\fR\fR
267 .RS 27n
268 Parser does not know how to parse tuple.
272 .ne 2
274 \fB\fBCS_NO_CARD\fR\fR
276 .RS 27n
277 No \fBPC \fRCard in socket.
281 .ne 2
283 \fB\fBCS_NO_CIS\fR\fR
285 .RS 27n
286 No Card Information Structure (CIS) on \fBPC \fRCard.
290 .ne 2
292 \fB\fBCS_UNSUPPORTED_FUNCTION\fR\fR
294 .RS 27n
295 No \fBPCMCIA \fRhardware installed.
298 .SH CONTEXT
301 This function may be called from user or kernel context.
302 .SH SEE ALSO
305 \fBcsx_GetFirstTuple\fR(9F), \fBcsx_GetTupleData\fR(9F),
306 \fBcsx_RegisterClient\fR(9F), \fBcsx_ValidateCIS\fR(9F), \fBtuple\fR(9S)
309 \fIPC Card 95 Standard, PCMCIA/JEIDA\fR