smartmontools SVN Rev 5640
Utility to control and monitor storage systems with "S.M.A.R.T."
Classes | Namespaces | Macros | Functions | Variables
dev_jmb39x_raid.cpp File Reference
#include "config.h"
#include "dev_interface.h"
#include "dev_tunnelled.h"
#include "atacmds.h"
#include "scsicmds.h"
#include "sg_unaligned.h"
#include "static_assert.h"
#include "utility.h"
#include <errno.h>
Include dependency graph for dev_jmb39x_raid.cpp:

Go to the source code of this file.

Classes

class  jmb39x::jmb39x_device
 

Namespaces

namespace  jmb39x
 

Macros

#define jmbassert(expr)   (!(expr) ? jmbassert_failed(__LINE__, #expr) : (void)0)
 

Functions

static void jmbassert_failed (int line, const char *expr)
 
static void jmb_xor (uint8_t(&data)[512])
 
static uint32_t jmb_crc (const uint8_t(&data)[512])
 
static uint32_t jmb_get_crc (const uint8_t(&data)[512])
 
static void jmb_put_crc (uint8_t(&data)[512], uint32_t crc)
 
static bool jmb_check_crc (const uint8_t(&data)[512])
 
static void jmb_put_le32 (uint8_t(&data)[512], unsigned index, uint32_t val)
 
static void jmb_set_wakeup_sector (uint8_t(&data)[512], int id)
 
static void jmb_set_request_sector (uint8_t(&data)[512], uint8_t version, uint32_t cmd_id, const uint8_t *cmd, unsigned cmdsize)
 
static int jmb_get_sector_type (const uint8_t(&data)[512])
 
static void jmb_check_funcs ()
 
static bool ata_read_lba8 (ata_device *atadev, uint8_t lba8, uint8_t(&data)[512])
 
static bool ata_write_lba8 (ata_device *atadev, uint8_t lba8, const uint8_t(&data)[512])
 
static int scsi_get_lba_size (scsi_device *scsidev)
 
static bool scsi_read_lba8 (scsi_device *scsidev, uint8_t lba8, uint8_t(&data)[512])
 
static bool scsi_write_lba8 (scsi_device *scsidev, uint8_t lba8, const uint8_t(&data)[512])
 
static int jmb39x::is_supported_by_jmb (const ata_in_regs &r)
 

Variables

const char * dev_jmb39x_raid_cpp_svnid = "$Id: dev_jmb39x_raid.cpp 5366 2022-04-30 15:26:22Z chrfranke $"
 

Macro Definition Documentation

◆ jmbassert

#define jmbassert (   expr)    (!(expr) ? jmbassert_failed(__LINE__, #expr) : (void)0)

Definition at line 38 of file dev_jmb39x_raid.cpp.

Function Documentation

◆ ata_read_lba8()

static bool ata_read_lba8 ( ata_device atadev,
uint8_t  lba8,
uint8_t(&)  data[512] 
)
static

Definition at line 236 of file dev_jmb39x_raid.cpp.

◆ ata_write_lba8()

static bool ata_write_lba8 ( ata_device atadev,
uint8_t  lba8,
const uint8_t(&)  data[512] 
)
static

Definition at line 250 of file dev_jmb39x_raid.cpp.

◆ jmb_check_crc()

static bool jmb_check_crc ( const uint8_t(&)  data[512])
inlinestatic

Definition at line 142 of file dev_jmb39x_raid.cpp.

◆ jmb_check_funcs()

static void jmb_check_funcs ( )
static

Definition at line 204 of file dev_jmb39x_raid.cpp.

◆ jmb_crc()

static uint32_t jmb_crc ( const uint8_t(&)  data[512])
static

Definition at line 83 of file dev_jmb39x_raid.cpp.

◆ jmb_get_crc()

static uint32_t jmb_get_crc ( const uint8_t(&)  data[512])
inlinestatic

Definition at line 132 of file dev_jmb39x_raid.cpp.

◆ jmb_get_sector_type()

static int jmb_get_sector_type ( const uint8_t(&)  data[512])
static

Definition at line 192 of file dev_jmb39x_raid.cpp.

◆ jmb_put_crc()

static void jmb_put_crc ( uint8_t(&)  data[512],
uint32_t  crc 
)
inlinestatic

Definition at line 137 of file dev_jmb39x_raid.cpp.

◆ jmb_put_le32()

static void jmb_put_le32 ( uint8_t(&)  data[512],
unsigned  index,
uint32_t  val 
)
inlinestatic

Definition at line 147 of file dev_jmb39x_raid.cpp.

◆ jmb_set_request_sector()

static void jmb_set_request_sector ( uint8_t(&)  data[512],
uint8_t  version,
uint32_t  cmd_id,
const uint8_t *  cmd,
unsigned  cmdsize 
)
static

Definition at line 172 of file dev_jmb39x_raid.cpp.

◆ jmb_set_wakeup_sector()

static void jmb_set_wakeup_sector ( uint8_t(&)  data[512],
int  id 
)
static

Definition at line 153 of file dev_jmb39x_raid.cpp.

◆ jmb_xor()

static void jmb_xor ( uint8_t(&)  data[512])
static

Definition at line 40 of file dev_jmb39x_raid.cpp.

◆ jmbassert_failed()

static void jmbassert_failed ( int  line,
const char *  expr 
)
static

Definition at line 30 of file dev_jmb39x_raid.cpp.

◆ scsi_get_lba_size()

static int scsi_get_lba_size ( scsi_device scsidev)
static

Definition at line 264 of file dev_jmb39x_raid.cpp.

◆ scsi_read_lba8()

static bool scsi_read_lba8 ( scsi_device scsidev,
uint8_t  lba8,
uint8_t(&)  data[512] 
)
static

Definition at line 272 of file dev_jmb39x_raid.cpp.

◆ scsi_write_lba8()

static bool scsi_write_lba8 ( scsi_device scsidev,
uint8_t  lba8,
const uint8_t(&)  data[512] 
)
static

Definition at line 290 of file dev_jmb39x_raid.cpp.

Variable Documentation

◆ dev_jmb39x_raid_cpp_svnid

const char* dev_jmb39x_raid_cpp_svnid = "$Id: dev_jmb39x_raid.cpp 5366 2022-04-30 15:26:22Z chrfranke $"

Definition at line 28 of file dev_jmb39x_raid.cpp.