source: trunk/src/os2ahci/atapi.c@ 39

Last change on this file since 39 was 39, checked in by markus, 15 years ago

fixed bug reading CHS from identify package result; fixed ATA geometry mapping

File size: 3.5 KB
Line 
1/******************************************************************************
2 * atapi.c - ATAPI command processing
3 *
4 * Copyright (c) 2010 Christian Mueller, Markus Thielen.
5 * Parts copied from/inspired by the Linux AHCI driver;
6 * those parts are (c) Linux AHCI/ATA maintainers
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22
23#include "os2ahci.h"
24#include "ata.h"
25
26/* -------------------------- macros and constants ------------------------- */
27
28/* ------------------------ typedefs and structures ------------------------ */
29
30/* -------------------------- function prototypes -------------------------- */
31
32/* ------------------------ global/static variables ------------------------ */
33
34/* ----------------------------- start of code ----------------------------- */
35
36/******************************************************************************
37 * Get device or media geometry. This function is expected to check the IORB
38 * command codes and modifiers to see which one is requested.
39 */
40int atapi_get_geometry(IORBH _far *iorb, int slot)
41{
42 iorb_seterr(iorb, IOERR_CMD_NOT_SUPPORTED);
43 return(-1);
44}
45
46/******************************************************************************
47 * Test whether unit is ready.
48 */
49int atapi_unit_ready(IORBH _far *iorb, int slot)
50{
51 iorb_seterr(iorb, IOERR_CMD_NOT_SUPPORTED);
52 return(-1);
53}
54
55/******************************************************************************
56 * Read sectors from AHCI device.
57 */
58int atapi_read(IORBH _far *iorb, int slot)
59{
60 iorb_seterr(iorb, IOERR_CMD_NOT_SUPPORTED);
61 return(-1);
62}
63
64/******************************************************************************
65 * Verify readability of sectors on AHCI device.
66 */
67int atapi_verify(IORBH _far *iorb, int slot)
68{
69 iorb_seterr(iorb, IOERR_CMD_NOT_SUPPORTED);
70 return(-1);
71}
72
73/******************************************************************************
74 * Write sectors to AHCI device.
75 */
76int atapi_write(IORBH _far *iorb, int slot)
77{
78 iorb_seterr(iorb, IOERR_CMD_NOT_SUPPORTED);
79 return(-1);
80}
81
82/******************************************************************************
83 * Execute ATAPI command.
84 */
85int atapi_execute_cdb(IORBH _far *iorb, int slot)
86{
87 iorb_seterr(iorb, IOERR_CMD_NOT_SUPPORTED);
88 return(-1);
89}
90
91/******************************************************************************
92 * Request sense information for a failed command.
93 *
94 * NOTE: This function must be called right after an ATAPI command has failed
95 * and before any other commands are queued on the corresponding device.
96 * This function is typically called in the port restart context hook
97 * which is triggered by an AHCI error interrupt.
98 *
99 */
100int atapi_req_sense(IORBH _far *iorb, int slot)
101{
102 iorb_seterr(iorb, IOERR_CMD_NOT_SUPPORTED);
103 return(-1);
104}
105
Note: See TracBrowser for help on using the repository browser.