1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 #include <sys/sensors.h>
21
22 struct ciss_ld {
23 struct ciss_blink bling;
24 char xname[16];
25 int ndrives;
26 u_int8_t tgts[1];
27 };
28
29 struct ciss_softc {
30 struct device sc_dev;
31 struct scsi_link sc_link;
32 struct scsi_link *sc_link_raw;
33 struct timeout sc_hb;
34 void *sc_ih;
35 void *sc_sh;
36 struct proc *sc_thread;
37 int sc_flush;
38 struct ksensor *sensors;
39 struct ksensordev sensordev;
40
41 u_int sc_flags;
42 #define CISS_BIO 0x0001
43 int ccblen, maxcmd, maxsg, nbus, ndrives, maxunits;
44 ciss_queue_head sc_free_ccb, sc_ccbq, sc_ccbdone;
45
46 bus_space_tag_t iot;
47 bus_space_handle_t ioh, cfg_ioh;
48 bus_dma_tag_t dmat;
49 bus_dmamap_t cmdmap;
50 bus_dma_segment_t cmdseg[1];
51 void *ccbs;
52 void *scratch;
53
54 struct ciss_config cfg;
55 int cfgoff;
56 u_int32_t iem;
57 u_int32_t heartbeat;
58 struct ciss_ld **sc_lds;
59 };
60
61 struct ciss_rawsoftc {
62 struct scsi_link sc_link;
63 struct ciss_softc *sc_softc;
64 u_int8_t sc_channel;
65 };
66
67
68 #define CISS_LOCK(sc) splbio()
69 #define CISS_UNLOCK(sc, lock) splx(lock)
70 #define CISS_LOCK_SCRATCH(sc) splbio()
71 #define CISS_UNLOCK_SCRATCH(sc, lock) splx(lock)
72 typedef int ciss_lock_t;
73
74 int ciss_attach(struct ciss_softc *sc);
75 int ciss_intr(void *v);