Merge from vendor branch LUKEMFTP:
[dragonfly.git] / sys / dev / disk / aic7xxx / aic79xx_osm.h
1 /*
2  * FreeBSD platform specific driver option settings, data structures,
3  * function declarations and includes.
4  *
5  * Copyright (c) 1994-2001 Justin T. Gibbs.
6  * Copyright (c) 2001-2002 Adaptec Inc.
7  * All rights reserved.
8  *
9  * Redistribution and use in source and binary forms, with or without
10  * modification, are permitted provided that the following conditions
11  * are met:
12  * 1. Redistributions of source code must retain the above copyright
13  *    notice, this list of conditions, and the following disclaimer,
14  *    without modification.
15  * 2. The name of the author may not be used to endorse or promote products
16  *    derived from this software without specific prior written permission.
17  *
18  * Alternatively, this software may be distributed under the terms of the
19  * GNU Public License ("GPL").
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
22  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24  * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
25  * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31  * SUCH DAMAGE.
32  *
33  * $Id: //depot/aic7xxx/freebsd/dev/aic7xxx/aic79xx_osm.h#20 $
34  *
35  * $FreeBSD: src/sys/dev/aic7xxx/aic79xx_osm.h,v 1.4.2.3 2003/06/10 03:26:07 gibbs Exp $
36  * $DragonFly: src/sys/dev/disk/aic7xxx/aic79xx_osm.h,v 1.6 2005/06/03 16:57:13 eirikn Exp $
37  */
38
39 #ifndef _AIC79XX_FREEBSD_H_
40 #define _AIC79XX_FREEBSD_H_
41
42 #include <opt_aic79xx.h>        /* for config options */
43
44 #include <sys/param.h>
45 #include <sys/systm.h>
46 #include <sys/bus.h>            /* For device_t */
47 #if defined(__FreeBSD__) && __FreeBSD_version >= 500000
48 #include <sys/endian.h>
49 #endif
50 #include <sys/eventhandler.h>
51 #include <sys/kernel.h>
52 #include <sys/malloc.h>
53 #include <sys/queue.h>
54 #include <sys/thread2.h>
55
56 #define AHD_PCI_CONFIG 1
57 #include <machine/bus_memio.h>
58 #include <machine/bus_pio.h>
59 #include <machine/bus.h>
60 #include <machine/endian.h>
61 #include <machine/clock.h>
62 #include <machine/resource.h>
63
64 #include <sys/rman.h>
65
66 #include <bus/pci/pcireg.h>
67 #include <bus/pci/pcivar.h>
68
69 #include <bus/cam/cam.h>
70 #include <bus/cam/cam_ccb.h>
71 #include <bus/cam/cam_debug.h>
72 #include <bus/cam/cam_sim.h>
73 #include <bus/cam/cam_xpt_sim.h>
74
75 #include <bus/cam/scsi/scsi_all.h>
76 #include <bus/cam/scsi/scsi_message.h>
77 #include <bus/cam/scsi/scsi_iu.h>
78
79 #ifdef CAM_NEW_TRAN_CODE
80 #define AHD_NEW_TRAN_SETTINGS
81 #endif /* CAM_NEW_TRAN_CODE */
82
83 /****************************** Platform Macros *******************************/
84 #define SIM_IS_SCSIBUS_B(ahd, sim)      \
85         (0)
86 #define SIM_CHANNEL(ahd, sim)   \
87         ('A')
88 #define SIM_SCSI_ID(ahd, sim)   \
89         (ahd->our_id)
90 #define SIM_PATH(ahd, sim)      \
91         (ahd->platform_data->path)
92 #define BUILD_SCSIID(ahd, sim, target_id, our_id) \
93         ((((target_id) << TID_SHIFT) & TID) | (our_id))
94         
95
96 #define SCB_GET_SIM(ahd, scb) \
97         ((ahd)->platform_data->sim)
98
99 #ifndef offsetof
100 #define offsetof(type, member)  ((size_t)(&((type *)0)->member))
101 #endif
102 /************************* Forward Declarations *******************************/
103 typedef device_t ahd_dev_softc_t;
104 typedef union ccb *ahd_io_ctx_t;
105
106 /***************************** Bus Space/DMA **********************************/
107 #define ahd_dma_tag_create(ahd, parent_tag, alignment, boundary,        \
108                            lowaddr, highaddr, filter, filterarg,        \
109                            maxsize, nsegments, maxsegsz, flags,         \
110                            dma_tagp)                                    \
111         bus_dma_tag_create(parent_tag, alignment, boundary,             \
112                            lowaddr, highaddr, filter, filterarg,        \
113                            maxsize, nsegments, maxsegsz, flags,         \
114                            dma_tagp)
115
116 #define ahd_dma_tag_destroy(ahd, tag)                                   \
117         bus_dma_tag_destroy(tag)
118
119 #define ahd_dmamem_alloc(ahd, dmat, vaddr, flags, mapp)                 \
120         bus_dmamem_alloc(dmat, vaddr, flags, mapp)
121
122 #define ahd_dmamem_free(ahd, dmat, vaddr, map)                          \
123         bus_dmamem_free(dmat, vaddr, map)
124
125 #define ahd_dmamap_create(ahd, tag, flags, mapp)                        \
126         bus_dmamap_create(tag, flags, mapp)
127
128 #define ahd_dmamap_destroy(ahd, tag, map)                               \
129         bus_dmamap_destroy(tag, map)
130
131 #define ahd_dmamap_load(ahd, dmat, map, addr, buflen, callback,         \
132                         callback_arg, flags)                            \
133         bus_dmamap_load(dmat, map, addr, buflen, callback, callback_arg, flags)
134
135 #define ahd_dmamap_unload(ahd, tag, map)                                \
136         bus_dmamap_unload(tag, map)
137
138 /* XXX Need to update Bus DMA for partial map syncs */
139 #define ahd_dmamap_sync(ahd, dma_tag, dmamap, offset, len, op)          \
140         bus_dmamap_sync(dma_tag, dmamap, op)
141
142 /************************ Tunable Driver Parameters  **************************/
143 /*
144  * The number of dma segments supported.  The sequencer can handle any number
145  * of physically contiguous S/G entrys.  To reduce the driver's memory
146  * consumption, we limit the number supported to be sufficient to handle
147  * the largest mapping supported by the kernel, MAXPHYS.  Assuming the
148  * transfer is as fragmented as possible and unaligned, this turns out to
149  * be the number of paged sized transfers in MAXPHYS plus an extra element
150  * to handle any unaligned residual.  The sequencer fetches SG elements
151  * in cacheline sized chucks, so make the number per-transaction an even
152  * multiple of 16 which should align us on even the largest of cacheline
153  * boundaries. 
154  */
155 #define AHD_NSEG (roundup(btoc(MAXPHYS) + 1, 16))
156
157 /* This driver supports target mode */
158 #if NOT_YET
159 #define AHD_TARGET_MODE 1
160 #endif
161
162 /************************** Softc/SCB Platform Data ***************************/
163 struct ahd_platform_data {
164         /*
165          * Hooks into the XPT.
166          */
167         struct  cam_sim         *sim;
168         struct  cam_sim         *sim_b;
169         struct  cam_path        *path;
170         struct  cam_path        *path_b;
171
172         int                      regs_res_type[2];
173         int                      regs_res_id[2];
174         int                      irq_res_type;
175         struct resource         *regs[2];
176         struct resource         *irq;
177         void                    *ih;
178         eventhandler_tag         eh;
179 };
180
181 struct scb_platform_data {
182 };
183
184 /********************************* Byte Order *********************************/
185 #if defined(__FreeBSD___) && __FreeBSD_version >= 500000
186 #define ahd_htobe16(x) htobe16(x)
187 #define ahd_htobe32(x) htobe32(x)
188 #define ahd_htobe64(x) htobe64(x)
189 #define ahd_htole16(x) htole16(x)
190 #define ahd_htole32(x) htole32(x)
191 #define ahd_htole64(x) htole64(x)
192
193 #define ahd_be16toh(x) be16toh(x)
194 #define ahd_be32toh(x) be32toh(x)
195 #define ahd_be64toh(x) be64toh(x)
196 #define ahd_le16toh(x) le16toh(x)
197 #define ahd_le32toh(x) le32toh(x)
198 #define ahd_le64toh(x) le64toh(x)
199 #else
200 #define ahd_htobe16(x) (x)
201 #define ahd_htobe32(x) (x)
202 #define ahd_htobe64(x) (x)
203 #define ahd_htole16(x) (x)
204 #define ahd_htole32(x) (x)
205 #define ahd_htole64(x) (x)
206
207 #define ahd_be16toh(x) (x)
208 #define ahd_be32toh(x) (x)
209 #define ahd_be64toh(x) (x)
210 #define ahd_le16toh(x) (x)
211 #define ahd_le32toh(x) (x)
212 #define ahd_le64toh(x) (x)
213 #endif
214
215 /************************** Timer DataStructures ******************************/
216 typedef struct callout ahd_timer_t;
217
218 /***************************** Core Includes **********************************/
219 #if AHD_REG_PRETTY_PRINT
220 #define AIC_DEBUG_REGISTERS 1
221 #else
222 #define AIC_DEBUG_REGISTERS 0
223 #endif
224 #include "aic79xx.h"
225
226 /***************************** Timer Facilities *******************************/
227 timeout_t ahd_timeout;
228 #if defined(__FreeBSD__) && __FreeBSD_version >= 500000
229 #define ahd_timer_init(timer) callout_init(timer, /*mpsafe*/0)
230 #else
231 #define ahd_timer_init callout_init
232 #endif
233 #define ahd_timer_stop callout_stop
234
235 static __inline void
236 ahd_timer_reset(ahd_timer_t *timer, u_int usec, ahd_callback_t *func, void *arg)
237 {
238         callout_reset(timer, (usec * hz)/1000000, func, arg);
239 }
240
241 static __inline void
242 ahd_scb_timer_reset(struct scb *scb, u_int usec)
243 {
244         callout_reset(&scb->io_ctx->ccb_h.timeout_ch, (usec * hz)/1000000,
245                       ahd_timeout, scb);
246 }
247
248 /*************************** Device Access ************************************/
249 #define ahd_inb(ahd, port)                                      \
250         bus_space_read_1((ahd)->tags[(port) >> 8],              \
251                          (ahd)->bshs[(port) >> 8], (port) & 0xFF)
252
253 #define ahd_outb(ahd, port, value)                              \
254         bus_space_write_1((ahd)->tags[(port) >> 8],             \
255                           (ahd)->bshs[(port) >> 8], (port) & 0xFF, value)
256
257 #define ahd_inw_atomic(ahd, port)                               \
258         ahd_le16toh(bus_space_read_2((ahd)->tags[(port) >> 8],  \
259                                      (ahd)->bshs[(port) >> 8], (port) & 0xFF))
260
261 #define ahd_outw_atomic(ahd, port, value)                       \
262         bus_space_write_2((ahd)->tags[(port) >> 8],             \
263                           (ahd)->bshs[(port) >> 8],             \
264                           (port & 0xFF), ahd_htole16(value))
265
266 #define ahd_outsb(ahd, port, valp, count)                       \
267         bus_space_write_multi_1((ahd)->tags[(port) >> 8],       \
268                                 (ahd)->bshs[(port) >> 8],       \
269                                 (port & 0xFF), valp, count)
270
271 #define ahd_insb(ahd, port, valp, count)                        \
272         bus_space_read_multi_1((ahd)->tags[(port) >> 8],        \
273                                (ahd)->bshs[(port) >> 8],        \
274                                (port & 0xFF), valp, count)
275
276 static __inline void ahd_flush_device_writes(struct ahd_softc *);
277
278 static __inline void
279 ahd_flush_device_writes(struct ahd_softc *ahd)
280 {
281         /* XXX Is this sufficient for all architectures??? */
282         ahd_inb(ahd, INTSTAT);
283 }
284
285 /**************************** Locking Primitives ******************************/
286 /* Lock protecting internal data structures */
287 static __inline void ahd_lockinit(struct ahd_softc *);
288 static __inline void ahd_lock(struct ahd_softc *, unsigned long *flags);
289 static __inline void ahd_unlock(struct ahd_softc *, unsigned long *flags);
290
291 /* Lock held during command compeletion to the upper layer */
292 static __inline void ahd_done_lockinit(struct ahd_softc *);
293 static __inline void ahd_done_lock(struct ahd_softc *, unsigned long *flags);
294 static __inline void ahd_done_unlock(struct ahd_softc *, unsigned long *flags);
295
296 /* Lock held during ahd_list manipulation and ahd softc frees */
297 static __inline void ahd_list_lockinit(void);
298 static __inline void ahd_list_lock(unsigned long *flags);
299 static __inline void ahd_list_unlock(unsigned long *flags);
300
301 static __inline void
302 ahd_lockinit(struct ahd_softc *ahd)
303 {
304 }
305
306 static __inline void
307 ahd_lock(struct ahd_softc *ahd, unsigned long *flags __unused)
308 {
309         crit_enter();
310 }
311
312 static __inline void
313 ahd_unlock(struct ahd_softc *ahd, unsigned long *flags __unused)
314 {
315         crit_exit();
316 }
317
318 /* Lock held during command compeletion to the upper layer */
319 static __inline void
320 ahd_done_lockinit(struct ahd_softc *ahd)
321 {
322 }
323
324 static __inline void
325 ahd_done_lock(struct ahd_softc *ahd, unsigned long *flags)
326 {
327 }
328
329 static __inline void
330 ahd_done_unlock(struct ahd_softc *ahd, unsigned long *flags)
331 {
332 }
333
334 /* Lock held during ahd_list manipulation and ahd softc frees */
335 static __inline void
336 ahd_list_lockinit(void)
337 {
338 }
339
340 static __inline void
341 ahd_list_lock(unsigned long *flags)
342 {
343 }
344
345 static __inline void
346 ahd_list_unlock(unsigned long *flags)
347 {
348 }
349 /****************************** OS Primitives *********************************/
350 #define ahd_delay DELAY
351
352 /************************** Transaction Operations ****************************/
353 static __inline void ahd_set_transaction_status(struct scb *, uint32_t);
354 static __inline void ahd_set_scsi_status(struct scb *, uint32_t);
355 static __inline uint32_t ahd_get_transaction_status(struct scb *);
356 static __inline uint32_t ahd_get_scsi_status(struct scb *);
357 static __inline void ahd_set_transaction_tag(struct scb *, int, u_int);
358 static __inline u_long ahd_get_transfer_length(struct scb *);
359 static __inline int ahd_get_transfer_dir(struct scb *);
360 static __inline void ahd_set_residual(struct scb *, u_long);
361 static __inline void ahd_set_sense_residual(struct scb *, u_long);
362 static __inline u_long ahd_get_residual(struct scb *);
363 static __inline int ahd_perform_autosense(struct scb *);
364 static __inline uint32_t ahd_get_sense_bufsize(struct ahd_softc*, struct scb*);
365 static __inline void ahd_freeze_simq(struct ahd_softc *);
366 static __inline void ahd_release_simq(struct ahd_softc *);
367 static __inline void ahd_freeze_ccb(union ccb *ccb);
368 static __inline void ahd_freeze_scb(struct scb *scb);
369 static __inline void ahd_platform_freeze_devq(struct ahd_softc *, struct scb *);
370 static __inline int  ahd_platform_abort_scbs(struct ahd_softc *ahd, int target,
371                                              char channel, int lun, u_int tag,
372                                              role_t role, uint32_t status);
373
374 static __inline
375 void ahd_set_transaction_status(struct scb *scb, uint32_t status)
376 {
377         scb->io_ctx->ccb_h.status &= ~CAM_STATUS_MASK;
378         scb->io_ctx->ccb_h.status |= status;
379 }
380
381 static __inline
382 void ahd_set_scsi_status(struct scb *scb, uint32_t status)
383 {
384         scb->io_ctx->csio.scsi_status = status;
385 }
386
387 static __inline
388 uint32_t ahd_get_transaction_status(struct scb *scb)
389 {
390         return (scb->io_ctx->ccb_h.status & CAM_STATUS_MASK);
391 }
392
393 static __inline
394 uint32_t ahd_get_scsi_status(struct scb *scb)
395 {
396         return (scb->io_ctx->csio.scsi_status);
397 }
398
399 static __inline
400 void ahd_set_transaction_tag(struct scb *scb, int enabled, u_int type)
401 {
402         scb->io_ctx->csio.tag_action = type;
403         if (enabled)
404                 scb->io_ctx->ccb_h.flags |= CAM_TAG_ACTION_VALID;
405         else
406                 scb->io_ctx->ccb_h.flags &= ~CAM_TAG_ACTION_VALID;
407 }
408
409 static __inline
410 u_long ahd_get_transfer_length(struct scb *scb)
411 {
412         return (scb->io_ctx->csio.dxfer_len);
413 }
414
415 static __inline
416 int ahd_get_transfer_dir(struct scb *scb)
417 {
418         return (scb->io_ctx->ccb_h.flags & CAM_DIR_MASK);
419 }
420
421 static __inline
422 void ahd_set_residual(struct scb *scb, u_long resid)
423 {
424         scb->io_ctx->csio.resid = resid;
425 }
426
427 static __inline
428 void ahd_set_sense_residual(struct scb *scb, u_long resid)
429 {
430         scb->io_ctx->csio.sense_resid = resid;
431 }
432
433 static __inline
434 u_long ahd_get_residual(struct scb *scb)
435 {
436         return (scb->io_ctx->csio.resid);
437 }
438
439 static __inline
440 int ahd_perform_autosense(struct scb *scb)
441 {
442         return (!(scb->io_ctx->ccb_h.flags & CAM_DIS_AUTOSENSE));
443 }
444
445 static __inline uint32_t
446 ahd_get_sense_bufsize(struct ahd_softc *ahd, struct scb *scb)
447 {
448         return (sizeof(struct scsi_sense_data));
449 }
450
451 static __inline void
452 ahd_freeze_simq(struct ahd_softc *ahd)
453 {
454         xpt_freeze_simq(ahd->platform_data->sim, /*count*/1);
455 }
456
457 static __inline void
458 ahd_release_simq(struct ahd_softc *ahd)
459 {
460         xpt_release_simq(ahd->platform_data->sim, /*run queue*/TRUE);
461 }
462
463 static __inline void
464 ahd_freeze_ccb(union ccb *ccb)
465 {
466         if ((ccb->ccb_h.status & CAM_DEV_QFRZN) == 0) {
467                 ccb->ccb_h.status |= CAM_DEV_QFRZN;
468                 xpt_freeze_devq(ccb->ccb_h.path, /*count*/1);
469         }
470 }
471
472 static __inline void
473 ahd_freeze_scb(struct scb *scb)
474 {
475         ahd_freeze_ccb(scb->io_ctx);
476 }
477
478 static __inline void
479 ahd_platform_freeze_devq(struct ahd_softc *ahd, struct scb *scb)
480 {
481         /* Nothing to do here for FreeBSD */
482 }
483
484 static __inline int
485 ahd_platform_abort_scbs(struct ahd_softc *ahd, int target,
486                         char channel, int lun, u_int tag,
487                         role_t role, uint32_t status)
488 {
489         /* Nothing to do here for FreeBSD */
490         return (0);
491 }
492
493 static __inline void
494 ahd_platform_scb_free(struct ahd_softc *ahd, struct scb *scb)
495 {
496         /* What do we do to generically handle driver resource shortages??? */
497         if ((ahd->flags & AHD_RESOURCE_SHORTAGE) != 0
498          && scb->io_ctx != NULL
499          && (scb->io_ctx->ccb_h.status & CAM_RELEASE_SIMQ) == 0) {
500                 scb->io_ctx->ccb_h.status |= CAM_RELEASE_SIMQ;
501                 ahd->flags &= ~AHD_RESOURCE_SHORTAGE;
502         }
503         scb->io_ctx = NULL;
504 }
505
506 /********************************** PCI ***************************************/
507 #ifdef AHD_PCI_CONFIG
508 static __inline uint32_t ahd_pci_read_config(ahd_dev_softc_t pci,
509                                              int reg, int width);
510 static __inline void     ahd_pci_write_config(ahd_dev_softc_t pci,
511                                               int reg, uint32_t value,
512                                               int width);
513 static __inline int      ahd_get_pci_function(ahd_dev_softc_t);
514 static __inline int      ahd_get_pci_slot(ahd_dev_softc_t);
515 static __inline int      ahd_get_pci_bus(ahd_dev_softc_t);
516
517 int                      ahd_pci_map_registers(struct ahd_softc *ahd);
518 int                      ahd_pci_map_int(struct ahd_softc *ahd);
519
520 static __inline uint32_t
521 ahd_pci_read_config(ahd_dev_softc_t pci, int reg, int width)
522 {
523         return (pci_read_config(pci, reg, width));
524 }
525
526 static __inline void
527 ahd_pci_write_config(ahd_dev_softc_t pci, int reg, uint32_t value, int width)
528 {
529         pci_write_config(pci, reg, value, width);
530 }
531
532 static __inline int
533 ahd_get_pci_function(ahd_dev_softc_t pci)
534 {
535         return (pci_get_function(pci));
536 }
537
538 static __inline int
539 ahd_get_pci_slot(ahd_dev_softc_t pci)
540 {
541         return (pci_get_slot(pci));
542 }
543
544 static __inline int
545 ahd_get_pci_bus(ahd_dev_softc_t pci)
546 {
547         return (pci_get_bus(pci));
548 }
549
550 typedef enum
551 {
552         AHD_POWER_STATE_D0,
553         AHD_POWER_STATE_D1,
554         AHD_POWER_STATE_D2,
555         AHD_POWER_STATE_D3
556 } ahd_power_state;
557
558 void ahd_power_state_change(struct ahd_softc *ahd,
559                             ahd_power_state new_state);
560 #endif
561 /******************************** VL/EISA *************************************/
562 int aic7770_map_registers(struct ahd_softc *ahd);
563 int aic7770_map_int(struct ahd_softc *ahd, int irq);
564
565 /********************************* Debug **************************************/
566 static __inline void    ahd_print_path(struct ahd_softc *, struct scb *);
567 static __inline void    ahd_platform_dump_card_state(struct ahd_softc *ahd);
568
569 static __inline void
570 ahd_print_path(struct ahd_softc *ahd, struct scb *scb)
571 {
572         xpt_print_path(scb->io_ctx->ccb_h.path);
573 }
574
575 static __inline void
576 ahd_platform_dump_card_state(struct ahd_softc *ahd)
577 {
578         /* Nothing to do here for FreeBSD */
579 }
580 /**************************** Transfer Settings *******************************/
581 void      ahd_notify_xfer_settings_change(struct ahd_softc *,
582                                           struct ahd_devinfo *);
583 void      ahd_platform_set_tags(struct ahd_softc *, struct ahd_devinfo *,
584                                 int /*enable*/);
585
586 /************************* Initialization/Teardown ****************************/
587 int       ahd_platform_alloc(struct ahd_softc *ahd, void *platform_arg);
588 void      ahd_platform_free(struct ahd_softc *ahd);
589 int       ahd_map_int(struct ahd_softc *ahd);
590 int       ahd_attach(struct ahd_softc *);
591 int       ahd_softc_comp(struct ahd_softc *lahd, struct ahd_softc *rahd);
592 int       ahd_detach(device_t);
593 #define ahd_platform_init(arg)
594
595
596 /****************************** Interrupts ************************************/
597 void                    ahd_platform_intr(void *);
598 static __inline void    ahd_platform_flushwork(struct ahd_softc *ahd);
599 static __inline void
600 ahd_platform_flushwork(struct ahd_softc *ahd)
601 {
602 }
603
604 /************************ Misc Function Declarations **************************/
605 void      ahd_done(struct ahd_softc *ahd, struct scb *scb);
606 void      ahd_send_async(struct ahd_softc *, char /*channel*/,
607                          u_int /*target*/, u_int /*lun*/, ac_code, void *arg);
608 #endif  /* _AIC79XX_FREEBSD_H_ */