aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio/qdio.h
diff options
context:
space:
mode:
authorfrank.blaschka@de.ibm.com <frank.blaschka@de.ibm.com>2011-08-07 21:33:55 -0400
committerDavid S. Miller <davem@davemloft.net>2011-08-13 04:10:16 -0400
commit104ea556ee7f40039c9c635d0c267b1fde084a81 (patch)
tree5b4af497551a3f2e2cb2f24030d028392aae07e0 /drivers/s390/cio/qdio.h
parent3881ac441f642d56503818123446f7298442236b (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.h29
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 {
44#define SLSB_STATE_NOT_INIT 0x0 44#define SLSB_STATE_NOT_INIT 0x0
45#define SLSB_STATE_EMPTY 0x1 45#define SLSB_STATE_EMPTY 0x1
46#define SLSB_STATE_PRIMED 0x2 46#define SLSB_STATE_PRIMED 0x2
47#define SLSB_STATE_PENDING 0x3
47#define SLSB_STATE_HALTED 0xe 48#define SLSB_STATE_HALTED 0xe
48#define SLSB_STATE_ERROR 0xf 49#define SLSB_STATE_ERROR 0xf
49#define SLSB_TYPE_INPUT 0x0 50#define SLSB_TYPE_INPUT 0x0
@@ -67,6 +68,8 @@ enum qdio_irq_states {
67 (SLSB_OWNER_PROG | SLSB_TYPE_OUTPUT | SLSB_STATE_NOT_INIT) /* 0xa0 */ 68 (SLSB_OWNER_PROG | SLSB_TYPE_OUTPUT | SLSB_STATE_NOT_INIT) /* 0xa0 */
68#define SLSB_P_OUTPUT_EMPTY \ 69#define SLSB_P_OUTPUT_EMPTY \
69 (SLSB_OWNER_PROG | SLSB_TYPE_OUTPUT | SLSB_STATE_EMPTY) /* 0xa1 */ 70 (SLSB_OWNER_PROG | SLSB_TYPE_OUTPUT | SLSB_STATE_EMPTY) /* 0xa1 */
71#define SLSB_P_OUTPUT_PENDING \
72 (SLSB_OWNER_PROG | SLSB_TYPE_OUTPUT | SLSB_STATE_PENDING) /* 0xa3 */
70#define SLSB_CU_OUTPUT_PRIMED \ 73#define SLSB_CU_OUTPUT_PRIMED \
71 (SLSB_OWNER_CU | SLSB_TYPE_OUTPUT | SLSB_STATE_PRIMED) /* 0x62 */ 74 (SLSB_OWNER_CU | SLSB_TYPE_OUTPUT | SLSB_STATE_PRIMED) /* 0x62 */
72#define SLSB_P_OUTPUT_HALTED \ 75#define SLSB_P_OUTPUT_HALTED \
@@ -97,6 +100,7 @@ enum qdio_irq_states {
97#define QDIO_SIGA_WRITE 0x00 100#define QDIO_SIGA_WRITE 0x00
98#define QDIO_SIGA_READ 0x01 101#define QDIO_SIGA_READ 0x01
99#define QDIO_SIGA_SYNC 0x02 102#define QDIO_SIGA_SYNC 0x02
103#define QDIO_SIGA_WRITEQ 0x04
100#define QDIO_SIGA_QEBSM_FLAG 0x80 104#define QDIO_SIGA_QEBSM_FLAG 0x80
101 105
102#ifdef CONFIG_64BIT 106#ifdef CONFIG_64BIT
@@ -253,6 +257,12 @@ struct qdio_input_q {
253struct qdio_output_q { 257struct qdio_output_q {
254 /* PCIs are enabled for the queue */ 258 /* PCIs are enabled for the queue */
255 int pci_out_enabled; 259 int pci_out_enabled;
260 /* cq: use asynchronous output buffers */
261 int use_cq;
262 /* cq: aobs used for particual SBAL */
263 struct qaob **aobs;
264 /* cq: sbal state related to asynchronous operation */
265 struct qdio_outbuf_state *sbal_state;
256 /* timer to check for more outbound work */ 266 /* timer to check for more outbound work */
257 struct timer_list timer; 267 struct timer_list timer;
258 /* used SBALs before tasklet schedule */ 268 /* used SBALs before tasklet schedule */
@@ -432,9 +442,20 @@ struct indicator_t {
432 442
433extern struct indicator_t *q_indicators; 443extern struct indicator_t *q_indicators;
434 444
435static inline int shared_ind(u32 *dsci) 445static inline int has_multiple_inq_on_dsci(struct qdio_irq *irq)
436{ 446{
437 return dsci == &q_indicators[TIQDIO_SHARED_IND].ind; 447 return irq->nr_input_qs > 1;
448}
449
450static inline int references_shared_dsci(struct qdio_irq *irq)
451{
452 return irq->dsci == &q_indicators[TIQDIO_SHARED_IND].ind;
453}
454
455static inline int shared_ind(struct qdio_q *q)
456{
457 struct qdio_irq *i = q->irq_ptr;
458 return references_shared_dsci(i) || has_multiple_inq_on_dsci(i);
438} 459}
439 460
440/* prototypes for thin interrupt */ 461/* prototypes for thin interrupt */
@@ -449,6 +470,7 @@ void tiqdio_free_memory(void);
449int tiqdio_register_thinints(void); 470int tiqdio_register_thinints(void);
450void tiqdio_unregister_thinints(void); 471void tiqdio_unregister_thinints(void);
451 472
473
452/* prototypes for setup */ 474/* prototypes for setup */
453void qdio_inbound_processing(unsigned long data); 475void qdio_inbound_processing(unsigned long data);
454void qdio_outbound_processing(unsigned long data); 476void qdio_outbound_processing(unsigned long data);
@@ -469,6 +491,9 @@ int qdio_setup_create_sysfs(struct ccw_device *cdev);
469void qdio_setup_destroy_sysfs(struct ccw_device *cdev); 491void qdio_setup_destroy_sysfs(struct ccw_device *cdev);
470int qdio_setup_init(void); 492int qdio_setup_init(void);
471void qdio_setup_exit(void); 493void qdio_setup_exit(void);
494int qdio_enable_async_operation(struct qdio_output_q *q);
495void qdio_disable_async_operation(struct qdio_output_q *q);
496struct qaob *qdio_allocate_aob(void);
472 497
473int debug_get_buf_state(struct qdio_q *q, unsigned int bufnr, 498int debug_get_buf_state(struct qdio_q *q, unsigned int bufnr,
474 unsigned char *state); 499 unsigned char *state);