xio.h revision 1.1
11.1Spk/* $NetBSD: xio.h,v 1.1 1997/11/01 22:56:29 pk Exp $ */ 21.1Spk 31.1Spk/* 41.1Spk * 51.1Spk * Copyright (c) 1995 Charles D. Cranor 61.1Spk * All rights reserved. 71.1Spk * 81.1Spk * Redistribution and use in source and binary forms, with or without 91.1Spk * modification, are permitted provided that the following conditions 101.1Spk * are met: 111.1Spk * 1. Redistributions of source code must retain the above copyright 121.1Spk * notice, this list of conditions and the following disclaimer. 131.1Spk * 2. Redistributions in binary form must reproduce the above copyright 141.1Spk * notice, this list of conditions and the following disclaimer in the 151.1Spk * documentation and/or other materials provided with the distribution. 161.1Spk * 3. All advertising materials mentioning features or use of this software 171.1Spk * must display the following acknowledgement: 181.1Spk * This product includes software developed by Charles D. Cranor. 191.1Spk * 4. The name of the author may not be used to endorse or promote products 201.1Spk * derived from this software without specific prior written permission. 211.1Spk * 221.1Spk * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 231.1Spk * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 241.1Spk * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 251.1Spk * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 261.1Spk * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 271.1Spk * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 281.1Spk * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 291.1Spk * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 301.1Spk * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 311.1Spk * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 321.1Spk */ 331.1Spk 341.1Spk/* 351.1Spk * x i o . h 361.1Spk * 371.1Spk * this file defines the software structure we use to ioctl the 381.1Spk * 753/7053. this interface isn't set in stone and may (or may not) 391.1Spk * need adjustment. 401.1Spk * 411.1Spk * author: Chuck Cranor <chuck@ccrc.wustl.edu> 421.1Spk */ 431.1Spk 441.1Spk/* 451.1Spk * xylogic ioctl interface 461.1Spk */ 471.1Spk 481.1Spkstruct xd_iocmd { 491.1Spk u_char cmd; /* in: command number */ 501.1Spk u_char subfn; /* in: subfunction number */ 511.1Spk u_char errno; /* out: error number */ 521.1Spk u_char tries; /* out: number of tries */ 531.1Spk u_short sectcnt;/* in,out: sector count (hw_spt on read drive param) */ 541.1Spk u_short dlen; /* in: length of data buffer (good sanity check) */ 551.1Spk u_long block; /* in: block number */ 561.1Spk caddr_t dptr; /* in: data buffer to do I/O from */ 571.1Spk}; 581.1Spk 591.1Spk#ifndef DIOSXDCMD 601.1Spk#define DIOSXDCMD _IOWR('x', 101, struct xd_iocmd) /* do xd command */ 611.1Spk#endif 621.1Spk 631.1Spk#define XD_IOCMD_MAXS 16 /* max number of sectors you can do */ 641.1Spk#define XD_IOCMD_HSZ 4 /* size of one header */ 651.1Spk#define XD_IOCMD_DMSZ 24 /* defect map size */ 66