HAMMER 61E/Many: Stabilization, Performance
[dragonfly.git] / sys / dev / disk / aic7xxx / aic7xxx_inline.h
blob2a0e8f07fb09d89c51b54696ef0785fa1c6cc1a0
1 /*
2 * Inline routines shareable across OS platforms.
4 * Copyright (c) 1994-2001 Justin T. Gibbs.
5 * Copyright (c) 2000-2001 Adaptec Inc.
6 * All rights reserved.
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions, and the following disclaimer,
13 * without modification.
14 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
15 * substantially similar to the "NO WARRANTY" disclaimer below
16 * ("Disclaimer") and any redistribution must be conditioned upon
17 * including a substantially similar Disclaimer requirement for further
18 * binary redistribution.
19 * 3. Neither the names of the above-listed copyright holders nor the names
20 * of any contributors may be used to endorse or promote products derived
21 * from this software without specific prior written permission.
23 * Alternatively, this software may be distributed under the terms of the
24 * GNU General Public License ("GPL") version 2 as published by the Free
25 * Software Foundation.
27 * NO WARRANTY
28 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
31 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
32 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
33 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
34 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
35 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
36 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
37 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
38 * POSSIBILITY OF SUCH DAMAGES.
40 * $Id: //depot/aic7xxx/aic7xxx/aic7xxx_inline.h#47 $
42 * $FreeBSD: src/sys/dev/aic7xxx/aic7xxx_inline.h,v 1.25 2007/04/19 18:53:52 scottl Exp $
43 * $DragonFly: src/sys/dev/disk/aic7xxx/aic7xxx_inline.h,v 1.4 2007/07/19 00:23:04 pavalos Exp $
46 #ifndef _AIC7XXX_INLINE_H_
47 #define _AIC7XXX_INLINE_H_
49 /************************* Sequencer Execution Control ************************/
50 static __inline void ahc_pause_bug_fix(struct ahc_softc *ahc);
51 static __inline int ahc_is_paused(struct ahc_softc *ahc);
52 static __inline void ahc_pause(struct ahc_softc *ahc);
53 static __inline void ahc_unpause(struct ahc_softc *ahc);
56 * Work around any chip bugs related to halting sequencer execution.
57 * On Ultra2 controllers, we must clear the CIOBUS stretch signal by
58 * reading a register that will set this signal and deassert it.
59 * Without this workaround, if the chip is paused, by an interrupt or
60 * manual pause while accessing scb ram, accesses to certain registers
61 * will hang the system (infinite pci retries).
63 static __inline void
64 ahc_pause_bug_fix(struct ahc_softc *ahc)
66 if ((ahc->features & AHC_ULTRA2) != 0)
67 (void)ahc_inb(ahc, CCSCBCTL);
71 * Determine whether the sequencer has halted code execution.
72 * Returns non-zero status if the sequencer is stopped.
74 static __inline int
75 ahc_is_paused(struct ahc_softc *ahc)
77 return ((ahc_inb(ahc, HCNTRL) & PAUSE) != 0);
81 * Request that the sequencer stop and wait, indefinitely, for it
82 * to stop. The sequencer will only acknowledge that it is paused
83 * once it has reached an instruction boundary and PAUSEDIS is
84 * cleared in the SEQCTL register. The sequencer may use PAUSEDIS
85 * for critical sections.
87 static __inline void
88 ahc_pause(struct ahc_softc *ahc)
90 ahc_outb(ahc, HCNTRL, ahc->pause);
93 * Since the sequencer can disable pausing in a critical section, we
94 * must loop until it actually stops.
96 while (ahc_is_paused(ahc) == 0)
99 ahc_pause_bug_fix(ahc);
103 * Allow the sequencer to continue program execution.
104 * We check here to ensure that no additional interrupt
105 * sources that would cause the sequencer to halt have been
106 * asserted. If, for example, a SCSI bus reset is detected
107 * while we are fielding a different, pausing, interrupt type,
108 * we don't want to release the sequencer before going back
109 * into our interrupt handler and dealing with this new
110 * condition.
112 static __inline void
113 ahc_unpause(struct ahc_softc *ahc)
115 if ((ahc_inb(ahc, INTSTAT) & (SCSIINT | SEQINT | BRKADRINT)) == 0)
116 ahc_outb(ahc, HCNTRL, ahc->unpause);
119 /*********************** Untagged Transaction Routines ************************/
120 static __inline void ahc_freeze_untagged_queues(struct ahc_softc *ahc);
121 static __inline void ahc_release_untagged_queues(struct ahc_softc *ahc);
124 * Block our completion routine from starting the next untagged
125 * transaction for this target or target lun.
127 static __inline void
128 ahc_freeze_untagged_queues(struct ahc_softc *ahc)
130 if ((ahc->flags & AHC_SCB_BTT) == 0)
131 ahc->untagged_queue_lock++;
135 * Allow the next untagged transaction for this target or target lun
136 * to be executed. We use a counting semaphore to allow the lock
137 * to be acquired recursively. Once the count drops to zero, the
138 * transaction queues will be run.
140 static __inline void
141 ahc_release_untagged_queues(struct ahc_softc *ahc)
143 if ((ahc->flags & AHC_SCB_BTT) == 0) {
144 ahc->untagged_queue_lock--;
145 if (ahc->untagged_queue_lock == 0)
146 ahc_run_untagged_queues(ahc);
150 /************************** Memory mapping routines ***************************/
151 static __inline struct ahc_dma_seg *
152 ahc_sg_bus_to_virt(struct scb *scb,
153 uint32_t sg_busaddr);
154 static __inline uint32_t
155 ahc_sg_virt_to_bus(struct scb *scb,
156 struct ahc_dma_seg *sg);
157 static __inline uint32_t
158 ahc_hscb_busaddr(struct ahc_softc *ahc, u_int index);
159 static __inline void ahc_sync_scb(struct ahc_softc *ahc,
160 struct scb *scb, int op);
161 static __inline void ahc_sync_sglist(struct ahc_softc *ahc,
162 struct scb *scb, int op);
163 static __inline uint32_t
164 ahc_targetcmd_offset(struct ahc_softc *ahc,
165 u_int index);
167 static __inline struct ahc_dma_seg *
168 ahc_sg_bus_to_virt(struct scb *scb, uint32_t sg_busaddr)
170 int sg_index;
172 sg_index = (sg_busaddr - scb->sg_list_phys)/sizeof(struct ahc_dma_seg);
173 /* sg_list_phys points to entry 1, not 0 */
174 sg_index++;
176 return (&scb->sg_list[sg_index]);
179 static __inline uint32_t
180 ahc_sg_virt_to_bus(struct scb *scb, struct ahc_dma_seg *sg)
182 int sg_index;
184 /* sg_list_phys points to entry 1, not 0 */
185 sg_index = sg - &scb->sg_list[1];
187 return (scb->sg_list_phys + (sg_index * sizeof(*scb->sg_list)));
190 static __inline uint32_t
191 ahc_hscb_busaddr(struct ahc_softc *ahc, u_int index)
193 return (ahc->scb_data->hscb_busaddr
194 + (sizeof(struct hardware_scb) * index));
197 static __inline void
198 ahc_sync_scb(struct ahc_softc *ahc, struct scb *scb, int op)
200 aic_dmamap_sync(ahc, ahc->scb_data->hscb_dmat,
201 ahc->scb_data->hscb_dmamap,
202 /*offset*/(scb->hscb - ahc->hscbs) * sizeof(*scb->hscb),
203 /*len*/sizeof(*scb->hscb), op);
206 static __inline void
207 ahc_sync_sglist(struct ahc_softc *ahc, struct scb *scb, int op)
209 if (scb->sg_count == 0)
210 return;
212 aic_dmamap_sync(ahc, ahc->scb_data->sg_dmat, scb->sg_map->sg_dmamap,
213 /*offset*/(scb->sg_list - scb->sg_map->sg_vaddr)
214 * sizeof(struct ahc_dma_seg),
215 /*len*/sizeof(struct ahc_dma_seg) * scb->sg_count, op);
218 static __inline uint32_t
219 ahc_targetcmd_offset(struct ahc_softc *ahc, u_int index)
221 return (((uint8_t *)&ahc->targetcmds[index]) - ahc->qoutfifo);
224 /******************************** Debugging ***********************************/
225 static __inline char *ahc_name(struct ahc_softc *ahc);
227 static __inline char *
228 ahc_name(struct ahc_softc *ahc)
230 return (ahc->name);
233 /*********************** Miscelaneous Support Functions ***********************/
235 static __inline void ahc_update_residual(struct ahc_softc *ahc,
236 struct scb *scb);
237 static __inline struct ahc_initiator_tinfo *
238 ahc_fetch_transinfo(struct ahc_softc *ahc,
239 char channel, u_int our_id,
240 u_int remote_id,
241 struct ahc_tmode_tstate **tstate);
242 static __inline uint16_t
243 ahc_inw(struct ahc_softc *ahc, u_int port);
244 static __inline void ahc_outw(struct ahc_softc *ahc, u_int port,
245 u_int value);
246 static __inline uint32_t
247 ahc_inl(struct ahc_softc *ahc, u_int port);
248 static __inline void ahc_outl(struct ahc_softc *ahc, u_int port,
249 uint32_t value);
250 static __inline uint64_t
251 ahc_inq(struct ahc_softc *ahc, u_int port);
252 static __inline void ahc_outq(struct ahc_softc *ahc, u_int port,
253 uint64_t value);
254 static __inline struct scb*
255 ahc_get_scb(struct ahc_softc *ahc);
256 static __inline void ahc_free_scb(struct ahc_softc *ahc, struct scb *scb);
257 static __inline void ahc_swap_with_next_hscb(struct ahc_softc *ahc,
258 struct scb *scb);
259 static __inline void ahc_queue_scb(struct ahc_softc *ahc, struct scb *scb);
260 static __inline struct scsi_sense_data *
261 ahc_get_sense_buf(struct ahc_softc *ahc,
262 struct scb *scb);
263 static __inline uint32_t
264 ahc_get_sense_bufaddr(struct ahc_softc *ahc,
265 struct scb *scb);
268 * Determine whether the sequencer reported a residual
269 * for this SCB/transaction.
271 static __inline void
272 ahc_update_residual(struct ahc_softc *ahc, struct scb *scb)
274 uint32_t sgptr;
276 sgptr = aic_le32toh(scb->hscb->sgptr);
277 if ((sgptr & SG_RESID_VALID) != 0)
278 ahc_calc_residual(ahc, scb);
282 * Return pointers to the transfer negotiation information
283 * for the specified our_id/remote_id pair.
285 static __inline struct ahc_initiator_tinfo *
286 ahc_fetch_transinfo(struct ahc_softc *ahc, char channel, u_int our_id,
287 u_int remote_id, struct ahc_tmode_tstate **tstate)
290 * Transfer data structures are stored from the perspective
291 * of the target role. Since the parameters for a connection
292 * in the initiator role to a given target are the same as
293 * when the roles are reversed, we pretend we are the target.
295 if (channel == 'B')
296 our_id += 8;
297 *tstate = ahc->enabled_targets[our_id];
298 return (&(*tstate)->transinfo[remote_id]);
301 static __inline uint16_t
302 ahc_inw(struct ahc_softc *ahc, u_int port)
304 return ((ahc_inb(ahc, port+1) << 8) | ahc_inb(ahc, port));
307 static __inline void
308 ahc_outw(struct ahc_softc *ahc, u_int port, u_int value)
310 ahc_outb(ahc, port, value & 0xFF);
311 ahc_outb(ahc, port+1, (value >> 8) & 0xFF);
314 static __inline uint32_t
315 ahc_inl(struct ahc_softc *ahc, u_int port)
317 return ((ahc_inb(ahc, port))
318 | (ahc_inb(ahc, port+1) << 8)
319 | (ahc_inb(ahc, port+2) << 16)
320 | (ahc_inb(ahc, port+3) << 24));
323 static __inline void
324 ahc_outl(struct ahc_softc *ahc, u_int port, uint32_t value)
326 ahc_outb(ahc, port, (value) & 0xFF);
327 ahc_outb(ahc, port+1, ((value) >> 8) & 0xFF);
328 ahc_outb(ahc, port+2, ((value) >> 16) & 0xFF);
329 ahc_outb(ahc, port+3, ((value) >> 24) & 0xFF);
332 static __inline uint64_t
333 ahc_inq(struct ahc_softc *ahc, u_int port)
335 return ((ahc_inb(ahc, port))
336 | (ahc_inb(ahc, port+1) << 8)
337 | (ahc_inb(ahc, port+2) << 16)
338 | (ahc_inb(ahc, port+3) << 24)
339 | (((uint64_t)ahc_inb(ahc, port+4)) << 32)
340 | (((uint64_t)ahc_inb(ahc, port+5)) << 40)
341 | (((uint64_t)ahc_inb(ahc, port+6)) << 48)
342 | (((uint64_t)ahc_inb(ahc, port+7)) << 56));
345 static __inline void
346 ahc_outq(struct ahc_softc *ahc, u_int port, uint64_t value)
348 ahc_outb(ahc, port, value & 0xFF);
349 ahc_outb(ahc, port+1, (value >> 8) & 0xFF);
350 ahc_outb(ahc, port+2, (value >> 16) & 0xFF);
351 ahc_outb(ahc, port+3, (value >> 24) & 0xFF);
352 ahc_outb(ahc, port+4, (value >> 32) & 0xFF);
353 ahc_outb(ahc, port+5, (value >> 40) & 0xFF);
354 ahc_outb(ahc, port+6, (value >> 48) & 0xFF);
355 ahc_outb(ahc, port+7, (value >> 56) & 0xFF);
359 * Get a free scb. If there are none, see if we can allocate a new SCB.
361 static __inline struct scb *
362 ahc_get_scb(struct ahc_softc *ahc)
364 struct scb *scb;
366 if ((scb = SLIST_FIRST(&ahc->scb_data->free_scbs)) == NULL) {
367 if (ahc_alloc_scbs(ahc) == 0)
368 return (NULL);
369 scb = SLIST_FIRST(&ahc->scb_data->free_scbs);
370 if (scb == NULL)
371 return (NULL);
373 SLIST_REMOVE_HEAD(&ahc->scb_data->free_scbs, links.sle);
374 return (scb);
378 * Return an SCB resource to the free list.
380 static __inline void
381 ahc_free_scb(struct ahc_softc *ahc, struct scb *scb)
383 struct hardware_scb *hscb;
385 hscb = scb->hscb;
386 /* Clean up for the next user */
387 ahc->scb_data->scbindex[hscb->tag] = NULL;
388 scb->flags = SCB_FLAG_NONE;
389 hscb->control = 0;
391 SLIST_INSERT_HEAD(&ahc->scb_data->free_scbs, scb, links.sle);
393 /* Notify the OSM that a resource is now available. */
394 aic_platform_scb_free(ahc, scb);
397 static __inline struct scb *
398 ahc_lookup_scb(struct ahc_softc *ahc, u_int tag)
400 struct scb* scb;
402 scb = ahc->scb_data->scbindex[tag];
403 if (scb != NULL)
404 ahc_sync_scb(ahc, scb,
405 BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE);
406 return (scb);
409 static __inline void
410 ahc_swap_with_next_hscb(struct ahc_softc *ahc, struct scb *scb)
412 struct hardware_scb *q_hscb;
413 u_int saved_tag;
416 * Our queuing method is a bit tricky. The card
417 * knows in advance which HSCB to download, and we
418 * can't disappoint it. To achieve this, the next
419 * SCB to download is saved off in ahc->next_queued_scb.
420 * When we are called to queue "an arbitrary scb",
421 * we copy the contents of the incoming HSCB to the one
422 * the sequencer knows about, swap HSCB pointers and
423 * finally assign the SCB to the tag indexed location
424 * in the scb_array. This makes sure that we can still
425 * locate the correct SCB by SCB_TAG.
427 q_hscb = ahc->next_queued_scb->hscb;
428 saved_tag = q_hscb->tag;
429 memcpy(q_hscb, scb->hscb, sizeof(*scb->hscb));
430 if ((scb->flags & SCB_CDB32_PTR) != 0) {
431 q_hscb->shared_data.cdb_ptr =
432 aic_htole32(ahc_hscb_busaddr(ahc, q_hscb->tag)
433 + offsetof(struct hardware_scb, cdb32));
435 q_hscb->tag = saved_tag;
436 q_hscb->next = scb->hscb->tag;
438 /* Now swap HSCB pointers. */
439 ahc->next_queued_scb->hscb = scb->hscb;
440 scb->hscb = q_hscb;
442 /* Now define the mapping from tag to SCB in the scbindex */
443 ahc->scb_data->scbindex[scb->hscb->tag] = scb;
447 * Tell the sequencer about a new transaction to execute.
449 static __inline void
450 ahc_queue_scb(struct ahc_softc *ahc, struct scb *scb)
452 ahc_swap_with_next_hscb(ahc, scb);
454 if (scb->hscb->tag == SCB_LIST_NULL
455 || scb->hscb->next == SCB_LIST_NULL)
456 panic("Attempt to queue invalid SCB tag %x:%x\n",
457 scb->hscb->tag, scb->hscb->next);
460 * Setup data "oddness".
462 scb->hscb->lun &= LID;
463 if (aic_get_transfer_length(scb) & 0x1)
464 scb->hscb->lun |= SCB_XFERLEN_ODD;
467 * Keep a history of SCBs we've downloaded in the qinfifo.
469 ahc->qinfifo[ahc->qinfifonext++] = scb->hscb->tag;
472 * Make sure our data is consistent from the
473 * perspective of the adapter.
475 ahc_sync_scb(ahc, scb, BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE);
477 /* Tell the adapter about the newly queued SCB */
478 if ((ahc->features & AHC_QUEUE_REGS) != 0) {
479 ahc_outb(ahc, HNSCB_QOFF, ahc->qinfifonext);
480 } else {
481 if ((ahc->features & AHC_AUTOPAUSE) == 0)
482 ahc_pause(ahc);
483 ahc_outb(ahc, KERNEL_QINPOS, ahc->qinfifonext);
484 if ((ahc->features & AHC_AUTOPAUSE) == 0)
485 ahc_unpause(ahc);
489 static __inline struct scsi_sense_data *
490 ahc_get_sense_buf(struct ahc_softc *ahc, struct scb *scb)
492 int offset;
494 offset = scb - ahc->scb_data->scbarray;
495 return (&ahc->scb_data->sense[offset]);
498 static __inline uint32_t
499 ahc_get_sense_bufaddr(struct ahc_softc *ahc, struct scb *scb)
501 int offset;
503 offset = scb - ahc->scb_data->scbarray;
504 return (ahc->scb_data->sense_busaddr
505 + (offset * sizeof(struct scsi_sense_data)));
508 /************************** Interrupt Processing ******************************/
509 static __inline void ahc_sync_qoutfifo(struct ahc_softc *ahc, int op);
510 static __inline void ahc_sync_tqinfifo(struct ahc_softc *ahc, int op);
511 static __inline u_int ahc_check_cmdcmpltqueues(struct ahc_softc *ahc);
512 static __inline int ahc_intr(struct ahc_softc *ahc);
514 static __inline void
515 ahc_sync_qoutfifo(struct ahc_softc *ahc, int op)
517 aic_dmamap_sync(ahc, ahc->shared_data_dmat, ahc->shared_data_dmamap,
518 /*offset*/0, /*len*/256, op);
521 static __inline void
522 ahc_sync_tqinfifo(struct ahc_softc *ahc, int op)
524 #ifdef AHC_TARGET_MODE
525 if ((ahc->flags & AHC_TARGETROLE) != 0) {
526 aic_dmamap_sync(ahc, ahc->shared_data_dmat,
527 ahc->shared_data_dmamap,
528 ahc_targetcmd_offset(ahc, 0),
529 sizeof(struct target_cmd) * AHC_TMODE_CMDS,
530 op);
532 #endif
536 * See if the firmware has posted any completed commands
537 * into our in-core command complete fifos.
539 #define AHC_RUN_QOUTFIFO 0x1
540 #define AHC_RUN_TQINFIFO 0x2
541 static __inline u_int
542 ahc_check_cmdcmpltqueues(struct ahc_softc *ahc)
544 u_int retval;
546 retval = 0;
547 aic_dmamap_sync(ahc, ahc->shared_data_dmat, ahc->shared_data_dmamap,
548 /*offset*/ahc->qoutfifonext, /*len*/1,
549 BUS_DMASYNC_POSTREAD);
550 if (ahc->qoutfifo[ahc->qoutfifonext] != SCB_LIST_NULL)
551 retval |= AHC_RUN_QOUTFIFO;
552 #ifdef AHC_TARGET_MODE
553 if ((ahc->flags & AHC_TARGETROLE) != 0
554 && (ahc->flags & AHC_TQINFIFO_BLOCKED) == 0) {
555 aic_dmamap_sync(ahc, ahc->shared_data_dmat,
556 ahc->shared_data_dmamap,
557 ahc_targetcmd_offset(ahc, ahc->tqinfifofnext),
558 /*len*/sizeof(struct target_cmd),
559 BUS_DMASYNC_POSTREAD);
560 if (ahc->targetcmds[ahc->tqinfifonext].cmd_valid != 0)
561 retval |= AHC_RUN_TQINFIFO;
563 #endif
564 return (retval);
568 * Catch an interrupt from the adapter
570 static __inline int
571 ahc_intr(struct ahc_softc *ahc)
573 u_int intstat;
575 if ((ahc->pause & INTEN) == 0) {
577 * Our interrupt is not enabled on the chip
578 * and may be disabled for re-entrancy reasons,
579 * so just return. This is likely just a shared
580 * interrupt.
582 return (0);
585 * Instead of directly reading the interrupt status register,
586 * infer the cause of the interrupt by checking our in-core
587 * completion queues. This avoids a costly PCI bus read in
588 * most cases.
590 if ((ahc->flags & (AHC_ALL_INTERRUPTS|AHC_EDGE_INTERRUPT)) == 0
591 && (ahc_check_cmdcmpltqueues(ahc) != 0))
592 intstat = CMDCMPLT;
593 else {
594 intstat = ahc_inb(ahc, INTSTAT);
597 if ((intstat & INT_PEND) == 0) {
598 #if AIC_PCI_CONFIG > 0
599 if (ahc->unsolicited_ints > 500) {
600 ahc->unsolicited_ints = 0;
601 if ((ahc->chip & AHC_PCI) != 0
602 && (ahc_inb(ahc, ERROR) & PCIERRSTAT) != 0)
603 ahc->bus_intr(ahc);
605 #endif
606 ahc->unsolicited_ints++;
607 return (0);
609 ahc->unsolicited_ints = 0;
611 if (intstat & CMDCMPLT) {
612 ahc_outb(ahc, CLRINT, CLRCMDINT);
615 * Ensure that the chip sees that we've cleared
616 * this interrupt before we walk the output fifo.
617 * Otherwise, we may, due to posted bus writes,
618 * clear the interrupt after we finish the scan,
619 * and after the sequencer has added new entries
620 * and asserted the interrupt again.
622 ahc_flush_device_writes(ahc);
623 ahc_run_qoutfifo(ahc);
624 #ifdef AHC_TARGET_MODE
625 if ((ahc->flags & AHC_TARGETROLE) != 0)
626 ahc_run_tqinfifo(ahc, /*paused*/FALSE);
627 #endif
631 * Handle statuses that may invalidate our cached
632 * copy of INTSTAT separately.
634 if (intstat == 0xFF && (ahc->features & AHC_REMOVABLE) != 0) {
635 /* Hot eject. Do nothing */
636 } else if (intstat & BRKADRINT) {
637 ahc_handle_brkadrint(ahc);
638 } else if ((intstat & (SEQINT|SCSIINT)) != 0) {
640 ahc_pause_bug_fix(ahc);
642 if ((intstat & SEQINT) != 0)
643 ahc_handle_seqint(ahc, intstat);
645 if ((intstat & SCSIINT) != 0)
646 ahc_handle_scsiint(ahc, intstat);
648 return (1);
651 #endif /* _AIC7XXX_INLINE_H_ */