Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Functions | Variables
qdio.h File Reference
#include <linux/interrupt.h>
#include <asm/cio.h>
#include <asm/ccwdev.h>

Go to the source code of this file.

Data Structures

struct  qdesfmt0
 
struct  qdr
 
struct  qib
 
struct  slibe
 
struct  qaob
 
struct  slib
 
struct  qdio_buffer_element
 
struct  qdio_buffer
 
struct  sl_element
 
struct  sl
 
struct  slsb
 
struct  qdio_outbuf_state
 
struct  qdio_ssqd_desc
 
struct  qdio_initialize
 

Macros

#define QDIO_MAX_QUEUES_PER_IRQ   4
 
#define QDIO_MAX_BUFFERS_PER_Q   128
 
#define QDIO_MAX_BUFFERS_MASK   (QDIO_MAX_BUFFERS_PER_Q - 1)
 
#define QDIO_MAX_ELEMENTS_PER_BUFFER   16
 
#define QDIO_SBAL_SIZE   256
 
#define QDIO_QETH_QFMT   0
 
#define QDIO_ZFCP_QFMT   1
 
#define QDIO_IQDIO_QFMT   2
 
#define QDR_AC_MULTI_BUFFER_ENABLE   0x01
 
#define QIB_AC_OUTBOUND_PCI_SUPPORTED   0x40
 
#define QIB_RFLAGS_ENABLE_QEBSM   0x80
 
#define QIB_RFLAGS_ENABLE_DATA_DIV   0x02
 
#define SBAL_EFLAGS_LAST_ENTRY   0x40
 
#define SBAL_EFLAGS_CONTIGUOUS   0x20
 
#define SBAL_EFLAGS_FIRST_FRAG   0x04
 
#define SBAL_EFLAGS_MIDDLE_FRAG   0x08
 
#define SBAL_EFLAGS_LAST_FRAG   0x0c
 
#define SBAL_EFLAGS_MASK   0x6f
 
#define SBAL_SFLAGS0_PCI_REQ   0x40
 
#define SBAL_SFLAGS0_DATA_CONTINUATION   0x20
 
#define SBAL_SFLAGS0_TYPE_STATUS   0x00
 
#define SBAL_SFLAGS0_TYPE_WRITE   0x08
 
#define SBAL_SFLAGS0_TYPE_READ   0x10
 
#define SBAL_SFLAGS0_TYPE_WRITE_READ   0x18
 
#define SBAL_SFLAGS0_MORE_SBALS   0x04
 
#define SBAL_SFLAGS0_COMMAND   0x02
 
#define SBAL_SFLAGS0_LAST_SBAL   0x00
 
#define SBAL_SFLAGS0_ONLY_SBAL   SBAL_SFLAGS0_COMMAND
 
#define SBAL_SFLAGS0_MIDDLE_SBAL   SBAL_SFLAGS0_MORE_SBALS
 
#define SBAL_SFLAGS0_FIRST_SBAL   (SBAL_SFLAGS0_MORE_SBALS | SBAL_SFLAGS0_COMMAND)
 
#define QDIO_OUTBUF_STATE_FLAG_NONE   0x00
 
#define QDIO_OUTBUF_STATE_FLAG_PENDING   0x01
 
#define CHSC_AC1_INITIATE_INPUTQ   0x80
 
#define AC1_SIGA_INPUT_NEEDED   0x40 /* process input queues */
 
#define AC1_SIGA_OUTPUT_NEEDED   0x20 /* process output queues */
 
#define AC1_SIGA_SYNC_NEEDED   0x10 /* ask hypervisor to sync */
 
#define AC1_AUTOMATIC_SYNC_ON_THININT   0x08 /* set by hypervisor */
 
#define AC1_AUTOMATIC_SYNC_ON_OUT_PCI   0x04 /* set by hypervisor */
 
#define AC1_SC_QEBSM_AVAILABLE   0x02 /* available for subchannel */
 
#define AC1_SC_QEBSM_ENABLED   0x01 /* enabled for subchannel */
 
#define CHSC_AC2_MULTI_BUFFER_AVAILABLE   0x0080
 
#define CHSC_AC2_MULTI_BUFFER_ENABLED   0x0040
 
#define CHSC_AC2_DATA_DIV_AVAILABLE   0x0010
 
#define CHSC_AC2_DATA_DIV_ENABLED   0x0002
 
#define CHSC_AC3_FORMAT2_CQ_AVAILABLE   0x8000
 
#define QDIO_ERROR_ACTIVATE   0x0001
 
#define QDIO_ERROR_GET_BUF_STATE   0x0002
 
#define QDIO_ERROR_SET_BUF_STATE   0x0004
 
#define QDIO_ERROR_SLSB_STATE   0x0100
 
#define QDIO_ERROR_FATAL   0x00ff
 
#define QDIO_ERROR_TEMPORARY   0xff00
 
#define QDIO_FLAG_CLEANUP_USING_CLEAR   0x01
 
#define QDIO_FLAG_CLEANUP_USING_HALT   0x02
 
#define QDIO_STATE_INACTIVE   0x00000002 /* after qdio_cleanup */
 
#define QDIO_STATE_ESTABLISHED   0x00000004 /* after qdio_establish */
 
#define QDIO_STATE_ACTIVE   0x00000008 /* after qdio_activate */
 
#define QDIO_STATE_STOPPED   0x00000010 /* after queues went down */
 
#define QDIO_FLAG_SYNC_INPUT   0x01
 
#define QDIO_FLAG_SYNC_OUTPUT   0x02
 
#define QDIO_FLAG_PCI_OUT   0x10
 

Typedefs

typedef void qdio_handler_t (struct ccw_device *, unsigned int, int, int, int, unsigned long)
 

Functions

struct qdesfmt0 __attribute__ ((packed))
 
struct qdr __attribute__ ((packed, aligned(4096)))
 
struct qib __attribute__ ((packed, aligned(256)))
 
struct slib __attribute__ ((packed, aligned(2048)))
 
struct qdio_buffer_element __attribute__ ((packed, aligned(16)))
 
struct sl __attribute__ ((packed, aligned(1024)))
 
int qdio_allocate (struct qdio_initialize *)
 
int qdio_establish (struct qdio_initialize *)
 
int qdio_activate (struct ccw_device *)
 
void qdio_release_aob (struct qaob *)
 
int do_QDIO (struct ccw_device *, unsigned int, int, unsigned int, unsigned int)
 
int qdio_start_irq (struct ccw_device *, int)
 
int qdio_stop_irq (struct ccw_device *, int)
 
int qdio_get_next_buffers (struct ccw_device *, int, int *, int *)
 
int qdio_shutdown (struct ccw_device *, int)
 
int qdio_free (struct ccw_device *)
 
int qdio_get_ssqd_desc (struct ccw_device *, struct qdio_ssqd_desc *)
 

Variables

u64 sliba
 
u64 sla
 
u64 slsba
 
u32 __pad0__
 
u32 akey
 
u32 bkey
 
u32 ckey
 
u32 dkey
 
u32 __pad1__
 
u32 qfmt
 
u32 pfmt
 
u32 ac
 
u32 iqdcnt
 
u32 __pad2__
 
u32 oqdcnt
 
u32 __pad3__
 
u32 iqdsz
 
u32 __pad4__
 
u32 oqdsz
 
u32 res [9]
 
u64 qiba
 
u32 __pad5__
 
u32 qkey
 
u32 __pad6__
 
struct qdesfmt0 qdf0 [126]
 
u32 rflags
 
u64 isliba
 
u64 osliba
 
u8 ebcnam [8]
 
u8 parm [QDIO_MAX_BUFFERS_PER_Q]
 
struct slibe __attribute__
 
u64 res0 [6]
 
u8 res1
 
u8 res2
 
u8 res3
 
u8 aorc
 
u8 flags
 
u16 cbtbs
 
u8 sb_count
 
u64 sba [QDIO_MAX_ELEMENTS_PER_BUFFER]
 
u16 dcount [QDIO_MAX_ELEMENTS_PER_BUFFER]
 
u64 user0
 
u64 res4 [2]
 
u64 user1
 
u64 user2
 
u64 nsliba
 
struct slibe slibe [QDIO_MAX_BUFFERS_PER_Q]
 
u8 eflags
 
u8 scount
 
u8 sflags
 
u32 length
 
voidaddr
 
struct qdio_buffer_element element [QDIO_MAX_ELEMENTS_PER_BUFFER]
 
unsigned long sbal
 
u8 val [QDIO_MAX_BUFFERS_PER_Q]
 
u16 sch
 
u8 qdioac1
 
u8 sch_class
 
u8 pcnt
 
u8 icnt
 
u8 ocnt
 
u8 mbccnt
 
u16 qdioac2
 
u64 sch_token
 
u8 mro
 
u8 mri
 
u16 qdioac3
 
u8 mmwc
 

Macro Definition Documentation

#define AC1_AUTOMATIC_SYNC_ON_OUT_PCI   0x04 /* set by hypervisor */

Definition at line 285 of file qdio.h.

#define AC1_AUTOMATIC_SYNC_ON_THININT   0x08 /* set by hypervisor */

Definition at line 284 of file qdio.h.

#define AC1_SC_QEBSM_AVAILABLE   0x02 /* available for subchannel */

Definition at line 286 of file qdio.h.

#define AC1_SC_QEBSM_ENABLED   0x01 /* enabled for subchannel */

Definition at line 287 of file qdio.h.

#define AC1_SIGA_INPUT_NEEDED   0x40 /* process input queues */

Definition at line 281 of file qdio.h.

#define AC1_SIGA_OUTPUT_NEEDED   0x20 /* process output queues */

Definition at line 282 of file qdio.h.

#define AC1_SIGA_SYNC_NEEDED   0x10 /* ask hypervisor to sync */

Definition at line 283 of file qdio.h.

#define CHSC_AC1_INITIATE_INPUTQ   0x80

Definition at line 277 of file qdio.h.

#define CHSC_AC2_DATA_DIV_AVAILABLE   0x0010

Definition at line 291 of file qdio.h.

#define CHSC_AC2_DATA_DIV_ENABLED   0x0002

Definition at line 292 of file qdio.h.

#define CHSC_AC2_MULTI_BUFFER_AVAILABLE   0x0080

Definition at line 289 of file qdio.h.

#define CHSC_AC2_MULTI_BUFFER_ENABLED   0x0040

Definition at line 290 of file qdio.h.

#define CHSC_AC3_FORMAT2_CQ_AVAILABLE   0x8000

Definition at line 294 of file qdio.h.

#define QDIO_ERROR_ACTIVATE   0x0001

Definition at line 326 of file qdio.h.

#define QDIO_ERROR_FATAL   0x00ff

Definition at line 331 of file qdio.h.

#define QDIO_ERROR_GET_BUF_STATE   0x0002

Definition at line 327 of file qdio.h.

#define QDIO_ERROR_SET_BUF_STATE   0x0004

Definition at line 328 of file qdio.h.

#define QDIO_ERROR_SLSB_STATE   0x0100

Definition at line 329 of file qdio.h.

#define QDIO_ERROR_TEMPORARY   0xff00

Definition at line 332 of file qdio.h.

#define QDIO_FLAG_CLEANUP_USING_CLEAR   0x01

Definition at line 335 of file qdio.h.

#define QDIO_FLAG_CLEANUP_USING_HALT   0x02

Definition at line 336 of file qdio.h.

#define QDIO_FLAG_PCI_OUT   0x10

Definition at line 388 of file qdio.h.

#define QDIO_FLAG_SYNC_INPUT   0x01

Definition at line 386 of file qdio.h.

#define QDIO_FLAG_SYNC_OUTPUT   0x02

Definition at line 387 of file qdio.h.

#define QDIO_IQDIO_QFMT   2

Definition at line 23 of file qdio.h.

#define QDIO_MAX_BUFFERS_MASK   (QDIO_MAX_BUFFERS_PER_Q - 1)

Definition at line 17 of file qdio.h.

#define QDIO_MAX_BUFFERS_PER_Q   128

Definition at line 16 of file qdio.h.

#define QDIO_MAX_ELEMENTS_PER_BUFFER   16

Definition at line 18 of file qdio.h.

#define QDIO_MAX_QUEUES_PER_IRQ   4

Definition at line 15 of file qdio.h.

#define QDIO_OUTBUF_STATE_FLAG_NONE   0x00

Definition at line 274 of file qdio.h.

#define QDIO_OUTBUF_STATE_FLAG_PENDING   0x01

Definition at line 275 of file qdio.h.

#define QDIO_QETH_QFMT   0

Definition at line 21 of file qdio.h.

#define QDIO_SBAL_SIZE   256

Definition at line 19 of file qdio.h.

#define QDIO_STATE_ACTIVE   0x00000008 /* after qdio_activate */

Definition at line 383 of file qdio.h.

#define QDIO_STATE_ESTABLISHED   0x00000004 /* after qdio_establish */

Definition at line 382 of file qdio.h.

#define QDIO_STATE_INACTIVE   0x00000002 /* after qdio_cleanup */

Definition at line 381 of file qdio.h.

#define QDIO_STATE_STOPPED   0x00000010 /* after queues went down */

Definition at line 384 of file qdio.h.

#define QDIO_ZFCP_QFMT   1

Definition at line 22 of file qdio.h.

#define QDR_AC_MULTI_BUFFER_ENABLE   0x01

Definition at line 47 of file qdio.h.

#define QIB_AC_OUTBOUND_PCI_SUPPORTED   0x40

Definition at line 85 of file qdio.h.

#define QIB_RFLAGS_ENABLE_DATA_DIV   0x02

Definition at line 87 of file qdio.h.

#define QIB_RFLAGS_ENABLE_QEBSM   0x80

Definition at line 86 of file qdio.h.

#define SBAL_EFLAGS_CONTIGUOUS   0x20

Definition at line 177 of file qdio.h.

#define SBAL_EFLAGS_FIRST_FRAG   0x04

Definition at line 178 of file qdio.h.

#define SBAL_EFLAGS_LAST_ENTRY   0x40

Definition at line 176 of file qdio.h.

#define SBAL_EFLAGS_LAST_FRAG   0x0c

Definition at line 180 of file qdio.h.

#define SBAL_EFLAGS_MASK   0x6f

Definition at line 181 of file qdio.h.

#define SBAL_EFLAGS_MIDDLE_FRAG   0x08

Definition at line 179 of file qdio.h.

#define SBAL_SFLAGS0_COMMAND   0x02

Definition at line 192 of file qdio.h.

#define SBAL_SFLAGS0_DATA_CONTINUATION   0x20

Definition at line 184 of file qdio.h.

#define SBAL_SFLAGS0_FIRST_SBAL   (SBAL_SFLAGS0_MORE_SBALS | SBAL_SFLAGS0_COMMAND)

Definition at line 196 of file qdio.h.

#define SBAL_SFLAGS0_LAST_SBAL   0x00

Definition at line 193 of file qdio.h.

#define SBAL_SFLAGS0_MIDDLE_SBAL   SBAL_SFLAGS0_MORE_SBALS

Definition at line 195 of file qdio.h.

#define SBAL_SFLAGS0_MORE_SBALS   0x04

Definition at line 191 of file qdio.h.

#define SBAL_SFLAGS0_ONLY_SBAL   SBAL_SFLAGS0_COMMAND

Definition at line 194 of file qdio.h.

#define SBAL_SFLAGS0_PCI_REQ   0x40

Definition at line 183 of file qdio.h.

#define SBAL_SFLAGS0_TYPE_READ   0x10

Definition at line 189 of file qdio.h.

#define SBAL_SFLAGS0_TYPE_STATUS   0x00

Definition at line 187 of file qdio.h.

#define SBAL_SFLAGS0_TYPE_WRITE   0x08

Definition at line 188 of file qdio.h.

#define SBAL_SFLAGS0_TYPE_WRITE_READ   0x18

Definition at line 190 of file qdio.h.

Typedef Documentation

typedef void qdio_handler_t(struct ccw_device *, unsigned int, int, int, int, unsigned long)

Definition at line 322 of file qdio.h.

Function Documentation

struct qdesfmt0 __attribute__ ( (packed)  )
read

Definition at line 171 of file esd_usb2.c.

struct qdr __attribute__ ( (packed, aligned(4096))  )
struct qib __attribute__ ( (packed, aligned(256))  )
struct slib __attribute__ ( (packed, aligned(2048))  )
struct sl __attribute__ ( (packed, aligned(1024))  )
int do_QDIO ( struct ccw_device cdev,
unsigned int  callflags,
int  q_nr,
unsigned int  bufnr,
unsigned int  count 
)

do_QDIO - process input or output buffers : associated ccw_device for the qdio subchannel : input or output and special flags from the program : queue number : buffer number : how many buffers to process

Definition at line 1676 of file qdio_main.c.

int qdio_activate ( struct ccw_device cdev)

qdio_activate - activate queues on a qdio subchannel : associated cdev

Definition at line 1477 of file qdio_main.c.

int qdio_allocate ( struct qdio_initialize init_data)

qdio_allocate - allocate qdio queues and associated data : initialization data

Definition at line 1321 of file qdio_main.c.

int qdio_establish ( struct qdio_initialize init_data)

qdio_establish - establish queues on a qdio subchannel : initialization data

Definition at line 1401 of file qdio_main.c.

int qdio_free ( struct ccw_device cdev)

qdio_free - free data structures for a qdio subchannel : associated ccw device

Definition at line 1295 of file qdio_main.c.

int qdio_get_next_buffers ( struct ccw_device cdev,
int  nr,
int bufnr,
int error 
)

qdio_get_next_buffers - process input buffers : associated ccw_device for the qdio subchannel : input queue number : first filled buffer number : buffers are in error state

Return codes < 0 - error = 0 - no new buffers found

0 - number of processed buffers

Definition at line 1762 of file qdio_main.c.

int qdio_get_ssqd_desc ( struct ccw_device cdev,
struct qdio_ssqd_desc data 
)

qdio_get_ssqd_desc - get qdio subchannel description : ccw device to get description for : where to store the ssqd

Returns 0 or an error code. The results of the chsc are stored in the specified structure.

Definition at line 1189 of file qdio_main.c.

void qdio_release_aob ( struct qaob )

Definition at line 29 of file qdio_setup.c.

int qdio_shutdown ( struct ccw_device cdev,
int  how 
)

qdio_shutdown - shut down a qdio subchannel : associated ccw device : use halt or clear to shutdown

Definition at line 1221 of file qdio_main.c.

int qdio_start_irq ( struct ccw_device cdev,
int  nr 
)

qdio_start_irq - process input buffers : associated ccw_device for the qdio subchannel : input queue number

Return codes 0 - success 1 - irqs not started since new data is available

Definition at line 1715 of file qdio_main.c.

int qdio_stop_irq ( struct ccw_device cdev,
int  nr 
)

qdio_stop_irq - disable interrupt processing for the device : associated ccw_device for the qdio subchannel : input queue number

Return codes 0 - interrupts were already disabled 1 - interrupts successfully disabled

Definition at line 1812 of file qdio_main.c.

Variable Documentation

u8 __pad0__

Definition at line 49 of file qdio.h.

u8 __pad1__

Definition at line 54 of file qdio.h.

u8 __pad2__

Definition at line 90 of file qdio.h.

u16 __pad3__

Definition at line 92 of file qdio.h.

u8 __pad4__

Definition at line 94 of file qdio.h.

u32 __pad5__

Definition at line 100 of file qdio.h.

u32 __pad6__

Definition at line 102 of file qdio.h.

u32 ac

Definition at line 87 of file qdio.h.

void* addr

Definition at line 233 of file qdio.h.

u32 akey

Definition at line 50 of file qdio.h.

u8 aorc

Definition at line 162 of file qdio.h.

u32 bkey

Definition at line 51 of file qdio.h.

u16 cbtbs

Definition at line 164 of file qdio.h.

u32 ckey

Definition at line 52 of file qdio.h.

Definition at line 167 of file qdio.h.

u32 dkey

Definition at line 53 of file qdio.h.

u8 ebcnam[8]

Definition at line 125 of file qdio.h.

u8 eflags

Definition at line 221 of file qdio.h.

Definition at line 229 of file qdio.h.

u8 flags

Definition at line 163 of file qdio.h.

u8 icnt

Definition at line 327 of file qdio.h.

u32 iqdcnt

Definition at line 89 of file qdio.h.

u32 iqdsz

Definition at line 93 of file qdio.h.

u64 isliba

Definition at line 121 of file qdio.h.

u32 length

Definition at line 227 of file qdio.h.

u8 mbccnt

Definition at line 331 of file qdio.h.

u8 mmwc

Definition at line 339 of file qdio.h.

u8 mri

Definition at line 335 of file qdio.h.

u8 mro

Definition at line 334 of file qdio.h.

u64 nsliba

Definition at line 175 of file qdio.h.

u8 ocnt

Definition at line 329 of file qdio.h.

u32 oqdcnt

Definition at line 91 of file qdio.h.

u32 oqdsz

Definition at line 95 of file qdio.h.

u64 osliba

Definition at line 122 of file qdio.h.

u8 parm

Definition at line 129 of file qdio.h.

u8 pcnt

Definition at line 326 of file qdio.h.

u32 pfmt

Definition at line 85 of file qdio.h.

struct qdesfmt0 qdf0[126]

Definition at line 103 of file qdio.h.

u8 qdioac1

Definition at line 324 of file qdio.h.

u16 qdioac2

Definition at line 332 of file qdio.h.

u16 qdioac3

Definition at line 336 of file qdio.h.

u8 qfmt

Definition at line 84 of file qdio.h.

u64 qiba

Definition at line 99 of file qdio.h.

u32 qkey

Definition at line 101 of file qdio.h.

u8 res[1000]

Definition at line 97 of file qdio.h.

u64 res0[6]

Definition at line 158 of file qdio.h.

u8 res1

Definition at line 159 of file qdio.h.

u8 res2

Definition at line 160 of file qdio.h.

u8 res3

Definition at line 161 of file qdio.h.

u64 res4[2]

Definition at line 169 of file qdio.h.

u32 rflags

Definition at line 118 of file qdio.h.

u8 sb_count

Definition at line 165 of file qdio.h.

Definition at line 166 of file qdio.h.

Definition at line 247 of file qdio.h.

u16 sch

Definition at line 321 of file qdio.h.

u8 sch_class

Definition at line 325 of file qdio.h.

u64 sch_token

Definition at line 333 of file qdio.h.

u8 scount

Definition at line 225 of file qdio.h.

u8 sflags

Definition at line 226 of file qdio.h.

u64 sla

Definition at line 47 of file qdio.h.

u64 sliba

Definition at line 46 of file qdio.h.

Definition at line 181 of file qdio.h.

u64 slsba

Definition at line 48 of file qdio.h.

u64 user0

Definition at line 168 of file qdio.h.

u64 user1

Definition at line 170 of file qdio.h.

u64 user2

Definition at line 171 of file qdio.h.

Definition at line 258 of file qdio.h.