smartmontools SVN Rev 3317
Utility to control and monitor storage systems with "S.M.A.R.T."
scsicmds.h
Go to the documentation of this file.
00001 /*
00002  * scsicmds.h
00003  *
00004  * Home page of code is: http://smartmontools.sourceforge.net
00005  *
00006  * Copyright (C) 2002-8 Bruce Allen <smartmontools-support@lists.sourceforge.net>
00007  * Copyright (C) 2000 Michael Cornwell <cornwell@acm.org>
00008  *
00009  * Additional SCSI work:
00010  * Copyright (C) 2003-13 Douglas Gilbert <dgilbert@interlog.com>
00011  *
00012  * This program is free software; you can redistribute it and/or modify
00013  * it under the terms of the GNU General Public License as published by
00014  * the Free Software Foundation; either version 2, or (at your option)
00015  * any later version.
00016  *
00017  * You should have received a copy of the GNU General Public License
00018  * (for example COPYING); if not, write to the Free Software Foundation,
00019  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
00020  *
00021  * This code was originally developed as a Senior Thesis by Michael Cornwell
00022  * at the Concurrent Systems Laboratory (now part of the Storage Systems
00023  * Research Center), Jack Baskin School of Engineering, University of
00024  * California, Santa Cruz. http://ssrc.soe.ucsc.edu/
00025  *
00026  * N.B. What was formerly known as "SMART" are now called "informational
00027  * exceptions" in recent t10.org drafts (i.e. recent SCSI).
00028  *
00029  */
00030 
00031 
00032 #ifndef SCSICMDS_H_
00033 #define SCSICMDS_H_
00034 
00035 #define SCSICMDS_H_CVSID "$Id: scsicmds.h 3896 2014-04-28 04:31:25Z dpgilbert $\n"
00036 
00037 #include <stdio.h>
00038 #include <stdlib.h>
00039 #include <string.h>
00040 
00041 /* #define SCSI_DEBUG 1 */ /* Comment out to disable command debugging */
00042 
00043 /* Following conditional defines just in case OS already has them defined.
00044  * If they are defined we hope they are defined correctly (for SCSI). */
00045 #ifndef TEST_UNIT_READY
00046 #define TEST_UNIT_READY 0x0
00047 #endif
00048 #ifndef LOG_SELECT
00049 #define LOG_SELECT 0x4c
00050 #endif
00051 #ifndef LOG_SENSE
00052 #define LOG_SENSE 0x4d
00053 #endif
00054 #ifndef MODE_SENSE
00055 #define MODE_SENSE 0x1a
00056 #endif
00057 #ifndef MODE_SENSE_10
00058 #define MODE_SENSE_10 0x5a
00059 #endif
00060 #ifndef MODE_SELECT
00061 #define MODE_SELECT 0x15
00062 #endif
00063 #ifndef MODE_SELECT_10
00064 #define MODE_SELECT_10 0x55
00065 #endif
00066 #ifndef INQUIRY
00067 #define INQUIRY 0x12
00068 #endif
00069 #ifndef REQUEST_SENSE
00070 #define REQUEST_SENSE  0x03
00071 #endif
00072 #ifndef RECEIVE_DIAGNOSTIC
00073 #define RECEIVE_DIAGNOSTIC  0x1c
00074 #endif
00075 #ifndef SEND_DIAGNOSTIC
00076 #define SEND_DIAGNOSTIC  0x1d
00077 #endif
00078 #ifndef READ_DEFECT_10
00079 #define READ_DEFECT_10  0x37
00080 #endif
00081 #ifndef READ_DEFECT_12
00082 #define READ_DEFECT_12  0xb7
00083 #endif
00084 #ifndef START_STOP_UNIT
00085 #define START_STOP_UNIT  0x1b
00086 #endif
00087 #ifndef REPORT_LUNS
00088 #define REPORT_LUNS  0xa0
00089 #endif
00090 #ifndef READ_CAPACITY_10
00091 #define READ_CAPACITY_10  0x25
00092 #endif
00093 #ifndef READ_CAPACITY_16
00094 #define READ_CAPACITY_16  0x9e
00095 #endif
00096 #ifndef SAI_READ_CAPACITY_16    /* service action for READ_CAPACITY_16 */
00097 #define SAI_READ_CAPACITY_16  0x10
00098 #endif
00099 
00100 #ifndef SAT_ATA_PASSTHROUGH_12
00101 #define SAT_ATA_PASSTHROUGH_12 0xa1
00102 #endif
00103 #ifndef SAT_ATA_PASSTHROUGH_16
00104 #define SAT_ATA_PASSTHROUGH_16 0x85
00105 #endif
00106 
00107 typedef unsigned char UINT8;
00108 typedef signed char INT8;
00109 typedef unsigned int UINT32;
00110 typedef int INT32;
00111 
00112 #define DXFER_NONE        0
00113 #define DXFER_FROM_DEVICE 1
00114 #define DXFER_TO_DEVICE   2
00115 
00116 struct scsi_cmnd_io
00117 {
00118     UINT8 * cmnd;       /* [in]: ptr to SCSI command block (cdb) */
00119     size_t  cmnd_len;   /* [in]: number of bytes in SCSI command */
00120     int dxfer_dir;      /* [in]: DXFER_NONE, DXFER_FROM_DEVICE, or
00121                                  DXFER_TO_DEVICE */
00122     UINT8 * dxferp;     /* [in]: ptr to outgoing or incoming data buffer */
00123     size_t dxfer_len;   /* [in]: bytes to be transferred to/from dxferp */
00124     UINT8 * sensep;     /* [in]: ptr to sense buffer, filled when
00125                                  CHECK CONDITION status occurs */
00126     size_t max_sense_len; /* [in]: max number of bytes to write to sensep */
00127     unsigned timeout;   /* [in]: seconds, 0-> default timeout (60 seconds?) */
00128     size_t resp_sense_len;  /* [out]: sense buffer length written */
00129     UINT8 scsi_status;  /* [out]: 0->ok, 2->CHECK CONDITION, etc ... */
00130     int resid;          /* [out]: Number of bytes requested to be transferred
00131                                   less actual number transferred (0 if not
00132                                    supported) */
00133 };
00134 
00135 struct scsi_sense_disect {
00136     UINT8 resp_code;
00137     UINT8 sense_key;
00138     UINT8 asc;
00139     UINT8 ascq;
00140     int progress; /* -1 -> N/A, 0-65535 -> available */
00141 };
00142 
00143 /* Useful data from Informational Exception Control mode page (0x1c) */
00144 #define SCSI_IECMP_RAW_LEN 64
00145 struct scsi_iec_mode_page {
00146     UINT8 requestedCurrent;
00147     UINT8 gotCurrent;
00148     UINT8 requestedChangeable;
00149     UINT8 gotChangeable;
00150     UINT8 modese_len;   /* 0 (don't know), 6 or 10 */
00151     UINT8 raw_curr[SCSI_IECMP_RAW_LEN];
00152     UINT8 raw_chg[SCSI_IECMP_RAW_LEN];
00153 };
00154 
00155 /* Carrier for Error counter log pages (e.g. read, write, verify ...) */
00156 struct scsiErrorCounter {
00157     UINT8 gotPC[7];
00158     UINT8 gotExtraPC;
00159     uint64_t counter[8];
00160 };
00161 
00162 /* Carrier for Non-medium error log page */
00163 struct scsiNonMediumError {
00164     UINT8 gotPC0;
00165     UINT8 gotExtraPC;
00166     uint64_t counterPC0;
00167     UINT8 gotTFE_H;
00168     uint64_t counterTFE_H; /* Track following errors [Hitachi] */
00169     UINT8 gotPE_H;
00170     uint64_t counterPE_H;  /* Positioning errors [Hitachi] */
00171 };
00172 
00173 /* SCSI Peripheral types (of interest) */
00174 #define SCSI_PT_DIRECT_ACCESS           0x0
00175 #define SCSI_PT_SEQUENTIAL_ACCESS       0x1
00176 #define SCSI_PT_CDROM                   0x5
00177 #define SCSI_PT_MEDIUM_CHANGER          0x8
00178 #define SCSI_PT_ENCLOSURE               0xd
00179 
00180 /* ANSI SCSI-3 Log Pages retrieved by LOG SENSE. */
00181 #define SUPPORTED_LPAGES                        0x00
00182 #define BUFFER_OVERRUN_LPAGE                    0x01
00183 #define WRITE_ERROR_COUNTER_LPAGE               0x02
00184 #define READ_ERROR_COUNTER_LPAGE                0x03
00185 #define READ_REVERSE_ERROR_COUNTER_LPAGE        0x04
00186 #define VERIFY_ERROR_COUNTER_LPAGE              0x05
00187 #define NON_MEDIUM_ERROR_LPAGE                  0x06
00188 #define LAST_N_ERROR_LPAGE                      0x07
00189 #define FORMAT_STATUS_LPAGE                     0x08
00190 #define LB_PROV_LPAGE                           0x0c   /* SBC-3 */
00191 #define TEMPERATURE_LPAGE                       0x0d
00192 #define STARTSTOP_CYCLE_COUNTER_LPAGE           0x0e
00193 #define APPLICATION_CLIENT_LPAGE                0x0f
00194 #define SELFTEST_RESULTS_LPAGE                  0x10
00195 #define SS_MEDIA_LPAGE                          0x11   /* SBC-3 */
00196 #define BACKGROUND_RESULTS_LPAGE                0x15   /* SBC-3 */
00197 #define NONVOL_CACHE_LPAGE                      0x17   /* SBC-3 */
00198 #define PROTOCOL_SPECIFIC_LPAGE                 0x18
00199 #define IE_LPAGE                                0x2f
00200 
00201 /* Seagate vendor specific log pages. */
00202 #define SEAGATE_CACHE_LPAGE                     0x37
00203 #define SEAGATE_FACTORY_LPAGE                   0x3e
00204 
00205 /* Log page response lengths */
00206 #define LOG_RESP_SELF_TEST_LEN 0x194
00207 
00208 /* See the SSC-2 document at www.t10.org . Earler note: From IBM
00209 Documentation, see http://www.storage.ibm.com/techsup/hddtech/prodspecs.htm */
00210 #define TAPE_ALERTS_LPAGE                        0x2e
00211 
00212 /* ANSI SCSI-3 Mode Pages */
00213 #define VENDOR_UNIQUE_PAGE                       0x00
00214 #define READ_WRITE_ERROR_RECOVERY_PAGE           0x01
00215 #define DISCONNECT_RECONNECT_PAGE                0x02
00216 #define FORMAT_DEVICE_PAGE                       0x03
00217 #define RIGID_DISK_DRIVE_GEOMETRY_PAGE           0x04
00218 #define FLEXIBLE_DISK_PAGE                       0x05
00219 #define VERIFY_ERROR_RECOVERY_PAGE               0x07
00220 #define CACHING_PAGE                             0x08
00221 #define PERIPHERAL_DEVICE_PAGE                   0x09
00222 #define XOR_CONTROL_MODE_PAGE                    0x10
00223 #define CONTROL_MODE_PAGE                        0x0a
00224 #define MEDIUM_TYPES_SUPPORTED_PAGE              0x0b
00225 #define NOTCH_PAGE                               0x0c
00226 #define CD_DEVICE_PAGE                           0x0d
00227 #define CD_AUDIO_CONTROL_PAGE                    0x0e
00228 #define DATA_COMPRESSION_PAGE                    0x0f
00229 #define ENCLOSURE_SERVICES_MANAGEMENT_PAGE       0x14
00230 #define PROTOCOL_SPECIFIC_LUN_PAGE               0x18
00231 #define PROTOCOL_SPECIFIC_PORT_PAGE              0x19
00232 #define POWER_CONDITION_PAGE                     0x1a
00233 #define INFORMATIONAL_EXCEPTIONS_CONTROL_PAGE    0x1c
00234 #define FAULT_FAILURE_REPORTING_PAGE             0x1c
00235 
00236 /* Background control mode subpage is [0x1c,0x1] */
00237 #define BACKGROUND_CONTROL_M_SUBPAGE             0x1   /* SBC-2 */
00238 
00239 #define ALL_MODE_PAGES                           0x3f
00240 
00241 /* Mode page control field */
00242 #define MPAGE_CONTROL_CURRENT               0
00243 #define MPAGE_CONTROL_CHANGEABLE            1
00244 #define MPAGE_CONTROL_DEFAULT               2
00245 #define MPAGE_CONTROL_SAVED                 3
00246 
00247 /* SCSI Vital Product Data (VPD) pages */
00248 #define SCSI_VPD_SUPPORTED_VPD_PAGES    0x0
00249 #define SCSI_VPD_UNIT_SERIAL_NUMBER     0x80
00250 #define SCSI_VPD_DEVICE_IDENTIFICATION  0x83
00251 #define SCSI_VPD_EXTENDED_INQUIRY_DATA  0x86
00252 #define SCSI_VPD_ATA_INFORMATION        0x89
00253 #define SCSI_VPD_POWER_CONDITION        0x8a
00254 #define SCSI_VPD_POWER_CONSUMPTION      0x8d
00255 #define SCSI_VPD_BLOCK_LIMITS           0xb0
00256 #define SCSI_VPD_BLOCK_DEVICE_CHARACTERISTICS   0xb1
00257 #define SCSI_VPD_LOGICAL_BLOCK_PROVISIONING     0xb2
00258 
00259 /* defines for useful SCSI Status codes */
00260 #define SCSI_STATUS_CHECK_CONDITION     0x2
00261 
00262 /* defines for useful Sense Key codes */
00263 #define SCSI_SK_NO_SENSE                0x0
00264 #define SCSI_SK_RECOVERED_ERR           0x1
00265 #define SCSI_SK_NOT_READY               0x2
00266 #define SCSI_SK_MEDIUM_ERROR            0x3
00267 #define SCSI_SK_HARDWARE_ERROR          0x4
00268 #define SCSI_SK_ILLEGAL_REQUEST         0x5
00269 #define SCSI_SK_UNIT_ATTENTION          0x6
00270 #define SCSI_SK_ABORTED_COMMAND         0xb
00271 
00272 /* defines for useful Additional Sense Codes (ASCs) */
00273 #define SCSI_ASC_NOT_READY              0x4     /* more info in ASCQ code */
00274 #define SCSI_ASC_NO_MEDIUM              0x3a    /* more info in ASCQ code */
00275 #define SCSI_ASC_UNKNOWN_OPCODE         0x20
00276 #define SCSI_ASC_INVALID_FIELD          0x24
00277 #define SCSI_ASC_UNKNOWN_PARAM          0x26
00278 #define SCSI_ASC_WARNING                0xb
00279 #define SCSI_ASC_IMPENDING_FAILURE      0x5d
00280 
00281 #define SCSI_ASCQ_ATA_PASS_THROUGH      0x1d
00282 
00283 /* Simplified error code (negative values as per errno) */
00284 #define SIMPLE_NO_ERROR                 0
00285 #define SIMPLE_ERR_NOT_READY            1
00286 #define SIMPLE_ERR_BAD_OPCODE           2
00287 #define SIMPLE_ERR_BAD_FIELD            3       /* in cbd */
00288 #define SIMPLE_ERR_BAD_PARAM            4       /* in data */
00289 #define SIMPLE_ERR_BAD_RESP             5       /* response fails sanity */
00290 #define SIMPLE_ERR_NO_MEDIUM            6       /* no medium present */
00291 #define SIMPLE_ERR_BECOMING_READY       7       /* device will be ready soon */
00292 #define SIMPLE_ERR_TRY_AGAIN            8       /* some warning, try again */
00293 #define SIMPLE_ERR_MEDIUM_HARDWARE      9       /* medium or hardware error */
00294 #define SIMPLE_ERR_UNKNOWN              10      /* unknown sense value */
00295 #define SIMPLE_ERR_ABORTED_COMMAND      11      /* most likely transport error */
00296 
00297 
00298 /* defines for functioncode parameter in SENDDIAGNOSTIC function */
00299 #define SCSI_DIAG_NO_SELF_TEST          0x00
00300 #define SCSI_DIAG_DEF_SELF_TEST         0xff
00301 #define SCSI_DIAG_BG_SHORT_SELF_TEST    0x01
00302 #define SCSI_DIAG_BG_EXTENDED_SELF_TEST 0x02
00303 #define SCSI_DIAG_FG_SHORT_SELF_TEST    0x05
00304 #define SCSI_DIAG_FG_EXTENDED_SELF_TEST 0x06
00305 #define SCSI_DIAG_ABORT_SELF_TEST       0x04
00306 
00307 
00308 /* SCSI command timeout values (units are seconds) */
00309 #define SCSI_TIMEOUT_DEFAULT    20  // should be longer than the spin up time
00310                                     // of a disk in standby mode.
00311 #define SCSI_TIMEOUT_SELF_TEST  (5 * 60 * 60)   /* allow max 5 hours for */
00312                                             /* extended foreground self test */
00313 
00314 
00315 
00316 #define LOGPAGEHDRSIZE  4
00317 
00318 class scsi_device;
00319 
00320 // Set of supported SCSI VPD pages. Constructor fetches Supported VPD pages
00321 // VPD page and remembers the response for later queries.
00322 class supported_vpd_pages
00323 {
00324 public:
00325     supported_vpd_pages(scsi_device * device);
00326     ~supported_vpd_pages() { num_valid = 0; }
00327 
00328     bool is_supported(int vpd_page_num) const;
00329 
00330     /* Returns 0 or less for VPD pages not supported or error */
00331     int num_pages() const { return num_valid; }
00332 
00333 private:
00334     int num_valid;      /* 0 or less for invalid */
00335     unsigned char pages[256];
00336 };
00337 
00338 extern supported_vpd_pages * supported_vpd_pages_p;
00339 
00340 
00341 // Print SCSI debug messages?
00342 extern unsigned char scsi_debugmode;
00343 
00344 void scsi_do_sense_disect(const struct scsi_cmnd_io * in,
00345                           struct scsi_sense_disect * out);
00346 
00347 int scsiSimpleSenseFilter(const struct scsi_sense_disect * sinfo);
00348 
00349 const char * scsiErrString(int scsiErr);
00350 
00351 int scsi_vpd_dev_id_iter(const unsigned char * initial_desig_desc,
00352                          int page_len, int * off, int m_assoc,
00353                          int m_desig_type, int m_code_set);
00354 
00355 int scsi_decode_lu_dev_id(const unsigned char * b, int blen, char * s,
00356                           int slen, int * transport);
00357 
00358 
00359 /* STANDARD SCSI Commands  */
00360 int scsiTestUnitReady(scsi_device * device);
00361 
00362 int scsiStdInquiry(scsi_device * device, UINT8 *pBuf, int bufLen);
00363 
00364 int scsiInquiryVpd(scsi_device * device, int vpd_page, UINT8 *pBuf, int bufLen);
00365 
00366 int scsiLogSense(scsi_device * device, int pagenum, int subpagenum, UINT8 *pBuf,
00367                  int bufLen, int known_resp_len);
00368 
00369 int scsiLogSelect(scsi_device * device, int pcr, int sp, int pc, int pagenum,
00370                   int subpagenum, UINT8 *pBuf, int bufLen);
00371 
00372 int scsiModeSense(scsi_device * device, int pagenum, int subpagenum, int pc,
00373                   UINT8 *pBuf, int bufLen);
00374 
00375 int scsiModeSelect(scsi_device * device, int sp, UINT8 *pBuf, int bufLen);
00376 
00377 int scsiModeSense10(scsi_device * device, int pagenum, int subpagenum, int pc,
00378                     UINT8 *pBuf, int bufLen);
00379 
00380 int scsiModeSelect10(scsi_device * device, int sp, UINT8 *pBuf, int bufLen);
00381 
00382 int scsiModePageOffset(const UINT8 * resp, int len, int modese_len);
00383 
00384 int scsiRequestSense(scsi_device * device, struct scsi_sense_disect * sense_info);
00385 
00386 int scsiSendDiagnostic(scsi_device * device, int functioncode, UINT8 *pBuf, int bufLen);
00387 
00388 int scsiReceiveDiagnostic(scsi_device * device, int pcv, int pagenum, UINT8 *pBuf,
00389                       int bufLen);
00390 
00391 int scsiReadDefect10(scsi_device * device, int req_plist, int req_glist, int dl_format,
00392                      UINT8 *pBuf, int bufLen);
00393 
00394 int scsiReadDefect12(scsi_device * device, int req_plist, int req_glist,
00395                      int dl_format, int addrDescIndex, UINT8 *pBuf, int bufLen);
00396 
00397 int scsiReadCapacity10(scsi_device * device, unsigned int * last_lbp,
00398                        unsigned int * lb_sizep);
00399 
00400 int scsiReadCapacity16(scsi_device * device, UINT8 *pBuf, int bufLen);
00401 
00402 /* SMART specific commands */
00403 int scsiCheckIE(scsi_device * device, int hasIELogPage, int hasTempLogPage, UINT8 *asc,
00404                 UINT8 *ascq, UINT8 *currenttemp, UINT8 *triptemp);
00405 
00406 int scsiFetchIECmpage(scsi_device * device, struct scsi_iec_mode_page *iecp,
00407                       int modese_len);
00408 int scsi_IsExceptionControlEnabled(const struct scsi_iec_mode_page *iecp);
00409 int scsi_IsWarningEnabled(const struct scsi_iec_mode_page *iecp);
00410 int scsiSetExceptionControlAndWarning(scsi_device * device, int enabled,
00411                             const struct scsi_iec_mode_page *iecp);
00412 void scsiDecodeErrCounterPage(unsigned char * resp,
00413                               struct scsiErrorCounter *ecp);
00414 void scsiDecodeNonMediumErrPage(unsigned char * resp,
00415                                 struct scsiNonMediumError *nmep);
00416 int scsiFetchExtendedSelfTestTime(scsi_device * device, int * durationSec,
00417                                   int modese_len);
00418 int scsiCountFailedSelfTests(scsi_device * device, int noisy);
00419 int scsiSelfTestInProgress(scsi_device * device, int * inProgress);
00420 int scsiFetchControlGLTSD(scsi_device * device, int modese_len, int current);
00421 int scsiSetControlGLTSD(scsi_device * device, int enabled, int modese_len);
00422 int scsiFetchTransportProtocol(scsi_device * device, int modese_len);
00423 int scsiGetRPM(scsi_device * device, int modese_len, int * form_factorp,
00424                int * haw_zbcp);
00425 int scsiGetSetCache(scsi_device * device,  int modese_len, short int * wce,
00426                     short int * rcd);
00427 uint64_t scsiGetSize(scsi_device * device, unsigned int * lb_sizep,
00428                      int * lb_per_pb_expp);
00429 int scsiGetProtPBInfo(scsi_device * device, unsigned char * rc16_12_31p);
00430 
00431 /* T10 Standard IE Additional Sense Code strings taken from t10.org */
00432 const char* scsiGetIEString(UINT8 asc, UINT8 ascq);
00433 int scsiGetTemp(scsi_device * device, UINT8 *currenttemp, UINT8 *triptemp);
00434 
00435 
00436 int scsiSmartIBMOfflineTest(scsi_device * device);
00437 
00438 int scsiSmartDefaultSelfTest(scsi_device * device);
00439 int scsiSmartShortSelfTest(scsi_device * device);
00440 int scsiSmartExtendSelfTest(scsi_device * device);
00441 int scsiSmartShortCapSelfTest(scsi_device * device);
00442 int scsiSmartExtendCapSelfTest(scsi_device * device);
00443 int scsiSmartSelfTestAbort(scsi_device * device);
00444 
00445 const char * scsiTapeAlertsTapeDevice(unsigned short code);
00446 const char * scsiTapeAlertsChangerDevice(unsigned short code);
00447 
00448 const char * scsi_get_opcode_name(UINT8 opcode);
00449 void scsi_format_id_string(char * out, const unsigned char * in, int n);
00450 
00451 void dStrHex(const char* str, int len, int no_ascii);
00452 inline void dStrHex(const unsigned char* str, int len, int no_ascii)
00453   { dStrHex((const char *)str, len, no_ascii); }
00454 
00455 /* Attempt to find the first SCSI sense data descriptor that matches the
00456    given 'desc_type'. If found return pointer to start of sense data
00457    descriptor; otherwise (including fixed format sense data) returns NULL. */
00458 const unsigned char * sg_scsi_sense_desc_find(const unsigned char * sensep,
00459                                                      int sense_len, int desc_type);
00460 
00461 
00462 /* SCSI command transmission interface function declaration. Its
00463  * definition is target OS specific (see os_<OS>.c file).
00464  * Returns 0 if SCSI command successfully launched and response
00465  * received. Even when 0 is returned the caller should check
00466  * scsi_cmnd_io::scsi_status for SCSI defined errors and warnings
00467  * (e.g. CHECK CONDITION). If the SCSI command could not be issued
00468  * (e.g. device not present or not a SCSI device) or some other problem
00469  * arises (e.g. timeout) then returns a negative errno value. */
00470 // Moved to C++ interface
00471 //int do_scsi_cmnd_io(int dev_fd, struct scsi_cmnd_io * iop, int report);
00472 
00473 
00474 
00475 #endif