diff options
author | frank.blaschka@de.ibm.com <frank.blaschka@de.ibm.com> | 2011-08-08 01:33:55 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-08-13 01:10:16 -0700 |
commit | 104ea556ee7f40039c9c635d0c267b1fde084a81 (patch) | |
tree | 5b4af497551a3f2e2cb2f24030d028392aae07e0 /drivers/s390/cio/qdio.h | |
parent | 3881ac441f642d56503818123446f7298442236b (diff) |
qdio: support asynchronous delivery of storage blocks
This patch introduces support for asynchronous delivery of storage blocks for
Hipersockets. Upper layers may exploit this functionality to reuse SBALs for
which the delivery status is still pending.
Signed-off-by: Einar Lueck <elelueck@de.ibm.com>
Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/s390/cio/qdio.h')
-rw-r--r-- | drivers/s390/cio/qdio.h | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/drivers/s390/cio/qdio.h b/drivers/s390/cio/qdio.h index e5c966462c5a..2b21f65a8950 100644 --- a/drivers/s390/cio/qdio.h +++ b/drivers/s390/cio/qdio.h @@ -44,6 +44,7 @@ enum qdio_irq_states { #define SLSB_STATE_NOT_INIT 0x0 #define SLSB_STATE_EMPTY 0x1 #define SLSB_STATE_PRIMED 0x2 +#define SLSB_STATE_PENDING 0x3 #define SLSB_STATE_HALTED 0xe #define SLSB_STATE_ERROR 0xf #define SLSB_TYPE_INPUT 0x0 @@ -67,6 +68,8 @@ enum qdio_irq_states { (SLSB_OWNER_PROG | SLSB_TYPE_OUTPUT | SLSB_STATE_NOT_INIT) /* 0xa0 */ #define SLSB_P_OUTPUT_EMPTY \ (SLSB_OWNER_PROG | SLSB_TYPE_OUTPUT | SLSB_STATE_EMPTY) /* 0xa1 */ +#define SLSB_P_OUTPUT_PENDING \ + (SLSB_OWNER_PROG | SLSB_TYPE_OUTPUT | SLSB_STATE_PENDING) /* 0xa3 */ #define SLSB_CU_OUTPUT_PRIMED \ (SLSB_OWNER_CU | SLSB_TYPE_OUTPUT | SLSB_STATE_PRIMED) /* 0x62 */ #define SLSB_P_OUTPUT_HALTED \ @@ -97,6 +100,7 @@ enum qdio_irq_states { #define QDIO_SIGA_WRITE 0x00 #define QDIO_SIGA_READ 0x01 #define QDIO_SIGA_SYNC 0x02 +#define QDIO_SIGA_WRITEQ 0x04 #define QDIO_SIGA_QEBSM_FLAG 0x80 #ifdef CONFIG_64BIT @@ -253,6 +257,12 @@ struct qdio_input_q { struct qdio_output_q { /* PCIs are enabled for the queue */ int pci_out_enabled; + /* cq: use asynchronous output buffers */ + int use_cq; + /* cq: aobs used for particual SBAL */ + struct qaob **aobs; + /* cq: sbal state related to asynchronous operation */ + struct qdio_outbuf_state *sbal_state; /* timer to check for more outbound work */ struct timer_list timer; /* used SBALs before tasklet schedule */ @@ -432,9 +442,20 @@ struct indicator_t { extern struct indicator_t *q_indicators; -static inline int shared_ind(u32 *dsci) +static inline int has_multiple_inq_on_dsci(struct qdio_irq *irq) { - return dsci == &q_indicators[TIQDIO_SHARED_IND].ind; + return irq->nr_input_qs > 1; +} + +static inline int references_shared_dsci(struct qdio_irq *irq) +{ + return irq->dsci == &q_indicators[TIQDIO_SHARED_IND].ind; +} + +static inline int shared_ind(struct qdio_q *q) +{ + struct qdio_irq *i = q->irq_ptr; + return references_shared_dsci(i) || has_multiple_inq_on_dsci(i); } /* prototypes for thin interrupt */ @@ -449,6 +470,7 @@ void tiqdio_free_memory(void); int tiqdio_register_thinints(void); void tiqdio_unregister_thinints(void); + /* prototypes for setup */ void qdio_inbound_processing(unsigned long data); void qdio_outbound_processing(unsigned long data); @@ -469,6 +491,9 @@ int qdio_setup_create_sysfs(struct ccw_device *cdev); void qdio_setup_destroy_sysfs(struct ccw_device *cdev); int qdio_setup_init(void); void qdio_setup_exit(void); +int qdio_enable_async_operation(struct qdio_output_q *q); +void qdio_disable_async_operation(struct qdio_output_q *q); +struct qaob *qdio_allocate_aob(void); int debug_get_buf_state(struct qdio_q *q, unsigned int bufnr, unsigned char *state); |