173050Smsmith/*- 273050Smsmith * Copyright (c) 2001 Michael Smith 373050Smsmith * All rights reserved. 473050Smsmith * 573050Smsmith * Redistribution and use in source and binary forms, with or without 673050Smsmith * modification, are permitted provided that the following conditions 773050Smsmith * are met: 873050Smsmith * 1. Redistributions of source code must retain the above copyright 973050Smsmith * notice, this list of conditions and the following disclaimer. 1073050Smsmith * 2. Redistributions in binary form must reproduce the above copyright 1173050Smsmith * notice, this list of conditions and the following disclaimer in the 1273050Smsmith * documentation and/or other materials provided with the distribution. 1373050Smsmith * 1473050Smsmith * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 1573050Smsmith * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1673050Smsmith * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1773050Smsmith * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 1873050Smsmith * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1973050Smsmith * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2073050Smsmith * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2173050Smsmith * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2273050Smsmith * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2373050Smsmith * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2473050Smsmith * SUCH DAMAGE. 2573050Smsmith * 2673050Smsmith * $FreeBSD: releng/11.0/sys/dev/mly/mlyio.h 79695 2001-07-14 00:12:23Z msmith $ 2773050Smsmith */ 2873050Smsmith 2973050Smsmith/******************************************************************************** 3073050Smsmith * Control structures exchanged through the GAM interface with userland 3173050Smsmith * management tools. 3273050Smsmith * 3373050Smsmith * The member naming here is consistent with the Linux driver, with which this 3473050Smsmith * interface is basically compatible. 3573050Smsmith */ 3673050Smsmithstruct mly_user_command 3773050Smsmith{ 3873050Smsmith unsigned char ControllerNumber; 3973050Smsmith union mly_command_packet CommandMailbox; 4073050Smsmith int DataTransferLength; 4173050Smsmith int RequestSenseLength; 4273050Smsmith void *DataTransferBuffer; 4373050Smsmith void *RequestSenseBuffer; 4473050Smsmith int CommandStatus; /* not in the Linux structure */ 4573050Smsmith}; 4673050Smsmith 4773050Smsmith#define MLYIO_COMMAND _IOWR('M', 200, struct mly_user_command) 4873050Smsmith 4973050Smsmithstruct mly_user_health 5073050Smsmith{ 5173050Smsmith unsigned char ControllerNumber; 5273050Smsmith void *HealthStatusBuffer; 5373050Smsmith}; 5473050Smsmith 5573050Smsmith#define MLYIO_HEALTH _IOW('M', 201, struct mly_user_health) 5673050Smsmith 5773050Smsmith/* 5873050Smsmith * Command queue statistics 5973050Smsmith */ 6073050Smsmith 6173050Smsmith#define MLYQ_FREE 0 6279695Smsmith#define MLYQ_BUSY 1 6379695Smsmith#define MLYQ_COMPLETE 2 6479695Smsmith#define MLYQ_COUNT 3 6573050Smsmith 6673050Smsmithstruct mly_qstat 6773050Smsmith{ 6873050Smsmith u_int32_t q_length; 6973050Smsmith u_int32_t q_max; 7073050Smsmith}; 71