1 /*-
2 * Copyright (c) 1998 - 2004 Søren Schmidt <sos@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer,
10 * without modification, immediately at the beginning of the file.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * 3. The name of the author may not be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 *
28 * $FreeBSD$
29 */
30
31 /* ATA commands */
32 #define ATA_NOP 0x00 /* NOP command */
33 #define ATA_NF_FLUSHQUEUE 0x00 /* flush queued cmd's */
34 #define ATA_NF_AUTOPOLL 0x01 /* start autopoll function */
35 #define ATA_ATAPI_RESET 0x08 /* reset ATAPI device */
36 #define ATA_READ 0x20 /* read command */
37 #define ATA_READ48 0x24 /* read command */
38 #define ATA_READ_DMA48 0x25 /* read w/DMA command */
39 #define ATA_READ_DMA_QUEUED48 0x26 /* read w/DMA QUEUED command */
40 #define ATA_READ_MUL48 0x29 /* read multi command */
41 #define ATA_WRITE 0x30 /* write command */
42 #define ATA_WRITE48 0x34 /* write command */
43 #define ATA_WRITE_DMA48 0x35 /* write w/DMA command */
44 #define ATA_WRITE_DMA_QUEUED48 0x36 /* write w/DMA QUEUED command */
45 #define ATA_WRITE_MUL48 0x39 /* write multi command */
46 #define ATA_READ_FPDMA_QUEUED 0x60 /* read w/DMA NCQ */
47 #define ATA_WRITE_FPDMA_QUEUED 0x61 /* write w/DMA NCQ */
48 #define ATA_PACKET_CMD 0xa0 /* packet command */
49 #define ATA_ATAPI_IDENTIFY 0xa1 /* get ATAPI params*/
50 #define ATA_SERVICE 0xa2 /* service command */
51 #define ATA_READ_MUL 0xc4 /* read multi command */
52 #define ATA_WRITE_MUL 0xc5 /* write multi command */
53 #define ATA_SET_MULTI 0xc6 /* set multi size command */
54 #define ATA_READ_DMA_QUEUED 0xc7 /* read w/DMA QUEUED command */
55 #define ATA_READ_DMA 0xc8 /* read w/DMA command */
56 #define ATA_WRITE_DMA 0xca /* write w/DMA command */
57 #define ATA_WRITE_DMA_QUEUED 0xcc /* write w/DMA QUEUED command */
58 #define ATA_SLEEP 0xe6 /* sleep command */
59 #define ATA_FLUSHCACHE 0xe7 /* flush cache to disk */
60 #define ATA_FLUSHCACHE48 0xea /* flush cache to disk */
61 #define ATA_ATA_IDENTIFY 0xec /* get ATA params */
62 #define ATA_SETFEATURES 0xef /* features command */
63 #define ATA_SF_SETXFER 0x03 /* set transfer mode */
64 #define ATA_SF_ENAB_WCACHE 0x02 /* enable write cache */
65 #define ATA_SF_DIS_WCACHE 0x82 /* disable write cache */
66 #define ATA_SF_ENAB_RCACHE 0xaa /* enable readahead cache */
67 #define ATA_SF_DIS_RCACHE 0x55 /* disable readahead cache */
68 #define ATA_SF_ENAB_RELIRQ 0x5d /* enable release interrupt */
69 #define ATA_SF_DIS_RELIRQ 0xdd /* disable release interrupt */
70 #define ATA_SF_ENAB_SRVIRQ 0x5e /* enable service interrupt */
71 #define ATA_SF_DIS_SRVIRQ 0xde /* disable service interrupt */
72
73 /* ATAPI commands */
74 #define ATAPI_TEST_UNIT_READY 0x00 /* check if device is ready */
75 #define ATAPI_REZERO 0x01 /* rewind */
76 #define ATAPI_REQUEST_SENSE 0x03 /* get sense data */
77 #define ATAPI_FORMAT 0x04 /* format unit */
78 #define ATAPI_READ 0x08 /* read data */
79 #define ATAPI_WRITE 0x0a /* write data */
80 #define ATAPI_WEOF 0x10 /* write filemark */
81 #define ATAPI_WF_WRITE 0x01
82 #define ATAPI_SPACE 0x11 /* space command */
83 #define ATAPI_SP_FM 0x01
84 #define ATAPI_SP_EOD 0x03
85 #define ATAPI_MODE_SELECT 0x15 /* mode select */
86 #define ATAPI_ERASE 0x19 /* erase */
87 #define ATAPI_MODE_SENSE 0x1a /* mode sense */
88 #define ATAPI_START_STOP 0x1b /* start/stop unit */
89 #define ATAPI_SS_LOAD 0x01
90 #define ATAPI_SS_RETENSION 0x02
91 #define ATAPI_SS_EJECT 0x04
92 #define ATAPI_PREVENT_ALLOW 0x1e /* media removal */
93 #define ATAPI_READ_FORMAT_CAPACITIES 0x23 /* get format capacities */
94 #define ATAPI_READ_CAPACITY 0x25 /* get volume capacity */
95 #define ATAPI_READ_BIG 0x28 /* read data */
96 #define ATAPI_WRITE_BIG 0x2a /* write data */
97 #define ATAPI_LOCATE 0x2b /* locate to position */
98 #define ATAPI_READ_POSITION 0x34 /* read position */
99 #define ATAPI_SYNCHRONIZE_CACHE 0x35 /* flush buf, close channel */
100 #define ATAPI_WRITE_BUFFER 0x3b /* write device buffer */
101 #define ATAPI_READ_BUFFER 0x3c /* read device buffer */
102 #define ATAPI_READ_SUBCHANNEL 0x42 /* get subchannel info */
103 #define ATAPI_READ_TOC 0x43 /* get table of contents */
104 #define ATAPI_PLAY_10 0x45 /* play by lba */
105 #define ATAPI_PLAY_MSF 0x47 /* play by MSF address */
106 #define ATAPI_PLAY_TRACK 0x48 /* play by track number */
107 #define ATAPI_PAUSE 0x4b /* pause audio operation */
108 #define ATAPI_READ_DISK_INFO 0x51 /* get disk info structure */
109 #define ATAPI_READ_TRACK_INFO 0x52 /* get track info structure */
110 #define ATAPI_RESERVE_TRACK 0x53 /* reserve track */
111 #define ATAPI_SEND_OPC_INFO 0x54 /* send OPC structurek */
112 #define ATAPI_MODE_SELECT_BIG 0x55 /* set device parameters */
113 #define ATAPI_REPAIR_TRACK 0x58 /* repair track */
114 #define ATAPI_READ_MASTER_CUE 0x59 /* read master CUE info */
115 #define ATAPI_MODE_SENSE_BIG 0x5a /* get device parameters */
116 #define ATAPI_CLOSE_TRACK 0x5b /* close track/session */
117 #define ATAPI_READ_BUFFER_CAPACITY 0x5c /* get buffer capicity */
118 #define ATAPI_SEND_CUE_SHEET 0x5d /* send CUE sheet */
119 #define ATAPI_BLANK 0xa1 /* blank the media */
120 #define ATAPI_SEND_KEY 0xa3 /* send DVD key structure */
121 #define ATAPI_REPORT_KEY 0xa4 /* get DVD key structure */
122 #define ATAPI_PLAY_12 0xa5 /* play by lba */
123 #define ATAPI_LOAD_UNLOAD 0xa6 /* changer control command */
124 #define ATAPI_READ_STRUCTURE 0xad /* get DVD structure */
125 #define ATAPI_PLAY_CD 0xb4 /* universal play command */
126 #define ATAPI_SET_SPEED 0xbb /* set drive speed */
127 #define ATAPI_MECH_STATUS 0xbd /* get changer status */
128 #define ATAPI_READ_CD 0xbe /* read data */
129 #define ATAPI_POLL_DSC 0xff /* poll DSC status bit */
Cache object: ca2ea0e3a0a6574679016359d650aef6
|