/****************************************************************************** * QLOGIC LINUX SOFTWARE * * QLogic ISP2x00 device driver for Linux 2.6.x * Copyright (C) 2003-2004 QLogic Corporation * (www.qlogic.com) * * Portions (C) Arjan van de Ven for Red Hat, Inc. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2, or (at your option) any * later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * ******************************************************************************/ #ifndef __QLA_OS_H #define __QLA_OS_H #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "scsi.h" #include "hosts.h" #include #include #include #include //TODO Fix this!!! /* * String arrays */ #define LINESIZE 256 #define MAXARGS 26 /*********************************************************************** * We use the struct scsi_pointer structure that's included with each * command SCSI_Cmnd as a scratchpad. * * SCp is defined as follows: * - SCp.ptr -- > pointer to the SRB * - SCp.this_residual -- > HBA completion status for ioctl code. * * Cmnd->host_scribble --> Used to hold the hba actived handle (1..255). ***********************************************************************/ #define CMD_SP(Cmnd) ((Cmnd)->SCp.ptr) #define CMD_COMPL_STATUS(Cmnd) ((Cmnd)->SCp.this_residual) /* Additional fields used by ioctl passthru */ #define CMD_RESID_LEN(Cmnd) ((Cmnd)->SCp.buffers_residual) #define CMD_SCSI_STATUS(Cmnd) ((Cmnd)->SCp.Status) #define CMD_ACTUAL_SNSLEN(Cmnd) ((Cmnd)->SCp.Message) #define CMD_ENTRY_STATUS(Cmnd) ((Cmnd)->SCp.have_data_in) #endif