4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
30 #pragma ident "%Z%%M% %I% %E% SMI"
36 #include <sys/types.h>
38 #include "misc_scsi.h"
40 struct trackio_error
{
44 /* Transport Errors */
45 uchar_t status
, key
, asc
, ascq
;
51 #define TRACKIO_ERR_SYSTEM 1
52 #define TRACKIO_ERR_TRANSPORT 2
53 #define TRACKIO_ERR_USER_ABORT 3
58 #define IOBS_UNDER_FILE_IO 1
59 #define IOBS_UNDER_DEVICE_IO 2
65 uint32_t iob_total_size
; /* total size of the buf */
66 uint32_t iob_data_size
; /* size of the data in buf */
67 uint32_t iob_start_blk
; /* starting block address on the device */
68 uint16_t iob_nblks
; /* number of data blocks in this buf */
69 int iob_state
; /* state of buf */
72 /* Use small buffers. Some drives do not behave well with large buffers */
74 #define NBLKS_PER_BUF 24 /* < 64K in all cases */
75 #define DATA_TRACK_BLKSIZE 2048
76 #define AUDIO_TRACK_BLKSIZE 2352
78 int write_track(cd_device
*dev
, struct track_info
*ti
, bstreamhandle h
,
79 int (*cb
)(int64_t, int64_t), int64_t arg
, struct
86 #endif /* _TRACKIO_H */