Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
i2o.h File Reference
#include <linux/i2o-dev.h>
#include <linux/pci.h>
#include <linux/bug.h>
#include <linux/dma-mapping.h>
#include <linux/string.h>
#include <linux/slab.h>
#include <linux/workqueue.h>
#include <linux/mempool.h>
#include <linux/mutex.h>
#include <linux/scatterlist.h>
#include <linux/semaphore.h>
#include <asm/io.h>

Go to the source code of this file.

Data Structures

struct  i2o_message
 
struct  i2o_msg_mfa
 
struct  i2o_device
 
struct  i2o_event
 
struct  i2o_class_id
 
struct  i2o_driver
 
struct  i2o_dma
 
struct  i2o_pool
 
struct  i2o_io
 
struct  i2o_context_list_element
 
struct  i2o_controller
 
struct  i2o_sys_tbl_entry
 
struct  i2o_sys_tbl
 

Macros

#define I2O_MAX_DRIVERS   8
 
#define I2O_QUEUE_EMPTY   0xffffffff
 
#define CACHE_NULL   0
 
#define CACHE_PREFETCH   1
 
#define CACHE_SMARTFETCH   2
 
#define CACHE_WRITETHROUGH   17
 
#define CACHE_WRITEBACK   18
 
#define CACHE_SMARTBACK   19
 
#define CACHE_SMARTTHROUGH   20
 
#define BLKI2OGRSTRAT   _IOR('2', 1, int)
 
#define BLKI2OGWSTRAT   _IOR('2', 2, int)
 
#define BLKI2OSRSTRAT   _IOW('2', 3, int)
 
#define BLKI2OSWSTRAT   _IOW('2', 4, int)
 
#define I2O_CMD_ADAPTER_ASSIGN   0xB3
 
#define I2O_CMD_ADAPTER_READ   0xB2
 
#define I2O_CMD_ADAPTER_RELEASE   0xB5
 
#define I2O_CMD_BIOS_INFO_SET   0xA5
 
#define I2O_CMD_BOOT_DEVICE_SET   0xA7
 
#define I2O_CMD_CONFIG_VALIDATE   0xBB
 
#define I2O_CMD_CONN_SETUP   0xCA
 
#define I2O_CMD_DDM_DESTROY   0xB1
 
#define I2O_CMD_DDM_ENABLE   0xD5
 
#define I2O_CMD_DDM_QUIESCE   0xC7
 
#define I2O_CMD_DDM_RESET   0xD9
 
#define I2O_CMD_DDM_SUSPEND   0xAF
 
#define I2O_CMD_DEVICE_ASSIGN   0xB7
 
#define I2O_CMD_DEVICE_RELEASE   0xB9
 
#define I2O_CMD_HRT_GET   0xA8
 
#define I2O_CMD_ADAPTER_CLEAR   0xBE
 
#define I2O_CMD_ADAPTER_CONNECT   0xC9
 
#define I2O_CMD_ADAPTER_RESET   0xBD
 
#define I2O_CMD_LCT_NOTIFY   0xA2
 
#define I2O_CMD_OUTBOUND_INIT   0xA1
 
#define I2O_CMD_PATH_ENABLE   0xD3
 
#define I2O_CMD_PATH_QUIESCE   0xC5
 
#define I2O_CMD_PATH_RESET   0xD7
 
#define I2O_CMD_STATIC_MF_CREATE   0xDD
 
#define I2O_CMD_STATIC_MF_RELEASE   0xDF
 
#define I2O_CMD_STATUS_GET   0xA0
 
#define I2O_CMD_SW_DOWNLOAD   0xA9
 
#define I2O_CMD_SW_UPLOAD   0xAB
 
#define I2O_CMD_SW_REMOVE   0xAD
 
#define I2O_CMD_SYS_ENABLE   0xD1
 
#define I2O_CMD_SYS_MODIFY   0xC1
 
#define I2O_CMD_SYS_QUIESCE   0xC3
 
#define I2O_CMD_SYS_TAB_SET   0xA3
 
#define I2O_CMD_UTIL_NOP   0x00
 
#define I2O_CMD_UTIL_ABORT   0x01
 
#define I2O_CMD_UTIL_CLAIM   0x09
 
#define I2O_CMD_UTIL_RELEASE   0x0B
 
#define I2O_CMD_UTIL_PARAMS_GET   0x06
 
#define I2O_CMD_UTIL_PARAMS_SET   0x05
 
#define I2O_CMD_UTIL_EVT_REGISTER   0x13
 
#define I2O_CMD_UTIL_EVT_ACK   0x14
 
#define I2O_CMD_UTIL_CONFIG_DIALOG   0x10
 
#define I2O_CMD_UTIL_DEVICE_RESERVE   0x0D
 
#define I2O_CMD_UTIL_DEVICE_RELEASE   0x0F
 
#define I2O_CMD_UTIL_LOCK   0x17
 
#define I2O_CMD_UTIL_LOCK_RELEASE   0x19
 
#define I2O_CMD_UTIL_REPLY_FAULT_NOTIFY   0x15
 
#define I2O_CMD_SCSI_EXEC   0x81
 
#define I2O_CMD_SCSI_ABORT   0x83
 
#define I2O_CMD_SCSI_BUSRESET   0x27
 
#define I2O_CMD_BUS_ADAPTER_RESET   0x85
 
#define I2O_CMD_BUS_RESET   0x87
 
#define I2O_CMD_BUS_SCAN   0x89
 
#define I2O_CMD_BUS_QUIESCE   0x8b
 
#define I2O_CMD_BLOCK_READ   0x30
 
#define I2O_CMD_BLOCK_WRITE   0x31
 
#define I2O_CMD_BLOCK_CFLUSH   0x37
 
#define I2O_CMD_BLOCK_MLOCK   0x49
 
#define I2O_CMD_BLOCK_MUNLOCK   0x4B
 
#define I2O_CMD_BLOCK_MMOUNT   0x41
 
#define I2O_CMD_BLOCK_MEJECT   0x43
 
#define I2O_CMD_BLOCK_POWER   0x70
 
#define I2O_CMD_PRIVATE   0xFF
 
#define I2O_CMD_IN_PROGRESS   0x01
 
#define I2O_CMD_REJECTED   0x02
 
#define I2O_CMD_FAILED   0x03
 
#define I2O_CMD_COMPLETED   0x04
 
#define I2O_RTN_NO_ERROR   0
 
#define I2O_RTN_NOT_INIT   1
 
#define I2O_RTN_FREE_Q_EMPTY   2
 
#define I2O_RTN_TCB_ERROR   3
 
#define I2O_RTN_TRANSACTION_ERROR   4
 
#define I2O_RTN_ADAPTER_ALREADY_INIT   5
 
#define I2O_RTN_MALLOC_ERROR   6
 
#define I2O_RTN_ADPTR_NOT_REGISTERED   7
 
#define I2O_RTN_MSG_REPLY_TIMEOUT   8
 
#define I2O_RTN_NO_STATUS   9
 
#define I2O_RTN_NO_FIRM_VER   10
 
#define I2O_RTN_NO_LINK_SPEED   11
 
#define I2O_REPLY_STATUS_SUCCESS   0x00
 
#define I2O_REPLY_STATUS_ABORT_DIRTY   0x01
 
#define I2O_REPLY_STATUS_ABORT_NO_DATA_TRANSFER   0x02
 
#define I2O_REPLY_STATUS_ABORT_PARTIAL_TRANSFER   0x03
 
#define I2O_REPLY_STATUS_ERROR_DIRTY   0x04
 
#define I2O_REPLY_STATUS_ERROR_NO_DATA_TRANSFER   0x05
 
#define I2O_REPLY_STATUS_ERROR_PARTIAL_TRANSFER   0x06
 
#define I2O_REPLY_STATUS_PROCESS_ABORT_DIRTY   0x08
 
#define I2O_REPLY_STATUS_PROCESS_ABORT_NO_DATA_TRANSFER   0x09
 
#define I2O_REPLY_STATUS_PROCESS_ABORT_PARTIAL_TRANSFER   0x0A
 
#define I2O_REPLY_STATUS_TRANSACTION_ERROR   0x0B
 
#define I2O_REPLY_STATUS_PROGRESS_REPORT   0x80
 
#define I2O_PARAMS_STATUS_SUCCESS   0x00
 
#define I2O_PARAMS_STATUS_BAD_KEY_ABORT   0x01
 
#define I2O_PARAMS_STATUS_BAD_KEY_CONTINUE   0x02
 
#define I2O_PARAMS_STATUS_BUFFER_FULL   0x03
 
#define I2O_PARAMS_STATUS_BUFFER_TOO_SMALL   0x04
 
#define I2O_PARAMS_STATUS_FIELD_UNREADABLE   0x05
 
#define I2O_PARAMS_STATUS_FIELD_UNWRITEABLE   0x06
 
#define I2O_PARAMS_STATUS_INSUFFICIENT_FIELDS   0x07
 
#define I2O_PARAMS_STATUS_INVALID_GROUP_ID   0x08
 
#define I2O_PARAMS_STATUS_INVALID_OPERATION   0x09
 
#define I2O_PARAMS_STATUS_NO_KEY_FIELD   0x0A
 
#define I2O_PARAMS_STATUS_NO_SUCH_FIELD   0x0B
 
#define I2O_PARAMS_STATUS_NON_DYNAMIC_GROUP   0x0C
 
#define I2O_PARAMS_STATUS_OPERATION_ERROR   0x0D
 
#define I2O_PARAMS_STATUS_SCALAR_ERROR   0x0E
 
#define I2O_PARAMS_STATUS_TABLE_ERROR   0x0F
 
#define I2O_PARAMS_STATUS_WRONG_GROUP_TYPE   0x10
 
#define I2O_DSC_SUCCESS   0x0000
 
#define I2O_DSC_BAD_KEY   0x0002
 
#define I2O_DSC_TCL_ERROR   0x0003
 
#define I2O_DSC_REPLY_BUFFER_FULL   0x0004
 
#define I2O_DSC_NO_SUCH_PAGE   0x0005
 
#define I2O_DSC_INSUFFICIENT_RESOURCE_SOFT   0x0006
 
#define I2O_DSC_INSUFFICIENT_RESOURCE_HARD   0x0007
 
#define I2O_DSC_CHAIN_BUFFER_TOO_LARGE   0x0009
 
#define I2O_DSC_UNSUPPORTED_FUNCTION   0x000A
 
#define I2O_DSC_DEVICE_LOCKED   0x000B
 
#define I2O_DSC_DEVICE_RESET   0x000C
 
#define I2O_DSC_INAPPROPRIATE_FUNCTION   0x000D
 
#define I2O_DSC_INVALID_INITIATOR_ADDRESS   0x000E
 
#define I2O_DSC_INVALID_MESSAGE_FLAGS   0x000F
 
#define I2O_DSC_INVALID_OFFSET   0x0010
 
#define I2O_DSC_INVALID_PARAMETER   0x0011
 
#define I2O_DSC_INVALID_REQUEST   0x0012
 
#define I2O_DSC_INVALID_TARGET_ADDRESS   0x0013
 
#define I2O_DSC_MESSAGE_TOO_LARGE   0x0014
 
#define I2O_DSC_MESSAGE_TOO_SMALL   0x0015
 
#define I2O_DSC_MISSING_PARAMETER   0x0016
 
#define I2O_DSC_TIMEOUT   0x0017
 
#define I2O_DSC_UNKNOWN_ERROR   0x0018
 
#define I2O_DSC_UNKNOWN_FUNCTION   0x0019
 
#define I2O_DSC_UNSUPPORTED_VERSION   0x001A
 
#define I2O_DSC_DEVICE_BUSY   0x001B
 
#define I2O_DSC_DEVICE_NOT_AVAILABLE   0x001C
 
#define I2O_BSA_DSC_SUCCESS   0x0000
 
#define I2O_BSA_DSC_MEDIA_ERROR   0x0001
 
#define I2O_BSA_DSC_ACCESS_ERROR   0x0002
 
#define I2O_BSA_DSC_DEVICE_FAILURE   0x0003
 
#define I2O_BSA_DSC_DEVICE_NOT_READY   0x0004
 
#define I2O_BSA_DSC_MEDIA_NOT_PRESENT   0x0005
 
#define I2O_BSA_DSC_MEDIA_LOCKED   0x0006
 
#define I2O_BSA_DSC_MEDIA_FAILURE   0x0007
 
#define I2O_BSA_DSC_PROTOCOL_FAILURE   0x0008
 
#define I2O_BSA_DSC_BUS_FAILURE   0x0009
 
#define I2O_BSA_DSC_ACCESS_VIOLATION   0x000A
 
#define I2O_BSA_DSC_WRITE_PROTECTED   0x000B
 
#define I2O_BSA_DSC_DEVICE_RESET   0x000C
 
#define I2O_BSA_DSC_VOLUME_CHANGED   0x000D
 
#define I2O_BSA_DSC_TIMEOUT   0x000E
 
#define I2O_FSC_TRANSPORT_SERVICE_SUSPENDED   0x81
 
#define I2O_FSC_TRANSPORT_SERVICE_TERMINATED   0x82
 
#define I2O_FSC_TRANSPORT_CONGESTION   0x83
 
#define I2O_FSC_TRANSPORT_FAILURE   0x84
 
#define I2O_FSC_TRANSPORT_STATE_ERROR   0x85
 
#define I2O_FSC_TRANSPORT_TIME_OUT   0x86
 
#define I2O_FSC_TRANSPORT_ROUTING_FAILURE   0x87
 
#define I2O_FSC_TRANSPORT_INVALID_VERSION   0x88
 
#define I2O_FSC_TRANSPORT_INVALID_OFFSET   0x89
 
#define I2O_FSC_TRANSPORT_INVALID_MSG_FLAGS   0x8A
 
#define I2O_FSC_TRANSPORT_FRAME_TOO_SMALL   0x8B
 
#define I2O_FSC_TRANSPORT_FRAME_TOO_LARGE   0x8C
 
#define I2O_FSC_TRANSPORT_INVALID_TARGET_ID   0x8D
 
#define I2O_FSC_TRANSPORT_INVALID_INITIATOR_ID   0x8E
 
#define I2O_FSC_TRANSPORT_INVALID_INITIATOR_CONTEXT   0x8F
 
#define I2O_FSC_TRANSPORT_UNKNOWN_FAILURE   0xFF
 
#define I2O_CLAIM_PRIMARY   0x01000000
 
#define I2O_CLAIM_MANAGEMENT   0x02000000
 
#define I2O_CLAIM_AUTHORIZED   0x03000000
 
#define I2O_CLAIM_SECONDARY   0x04000000
 
#define I2OVER15   0x0001
 
#define I2OVER20   0x0002
 
#define I2OVERSION   I2OVER15
 
#define SGL_OFFSET_0   I2OVERSION
 
#define SGL_OFFSET_4   (0x0040 | I2OVERSION)
 
#define SGL_OFFSET_5   (0x0050 | I2OVERSION)
 
#define SGL_OFFSET_6   (0x0060 | I2OVERSION)
 
#define SGL_OFFSET_7   (0x0070 | I2OVERSION)
 
#define SGL_OFFSET_8   (0x0080 | I2OVERSION)
 
#define SGL_OFFSET_9   (0x0090 | I2OVERSION)
 
#define SGL_OFFSET_10   (0x00A0 | I2OVERSION)
 
#define SGL_OFFSET_11   (0x00B0 | I2OVERSION)
 
#define SGL_OFFSET_12   (0x00C0 | I2OVERSION)
 
#define SGL_OFFSET(x)   (((x)<<4) | I2OVERSION)
 
#define TRL_SINGLE_FIXED_LENGTH   0x00
 
#define TRL_SINGLE_VARIABLE_LENGTH   0x40
 
#define TRL_MULTIPLE_FIXED_LENGTH   0x80
 
#define MSG_STATIC   0x0100
 
#define MSG_64BIT_CNTXT   0x0200
 
#define MSG_MULTI_TRANS   0x1000
 
#define MSG_FAIL   0x2000
 
#define MSG_FINAL   0x4000
 
#define MSG_REPLY   0x8000
 
#define THREE_WORD_MSG_SIZE   0x00030000
 
#define FOUR_WORD_MSG_SIZE   0x00040000
 
#define FIVE_WORD_MSG_SIZE   0x00050000
 
#define SIX_WORD_MSG_SIZE   0x00060000
 
#define SEVEN_WORD_MSG_SIZE   0x00070000
 
#define EIGHT_WORD_MSG_SIZE   0x00080000
 
#define NINE_WORD_MSG_SIZE   0x00090000
 
#define TEN_WORD_MSG_SIZE   0x000A0000
 
#define ELEVEN_WORD_MSG_SIZE   0x000B0000
 
#define I2O_MESSAGE_SIZE(x)   ((x)<<16)
 
#define ADAPTER_TID   0
 
#define HOST_TID   1
 
#define I2O_MAX_OUTBOUND_MSG_FRAMES   128
 
#define I2O_OUTBOUND_MSG_FRAME_SIZE   128 /* in 32-bit words */
 
#define I2O_MSG_INPOOL_MIN   32
 
#define I2O_INBOUND_MSG_FRAME_SIZE   128 /* in 32-bit words */
 
#define I2O_POST_WAIT_OK   0
 
#define I2O_POST_WAIT_TIMEOUT   -ETIMEDOUT
 
#define I2O_CONTEXT_LIST_MIN_LENGTH   15
 
#define I2O_CONTEXT_LIST_USED   0x01
 
#define I2O_CONTEXT_LIST_DELETED   0x02
 
#define I2O_TIMEOUT_INIT_OUTBOUND_QUEUE   15
 
#define I2O_TIMEOUT_MESSAGE_GET   5
 
#define I2O_TIMEOUT_RESET   30
 
#define I2O_TIMEOUT_STATUS_GET   5
 
#define I2O_TIMEOUT_LCT_GET   360
 
#define I2O_TIMEOUT_SCSI_SCB_ABORT   240
 
#define I2O_HRT_GET_TRIES   3
 
#define I2O_LCT_GET_TRIES   3
 
#define I2O_MAX_SECTORS   1024
 
#define I2O_MAX_SECTORS_LIMITED   128
 
#define I2O_MAX_PHYS_SEGMENTS   BLK_MAX_SEGMENTS
 
#define to_i2o_driver(drv)   container_of(drv,struct i2o_driver, driver)
 
#define to_i2o_device(dev)   container_of(dev, struct i2o_device, device)
 
#define to_i2o_controller(dev)   container_of(dev, struct i2o_controller, device)
 
#define i2o_raw_writel(val, mem)   __raw_writel(cpu_to_le32(val), mem)
 
#define osm_printk(level, format, arg...)   printk(level "%s: " format, OSM_NAME , ## arg)
 
#define osm_debug(format, arg...)   do { } while (0)
 
#define osm_err(format, arg...)   osm_printk(KERN_ERR, format , ## arg)
 
#define osm_info(format, arg...)   osm_printk(KERN_INFO, format , ## arg)
 
#define osm_warn(format, arg...)   osm_printk(KERN_WARNING, format , ## arg)
 

Functions

struct i2o_messagei2o_msg_get_wait (struct i2o_controller *, int)
 
int i2o_msg_post_wait_mem (struct i2o_controller *, struct i2o_message *, unsigned long, struct i2o_dma *)
 
int i2o_status_get (struct i2o_controller *)
 
int i2o_event_register (struct i2o_device *, struct i2o_driver *, int, u32)
 
struct i2o_devicei2o_iop_find_device (struct i2o_controller *, u16)
 
struct i2o_controlleri2o_find_iop (int)
 
u16 i2o_sg_tablesize (struct i2o_controller *c, u16 body_size)
 
dma_addr_t i2o_dma_map_single (struct i2o_controller *c, void *ptr, size_t size, enum dma_data_direction direction, u32 **sg_ptr)
 
int i2o_dma_map_sg (struct i2o_controller *c, struct scatterlist *sg, int sg_count, enum dma_data_direction direction, u32 **sg_ptr)
 
int i2o_dma_alloc (struct device *dev, struct i2o_dma *addr, size_t len)
 
void i2o_dma_free (struct device *dev, struct i2o_dma *addr)
 
int i2o_dma_realloc (struct device *dev, struct i2o_dma *addr, size_t len)
 
int i2o_pool_alloc (struct i2o_pool *pool, const char *name, size_t size, int min_nr)
 
void i2o_pool_free (struct i2o_pool *pool)
 
int i2o_driver_register (struct i2o_driver *)
 
void i2o_driver_unregister (struct i2o_driver *)
 
void i2o_driver_notify_controller_add_all (struct i2o_controller *)
 
void i2o_driver_notify_controller_remove_all (struct i2o_controller *)
 
void i2o_driver_notify_device_add_all (struct i2o_device *)
 
void i2o_driver_notify_device_remove_all (struct i2o_device *)
 
int i2o_device_claim (struct i2o_device *)
 
int i2o_device_claim_release (struct i2o_device *)
 
int i2o_exec_lct_get (struct i2o_controller *)
 
int i2o_parm_field_get (struct i2o_device *, int, int, void *, int)
 
int i2o_parm_table_get (struct i2o_device *, int, int, int, void *, int, void *, int)
 
void i2o_report_status (const char *, const char *, struct i2o_message *)
 
void i2o_dump_message (struct i2o_message *)
 
void i2o_dump_hrt (struct i2o_controller *c)
 
void i2o_debug_state (struct i2o_controller *c)
 

Variables

struct list_head i2o_controllers
 

Macro Definition Documentation

#define ADAPTER_TID   0

Definition at line 356 of file i2o.h.

#define BLKI2OGRSTRAT   _IOR('2', 1, int)

Definition at line 86 of file i2o.h.

#define BLKI2OGWSTRAT   _IOR('2', 2, int)

Definition at line 87 of file i2o.h.

#define BLKI2OSRSTRAT   _IOW('2', 3, int)

Definition at line 88 of file i2o.h.

#define BLKI2OSWSTRAT   _IOW('2', 4, int)

Definition at line 89 of file i2o.h.

#define CACHE_NULL   0

Definition at line 49 of file i2o.h.

#define CACHE_PREFETCH   1

Definition at line 53 of file i2o.h.

#define CACHE_SMARTBACK   19

Definition at line 74 of file i2o.h.

#define CACHE_SMARTFETCH   2

Definition at line 58 of file i2o.h.

#define CACHE_SMARTTHROUGH   20

Definition at line 80 of file i2o.h.

#define CACHE_WRITEBACK   18

Definition at line 69 of file i2o.h.

#define CACHE_WRITETHROUGH   17

Definition at line 63 of file i2o.h.

#define EIGHT_WORD_MSG_SIZE   0x00080000

Definition at line 349 of file i2o.h.

#define ELEVEN_WORD_MSG_SIZE   0x000B0000

Definition at line 352 of file i2o.h.

#define FIVE_WORD_MSG_SIZE   0x00050000

Definition at line 346 of file i2o.h.

#define FOUR_WORD_MSG_SIZE   0x00040000

Definition at line 345 of file i2o.h.

#define HOST_TID   1

Definition at line 357 of file i2o.h.

#define I2O_BSA_DSC_ACCESS_ERROR   0x0002

Definition at line 272 of file i2o.h.

#define I2O_BSA_DSC_ACCESS_VIOLATION   0x000A

Definition at line 280 of file i2o.h.

#define I2O_BSA_DSC_BUS_FAILURE   0x0009

Definition at line 279 of file i2o.h.

#define I2O_BSA_DSC_DEVICE_FAILURE   0x0003

Definition at line 273 of file i2o.h.

#define I2O_BSA_DSC_DEVICE_NOT_READY   0x0004

Definition at line 274 of file i2o.h.

#define I2O_BSA_DSC_DEVICE_RESET   0x000C

Definition at line 282 of file i2o.h.

#define I2O_BSA_DSC_MEDIA_ERROR   0x0001

Definition at line 271 of file i2o.h.

#define I2O_BSA_DSC_MEDIA_FAILURE   0x0007

Definition at line 277 of file i2o.h.

#define I2O_BSA_DSC_MEDIA_LOCKED   0x0006

Definition at line 276 of file i2o.h.

#define I2O_BSA_DSC_MEDIA_NOT_PRESENT   0x0005

Definition at line 275 of file i2o.h.

#define I2O_BSA_DSC_PROTOCOL_FAILURE   0x0008

Definition at line 278 of file i2o.h.

#define I2O_BSA_DSC_SUCCESS   0x0000

Definition at line 270 of file i2o.h.

#define I2O_BSA_DSC_TIMEOUT   0x000E

Definition at line 284 of file i2o.h.

#define I2O_BSA_DSC_VOLUME_CHANGED   0x000D

Definition at line 283 of file i2o.h.

#define I2O_BSA_DSC_WRITE_PROTECTED   0x000B

Definition at line 281 of file i2o.h.

#define I2O_CLAIM_AUTHORIZED   0x03000000

Definition at line 308 of file i2o.h.

#define I2O_CLAIM_MANAGEMENT   0x02000000

Definition at line 307 of file i2o.h.

#define I2O_CLAIM_PRIMARY   0x01000000

Definition at line 306 of file i2o.h.

#define I2O_CLAIM_SECONDARY   0x04000000

Definition at line 309 of file i2o.h.

#define I2O_CMD_ADAPTER_ASSIGN   0xB3

Definition at line 98 of file i2o.h.

#define I2O_CMD_ADAPTER_CLEAR   0xBE

Definition at line 113 of file i2o.h.

#define I2O_CMD_ADAPTER_CONNECT   0xC9

Definition at line 114 of file i2o.h.

#define I2O_CMD_ADAPTER_READ   0xB2

Definition at line 99 of file i2o.h.

#define I2O_CMD_ADAPTER_RELEASE   0xB5

Definition at line 100 of file i2o.h.

#define I2O_CMD_ADAPTER_RESET   0xBD

Definition at line 115 of file i2o.h.

#define I2O_CMD_BIOS_INFO_SET   0xA5

Definition at line 101 of file i2o.h.

#define I2O_CMD_BLOCK_CFLUSH   0x37

Definition at line 170 of file i2o.h.

#define I2O_CMD_BLOCK_MEJECT   0x43

Definition at line 174 of file i2o.h.

#define I2O_CMD_BLOCK_MLOCK   0x49

Definition at line 171 of file i2o.h.

#define I2O_CMD_BLOCK_MMOUNT   0x41

Definition at line 173 of file i2o.h.

#define I2O_CMD_BLOCK_MUNLOCK   0x4B

Definition at line 172 of file i2o.h.

#define I2O_CMD_BLOCK_POWER   0x70

Definition at line 175 of file i2o.h.

#define I2O_CMD_BLOCK_READ   0x30

Definition at line 168 of file i2o.h.

#define I2O_CMD_BLOCK_WRITE   0x31

Definition at line 169 of file i2o.h.

#define I2O_CMD_BOOT_DEVICE_SET   0xA7

Definition at line 102 of file i2o.h.

#define I2O_CMD_BUS_ADAPTER_RESET   0x85

Definition at line 160 of file i2o.h.

#define I2O_CMD_BUS_QUIESCE   0x8b

Definition at line 163 of file i2o.h.

#define I2O_CMD_BUS_RESET   0x87

Definition at line 161 of file i2o.h.

#define I2O_CMD_BUS_SCAN   0x89

Definition at line 162 of file i2o.h.

#define I2O_CMD_COMPLETED   0x04

Definition at line 184 of file i2o.h.

#define I2O_CMD_CONFIG_VALIDATE   0xBB

Definition at line 103 of file i2o.h.

#define I2O_CMD_CONN_SETUP   0xCA

Definition at line 104 of file i2o.h.

#define I2O_CMD_DDM_DESTROY   0xB1

Definition at line 105 of file i2o.h.

#define I2O_CMD_DDM_ENABLE   0xD5

Definition at line 106 of file i2o.h.

#define I2O_CMD_DDM_QUIESCE   0xC7

Definition at line 107 of file i2o.h.

#define I2O_CMD_DDM_RESET   0xD9

Definition at line 108 of file i2o.h.

#define I2O_CMD_DDM_SUSPEND   0xAF

Definition at line 109 of file i2o.h.

#define I2O_CMD_DEVICE_ASSIGN   0xB7

Definition at line 110 of file i2o.h.

#define I2O_CMD_DEVICE_RELEASE   0xB9

Definition at line 111 of file i2o.h.

#define I2O_CMD_FAILED   0x03

Definition at line 183 of file i2o.h.

#define I2O_CMD_HRT_GET   0xA8

Definition at line 112 of file i2o.h.

#define I2O_CMD_IN_PROGRESS   0x01

Definition at line 181 of file i2o.h.

#define I2O_CMD_LCT_NOTIFY   0xA2

Definition at line 116 of file i2o.h.

#define I2O_CMD_OUTBOUND_INIT   0xA1

Definition at line 117 of file i2o.h.

#define I2O_CMD_PATH_ENABLE   0xD3

Definition at line 118 of file i2o.h.

#define I2O_CMD_PATH_QUIESCE   0xC5

Definition at line 119 of file i2o.h.

#define I2O_CMD_PATH_RESET   0xD7

Definition at line 120 of file i2o.h.

#define I2O_CMD_PRIVATE   0xFF

Definition at line 177 of file i2o.h.

#define I2O_CMD_REJECTED   0x02

Definition at line 182 of file i2o.h.

#define I2O_CMD_SCSI_ABORT   0x83

Definition at line 154 of file i2o.h.

#define I2O_CMD_SCSI_BUSRESET   0x27

Definition at line 155 of file i2o.h.

#define I2O_CMD_SCSI_EXEC   0x81

Definition at line 153 of file i2o.h.

#define I2O_CMD_STATIC_MF_CREATE   0xDD

Definition at line 121 of file i2o.h.

#define I2O_CMD_STATIC_MF_RELEASE   0xDF

Definition at line 122 of file i2o.h.

#define I2O_CMD_STATUS_GET   0xA0

Definition at line 123 of file i2o.h.

#define I2O_CMD_SW_DOWNLOAD   0xA9

Definition at line 124 of file i2o.h.

#define I2O_CMD_SW_REMOVE   0xAD

Definition at line 126 of file i2o.h.

#define I2O_CMD_SW_UPLOAD   0xAB

Definition at line 125 of file i2o.h.

#define I2O_CMD_SYS_ENABLE   0xD1

Definition at line 127 of file i2o.h.

#define I2O_CMD_SYS_MODIFY   0xC1

Definition at line 128 of file i2o.h.

#define I2O_CMD_SYS_QUIESCE   0xC3

Definition at line 129 of file i2o.h.

#define I2O_CMD_SYS_TAB_SET   0xA3

Definition at line 130 of file i2o.h.

#define I2O_CMD_UTIL_ABORT   0x01

Definition at line 136 of file i2o.h.

#define I2O_CMD_UTIL_CLAIM   0x09

Definition at line 137 of file i2o.h.

#define I2O_CMD_UTIL_CONFIG_DIALOG   0x10

Definition at line 143 of file i2o.h.

#define I2O_CMD_UTIL_DEVICE_RELEASE   0x0F

Definition at line 145 of file i2o.h.

#define I2O_CMD_UTIL_DEVICE_RESERVE   0x0D

Definition at line 144 of file i2o.h.

#define I2O_CMD_UTIL_EVT_ACK   0x14

Definition at line 142 of file i2o.h.

#define I2O_CMD_UTIL_EVT_REGISTER   0x13

Definition at line 141 of file i2o.h.

#define I2O_CMD_UTIL_LOCK   0x17

Definition at line 146 of file i2o.h.

#define I2O_CMD_UTIL_LOCK_RELEASE   0x19

Definition at line 147 of file i2o.h.

#define I2O_CMD_UTIL_NOP   0x00

Definition at line 135 of file i2o.h.

#define I2O_CMD_UTIL_PARAMS_GET   0x06

Definition at line 139 of file i2o.h.

#define I2O_CMD_UTIL_PARAMS_SET   0x05

Definition at line 140 of file i2o.h.

#define I2O_CMD_UTIL_RELEASE   0x0B

Definition at line 138 of file i2o.h.

#define I2O_CMD_UTIL_REPLY_FAULT_NOTIFY   0x15

Definition at line 148 of file i2o.h.

#define I2O_CONTEXT_LIST_DELETED   0x02

Definition at line 372 of file i2o.h.

#define I2O_CONTEXT_LIST_MIN_LENGTH   15

Definition at line 370 of file i2o.h.

#define I2O_CONTEXT_LIST_USED   0x01

Definition at line 371 of file i2o.h.

#define I2O_DSC_BAD_KEY   0x0002

Definition at line 240 of file i2o.h.

#define I2O_DSC_CHAIN_BUFFER_TOO_LARGE   0x0009

Definition at line 246 of file i2o.h.

#define I2O_DSC_DEVICE_BUSY   0x001B

Definition at line 264 of file i2o.h.

#define I2O_DSC_DEVICE_LOCKED   0x000B

Definition at line 248 of file i2o.h.

#define I2O_DSC_DEVICE_NOT_AVAILABLE   0x001C

Definition at line 265 of file i2o.h.

#define I2O_DSC_DEVICE_RESET   0x000C

Definition at line 249 of file i2o.h.

#define I2O_DSC_INAPPROPRIATE_FUNCTION   0x000D

Definition at line 250 of file i2o.h.

#define I2O_DSC_INSUFFICIENT_RESOURCE_HARD   0x0007

Definition at line 245 of file i2o.h.

#define I2O_DSC_INSUFFICIENT_RESOURCE_SOFT   0x0006

Definition at line 244 of file i2o.h.

#define I2O_DSC_INVALID_INITIATOR_ADDRESS   0x000E

Definition at line 251 of file i2o.h.

#define I2O_DSC_INVALID_MESSAGE_FLAGS   0x000F

Definition at line 252 of file i2o.h.

#define I2O_DSC_INVALID_OFFSET   0x0010

Definition at line 253 of file i2o.h.

#define I2O_DSC_INVALID_PARAMETER   0x0011

Definition at line 254 of file i2o.h.

#define I2O_DSC_INVALID_REQUEST   0x0012

Definition at line 255 of file i2o.h.

#define I2O_DSC_INVALID_TARGET_ADDRESS   0x0013

Definition at line 256 of file i2o.h.

#define I2O_DSC_MESSAGE_TOO_LARGE   0x0014

Definition at line 257 of file i2o.h.

#define I2O_DSC_MESSAGE_TOO_SMALL   0x0015

Definition at line 258 of file i2o.h.

#define I2O_DSC_MISSING_PARAMETER   0x0016

Definition at line 259 of file i2o.h.

#define I2O_DSC_NO_SUCH_PAGE   0x0005

Definition at line 243 of file i2o.h.

#define I2O_DSC_REPLY_BUFFER_FULL   0x0004

Definition at line 242 of file i2o.h.

#define I2O_DSC_SUCCESS   0x0000

Definition at line 239 of file i2o.h.

#define I2O_DSC_TCL_ERROR   0x0003

Definition at line 241 of file i2o.h.

#define I2O_DSC_TIMEOUT   0x0017

Definition at line 260 of file i2o.h.

#define I2O_DSC_UNKNOWN_ERROR   0x0018

Definition at line 261 of file i2o.h.

#define I2O_DSC_UNKNOWN_FUNCTION   0x0019

Definition at line 262 of file i2o.h.

#define I2O_DSC_UNSUPPORTED_FUNCTION   0x000A

Definition at line 247 of file i2o.h.

#define I2O_DSC_UNSUPPORTED_VERSION   0x001A

Definition at line 263 of file i2o.h.

#define I2O_FSC_TRANSPORT_CONGESTION   0x83

Definition at line 290 of file i2o.h.

#define I2O_FSC_TRANSPORT_FAILURE   0x84

Definition at line 291 of file i2o.h.

#define I2O_FSC_TRANSPORT_FRAME_TOO_LARGE   0x8C

Definition at line 299 of file i2o.h.

#define I2O_FSC_TRANSPORT_FRAME_TOO_SMALL   0x8B

Definition at line 298 of file i2o.h.

#define I2O_FSC_TRANSPORT_INVALID_INITIATOR_CONTEXT   0x8F

Definition at line 302 of file i2o.h.

#define I2O_FSC_TRANSPORT_INVALID_INITIATOR_ID   0x8E

Definition at line 301 of file i2o.h.

#define I2O_FSC_TRANSPORT_INVALID_MSG_FLAGS   0x8A

Definition at line 297 of file i2o.h.

#define I2O_FSC_TRANSPORT_INVALID_OFFSET   0x89

Definition at line 296 of file i2o.h.

#define I2O_FSC_TRANSPORT_INVALID_TARGET_ID   0x8D

Definition at line 300 of file i2o.h.

#define I2O_FSC_TRANSPORT_INVALID_VERSION   0x88

Definition at line 295 of file i2o.h.

#define I2O_FSC_TRANSPORT_ROUTING_FAILURE   0x87

Definition at line 294 of file i2o.h.

#define I2O_FSC_TRANSPORT_SERVICE_SUSPENDED   0x81

Definition at line 288 of file i2o.h.

#define I2O_FSC_TRANSPORT_SERVICE_TERMINATED   0x82

Definition at line 289 of file i2o.h.

#define I2O_FSC_TRANSPORT_STATE_ERROR   0x85

Definition at line 292 of file i2o.h.

#define I2O_FSC_TRANSPORT_TIME_OUT   0x86

Definition at line 293 of file i2o.h.

#define I2O_FSC_TRANSPORT_UNKNOWN_FAILURE   0xFF

Definition at line 303 of file i2o.h.

#define I2O_HRT_GET_TRIES   3

Definition at line 383 of file i2o.h.

#define I2O_INBOUND_MSG_FRAME_SIZE   128 /* in 32-bit words */

Definition at line 365 of file i2o.h.

#define I2O_LCT_GET_TRIES   3

Definition at line 384 of file i2o.h.

#define I2O_MAX_DRIVERS   8

Definition at line 24 of file i2o.h.

#define I2O_MAX_OUTBOUND_MSG_FRAMES   128

Definition at line 360 of file i2o.h.

#define I2O_MAX_PHYS_SEGMENTS   BLK_MAX_SEGMENTS

Definition at line 389 of file i2o.h.

#define I2O_MAX_SECTORS   1024

Definition at line 387 of file i2o.h.

#define I2O_MAX_SECTORS_LIMITED   128

Definition at line 388 of file i2o.h.

#define I2O_MESSAGE_SIZE (   x)    ((x)<<16)

Definition at line 353 of file i2o.h.

#define I2O_MSG_INPOOL_MIN   32

Definition at line 364 of file i2o.h.

#define I2O_OUTBOUND_MSG_FRAME_SIZE   128 /* in 32-bit words */

Definition at line 361 of file i2o.h.

#define I2O_PARAMS_STATUS_BAD_KEY_ABORT   0x01

Definition at line 219 of file i2o.h.

#define I2O_PARAMS_STATUS_BAD_KEY_CONTINUE   0x02

Definition at line 220 of file i2o.h.

#define I2O_PARAMS_STATUS_BUFFER_FULL   0x03

Definition at line 221 of file i2o.h.

#define I2O_PARAMS_STATUS_BUFFER_TOO_SMALL   0x04

Definition at line 222 of file i2o.h.

#define I2O_PARAMS_STATUS_FIELD_UNREADABLE   0x05

Definition at line 223 of file i2o.h.

#define I2O_PARAMS_STATUS_FIELD_UNWRITEABLE   0x06

Definition at line 224 of file i2o.h.

#define I2O_PARAMS_STATUS_INSUFFICIENT_FIELDS   0x07

Definition at line 225 of file i2o.h.

#define I2O_PARAMS_STATUS_INVALID_GROUP_ID   0x08

Definition at line 226 of file i2o.h.

#define I2O_PARAMS_STATUS_INVALID_OPERATION   0x09

Definition at line 227 of file i2o.h.

#define I2O_PARAMS_STATUS_NO_KEY_FIELD   0x0A

Definition at line 228 of file i2o.h.

#define I2O_PARAMS_STATUS_NO_SUCH_FIELD   0x0B

Definition at line 229 of file i2o.h.

#define I2O_PARAMS_STATUS_NON_DYNAMIC_GROUP   0x0C

Definition at line 230 of file i2o.h.

#define I2O_PARAMS_STATUS_OPERATION_ERROR   0x0D

Definition at line 231 of file i2o.h.

#define I2O_PARAMS_STATUS_SCALAR_ERROR   0x0E

Definition at line 232 of file i2o.h.

#define I2O_PARAMS_STATUS_SUCCESS   0x00

Definition at line 218 of file i2o.h.

#define I2O_PARAMS_STATUS_TABLE_ERROR   0x0F

Definition at line 233 of file i2o.h.

#define I2O_PARAMS_STATUS_WRONG_GROUP_TYPE   0x10

Definition at line 234 of file i2o.h.

#define I2O_POST_WAIT_OK   0

Definition at line 367 of file i2o.h.

#define I2O_POST_WAIT_TIMEOUT   -ETIMEDOUT

Definition at line 368 of file i2o.h.

#define I2O_QUEUE_EMPTY   0xffffffff

Definition at line 40 of file i2o.h.

#define i2o_raw_writel (   val,
  mem 
)    __raw_writel(cpu_to_le32(val), mem)

Definition at line 957 of file i2o.h.

#define I2O_REPLY_STATUS_ABORT_DIRTY   0x01

Definition at line 204 of file i2o.h.

#define I2O_REPLY_STATUS_ABORT_NO_DATA_TRANSFER   0x02

Definition at line 205 of file i2o.h.

#define I2O_REPLY_STATUS_ABORT_PARTIAL_TRANSFER   0x03

Definition at line 206 of file i2o.h.

#define I2O_REPLY_STATUS_ERROR_DIRTY   0x04

Definition at line 207 of file i2o.h.

#define I2O_REPLY_STATUS_ERROR_NO_DATA_TRANSFER   0x05

Definition at line 208 of file i2o.h.

#define I2O_REPLY_STATUS_ERROR_PARTIAL_TRANSFER   0x06

Definition at line 209 of file i2o.h.

#define I2O_REPLY_STATUS_PROCESS_ABORT_DIRTY   0x08

Definition at line 210 of file i2o.h.

#define I2O_REPLY_STATUS_PROCESS_ABORT_NO_DATA_TRANSFER   0x09

Definition at line 211 of file i2o.h.

#define I2O_REPLY_STATUS_PROCESS_ABORT_PARTIAL_TRANSFER   0x0A

Definition at line 212 of file i2o.h.

#define I2O_REPLY_STATUS_PROGRESS_REPORT   0x80

Definition at line 214 of file i2o.h.

#define I2O_REPLY_STATUS_SUCCESS   0x00

Definition at line 203 of file i2o.h.

#define I2O_REPLY_STATUS_TRANSACTION_ERROR   0x0B

Definition at line 213 of file i2o.h.

#define I2O_RTN_ADAPTER_ALREADY_INIT   5

Definition at line 193 of file i2o.h.

#define I2O_RTN_ADPTR_NOT_REGISTERED   7

Definition at line 195 of file i2o.h.

#define I2O_RTN_FREE_Q_EMPTY   2

Definition at line 190 of file i2o.h.

#define I2O_RTN_MALLOC_ERROR   6

Definition at line 194 of file i2o.h.

#define I2O_RTN_MSG_REPLY_TIMEOUT   8

Definition at line 196 of file i2o.h.

#define I2O_RTN_NO_ERROR   0

Definition at line 188 of file i2o.h.

#define I2O_RTN_NO_FIRM_VER   10

Definition at line 198 of file i2o.h.

#define I2O_RTN_NO_LINK_SPEED   11

Definition at line 199 of file i2o.h.

#define I2O_RTN_NO_STATUS   9

Definition at line 197 of file i2o.h.

#define I2O_RTN_NOT_INIT   1

Definition at line 189 of file i2o.h.

#define I2O_RTN_TCB_ERROR   3

Definition at line 191 of file i2o.h.

#define I2O_RTN_TRANSACTION_ERROR   4

Definition at line 192 of file i2o.h.

#define I2O_TIMEOUT_INIT_OUTBOUND_QUEUE   15

Definition at line 375 of file i2o.h.

#define I2O_TIMEOUT_LCT_GET   360

Definition at line 379 of file i2o.h.

#define I2O_TIMEOUT_MESSAGE_GET   5

Definition at line 376 of file i2o.h.

#define I2O_TIMEOUT_RESET   30

Definition at line 377 of file i2o.h.

#define I2O_TIMEOUT_SCSI_SCB_ABORT   240

Definition at line 380 of file i2o.h.

#define I2O_TIMEOUT_STATUS_GET   5

Definition at line 378 of file i2o.h.

#define I2OVER15   0x0001

Definition at line 312 of file i2o.h.

#define I2OVER20   0x0002

Definition at line 313 of file i2o.h.

#define I2OVERSION   I2OVER15

Definition at line 316 of file i2o.h.

#define MSG_64BIT_CNTXT   0x0200

Definition at line 337 of file i2o.h.

#define MSG_FAIL   0x2000

Definition at line 339 of file i2o.h.

#define MSG_FINAL   0x4000

Definition at line 340 of file i2o.h.

#define MSG_MULTI_TRANS   0x1000

Definition at line 338 of file i2o.h.

#define MSG_REPLY   0x8000

Definition at line 341 of file i2o.h.

#define MSG_STATIC   0x0100

Definition at line 336 of file i2o.h.

#define NINE_WORD_MSG_SIZE   0x00090000

Definition at line 350 of file i2o.h.

#define osm_debug (   format,
  arg... 
)    do { } while (0)

Definition at line 971 of file i2o.h.

#define osm_err (   format,
  arg... 
)    osm_printk(KERN_ERR, format , ## arg)

Definition at line 975 of file i2o.h.

#define osm_info (   format,
  arg... 
)    osm_printk(KERN_INFO, format , ## arg)

Definition at line 977 of file i2o.h.

#define osm_printk (   level,
  format,
  arg... 
)    printk(level "%s: " format, OSM_NAME , ## arg)

Definition at line 964 of file i2o.h.

#define osm_warn (   format,
  arg... 
)    osm_printk(KERN_WARNING, format , ## arg)

Definition at line 979 of file i2o.h.

#define SEVEN_WORD_MSG_SIZE   0x00070000

Definition at line 348 of file i2o.h.

#define SGL_OFFSET (   x)    (((x)<<4) | I2OVERSION)

Definition at line 328 of file i2o.h.

#define SGL_OFFSET_0   I2OVERSION

Definition at line 318 of file i2o.h.

#define SGL_OFFSET_10   (0x00A0 | I2OVERSION)

Definition at line 325 of file i2o.h.

#define SGL_OFFSET_11   (0x00B0 | I2OVERSION)

Definition at line 326 of file i2o.h.

#define SGL_OFFSET_12   (0x00C0 | I2OVERSION)

Definition at line 327 of file i2o.h.

#define SGL_OFFSET_4   (0x0040 | I2OVERSION)

Definition at line 319 of file i2o.h.

#define SGL_OFFSET_5   (0x0050 | I2OVERSION)

Definition at line 320 of file i2o.h.

#define SGL_OFFSET_6   (0x0060 | I2OVERSION)

Definition at line 321 of file i2o.h.

#define SGL_OFFSET_7   (0x0070 | I2OVERSION)

Definition at line 322 of file i2o.h.

#define SGL_OFFSET_8   (0x0080 | I2OVERSION)

Definition at line 323 of file i2o.h.

#define SGL_OFFSET_9   (0x0090 | I2OVERSION)

Definition at line 324 of file i2o.h.

#define SIX_WORD_MSG_SIZE   0x00060000

Definition at line 347 of file i2o.h.

#define TEN_WORD_MSG_SIZE   0x000A0000

Definition at line 351 of file i2o.h.

#define THREE_WORD_MSG_SIZE   0x00030000

Definition at line 344 of file i2o.h.

#define to_i2o_controller (   dev)    container_of(dev, struct i2o_controller, device)

Definition at line 785 of file i2o.h.

#define to_i2o_device (   dev)    container_of(dev, struct i2o_device, device)

Definition at line 784 of file i2o.h.

#define to_i2o_driver (   drv)    container_of(drv,struct i2o_driver, driver)

Definition at line 783 of file i2o.h.

#define TRL_MULTIPLE_FIXED_LENGTH   0x80

Definition at line 333 of file i2o.h.

#define TRL_SINGLE_FIXED_LENGTH   0x00

Definition at line 331 of file i2o.h.

#define TRL_SINGLE_VARIABLE_LENGTH   0x40

Definition at line 332 of file i2o.h.

Function Documentation

void i2o_debug_state ( struct i2o_controller c)

Definition at line 359 of file debug.c.

int i2o_device_claim ( struct i2o_device dev)

i2o_device_claim - claim a device for use by an OSM : I2O device to claim

Do the leg work to assign a device to a given OSM. If the claim succeeds, the owner is the primary. If the attempt fails a negative errno code is returned. On success zero is returned.

Definition at line 60 of file device.c.

int i2o_device_claim_release ( struct i2o_device dev)

i2o_device_claim_release - release a device that the OSM is using : device to release

Drop a claim by an OSM on a given I2O device.

AC - some devices seem to want to refuse an unclaim until they have finished internal processing. It makes sense since you don't want a new device to go reconfiguring the entire system until you are done. Thus we are prepared to wait briefly.

Returns 0 on success or negative error code on failure.

Definition at line 92 of file device.c.

int i2o_dma_alloc ( struct device dev,
struct i2o_dma addr,
size_t  len 
)

i2o_dma_alloc - Allocate DMA memory : struct device pointer to the PCI device of the I2O controller : i2o_dma struct which should get the DMA buffer : length of the new DMA memory

Allocate a coherent DMA memory and write the pointers into addr.

Returns 0 on success or -ENOMEM on failure.

Definition at line 182 of file memory.c.

void i2o_dma_free ( struct device dev,
struct i2o_dma addr 
)

i2o_dma_free - Free DMA memory : struct device pointer to the PCI device of the I2O controller : i2o_dma struct which contains the DMA buffer

Free a coherent DMA memory and set virtual address of addr to NULL.

Definition at line 221 of file memory.c.

int i2o_dma_map_sg ( struct i2o_controller c,
struct scatterlist sg,
int  sg_count,
enum dma_data_direction  direction,
u32 **  sg_ptr 
)

i2o_dma_map_sg - Map a SG List to controller and fill in I2O message. : I2O controller : SG list to be mapped : number of elements in the SG list : DMA_TO_DEVICE / DMA_FROM_DEVICE : pointer to the SG list inside the I2O message

This function does all necessary DMA handling and also writes the I2O SGL elements into the I2O message. For details on DMA handling see also dma_map_sg(). The pointer sg_ptr will only be set to the end of the SG list if the allocation was successful.

Returns 0 on failure or 1 on success.

Definition at line 127 of file memory.c.

dma_addr_t i2o_dma_map_single ( struct i2o_controller c,
void ptr,
size_t  size,
enum dma_data_direction  direction,
u32 **  sg_ptr 
)

i2o_dma_map_single - Map pointer to controller and fill in I2O message. : I2O controller : pointer to the data which should be mapped : size of data in bytes : DMA_TO_DEVICE / DMA_FROM_DEVICE : pointer to the SG list inside the I2O message

This function does all necessary DMA handling and also writes the I2O SGL elements into the I2O message. For details on DMA handling see also dma_map_single(). The pointer sg_ptr will only be set to the end of the SG list if the allocation was successful.

Returns DMA address which must be checked for failures using dma_mapping_error().

Definition at line 71 of file memory.c.

int i2o_dma_realloc ( struct device dev,
struct i2o_dma addr,
size_t  len 
)

i2o_dma_realloc - Realloc DMA memory : struct device pointer to the PCI device of the I2O controller : pointer to a i2o_dma struct DMA buffer : new length of memory

If there was something allocated in the addr, free it first. If len > 0 than try to allocate it and write the addresses back to the addr structure. If len == 0 set the virtual address to NULL.

Returns the 0 on success or negative error code on failure.

Definition at line 247 of file memory.c.

void i2o_driver_notify_controller_add_all ( struct i2o_controller c)

i2o_driver_notify_controller_add_all - Send notify of added controller : newly added controller

Send notifications to all registered drivers that a new controller was added.

Definition at line 258 of file driver.c.

void i2o_driver_notify_controller_remove_all ( struct i2o_controller c)

i2o_driver_notify_controller_remove_all - Send notify of removed controller : controller that is being removed

Send notifications to all registered drivers that a controller was removed.

Definition at line 278 of file driver.c.

void i2o_driver_notify_device_add_all ( struct i2o_device i2o_dev)

i2o_driver_notify_device_add_all - Send notify of added device : newly added I2O device

Send notifications to all registered drivers that a device was added.

Definition at line 297 of file driver.c.

void i2o_driver_notify_device_remove_all ( struct i2o_device i2o_dev)

i2o_driver_notify_device_remove_all - Send notify of removed device : device that is being removed

Send notifications to all registered drivers that a device was removed.

Definition at line 316 of file driver.c.

int i2o_driver_register ( struct i2o_driver drv)

i2o_driver_register - Register a I2O driver (OSM) in the I2O core : I2O driver which should be registered

Registers the OSM drv in the I2O core and creates an event queues if necessary.

Returns 0 on success or negative error code on failure.

Definition at line 77 of file driver.c.

void i2o_driver_unregister ( struct i2o_driver drv)

i2o_driver_unregister - Unregister a I2O driver (OSM) from the I2O core : I2O driver which should be unregistered

Unregisters the OSM drv from the I2O core and cleanup event queues if necessary.

Definition at line 144 of file driver.c.

void i2o_dump_hrt ( struct i2o_controller c)

Definition at line 390 of file debug.c.

void i2o_dump_message ( struct i2o_message )

Definition at line 52 of file debug.c.

int i2o_event_register ( struct i2o_device dev,
struct i2o_driver drv,
int  tcntxt,
u32  evt_mask 
)

i2o_event_register - Turn on/off event notification for a I2O device : I2O device which should receive the event registration request : driver which want to get notified : transaction context to use with this notifier : mask of events

Create and posts an event registration message to the task. No reply is waited for, or expected. If you do not want further notifications, call the i2o_event_register again with a evt_mask of 0.

Returns 0 on success or negative error code on failure.

Definition at line 1159 of file iop.c.

int i2o_exec_lct_get ( struct i2o_controller c)

i2o_exec_lct_get - Get the IOP's Logical Configuration Table : I2O controller from which the LCT should be fetched

Send a LCT NOTIFY request to the controller, and wait I2O_TIMEOUT_LCT_GET seconds until arrival of response. If the LCT is to large, retry it.

Returns 0 on success or negative error code on failure.

Definition at line 544 of file exec-osm.c.

struct i2o_controller* i2o_find_iop ( int  unit)
read

i2o_iop_find - Find an I2O controller by id : unit number of the I2O controller to search for

Lookup the I2O controller on the controller list.

Returns pointer to the I2O controller on success or NULL if not found.

Definition at line 238 of file iop.c.

struct i2o_device* i2o_iop_find_device ( struct i2o_controller c,
u16  tid 
)
read

i2o_iop_find_device - Find a I2O device on an I2O controller : I2O controller where the I2O device hangs on : TID of the I2O device to search for

Searches the devices of the I2O controller for a device with TID tid and returns it.

Returns a pointer to the I2O device if found, otherwise NULL.

Definition at line 260 of file iop.c.

struct i2o_message* i2o_msg_get_wait ( struct i2o_controller c,
int  wait 
)
read

i2o_msg_get_wait - obtain an I2O message from the IOP : I2O controller : how long to wait until timeout

This function waits up to wait seconds for a message slot to be available.

On a success the message is returned and the pointer to the message is set in msg. The returned message is the physical page frame offset address from the read port (see the i2o spec). If no message is available returns I2O_QUEUE_EMPTY and msg is leaved untouched.

Definition at line 63 of file iop.c.

int i2o_msg_post_wait_mem ( struct i2o_controller c,
struct i2o_message msg,
unsigned long  timeout,
struct i2o_dma dma 
)

i2o_msg_post_wait_mem - Post and wait a message with DMA buffers : controller : message to post : time in seconds to wait : i2o_dma struct of the DMA buffer to free on failure

This API allows an OSM to post a message and then be told whether or not the system received a successful reply. If the message times out then the value '-ETIMEDOUT' is returned. This is a special case. In this situation the message may (should) complete at an indefinite time in the future. When it completes it will use the memory buffer attached to the request. If -ETIMEDOUT is returned then the memory buffer must not be freed. Instead the event completion will free them for you. In all other cases the buffer are your problem.

Returns 0 on success, negative error code on timeout or positive error code from reply.

Definition at line 122 of file exec-osm.c.

int i2o_parm_field_get ( struct i2o_device ,
int  ,
int  ,
void ,
int   
)

Definition at line 506 of file device.c.

int i2o_parm_table_get ( struct i2o_device ,
int  ,
int  ,
int  ,
void ,
int  ,
void ,
int   
)

Definition at line 546 of file device.c.

int i2o_pool_alloc ( struct i2o_pool pool,
const char name,
size_t  size,
int  min_nr 
)

Definition at line 270 of file memory.c.

void i2o_pool_free ( struct i2o_pool pool)

Definition at line 307 of file memory.c.

void i2o_report_status ( const char ,
const char ,
struct i2o_message  
)

Definition at line 16 of file debug.c.

u16 i2o_sg_tablesize ( struct i2o_controller c,
u16  body_size 
)

i2o_sg_tablesize - Calculate the maximum number of elements in a SGL : I2O controller for which the calculation should be done : maximum body size used for message in 32-bit words.

Return the maximum number of SG elements in a SG list.

Definition at line 30 of file memory.c.

int i2o_status_get ( struct i2o_controller c)

i2o_status_get - Get the status block from the I2O controller : I2O controller

Issue a status query on the controller. This updates the attached status block. The status block could then be accessed through c->status_block.

Returns 0 on success or negative error code on failure.

Definition at line 921 of file iop.c.

Variable Documentation

struct list_head i2o_controllers