2 * arch/s390/kernel/s390io.h
5 * Copyright (C) 1999,2000 IBM Deutschland Entwicklung GmbH, IBM Corporation
6 * Author(s): Ingo Adlung (adlung@de.ibm.com)
13 * IRQ data structure used by I/O subroutines
15 * Note : If bit flags are added, the "unused" value must be
16 * decremented accordingly !
18 typedef struct _ioinfo {
19 unsigned int irq; /* aka. subchannel number */
20 spinlock_t irq_lock; /* irq lock */
28 unsigned int busy : 1; /* device currently in use */
29 unsigned int oper : 1; /* device is operational */
30 unsigned int fast : 1; /* post with "channel end", ... */
31 /* ... don't wait for "device end" */
32 /* ... from do_IO() parameters */
33 unsigned int ready : 1; /* interrupt handler registered */
34 unsigned int haltio : 1; /* halt_IO in process */
35 unsigned int doio : 1; /* do_IO in process */
36 unsigned int doio_q : 1; /* do_IO queued - only possible ... */
37 /* ... if 'fast' is set too */
38 unsigned int w4final : 1; /* wait for final status, internally */
39 /* ... used with 'fast' setting only */
40 unsigned int repall : 1; /* report every interrupt status */
41 unsigned int unready : 1; /* deregister irq handler in process */
42 unsigned int d_disable : 1; /* delayed disabling required */
43 unsigned int w4sense : 1; /* SENSE status pending */
44 unsigned int syncio : 1; /* synchronous I/O requested */
45 unsigned int consns : 1; /* concurrent sense is available */
46 unsigned int delsense : 1; /* delayed SENSE required */
47 unsigned int s_pend : 1; /* status pending condition */
48 unsigned int pgid : 1; /* "path group ID" is valid */
49 unsigned int pgid_supp : 1; /* "path group ID" command is supported */
50 unsigned int unused : (sizeof(unsigned int)*8 - 18); /* unused */
51 } __attribute__ ((packed)) flags;
54 unsigned long u_intparm; /* user interruption parameter */
55 senseid_t senseid; /* SenseID info */
56 irq_desc_t irq_desc; /* irq descriptor */
57 __u8 ulpm; /* logical path mask used for I/O */
58 __u8 opm; /* path mask of operational paths */
59 pgid_t pgid; /* path group ID */
60 schib_t schib; /* subchannel information block */
61 orb_t orb; /* operation request block */
62 devstat_t devstat; /* device status */
63 ccw1_t *qcpa; /* queued channel program */
64 ccw1_t senseccw; /* ccw for sense command */
65 unsigned int stctl; /* accumulated status control from irb */
66 unsigned long qintparm; /* queued interruption parameter */
67 unsigned long qflag; /* queued flags */
68 unsigned char qlpm; /* queued logical path mask */
70 } __attribute__ ((aligned(8))) ioinfo_t;
72 #define IOINFO_FLAGS_BUSY 0x80000000
73 #define IOINFO_FLAGS_OPER 0x40000000
74 #define IOINFO_FLAGS_FAST 0x20000000
75 #define IOINFO_FLAGS_READY 0x10000000
76 #define IOINFO_FLAGS_HALTIO 0x08000000
77 #define IOINFO_FLAGS_DOIO 0x04000000
78 #define IOINFO_FLAGS_DOIO_Q 0x02000000
79 #define IOINFO_FLAGS_W4FINAL 0x01000000
80 #define IOINFO_FLAGS_REPALL 0x00800000
82 extern ioinfo_t *ioinfo[];
84 #endif /* __s390io_h */