xref: /freebsd/sys/dev/ips/ips_disk.h (revision 95ee2897e98f5d444f26ed2334cc7c439f9c16c6)
12aedd662SScott Long /*-
2*4d846d26SWarner Losh  * SPDX-License-Identifier: BSD-2-Clause
3718cf2ccSPedro F. Giffuni  *
42aedd662SScott Long  * Copyright (c) 2002 Adaptec Inc.
52aedd662SScott Long  * All rights reserved.
62aedd662SScott Long  *
72aedd662SScott Long  * Written by: David Jeffery
82aedd662SScott Long  *
92aedd662SScott Long  * Redistribution and use in source and binary forms, with or without
102aedd662SScott Long  * modification, are permitted provided that the following conditions
112aedd662SScott Long  * are met:
122aedd662SScott Long  * 1. Redistributions of source code must retain the above copyright
132aedd662SScott Long  *    notice, this list of conditions and the following disclaimer.
142aedd662SScott Long  * 2. Redistributions in binary form must reproduce the above copyright
152aedd662SScott Long  *    notice, this list of conditions and the following disclaimer in the
162aedd662SScott Long  *    documentation and/or other materials provided with the distribution.
172aedd662SScott Long  *
182aedd662SScott Long  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
192aedd662SScott Long  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
202aedd662SScott Long  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
212aedd662SScott Long  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
222aedd662SScott Long  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
232aedd662SScott Long  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
242aedd662SScott Long  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
252aedd662SScott Long  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
262aedd662SScott Long  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
272aedd662SScott Long  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
282aedd662SScott Long  * SUCH DAMAGE.
292aedd662SScott Long  */
302aedd662SScott Long 
312aedd662SScott Long 
322aedd662SScott Long #include <sys/param.h>
332aedd662SScott Long #include <sys/systm.h>
342aedd662SScott Long #include <sys/kernel.h>
352aedd662SScott Long #include <sys/bus.h>
362aedd662SScott Long #include <sys/conf.h>
372aedd662SScott Long #include <sys/types.h>
382aedd662SScott Long #include <sys/queue.h>
392aedd662SScott Long #include <sys/disk.h>
402aedd662SScott Long #include <sys/bio.h>
412aedd662SScott Long #include <sys/disk.h>
422aedd662SScott Long #include <geom/geom_disk.h>
432aedd662SScott Long 
442aedd662SScott Long #include <machine/bus.h>
452aedd662SScott Long #include <sys/rman.h>
462aedd662SScott Long #include <machine/resource.h>
472aedd662SScott Long 
4877e6a3b2SWarner Losh #include <dev/pci/pcireg.h>
4977e6a3b2SWarner Losh #include <dev/pci/pcivar.h>
502aedd662SScott Long 
512aedd662SScott Long #define IPS_MAX_IO_SIZE		0x10000
522aedd662SScott Long 
532aedd662SScott Long #define IPS_COMP_HEADS       	128
542aedd662SScott Long #define IPS_COMP_SECTORS     	32
552aedd662SScott Long #define IPS_NORM_HEADS       	254
562aedd662SScott Long #define IPS_NORM_SECTORS     	63
572aedd662SScott Long 
582aedd662SScott Long typedef struct ipsdisk_softc {
592aedd662SScott Long 	device_t 	dev;
602aedd662SScott Long 	int		unit;
612aedd662SScott Long 	int		disk_number;
622aedd662SScott Long 	u_int32_t 	state;
630b7ed341SPoul-Henning Kamp 	struct disk 	*ipsd_disk;
642aedd662SScott Long 	ips_softc_t	*sc;
652aedd662SScott Long }ipsdisk_softc_t;
66