Deleted Added
full compact
digi.h (76196) digi.h (76327)
1/*-
2 * Copyright (c) 2001 Brian Somers <brian@Awfulhak.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 2001 Brian Somers <brian@Awfulhak.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $FreeBSD: head/sys/dev/digi/digi.h 76196 2001-05-02 01:47:34Z brian $
26 * $FreeBSD: head/sys/dev/digi/digi.h 76327 2001-05-07 11:13:11Z brian $
27 */
28
29#define W(p) (*(u_int16_t *)(p))
30#define vW(p) (*(u_int16_t volatile *)(p))
31#define D(p) (*(u_int32_t *)(p))
32#define vD(p) (*(u_int32_t volatile *)(p))
33
34#define CE_OVERRUN 0
35#define CE_INTERRUPT_BUF_OVERFLOW 1
36#define CE_TTY_BUF_OVERFLOW 2
37#define CE_NTYPES 3
38#define CE_RECORD(com, errnum) (++(com)->delta_error_counts[errnum])
39
27 */
28
29#define W(p) (*(u_int16_t *)(p))
30#define vW(p) (*(u_int16_t volatile *)(p))
31#define D(p) (*(u_int32_t *)(p))
32#define vD(p) (*(u_int32_t volatile *)(p))
33
34#define CE_OVERRUN 0
35#define CE_INTERRUPT_BUF_OVERFLOW 1
36#define CE_TTY_BUF_OVERFLOW 2
37#define CE_NTYPES 3
38#define CE_RECORD(com, errnum) (++(com)->delta_error_counts[errnum])
39
40#ifdef SMP
41#define DIGI_LOCK_INTR
42#endif
43
44/*#define DIGI_INTERRUPT*/
45
40#ifndef DEBUG
41#define DEBUG
42#endif
43
44#ifdef DEBUG
45extern unsigned digi_debug;
46#define DLOG(level, args) if (digi_debug & (level)) device_printf args
47#else

--- 137 unchanged lines hidden (view full) ---

185
186 struct callout_handle callout; /* poll timeout handle */
187 struct callout_handle inttest; /* int test timeout handle */
188 const char *module;
189
190 u_char *(*setwin)(struct digi_softc *_sc, unsigned _addr);
191 void (*hidewin)(struct digi_softc *_sc);
192 void (*towin)(struct digi_softc *_sc, int _win);
46#ifndef DEBUG
47#define DEBUG
48#endif
49
50#ifdef DEBUG
51extern unsigned digi_debug;
52#define DLOG(level, args) if (digi_debug & (level)) device_printf args
53#else

--- 137 unchanged lines hidden (view full) ---

191
192 struct callout_handle callout; /* poll timeout handle */
193 struct callout_handle inttest; /* int test timeout handle */
194 const char *module;
195
196 u_char *(*setwin)(struct digi_softc *_sc, unsigned _addr);
197 void (*hidewin)(struct digi_softc *_sc);
198 void (*towin)(struct digi_softc *_sc, int _win);
199#ifdef DIGI_LOCK_INTR
200 struct mtx intr_mutex[1];
201#endif
193#ifdef DEBUG
194 int intr_count;
195#endif
196};
197
198extern devclass_t digi_devclass;
199extern const struct digi_control_signals digi_xixe_signals;
200extern const struct digi_control_signals digi_normal_signals;
201
202const char *digi_errortxt(int _id);
203int digi_modhandler(module_t _mod, int _event, void *_arg);
204int digi_attach(struct digi_softc *);
205int digi_detach(device_t _dev);
206int digi_shutdown(device_t _dev);
202#ifdef DEBUG
203 int intr_count;
204#endif
205};
206
207extern devclass_t digi_devclass;
208extern const struct digi_control_signals digi_xixe_signals;
209extern const struct digi_control_signals digi_normal_signals;
210
211const char *digi_errortxt(int _id);
212int digi_modhandler(module_t _mod, int _event, void *_arg);
213int digi_attach(struct digi_softc *);
214int digi_detach(device_t _dev);
215int digi_shutdown(device_t _dev);