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

Go to the source code of this file.

Data Structures

struct  PVSCSICmdDescResetDevice
 
struct  PVSCSICmdDescConfigCmd
 
struct  PVSCSICmdDescAbortCmd
 
struct  PVSCSICmdDescSetupRings
 
struct  PVSCSICmdDescSetupMsgRing
 
struct  PVSCSIRingMsgDesc
 
struct  PVSCSIMsgDescDevStatusChanged
 
struct  PVSCSIRingsState
 
struct  PVSCSIRingReqDesc
 
struct  PVSCSISGElement
 
struct  PVSCSIRingCmpDesc
 
struct  PVSCSIConfigPageHeader
 
struct  PVSCSIConfigPageController
 

Macros

#define PVSCSI_DRIVER_VERSION_STRING   "1.0.2.0-k"
 
#define PVSCSI_MAX_NUM_SG_ENTRIES_PER_SEGMENT   128
 
#define MASK(n)   ((1 << (n)) - 1) /* make an n-bit mask */
 
#define PCI_VENDOR_ID_VMWARE   0x15AD
 
#define PCI_DEVICE_ID_VMWARE_PVSCSI   0x07C0
 
#define PVSCSI_SETUP_RINGS_MAX_NUM_PAGES   32
 
#define PVSCSI_SETUP_MSG_RING_MAX_NUM_PAGES   16
 
#define PVSCSI_FLAG_CMD_WITH_SG_LIST   (1 << 0)
 
#define PVSCSI_FLAG_CMD_OUT_OF_BAND_CDB   (1 << 1)
 
#define PVSCSI_FLAG_CMD_DIR_NONE   (1 << 2)
 
#define PVSCSI_FLAG_CMD_DIR_TOHOST   (1 << 3)
 
#define PVSCSI_FLAG_CMD_DIR_TODEVICE   (1 << 4)
 
#define PVSCSI_INTR_CMPL_0   (1 << 0)
 
#define PVSCSI_INTR_CMPL_1   (1 << 1)
 
#define PVSCSI_INTR_CMPL_MASK   MASK(2)
 
#define PVSCSI_INTR_MSG_0   (1 << 2)
 
#define PVSCSI_INTR_MSG_1   (1 << 3)
 
#define PVSCSI_INTR_MSG_MASK   (MASK(2) << 2)
 
#define PVSCSI_INTR_ALL_SUPPORTED   MASK(4)
 
#define PVSCSI_MAX_INTRS   24
 
#define PVSCSI_VECTOR_COMPLETION   0
 
#define PVSCSI_MAX_NUM_PAGES_REQ_RING   PVSCSI_SETUP_RINGS_MAX_NUM_PAGES
 
#define PVSCSI_MAX_NUM_PAGES_CMP_RING   PVSCSI_SETUP_RINGS_MAX_NUM_PAGES
 
#define PVSCSI_MAX_NUM_PAGES_MSG_RING   PVSCSI_SETUP_MSG_RING_MAX_NUM_PAGES
 
#define PVSCSI_MAX_NUM_REQ_ENTRIES_PER_PAGE   (PAGE_SIZE / sizeof(struct PVSCSIRingReqDesc))
 
#define PVSCSI_MAX_REQ_QUEUE_DEPTH   (PVSCSI_MAX_NUM_PAGES_REQ_RING * PVSCSI_MAX_NUM_REQ_ENTRIES_PER_PAGE)
 
#define PVSCSI_MEM_SPACE_COMMAND_NUM_PAGES   1
 
#define PVSCSI_MEM_SPACE_INTR_STATUS_NUM_PAGES   1
 
#define PVSCSI_MEM_SPACE_MISC_NUM_PAGES   2
 
#define PVSCSI_MEM_SPACE_KICK_IO_NUM_PAGES   2
 
#define PVSCSI_MEM_SPACE_MSIX_NUM_PAGES   2
 
#define PVSCSI_MEM_SPACE_NUM_PAGES
 
#define PVSCSI_MEM_SPACE_SIZE   (PVSCSI_MEM_SPACE_NUM_PAGES * PAGE_SIZE)
 

Enumerations

enum  HostBusAdapterStatus {
  BTSTAT_SUCCESS = 0x00, BTSTAT_LINKED_COMMAND_COMPLETED = 0x0a, BTSTAT_LINKED_COMMAND_COMPLETED_WITH_FLAG = 0x0b, BTSTAT_DATA_UNDERRUN = 0x0c,
  BTSTAT_SELTIMEO = 0x11, BTSTAT_DATARUN = 0x12, BTSTAT_BUSFREE = 0x13, BTSTAT_INVPHASE = 0x14,
  BTSTAT_LUNMISMATCH = 0x17, BTSTAT_INVPARAM = 0x1a, BTSTAT_SENSFAILED = 0x1b, BTSTAT_TAGREJECT = 0x1c,
  BTSTAT_BADMSG = 0x1d, BTSTAT_HAHARDWARE = 0x20, BTSTAT_NORESPONSE = 0x21, BTSTAT_SENTRST = 0x22,
  BTSTAT_RECVRST = 0x23, BTSTAT_DISCONNECT = 0x24, BTSTAT_BUSRESET = 0x25, BTSTAT_ABORTQUEUE = 0x26,
  BTSTAT_HASOFTWARE = 0x27, BTSTAT_HATIMEOUT = 0x30, BTSTAT_SCSIPARITY = 0x34
}
 
enum  ScsiDeviceStatus { SDSTAT_GOOD = 0x00, SDSTAT_CHECK = 0x02 }
 
enum  PVSCSIRegOffset {
  PVSCSI_REG_OFFSET_COMMAND = 0x0, PVSCSI_REG_OFFSET_COMMAND_DATA = 0x4, PVSCSI_REG_OFFSET_COMMAND_STATUS = 0x8, PVSCSI_REG_OFFSET_LAST_STS_0 = 0x100,
  PVSCSI_REG_OFFSET_LAST_STS_1 = 0x104, PVSCSI_REG_OFFSET_LAST_STS_2 = 0x108, PVSCSI_REG_OFFSET_LAST_STS_3 = 0x10c, PVSCSI_REG_OFFSET_INTR_STATUS = 0x100c,
  PVSCSI_REG_OFFSET_INTR_MASK = 0x2010, PVSCSI_REG_OFFSET_KICK_NON_RW_IO = 0x3014, PVSCSI_REG_OFFSET_DEBUG = 0x3018, PVSCSI_REG_OFFSET_KICK_RW_IO = 0x4018
}
 
enum  PVSCSICommands {
  PVSCSI_CMD_FIRST = 0, PVSCSI_CMD_ADAPTER_RESET = 1, PVSCSI_CMD_ISSUE_SCSI = 2, PVSCSI_CMD_SETUP_RINGS = 3,
  PVSCSI_CMD_RESET_BUS = 4, PVSCSI_CMD_RESET_DEVICE = 5, PVSCSI_CMD_ABORT_CMD = 6, PVSCSI_CMD_CONFIG = 7,
  PVSCSI_CMD_SETUP_MSG_RING = 8, PVSCSI_CMD_DEVICE_UNPLUG = 9, PVSCSI_CMD_LAST = 10
}
 
enum  PVSCSIConfigPageType { PVSCSI_CONFIG_PAGE_CONTROLLER = 0x1958, PVSCSI_CONFIG_PAGE_PHY = 0x1959, PVSCSI_CONFIG_PAGE_DEVICE = 0x195a }
 
enum  PVSCSIConfigPageAddressType { PVSCSI_CONFIG_CONTROLLER_ADDRESS = 0x2120, PVSCSI_CONFIG_BUSTARGET_ADDRESS = 0x2121, PVSCSI_CONFIG_PHY_ADDRESS = 0x2122 }
 
enum  PVSCSIMsgType { PVSCSI_MSG_DEV_ADDED = 0, PVSCSI_MSG_DEV_REMOVED = 1, PVSCSI_MSG_LAST = 2 }
 
enum  PVSCSIMemSpace {
  PVSCSI_MEM_SPACE_COMMAND_PAGE = 0, PVSCSI_MEM_SPACE_INTR_STATUS_PAGE = 1, PVSCSI_MEM_SPACE_MISC_PAGE = 2, PVSCSI_MEM_SPACE_KICK_IO_PAGE = 4,
  PVSCSI_MEM_SPACE_MSIX_TABLE_PAGE = 6, PVSCSI_MEM_SPACE_MSIX_PBA_PAGE = 7
}
 

Variables

struct PVSCSICmdDescResetDevice __packed
 

Macro Definition Documentation

#define MASK (   n)    ((1 << (n)) - 1) /* make an n-bit mask */

Definition at line 33 of file vmw_pvscsi.h.

#define PCI_DEVICE_ID_VMWARE_PVSCSI   0x07C0

Definition at line 36 of file vmw_pvscsi.h.

#define PCI_VENDOR_ID_VMWARE   0x15AD

Definition at line 35 of file vmw_pvscsi.h.

#define PVSCSI_DRIVER_VERSION_STRING   "1.0.2.0-k"

Definition at line 29 of file vmw_pvscsi.h.

#define PVSCSI_FLAG_CMD_DIR_NONE   (1 << 2)

Definition at line 309 of file vmw_pvscsi.h.

#define PVSCSI_FLAG_CMD_DIR_TODEVICE   (1 << 4)

Definition at line 311 of file vmw_pvscsi.h.

#define PVSCSI_FLAG_CMD_DIR_TOHOST   (1 << 3)

Definition at line 310 of file vmw_pvscsi.h.

#define PVSCSI_FLAG_CMD_OUT_OF_BAND_CDB   (1 << 1)

Definition at line 308 of file vmw_pvscsi.h.

#define PVSCSI_FLAG_CMD_WITH_SG_LIST   (1 << 0)

Definition at line 307 of file vmw_pvscsi.h.

#define PVSCSI_INTR_ALL_SUPPORTED   MASK(4)

Definition at line 408 of file vmw_pvscsi.h.

#define PVSCSI_INTR_CMPL_0   (1 << 0)

Definition at line 400 of file vmw_pvscsi.h.

#define PVSCSI_INTR_CMPL_1   (1 << 1)

Definition at line 401 of file vmw_pvscsi.h.

#define PVSCSI_INTR_CMPL_MASK   MASK(2)

Definition at line 402 of file vmw_pvscsi.h.

#define PVSCSI_INTR_MSG_0   (1 << 2)

Definition at line 404 of file vmw_pvscsi.h.

#define PVSCSI_INTR_MSG_1   (1 << 3)

Definition at line 405 of file vmw_pvscsi.h.

#define PVSCSI_INTR_MSG_MASK   (MASK(2) << 2)

Definition at line 406 of file vmw_pvscsi.h.

#define PVSCSI_MAX_INTRS   24

Definition at line 413 of file vmw_pvscsi.h.

#define PVSCSI_MAX_NUM_PAGES_CMP_RING   PVSCSI_SETUP_RINGS_MAX_NUM_PAGES

Definition at line 425 of file vmw_pvscsi.h.

#define PVSCSI_MAX_NUM_PAGES_MSG_RING   PVSCSI_SETUP_MSG_RING_MAX_NUM_PAGES

Definition at line 426 of file vmw_pvscsi.h.

#define PVSCSI_MAX_NUM_PAGES_REQ_RING   PVSCSI_SETUP_RINGS_MAX_NUM_PAGES

Definition at line 424 of file vmw_pvscsi.h.

#define PVSCSI_MAX_NUM_REQ_ENTRIES_PER_PAGE   (PAGE_SIZE / sizeof(struct PVSCSIRingReqDesc))

Definition at line 428 of file vmw_pvscsi.h.

#define PVSCSI_MAX_NUM_SG_ENTRIES_PER_SEGMENT   128

Definition at line 31 of file vmw_pvscsi.h.

#define PVSCSI_MAX_REQ_QUEUE_DEPTH   (PVSCSI_MAX_NUM_PAGES_REQ_RING * PVSCSI_MAX_NUM_REQ_ENTRIES_PER_PAGE)

Definition at line 431 of file vmw_pvscsi.h.

#define PVSCSI_MEM_SPACE_COMMAND_NUM_PAGES   1

Definition at line 434 of file vmw_pvscsi.h.

#define PVSCSI_MEM_SPACE_INTR_STATUS_NUM_PAGES   1

Definition at line 435 of file vmw_pvscsi.h.

#define PVSCSI_MEM_SPACE_KICK_IO_NUM_PAGES   2

Definition at line 437 of file vmw_pvscsi.h.

#define PVSCSI_MEM_SPACE_MISC_NUM_PAGES   2

Definition at line 436 of file vmw_pvscsi.h.

#define PVSCSI_MEM_SPACE_MSIX_NUM_PAGES   2

Definition at line 438 of file vmw_pvscsi.h.

#define PVSCSI_MEM_SPACE_NUM_PAGES
Value:
PVSCSI_MEM_SPACE_INTR_STATUS_NUM_PAGES + \
PVSCSI_MEM_SPACE_MISC_NUM_PAGES + \
PVSCSI_MEM_SPACE_KICK_IO_NUM_PAGES + \
PVSCSI_MEM_SPACE_MSIX_NUM_PAGES)

Definition at line 449 of file vmw_pvscsi.h.

#define PVSCSI_MEM_SPACE_SIZE   (PVSCSI_MEM_SPACE_NUM_PAGES * PAGE_SIZE)

Definition at line 456 of file vmw_pvscsi.h.

#define PVSCSI_SETUP_MSG_RING_MAX_NUM_PAGES   16

Definition at line 207 of file vmw_pvscsi.h.

#define PVSCSI_SETUP_RINGS_MAX_NUM_PAGES   32

Definition at line 179 of file vmw_pvscsi.h.

#define PVSCSI_VECTOR_COMPLETION   0

Definition at line 418 of file vmw_pvscsi.h.

Enumeration Type Documentation

Enumerator:
BTSTAT_SUCCESS 
BTSTAT_LINKED_COMMAND_COMPLETED 
BTSTAT_LINKED_COMMAND_COMPLETED_WITH_FLAG 
BTSTAT_DATA_UNDERRUN 
BTSTAT_SELTIMEO 
BTSTAT_DATARUN 
BTSTAT_BUSFREE 
BTSTAT_INVPHASE 
BTSTAT_LUNMISMATCH 
BTSTAT_INVPARAM 
BTSTAT_SENSFAILED 
BTSTAT_TAGREJECT 
BTSTAT_BADMSG 
BTSTAT_HAHARDWARE 
BTSTAT_NORESPONSE 
BTSTAT_SENTRST 
BTSTAT_RECVRST 
BTSTAT_DISCONNECT 
BTSTAT_BUSRESET 
BTSTAT_ABORTQUEUE 
BTSTAT_HASOFTWARE 
BTSTAT_HATIMEOUT 
BTSTAT_SCSIPARITY 

Definition at line 41 of file vmw_pvscsi.h.

Enumerator:
PVSCSI_CMD_FIRST 
PVSCSI_CMD_ADAPTER_RESET 
PVSCSI_CMD_ISSUE_SCSI 
PVSCSI_CMD_SETUP_RINGS 
PVSCSI_CMD_RESET_BUS 
PVSCSI_CMD_RESET_DEVICE 
PVSCSI_CMD_ABORT_CMD 
PVSCSI_CMD_CONFIG 
PVSCSI_CMD_SETUP_MSG_RING 
PVSCSI_CMD_DEVICE_UNPLUG 
PVSCSI_CMD_LAST 

Definition at line 108 of file vmw_pvscsi.h.

Enumerator:
PVSCSI_CONFIG_CONTROLLER_ADDRESS 
PVSCSI_CONFIG_BUSTARGET_ADDRESS 
PVSCSI_CONFIG_PHY_ADDRESS 

Definition at line 150 of file vmw_pvscsi.h.

Enumerator:
PVSCSI_CONFIG_PAGE_CONTROLLER 
PVSCSI_CONFIG_PAGE_PHY 
PVSCSI_CONFIG_PAGE_DEVICE 

Definition at line 144 of file vmw_pvscsi.h.

Enumerator:
PVSCSI_MEM_SPACE_COMMAND_PAGE 
PVSCSI_MEM_SPACE_INTR_STATUS_PAGE 
PVSCSI_MEM_SPACE_MISC_PAGE 
PVSCSI_MEM_SPACE_KICK_IO_PAGE 
PVSCSI_MEM_SPACE_MSIX_TABLE_PAGE 
PVSCSI_MEM_SPACE_MSIX_PBA_PAGE 

Definition at line 440 of file vmw_pvscsi.h.

Enumerator:
PVSCSI_MSG_DEV_ADDED 
PVSCSI_MSG_DEV_REMOVED 
PVSCSI_MSG_LAST 

Definition at line 215 of file vmw_pvscsi.h.

Enumerator:
PVSCSI_REG_OFFSET_COMMAND 
PVSCSI_REG_OFFSET_COMMAND_DATA 
PVSCSI_REG_OFFSET_COMMAND_STATUS 
PVSCSI_REG_OFFSET_LAST_STS_0 
PVSCSI_REG_OFFSET_LAST_STS_1 
PVSCSI_REG_OFFSET_LAST_STS_2 
PVSCSI_REG_OFFSET_LAST_STS_3 
PVSCSI_REG_OFFSET_INTR_STATUS 
PVSCSI_REG_OFFSET_INTR_MASK 
PVSCSI_REG_OFFSET_KICK_NON_RW_IO 
PVSCSI_REG_OFFSET_DEBUG 
PVSCSI_REG_OFFSET_KICK_RW_IO 

Definition at line 89 of file vmw_pvscsi.h.

Enumerator:
SDSTAT_GOOD 
SDSTAT_CHECK 

Definition at line 78 of file vmw_pvscsi.h.

Variable Documentation