#include "config.h"
#include <errno.h>
#include <fcntl.h>
#include <glob.h>
#include <scsi/scsi.h>
#include <scsi/scsi_ioctl.h>
#include <scsi/sg.h>
#include <linux/bsg.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/utsname.h>
#include <unistd.h>
#include <stddef.h>
#include <sys/uio.h>
#include <sys/types.h>
#include <dirent.h>
#include "atacmds.h"
#include "os_linux.h"
#include "scsicmds.h"
#include "utility.h"
#include "cciss.h"
#include "megaraid.h"
#include "sssraid.h"
#include "aacraid.h"
#include "nvmecmds.h"
#include "dev_interface.h"
#include "dev_ata_cmd_set.h"
#include "dev_areca.h"
#include "linux_nvme_ioctl.h"
Go to the source code of this file.
|  | 
| static int | os_linux::sg_io_cmnd_io (int dev_fd, struct scsi_cmnd_io *iop, int report, enum lk_sg_io_ifc_t sg_io_ifc) | 
|  | 
| static int | os_linux::do_normal_scsi_cmnd_io (int dev_fd, struct scsi_cmnd_io *iop, int report) | 
|  | 
| static int | os_linux::setup_3ware_nodes (const char *nodename, const char *driver_name) | 
|  | 
| static int | os_linux::find_areca_in_proc () | 
|  | 
| static bool | os_linux::read_id (const std::string &path, unsigned short &id) | 
|  | 
| static bool | os_linux::get_usb_id (const char *name, unsigned short &vendor_id, unsigned short &product_id, unsigned short &version) | 
|  | 
| static unsigned | os_linux::get_kernel_release () | 
|  | 
| static bool | os_linux::is_hpsa_in_raid_mode (const char *name) | 
|  | 
◆ ARGUSED
      
        
          | #define ARGUSED | ( |  | x | ) | ((void)(x)) | 
      
 
 
◆ BUFFER_LEN_678K
      
        
          | #define BUFFER_LEN_678K   ( sizeof(TW_Ioctl)                  ) | 
      
 
 
◆ BUFFER_LEN_678K_CHAR
◆ BUFFER_LEN_9000
◆ BUFFER_LENGTH
      
        
          | #define BUFFER_LENGTH   (4+512) | 
      
 
 
◆ DEVICE_STRING_LENGTH
      
        
          | #define DEVICE_STRING_LENGTH   32 | 
      
 
 
◆ ENOTSUP
◆ LSCSI_DID_BUS_BUSY
      
        
          | #define LSCSI_DID_BUS_BUSY   0x2 | 
      
 
 
◆ LSCSI_DID_ERROR
      
        
          | #define LSCSI_DID_ERROR   0x7 /* Need to work around aacraid driver quirk */ | 
      
 
 
◆ LSCSI_DID_NO_CONNECT
      
        
          | #define LSCSI_DID_NO_CONNECT   0x1 | 
      
 
 
◆ LSCSI_DID_TIME_OUT
      
        
          | #define LSCSI_DID_TIME_OUT   0x3 | 
      
 
 
◆ LSCSI_DRIVER_MASK
      
        
          | #define LSCSI_DRIVER_MASK   0xf /* mask out "suggestions" */ | 
      
 
 
◆ LSCSI_DRIVER_SENSE
      
        
          | #define LSCSI_DRIVER_SENSE   0x8 /* alternate CHECK CONDITION indication */ | 
      
 
 
◆ LSCSI_DRIVER_TIMEOUT
      
        
          | #define LSCSI_DRIVER_TIMEOUT   0x6 | 
      
 
 
◆ MAJOR_STRING_LENGTH
      
        
          | #define MAJOR_STRING_LENGTH   3 | 
      
 
 
◆ MAX_DXFER_LEN
      
        
          | #define MAX_DXFER_LEN   1024      /* can be increased if necessary */ | 
      
 
 
◆ NODE_STRING_LENGTH
      
        
          | #define NODE_STRING_LENGTH   16 | 
      
 
 
◆ SCSI_IOCTL_SEND_COMMAND
      
        
          | #define SCSI_IOCTL_SEND_COMMAND   1 | 
      
 
 
◆ SEND_IOCTL_RESP_SENSE_LEN
      
        
          | #define SEND_IOCTL_RESP_SENSE_LEN   16    /* ioctl limitation */ | 
      
 
 
◆ SG_IO_RESP_SENSE_LEN
      
        
          | #define SG_IO_RESP_SENSE_LEN   64 /* large enough see buffer */ | 
      
 
 
◆ SRB_STATUS_AUTOSENSE_VALID
      
        
          | #define SRB_STATUS_AUTOSENSE_VALID   0x80 | 
      
 
 
◆ SRB_STATUS_ERROR
      
        
          | #define SRB_STATUS_ERROR   0x4 | 
      
 
 
◆ SRB_STATUS_NO_DEVICE
      
        
          | #define SRB_STATUS_NO_DEVICE   0x08 | 
      
 
 
◆ SRB_STATUS_SELECTION_TIMEOUT
      
        
          | #define SRB_STATUS_SELECTION_TIMEOUT   0x0a | 
      
 
 
◆ SRB_STATUS_SUCCESS
      
        
          | #define SRB_STATUS_SUCCESS   0x1 | 
      
 
 
◆ STRANGE_BUFFER_LENGTH
      
        
          | #define STRANGE_BUFFER_LENGTH   (4+512*0xf8) | 
      
 
 
◆ TW_IOCTL_BUFFER_SIZE
◆ failuretest_permissive
  
  | 
        
          | unsigned char failuretest_permissive |  | extern | 
 
 
◆ os_linux_cpp_cvsid
      
        
          | const char* os_linux_cpp_cvsid | 
      
 
Initial value:= "$Id: os_linux.cpp 5666 2025-03-14 15:29:53Z chrfranke $"
Definition at line 93 of file os_linux.cpp.