1edc6143bSDavid Rhodus /*- 2edc6143bSDavid Rhodus * Copyright (c) 2002 Adaptec Inc. 3edc6143bSDavid Rhodus * All rights reserved. 4edc6143bSDavid Rhodus * 5edc6143bSDavid Rhodus * Written by: David Jeffery 6edc6143bSDavid Rhodus * 7edc6143bSDavid Rhodus * Redistribution and use in source and binary forms, with or without 8edc6143bSDavid Rhodus * modification, are permitted provided that the following conditions 9edc6143bSDavid Rhodus * are met: 10edc6143bSDavid Rhodus * 1. Redistributions of source code must retain the above copyright 11edc6143bSDavid Rhodus * notice, this list of conditions and the following disclaimer. 12edc6143bSDavid Rhodus * 2. Redistributions in binary form must reproduce the above copyright 13edc6143bSDavid Rhodus * notice, this list of conditions and the following disclaimer in the 14edc6143bSDavid Rhodus * documentation and/or other materials provided with the distribution. 15edc6143bSDavid Rhodus * 16edc6143bSDavid Rhodus * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 17edc6143bSDavid Rhodus * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18edc6143bSDavid Rhodus * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19edc6143bSDavid Rhodus * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 20edc6143bSDavid Rhodus * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21edc6143bSDavid Rhodus * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22edc6143bSDavid Rhodus * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23edc6143bSDavid Rhodus * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24edc6143bSDavid Rhodus * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25edc6143bSDavid Rhodus * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26edc6143bSDavid Rhodus * SUCH DAMAGE. 27edc6143bSDavid Rhodus * 28edc6143bSDavid Rhodus * $FreeBSD: src/sys/dev/ips/ips_disk.h,v 1.2 2003/08/22 06:00:27 imp Exp $ 29edc6143bSDavid Rhodus */ 30edc6143bSDavid Rhodus 31edc6143bSDavid Rhodus 32edc6143bSDavid Rhodus #include <sys/param.h> 33edc6143bSDavid Rhodus #include <sys/systm.h> 34edc6143bSDavid Rhodus #include <sys/kernel.h> 35edc6143bSDavid Rhodus #include <sys/bus.h> 36edc6143bSDavid Rhodus #include <sys/conf.h> 37edc6143bSDavid Rhodus #include <sys/types.h> 38edc6143bSDavid Rhodus #include <sys/queue.h> 39edc6143bSDavid Rhodus #include <sys/disk.h> 40edc6143bSDavid Rhodus #include <sys/buf.h> 41edc6143bSDavid Rhodus #include <sys/rman.h> 42edc6143bSDavid Rhodus 43edc6143bSDavid Rhodus #include <bus/pci/pcireg.h> 44edc6143bSDavid Rhodus #include <bus/pci/pcivar.h> 45edc6143bSDavid Rhodus 46edc6143bSDavid Rhodus #define IPS_MAX_IO_SIZE 0x10000 47edc6143bSDavid Rhodus 48edc6143bSDavid Rhodus #define IPS_COMP_HEADS 128 49edc6143bSDavid Rhodus #define IPS_COMP_SECTORS 32 50edc6143bSDavid Rhodus #define IPS_NORM_HEADS 254 51edc6143bSDavid Rhodus #define IPS_NORM_SECTORS 63 52edc6143bSDavid Rhodus 53edc6143bSDavid Rhodus typedef struct ipsdisk_softc { 54edc6143bSDavid Rhodus device_t dev; 55edc6143bSDavid Rhodus int unit; 56edc6143bSDavid Rhodus int disk_number; 57edc6143bSDavid Rhodus u_int32_t state; 58edc6143bSDavid Rhodus struct disk ipsd_disk; 59*b13267a5SMatthew Dillon cdev_t ipsd_dev_t; 60edc6143bSDavid Rhodus ips_softc_t *sc; 61287d1e34SYONETANI Tomokazu struct devstat stats; 62edc6143bSDavid Rhodus } ipsdisk_softc_t; 63