ata_disk.h revision 507c32411f3f101e90ca2120f042b5ee698ba1d5
507c32411f3f101e90ca2120f042b5ee698ba1d5mlf * CDDL HEADER START
507c32411f3f101e90ca2120f042b5ee698ba1d5mlf * The contents of this file are subject to the terms of the
507c32411f3f101e90ca2120f042b5ee698ba1d5mlf * Common Development and Distribution License (the "License").
507c32411f3f101e90ca2120f042b5ee698ba1d5mlf * You may not use this file except in compliance with the License.
507c32411f3f101e90ca2120f042b5ee698ba1d5mlf * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
507c32411f3f101e90ca2120f042b5ee698ba1d5mlf * See the License for the specific language governing permissions
507c32411f3f101e90ca2120f042b5ee698ba1d5mlf * and limitations under the License.
507c32411f3f101e90ca2120f042b5ee698ba1d5mlf * When distributing Covered Code, include this CDDL HEADER in each
507c32411f3f101e90ca2120f042b5ee698ba1d5mlf * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
507c32411f3f101e90ca2120f042b5ee698ba1d5mlf * If applicable, add the following below this CDDL HEADER, with the
507c32411f3f101e90ca2120f042b5ee698ba1d5mlf * fields enclosed by brackets "[]" replaced with your own identifying
507c32411f3f101e90ca2120f042b5ee698ba1d5mlf * information: Portions Copyright [yyyy] [name of copyright owner]
507c32411f3f101e90ca2120f042b5ee698ba1d5mlf * CDDL HEADER END
507c32411f3f101e90ca2120f042b5ee698ba1d5mlf * Copyright 2002 Sun Microsystems, Inc. All rights reserved.
507c32411f3f101e90ca2120f042b5ee698ba1d5mlf * Use is subject to license terms.
507c32411f3f101e90ca2120f042b5ee698ba1d5mlf#pragma ident "%Z%%M% %I% %E% SMI"
507c32411f3f101e90ca2120f042b5ee698ba1d5mlfextern "C" {
507c32411f3f101e90ca2120f042b5ee698ba1d5mlf * ATA disk commands.
507c32411f3f101e90ca2120f042b5ee698ba1d5mlf#define ATC_SEEK 0x70 /* seek cmd, bottom 4 bits step rate */
507c32411f3f101e90ca2120f042b5ee698ba1d5mlf /* ATA extended (48 bit) disk commands */
507c32411f3f101e90ca2120f042b5ee698ba1d5mlf * Low bits for Read/Write commands...
507c32411f3f101e90ca2120f042b5ee698ba1d5mlf#define ATCM_ECCRETRY 0x01 /* Enable ECC and RETRY by controller */
507c32411f3f101e90ca2120f042b5ee698ba1d5mlf /* enabled if bit is CLEARED!!! */
507c32411f3f101e90ca2120f042b5ee698ba1d5mlf#define ATCM_LONGMODE 0x02 /* Use Long Mode (get/send data & ECC) */
507c32411f3f101e90ca2120f042b5ee698ba1d5mlf#define RWCMDP(pktp) ((struct dadkio_rwcmd *)((pktp)->cp_bp->b_back))
507c32411f3f101e90ca2120f042b5ee698ba1d5mlf/* useful macros */
507c32411f3f101e90ca2120f042b5ee698ba1d5mlf#define CPKT2GCMD(cpkt) ((gcmd_t *)(cpkt)->cp_ctl_private)
507c32411f3f101e90ca2120f042b5ee698ba1d5mlf#define GCMD2CPKT(cmdp) ((struct cmpkt *)((cmdp)->cmd_pktp))
507c32411f3f101e90ca2120f042b5ee698ba1d5mlf/* public function prototypes */
507c32411f3f101e90ca2120f042b5ee698ba1d5mlfint ata_disk_id(ddi_acc_handle_t io_hdl1, caddr_t ioaddr1,
507c32411f3f101e90ca2120f042b5ee698ba1d5mlfint ata_disk_bus_ctl(dev_info_t *d, dev_info_t *r, ddi_ctl_enum_t o,
507c32411f3f101e90ca2120f042b5ee698ba1d5mlf void *a, void *v);
507c32411f3f101e90ca2120f042b5ee698ba1d5mlfint ata_disk_setup_parms(ata_ctl_t *ata_ctlp, ata_drv_t *ata_drvp);
507c32411f3f101e90ca2120f042b5ee698ba1d5mlf#endif /* _ATA_DISK_H */