Commit 38604fb9 authored by Justin T. Gibbs's avatar Justin T. Gibbs

Aic79xx Driver Update to version 1.3.2

 o Fix data corruption issue with Rev A hardware on
   IBM and Fujitsu U320 Drives.
 o Fix bug in ahd_pause_and_flushwork() that could prevent recovery
   actions from being effective.
 o Correct hang condition caused by attempts by the mid-layer to probe
   the controller's own ID.
parent deb6ace6
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES. * POSSIBILITY OF SUCH DAMAGES.
* *
* $Id: //depot/aic7xxx/aic7xxx/aic79xx.h#78 $ * $Id: //depot/aic7xxx/aic7xxx/aic79xx.h#79 $
* *
* $FreeBSD$ * $FreeBSD$
*/ */
...@@ -309,7 +309,17 @@ typedef enum { ...@@ -309,7 +309,17 @@ typedef enum {
* Controller write to INTSTAT will lose to a host * Controller write to INTSTAT will lose to a host
* write to CLRINT. * write to CLRINT.
*/ */
AHD_INTCOLLISION_BUG = 0x100000 AHD_INTCOLLISION_BUG = 0x100000,
/*
* The GEM318 violates the SCSI spec by not waiting
* the mandated bus settle delay between phase changes
* in some situations. Some aic79xx chip revs. are more
* strict in this regard and will treat REQ assertions
* that fall within the bus settle delay window as
* glitches. This flag enables causes the firmware
* to tolerate early REQ assertions.
*/
AHD_EARLY_REQ_BUG = 0x200000
} ahd_bug; } ahd_bug;
/* /*
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
* $FreeBSD$ * $FreeBSD$
*/ */
VERSION = "$Id: //depot/aic7xxx/aic7xxx/aic79xx.seq#79 $" VERSION = "$Id: //depot/aic7xxx/aic7xxx/aic79xx.seq#86 $"
PATCH_ARG_LIST = "struct ahd_softc *ahd" PATCH_ARG_LIST = "struct ahd_softc *ahd"
PREFIX = "ahd_" PREFIX = "ahd_"
...@@ -122,22 +122,24 @@ gsfifo_complete_normally: ...@@ -122,22 +122,24 @@ gsfifo_complete_normally:
/* /*
* Since this status did not consume a FIFO, we have to * Since this status did not consume a FIFO, we have to
* be a bit more dilligent in how we check for FIFOs pertaining * be a bit more dilligent in how we check for FIFOs pertaining
* to this transaction. There are three states that a FIFO still * to this transaction. There are two states that a FIFO still
* transferring data may be in. * transferring data may be in.
* *
* 1) Configured and draining to the host, with a pending CLRCHN. * 1) Configured and draining to the host, with a FIFO handler.
* 2) Configured and draining to the host, no pending CLRCHN. * 2) Pending cfg4data, fifo not empty.
* 3) Pending cfg4data, fifo not empty.
* *
* Cases 1 and 2 can be detected by noticing that a longjmp is * Case 1 can be detected by noticing that a longjmp is active for
* active for the FIFO and LONGJMP_SCB matches our SCB. In this * the FIFO and LONGJMP_SCB matches our SCB. In this case, we allow
* case, we allow the routine servicing the FIFO to complete the SCB. * the routine servicing the FIFO to complete the SCB.
* *
* Case 3 implies either a pending or yet to occur save data * Case 2 implies either a pending or yet to occur save data
* pointers for this same context in the other FIFO. So, if * pointers for this same context in the other FIFO. So, if
* we detect case 2, we will properly defer the post of the SCB * we detect case 1, we will properly defer the post of the SCB
* and achieve the desired result. The pending cfg4data will * and achieve the desired result. The pending cfg4data will
* notice that status has been received and complete the SCB. * notice that status has been received and complete the SCB.
*
* If the data-transfer has been completed, or no data transfer
* was needed for this SCB, it is safe to complete the command.
*/ */
test SCB_SGPTR, SG_LIST_NULL jz good_status_check_fifos; test SCB_SGPTR, SG_LIST_NULL jz good_status_check_fifos;
/* /*
...@@ -519,7 +521,7 @@ BEGIN_CRITICAL; ...@@ -519,7 +521,7 @@ BEGIN_CRITICAL;
/* /*
* For packetized, the LQO manager clears ENSELO on * For packetized, the LQO manager clears ENSELO on
* the assertion of SELDO. If we are non-packetized, * the assertion of SELDO. If we are non-packetized,
* LASTSCB and CURRSCB are acuate. * LASTSCB and CURRSCB are accurate.
*/ */
test SCSISEQ0, ENSELO jnz use_lastscb; test SCSISEQ0, ENSELO jnz use_lastscb;
...@@ -1030,14 +1032,6 @@ queue_arg1_scb_completion: ...@@ -1030,14 +1032,6 @@ queue_arg1_scb_completion:
SET_MODE(M_SCSI, M_SCSI) SET_MODE(M_SCSI, M_SCSI)
bmov SCBPTR, ARG_1, 2; bmov SCBPTR, ARG_1, 2;
queue_scb_completion: queue_scb_completion:
if ((ahd->bugs & AHD_ABORT_LQI_BUG) == 0) {
/*
* Set MK_MESSAGE to trigger an abort should this SCB
* be referenced by a target even though it is not currently
* active.
*/
or SCB_CONTROL, MK_MESSAGE;
}
test SCB_SCSI_STATUS,0xff jnz bad_status; test SCB_SCSI_STATUS,0xff jnz bad_status;
/* /*
* Check for residuals * Check for residuals
...@@ -1163,7 +1157,28 @@ clear_target_state: ...@@ -1163,7 +1157,28 @@ clear_target_state:
mvi SEQ_FLAGS, NOT_IDENTIFIED|NO_CDB_SENT ret; mvi SEQ_FLAGS, NOT_IDENTIFIED|NO_CDB_SENT ret;
phase_lock: phase_lock:
test SCSIPHASE, 0xFF jz .; if ((ahd->bugs & AHD_EARLY_REQ_BUG) != 0) {
/*
* Don't ignore persistent REQ assertions just because
* they were asserted within the bus settle delay window.
* This allows us to tolerate devices like the GEM318
* that violate the SCSI spec. We are careful not to
* count REQ while we are waiting for it to fall during
* an async phase due to our asserted ACK. Each
* sequencer instruction takes ~25ns, so the REQ must
* last at least 100ns in order to be counted as a true
* REQ.
*/
test SCSIPHASE, 0xFF jnz phase_locked;
test SCSISIGI, ACKI jnz phase_lock;
test SCSISIGI, REQI jz phase_lock;
test SCSIPHASE, 0xFF jnz phase_locked;
test SCSISIGI, ACKI jnz phase_lock;
test SCSISIGI, REQI jz phase_lock;
phase_locked:
} else {
test SCSIPHASE, 0xFF jz .;
}
test SSTAT1, SCSIPERR jnz phase_lock; test SSTAT1, SCSIPERR jnz phase_lock;
phase_lock_latch_phase: phase_lock_latch_phase:
and LASTPHASE, PHASE_MASK, SCSISIGI ret; and LASTPHASE, PHASE_MASK, SCSISIGI ret;
...@@ -1247,7 +1262,7 @@ service_fifo: ...@@ -1247,7 +1262,7 @@ service_fifo:
nop; nop;
} }
and SGHADDR[0], SG_PREFETCH_ALIGN_MASK, SCB_RESIDUAL_SGPTR; and SGHADDR[0], SG_PREFETCH_ALIGN_MASK, SCB_RESIDUAL_SGPTR;
mvi CCSGCTL, CCSGEN|SG_CACHE_AVAIL|CCSGRESET; mvi CCSGCTL, CCSGEN|CCSGRESET;
or SG_STATE, FETCH_INPROG ret; or SG_STATE, FETCH_INPROG ret;
idle_sgfetch_complete: idle_sgfetch_complete:
/* /*
...@@ -1261,6 +1276,15 @@ idle_sgfetch_complete: ...@@ -1261,6 +1276,15 @@ idle_sgfetch_complete:
idle_sg_avail: idle_sg_avail:
/* Does the hardware have space for another SG entry? */ /* Does the hardware have space for another SG entry? */
test DFSTATUS, PRELOAD_AVAIL jz return; test DFSTATUS, PRELOAD_AVAIL jz return;
/*
* On the A, preloading a segment before HDMAENACK
* comes true can clobber the shaddow address of the
* first segment in the S/G FIFO. Wait until it is
* safe to proceed.
*/
if ((ahd->features & AHD_NEW_DFCNTRL_OPTS) == 0) {
test DFCNTRL, HDMAENACK jz return;
}
if ((ahd->flags & AHD_64BIT_ADDRESSING) != 0) { if ((ahd->flags & AHD_64BIT_ADDRESSING) != 0) {
bmov HADDR, CCSGRAM, 8; bmov HADDR, CCSGRAM, 8;
} else { } else {
...@@ -1290,22 +1314,12 @@ sg_advance: ...@@ -1290,22 +1314,12 @@ sg_advance:
or SINDEX, LAST_SEG; or SINDEX, LAST_SEG;
clr SG_STATE; clr SG_STATE;
mov SG_CACHE_PRE, SINDEX; mov SG_CACHE_PRE, SINDEX;
/*
* Load the segment. Or in HDMAEN here too
* just in case HDMAENACK has not come true
* by the time this segment is loaded. If
* HDMAENACK is not true, this or will disable
* HDMAEN mid-transfer. We do not want to simply
* mvi our original settings as SCSIEN automatically
* de-asserts and we don't want to accidentally
* re-enable it.
*/
if ((ahd->features & AHD_NEW_DFCNTRL_OPTS) != 0) { if ((ahd->features & AHD_NEW_DFCNTRL_OPTS) != 0) {
/* /*
* Use SCSIENWRDIS so that SCSIEN is never * Use SCSIENWRDIS so that SCSIEN is never
* modified by this operation. * modified by this operation.
*/ */
or DFCNTRL, PRELOADEN|SCSIENWRDIS|HDMAEN; or DFCNTRL, PRELOADEN|HDMAEN|SCSIENWRDIS;
} else { } else {
or DFCNTRL, PRELOADEN|HDMAEN; or DFCNTRL, PRELOADEN|HDMAEN;
} }
...@@ -1606,7 +1620,13 @@ export seq_isr: ...@@ -1606,7 +1620,13 @@ export seq_isr:
and DFCNTRL, ~SCSIEN; and DFCNTRL, ~SCSIEN;
test SSTAT1, REQINIT jz .; test SSTAT1, REQINIT jz .;
or DFCNTRL, SCSIEN; or DFCNTRL, SCSIEN;
jmp snapshot_other_fifo; /* FALLTHROUGH */
snapshot_other_fifo:
xor MODE_PTR, MK_MODE(M_DFF1, M_DFF1);
/* FALLTHROUGH */
snapshot_saveptr:
mvi DFFSXFRCTL, CLRCHN;
or SEQINTCTL, IRET ret;
data_valid: data_valid:
} }
test SEQINTSRC, CFG4DATA jnz cfg4data_intr; test SEQINTSRC, CFG4DATA jnz cfg4data_intr;
...@@ -1626,7 +1646,7 @@ data_valid: ...@@ -1626,7 +1646,7 @@ data_valid:
* of snapshot is not active. * of snapshot is not active.
* *
* The second case is a save pointers on an active FIFO which occurs * The second case is a save pointers on an active FIFO which occurs
* if the target changes to a new L_Q or busfrees/QAS' and the transfer * if the target changes to a new L_Q or busfrees/QASes and the transfer
* has a residual. This should occur coincident with a ctxtdone. We * has a residual. This should occur coincident with a ctxtdone. We
* disable the interrupt and allow our active routine to handle the * disable the interrupt and allow our active routine to handle the
* save. * save.
...@@ -1638,14 +1658,6 @@ saveptr_intr: ...@@ -1638,14 +1658,6 @@ saveptr_intr:
saveptr_active_fifo: saveptr_active_fifo:
and SEQIMODE, ~ENSAVEPTRS; and SEQIMODE, ~ENSAVEPTRS;
or SEQINTCTL, IRET ret; or SEQINTCTL, IRET ret;
if ((ahd->features & AHD_RTI) == 0) {
snapshot_other_fifo:
xor MODE_PTR, MK_MODE(M_DFF1, M_DFF1);
/* FALLTHROUGH */
snapshot_saveptr:
mvi DFFSXFRCTL, CLRCHN;
or SEQINTCTL, IRET ret;
}
cfg4data_intr: cfg4data_intr:
test SCB_SGPTR[0], SG_LIST_NULL jnz pkt_handle_overrun; test SCB_SGPTR[0], SG_LIST_NULL jnz pkt_handle_overrun;
...@@ -1720,7 +1732,7 @@ pkt_service_fifo: ...@@ -1720,7 +1732,7 @@ pkt_service_fifo:
pkt_last_seg: pkt_last_seg:
call setjmp; call setjmp;
test SEQINTSRC, SAVEPTRS jnz pkt_saveptrs; test SEQINTSRC, SAVEPTRS jnz pkt_saveptrs;
test SG_CACHE_SHADOW, LAST_SEG_DONE jnz last_pkt_done; test SG_CACHE_SHADOW, LAST_SEG_DONE jnz last_pkt_xfer_done;
test SCSIPHASE, ~DATA_PHASE_MASK jz . + 2; test SCSIPHASE, ~DATA_PHASE_MASK jz . + 2;
test SCSISIGO, ATNO jnz . + 2; test SCSISIGO, ATNO jnz . + 2;
test SSTAT2, NONPACKREQ jz return; test SSTAT2, NONPACKREQ jz return;
...@@ -1764,7 +1776,7 @@ pkt_saveptrs_clrchn: ...@@ -1764,7 +1776,7 @@ pkt_saveptrs_clrchn:
mvi DFFSXFRCTL, CLRCHN ret; mvi DFFSXFRCTL, CLRCHN ret;
END_CRITICAL; END_CRITICAL;
last_pkt_done: last_pkt_xfer_done:
BEGIN_CRITICAL; BEGIN_CRITICAL;
if ((ahd->bugs & AHD_AUTOFLUSH_BUG) != 0) { if ((ahd->bugs & AHD_AUTOFLUSH_BUG) != 0) {
or DFCNTRL, FIFOFLUSH; or DFCNTRL, FIFOFLUSH;
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES. * POSSIBILITY OF SUCH DAMAGES.
* *
* $Id: //depot/aic7xxx/aic7xxx/aic79xx.c#157 $ * $Id: //depot/aic7xxx/aic7xxx/aic79xx.c#161 $
* *
* $FreeBSD$ * $FreeBSD$
*/ */
...@@ -1249,6 +1249,14 @@ ahd_handle_scsiint(struct ahd_softc *ahd, u_int intstat) ...@@ -1249,6 +1249,14 @@ ahd_handle_scsiint(struct ahd_softc *ahd, u_int intstat)
ahd_outb(ahd, CLRSINT3, status3); ahd_outb(ahd, CLRSINT3, status3);
} else if ((lqistat1 & (LQIPHASE_LQ|LQIPHASE_NLQ)) != 0) { } else if ((lqistat1 & (LQIPHASE_LQ|LQIPHASE_NLQ)) != 0) {
ahd_handle_lqiphase_error(ahd, lqistat1); ahd_handle_lqiphase_error(ahd, lqistat1);
} else if ((lqistat1 & LQICRCI_NLQ) != 0) {
/*
* This status can be delayed during some
* streaming operations. The SCSIPHASE
* handler has already dealt with this case
* so just clear the error.
*/
ahd_outb(ahd, CLRLQIINT1, CLRLQICRCI_NLQ);
} else if ((status & BUSFREE) != 0) { } else if ((status & BUSFREE) != 0) {
u_int lqostat1; u_int lqostat1;
int restart; int restart;
...@@ -1626,14 +1634,6 @@ ahd_handle_pkt_busfree(struct ahd_softc *ahd, u_int busfreetime) ...@@ -1626,14 +1634,6 @@ ahd_handle_pkt_busfree(struct ahd_softc *ahd, u_int busfreetime)
scb = ahd_lookup_scb(ahd, scbid); scb = ahd_lookup_scb(ahd, scbid);
if (scb == NULL) if (scb == NULL)
panic("SCB not valid during LQOBUSFREE"); panic("SCB not valid during LQOBUSFREE");
/*
* Return the LQO manager to its idle loop. It will
* not do this automatically if the busfree occurs
* after the first REQ of either the LQ or command
* packet or between the LQ and command packet.
*/
ahd_outb(ahd, LQCTL2, ahd_inb(ahd, LQCTL2) | LQOTOIDLE);
/* /*
* Clear the status. * Clear the status.
*/ */
...@@ -1641,8 +1641,17 @@ ahd_handle_pkt_busfree(struct ahd_softc *ahd, u_int busfreetime) ...@@ -1641,8 +1641,17 @@ ahd_handle_pkt_busfree(struct ahd_softc *ahd, u_int busfreetime)
if ((ahd->bugs & AHD_CLRLQO_AUTOCLR_BUG) != 0) if ((ahd->bugs & AHD_CLRLQO_AUTOCLR_BUG) != 0)
ahd_outb(ahd, CLRLQOINT1, 0); ahd_outb(ahd, CLRLQOINT1, 0);
ahd_outb(ahd, SCSISEQ0, ahd_inb(ahd, SCSISEQ0) & ~ENSELO); ahd_outb(ahd, SCSISEQ0, ahd_inb(ahd, SCSISEQ0) & ~ENSELO);
ahd_flush_device_writes(ahd);
ahd_outb(ahd, CLRSINT0, CLRSELDO); ahd_outb(ahd, CLRSINT0, CLRSELDO);
/*
* Return the LQO manager to its idle loop. It will
* not do this automatically if the busfree occurs
* after the first REQ of either the LQ or command
* packet or between the LQ and command packet.
*/
ahd_outb(ahd, LQCTL2, ahd_inb(ahd, LQCTL2) | LQOTOIDLE);
/* /*
* Update the waiting for selection queue so * Update the waiting for selection queue so
* we restart on the correct SCB. * we restart on the correct SCB.
...@@ -1653,9 +1662,9 @@ ahd_handle_pkt_busfree(struct ahd_softc *ahd, u_int busfreetime) ...@@ -1653,9 +1662,9 @@ ahd_handle_pkt_busfree(struct ahd_softc *ahd, u_int busfreetime)
ahd_outw(ahd, WAITING_TID_HEAD, scbid); ahd_outw(ahd, WAITING_TID_HEAD, scbid);
waiting_t = ahd_inw(ahd, WAITING_TID_TAIL); waiting_t = ahd_inw(ahd, WAITING_TID_TAIL);
next = SCB_LIST_NULL;
if (waiting_t == waiting_h) { if (waiting_t == waiting_h) {
ahd_outw(ahd, WAITING_TID_TAIL, scbid); ahd_outw(ahd, WAITING_TID_TAIL, scbid);
next = SCB_LIST_NULL;
} else { } else {
ahd_set_scbptr(ahd, waiting_h); ahd_set_scbptr(ahd, waiting_h);
next = ahd_inw(ahd, SCB_NEXT2); next = ahd_inw(ahd, SCB_NEXT2);
...@@ -1704,6 +1713,7 @@ ahd_handle_pkt_busfree(struct ahd_softc *ahd, u_int busfreetime) ...@@ -1704,6 +1713,7 @@ ahd_handle_pkt_busfree(struct ahd_softc *ahd, u_int busfreetime)
scb = ahd_lookup_scb(ahd, scbid); scb = ahd_lookup_scb(ahd, scbid);
ahd_print_path(ahd, scb); ahd_print_path(ahd, scb);
printf("Unexpected PKT busfree condition\n"); printf("Unexpected PKT busfree condition\n");
ahd_dump_card_state(ahd);
ahd_abort_scbs(ahd, SCB_GET_TARGET(ahd, scb), 'A', ahd_abort_scbs(ahd, SCB_GET_TARGET(ahd, scb), 'A',
SCB_GET_LUN(scb), SCB_GET_TAG(scb), SCB_GET_LUN(scb), SCB_GET_TAG(scb),
ROLE_INITIATOR, CAM_UNEXP_BUSFREE); ROLE_INITIATOR, CAM_UNEXP_BUSFREE);
...@@ -5049,7 +5059,7 @@ ahd_reset(struct ahd_softc *ahd) ...@@ -5049,7 +5059,7 @@ ahd_reset(struct ahd_softc *ahd)
/* /*
* If a recovery action has forced a chip reset, * If a recovery action has forced a chip reset,
* re-initialize the chip to our likeing. * re-initialize the chip to our liking.
*/ */
if (ahd->init_level > 0) if (ahd->init_level > 0)
ahd_chip_init(ahd); ahd_chip_init(ahd);
...@@ -6565,13 +6575,13 @@ ahd_enable_coalessing(struct ahd_softc *ahd, int enable) ...@@ -6565,13 +6575,13 @@ ahd_enable_coalessing(struct ahd_softc *ahd, int enable)
void void
ahd_pause_and_flushwork(struct ahd_softc *ahd) ahd_pause_and_flushwork(struct ahd_softc *ahd)
{ {
u_int intstat; ahd_mode_state saved_modes;
u_int maxloops; u_int intstat;
int paused; u_int maxloops;
int paused;
maxloops = 1000; maxloops = 1000;
ahd->flags |= AHD_ALL_INTERRUPTS; ahd->flags |= AHD_ALL_INTERRUPTS;
intstat = 0;
paused = FALSE; paused = FALSE;
do { do {
struct scb *waiting_scb; struct scb *waiting_scb;
...@@ -6582,6 +6592,8 @@ ahd_pause_and_flushwork(struct ahd_softc *ahd) ...@@ -6582,6 +6592,8 @@ ahd_pause_and_flushwork(struct ahd_softc *ahd)
ahd_pause(ahd); ahd_pause(ahd);
paused = TRUE; paused = TRUE;
ahd_clear_critical_section(ahd); ahd_clear_critical_section(ahd);
saved_modes = ahd_save_modes(ahd);
ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI);
if ((ahd_inb(ahd, SSTAT0) & (SELDO|SELINGO)) == 0) if ((ahd_inb(ahd, SSTAT0) & (SELDO|SELINGO)) == 0)
ahd_outb(ahd, SCSISEQ0, ahd_outb(ahd, SCSISEQ0,
ahd_inb(ahd, SCSISEQ0) & ~ENSELO); ahd_inb(ahd, SCSISEQ0) & ~ENSELO);
...@@ -6598,10 +6610,10 @@ ahd_pause_and_flushwork(struct ahd_softc *ahd) ...@@ -6598,10 +6610,10 @@ ahd_pause_and_flushwork(struct ahd_softc *ahd)
ahd_outb(ahd, SCSISEQ0, ahd_outb(ahd, SCSISEQ0,
ahd_inb(ahd, SCSISEQ0) | ENSELO); ahd_inb(ahd, SCSISEQ0) | ENSELO);
if (intstat == 0xFF && (ahd->features & AHD_REMOVABLE) != 0) intstat = ahd_inb(ahd, INTSTAT);
break;
} while (--maxloops } while (--maxloops
&& (((intstat = ahd_inb(ahd, INTSTAT)) & INT_PEND) != 0 && (intstat != 0xFF || (ahd->features & AHD_REMOVABLE) == 0)
&& ((intstat & INT_PEND) != 0
|| (ahd_inb(ahd, SSTAT0) & (SELDO|SELINGO)))); || (ahd_inb(ahd, SSTAT0) & (SELDO|SELINGO))));
if (maxloops == 0) { if (maxloops == 0) {
printf("Infinite interrupt loop, INTSTAT = %x", printf("Infinite interrupt loop, INTSTAT = %x",
...@@ -6612,6 +6624,7 @@ ahd_pause_and_flushwork(struct ahd_softc *ahd) ...@@ -6612,6 +6624,7 @@ ahd_pause_and_flushwork(struct ahd_softc *ahd)
ahd_platform_flushwork(ahd); ahd_platform_flushwork(ahd);
ahd->flags &= ~AHD_ALL_INTERRUPTS; ahd->flags &= ~AHD_ALL_INTERRUPTS;
ahd_restore_modes(ahd, saved_modes);
} }
int int
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES. * POSSIBILITY OF SUCH DAMAGES.
* *
* $Id: //depot/aic7xxx/aic7xxx/aic79xx_inline.h#41 $ * $Id: //depot/aic7xxx/aic7xxx/aic79xx_inline.h#42 $
* *
* $FreeBSD$ * $FreeBSD$
*/ */
......
/* /*
* Adaptec AIC79xx device driver for Linux. * Adaptec AIC79xx device driver for Linux.
* *
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_osm.c#115 $ * $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_osm.c#123 $
* *
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Copyright (c) 1994-2000 Justin T. Gibbs. * Copyright (c) 1994-2000 Justin T. Gibbs.
...@@ -992,9 +992,13 @@ ahd_linux_queue(Scsi_Cmnd * cmd, void (*scsi_done) (Scsi_Cmnd *)) ...@@ -992,9 +992,13 @@ ahd_linux_queue(Scsi_Cmnd * cmd, void (*scsi_done) (Scsi_Cmnd *))
cmd->device->id, cmd->device->lun, cmd->device->id, cmd->device->lun,
/*alloc*/TRUE); /*alloc*/TRUE);
if (dev == NULL) { if (dev == NULL) {
ahd_cmd_set_transaction_status(cmd, CAM_RESRC_UNAVAIL);
ahd_linux_queue_cmd_complete(ahd, cmd);
ahd_schedule_completeq(ahd, NULL);
ahd_midlayer_entrypoint_unlock(ahd, &flags); ahd_midlayer_entrypoint_unlock(ahd, &flags);
printf("aic79xx_linux_queue: Unable to allocate device!\n"); printf("%s: aic79xx_linux_queue - Unable to allocate device!\n",
return (-ENOMEM); ahd_name(ahd));
return (0);
} }
if (cmd->cmd_len > MAX_CDB_LEN) if (cmd->cmd_len > MAX_CDB_LEN)
return (-EINVAL); return (-EINVAL);
...@@ -1213,6 +1217,7 @@ ahd_linux_abort(Scsi_Cmnd *cmd) ...@@ -1213,6 +1217,7 @@ ahd_linux_abort(Scsi_Cmnd *cmd)
u_int saved_scbptr; u_int saved_scbptr;
u_int active_scbptr; u_int active_scbptr;
u_int last_phase; u_int last_phase;
u_int cdb_byte;
int retval; int retval;
int paused; int paused;
int wait; int wait;
...@@ -1225,9 +1230,12 @@ ahd_linux_abort(Scsi_Cmnd *cmd) ...@@ -1225,9 +1230,12 @@ ahd_linux_abort(Scsi_Cmnd *cmd)
ahd = *(struct ahd_softc **)cmd->device->host->hostdata; ahd = *(struct ahd_softc **)cmd->device->host->hostdata;
acmd = (struct ahd_cmd *)cmd; acmd = (struct ahd_cmd *)cmd;
printf("%s:%d:%d:%d: Attempting to abort cmd %p\n", printf("%s:%d:%d:%d: Attempting to abort cmd %p:",
ahd_name(ahd), cmd->device->channel, cmd->device->id, ahd_name(ahd), cmd->device->channel, cmd->device->id,
cmd->device->lun, cmd); cmd->device->lun, cmd);
for (cdb_byte = 0; cdb_byte < cmd->cmd_len; cdb_byte++)
printf(" 0x%x", cmd->cmnd[cdb_byte]);
printf("\n");
/* /*
* In all versions of Linux, we have to work around * In all versions of Linux, we have to work around
...@@ -1560,7 +1568,7 @@ ahd_linux_dev_reset(Scsi_Cmnd *cmd) ...@@ -1560,7 +1568,7 @@ ahd_linux_dev_reset(Scsi_Cmnd *cmd)
hscb = scb->hscb; hscb = scb->hscb;
hscb->control = 0; hscb->control = 0;
hscb->scsiid = BUILD_SCSIID(ahd, cmd); hscb->scsiid = BUILD_SCSIID(ahd, cmd);
hscb->lun = cmd->lun; hscb->lun = cmd->device->lun;
hscb->cdb_len = 0; hscb->cdb_len = 0;
hscb->task_management = SIU_TASKMGMT_LUN_RESET; hscb->task_management = SIU_TASKMGMT_LUN_RESET;
scb->flags |= SCB_DEVICE_RESET|SCB_RECOVERY_SCB|SCB_ACTIVE; scb->flags |= SCB_DEVICE_RESET|SCB_RECOVERY_SCB|SCB_ACTIVE;
...@@ -2403,8 +2411,23 @@ ahd_linux_register_host(struct ahd_softc *ahd, Scsi_Host_Template *template) ...@@ -2403,8 +2411,23 @@ ahd_linux_register_host(struct ahd_softc *ahd, Scsi_Host_Template *template)
* negotiation will occur for the first command, and DV * negotiation will occur for the first command, and DV
* will comence should that first command be successful. * will comence should that first command be successful.
*/ */
for (target = 0; target < host->max_id; target++) for (target = 0; target < host->max_id; target++) {
/*
* Skip our own ID. Some Compaq/HP storage devices
* have enclosure management devices that respond to
* single bit selection (i.e. selecting ourselves).
* It is expected that either an external application
* or a modified kernel will be used to probe this
* ID if it is appropriate. To accomodate these installations,
* ahc_linux_alloc_target() will allocate for our ID if
* asked to do so.
*/
if (target == ahd->our_id)
continue;
ahd_linux_alloc_target(ahd, 0, target); ahd_linux_alloc_target(ahd, 0, target);
}
ahd_intr_enable(ahd, TRUE); ahd_intr_enable(ahd, TRUE);
ahd_linux_start_dv(ahd); ahd_linux_start_dv(ahd);
ahd_unlock(ahd, &s); ahd_unlock(ahd, &s);
...@@ -2845,16 +2868,21 @@ ahd_linux_dv_thread(void *data) ...@@ -2845,16 +2868,21 @@ ahd_linux_dv_thread(void *data)
printf("In DV Thread\n"); printf("In DV Thread\n");
#endif #endif
/*
* Complete thread creation.
*/
lock_kernel();
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,60)
/* /*
* Don't care about any signals. * Don't care about any signals.
*/ */
siginitsetinv(&current->blocked, 0); siginitsetinv(&current->blocked, 0);
/* daemonize();
* Complete thread creation. sprintf(current->comm, "ahd_dv_%d", ahd->unit);
*/ #else
lock_kernel();
daemonize("ahd_dv_%d", ahd->unit); daemonize("ahd_dv_%d", ahd->unit);
#endif
unlock_kernel(); unlock_kernel();
while (1) { while (1) {
...@@ -4268,6 +4296,7 @@ ahd_linux_run_device_queue(struct ahd_softc *ahd, struct ahd_linux_device *dev) ...@@ -4268,6 +4296,7 @@ ahd_linux_run_device_queue(struct ahd_softc *ahd, struct ahd_linux_device *dev)
*/ */
hscb->control = 0; hscb->control = 0;
hscb->scsiid = BUILD_SCSIID(ahd, cmd); hscb->scsiid = BUILD_SCSIID(ahd, cmd);
hscb->lun = cmd->device->lun;
scb->hscb->task_management = 0; scb->hscb->task_management = 0;
mask = SCB_GET_TARGET_MASK(ahd, scb); mask = SCB_GET_TARGET_MASK(ahd, scb);
...@@ -4430,17 +4459,6 @@ static struct ahd_linux_target* ...@@ -4430,17 +4459,6 @@ static struct ahd_linux_target*
ahd_linux_alloc_target(struct ahd_softc *ahd, u_int channel, u_int target) ahd_linux_alloc_target(struct ahd_softc *ahd, u_int channel, u_int target)
{ {
struct ahd_linux_target *targ; struct ahd_linux_target *targ;
u_int target_offset;
target_offset = target;
/*
* Never allow allocation of a target object for
* our own SCSIID.
*/
if (target == ahd->our_id) {
ahd->platform_data->targets[target_offset] = NULL;
return (NULL);
}
targ = malloc(sizeof(*targ), M_DEVBUF, M_NOWAIT); targ = malloc(sizeof(*targ), M_DEVBUF, M_NOWAIT);
if (targ == NULL) if (targ == NULL)
...@@ -4450,7 +4468,7 @@ ahd_linux_alloc_target(struct ahd_softc *ahd, u_int channel, u_int target) ...@@ -4450,7 +4468,7 @@ ahd_linux_alloc_target(struct ahd_softc *ahd, u_int channel, u_int target)
targ->target = target; targ->target = target;
targ->ahd = ahd; targ->ahd = ahd;
targ->flags = AHD_DV_REQUIRED; targ->flags = AHD_DV_REQUIRED;
ahd->platform_data->targets[target_offset] = targ; ahd->platform_data->targets[target] = targ;
return (targ); return (targ);
} }
...@@ -4692,6 +4710,14 @@ ahd_done(struct ahd_softc *ahd, struct scb *scb) ...@@ -4692,6 +4710,14 @@ ahd_done(struct ahd_softc *ahd, struct scb *scb)
#endif #endif
ahd_set_transaction_status(scb, CAM_UNCOR_PARITY); ahd_set_transaction_status(scb, CAM_UNCOR_PARITY);
} else if (amount_xferred < scb->io_ctx->underflow) { } else if (amount_xferred < scb->io_ctx->underflow) {
u_int i;
ahd_print_path(ahd, scb);
printf("CDB:");
for (i = 0; i < scb->io_ctx->cmd_len; i++)
printf(" 0x%x", scb->io_ctx->cmnd[i]);
printf("\n");
ahd_print_path(ahd, scb);
printf("Saw underflow (%ld of %ld bytes). " printf("Saw underflow (%ld of %ld bytes). "
"Treated as error\n", "Treated as error\n",
ahd_get_residual(scb), ahd_get_residual(scb),
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES. * POSSIBILITY OF SUCH DAMAGES.
* *
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_osm.h#108 $ * $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_osm.h#112 $
* *
*/ */
#ifndef _AIC79XX_LINUX_H_ #ifndef _AIC79XX_LINUX_H_
...@@ -286,7 +286,7 @@ ahd_scb_timer_reset(struct scb *scb, u_int usec) ...@@ -286,7 +286,7 @@ ahd_scb_timer_reset(struct scb *scb, u_int usec)
#include <linux/smp.h> #include <linux/smp.h>
#endif #endif
#define AIC79XX_DRIVER_VERSION "1.3.0" #define AIC79XX_DRIVER_VERSION "1.3.2"
/**************************** Front End Queues ********************************/ /**************************** Front End Queues ********************************/
/* /*
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES. * POSSIBILITY OF SUCH DAMAGES.
* *
* $Id: //depot/aic7xxx/aic7xxx/aic79xx_pci.c#63 $ * $Id: //depot/aic7xxx/aic7xxx/aic79xx_pci.c#65 $
* *
* $FreeBSD$ * $FreeBSD$
*/ */
...@@ -698,14 +698,14 @@ static const char *pci_status_source[] = ...@@ -698,14 +698,14 @@ static const char *pci_status_source[] =
static const char *split_status_strings[] = static const char *split_status_strings[] =
{ {
"%s: Received split response in %s.\n" "%s: Received split response in %s.\n",
"%s: Received split completion error message in %s\n", "%s: Received split completion error message in %s\n",
"%s: Receive overrun in %s\n", "%s: Receive overrun in %s\n",
"%s: Count not complete in %s\n", "%s: Count not complete in %s\n",
"%s: Split completion data bucket in %s\n", "%s: Split completion data bucket in %s\n",
"%s: Split completion address error in %s\n", "%s: Split completion address error in %s\n",
"%s: Split completion byte count error in %s\n", "%s: Split completion byte count error in %s\n",
"%s: Signaled Target-abort to early terminate a split in %s\n", "%s: Signaled Target-abort to early terminate a split in %s\n"
}; };
static const char *pci_status_strings[] = static const char *pci_status_strings[] =
...@@ -905,7 +905,7 @@ ahd_aic7902_setup(struct ahd_softc *ahd) ...@@ -905,7 +905,7 @@ ahd_aic7902_setup(struct ahd_softc *ahd)
ahd->features |= AHD_RTI|AHD_NEW_IOCELL_OPTS ahd->features |= AHD_RTI|AHD_NEW_IOCELL_OPTS
| AHD_NEW_DFCNTRL_OPTS; | AHD_NEW_DFCNTRL_OPTS;
ahd->bugs |= AHD_LQOOVERRUN_BUG|AHD_ABORT_LQI_BUG ahd->bugs |= AHD_LQOOVERRUN_BUG|AHD_ABORT_LQI_BUG
| AHD_INTCOLLISION_BUG; | AHD_INTCOLLISION_BUG|AHD_EARLY_REQ_BUG;
/* /*
* IO Cell paramter setup. * IO Cell paramter setup.
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
* String handling code courtesy of Gerard Roudier's <groudier@club-internet.fr> * String handling code courtesy of Gerard Roudier's <groudier@club-internet.fr>
* sym driver. * sym driver.
* *
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_proc.c#11 $ * $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_proc.c#12 $
*/ */
#include "aic79xx_osm.h" #include "aic79xx_osm.h"
#include "aic79xx_inline.h" #include "aic79xx_inline.h"
...@@ -311,6 +311,7 @@ ahd_linux_proc_info(char *buffer, char **start, off_t offset, ...@@ -311,6 +311,7 @@ ahd_linux_proc_info(char *buffer, char **start, off_t offset,
copy_info(&info, "Adaptec AIC79xx driver version: %s\n", copy_info(&info, "Adaptec AIC79xx driver version: %s\n",
AIC79XX_DRIVER_VERSION); AIC79XX_DRIVER_VERSION);
copy_info(&info, "%s\n", ahd->description);
ahd_controller_info(ahd, ahd_info); ahd_controller_info(ahd, ahd_info);
copy_info(&info, "%s\n\n", ahd_info); copy_info(&info, "%s\n\n", ahd_info);
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* DO NOT EDIT - This file is automatically generated * DO NOT EDIT - This file is automatically generated
* from the following source files: * from the following source files:
* *
* $Id: //depot/aic7xxx/aic7xxx/aic79xx.seq#78 $ * $Id: //depot/aic7xxx/aic7xxx/aic79xx.seq#86 $
* $Id: //depot/aic7xxx/aic7xxx/aic79xx.reg#60 $ * $Id: //depot/aic7xxx/aic7xxx/aic79xx.reg#60 $
*/ */
typedef int (ahd_reg_print_t)(u_int, u_int *, u_int); typedef int (ahd_reg_print_t)(u_int, u_int *, u_int);
...@@ -3774,5 +3774,5 @@ ahd_reg_print_t ahd_scb_disconnected_lists_print; ...@@ -3774,5 +3774,5 @@ ahd_reg_print_t ahd_scb_disconnected_lists_print;
/* Exported Labels */ /* Exported Labels */
#define LABEL_seq_isr 0x263 #define LABEL_seq_isr 0x268
#define LABEL_timer_isr 0x25f #define LABEL_timer_isr 0x264
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* DO NOT EDIT - This file is automatically generated * DO NOT EDIT - This file is automatically generated
* from the following source files: * from the following source files:
* *
* $Id: //depot/aic7xxx/aic7xxx/aic79xx.seq#78 $ * $Id: //depot/aic7xxx/aic7xxx/aic79xx.seq#86 $
* $Id: //depot/aic7xxx/aic7xxx/aic79xx.reg#60 $ * $Id: //depot/aic7xxx/aic7xxx/aic79xx.reg#60 $
*/ */
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* DO NOT EDIT - This file is automatically generated * DO NOT EDIT - This file is automatically generated
* from the following source files: * from the following source files:
* *
* $Id: //depot/aic7xxx/aic7xxx/aic79xx.seq#78 $ * $Id: //depot/aic7xxx/aic7xxx/aic79xx.seq#86 $
* $Id: //depot/aic7xxx/aic7xxx/aic79xx.reg#60 $ * $Id: //depot/aic7xxx/aic7xxx/aic79xx.reg#60 $
*/ */
static uint8_t seqprog[] = { static uint8_t seqprog[] = {
...@@ -23,16 +23,16 @@ static uint8_t seqprog[] = { ...@@ -23,16 +23,16 @@ static uint8_t seqprog[] = {
0x20, 0x4b, 0x78, 0x69, 0x20, 0x4b, 0x78, 0x69,
0xfc, 0x42, 0x24, 0x78, 0xfc, 0x42, 0x24, 0x78,
0x10, 0x40, 0x24, 0x78, 0x10, 0x40, 0x24, 0x78,
0x00, 0xe2, 0xa4, 0x5d, 0x00, 0xe2, 0xc0, 0x5d,
0x20, 0x4d, 0x28, 0x78, 0x20, 0x4d, 0x28, 0x78,
0x00, 0xe2, 0xa4, 0x5d, 0x00, 0xe2, 0xc0, 0x5d,
0x00, 0xe2, 0x34, 0x58, 0x00, 0xe2, 0x34, 0x58,
0x00, 0xe2, 0x66, 0x58, 0x00, 0xe2, 0x66, 0x58,
0x00, 0xe2, 0x76, 0x58, 0x00, 0xe2, 0x76, 0x58,
0x00, 0xe2, 0x06, 0x40, 0x00, 0xe2, 0x06, 0x40,
0x33, 0xea, 0x3a, 0x59, 0x33, 0xea, 0x3a, 0x59,
0x33, 0xea, 0x00, 0x00, 0x33, 0xea, 0x00, 0x00,
0x01, 0x52, 0x66, 0x7d, 0x01, 0x52, 0x82, 0x7d,
0x02, 0x58, 0x50, 0x31, 0x02, 0x58, 0x50, 0x31,
0xff, 0xea, 0x10, 0x0b, 0xff, 0xea, 0x10, 0x0b,
0xff, 0x93, 0x45, 0x78, 0xff, 0x93, 0x45, 0x78,
...@@ -42,18 +42,18 @@ static uint8_t seqprog[] = { ...@@ -42,18 +42,18 @@ static uint8_t seqprog[] = {
0x14, 0xea, 0x04, 0x00, 0x14, 0xea, 0x04, 0x00,
0x08, 0xa8, 0x51, 0x03, 0x08, 0xa8, 0x51, 0x03,
0x01, 0xa4, 0x4d, 0x78, 0x01, 0xa4, 0x4d, 0x78,
0x00, 0xe2, 0x44, 0x5b, 0x00, 0xe2, 0x42, 0x5b,
0x00, 0xe2, 0x34, 0x40, 0x00, 0xe2, 0x34, 0x40,
0xff, 0xea, 0xd4, 0x19, 0xff, 0xea, 0xd4, 0x19,
0x02, 0xa8, 0x84, 0x32, 0x02, 0xa8, 0x84, 0x32,
0x00, 0xea, 0x3a, 0x59, 0x00, 0xea, 0x3a, 0x59,
0x01, 0xea, 0x00, 0x30, 0x01, 0xea, 0x00, 0x30,
0x00, 0xe2, 0x98, 0x5d, 0x00, 0xe2, 0xb4, 0x5d,
0x00, 0xe2, 0x66, 0x4d, 0x00, 0xe2, 0x82, 0x4d,
0x11, 0xea, 0x3a, 0x59, 0x11, 0xea, 0x3a, 0x59,
0x11, 0xea, 0x00, 0x00, 0x11, 0xea, 0x00, 0x00,
0x00, 0xe2, 0x98, 0x5d, 0x00, 0xe2, 0xb4, 0x5d,
0x00, 0xe2, 0x66, 0x4d, 0x00, 0xe2, 0x82, 0x4d,
0x33, 0xea, 0x3a, 0x59, 0x33, 0xea, 0x3a, 0x59,
0x33, 0xea, 0x00, 0x00, 0x33, 0xea, 0x00, 0x00,
0x00, 0xe2, 0x3a, 0x43, 0x00, 0xe2, 0x3a, 0x43,
...@@ -72,14 +72,14 @@ static uint8_t seqprog[] = { ...@@ -72,14 +72,14 @@ static uint8_t seqprog[] = {
0x10, 0x16, 0x2c, 0x00, 0x10, 0x16, 0x2c, 0x00,
0x18, 0xad, 0xee, 0x78, 0x18, 0xad, 0xee, 0x78,
0x04, 0xad, 0xbc, 0x68, 0x04, 0xad, 0xbc, 0x68,
0x80, 0xad, 0x66, 0x7d, 0x80, 0xad, 0x82, 0x7d,
0x10, 0xad, 0x8a, 0x78, 0x10, 0xad, 0x8a, 0x78,
0xe7, 0xad, 0x5a, 0x0d, 0xe7, 0xad, 0x5a, 0x0d,
0xe7, 0xad, 0x5a, 0x09, 0xe7, 0xad, 0x5a, 0x09,
0x00, 0xe2, 0x98, 0x58, 0x00, 0xe2, 0x98, 0x58,
0xff, 0xea, 0x56, 0x02, 0xff, 0xea, 0x56, 0x02,
0x04, 0x7c, 0x78, 0x32, 0x04, 0x7c, 0x78, 0x32,
0x20, 0x16, 0x66, 0x7d, 0x20, 0x16, 0x82, 0x7d,
0x04, 0x38, 0x79, 0x32, 0x04, 0x38, 0x79, 0x32,
0x80, 0x37, 0x6f, 0x16, 0x80, 0x37, 0x6f, 0x16,
0xff, 0x2d, 0xa7, 0x60, 0xff, 0x2d, 0xa7, 0x60,
...@@ -92,7 +92,7 @@ static uint8_t seqprog[] = { ...@@ -92,7 +92,7 @@ static uint8_t seqprog[] = {
0x01, 0x4c, 0xc1, 0x31, 0x01, 0x4c, 0xc1, 0x31,
0x00, 0x50, 0xd5, 0x19, 0x00, 0x50, 0xd5, 0x19,
0x00, 0xe2, 0xb6, 0x48, 0x00, 0xe2, 0xb6, 0x48,
0x80, 0x18, 0x66, 0x7d, 0x80, 0x18, 0x82, 0x7d,
0x02, 0x4a, 0x1d, 0x30, 0x02, 0x4a, 0x1d, 0x30,
0x10, 0xea, 0x18, 0x00, 0x10, 0xea, 0x18, 0x00,
0x60, 0x18, 0x30, 0x00, 0x60, 0x18, 0x30, 0x00,
...@@ -100,7 +100,7 @@ static uint8_t seqprog[] = { ...@@ -100,7 +100,7 @@ static uint8_t seqprog[] = {
0x02, 0xea, 0x02, 0x00, 0x02, 0xea, 0x02, 0x00,
0xff, 0xea, 0xa0, 0x0a, 0xff, 0xea, 0xa0, 0x0a,
0x80, 0x18, 0x30, 0x04, 0x80, 0x18, 0x30, 0x04,
0x40, 0xad, 0x66, 0x7d, 0x40, 0xad, 0x82, 0x7d,
0xe7, 0xad, 0x5a, 0x09, 0xe7, 0xad, 0x5a, 0x09,
0x02, 0xa8, 0x40, 0x31, 0x02, 0xa8, 0x40, 0x31,
0xff, 0xea, 0xc0, 0x09, 0xff, 0xea, 0xc0, 0x09,
...@@ -128,7 +128,7 @@ static uint8_t seqprog[] = { ...@@ -128,7 +128,7 @@ static uint8_t seqprog[] = {
0x04, 0x47, 0xf3, 0x68, 0x04, 0x47, 0xf3, 0x68,
0x40, 0x16, 0x1e, 0x69, 0x40, 0x16, 0x1e, 0x69,
0xff, 0x2d, 0x23, 0x61, 0xff, 0x2d, 0x23, 0x61,
0xff, 0x29, 0x67, 0x75, 0xff, 0x29, 0x83, 0x75,
0x01, 0x37, 0xc1, 0x31, 0x01, 0x37, 0xc1, 0x31,
0x02, 0x28, 0x55, 0x32, 0x02, 0x28, 0x55, 0x32,
0x01, 0xea, 0x5a, 0x01, 0x01, 0xea, 0x5a, 0x01,
...@@ -236,8 +236,8 @@ static uint8_t seqprog[] = { ...@@ -236,8 +236,8 @@ static uint8_t seqprog[] = {
0xff, 0xea, 0x46, 0x02, 0xff, 0xea, 0x46, 0x02,
0x02, 0x5c, 0x50, 0x31, 0x02, 0x5c, 0x50, 0x31,
0x40, 0xea, 0x96, 0x00, 0x40, 0xea, 0x96, 0x00,
0x02, 0x56, 0xac, 0x6d, 0x02, 0x56, 0xc8, 0x6d,
0x01, 0x55, 0xac, 0x6d, 0x01, 0x55, 0xc8, 0x6d,
0x10, 0xa8, 0xd5, 0x79, 0x10, 0xa8, 0xd5, 0x79,
0x10, 0x40, 0xde, 0x69, 0x10, 0x40, 0xde, 0x69,
0x01, 0x56, 0xde, 0x79, 0x01, 0x56, 0xde, 0x79,
...@@ -253,9 +253,9 @@ static uint8_t seqprog[] = { ...@@ -253,9 +253,9 @@ static uint8_t seqprog[] = {
0x40, 0xea, 0x66, 0x02, 0x40, 0xea, 0x66, 0x02,
0x08, 0x3c, 0x78, 0x00, 0x08, 0x3c, 0x78, 0x00,
0x80, 0xea, 0x62, 0x02, 0x80, 0xea, 0x62, 0x02,
0x00, 0xe2, 0xa4, 0x5b, 0x00, 0xe2, 0xa2, 0x5b,
0x01, 0x36, 0xc1, 0x31, 0x01, 0x36, 0xc1, 0x31,
0x9f, 0xe0, 0x38, 0x7c, 0x9f, 0xe0, 0x44, 0x7c,
0x80, 0xe0, 0x02, 0x72, 0x80, 0xe0, 0x02, 0x72,
0xa0, 0xe0, 0x3a, 0x72, 0xa0, 0xe0, 0x3a, 0x72,
0xc0, 0xe0, 0x30, 0x72, 0xc0, 0xe0, 0x30, 0x72,
...@@ -299,31 +299,31 @@ static uint8_t seqprog[] = { ...@@ -299,31 +299,31 @@ static uint8_t seqprog[] = {
0xbf, 0xe2, 0xc4, 0x09, 0xbf, 0xe2, 0xc4, 0x09,
0x20, 0xa8, 0x5b, 0x7a, 0x20, 0xa8, 0x5b, 0x7a,
0x01, 0xe2, 0x88, 0x30, 0x01, 0xe2, 0x88, 0x30,
0x00, 0xe2, 0xa4, 0x5b, 0x00, 0xe2, 0xa2, 0x5b,
0xa0, 0x36, 0x63, 0x62, 0xa0, 0x36, 0x63, 0x62,
0x23, 0xa8, 0x89, 0x08, 0x23, 0xa8, 0x89, 0x08,
0x00, 0xe2, 0xa4, 0x5b, 0x00, 0xe2, 0xa2, 0x5b,
0xa0, 0x36, 0x63, 0x62, 0xa0, 0x36, 0x63, 0x62,
0x00, 0xa8, 0x5a, 0x42, 0x00, 0xa8, 0x5a, 0x42,
0xff, 0xe2, 0x5a, 0x62, 0xff, 0xe2, 0x5a, 0x62,
0x00, 0xe2, 0x7a, 0x42, 0x00, 0xe2, 0x7a, 0x42,
0x40, 0xea, 0x98, 0x00, 0x40, 0xea, 0x98, 0x00,
0x01, 0xe2, 0x88, 0x30, 0x01, 0xe2, 0x88, 0x30,
0x00, 0xe2, 0xa4, 0x5b, 0x00, 0xe2, 0xa2, 0x5b,
0xa0, 0x36, 0x39, 0x72, 0xa0, 0x36, 0x39, 0x72,
0x40, 0xea, 0x98, 0x00, 0x40, 0xea, 0x98, 0x00,
0x01, 0x31, 0x89, 0x32, 0x01, 0x31, 0x89, 0x32,
0x08, 0xea, 0x62, 0x02, 0x08, 0xea, 0x62, 0x02,
0x00, 0xe2, 0xee, 0x41, 0x00, 0xe2, 0xee, 0x41,
0xe0, 0xea, 0xb4, 0x5b, 0xe0, 0xea, 0xbe, 0x5b,
0x80, 0xe0, 0xb2, 0x6a, 0x80, 0xe0, 0xb2, 0x6a,
0x04, 0xe0, 0x52, 0x73, 0x04, 0xe0, 0x50, 0x73,
0x02, 0xe0, 0x82, 0x73, 0x02, 0xe0, 0x80, 0x73,
0x00, 0xea, 0x10, 0x73, 0x00, 0xea, 0x10, 0x73,
0x03, 0xe0, 0x92, 0x73, 0x03, 0xe0, 0x90, 0x73,
0x23, 0xe0, 0x8c, 0x72, 0x23, 0xe0, 0x8c, 0x72,
0x08, 0xe0, 0xae, 0x72, 0x08, 0xe0, 0xae, 0x72,
0x00, 0xe2, 0xa4, 0x5b, 0x00, 0xe2, 0xa2, 0x5b,
0x07, 0xea, 0x46, 0x59, 0x07, 0xea, 0x46, 0x59,
0x07, 0xea, 0x04, 0x00, 0x07, 0xea, 0x04, 0x00,
0x08, 0x42, 0xef, 0x71, 0x08, 0x42, 0xef, 0x71,
...@@ -340,7 +340,7 @@ static uint8_t seqprog[] = { ...@@ -340,7 +340,7 @@ static uint8_t seqprog[] = {
0x00, 0x30, 0x3b, 0x59, 0x00, 0x30, 0x3b, 0x59,
0x01, 0x30, 0x01, 0x30, 0x01, 0x30, 0x01, 0x30,
0x01, 0xe0, 0xac, 0x7a, 0x01, 0xe0, 0xac, 0x7a,
0xa0, 0xea, 0xaa, 0x5b, 0xa0, 0xea, 0xb4, 0x5b,
0x01, 0xa0, 0xac, 0x62, 0x01, 0xa0, 0xac, 0x62,
0x01, 0x84, 0xa5, 0x7a, 0x01, 0x84, 0xa5, 0x7a,
0x01, 0xa7, 0xae, 0x7a, 0x01, 0xa7, 0xae, 0x7a,
...@@ -348,7 +348,7 @@ static uint8_t seqprog[] = { ...@@ -348,7 +348,7 @@ static uint8_t seqprog[] = {
0x03, 0xea, 0x46, 0x59, 0x03, 0xea, 0x46, 0x59,
0x03, 0xea, 0x04, 0x00, 0x03, 0xea, 0x04, 0x00,
0x00, 0xe2, 0xae, 0x42, 0x00, 0xe2, 0xae, 0x42,
0x07, 0xea, 0xbc, 0x5b, 0x07, 0xea, 0xc6, 0x5b,
0x01, 0x44, 0xd4, 0x31, 0x01, 0x44, 0xd4, 0x31,
0x00, 0xe2, 0xee, 0x41, 0x00, 0xe2, 0xee, 0x41,
0x3f, 0xe0, 0x6a, 0x0a, 0x3f, 0xe0, 0x6a, 0x0a,
...@@ -367,13 +367,13 @@ static uint8_t seqprog[] = { ...@@ -367,13 +367,13 @@ static uint8_t seqprog[] = {
0x00, 0xe2, 0xf0, 0x42, 0x00, 0xe2, 0xf0, 0x42,
0x80, 0x33, 0x67, 0x02, 0x80, 0x33, 0x67, 0x02,
0x01, 0x44, 0xd4, 0x31, 0x01, 0x44, 0xd4, 0x31,
0x00, 0xe2, 0xa4, 0x5b, 0x00, 0xe2, 0xa2, 0x5b,
0x01, 0x33, 0x67, 0x02, 0x01, 0x33, 0x67, 0x02,
0xe0, 0x36, 0x0b, 0x63, 0xe0, 0x36, 0x0b, 0x63,
0x02, 0x33, 0x67, 0x02, 0x02, 0x33, 0x67, 0x02,
0x20, 0x46, 0x04, 0x63, 0x20, 0x46, 0x04, 0x63,
0xff, 0xea, 0x52, 0x09, 0xff, 0xea, 0x52, 0x09,
0xa8, 0xea, 0xaa, 0x5b, 0xa8, 0xea, 0xb4, 0x5b,
0x04, 0xa8, 0xeb, 0x7a, 0x04, 0xa8, 0xeb, 0x7a,
0x01, 0x34, 0xc1, 0x31, 0x01, 0x34, 0xc1, 0x31,
0x00, 0xa9, 0xeb, 0x62, 0x00, 0xa9, 0xeb, 0x62,
...@@ -390,7 +390,7 @@ static uint8_t seqprog[] = { ...@@ -390,7 +390,7 @@ static uint8_t seqprog[] = {
0x02, 0xa8, 0x90, 0x32, 0x02, 0xa8, 0x90, 0x32,
0x00, 0xe2, 0x60, 0x59, 0x00, 0xe2, 0x60, 0x59,
0x10, 0xa8, 0xaf, 0x7a, 0x10, 0xa8, 0xaf, 0x7a,
0xff, 0xea, 0xbc, 0x5b, 0xff, 0xea, 0xc6, 0x5b,
0x00, 0xe2, 0xae, 0x42, 0x00, 0xe2, 0xae, 0x42,
0x04, 0xea, 0x46, 0x59, 0x04, 0xea, 0x46, 0x59,
0x04, 0xea, 0x04, 0x00, 0x04, 0xea, 0x04, 0x00,
...@@ -407,7 +407,7 @@ static uint8_t seqprog[] = { ...@@ -407,7 +407,7 @@ static uint8_t seqprog[] = {
0x0a, 0xea, 0x46, 0x59, 0x0a, 0xea, 0x46, 0x59,
0x0a, 0xea, 0x04, 0x00, 0x0a, 0xea, 0x04, 0x00,
0x00, 0xe2, 0x3a, 0x5b, 0x00, 0xe2, 0x3a, 0x5b,
0x00, 0xe2, 0x6e, 0x43, 0x00, 0xe2, 0x6c, 0x43,
0x50, 0x4b, 0x28, 0x6b, 0x50, 0x4b, 0x28, 0x6b,
0xbf, 0x3a, 0x74, 0x08, 0xbf, 0x3a, 0x74, 0x08,
0x01, 0xe0, 0xf8, 0x31, 0x01, 0xe0, 0xf8, 0x31,
...@@ -419,21 +419,20 @@ static uint8_t seqprog[] = { ...@@ -419,21 +419,20 @@ static uint8_t seqprog[] = {
0x33, 0xea, 0x3a, 0x59, 0x33, 0xea, 0x3a, 0x59,
0x33, 0xea, 0x00, 0x00, 0x33, 0xea, 0x00, 0x00,
0x02, 0x42, 0x51, 0x31, 0x02, 0x42, 0x51, 0x31,
0x10, 0xa8, 0x51, 0x03, 0xff, 0x88, 0x47, 0x6b,
0xff, 0x88, 0x49, 0x6b, 0x01, 0xa4, 0x43, 0x6b,
0x01, 0xa4, 0x45, 0x6b, 0x02, 0xa4, 0x4b, 0x6b,
0x02, 0xa4, 0x4d, 0x6b, 0x01, 0x84, 0x4b, 0x7b,
0x01, 0x84, 0x4d, 0x7b,
0x02, 0x28, 0x19, 0x33, 0x02, 0x28, 0x19, 0x33,
0x02, 0xa8, 0x50, 0x36, 0x02, 0xa8, 0x50, 0x36,
0xff, 0x88, 0x4d, 0x73, 0xff, 0x88, 0x4b, 0x73,
0x00, 0xe2, 0x24, 0x5b, 0x00, 0xe2, 0x24, 0x5b,
0x02, 0x2c, 0x19, 0x33, 0x02, 0x2c, 0x19, 0x33,
0x02, 0xa8, 0x58, 0x32, 0x02, 0xa8, 0x58, 0x32,
0x04, 0xa4, 0x49, 0x07, 0x04, 0xa4, 0x49, 0x07,
0xc0, 0x33, 0xa7, 0x6a, 0xc0, 0x33, 0xa7, 0x6a,
0x04, 0xa8, 0x51, 0x03, 0x04, 0xa8, 0x51, 0x03,
0x20, 0xa8, 0x6f, 0x6b, 0x20, 0xa8, 0x6d, 0x6b,
0x02, 0xa8, 0x40, 0x31, 0x02, 0xa8, 0x40, 0x31,
0xc0, 0x34, 0xc1, 0x09, 0xc0, 0x34, 0xc1, 0x09,
0x00, 0x35, 0x51, 0x01, 0x00, 0x35, 0x51, 0x01,
...@@ -448,23 +447,23 @@ static uint8_t seqprog[] = { ...@@ -448,23 +447,23 @@ static uint8_t seqprog[] = {
0xf7, 0x57, 0xae, 0x08, 0xf7, 0x57, 0xae, 0x08,
0x08, 0xea, 0x98, 0x00, 0x08, 0xea, 0x98, 0x00,
0x01, 0x44, 0xd4, 0x31, 0x01, 0x44, 0xd4, 0x31,
0xee, 0x00, 0x78, 0x6b, 0xee, 0x00, 0x76, 0x6b,
0x02, 0xea, 0xb4, 0x00, 0x02, 0xea, 0xb4, 0x00,
0x00, 0xe2, 0xa0, 0x5b, 0x00, 0xe2, 0x9e, 0x5b,
0x09, 0x4c, 0x7a, 0x7b, 0x09, 0x4c, 0x78, 0x7b,
0x08, 0x4c, 0x06, 0x68, 0x08, 0x4c, 0x06, 0x68,
0x0b, 0xea, 0x46, 0x59, 0x0b, 0xea, 0x46, 0x59,
0x0b, 0xea, 0x04, 0x00, 0x0b, 0xea, 0x04, 0x00,
0x01, 0x44, 0xd4, 0x31, 0x01, 0x44, 0xd4, 0x31,
0x20, 0x33, 0xef, 0x79, 0x20, 0x33, 0xef, 0x79,
0x00, 0xe2, 0x8a, 0x5b, 0x00, 0xe2, 0x88, 0x5b,
0x00, 0xe2, 0xee, 0x41, 0x00, 0xe2, 0xee, 0x41,
0x01, 0x84, 0x8f, 0x7b, 0x01, 0x84, 0x8d, 0x7b,
0x01, 0xa4, 0x49, 0x07, 0x01, 0xa4, 0x49, 0x07,
0x08, 0x60, 0x30, 0x33, 0x08, 0x60, 0x30, 0x33,
0x08, 0x80, 0x41, 0x37, 0x08, 0x80, 0x41, 0x37,
0xdf, 0x33, 0x67, 0x0a, 0xdf, 0x33, 0x67, 0x0a,
0xee, 0x00, 0x9c, 0x6b, 0xee, 0x00, 0x9a, 0x6b,
0x05, 0xea, 0xb4, 0x00, 0x05, 0xea, 0xb4, 0x00,
0x33, 0xea, 0x3a, 0x59, 0x33, 0xea, 0x3a, 0x59,
0x33, 0xea, 0x00, 0x00, 0x33, 0xea, 0x00, 0x00,
...@@ -472,12 +471,18 @@ static uint8_t seqprog[] = { ...@@ -472,12 +471,18 @@ static uint8_t seqprog[] = {
0x00, 0xe2, 0xae, 0x42, 0x00, 0xe2, 0xae, 0x42,
0x01, 0xea, 0x6c, 0x02, 0x01, 0xea, 0x6c, 0x02,
0xc0, 0xea, 0x66, 0x06, 0xc0, 0xea, 0x66, 0x06,
0xff, 0x42, 0xa4, 0x7b, 0xff, 0x42, 0xae, 0x6b,
0x04, 0x4c, 0xa4, 0x6b, 0x01, 0x41, 0xa2, 0x6b,
0x02, 0x41, 0xa2, 0x7b,
0xff, 0x42, 0xae, 0x6b,
0x01, 0x41, 0xa2, 0x6b,
0x02, 0x41, 0xa2, 0x7b,
0xff, 0x42, 0xae, 0x7b,
0x04, 0x4c, 0xa2, 0x6b,
0xe0, 0x41, 0x6c, 0x0e, 0xe0, 0x41, 0x6c, 0x0e,
0x01, 0x44, 0xd4, 0x31, 0x01, 0x44, 0xd4, 0x31,
0xff, 0x42, 0xac, 0x7b, 0xff, 0x42, 0xb6, 0x7b,
0x04, 0x4c, 0xac, 0x6b, 0x04, 0x4c, 0xb6, 0x6b,
0xe0, 0x41, 0x6c, 0x0a, 0xe0, 0x41, 0x6c, 0x0a,
0xe0, 0x36, 0xef, 0x61, 0xe0, 0x36, 0xef, 0x61,
0xff, 0xea, 0xca, 0x09, 0xff, 0xea, 0xca, 0x09,
...@@ -486,28 +491,29 @@ static uint8_t seqprog[] = { ...@@ -486,28 +491,29 @@ static uint8_t seqprog[] = {
0x01, 0x44, 0xd4, 0x35, 0x01, 0x44, 0xd4, 0x35,
0x10, 0xea, 0x80, 0x00, 0x10, 0xea, 0x80, 0x00,
0x01, 0xe2, 0x62, 0x36, 0x01, 0xe2, 0x62, 0x36,
0x04, 0xa6, 0xc4, 0x7b, 0x04, 0xa6, 0xce, 0x7b,
0xff, 0xea, 0x5a, 0x09, 0xff, 0xea, 0x5a, 0x09,
0xff, 0xea, 0x4c, 0x0d, 0xff, 0xea, 0x4c, 0x0d,
0x01, 0xa6, 0xe2, 0x6b, 0x01, 0xa6, 0xec, 0x6b,
0x10, 0xad, 0x66, 0x7d, 0x10, 0xad, 0x82, 0x7d,
0x80, 0xad, 0xda, 0x6b, 0x80, 0xad, 0xe4, 0x6b,
0x08, 0xad, 0x66, 0x6d, 0x08, 0xad, 0x82, 0x6d,
0x04, 0x84, 0xf9, 0x30, 0x04, 0x84, 0xf9, 0x30,
0x00, 0xea, 0x08, 0x81, 0x00, 0xea, 0x08, 0x81,
0xff, 0xea, 0xd4, 0x09, 0xff, 0xea, 0xd4, 0x09,
0x02, 0x84, 0xf9, 0x88, 0x02, 0x84, 0xf9, 0x88,
0x1d, 0xea, 0x5a, 0x01, 0x0d, 0xea, 0x5a, 0x01,
0x04, 0xa6, 0x4c, 0x05, 0x04, 0xa6, 0x4c, 0x05,
0x04, 0xa6, 0x66, 0x7d, 0x04, 0xa6, 0x82, 0x7d,
0xff, 0xea, 0x5a, 0x09, 0xff, 0xea, 0x5a, 0x09,
0x03, 0x84, 0x59, 0x89, 0x03, 0x84, 0x59, 0x89,
0x03, 0xea, 0x4c, 0x01, 0x03, 0xea, 0x4c, 0x01,
0x80, 0x1a, 0x66, 0x7d, 0x80, 0x1a, 0x82, 0x7d,
0x08, 0x19, 0x82, 0x7d,
0x08, 0xb0, 0xe0, 0x30, 0x08, 0xb0, 0xe0, 0x30,
0x04, 0xb0, 0xe0, 0x30, 0x04, 0xb0, 0xe0, 0x30,
0x03, 0xb0, 0xf0, 0x30, 0x03, 0xb0, 0xf0, 0x30,
0x01, 0x78, 0xee, 0x7b, 0x01, 0x78, 0xfa, 0x7b,
0x01, 0xa7, 0x4e, 0x11, 0x01, 0xa7, 0x4e, 0x11,
0x01, 0xb0, 0x06, 0x33, 0x01, 0xb0, 0x06, 0x33,
0x7f, 0x83, 0xe9, 0x08, 0x7f, 0x83, 0xe9, 0x08,
...@@ -518,98 +524,97 @@ static uint8_t seqprog[] = { ...@@ -518,98 +524,97 @@ static uint8_t seqprog[] = {
0x00, 0x86, 0x0d, 0x23, 0x00, 0x86, 0x0d, 0x23,
0x00, 0x87, 0x0f, 0x23, 0x00, 0x87, 0x0f, 0x23,
0x01, 0x84, 0xc5, 0x31, 0x01, 0x84, 0xc5, 0x31,
0x01, 0xa7, 0x04, 0x7c, 0x01, 0xa7, 0x10, 0x7c,
0x04, 0xe2, 0xc4, 0x01, 0x04, 0xe2, 0xc4, 0x01,
0x80, 0x83, 0x0b, 0x7c, 0x80, 0x83, 0x17, 0x7c,
0x02, 0xe2, 0xc4, 0x01, 0x02, 0xe2, 0xc4, 0x01,
0xff, 0xea, 0x4c, 0x09, 0xff, 0xea, 0x4c, 0x09,
0x01, 0xe2, 0x36, 0x30, 0x01, 0xe2, 0x36, 0x30,
0xc8, 0x19, 0x32, 0x00, 0xc8, 0x19, 0x32, 0x00,
0x88, 0x19, 0x32, 0x00, 0x88, 0x19, 0x32, 0x00,
0x01, 0xac, 0xd4, 0x99, 0x01, 0xac, 0xd4, 0x99,
0x00, 0xe2, 0x66, 0x55, 0x00, 0xe2, 0x82, 0x55,
0xfe, 0xa6, 0x4c, 0x0d, 0xfe, 0xa6, 0x4c, 0x0d,
0x0b, 0x98, 0xe1, 0x30, 0x0b, 0x98, 0xe1, 0x30,
0x01, 0xa0, 0x4f, 0x09, 0x01, 0xa0, 0x4f, 0x09,
0xfd, 0xa4, 0x49, 0x09, 0xfd, 0xa4, 0x49, 0x09,
0x80, 0xa3, 0x21, 0x7c, 0x80, 0xa3, 0x2d, 0x7c,
0x02, 0xa4, 0x48, 0x01, 0x02, 0xa4, 0x48, 0x01,
0x01, 0xa7, 0x24, 0x7c, 0x01, 0xa7, 0x30, 0x7c,
0x04, 0xa4, 0x48, 0x01, 0x04, 0xa4, 0x48, 0x01,
0x01, 0xa4, 0x36, 0x30, 0x01, 0xa4, 0x36, 0x30,
0xa8, 0xea, 0x32, 0x00, 0xa8, 0xea, 0x32, 0x00,
0xfd, 0xa4, 0x49, 0x0b, 0xfd, 0xa4, 0x49, 0x0b,
0x05, 0xa3, 0x07, 0x33, 0x05, 0xa3, 0x07, 0x33,
0x80, 0x83, 0x31, 0x6c, 0x80, 0x83, 0x3d, 0x6c,
0x02, 0xea, 0x4c, 0x05, 0x02, 0xea, 0x4c, 0x05,
0xff, 0xea, 0x4c, 0x0d, 0xff, 0xea, 0x4c, 0x0d,
0x00, 0xe2, 0x32, 0x59, 0x00, 0xe2, 0x32, 0x59,
0x02, 0xa6, 0xc6, 0x6b, 0x02, 0xa6, 0xd0, 0x6b,
0x80, 0xf9, 0xf2, 0x05, 0x80, 0xf9, 0xf2, 0x05,
0xc0, 0x33, 0x3f, 0x7c, 0xc0, 0x33, 0x4b, 0x7c,
0x03, 0xea, 0x46, 0x59, 0x03, 0xea, 0x46, 0x59,
0x03, 0xea, 0x04, 0x00, 0x03, 0xea, 0x04, 0x00,
0x20, 0x33, 0x63, 0x7c, 0x20, 0x33, 0x6f, 0x7c,
0x01, 0x84, 0x49, 0x6c, 0x01, 0x84, 0x55, 0x6c,
0x06, 0xea, 0x46, 0x59, 0x06, 0xea, 0x46, 0x59,
0x06, 0xea, 0x04, 0x00, 0x06, 0xea, 0x04, 0x00,
0x00, 0xe2, 0x66, 0x44, 0x00, 0xe2, 0x72, 0x44,
0x01, 0x00, 0x60, 0x32, 0x01, 0x00, 0x60, 0x32,
0xee, 0x00, 0x52, 0x6c, 0xee, 0x00, 0x5e, 0x6c,
0x05, 0xea, 0xb4, 0x00, 0x05, 0xea, 0xb4, 0x00,
0x33, 0xea, 0x3a, 0x59, 0x33, 0xea, 0x3a, 0x59,
0x33, 0xea, 0x00, 0x00, 0x33, 0xea, 0x00, 0x00,
0x80, 0x3d, 0x7a, 0x00, 0x80, 0x3d, 0x7a, 0x00,
0xfc, 0x42, 0x54, 0x7c, 0xfc, 0x42, 0x60, 0x7c,
0x7f, 0x3d, 0x7a, 0x08, 0x7f, 0x3d, 0x7a, 0x08,
0x00, 0x30, 0x3b, 0x59, 0x00, 0x30, 0x3b, 0x59,
0x01, 0x30, 0x01, 0x30, 0x01, 0x30, 0x01, 0x30,
0x09, 0xea, 0x46, 0x59, 0x09, 0xea, 0x46, 0x59,
0x09, 0xea, 0x04, 0x00, 0x09, 0xea, 0x04, 0x00,
0x00, 0xe2, 0xee, 0x41, 0x00, 0xe2, 0xee, 0x41,
0x01, 0xa4, 0x49, 0x6c, 0x01, 0xa4, 0x55, 0x6c,
0x00, 0xe2, 0x16, 0x5c, 0x00, 0xe2, 0x22, 0x5c,
0x20, 0x33, 0x67, 0x02, 0x20, 0x33, 0x67, 0x02,
0x01, 0x00, 0x60, 0x32, 0x01, 0x00, 0x60, 0x32,
0x02, 0xa6, 0x6e, 0x7c, 0x02, 0xa6, 0x7a, 0x7c,
0x00, 0xe2, 0x32, 0x5c, 0x00, 0xe2, 0x3e, 0x5c,
0x00, 0xe2, 0x66, 0x58, 0x00, 0xe2, 0x66, 0x58,
0x00, 0xe2, 0x76, 0x58, 0x00, 0xe2, 0x76, 0x58,
0x00, 0xe2, 0x30, 0x58, 0x00, 0xe2, 0x30, 0x58,
0x00, 0x30, 0x3b, 0x59, 0x00, 0x30, 0x3b, 0x59,
0x01, 0x30, 0x01, 0x30, 0x01, 0x30, 0x01, 0x30,
0x20, 0x19, 0x6e, 0x6c, 0x20, 0x19, 0x7a, 0x6c,
0x00, 0xe2, 0x96, 0x5c, 0x00, 0xe2, 0xaa, 0x5c,
0x04, 0x19, 0x88, 0x6c, 0x04, 0x19, 0x94, 0x6c,
0x02, 0x19, 0x32, 0x00, 0x02, 0x19, 0x32, 0x00,
0x01, 0x84, 0x89, 0x7c, 0x01, 0x84, 0x95, 0x7c,
0x01, 0x1b, 0x82, 0x7c, 0x01, 0x1b, 0x8e, 0x7c,
0x01, 0x1a, 0x88, 0x6c, 0x01, 0x1a, 0x94, 0x6c,
0x00, 0xe2, 0x38, 0x44, 0x00, 0xe2, 0x44, 0x44,
0x80, 0x4b, 0x8e, 0x6c, 0x80, 0x4b, 0x9a, 0x6c,
0x01, 0x4c, 0x8a, 0x7c, 0x01, 0x4c, 0x96, 0x7c,
0x03, 0x42, 0x38, 0x6c, 0x03, 0x42, 0x44, 0x6c,
0x00, 0xe2, 0xc0, 0x5b, 0x00, 0xe2, 0xca, 0x5b,
0x80, 0xf9, 0xf2, 0x01, 0x80, 0xf9, 0xf2, 0x01,
0x04, 0x33, 0xef, 0x79, 0x04, 0x33, 0xef, 0x79,
0x00, 0xe2, 0xee, 0x41, 0x00, 0xe2, 0xee, 0x41,
0x02, 0x1b, 0x9e, 0x7c, 0x08, 0x5d, 0xb2, 0x6c,
0x08, 0x5d, 0x9c, 0x7c,
0x03, 0x68, 0x00, 0x37,
0x01, 0x84, 0x09, 0x07,
0x08, 0x5d, 0xa8, 0x6c,
0x00, 0xe2, 0x66, 0x58, 0x00, 0xe2, 0x66, 0x58,
0x00, 0x30, 0x3b, 0x59, 0x00, 0x30, 0x3b, 0x59,
0x01, 0x30, 0x01, 0x30, 0x01, 0x30, 0x01, 0x30,
0x00, 0xe2, 0x96, 0x44, 0x02, 0x1b, 0xa2, 0x7c,
0x80, 0x1b, 0xb2, 0x7c, 0x08, 0x5d, 0xb0, 0x7c,
0x80, 0x84, 0xb3, 0x6c, 0x03, 0x68, 0x00, 0x37,
0x01, 0x84, 0x09, 0x07,
0x80, 0x1b, 0xbc, 0x7c,
0x80, 0x84, 0xbd, 0x6c,
0xff, 0x85, 0x0b, 0x1b, 0xff, 0x85, 0x0b, 0x1b,
0xff, 0x86, 0x0d, 0x23, 0xff, 0x86, 0x0d, 0x23,
0xff, 0x87, 0x0f, 0x23, 0xff, 0x87, 0x0f, 0x23,
0xf8, 0x1b, 0x08, 0x0b, 0xf8, 0x1b, 0x08, 0x0b,
0xff, 0xea, 0x4e, 0x09, 0xff, 0xea, 0x4e, 0x09,
0x04, 0x1b, 0xba, 0x7c, 0x04, 0x1b, 0xc4, 0x7c,
0x01, 0xa7, 0x4e, 0x01, 0x01, 0xa7, 0x4e, 0x01,
0xff, 0xea, 0x06, 0x0b, 0xff, 0xea, 0x06, 0x0b,
0x03, 0x68, 0x00, 0x37, 0x03, 0x68, 0x00, 0x37,
...@@ -617,74 +622,83 @@ static uint8_t seqprog[] = { ...@@ -617,74 +622,83 @@ static uint8_t seqprog[] = {
0x10, 0xea, 0x18, 0x00, 0x10, 0xea, 0x18, 0x00,
0xf9, 0xd9, 0xb2, 0x0d, 0xf9, 0xd9, 0xb2, 0x0d,
0x01, 0xd9, 0xb2, 0x05, 0x01, 0xd9, 0xb2, 0x05,
0xff, 0xea, 0xd4, 0x09, 0x01, 0x52, 0x48, 0x31,
0x10, 0x5b, 0xde, 0x6c, 0x20, 0xa4, 0xe8, 0x7c,
0x08, 0x5b, 0xe6, 0x6c, 0x20, 0x5b, 0xe8, 0x7c,
0x20, 0x5b, 0xd4, 0x6c, 0x80, 0xf9, 0xf6, 0x7c,
0x02, 0x5b, 0xfa, 0x6d, 0x11, 0x00, 0x00, 0x10,
0x04, 0x19, 0xe2, 0x7c,
0xdf, 0x19, 0x32, 0x08,
0x01, 0x4c, 0xde, 0x7c,
0x20, 0x19, 0x32, 0x00,
0x11, 0x00, 0x00, 0x10,
0x02, 0xea, 0xb4, 0x00,
0x01, 0xd9, 0xb2, 0x05,
0x10, 0x5b, 0xfa, 0x6c,
0x08, 0x5b, 0x02, 0x6d,
0x20, 0x5b, 0xf4, 0x6c,
0x02, 0x5b, 0x16, 0x6e,
0x0e, 0xea, 0x46, 0x59, 0x0e, 0xea, 0x46, 0x59,
0x0e, 0xea, 0x04, 0x00, 0x0e, 0xea, 0x04, 0x00,
0x08, 0x19, 0xda, 0x7c, 0x80, 0xf9, 0xe4, 0x6c,
0xdf, 0x5c, 0xb8, 0x08, 0xdf, 0x5c, 0xb8, 0x08,
0x01, 0xd9, 0xb2, 0x05, 0x01, 0xd9, 0xb2, 0x05,
0x02, 0xea, 0xb4, 0x00, 0x01, 0xa4, 0xdf, 0x6d,
0x01, 0xd9, 0xb2, 0x05, 0x00, 0xe2, 0x22, 0x5c,
0x01, 0xa4, 0xc3, 0x6d, 0x00, 0xe2, 0x22, 0x5d,
0x00, 0xe2, 0x16, 0x5c,
0x00, 0xe2, 0x06, 0x5d,
0x01, 0xd9, 0xb2, 0x05, 0x01, 0xd9, 0xb2, 0x05,
0x00, 0xe2, 0x24, 0x5b, 0x00, 0xe2, 0x24, 0x5b,
0xf3, 0x92, 0xd5, 0x19, 0xf3, 0x92, 0xd5, 0x19,
0x00, 0xe2, 0xf4, 0x54, 0x00, 0xe2, 0x10, 0x55,
0x80, 0x92, 0xf5, 0x6c, 0x80, 0x92, 0x11, 0x6d,
0x0f, 0xea, 0x46, 0x59, 0x0f, 0xea, 0x46, 0x59,
0x0f, 0xea, 0x04, 0x00, 0x0f, 0xea, 0x04, 0x00,
0x00, 0xe2, 0xfc, 0x44, 0x00, 0xe2, 0x18, 0x45,
0x04, 0x8c, 0xe1, 0x30, 0x04, 0x8c, 0xe1, 0x30,
0x01, 0xea, 0xf2, 0x00, 0x01, 0xea, 0xf2, 0x00,
0x02, 0xea, 0x36, 0x00, 0x02, 0xea, 0x36, 0x00,
0xa8, 0xea, 0x32, 0x00, 0xa8, 0xea, 0x32, 0x00,
0xff, 0x93, 0x03, 0x7d, 0xff, 0x93, 0x1f, 0x7d,
0x14, 0xea, 0x46, 0x59, 0x14, 0xea, 0x46, 0x59,
0x14, 0xea, 0x04, 0x00, 0x14, 0xea, 0x04, 0x00,
0x00, 0xe2, 0x88, 0x5d, 0x00, 0xe2, 0xa4, 0x5d,
0x01, 0xd9, 0xb2, 0x05, 0x01, 0xd9, 0xb2, 0x05,
0x02, 0xa8, 0xf4, 0x31, 0x02, 0xa8, 0xf4, 0x31,
0x02, 0xa6, 0x18, 0x7d, 0x02, 0xa6, 0x34, 0x7d,
0x00, 0xe2, 0x34, 0x59, 0x00, 0xe2, 0x34, 0x59,
0x20, 0x5b, 0x26, 0x6d, 0x20, 0x5b, 0x42, 0x6d,
0xfc, 0x42, 0x12, 0x7d, 0xfc, 0x42, 0x2e, 0x7d,
0x10, 0x40, 0x14, 0x6d, 0x10, 0x40, 0x30, 0x6d,
0x20, 0x4d, 0x16, 0x7d, 0x20, 0x4d, 0x32, 0x7d,
0x08, 0x5d, 0x26, 0x6d, 0x08, 0x5d, 0x42, 0x6d,
0x02, 0xa6, 0xc6, 0x6b, 0x02, 0xa6, 0xd0, 0x6b,
0x00, 0xe2, 0x34, 0x59, 0x00, 0xe2, 0x34, 0x59,
0x20, 0x5b, 0x26, 0x6d, 0x20, 0x5b, 0x42, 0x6d,
0x01, 0x1b, 0x46, 0x6d, 0x01, 0x1b, 0x62, 0x6d,
0xfc, 0x42, 0x22, 0x7d, 0xfc, 0x42, 0x3e, 0x7d,
0x10, 0x40, 0x24, 0x6d, 0x10, 0x40, 0x40, 0x6d,
0x20, 0x4d, 0x66, 0x7d, 0x20, 0x4d, 0x82, 0x7d,
0x08, 0x5d, 0x66, 0x7d, 0x08, 0x5d, 0x82, 0x7d,
0x02, 0x19, 0x32, 0x00, 0x02, 0x19, 0x32, 0x00,
0x01, 0x5b, 0x40, 0x31, 0x01, 0x5b, 0x40, 0x31,
0x00, 0xe2, 0x96, 0x5c, 0x00, 0xe2, 0xaa, 0x5c,
0x00, 0xe2, 0x8a, 0x5b, 0x00, 0xe2, 0x88, 0x5b,
0x20, 0xea, 0xb6, 0x00, 0x20, 0xea, 0xb6, 0x00,
0x00, 0xe2, 0xc0, 0x5b, 0x00, 0xe2, 0xca, 0x5b,
0x20, 0x5c, 0xb8, 0x00, 0x20, 0x5c, 0xb8, 0x00,
0x04, 0x19, 0x3c, 0x6d, 0x04, 0x19, 0x58, 0x6d,
0x01, 0x1a, 0x3c, 0x6d, 0x01, 0x1a, 0x58, 0x6d,
0x00, 0xe2, 0x34, 0x59, 0x00, 0xe2, 0x34, 0x59,
0x01, 0x1a, 0x66, 0x7d, 0x01, 0x1a, 0x82, 0x7d,
0x80, 0xf9, 0xf2, 0x01, 0x80, 0xf9, 0xf2, 0x01,
0x20, 0xa0, 0xac, 0x7d, 0x20, 0xa0, 0xc8, 0x7d,
0x08, 0xa8, 0x45, 0x7d, 0x08, 0xa8, 0x61, 0x7d,
0x00, 0xe2, 0x58, 0x45, 0x00, 0xe2, 0x74, 0x45,
0x02, 0xea, 0xb4, 0x04, 0x02, 0xea, 0xb4, 0x04,
0x02, 0x19, 0x32, 0x00, 0x02, 0x19, 0x32, 0x00,
0x08, 0xa8, 0x69, 0x7d, 0x08, 0xa8, 0x85, 0x7d,
0x04, 0x5d, 0xc2, 0x7d, 0x04, 0x5d, 0xde, 0x7d,
0x01, 0x1a, 0xc2, 0x7d, 0x01, 0x1a, 0xde, 0x7d,
0x01, 0xa4, 0x49, 0x03, 0x01, 0xa4, 0x49, 0x03,
0x80, 0xf9, 0xf2, 0x01, 0x80, 0xf9, 0xf2, 0x01,
0x02, 0xa8, 0x84, 0x32, 0x02, 0xa8, 0x84, 0x32,
...@@ -695,48 +709,48 @@ static uint8_t seqprog[] = { ...@@ -695,48 +709,48 @@ static uint8_t seqprog[] = {
0xff, 0xea, 0xd4, 0x19, 0xff, 0xea, 0xd4, 0x19,
0x00, 0xe2, 0x40, 0x59, 0x00, 0xe2, 0x40, 0x59,
0x11, 0x00, 0x00, 0x10, 0x11, 0x00, 0x00, 0x10,
0x00, 0xe2, 0x98, 0x5d, 0x00, 0xe2, 0xb4, 0x5d,
0x00, 0xe2, 0x34, 0x53, 0x00, 0xe2, 0x34, 0x53,
0xff, 0xea, 0xd4, 0x0d, 0xff, 0xea, 0xd4, 0x0d,
0x00, 0xe2, 0x34, 0x59, 0x00, 0xe2, 0x34, 0x59,
0x40, 0x5b, 0x74, 0x6d, 0x40, 0x5b, 0x90, 0x6d,
0x04, 0x5d, 0xc2, 0x7d, 0x04, 0x5d, 0xde, 0x7d,
0x01, 0x1a, 0xc2, 0x7d, 0x01, 0x1a, 0xde, 0x7d,
0x20, 0x4d, 0x66, 0x7d, 0x20, 0x4d, 0x82, 0x7d,
0x40, 0x5b, 0xac, 0x7d, 0x40, 0x5b, 0xc8, 0x7d,
0x04, 0x5d, 0xc2, 0x7d, 0x04, 0x5d, 0xde, 0x7d,
0x01, 0x1a, 0xc2, 0x7d, 0x01, 0x1a, 0xde, 0x7d,
0x80, 0xf9, 0xf2, 0x01, 0x80, 0xf9, 0xf2, 0x01,
0x01, 0xa4, 0x49, 0x03, 0x01, 0xa4, 0x49, 0x03,
0x08, 0xa8, 0x59, 0x6d, 0x08, 0xa8, 0x75, 0x6d,
0x02, 0xea, 0xb4, 0x04, 0x02, 0xea, 0xb4, 0x04,
0xff, 0x6a, 0x8e, 0x7d, 0xff, 0x6a, 0xaa, 0x7d,
0x10, 0xea, 0x46, 0x59, 0x10, 0xea, 0x46, 0x59,
0x10, 0xea, 0x04, 0x00, 0x10, 0xea, 0x04, 0x00,
0x00, 0xe2, 0x8e, 0x45, 0x00, 0xe2, 0xaa, 0x45,
0x00, 0xe2, 0x32, 0x59, 0x00, 0xe2, 0x32, 0x59,
0x10, 0x5d, 0x80, 0x6d, 0x10, 0x5d, 0x9c, 0x6d,
0x40, 0x5b, 0x66, 0x7d, 0x40, 0x5b, 0x82, 0x7d,
0x02, 0x19, 0x32, 0x00, 0x02, 0x19, 0x32, 0x00,
0x80, 0xf9, 0xf2, 0x01, 0x80, 0xf9, 0xf2, 0x01,
0xff, 0xea, 0x10, 0x03, 0xff, 0xea, 0x10, 0x03,
0x08, 0xa8, 0x51, 0x03, 0x08, 0xa8, 0x51, 0x03,
0x00, 0xe2, 0x58, 0x45, 0x00, 0xe2, 0x74, 0x45,
0x80, 0xf9, 0x66, 0x6d, 0x80, 0xf9, 0x82, 0x6d,
0x01, 0x43, 0xc1, 0x31, 0x01, 0x43, 0xc1, 0x31,
0x00, 0xfb, 0x66, 0x65, 0x00, 0xfb, 0x82, 0x65,
0x01, 0x42, 0xc1, 0x31, 0x01, 0x42, 0xc1, 0x31,
0x00, 0xfa, 0x66, 0x65, 0x00, 0xfa, 0x82, 0x65,
0x01, 0xe8, 0xd4, 0x1d, 0x01, 0xe8, 0xd4, 0x1d,
0x30, 0x3f, 0xc0, 0x09, 0x30, 0x3f, 0xc0, 0x09,
0x30, 0xe0, 0x66, 0x65, 0x30, 0xe0, 0x82, 0x65,
0x40, 0x4b, 0x66, 0x6d, 0x40, 0x4b, 0x82, 0x6d,
0xff, 0xea, 0x52, 0x01, 0xff, 0xea, 0x52, 0x01,
0xee, 0x00, 0xb2, 0x6d, 0xee, 0x00, 0xce, 0x6d,
0x80, 0xf9, 0xf2, 0x01, 0x80, 0xf9, 0xf2, 0x01,
0x02, 0xea, 0xb4, 0x00, 0x02, 0xea, 0xb4, 0x00,
0x20, 0xea, 0x9a, 0x00, 0x20, 0xea, 0x9a, 0x00,
0xf3, 0x42, 0xbc, 0x6d, 0xf3, 0x42, 0xd8, 0x6d,
0x12, 0xea, 0x46, 0x59, 0x12, 0xea, 0x46, 0x59,
0x12, 0xea, 0x04, 0x00, 0x12, 0xea, 0x04, 0x00,
0x00, 0xe2, 0xee, 0x41, 0x00, 0xe2, 0xee, 0x41,
...@@ -747,18 +761,18 @@ static uint8_t seqprog[] = { ...@@ -747,18 +761,18 @@ static uint8_t seqprog[] = {
0x11, 0xea, 0x04, 0x00, 0x11, 0xea, 0x04, 0x00,
0x00, 0xe2, 0x24, 0x5b, 0x00, 0xe2, 0x24, 0x5b,
0x08, 0x5a, 0xb4, 0x00, 0x08, 0x5a, 0xb4, 0x00,
0x00, 0xe2, 0xe4, 0x5d, 0x00, 0xe2, 0x00, 0x5e,
0xa8, 0xea, 0x32, 0x00, 0xa8, 0xea, 0x32, 0x00,
0x00, 0xe2, 0x34, 0x59, 0x00, 0xe2, 0x34, 0x59,
0x80, 0x1a, 0xd6, 0x7d, 0x80, 0x1a, 0xf2, 0x7d,
0x00, 0xe2, 0xe4, 0x5d, 0x00, 0xe2, 0x00, 0x5e,
0x80, 0x19, 0x32, 0x00, 0x80, 0x19, 0x32, 0x00,
0x40, 0x5b, 0xdc, 0x6d, 0x40, 0x5b, 0xf8, 0x6d,
0x08, 0x5a, 0xdc, 0x7d, 0x08, 0x5a, 0xf8, 0x7d,
0x20, 0x4d, 0x66, 0x7d, 0x20, 0x4d, 0x82, 0x7d,
0x02, 0x84, 0x09, 0x03, 0x02, 0x84, 0x09, 0x03,
0x40, 0x5b, 0xac, 0x7d, 0x40, 0x5b, 0xc8, 0x7d,
0x08, 0xa8, 0x51, 0x6d, 0x08, 0xa8, 0x6d, 0x6d,
0x02, 0xea, 0xb4, 0x04, 0x02, 0xea, 0xb4, 0x04,
0x01, 0x38, 0xe1, 0x30, 0x01, 0x38, 0xe1, 0x30,
0x05, 0x39, 0xe3, 0x98, 0x05, 0x39, 0xe3, 0x98,
...@@ -774,12 +788,28 @@ static uint8_t seqprog[] = { ...@@ -774,12 +788,28 @@ static uint8_t seqprog[] = {
}; };
typedef int ahd_patch_func_t (struct ahd_softc *ahd); typedef int ahd_patch_func_t (struct ahd_softc *ahd);
static ahd_patch_func_t ahd_patch20_func;
static int
ahd_patch20_func(struct ahd_softc *ahd)
{
return ((ahd->bugs & AHD_PKT_BITBUCKET_BUG) != 0);
}
static ahd_patch_func_t ahd_patch19_func;
static int
ahd_patch19_func(struct ahd_softc *ahd)
{
return ((ahd->bugs & AHD_PKT_BITBUCKET_BUG) == 0);
}
static ahd_patch_func_t ahd_patch18_func; static ahd_patch_func_t ahd_patch18_func;
static int static int
ahd_patch18_func(struct ahd_softc *ahd) ahd_patch18_func(struct ahd_softc *ahd)
{ {
return ((ahd->bugs & AHD_PKT_BITBUCKET_BUG) != 0); return ((ahd->features & AHD_RTI) == 0);
} }
static ahd_patch_func_t ahd_patch17_func; static ahd_patch_func_t ahd_patch17_func;
...@@ -787,7 +817,7 @@ static ahd_patch_func_t ahd_patch17_func; ...@@ -787,7 +817,7 @@ static ahd_patch_func_t ahd_patch17_func;
static int static int
ahd_patch17_func(struct ahd_softc *ahd) ahd_patch17_func(struct ahd_softc *ahd)
{ {
return ((ahd->bugs & AHD_PKT_BITBUCKET_BUG) == 0); return ((ahd->flags & AHD_INITIATORROLE) != 0);
} }
static ahd_patch_func_t ahd_patch16_func; static ahd_patch_func_t ahd_patch16_func;
...@@ -795,7 +825,7 @@ static ahd_patch_func_t ahd_patch16_func; ...@@ -795,7 +825,7 @@ static ahd_patch_func_t ahd_patch16_func;
static int static int
ahd_patch16_func(struct ahd_softc *ahd) ahd_patch16_func(struct ahd_softc *ahd)
{ {
return ((ahd->flags & AHD_INITIATORROLE) != 0); return ((ahd->flags & AHD_TARGETROLE) != 0);
} }
static ahd_patch_func_t ahd_patch15_func; static ahd_patch_func_t ahd_patch15_func;
...@@ -803,7 +833,7 @@ static ahd_patch_func_t ahd_patch15_func; ...@@ -803,7 +833,7 @@ static ahd_patch_func_t ahd_patch15_func;
static int static int
ahd_patch15_func(struct ahd_softc *ahd) ahd_patch15_func(struct ahd_softc *ahd)
{ {
return ((ahd->flags & AHD_TARGETROLE) != 0); return ((ahd->bugs & AHD_AUTOFLUSH_BUG) != 0);
} }
static ahd_patch_func_t ahd_patch14_func; static ahd_patch_func_t ahd_patch14_func;
...@@ -811,7 +841,7 @@ static ahd_patch_func_t ahd_patch14_func; ...@@ -811,7 +841,7 @@ static ahd_patch_func_t ahd_patch14_func;
static int static int
ahd_patch14_func(struct ahd_softc *ahd) ahd_patch14_func(struct ahd_softc *ahd)
{ {
return ((ahd->bugs & AHD_AUTOFLUSH_BUG) != 0); return ((ahd->features & AHD_NEW_DFCNTRL_OPTS) != 0);
} }
static ahd_patch_func_t ahd_patch13_func; static ahd_patch_func_t ahd_patch13_func;
...@@ -819,7 +849,7 @@ static ahd_patch_func_t ahd_patch13_func; ...@@ -819,7 +849,7 @@ static ahd_patch_func_t ahd_patch13_func;
static int static int
ahd_patch13_func(struct ahd_softc *ahd) ahd_patch13_func(struct ahd_softc *ahd)
{ {
return ((ahd->features & AHD_NEW_DFCNTRL_OPTS) != 0); return ((ahd->flags & AHD_39BIT_ADDRESSING) != 0);
} }
static ahd_patch_func_t ahd_patch12_func; static ahd_patch_func_t ahd_patch12_func;
...@@ -827,7 +857,7 @@ static ahd_patch_func_t ahd_patch12_func; ...@@ -827,7 +857,7 @@ static ahd_patch_func_t ahd_patch12_func;
static int static int
ahd_patch12_func(struct ahd_softc *ahd) ahd_patch12_func(struct ahd_softc *ahd)
{ {
return ((ahd->flags & AHD_39BIT_ADDRESSING) != 0); return ((ahd->flags & AHD_64BIT_ADDRESSING) != 0);
} }
static ahd_patch_func_t ahd_patch11_func; static ahd_patch_func_t ahd_patch11_func;
...@@ -835,7 +865,7 @@ static ahd_patch_func_t ahd_patch11_func; ...@@ -835,7 +865,7 @@ static ahd_patch_func_t ahd_patch11_func;
static int static int
ahd_patch11_func(struct ahd_softc *ahd) ahd_patch11_func(struct ahd_softc *ahd)
{ {
return ((ahd->flags & AHD_64BIT_ADDRESSING) != 0); return ((ahd->features & AHD_NEW_DFCNTRL_OPTS) == 0);
} }
static ahd_patch_func_t ahd_patch10_func; static ahd_patch_func_t ahd_patch10_func;
...@@ -851,7 +881,7 @@ static ahd_patch_func_t ahd_patch9_func; ...@@ -851,7 +881,7 @@ static ahd_patch_func_t ahd_patch9_func;
static int static int
ahd_patch9_func(struct ahd_softc *ahd) ahd_patch9_func(struct ahd_softc *ahd)
{ {
return ((ahd->bugs & AHD_BUSFREEREV_BUG) == 0); return ((ahd->bugs & AHD_EARLY_REQ_BUG) != 0);
} }
static ahd_patch_func_t ahd_patch8_func; static ahd_patch_func_t ahd_patch8_func;
...@@ -859,7 +889,7 @@ static ahd_patch_func_t ahd_patch8_func; ...@@ -859,7 +889,7 @@ static ahd_patch_func_t ahd_patch8_func;
static int static int
ahd_patch8_func(struct ahd_softc *ahd) ahd_patch8_func(struct ahd_softc *ahd)
{ {
return ((ahd->bugs & AHD_ABORT_LQI_BUG) == 0); return ((ahd->bugs & AHD_BUSFREEREV_BUG) == 0);
} }
static ahd_patch_func_t ahd_patch7_func; static ahd_patch_func_t ahd_patch7_func;
...@@ -1000,64 +1030,68 @@ static struct patch { ...@@ -1000,64 +1030,68 @@ static struct patch {
{ ahd_patch0_func, 399, 1, 1 }, { ahd_patch0_func, 399, 1, 1 },
{ ahd_patch2_func, 410, 1, 2 }, { ahd_patch2_func, 410, 1, 2 },
{ ahd_patch0_func, 411, 1, 1 }, { ahd_patch0_func, 411, 1, 1 },
{ ahd_patch8_func, 413, 1, 1 }, { ahd_patch8_func, 439, 1, 1 },
{ ahd_patch9_func, 440, 1, 1 }, { ahd_patch1_func, 446, 1, 2 },
{ ahd_patch1_func, 447, 1, 2 }, { ahd_patch0_func, 447, 1, 1 },
{ ahd_patch0_func, 448, 1, 1 }, { ahd_patch2_func, 459, 1, 2 },
{ ahd_patch2_func, 460, 1, 2 }, { ahd_patch0_func, 460, 1, 1 },
{ ahd_patch0_func, 461, 1, 1 }, { ahd_patch9_func, 465, 6, 2 },
{ ahd_patch10_func, 489, 1, 1 }, { ahd_patch0_func, 471, 1, 1 },
{ ahd_patch11_func, 498, 1, 2 }, { ahd_patch10_func, 494, 1, 1 },
{ ahd_patch0_func, 499, 1, 1 }, { ahd_patch11_func, 503, 1, 1 },
{ ahd_patch12_func, 504, 1, 1 }, { ahd_patch12_func, 504, 1, 2 },
{ ahd_patch11_func, 505, 1, 1 }, { ahd_patch0_func, 505, 1, 1 },
{ ahd_patch13_func, 518, 1, 2 }, { ahd_patch13_func, 510, 1, 1 },
{ ahd_patch0_func, 519, 1, 1 }, { ahd_patch12_func, 511, 1, 1 },
{ ahd_patch1_func, 541, 1, 2 }, { ahd_patch14_func, 524, 1, 2 },
{ ahd_patch0_func, 542, 1, 1 }, { ahd_patch0_func, 525, 1, 1 },
{ ahd_patch1_func, 545, 1, 2 }, { ahd_patch1_func, 547, 1, 2 },
{ ahd_patch0_func, 546, 1, 1 }, { ahd_patch0_func, 548, 1, 1 },
{ ahd_patch2_func, 551, 1, 2 }, { ahd_patch1_func, 551, 1, 2 },
{ ahd_patch0_func, 552, 1, 1 }, { ahd_patch0_func, 552, 1, 1 },
{ ahd_patch2_func, 556, 1, 2 }, { ahd_patch2_func, 557, 1, 2 },
{ ahd_patch0_func, 557, 1, 1 }, { ahd_patch0_func, 558, 1, 1 },
{ ahd_patch1_func, 558, 1, 2 }, { ahd_patch2_func, 562, 1, 2 },
{ ahd_patch0_func, 559, 1, 1 }, { ahd_patch0_func, 563, 1, 1 },
{ ahd_patch2_func, 570, 1, 2 }, { ahd_patch1_func, 564, 1, 2 },
{ ahd_patch0_func, 571, 1, 1 }, { ahd_patch0_func, 565, 1, 1 },
{ ahd_patch14_func, 575, 1, 1 }, { ahd_patch2_func, 576, 1, 2 },
{ ahd_patch15_func, 580, 1, 1 }, { ahd_patch0_func, 577, 1, 1 },
{ ahd_patch16_func, 581, 2, 1 }, { ahd_patch15_func, 581, 1, 1 },
{ ahd_patch15_func, 585, 1, 2 }, { ahd_patch16_func, 586, 1, 1 },
{ ahd_patch0_func, 586, 1, 1 }, { ahd_patch17_func, 587, 2, 1 },
{ ahd_patch2_func, 593, 1, 2 }, { ahd_patch16_func, 591, 1, 2 },
{ ahd_patch0_func, 594, 1, 1 }, { ahd_patch0_func, 592, 1, 1 },
{ ahd_patch2_func, 609, 1, 2 }, { ahd_patch2_func, 595, 1, 2 },
{ ahd_patch0_func, 610, 1, 1 }, { ahd_patch0_func, 596, 1, 1 },
{ ahd_patch1_func, 616, 1, 2 }, { ahd_patch2_func, 614, 1, 2 },
{ ahd_patch0_func, 617, 1, 1 }, { ahd_patch0_func, 615, 1, 1 },
{ ahd_patch1_func, 631, 1, 2 }, { ahd_patch18_func, 616, 12, 1 },
{ ahd_patch0_func, 632, 1, 1 }, { ahd_patch1_func, 632, 1, 2 },
{ ahd_patch1_func, 639, 1, 2 }, { ahd_patch0_func, 633, 1, 1 },
{ ahd_patch0_func, 640, 1, 1 }, { ahd_patch18_func, 634, 1, 1 },
{ ahd_patch14_func, 659, 1, 1 }, { ahd_patch1_func, 645, 1, 2 },
{ ahd_patch14_func, 675, 1, 1 }, { ahd_patch0_func, 646, 1, 1 },
{ ahd_patch2_func, 687, 1, 2 }, { ahd_patch1_func, 653, 1, 2 },
{ ahd_patch0_func, 688, 1, 1 }, { ahd_patch0_func, 654, 1, 1 },
{ ahd_patch1_func, 705, 1, 2 }, { ahd_patch15_func, 673, 1, 1 },
{ ahd_patch0_func, 706, 1, 1 }, { ahd_patch15_func, 689, 1, 1 },
{ ahd_patch14_func, 711, 1, 1 }, { ahd_patch2_func, 701, 1, 2 },
{ ahd_patch1_func, 731, 1, 2 }, { ahd_patch0_func, 702, 1, 1 },
{ ahd_patch0_func, 732, 1, 1 }, { ahd_patch1_func, 719, 1, 2 },
{ ahd_patch1_func, 734, 1, 2 }, { ahd_patch0_func, 720, 1, 1 },
{ ahd_patch0_func, 735, 1, 1 }, { ahd_patch15_func, 725, 1, 1 },
{ ahd_patch1_func, 737, 1, 2 }, { ahd_patch1_func, 745, 1, 2 },
{ ahd_patch0_func, 738, 1, 1 }, { ahd_patch0_func, 746, 1, 1 },
{ ahd_patch17_func, 740, 1, 2 }, { ahd_patch1_func, 748, 1, 2 },
{ ahd_patch0_func, 741, 2, 1 }, { ahd_patch0_func, 749, 1, 1 },
{ ahd_patch18_func, 744, 4, 2 }, { ahd_patch1_func, 751, 1, 2 },
{ ahd_patch0_func, 748, 1, 1 }, { ahd_patch0_func, 752, 1, 1 },
{ ahd_patch18_func, 754, 11, 1 } { ahd_patch19_func, 754, 1, 2 },
{ ahd_patch0_func, 755, 2, 1 },
{ ahd_patch20_func, 758, 4, 2 },
{ ahd_patch0_func, 762, 1, 1 },
{ ahd_patch20_func, 768, 11, 1 }
}; };
static struct cs { static struct cs {
...@@ -1074,11 +1108,11 @@ static struct cs { ...@@ -1074,11 +1108,11 @@ static struct cs {
{ 153, 157 }, { 153, 157 },
{ 165, 173 }, { 165, 173 },
{ 196, 245 }, { 196, 245 },
{ 659, 675 }, { 673, 689 },
{ 675, 693 }, { 689, 707 },
{ 698, 704 }, { 712, 718 },
{ 711, 716 }, { 725, 730 },
{ 716, 722 } { 730, 736 }
}; };
static const int num_critical_sections = sizeof(critical_sections) static const int num_critical_sections = sizeof(critical_sections)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment