sg

package
v0.0.0-...-70f6ba5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 15, 2023 License: GPL-2.0, GPL-2.0-or-later Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SG_DXFER_NONE        = -0x1
	SG_DXFER_TO_DEV      = -0x2
	SG_DXFER_FROM_DEV    = -0x3
	SG_DXFER_TO_FROM_DEV = -0x4

	SG_FLAG_DIRECT_IO   = 0x1
	SG_FLAG_LUN_INHIBIT = 0x2

	SG_FLAG_NO_DXFER = 0x10000

	SG_INFO_OK_MASK = 0x1
	SG_INFO_OK      = 0x0
	SG_INFO_CHECK   = 0x1

	SG_INFO_DIRECT_IO_MASK = 0x6
	SG_INFO_INDIRECT_IO    = 0x0
	SG_INFO_DIRECT_IO      = 0x2
	SG_INFO_MIXED_IO       = 0x4

	SG_EMULATED_HOST = 0x2203

	SG_SET_TRANSFORM = 0x2204

	SG_GET_TRANSFORM = 0x2205

	SG_SET_RESERVED_SIZE = 0x2275
	SG_GET_RESERVED_SIZE = 0x2272

	SG_GET_SCSI_ID = 0x2276

	SG_SET_FORCE_LOW_DMA = 0x2279
	SG_GET_LOW_DMA       = 0x227a

	SG_SET_FORCE_PACK_ID = 0x227b
	SG_GET_PACK_ID       = 0x227c

	SG_GET_NUM_WAITING = 0x227d

	SG_GET_SG_TABLESIZE = 0x227f

	SG_GET_VERSION_NUM = 0x2282

	SG_SCSI_RESET = 0x2284

	SG_SCSI_RESET_NOTHING = 0x0
	SG_SCSI_RESET_DEVICE  = 0x1
	SG_SCSI_RESET_BUS     = 0x2
	SG_SCSI_RESET_HOST    = 0x3

	SG_IO = 0x2285

	SG_GET_REQUEST_TABLE = 0x2286

	SG_SET_KEEP_ORPHAN = 0x2287
	SG_GET_KEEP_ORPHAN = 0x2288

	SG_SCATTER_SZ = 0x8000

	SG_DEFAULT_RETRIES = 0x1

	SG_DEF_FORCE_LOW_DMA = 0x0
	SG_DEF_FORCE_PACK_ID = 0x0
	SG_DEF_KEEP_ORPHAN   = 0x0
	SG_DEF_RESERVED_SIZE = 0x8000

	SG_MAX_QUEUE = 0x10

	SG_BIG_BUFF = 0x8000

	SG_MAX_SENSE = 0x10

	SG_SET_TIMEOUT = 0x2201
	SG_GET_TIMEOUT = 0x2202

	SG_GET_COMMAND_Q = 0x2270
	SG_SET_COMMAND_Q = 0x2271

	SG_SET_DEBUG = 0x227e

	SG_NEXT_CMD_LEN = 0x2283

	SG_DEFAULT_TIMEOUT = 0x1770
	SG_DEF_COMMAND_Q   = 0x0

	SG_DEF_UNDERRUN_FLAG = 0x0
)

Variables

This section is empty.

Functions

This section is empty.

Types

type SgHeader

type SgHeader struct {
	PackLen  int32
	ReplyLen int32
	PackId   int32
	Result   int32

	SenseBuffer [16]uint8
	// contains filtered or unexported fields
}

type SgIoHdr

type SgIoHdr struct {
	InterfaceId    int32
	DxferDirection int32
	CmdLen         uint8
	MxSbLen        uint8
	IovecCount     uint16
	DxferLen       uint32
	Dxferp         *byte
	Cmdp           *uint8
	Sbp            *uint8
	Timeout        uint32
	Flags          uint32
	PackId         int32
	UsrPtr         *byte
	Status         uint8
	MaskedStatus   uint8
	MsgStatus      uint8
	SbLenWr        uint8
	HostStatus     uint16
	DriverStatus   uint16
	Resid          int32
	Duration       uint32
	Info           uint32
	// contains filtered or unexported fields
}

type SgIoVec

type SgIoVec struct {
	Base *byte
	Len  uint64
}

type SgReqInfo

type SgReqInfo struct {
	ReqState  int8
	Orphan    int8
	SgIoOwned int8
	Problem   int8
	PackId    int32
	UsrPtr    *byte
	Duration  uint32
	Unused    int32
}

type SgScsiId

type SgScsiId struct {
	HostNo      int32
	Channel     int32
	ScsiId      int32
	Lun         int32
	ScsiType    int32
	HCmdPerLun  int16
	DQueueDepth int16
	Unused      [2]int32
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL