1 |
1275 |
phoenix |
/*
|
2 |
|
|
* arch/s390/kernel/s390io.h
|
3 |
|
|
*
|
4 |
|
|
* S390 version
|
5 |
|
|
* Copyright (C) 1999,2000 IBM Deutschland Entwicklung GmbH, IBM Corporation
|
6 |
|
|
* Author(s): Ingo Adlung (adlung@de.ibm.com)
|
7 |
|
|
*/
|
8 |
|
|
|
9 |
|
|
#ifndef __s390io_h
|
10 |
|
|
#define __s390io_h
|
11 |
|
|
#include <linux/tqueue.h>
|
12 |
|
|
|
13 |
|
|
/*
|
14 |
|
|
* IRQ data structure used by I/O subroutines
|
15 |
|
|
*
|
16 |
|
|
* Note : If bit flags are added, the "unused" value must be
|
17 |
|
|
* decremented accordingly !
|
18 |
|
|
*/
|
19 |
|
|
typedef struct _ioinfo {
|
20 |
|
|
unsigned int irq; /* aka. subchannel number */
|
21 |
|
|
spinlock_t irq_lock; /* irq lock */
|
22 |
|
|
void *private_data; /* pointer to private data */
|
23 |
|
|
|
24 |
|
|
struct _ioinfo *prev;
|
25 |
|
|
struct _ioinfo *next;
|
26 |
|
|
|
27 |
|
|
__u8 st; /* subchannel type */
|
28 |
|
|
|
29 |
|
|
union {
|
30 |
|
|
unsigned int info;
|
31 |
|
|
struct {
|
32 |
|
|
unsigned int busy : 1; /* device currently in use */
|
33 |
|
|
unsigned int oper : 1; /* device is operational */
|
34 |
|
|
unsigned int fast : 1; /* post with "channel end", ... */
|
35 |
|
|
/* ... don't wait for "device end" */
|
36 |
|
|
/* ... from do_IO() parameters */
|
37 |
|
|
unsigned int ready : 1; /* interrupt handler registered */
|
38 |
|
|
unsigned int haltio : 1; /* halt_IO in process */
|
39 |
|
|
unsigned int doio : 1; /* do_IO in process */
|
40 |
|
|
unsigned int w4final : 1; /* wait for final status, internally */
|
41 |
|
|
/* ... used with 'fast' setting only */
|
42 |
|
|
unsigned int repall : 1; /* report every interrupt status */
|
43 |
|
|
unsigned int unready : 1; /* deregister irq handler in process */
|
44 |
|
|
unsigned int d_disable : 1; /* delayed disabling required */
|
45 |
|
|
unsigned int w4sense : 1; /* SENSE status pending */
|
46 |
|
|
unsigned int syncio : 1; /* synchronous I/O requested */
|
47 |
|
|
unsigned int consns : 1; /* concurrent sense is available */
|
48 |
|
|
unsigned int delsense : 1; /* delayed SENSE required */
|
49 |
|
|
unsigned int s_pend : 1; /* status pending condition */
|
50 |
|
|
unsigned int pgid : 1; /* "path group ID" is valid */
|
51 |
|
|
unsigned int pgid_supp : 1; /* "path group ID" command is supported */
|
52 |
|
|
unsigned int esid : 1; /* Ext. SenseID supported by HW */
|
53 |
|
|
unsigned int repnone : 1; /* don't call IRQ handler on interrupt */
|
54 |
|
|
unsigned int newreq : 1; /* new register interface */
|
55 |
|
|
unsigned int dval : 1; /* device number valid */
|
56 |
|
|
unsigned int unknown : 1; /* unknown device - if SenseID failed */
|
57 |
|
|
unsigned int unfriendly: 1; /* device is locked by someone else */
|
58 |
|
|
unsigned int killio : 1; /* currently killing pending io */
|
59 |
|
|
unsigned int noio : 1; /* don't let drivers start io */
|
60 |
|
|
unsigned int notacccap : 1; /* capable of handling DEVSTAT_NOT_ACC */
|
61 |
|
|
unsigned int unused : (sizeof(unsigned int)*8 - 26); /* unused */
|
62 |
|
|
} __attribute__ ((packed)) flags;
|
63 |
|
|
} ui;
|
64 |
|
|
|
65 |
|
|
unsigned long u_intparm; /* user interruption parameter */
|
66 |
|
|
senseid_t senseid; /* SenseID info */
|
67 |
|
|
irq_desc_t irq_desc; /* irq descriptor */
|
68 |
|
|
not_oper_handler_func_t nopfunc; /* not oper handler */
|
69 |
|
|
__u8 opm; /* path mask of operational paths */
|
70 |
|
|
__u16 devno; /* device number */
|
71 |
|
|
pgid_t pgid; /* path group ID */
|
72 |
|
|
schib_t schib; /* subchannel information block */
|
73 |
|
|
orb_t orb; /* operation request block */
|
74 |
|
|
devstat_t devstat; /* device status */
|
75 |
|
|
ccw1_t senseccw; /* ccw for sense command */
|
76 |
|
|
__u8 sense_data[32];/* buffer for basic sense */
|
77 |
|
|
unsigned int stctl; /* accumulated status control from irb */
|
78 |
|
|
ssd_info_t ssd_info; /* subchannel description */
|
79 |
|
|
struct tq_struct pver_bh; /* path verification bottom half task */
|
80 |
|
|
atomic_t pver_pending; /* != 0 if path verification for sch is pending */
|
81 |
|
|
} __attribute__ ((aligned(8))) ioinfo_t;
|
82 |
|
|
|
83 |
|
|
#define IOINFO_FLAGS_BUSY 0x80000000
|
84 |
|
|
#define IOINFO_FLAGS_OPER 0x40000000
|
85 |
|
|
#define IOINFO_FLAGS_FAST 0x20000000
|
86 |
|
|
#define IOINFO_FLAGS_READY 0x10000000
|
87 |
|
|
#define IOINFO_FLAGS_HALTIO 0x08000000
|
88 |
|
|
#define IOINFO_FLAGS_DOIO 0x04000000
|
89 |
|
|
#define IOINFO_FLAGS_DOIO_Q 0x02000000
|
90 |
|
|
#define IOINFO_FLAGS_W4FINAL 0x01000000
|
91 |
|
|
#define IOINFO_FLAGS_REPALL 0x00800000
|
92 |
|
|
|
93 |
|
|
extern ioinfo_t *ioinfo[];
|
94 |
|
|
int s390_set_private_data(int irq, void * data);
|
95 |
|
|
void * s390_get_private_data(int irq);
|
96 |
|
|
|
97 |
|
|
#define CHSC_SEI_ACC_CHPID 1
|
98 |
|
|
#define CHSC_SEI_ACC_LINKADDR 2
|
99 |
|
|
#define CHSC_SEI_ACC_FULLLINKADDR 3
|
100 |
|
|
|
101 |
|
|
#define CIO_PATHGONE_WAIT4INT 0x01
|
102 |
|
|
#define CIO_PATHGONE_IOERR 0x02
|
103 |
|
|
#define CIO_PATHGONE_DEVGONE 0x04
|
104 |
|
|
|
105 |
|
|
#endif /* __s390io_h */
|
106 |
|
|
|