Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
virtio_blk.h File Reference
#include <linux/types.h>
#include <linux/virtio_ids.h>
#include <linux/virtio_config.h>

Go to the source code of this file.

Data Structures

struct  virtio_blk_config
 
struct  virtio_blk_config::virtio_blk_geometry
 
struct  virtio_blk_geometry
 
struct  virtio_blk_outhdr
 
struct  virtio_scsi_inhdr
 

Macros

#define VIRTIO_BLK_F_BARRIER   0 /* Does host support barriers? */
 
#define VIRTIO_BLK_F_SIZE_MAX   1 /* Indicates maximum segment size */
 
#define VIRTIO_BLK_F_SEG_MAX   2 /* Indicates maximum # of segments */
 
#define VIRTIO_BLK_F_GEOMETRY   4 /* Legacy geometry available */
 
#define VIRTIO_BLK_F_RO   5 /* Disk is read-only */
 
#define VIRTIO_BLK_F_BLK_SIZE   6 /* Block size of disk is available*/
 
#define VIRTIO_BLK_F_SCSI   7 /* Supports scsi command passthru */
 
#define VIRTIO_BLK_F_WCE   9 /* Writeback mode enabled after reset */
 
#define VIRTIO_BLK_F_TOPOLOGY   10 /* Topology information is available */
 
#define VIRTIO_BLK_F_CONFIG_WCE   11 /* Writeback mode available in config */
 
#define VIRTIO_BLK_F_FLUSH   VIRTIO_BLK_F_WCE
 
#define VIRTIO_BLK_ID_BYTES   20 /* ID string length */
 
#define VIRTIO_BLK_T_IN   0
 
#define VIRTIO_BLK_T_OUT   1
 
#define VIRTIO_BLK_T_SCSI_CMD   2
 
#define VIRTIO_BLK_T_FLUSH   4
 
#define VIRTIO_BLK_T_GET_ID   8
 
#define VIRTIO_BLK_T_BARRIER   0x80000000
 
#define VIRTIO_BLK_S_OK   0
 
#define VIRTIO_BLK_S_IOERR   1
 
#define VIRTIO_BLK_S_UNSUPP   2
 

Functions

struct virtio_blk_config __attribute__ ((packed))
 

Variables

__u64 capacity
 
__u32 size_max
 
__u32 seg_max
 
struct virtio_blk_geometry geometry
 
__u32 blk_size
 
__u8 physical_block_exp
 
__u8 alignment_offset
 
__u16 min_io_size
 
__u32 opt_io_size
 
__u8 wce
 
struct virtio_blk_outhdr __attribute__
 

Macro Definition Documentation

#define VIRTIO_BLK_F_BARRIER   0 /* Does host support barriers? */

Definition at line 33 of file virtio_blk.h.

#define VIRTIO_BLK_F_BLK_SIZE   6 /* Block size of disk is available*/

Definition at line 38 of file virtio_blk.h.

#define VIRTIO_BLK_F_CONFIG_WCE   11 /* Writeback mode available in config */

Definition at line 42 of file virtio_blk.h.

#define VIRTIO_BLK_F_FLUSH   VIRTIO_BLK_F_WCE

Definition at line 46 of file virtio_blk.h.

#define VIRTIO_BLK_F_GEOMETRY   4 /* Legacy geometry available */

Definition at line 36 of file virtio_blk.h.

#define VIRTIO_BLK_F_RO   5 /* Disk is read-only */

Definition at line 37 of file virtio_blk.h.

#define VIRTIO_BLK_F_SCSI   7 /* Supports scsi command passthru */

Definition at line 39 of file virtio_blk.h.

#define VIRTIO_BLK_F_SEG_MAX   2 /* Indicates maximum # of segments */

Definition at line 35 of file virtio_blk.h.

#define VIRTIO_BLK_F_SIZE_MAX   1 /* Indicates maximum segment size */

Definition at line 34 of file virtio_blk.h.

#define VIRTIO_BLK_F_TOPOLOGY   10 /* Topology information is available */

Definition at line 41 of file virtio_blk.h.

#define VIRTIO_BLK_F_WCE   9 /* Writeback mode enabled after reset */

Definition at line 40 of file virtio_blk.h.

#define VIRTIO_BLK_ID_BYTES   20 /* ID string length */

Definition at line 49 of file virtio_blk.h.

#define VIRTIO_BLK_S_IOERR   1

Definition at line 128 of file virtio_blk.h.

#define VIRTIO_BLK_S_OK   0

Definition at line 127 of file virtio_blk.h.

#define VIRTIO_BLK_S_UNSUPP   2

Definition at line 129 of file virtio_blk.h.

#define VIRTIO_BLK_T_BARRIER   0x80000000

Definition at line 107 of file virtio_blk.h.

#define VIRTIO_BLK_T_FLUSH   4

Definition at line 101 of file virtio_blk.h.

#define VIRTIO_BLK_T_GET_ID   8

Definition at line 104 of file virtio_blk.h.

#define VIRTIO_BLK_T_IN   0

Definition at line 94 of file virtio_blk.h.

#define VIRTIO_BLK_T_OUT   1

Definition at line 95 of file virtio_blk.h.

#define VIRTIO_BLK_T_SCSI_CMD   2

Definition at line 98 of file virtio_blk.h.

Function Documentation

struct virtio_blk_config __attribute__ ( (packed)  )
read

mcontroller : adapter info structure for old mimd_t apps

: base address : irq number : number of logical drives : pci bus : pci device : pci function : pci id : vendor id : slot number : unique id

Definition at line 171 of file esd_usb2.c.

Variable Documentation

__u8 alignment_offset

Definition at line 101 of file virtio_blk.h.

__u32 blk_size

Definition at line 95 of file virtio_blk.h.

__u64 capacity

Definition at line 82 of file virtio_blk.h.

__u16 min_io_size

Definition at line 103 of file virtio_blk.h.

__u32 opt_io_size

Definition at line 105 of file virtio_blk.h.

__u8 physical_block_exp

Definition at line 99 of file virtio_blk.h.

__u32 seg_max

Definition at line 86 of file virtio_blk.h.

__u32 size_max

Definition at line 84 of file virtio_blk.h.

__u8 wce

Definition at line 108 of file virtio_blk.h.