~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Wine Cross Reference
wine/dlls/wnaspi32/winescsi.h

Version: ~ [ wine-1.5.31 ] ~ [ wine-1.5.30 ] ~ [ wine-1.5.29 ] ~ [ wine-1.5.28 ] ~ [ wine-1.5.27 ] ~ [ wine-1.5.26 ] ~ [ wine-1.5.25 ] ~ [ wine-1.5.24 ] ~ [ wine-1.5.23 ] ~ [ wine-1.5.22 ] ~ [ wine-1.5.21 ] ~ [ wine-1.5.20 ] ~ [ wine-1.5.19 ] ~ [ wine-1.5.18 ] ~ [ wine-1.5.17 ] ~ [ wine-1.5.16 ] ~ [ wine-1.5.15 ] ~ [ wine-1.5.14 ] ~ [ wine-1.5.13 ] ~ [ wine-1.5.12 ] ~ [ wine-1.5.11 ] ~ [ wine-1.5.10 ] ~ [ wine-1.5.9 ] ~ [ wine-1.5.8 ] ~ [ wine-1.5.7 ] ~ [ wine-1.4.1 ] ~ [ wine-1.5.6 ] ~ [ wine-1.5.5 ] ~ [ wine-1.5.4 ] ~ [ wine-1.5.3 ] ~ [ wine-1.5.2 ] ~ [ wine-1.5.1 ] ~ [ wine-1.5.0 ] ~ [ wine-1.4 ] ~ [ wine-1.4-rc6 ] ~ [ wine-1.4-rc5 ] ~ [ wine-1.4-rc4 ] ~ [ wine-1.4-rc3 ] ~ [ wine-1.4-rc2 ] ~ [ wine-1.4-rc1 ] ~ [ wine-1.3.37 ] ~ [ wine-1.3.36 ] ~ [ wine-1.3.35 ] ~ [ wine-1.3.34 ] ~ [ wine-1.3.33 ] ~ [ wine-1.3.32 ] ~ [ wine-1.3.31 ] ~ [ wine-1.3.30 ] ~ [ wine-1.3.29 ] ~ [ wine-1.3.28 ] ~ [ wine-1.3.27 ] ~ [ wine-1.3.26 ] ~ [ wine-1.3.25 ] ~ [ wine-1.3.24 ] ~ [ wine-1.3.23 ] ~ [ wine-1.3.22 ] ~ [ wine-1.3.21 ] ~ [ wine-1.3.20 ] ~ [ wine-1.3.19 ] ~ [ wine-1.3.18 ] ~ [ wine-1.2.3 ] ~ [ wine-1.3.17 ] ~ [ wine-1.3.16 ] ~ [ wine-1.3.15 ] ~ [ wine-1.3.14 ] ~ [ wine-1.3.13 ] ~ [ wine-1.3.12 ] ~ [ wine-1.3.11 ] ~ [ wine-1.3.10 ] ~ [ wine-1.3.9 ] ~ [ wine-1.2.2 ] ~ [ wine-1.3.8 ] ~ [ wine-1.3.7 ] ~ [ wine-1.3.6 ] ~ [ wine-1.3.5 ] ~ [ wine-1.2.1 ] ~ [ wine-1.3.4 ] ~ [ wine-1.3.3 ] ~ [ wine-1.3.2 ] ~ [ wine-1.3.1 ] ~ [ wine-1.3.0 ] ~ [ wine-1.2 ] ~ [ wine-1.2-rc7 ] ~ [ wine-1.2-rc6 ] ~ [ wine-1.2-rc5 ] ~ [ wine-1.2-rc4 ] ~ [ wine-1.2-rc3 ] ~ [ wine-1.2-rc2 ] ~ [ wine-1.2-rc1 ] ~ [ wine-1.1.44 ] ~ [ wine-1.1.43 ] ~ [ wine-1.1.42 ] ~ [ wine-1.1.41 ] ~ [ wine-1.1.40 ] ~ [ wine-1.1.39 ] ~ [ wine-1.1.38 ] ~ [ wine-1.1.37 ] ~ [ wine-1.1.36 ] ~ [ wine-1.1.35 ] ~ [ wine-1.1.34 ] ~ [ wine-1.1.33 ] ~ [ wine-1.1.32 ] ~ [ wine-1.1.31 ] ~ [ wine-1.1.30 ] ~ [ wine-1.1.29 ] ~ [ wine-1.1.28 ] ~ [ wine-1.1.27 ] ~ [ wine-1.1.26 ] ~ [ wine-1.1.25 ] ~ [ wine-1.1.24 ] ~ [ wine-1.1.23 ] ~ [ wine-1.1.22 ] ~ [ wine-1.1.21 ] ~ [ wine-1.1.20 ] ~ [ wine-1.1.19 ] ~ [ wine-1.1.18 ] ~ [ wine-1.1.17 ] ~ [ wine-1.1.16 ] ~ [ wine-1.1.15 ] ~ [ wine-1.1.14 ] ~ [ wine-1.1.13 ] ~ [ wine-1.1.12 ] ~ [ wine-1.1.11 ] ~ [ wine-1.1.10 ] ~ [ wine-1.1.9 ] ~ [ wine-1.1.8 ] ~ [ wine-1.1.7 ] ~ [ wine-1.0.1 ] ~ [ wine-1.1.6 ] ~ [ wine-1.1.5 ] ~ [ wine-1.1.4 ] ~ [ wine-1.1.3 ] ~ [ wine-1.1.2 ] ~ [ wine-1.1.1 ] ~ [ wine-1.1.0 ] ~ [ wine-1.0 ] ~

  1 /*
  2  * Copyright (C) 2000 David Elliott <dfe@infinite-internet.net>
  3  *
  4  * This library is free software; you can redistribute it and/or
  5  * modify it under the terms of the GNU Lesser General Public
  6  * License as published by the Free Software Foundation; either
  7  * version 2.1 of the License, or (at your option) any later version.
  8  *
  9  * This library is distributed in the hope that it will be useful,
 10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 12  * Lesser General Public License for more details.
 13  *
 14  * You should have received a copy of the GNU Lesser General Public
 15  * License along with this library; if not, write to the Free Software
 16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
 17  */
 18 
 19 #ifndef __WINESCSI_H__
 20 #define __WINESCSI_H__
 21 
 22 #ifdef linux
 23 /* Copy of info from 2.2.x kernel */
 24 #define SG_MAX_SENSE 16   /* too little, unlikely to change in 2.2.x */
 25 
 26 #define SG_NEXT_CMD_LEN 0x2283  /* override SCSI command length with given
 27                    number on the next write() on this file descriptor */
 28 
 29 struct sg_header
 30 {
 31     int pack_len;    /* [o] reply_len (ie useless), ignored as input */
 32     int reply_len;   /* [i] max length of expected reply (inc. sg_header) */
 33     int pack_id;     /* [io] id number of packet (use ints >= 0) */
 34     int result;      /* [o] 0==ok, else (+ve) Unix errno (best ignored) */
 35     unsigned int twelve_byte:1;
 36         /* [i] Force 12 byte command length for group 6 & 7 commands  */
 37     unsigned int target_status:5;   /* [o] scsi status from target */
 38     unsigned int host_status:8;     /* [o] host status (see "DID" codes) */
 39     unsigned int driver_status:8;   /* [o] driver status+suggestion */
 40     unsigned int other_flags:10;    /* unused */
 41     unsigned char sense_buffer[SG_MAX_SENSE]; /* [o] Output in 3 cases:
 42            when target_status is CHECK_CONDITION or
 43            when target_status is COMMAND_TERMINATED or
 44            when (driver_status & DRIVER_SENSE) is true. */
 45 };      /* This structure is 36 bytes long on i386 */
 46 
 47 #define SCSI_OFF sizeof(struct sg_header)
 48 
 49 #define SG_SET_TIMEOUT  0x2201
 50 #define SG_GET_TIMEOUT  0x2202
 51 #define SCSI_DEFAULT_TIMEOUT 6000*5 /* 5 minutes */
 52 #endif
 53 
 54 
 55 /* RegKey used for SCSI info under HKLM */
 56 #define KEYNAME_SCSI "HARDWARE\\DEVICEMAP\\Scsi\\Scsi Port %d\\Scsi Bus %d\\Target Id %d\\Logical Unit Id %d"
 57 
 58 /* Function prototypes from dlls/wnaspi32/aspi.c */
 59 void
 60 SCSI_Init(void);
 61 
 62 int
 63 ASPI_GetNumControllers(void);
 64 
 65 int
 66 SCSI_OpenDevice( int h, int c, int t, int d );
 67 
 68 int
 69 SCSI_LinuxSetTimeout( int fd, int timeout );
 70 
 71 #ifdef linux
 72 BOOL
 73 SCSI_LinuxDeviceIo( int fd,
 74                 struct sg_header * lpvInBuffer, DWORD cbInBuffer,
 75                 struct sg_header * lpvOutBuffer, DWORD cbOutBuffer,
 76                 LPDWORD lpcbBytesReturned );
 77 
 78 void
 79 SCSI_Fix_CMD_LEN( int fd, int cmd, int len );
 80 #endif
 81 
 82 DWORD
 83 ASPI_GetHCforController( int controller );
 84 
 85 /*** This is where we throw some miscellaneous crap ***/
 86 
 87 #define ASPI_POSTING(prb) (prb->SRB_Flags & 0x1)
 88 
 89 /* WNASPI32/WINASPI defs */
 90 #define HOST_TO_TARGET(prb) (((prb->SRB_Flags>>3) & 0x3) == 0x2)
 91 #define TARGET_TO_HOST(prb) (((prb->SRB_Flags>>3) & 0x3) == 0x1)
 92 #define NO_DATA_TRANSFERRED(prb) (((prb->SRB_Flags>>3) & 0x3) == 0x3)
 93 
 94 
 95 #define INQUIRY_VENDOR          8
 96 
 97 #define MUSTEK_SCSI_AREA_AND_WINDOWS 0x04
 98 #define MUSTEK_SCSI_READ_SCANNED_DATA 0x08
 99 #define MUSTEK_SCSI_GET_IMAGE_STATUS 0x0f
100 #define MUSTEK_SCSI_ADF_AND_BACKTRACE 0x10
101 #define MUSTEK_SCSI_CCD_DISTANCE 0x11
102 #define MUSTEK_SCSI_START_STOP 0x1b
103 
104 
105 #define INQURIY_CMDLEN 6
106 #define INQURIY_REPLY_LEN 96
107 #define INQUIRY_VENDOR 8
108 
109 #define SENSE_BUFFER(prb) (&prb->CDBByte[prb->SRB_CDBLen])
110 
111 /* Just a container for seeing what devices are open */
112 struct ASPI_DEVICE_INFO {
113     struct ASPI_DEVICE_INFO *   next;
114     int                         fd;
115     int                         hostId;
116     int                         target;
117     int                         lun;
118 };
119 
120 typedef struct ASPI_DEVICE_INFO ASPI_DEVICE_INFO;
121 
122 /*** End Miscellaneous crap ***/
123 
124 #endif /* #ifndef __WINESCSI_H */
125 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.