1 typedef union { int ioport
; volatile char *maddr
; } bus_space_handle_t
;
2 struct scb
{ unsigned short *hscb
; };
6 bus_space_handle_t bshs
[2];
13 int foo_inb(struct ahd_softc
*);
14 int foo_int_int (int, int);
15 int ahd_inb(struct ahd_softc
*);
16 int ahd_scb_active_in_fifo (void);
18 void ahd_flush_qoutfifo (struct ahd_softc
*ahd
, struct scb
*scb
)
20 int src
, dst
, *a
= &src
, *b
= &dst
; *a
= 1, *b
= 1;
23 if (ahd
->src_mode
== 1)
24 { int src
, dst
, *a
= &src
, *b
= &dst
; *a
= 1, *b
= 1;}
25 foo_int_int (ahd
->src_mode
, ahd
->dst_mode
);
27 if (ahd
->src_mode
== 2 && ahd
->dst_mode
== p
)
29 if (ahd
->tags
[0] == 1) *(ahd
->bshs
[0].maddr
);
30 outb (1, ahd
->bshs
[0].ioport
);
31 if (ahd
->tags
[0] == 1) *(ahd
->bshs
[0].maddr
);
32 outb (1, ahd
->bshs
[0].ioport
);
36 while ((ahd_inb (ahd
) & 0x01) != 0)
39 if (ahd
->src_mode
== 2 && ahd
->dst_mode
== p
)
41 if (ahd
->tags
[0] == 1) *(ahd
->bshs
[0].maddr
);
42 outb (1, ahd
->bshs
[0].ioport
);
43 if (ahd
->tags
[0] == 1) *(ahd
->bshs
[0].maddr
);
44 outb (1, ahd
->bshs
[0].ioport
);
48 if (ahd_scb_active_in_fifo () == 0)
51 if (ahd
->src_mode
== 2 && ahd
->dst_mode
== p
)
53 if (ahd
->tags
[0] == 1) *(ahd
->bshs
[0].maddr
);
54 outb (1, ahd
->bshs
[0].ioport
);
55 if (ahd
->tags
[0] == 1) *(ahd
->bshs
[0].maddr
);
56 outb (1, ahd
->bshs
[0].ioport
);
60 if (ahd
->tags
[0] == 1) *(ahd
->bshs
[0].maddr
);
61 outb (1, ahd
->bshs
[0].ioport
);
62 if (ahd
->tags
[0] == 1) *(ahd
->bshs
[0].maddr
);
63 outb (1, ahd
->bshs
[0].ioport
);
64 if ((ahd
->flags
& 1) != 0)
66 if ((ahd
->flags
& 1) != 0)
68 if ((ahd
->flags
& 1) != 0)
70 if (ahd
->tags
[0] == 1) *(ahd
->bshs
[0].maddr
);
71 outb (1, ahd
->bshs
[0].ioport
);
72 if (ahd
->tags
[0] == 1) *(ahd
->bshs
[0].maddr
);
73 outb (1, ahd
->bshs
[0].ioport
);
74 if ((ahd
->flags
& 1) != 0)
76 if (ahd
->tags
[0] == 1) *(ahd
->bshs
[0].maddr
);
77 outb (1, ahd
->bshs
[0].ioport
);
78 if (ahd
->tags
[0] == 1) *(ahd
->bshs
[0].maddr
);
79 outb (1, ahd
->bshs
[0].ioport
);
81 if (ahd
->tags
[0] == 1) *(ahd
->bshs
[0].maddr
);
82 outb (1, ahd
->bshs
[0].ioport
);
83 if (ahd
->tags
[0] == 1) *(ahd
->bshs
[0].maddr
);
84 outb (1, ahd
->bshs
[0].ioport
);
86 if (ahd
->tags
[0] == 1) *(ahd
->bshs
[0].maddr
);
87 outb (1, ahd
->bshs
[0].ioport
);
88 if (ahd
->tags
[0] == 1) *(ahd
->bshs
[0].maddr
);
89 outb (1, ahd
->bshs
[0].ioport
);
91 if (ahd
->tags
[0] == 1) *(ahd
->bshs
[0].maddr
);
92 outb (1, ahd
->bshs
[0].ioport
);
93 if (ahd
->tags
[0] == 1) *(ahd
->bshs
[0].maddr
);
94 outb (1, ahd
->bshs
[0].ioport
);
96 if (ahd
->src_mode
== 2 && ahd
->dst_mode
== p
)
98 if (ahd
->tags
[0] == 1) *(ahd
->bshs
[0].maddr
);
99 outb (1, ahd
->bshs
[0].ioport
);
100 if (ahd
->tags
[0] == 1) *(ahd
->bshs
[0].maddr
);
101 outb (1, ahd
->bshs
[0].ioport
);
105 if (ahd
->src_mode
== 2 && ahd
->dst_mode
== dst
)
107 if (ahd
->tags
[0] == 1) *(ahd
->bshs
[0].maddr
);
108 outb (1, ahd
->bshs
[0].ioport
);
109 if (ahd
->tags
[0] == 1) *(ahd
->bshs
[0].maddr
);
110 outb (1, ahd
->bshs
[0].ioport
);