119304Speter# Copyright (c) 2004 - 2008 S��ren Schmidt <sos@FreeBSD.org> 219304Speter# All rights reserved. 319304Speter# 419304Speter# Redistribution and use in source and binary forms, with or without 519304Speter# modification, are permitted provided that the following conditions 619304Speter# are met: 719304Speter# 1. Redistributions of source code must retain the above copyright 819304Speter# notice, this list of conditions and the following disclaimer, 919304Speter# without modification, immediately at the beginning of the file. 1019304Speter# 2. Redistributions in binary form must reproduce the above copyright 1119304Speter# notice, this list of conditions and the following disclaimer in the 1219304Speter# documentation and/or other materials provided with the distribution. 1319304Speter# 1419304Speter# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 1519304Speter# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 1619304Speter# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 1719304Speter# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 1819304Speter# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 1919304Speter# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2019304Speter# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2119304Speter# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2219304Speter# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 2319304Speter# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2419304Speter# 2519304Speter# $FreeBSD$ 2619304Speter 2719304Speter#include <sys/bus.h> 2819304Speter#include <sys/kernel.h> 2919304Speter#include <sys/param.h> 3019304Speter#include <sys/types.h> 3119304Speter#include <sys/callout.h> 3219304Speter#include <sys/sema.h> 3319304Speter#include <sys/taskqueue.h> 3419304Speter#include <vm/uma.h> 3519304Speter#include <machine/bus.h> 3619304Speter#include <sys/ata.h> 3719304Speter#include <dev/ata/ata-all.h> 3819304Speter 3919304SpeterINTERFACE ata; 4019304Speter 4119304SpeterCODE { 4219304Speter static int ata_null_setmode(device_t dev, int target, int mode) 4319304Speter { 4419304Speter 4519304Speter if (mode > ATA_PIO_MAX) 4619304Speter return (ATA_PIO_MAX); 4719304Speter return (mode); 4819304Speter } 4919304Speter}; 5019304SpeterMETHOD int setmode { 5119304Speter device_t dev; 5219304Speter int target; 5319304Speter int mode; 5419304Speter} DEFAULT ata_null_setmode; 5519304Speter 5619304SpeterCODE { 5719304Speter static int ata_null_getrev(device_t dev, int target) 5819304Speter { 5919304Speter return (0); 6019304Speter } 6119304Speter}; 6219304Speter 6319304SpeterMETHOD int getrev { 6419304Speter device_t dev; 6519304Speter int target; 6619304Speter} DEFAULT ata_null_getrev; 6719304Speter 6819304SpeterMETHOD void reset { 6919304Speter device_t channel; 7019304Speter} DEFAULT ata_generic_reset; 7119304Speter 7219304SpeterMETHOD int reinit { 7319304Speter device_t dev; 7419304Speter}; 7519304Speter