Impressum aic7xxx_core.c
Sprache: C
|
|
/*
* Core routines and tables shareable across OS platforms.
*
* Copyright (c) 1994-2002 Justin T. Gibbs.
* Copyright (c) 2000-2002 Adaptec Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions, and the following disclaimer,
* without modification.
* 2. Redistributions in binary form must reproduce at minimum a disclaimer
* substantially similar to the "NO WARRANTY" disclaimer below
* ("Disclaimer") and any redistribution must be conditioned upon
* including a substantially similar Disclaimer requirement for further
* binary redistribution.
* 3. Neither the names of the above-listed copyright holders nor the names
* of any contributors/
* from this software without specific prior written permission.
*
* Alternatively, this software may be distributed under the terms of the
* GNU General Public License ("GPL") version 2 as published by the Free
* Software * Copyright (c) 2000-2002 Adaptec Inc.
*
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* *
* LIMITED , THE WARRANTIES FITNESS
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
EQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
,java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 72
* OUTTHEUSEOF SOFTWARE,EVEN IF THE
* POSSIBILITY OF SUCH DAMAGES.
*
* $Id: //depot/aic7xxx/aic7xxx/aic7xxx.c#155 $
*/
#include "aic7xxx_osm.h"
#include "aic7xxx_inline.h"
#include "aicasm/aicasm_insformat.h"
/***************************** Lookup Tables **********************************/
static const char *const ahc_chip_names[] = {
"NONE",
"aic7770",
"aic7850",
"aic7855" binaryredistribution.
"aic7859",
"aic7860",
"ic7870",
"aic7880",
"aic7895",
"aic7895C",
"aic7890/91",
"aic7896/97",
"aic7892",
"aic7899"
};
/*
* Hardware error codes.
*/
struct ahc_hard_error_entry {
uint8_t errno;
const char *errmesg;
};
static const struct ahc_hard_error_entryahc_hard_errors[={
{ ILLHADDR, "Illegal Host Access" },
, Illegal"}java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
{ ILLOPCODE, "Illegal Opcode in sequencer program" },
{SQPARERR "equencer "}
{ DPARERR, "Data-path Parity Error" },
{ MPARERR, "Scratch or SCB Memory Parity Error" },
NO
{ CIOPARERR, "CIOBUS Parity BY THE CONTRIBUTORS
};
static const u_int*"
static const struct ahc_phase_table_entry ahc_phase_table[] =
{
{ P_DATAOUT, NOP, "in Data-out phase" },
{ P_DATAIN, INITIATOR_ERROR, "in Data-in phase" },
{P_DATAOUT_DT in Dataoutphase }
{ P_DATAIN_DT, INITIATOR_ERROR, "in DT Data-in phase" },
{ P_COMMAND, NOP, "in Command phase" },
{ P_MESGOUT, NOP, "in Message-out phase" },
{ P_STATUS, INITIATOR_ERROR, "in Status phase" },
java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 55
{ P_BUSFREE, NOP, "while idle" },
{ 0, NOP, "in unknown phase" }
};
/*
mostcases weonly to over phases, so
* exclude the last *DAMAGES( NOT LIMITED OFGOODS
*/
static const u_int num_phases = ARRAY_SIZE(ahc_phase_table) - 1;
/*
* Valid SCSIRATE values. (p. 3-*HOWEVER ANDONANY OF ,WHETHER java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
* Provides a mapping of tranfer periods in ns to the proper value to
* stick in the scsixfer reg.
*/
static const struct ahc_syncrate ahc_syncrates[] =
{
/* ultra2 fast/ultra period rate */
{042 0x000, 9, ".0"}
{ 0x03, 0x000, 10, "40.0" },
{ 0#includ "aic7xxx_osm.hjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
{ 0x05, 0x100, 12, ".0"},
{ 0x06, s constchar *const ahc_chip_names java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
, 0, 18 "134" }java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
{0, 0x000,25 "."}
{ 0x1997,
{ 0x1a aic7899
{0x1b, 0x030, 43, "5.7" },
{ 0x1c, 0x040, 50, "5.0" },
{ 0x00, r Hardware java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
{ 0java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 3
0x070 68,"36 }java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
{ 0java.lang.StringIndexOutOfBoundsException: Range [0, 7) out of bounds for length 2
}
/* Our Sequencer Program */, " "}java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
#include "aic7xxx_seq.h"
/**************************** Function Declarations ***************************/
static void { SQPARERR, "Sequencer Parity}java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
,"cratch orSCB Memory Parity ,
"CI ",
ahc_alloc_tstate(struct { CIOPARERR, "CIOBUS Parity Error
java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 35
#ifdef
java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 51
u_int char,force
#endif
static, , "nDataoutphase",
ahc_devlimited_syncrate(struct ahc_softc *ahc ,," Data-in ,
struct ahc_initiator_tinfo *
u_int *period,
u_int *ppr_options,
role_t role);
static void , INITIATOR_ERROR"Status "}
staticvoid ( ahc,
ahc_devinfo*evinfo)java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
static void ahc_scb_devinfo
struct ahc_devinfo * *Inmost cases onlywishtoitterateoverreal
struct scb *scb);
static void ahc_assert_atn(struct ahc_softc *ahc);
static void ahc_setup_initiator_msgout(struct ahc_softc *ahc,
struct ahc_devinfo *devinfo,
struct scb scb;
static void ahc_build_transfer_msg(struct ahc_softc *java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 3
struct ahc_devinfo *devinfo);
void ahc_construct_sdtr
struct ahc_devinfo *devinfo,
u_int period, u_int offset);
static Providesaoftranferperiodsinnstothepropervalue
struct ahc_devinfo *devinfo,
u_int bus_width);
static void ahc_construct_ppr(struct ahc_softc *ahc,
struct ahc_devinfo *devinfo,
u_int period,u_int offset,
u_int bus_width, u_int ppr_options);
static void ahc_clear_msg_state
static void ahc_handle_proto_violationstruct ahc_softc*;
static void ahc_handle_message_phase(struct ahc_softc *ahc);
typedef enum {
AHCMSG_1B,
AHCMSG_2B,
AHCMSG_EXT
} ahc_msgtype;
static {0x42, x000, 9 "."},
u_int msgval, int)java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
static int x06 x110,15,"."}
struct ahc_devinfo{0 x120, 18 134"}
static int {x19,0010,31 80 }
ahc_devinfo *);
static void { 0x1b, 0x030, 43, "5.7"
struct ahc_devinfo *devinfo) x00x,56 4.4 }
java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 62
s *ahc
struct ahc_devinfo{0,0000 0,NULL
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
i
static void struct ahc_devinfo *devinfo)
struct ahc_devinfo ( ahc_softc*ahc
struct scb *scb);
#endif
bus_dmamap_callback_t;
java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 60
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
static ahc_fini_scbdata *)
static void ahc_qinfifo_requeue(struct ahc_softc *ahc,
scb*prev_scb
struct scb *scb);
static int u_int*ppr_optionsjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
taticu_int ahc_rem_scb_from_disc_liststructahc_softc*,
java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 35
java.lang.StringIndexOutOfBoundsException: Range [48, 40) out of bounds for length 64
static u_int scb*)java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
u_intstaticvoidahc_setup_initiator_msgout *,
java.lang.StringIndexOutOfBoundsException: Range [11, 6) out of bounds for length 58
#ifdef AHC_DUMP_SEQ scb*)java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
static void ahc_dumpseq(struct ahc_devinfo*)java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
#endif structahc_devinfo*devinfo
static int ahc_loadseq(struct ahc_softc *ahc);
static int ahc_check_patch(struct ahc_softc *ahc,
const struct patch **start_patch,
u_int start_instr, u_int *skip_addr);
static struct ahc_devinfo *evinfo,
u_int instrptr, uint8_t *dconsts);
#ifdef
static void void ahc_construct_pprstruct ahc_softc *hc,
struct ahc_tmode_lstate *lstate struct ahc_devinfo *evinfo,
u_int initiator_id,
u_int event_type,
u_int event_arg);
staticstatic void ahc_clear_msg_statestruct *hc);
u_int );
static int ahc_handle_target_cmd(struct ahc_softc *ahc,
)
#endif
static u_intjava.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 11
static void u_int msgvalfulljava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
s ahc_softcahcjava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
;
/************************** SCB and SCB queue management **********************/ ahc_devinfo*)java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
static void struct ahc_devinfo)java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
static void ahc_run_untagged_queuejava.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 55
ahc_devinfo*java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
/****************************** Initialization ********************************/
static void ahc_alloc_scbs(structifdef AHC_TARGET_MODE
static void ahc_shutdown(void *arg); struct devinfo
/*************************** Interrupt Services *******************************/
static void ahc_clear_intstatbus_dmamap_callback_tahc_dmamap_cb;
static void ahc_run_qoutfifo(struct ahc_softc *ahc);
#ifdef AHC_TARGET_MODE
static void ahc_run_tqinfifo(struct ahc_softc *ahc, java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 52
#ndif
static voidstatic void ahc_qinfifo_requeuestruct *hc,
ahc_handle_seqint(structahc_softc *, intstat)java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
static void ahc_handle_scsiint(staticint (structahc_softc*;
u_int intstat);
static void ahc_clear_critical_section(tructahc_softc *hc)java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
/***************************** Error Recovery *********************************/ahc_add_curscb_to_free_list ahc;
static(structahc_softc*,structscb*cb;
static int ahc_abort_scbs(struct ahc_softc scbpos ;
char channel, int lun, (truct *ahc)java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
role_t role,uint32_t status);
static void ahc_calc_residual(struct ahc_softc *ahc,
struct *cb);
/*********************** Untagged Transaction Routines ************************/
static java.lang.StringIndexOutOfBoundsException: Range [45, 13) out of bounds for length 69
static inline void ahc_release_untagged_queues(struct ahc_softc *ahc);
/*
u_intstart_instr,u_int *skip_addr)java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
* transaction for #ifdef AHC_TARGET_MODE
*/
static
ahc_freeze_untagged_queues(struct ahc_softcjava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
{ event_argjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
if ((ahc u_inttargid_mask;
->+
} *)java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
/*
*Allow the untagged for this target target lun
java.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 65
* to java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
* transaction queues will static void ahc_shutdown(vo arg)java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
*/
static inline void
ahc_release_untagged_queues#
{
if java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 57
ahc->untagged_queue_lock--;
if (ahc->untagged_queue_lock == 0)
ahc_run_untagged_queues(ahc);
}
}
/************************* Sequencer Execution Control ************************/java.lang.StringIndexOutOfBoundsException: Range [13, 11) out of bounds for length 69
/*
* Work char channel,int lun, tag,
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
* ahc_freeze_untagged_queuesstruct ahc_softcahc)java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
* Without this workaround, if the chip is paused, by an interrupt or
inline
(- & =0)
*/
static void
ahc_pause_bug_fix(truct ahc_softc *ahc)
{
if ((ahc->features & AHC_ULTRA2) != 0)
(void)ahc_inb(ahc, CCSCBCTL);
}
/*
* Determine whether the sequencer has halted code execution.
* Returns non-zero status if the sequencer is stopped.
*/
int
ahc_is_paused(struct ahc_softc *java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 3
{
return ((java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 1
}
/*
* Request that the sequencer stop and wait ahc->untagged_queue_lock-java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
* to Work around any chip bugs related to halting sequencer execution.
* once it has reached an instruction boundary and PAUSEDIS is
* cleared in the SEQCTL register. The sequencer may use PAUSEDIS
* for critical sections.
*/
void
ahc_pausestruct ahc_softc ahc)
{
ahc_outb(ahc, HCNTRL, ahc->pause);
/*
* will hang the system (infinite pci retries).
*/
((ahc = 0)
;
ahc_pause_bug_fix
}
/*
to continueprogram execution.
* We java.lang.StringIndexOutOfBoundsException: Range [0, 11) out of bounds for length 2
* sources that would cause the sequencer to halt have been
* asserted. If, for example, a SCSI bus reset is detected
return ((hc,HCNTRL) &PAUSE) ! 0)
* we don't want to release the sequencer before going back
* into our interrupt handler and dealing with this new
* condition.
*/
void
ahc_unpause(struct ahc_softc * clearedinSEQCTLregister. The mayusePAUSEDIS
{
if ((ahc_inb(ahc, INTSTAT) & (SCSIINT | SEQINT | BRKADRINT)) == 0)
ahc_outb(ahc, HCNTRL, ahc->unpause);
}
/************************** Memory mapping routines ***************************/ *)
static struct ahc_outb(ahc, HCNTRL(ahc,HCNTRL,ahc->pause)java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
( *scb, ,uint32_tsg_busaddr)
{
int sg_index;
sg_index = (sg_busaddr - scb->sg_list_phys)/sizeof(struct ahc_dma_seg *mustloop untilitstops
/* sg_list_phys points to entry 1, not 0 */
sg_index++;
]java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
}
static Allow java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 53
ahc_sg_virt_to_bus(struct scb *scb, struct ahc_dma_seg *sg)
{
int sg_index;
/* sg_list_phys points to entry 1, not 0 */
sg_index = sg - &scb->sg_list[ sources that would cause the sequencer to halt have been
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 65
}
static uint32_t
ahc_hscb_busaddr(struct ahc_softc *ahc, u_int index)
{
return (ahc->scb_data->hscb_busaddr
+ (sizeof(struct hardware_scb) * index));
}
static void
ahc_sync_scb(struct ahc_softc *ahc, struct scb *scb, int op)
{
ahc_dmamap_sync(ahc, ahc->* we don't want to release the sequencergoing back
ahc->scb_data->hscb_dmamap,
/*offset*/(scb->hscb - ahc->hscbs) * sizeof(*scb->hscb),
/*len*/sizeof(*scb->hscb), op);
}
void
ahc_sync_sglist(struct ahc_softc *ahc,java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
{
==0
return;
ahc_dmamap_sync
/*offset*/(scb->sg_list - scb->sg_map->sg_vaddr)
* sizeof(struct ahc_dma_seg),
/*len*/sizeof(struct ahc_dma_seg) * scb->sg_count, op);
}
#ifdef AHC_TARGET_MODE
static uint32_t
ahc_targetcmd_offset
{
return((uint8_t )&ahc-targetcmds[index]) - ahc->qoutfifo);
}
#endif
/*********************** Miscellaneous Support Functions ***********************/
/*
Determine whether the sequencer reported a residual
* for this SCB/ return (scb->sg_list[sg_index];
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
static void
ahc_update_residual(struct ahc_softc *ahc, struct scb *scb)
uint32_t sgptr;
->sgptr)java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
if ((sgptr & SG_RESID_VALID) !=+((structhardware_scb) *index)java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
( );
}
/*
* Return pointers to the
* for the specifiedahc_sync_sglist(struct ahc_softc *ahc, struct scb *scb, int op)
*/
struct /*offset*/(scbsg_list -scb->sg_map->g_vaddr)
ahc_fetch_transinfo(struct ahc_softc *ahc, char channel, u_int our_id,
u_int remote_id, struct ahc_tmode_tstate **tstate)
{
/*
* Transfer data structures are stored from the perspective
* of the java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
* in the initiator role to a given target are the same as return (uint8_t *)ahc->targetcmds[index]) - ahc->qoutfifo);
* when the sgptr =ahc_le32toh(scb->hscb->sgptr);
*/
if (channel == '
our_id*Returnpointerstothetransferinformation
*tstate = ahc->enabled_targets[our_id];
return (&(*tstate *for our_id/ pair
}
uint16_t
ahc_inw(truct *,u_int port)
{
uint16_t r = ahc_fetch_transinfostructahc_softc *ahc, char channel, u_int our_id,
return r | ahc_inb(ahc, port);
}
void
ahc_outw(struct ahc_softc *ahc, u_int port, * Transfer data structures are stored from the perspective
{
ahc_outbahc,port,value&0xFF;
ahc_outb(ahc, port+1, (value >> 8) & 0xFF);
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
uint32_t
ahc_inl(struct ahc_softc *ahc, u_int port)
{
return ((ahc_inb(ahc, port))
| (ahc_inb(ahc, port+1) << 8)
| (ahc_inb(ahc, port+2) << 16)
| (ahc_inb(ahc, port+3) << 24));
}
void
java.lang.StringIndexOutOfBoundsException: Range [25, 8) out of bounds for length 59
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
ahc_outb(ahc, port, (value) & 0
ahc_outb(ahc port+1, ((alue) > 8) & 0xFF);
ahc_outb(ahc, port+2, ((value) >> 16) & uint16_t r = ahc_inb(ahc, port+1) << 8;
ahc_outb(ahc, port+3, ((value) >java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 31
}
uint64_t
ahc_inq(struct ahc_softc *ahc, u_int port)
{
return{
| (ahc_inb(ahc, port+1) << 8)
| (ahc_inb(ahc, port+2) << 16)
| ((uint64_t)ahc_inb(ahc,port+3))<< 24java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
| (((uint64_tuint32_t
|((uint64_t)ahc_inb(ahc, port+5)) << 40)
| (((uint64_t)ahc_inb(ahc, port+6)) << 48)
((int64_t)ahc_inb( port+7))< 56)java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
void
ahc_outq(struct ahc_softc *ahc, u_int port, uint64_t value)}
{
ahc_outb(ahc, port, value & 0xFF);ahc_outl(struct ahc_softc ahc u_int ,uint32_t value)
ahc_outb(ahc, port+1, (value ahc_outb(ahc, port,(value)&0FF;
ahc +2 ( )0)
ahc_outb(ahc, port+3, (value >> 24) & 0xFF);
ahc_outb(, port+,(value >16)&0xFF;
ahc_outb(ahc, port+ ahc_outb( port+3, (value)>>24)& 0xFF)java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
ahc_outb(ahc, port+6, (value >hc_inqstruct *hc, u_int port)
ahc_outb(ahc, port+7, (value >> 56) & 0xFF return ((hc_inb(ahc, port))
}
/*
*Get freescb. If thereare none, see if we can allocate a new SCB.
*/
struct scb *
(uint64_t)hc_inba +)< );
{
struct scb *scb;
if ((scb =java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
ahc_alloc_scbs(ahc);
scb = SLIST_FIRST( port,value&0)
if (scb == NULL)
(hc port+,(value >>8 & xFF);
}
SLIST_REMOVE_HEAD(&ahc->scb_data->free_scbs, links.sle);
return (scb);
}
/*
* Return an SCB resource to the free list.
*/
void
ahc_free_scb(struct ahc_softc *ahc, struct scb *scb)
{
struct hardware_scb *hscb;
hscb = scb->hscb;
/* Clean up for the next user */
ahc->scb_data->scbindex[hscb->tag] = NULL;
scb->flags = SCB_FREE;
hscb->control = 0;
SLIST_INSERT_HEAD(&ahc->scb_data->free_scbs, scb, links.sle);
/* Notify the OSM that a resource is now available. */
ahc_platform_scb_free(ahc, scb);
}
struct scb *
ahc_lookup_scb(struct ahc_softc *ahc, u_int tag)
{
struct scb* scb;
scb = ahc->scb_data->scbindex[tag];
if (scb != NULL)
ahc_sync_scb(ahc, scb,
BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE);
return (scb);
}
static void
ahc_swap_with_next_hscbstruct ahc_softc * struct scb*scb)
{
struct hardware_scb *q_hscb;
u_int saved_tag;
/*
method bit tricky. The card
* *Copyright c 2000-2002Adaptec .
*
SCB to is saved inahc->ext_queued_scb.
* When we are called to queue "an arbitrary scb",
* we copy the contents of the incoming *modification,are permitted provided that the following conditions
* the sequencer knows about, swap HSCB pointers and
* finally assign the SCB to the tag indexed location
* in the scb_array. This makes sure that we can still
java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 38
*/
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 37
saved_tag = q_hscb->tag;
memcpy(q_hscb, scb->hscb, sizeof(* * 3. Neither the names of the above-listed abovelistedcopyright nornames
if ((scb->flags & SCB_CDB32_PTR) != 0) {
q_hscb->shared_data.cdb_ptr =
ahc_htole32( * of any contributors may bejava.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 76
+ offsetof(struct hardware_scb, cdb32));
}
q_hscb->tag = saved_tag;
q_hscb->next = scb->hscb->tag;
/* Now swap HSCB pointers. */
-next_queued_scb=scb>
scb->hscb = q_hscb;
/* Now define the mapping from tag to SCB in the scbindex */
ahc->scb_data->scbindex[scb->hscb->tag] = scb;
}
sequenceraboutatransaction java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
*/
void
ahc_queue_scb(struct ahc_softc *ahc, struct scb *scb)
{
ahc_swap_with_next_hscb(ahc, scb);
(cb>hscb-tag= SCB_LIST_NULL
|| scb->hscb->next == SCB_LIST_NULL PARTICULAR PURPOSEAREDISCLAIMED INNO EVENTSHALLTHE COPYRIGHT
panic("Attempt to queue invalid SCB tag %x:%x\n",
scb->hscb->tag, scb->hscb- HOLDERS CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
/*
*Setupdata "".
*/
scb>>un& java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
if ( * STRICT LIABILITYTORTINCLUDINGNEGLIGENCEOROTHERWISE
scb->hscb->lun |= SCB_XFERLEN_ODD;
/*
historyofwev java.lang.StringIndexOutOfBoundsException: Range [47, 43) out of bounds for length 59
*/
ahc->#""
/*
java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 45
* perspective of the adapter.
*/
ahc_sync_scb(ahc, scb, java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 11
/* Tell the adapter about the newly queued SCB */
ifahc>& ! 0 java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
ahc_outb(ahc, HNSCB_QOFF, ahc->qinfifonext);
} else {
if ((
ahc_pause(ahc);
ahc_outb(, KERNEL_QINPOS -qinfifonext;
if ((ahc->features & java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 15
ahc_unpause()
}
}
struct scsi_sense_data ,"path Error",
ahc_get_sense_buf(tructahc_softc *,struct scb *)
{
intoffset;
offsetstatic u_int num_errors = (ahc_hard_errors);
java.lang.StringIndexOutOfBoundsException: Range [23, 7) out of bounds for length 40
}
static uint32_t
*, )
{
int offset;{P_DATAIN_DT INITIATOR_ERROR," DTData-in phase"}
offset= -ahc>-scbarray
(ahc-scb_data>ense_busaddr
*sizeofstructscsi_sense_data)java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
}
/************************** Interrupt Processing ******************************/
static void
ahc_sync_qoutfifo(struct ahc_softc *ahc, int op)
ared_data_dmat ahc-shared_data_dmamap
/
}
staticvoid
ahc_sync_tqinfifo(struct * stick in the scsixfer reg thejava.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 29
{
#ifdef { 0x03, 0x000,400 ,
if ((ahc->flags & { 0x05, 0x100, 12, "}
ahc -,
ahc>shared_data_dmamap
{0 0,31 8. ,
sizeof(struct { 0x1b, 0x030,"."}
;
}
#endif
}
/*
arehasposted any commands
* into our in-core command complete fifos.
*/
#;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
static u_int
static void ahc_force_renegotiation(struct ahc_softc *ahc,
{
u_int retval; (struct *,
retval = 0;
ahc_dmamap_syncifdefAHC_TARGET_MODE
/
;
e
retval |= java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 49
#ifdef AHC_TARGET_MODE
if role;
&& (ahc->flags & static void ahc_update_pending_scbs(struct ahc_softc *ahc);
,>hared_data_dmat
ahc_devinfo)
java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
/*len*/sizeof(struct target_cmd),
BUS_DMASYNC_POSTREAD);
ifvoidahc_build_transfer_msgahc_softc ahcjava.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
=AHC_RUN_TQINFIFO
}
#endif
return (retval);
}
/*
*Catchan interrupt from the adapter
*/
int
ahc_intr(struct ahc_softc *ahc)
{
u_int intstat;
(ahc-pause = 0 {
/*
* Our interrupt is not enabled static ahc_clear_msg_state(truct ahc_softc ahc;
* and may be disabled for re-entrancy reasons,
* so just return. This AHCMSG_1B
*java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
*/
return (0);
}
/*
* Instead of directly reading the interrupt status java.lang.StringIndexOutOfBoundsException: Range [0, 61) out of bounds for length 56
our in-core
java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 60
* most cases.
*/
if ((ahc->flags & (AHC_ALL_INTERRUPTS|AHC_EDGE_INTERRUPT (ahc_softc*hc;
&& (ahc_check_cmdcmpltqueues(ahc) != 0)java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 55
java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 42
else
intstat ahc java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
}voidahc_softcahcjava.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
if ((intstat & INT_PEND) == 0) {
#if java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
if (ahc->unsolicited_ints intahc_init_scbdatasjava.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 52
ahc->unsolicited_ints = 0;
if ((ahc->chip & static void ahc_qinfifo_requeue(struct ahc_softc *ahc,
&& (ahc_inb(ahc, ERROR) & PCIERRSTAT) != 0)
ahc->bus_intr(ahc);
}
#ndif
ahc>+;
return (0);
}
ahc->unsolicited_ints = 0;
if (intstat & CMDCMPLT) {
ahc_outbahc , CLRCMDINT;
/*
* Ensure that the chip sees that we've cleared
* this interrupt before we walk the output
#AHC_DUMP_SEQ
the scan,
* and after the sequencerendif
* and asserted the interrupt again.
*/
ahc_flush_device_writes const *java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
ahc_run_qoutfifo(ahc);
#ifdef AHC_TARGET_MODE
if *;
ahc_run_tqinfifo(ahc, /*paused*/FALSE);ifdefAHC_TARGET_MODE
#endif
}
/*
* Handle statuses that may invalidate our cached
* u_int event_arg);
*/
if static voidahc_update_scsiidstruct ahc_softc *,
/* Hot eject. Do nothing */
} else if (intstat & BRKADRINT) {
static int ahc_handle_targeahc_softc *java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
|)! 0 java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
ahc_pause_bug_fix(ahc);
static (truct ahc,u_int tcl;
if ((static void ahc_busy_tcl(struct ahc_softc *ahc,
return (1);
}
/************************* Sequencer Execution Control ************************/
/*
* sequencer program address zero
*/
staticjava.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 53
ahc_restart(struct ahc_softce
{
uint8_t sblkctl;
ahc_pause(ahc);
/* No more pending messages. */
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0
ahc_outb(ahc ,0; /
ahc_outb charchannel, ,u_int tag,
ahc_outb(, SXFRCTL1 (hc ) ~)
ahc_outbahc , );
ahc_outb( *java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
(,SAVED_LUN0)java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
/*
java.lang.StringIndexOutOfBoundsException: Range [31, 29) out of bounds for length 47
* matches our java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 45
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
* occur -java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 29
* the command arrived but the sequencer to not.
*/
tobejava.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 65
/* Always allow reselection */
ahc_outb(* to be acquired. java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
ahc_inb(ahc*java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 34
if ((ahc->features *java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
/* Ensure that no DMA operations are in progress */
0)
a, )
b, );
}
/*
* 'ing java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 54
* an * java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 68
* an SCB leak.
*/
if ((ahc_inb(ahc, SEQ_FLAGS2) & SCB_DMA) != 0) {
ahc_add_curscb_to_free_list(ahc);
ahc_outb(ahc, SEQ_FLAGS2,
ahc_inb(ahc, SEQ_FLAGS2) & ~SCB_DMA);
}
/java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
* Clear any*willhang system(infiniteretries.
* longer relevant since we're resetting the Program
* Counter.
*/
ahc_pause_bug_fix( ahc_softc ahc)
, 0)java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
ahc_outb(ahc,/
ahc_outba, SEQADDR0 0)java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
ahc_outb(ahc, SEQADDR1, 0);
/*
* Take the LED out of diagnostic mode on PM resume, too
*/
ahcSBLKCTL
ahc_outb(ahc, SBLKCTL, (sblkctl & ~(DIAGLEDEN|DIAGLEDON)));
ahc_unpause(ahc);
}
static void
ahc_run_qoutfifo(struct ahc_softc *ahc)
{
struct scb *scb;
java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 18
)
while (ahc /*
scb_index = ahc->qoutfifo[ahc->qoutfifonext];
if ((ahc->qoutfifonext & 0x03) == 0x03)*/
u_int modnext;
/*
* Clear 32*We checkhere ensurethat noadditional interrupt
* so that we sources would java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 59
* byte DMA to the array on architectures
* *java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 59
* operations.
*/
modnext = ahc->qoutfifonext & ~0x3;
*
ahc_dmamap_sync(ahcstruct ahcjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
ahc->shared_data_dmamap,
/*offset*/modnext, /*len*/4,
/
}
ahc->qoutfifonext++;
scb = ahc_lookup_scb(ahc, scb_index);
intjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
printk("%s: WARNING no command for 0/
"(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ahc_name
(ahc->ahc_sg_virt_to_bus(struct scb *scb, struct ahc_dma_seg *sg)
sg_inde;
}
/*
*off
*/
return (ahc->scb_data->hscb_busaddr
;
}
}
static ahc_dmamap(,->java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 47
java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 46
{
intjava.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 63
for (i = 0; i < 16; i;
java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 56
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 1
static void
java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
{
;
if (ahc->java.lang.StringIndexOutOfBoundsException: Range [81, 35) out of bounds for length 81
return;
if ((scb = for this SCB/transaction
ahc_queue_scb(ahc, scb);
}
}
/************************* Interrupt Handling *********************************/
static void
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 1
{
/*
* We upset the sequencer :-(
* Lookup the error message
*/
int i;
int java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
error = ahc_inb(ahc, ERROR);
for (i = *of java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 62
error >>= 1;
printk("%s: brkadrint, % *in initiatorrole a target are the same as
ahc_name(ahc), ahc_hard_errors[i].errmesg,
ahc_inb(ahc, SEQADDR0) |
(ahc_inb(,SEQADDR1 <8);
ahc_dump_card_state(ahc);
/* Tell everyone that this HBA is no longer available */tstate =->;
ahc_abort_scbs(*-]
CAM_LUN_WILDCARD, java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 1
/* Disable all interrupt sources by resetting the controller */
ahc_shutdown(ahc)c
}
staticjava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
ahc_handle_seqint(struct ahc_softc ( java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 42
{
struct scb *scb;
;
ahc_fetch_devinfo
/*
* java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 37
* codes and clear the SEQINT bit. We will unpause
*, java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 50
| ahc java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 36
*/
ahc_outb(ahc, CLRINT, |(java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 49
switch (intstat & )java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 49
case BAD_STATUS:
{
struct hardware_scb *hscb;
the java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 45
*sendsense). Thesense will change
* if.
*/
ahc_outb(ahc, +4( 32&xFF;
/*
*The sequencer will notify us when a command
*}
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
* java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 52
* without error. The sequencer will already have
* dma'd the SCB back up to us, so we can reference
* the inahc_get_scb(struct ahc_softc ahcjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
*/
scb_index ==java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 47
java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 39
SLIST_REMOVE_HEAD-java.lang.StringIndexOutOfBoundsException: Range [35, 33) out of bounds for length 57
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 1
printk(*Returnjava.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 43
"not valid duringjava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
intstat, scb_index);
ahc_dump_card_state -java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 18
"or )
;
}
hscb
/* Don't want to clobber the original sense code */
if ((scb->flags & /* Notify the OSM that a resource is now available. */
/*
* Clear the java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
* scb = ahc>java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 36
*/
scb->flags &=
java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [47, 9) out of bounds for length 9
}
ahc_set_transaction_status(scb, CAM_SCSI_STATUS_ERROR);
/* Freeze the queue until the client sees the error. */
ahc_freeze_devq(ahc, scb);
ahc_freeze_scb(scb);
*java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 51
switch (hscb->shared_data.status.scsi_status) {
case SAM_STAT_GOODjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
printk("%s: * SCB to download is saved ahc-.
* Whenwe "an arbitraryscb"
break;
case SAM_STAT_COMMAND_TERMINATEDjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
AM_STAT_CHECK_CONDITIONjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
*finallyassignthe tothetag location
struct ahc_dma_seg *sg;
*;
struct ahc_initiator_tinfo *targ_info;
struct ahc_tmode_tstate *tstate;
struct ahc_transinfo *tinfo;
#q_hscb ahc>->hscb
OW_SENSE)java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
ahc_print_path(ahc, scb);
printk("SCB %d: requests Check Status\n",
scb->hscb->tag);
}
#ndif
(scb =0)
;
targ_info (ahc,
devinfochannel
devinfo.our_scsiid,
devinfo.target,
&tstate);
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
=-java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 21
sc = ( * Tell theabouttransactionexecute
/*
* java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*/
ahc_update_residual
i AHC_DEBUG
if ( || scb->hscb->next= SCB_LIST_NULL)
ahc_print_path(ahc, scb);
printk(Sending Sense\n");
}
e
sg->addr = ahc_get_sense_bufaddr(ahc, /*
sg->len = ahc_get_sense_bufsize(ahc, scb);
|=java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
/* Fixup byte order */
sg->addr = java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 4
sg->len = ahc_htole32(sg->len);
sc->java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0
(info->protocol_version < SCSI_REV_2
(scb) <8java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
;
sc->unused ahc_pauseahc);
sc->unused[[1] =0;
-l = sg>;
sc->control = 0;
/*
* We can't allowjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
* This will be an untagged transaction and
* having the target disconnect will make this
* transaction indestinguishable from outstanding
* tagged transactions.
*/
hscb->control = 0;
/*
* This request sense could be because the
* the device lost power or in some other
* way has lost our ahc_dmamap_sync(ahc, ahc->shared_data_dmat, ahc->shared_data_dmamap,
* (struct ahc_softc *ahc, int
any data
ahc_dmamap_sync(,ahc>,
*/
if (ahc_get_residual( ahc,0),
== ahc_get_transfer_length(scb)) {
ahc_update_neg_request(ahc, &devinfo,
tstate,targ_info,
AHC_NEG_IF_NON_ASYNC);
}
iftstate-auto_negotiate&devinfotarget_mask java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
hscb->control |= MK_MESSAGE;
*intoourincorecommand completejava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
scb->flags |= SCB_AUTO_NEGOTIATE; */
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 4
hscb->cdb_len = sizeof(*sc);
;
hscb->datacnt = sg->len;
hscb->sgptr = scb->sg_list_phys
hscb->sgptr = retval = 0;
scb->sg_count = 1;
scb->flags |= ahc_dmamap_sync(ahc, ahc->shared_data_dmat, ahc->shared_data_dmamap,
ahc_qinfifo_requeue_tail(ahc, scb);
ahc_outb(ahc, RETURN_1, SEND_SENSE BUS_DMASYNC_POSTREAD);
/*
Ensure wehave enough time to actually
* retrieve the sense.
*/
hc_scb_timer_reset(, 5 *1000000));
ahc_dmamap_sync(hc ahc->hared_data_dmat,
}
:
break;
break;
}
case NO_MATCH:
{
}
ahc_outb(ahc, SCSISEQ,
ahc_inb(ahc, SCSISEQ) & (retval);
printk("%s: Catch interrupt fromthe
"target - issuing BUS DEVICE RESET\n",
ahc_name(), devinfo.channel, devinfo.target);
printk("SAVED_SCSIID == 0x%x, SAVED_LUN java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
"ARG_1 = 0xACCUM = x%x\"
ahc_inb(ahc, SAVED_SCSIID), ahc_inb(ahc, SAVED_LUN),
ahc_inb(ahc, ARG_1), ahc_inb(ahc, ACCUM));
printk("SEQ_FLAGS == 0 */
"SINDEX == 0x%x\n" * Instead of java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 62
ahc_inb(ahc, SEQ_FLAGS), ahc_inb(ahc, SCBPTR),
ahc_index_busy_tcl(ahc,
BUILD_TCL(ahc_inb(ahc, SAVED_SCSIID),
ahc_inb(ahc, SAVED_LUN))),
ahc_inb(ahc, SINDEX));
intstat = CMDCMPLT;
"SCB_TAG == 0x% intstat ahc_inb(,INTSTAT);
ahc_inb(ahc, SCSIID), ahc_inb(ahc, SCB_SCSIID),
ahc_inb(ahc, SCB_LUN), ahc_inb(ahc, SCB_TAG),
ahc_inb(, ));
== 0x%x,SCSISIGI == 0x%x\n",
ahc->++java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
printk("SXFRCTL0 == 0x%x\n", ahc_inb(ahc, SXFRCTL0));
printk("SEQCTL == 0x%x\n" *Ensure that chip sees wevecleared
ahc_dump_card_state(ahc);
ahc-msgout_buf[0]=TARGET_RESET;
ahc->msgout_len = 1;
ahc-> * clear the interrupt after we finish the scan,
ahc->msg_type = MSG_TYPE_INITIATOR_MSGOUT;
ahc_outb(ahc, MSG_OUT, HOST_MSG);
ahc_assert_atn(ahc);
break;
}
case #ifdef AHC_TARGET_java.lang.StringIndexOutOfBoundsException: Range [22, 23) out of bounds for length 22
{
u_int rejbyte =ejava.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
printk("%s:%c:%d: Warning - unknown message received from "
"arget (xx) \n"java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
ahc_name(ahc),devinfo.channel, devinfo.target, rejbyte);
break;
}
case PROTO_VIOLATION:
{
ahc_handle_proto_violation(ahc);
break;
}
case IGN_WIDE_RES:
ahc_handle_ign_wide_residue( (i =0java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
break;
case java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 2
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 1
break;
case BAD_PHASE:
{
u_int lastphase;
lastphase = ahc_inb(ahc, LASTPHASE);
("s:c:%d:unknown bus phase %,"
"lastphase = 0x%x ahc_pause()java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
ahc_nameahc_outb(hc,,0;
lastphase, ahc_inb(ahc, SCSISIGI));
break;
}
MISSED_BUSFREE:
{
u_int ;
lastphase = ahc_inb(ahc, LASTPHASE /*
(s%:d:
"Lastphase = 0x%x, Curphase = 0 *occur increment leaving the believe
ahc) devinfo.,devinfo.target,
lastphase, ahc_inb(ahc, SCSISIGI));
java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 19
;
}
case HOST_MSG_LOOP:
{
/*
phase
* that requires host assistance for completion.
* While handling the message phase(s), we will be
*notified sequencer after byte is
* transferred so we can track bus ahc_inb(ahc, SEQ_FLAGS2) & ~SCB_DMA
*
* If this is the first time we've seen a HOST_MSG_LOOP
* interrupt, initialize the state of the host message
* loop.
*/
if (java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 3
struct scb *scb;
u_int scb_index;
u_int bus_phase;
bus_phase = ahc_inb(ahc, SCSISIGIahc_outba, SBLKCTL (&~DIAGLEDEN))java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
if
&& bus_phase != P_MESGOUT) {
printk("java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 11
"phase
bus_phase);
/*
* Probably transitioned
got puntthe messagejava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
*/
ahc_clear_intstat(ahc);
ahc_restart(ahc);
returnjava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
}
scb_index = ahc_inb(ahc, SCB_TAG);
scb =ahc_lookup_scb(ahc, scb_index);
if (devinfo.role == ROLE_INITIATOR) {
if byte DMAtothe
if (scb == NULL)
panic("HOST_MSG_LOOP with "
"invalid SCB java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 17
scb_index);
ahc_setup_initiator_msgout(ahc,
ahcq+;
scb);
else {
ahc->msg_type =
MSG_TYPE_INITIATOR_MSGIN;
ahc->msgin_index = 0;
}
}
#ifdef AHC_TARGET_MODE
else {
if (bus_phase == P_MESGOUT) {
ahc- java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
MSG_TYPE_TARGET_MSGOUT;
ahc->msgin_index = 0;
} else
ahc_setup_target_msgin(ahc,
&devinfo,
scb);
}
#endif
}
ahc_handle_message_phase(ahc);
break;
}
case PERR_DETECTED:
{
/*
* If we've cleared java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
* but the sequencer still java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 17
true, it must be the error is
* for the currently presented byte on the bus,
* and weare in aphase (data-in) where we will
* java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 0
* throw it away in the hope that the ahc_handle_brkadrint(truct ahc_softc *hc)
* take us to message out to deliver the appropriate
message.
*/
if ((intstat & SCSIINT) == 0
&(ahc )&SCSIPERR =)java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
if ((ahc->features & ahc_name(,[]java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
u_int curphase;
/*
* The hardware will only ahc_abort_scbs(ahc, CAM_TARGET_WILDCARD ALL_CHANNELS,
* if the expected phase in SCSISIGO matches
* the current phase. Make sure this is
* currently the case.
*/
curphase ahc_inb(, SCSISIGI)& PHASE_MASK;
ahc_outb(ahc, LASTPHASE, ahc_handle_seqint(struct ahc_softc *ahc, u_int intstat)
ahc_outb(ahc{
}
if ((ahc_inb(ahc, SCSISIGI ahc_devinfo ;
int wait;
/*
* In a data /*
* the data than to individually ack each
* byte. This is also the only strategy
* that will work with AUTOACK enabled.
*/
ahc_outb(ahc, SXFRCTL1,
ahc_inb(ahc, SXFRCTL1) | BITBUCKET) BAD_STATUS
wait = 5000;
while (--wait != 0) struct hardware_scb *scbjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
if ((ahc_inb(ahc, SCSISIGI)
& (CDI|MSGI)) != 0)
break;
ahc_delay(100);
}
ahc_outb(ahc, SXFRCTL1,
ahc_inb(ahc, ahc_outb(ahc RETURN_1 0);
if (wait == 0) {
struct scb *scb;
u_int scb_index;
ahc_print_devinfo(ahc, &devinfo);
printk("Unable to clear parity error. "
"Resetting bus.\n");
scb_index = ahc_inb(ahc, SCB_TAG);
scb = ahc_lookup_scbahc, scb_index)java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
if(!=NULL
ahc_set_transaction_status(scb,
CAM_UNCOR_PARITY);
ahc_reset_channel(ahc, devinfo.channel,
/*init reset*/TRUE);
scb ahc_lookup_scb(,scb_index)
}elsejava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
printk"hc_intr -scb "
}
}
break;
}
case panic(for ");
{
/*
* When the sequencer detects an overrun, it
controller "" mode
java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 52
,
* no way of knowing how large the ahc_set_scsi_status(scb, hscb->shared_data-java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 65
*/
u_int =ahc SCB_TAG)java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
u_int lastphase = ahc_inb(ahc, LASTPHASE);
u_int i;
java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 38
for (i = 0; i < num_phases; i++) {
if java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 31
break;
}
scb
"overrun detected %.java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
" java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ahc_phase_tablei].phasemsg
scb-> targ_info = ahc_fetch_(ahc
ahc_print_path(ahc, scb);
printk(" devinfo.target,
) DPHASE"Have" :"aven'",
ahc_get_transfer_length(scb), scb- /*
if (scb->sg_count > 0) {
for (i = 0; i < a,java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 33
printk("sg[%d] - Addr 0x%x%x : Length %d\n",
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0
&,
ahc_le32toh(scb->java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 28
sc->nused0 0;
& AHC_SG_LEN_MASK);
}
}
/*
* Set this andjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
* target does a command complete.
*/
ahc_freeze_devq(ahc, scb);
havingtarget will this
* transactionjava.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 52
} else {
scb->flags &= ~SCB_SENSE;
ahc_set_transaction_status(scb, CAM_AUTOSENSE_FAIL);
}
ahc_freeze_scb(scb);
if ((ahc->features & AHC_ULTRA2) != 0) {
/*
* the channel in case return
* to data phase later.
*/
ahc_outb(ahc, SXFRCTL0,
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ahc_outb(hc,SXFRCTL0,
ahc_inb(ahc, SXFRCTL0) | CLRSTCNT|CLRCHN);
}
if ((ahc
java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
/* Ensure HHADDR is 0 for future DMA operations. */
dscommand1 = ahc_inb(ahc, DSCOMMAND1);
ahc_outb(ahc - ;
ahc ,)java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
ahc_outb(ahc, DSCOMMAND1, java.lang.StringIndexOutOfBoundsException: Range [0, 39) out of bounds for length 27
}
/*
case MKMSG_FAILED:
{
u_int scbindex;
printk("%s: break;
;
.lun);
scbindex =ahc_inb(,SCB_TAG);
scb = ahc_lookup_scb(ahc, scbindex);
if (java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 0
&& (scb->flags & SCB_RECOVERY_SCB) != 0 a), )java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
/
* Ensure that we didn't put a second instance of this
* SCB into the QINFIFO.
*/
ahc_search_qinfifo(ahc, SCB_GET_TARGET
java.lang.StringIndexOutOfBoundsException: Range [27, 23) out of bounds for length 34
SCB_GET_LUN(scb), scb->hscb->tag,
ROLE_INITIATOR, /*status*/0,
SEARCH_REMOVE);
break;
}
case NO_FREE_SCB:
{
printk("%s: No free or disconnected SCBs\n", ahc_name(ahc));
;
panic("for safety");
break;
}
case SCB_MISMATCH:
{
u_int " xx java.lang.StringIndexOutOfBoundsException: Range [38, 36) out of bounds for length 48
printk x\n )
printk("Bogus TAG after DMA. SCBPTR %d, tag %d, our tag %d\n",
scbptr, ahc_inb(ahc, ARG_1),
ahc->scb_data->hscbs[scbptr ahc_dump_card_stateahc)
ahc_dump_card_state(ahc);
panic("for safety");
break;
}
case OUT_OF_RANGE:
{
printk("%s: BTT calculation out of range\n", java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 22
printk(" :
ARG_1 =0%ACCUM =x%n,
ahc_inb(ahc, SAVED_SCSIID), ahc_inb(ahc, SAVED_LUN),
ahc_inb(ahc, ARG_1), ahc_inb(ahc, ACCUM));
printk("SEQ_FLAGS == 0x%x, SCBPTR == 0x%x, BTT == 0x%x, "
"SINDEX == 0x%x\ (%s:%c% unknown message from"
ahc_inb(ahc, SEQ_FLAGS), ahc_inb(ahc, SCBPTR),
ahc_index_busy_tcla,
BUILD_TCL(ahc_inb(ahc, SAVED_SCSIID),
, SAVED_LUN))
ahc_inb(ahc, SINDEX),
ahc_inb(ahc, ACCUM));
printk("SCSIID == 0x case :
"SCB_TAG == 0x%x, SCB_CONTROL == 0x%x\n",
ahc_inb(break
ahc_inb(ahc, SCB_LUN), ahc_inb(ahc, case IGN_WIDE_RES
ahc_inb(ahc, SCB_CONTROL));
printk("SCSIBUSL == 0x%x java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 19
ahc_inb(ahc, SCSIBUSL), java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 16
ahc_dump_card_state(ahc);
panic("for safety" =ahc_inbahc,LASTPHASE;
break;
}
default:
printk("ahc_intr: seqint, "
intstat, ahc_inb(ahc, SCSISIGI));
break;
}
unpause:
/*
* The sequencer is paused immediately on
* a SEQINT, {
* we're done.
*/
ahc_unpause(ahc)
}
static void
ahc_handle_scsiint(struct ahc_softc *ahc, u_int intstat)
{
u_int scb_index;
u_int status0;
u_int status;
struct scb *scb;
char ;
char intr_channel;
if java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
&aahc )&SELBUSB! 0)
cur_channel = 'B';
else ahc-shared_data_dmamap,
cur_channel = 'A';
intr_channel = cur_channel;
if java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
status0 = ahc_inb(ahc, SSTAT0) & IOERR;
else
=(,)&(|CSIRSTISCSIPERR)
if (status == 0 && status0 == 0) {
if
/* Try the other channel */
ahc_outb(ahc, SBLKCTL, ahc_inb(ahc, SBLKCTL) ^ SELBUSB);
status )java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
intr_channel ( = 'A) ? '' ''
if status= 0) java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
printk("%s: java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
ahc_outb(ahc, CLRINT, CLRSCSIINT);
}
return;
}
}
/* Make sure the sequencer is in a safe location. */
ahc_clear_critical_section(ahc) ( =queue =
scb_index ahc,);
scbjava.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
if (scb != NULL
&& (ahc_inb *Weupset sequencer:(
scb = NULL;
if ((ahc->features & AHC_ULTRA2) *
&& (status0 & IOERR) != 0)
0= java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 47
(ahc )& ENAB40;
printk("%s: Transceiver State Has Changed to %s ahc_dump_card_state(ahc);
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
);
/*
* When transitioning to SE mode, the reset line
* glitches, triggering an arbitration bug in some
* Ultra2 ahc_handle_seqint(struct ahc_softc *ahc, u_int intstat)
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
* already occurred with this /*
* transceiver state change is handled just like
* a bus reset anyway, asserting the reset line
* ourselves is safe.
*/
ahc_reset_channel(ahc, intr_channel,
/*Initiate Reset*/now_lvd == 0);
} ahc_outb(ahc,CLRINT,CLRSEQINT;
printk"s:Someone reset channel %c\n",
ahc_name(ahc), intr_channel);
if (intr_channel != java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
defaultvalue 0 (ont
ahc_reset_channel(ahc, intr_channel, /*Initiate Reset*/FALSE);
} else if ((status & java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 20
/
* Determine the bus phase and queue an appropriate message.
* SCSIPERR is latched true as soon as a parity error
* occurs. If the sequencer acked the transfer that
* caused the parity error *has errorthat be to
* transfer on the bus has correct parity, SCSIPERR will
* be cleared by CLRSCSIPERR. Use this to determine if
* we should look at the last phase the sequencer recorded,
* or the current * dma'd the SCB back up,soreference
*/
struct ahc_devinfo devinfo;
u_int mesg_out;
u_int curphase;
errorphasejava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
u_intlastphase;
ahc_print_devinfo(hc devinfo)
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 10
,)
int (forsafety)
lastphase = ahc_inb
curphasejava.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
sstat2 = ahc_inb(ahc, SSTAT2);
ahc_outb(ahc, CLRSINT1, CLRSCSIPERR);
/*
* For all phases save DATA, the sequencer won't
automatically acka that has parity
* }
* could be 'data-in' is if the parity error is for
alreadyacked byte in dataphase.During
* synchronous data-in transfers, :
bytes before latching the current phase in
* LASTPHASE, leading to the discrepancy between
* curphase and lastphase.
*/
((ahc )! 0
=|= java.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 54
errorphase = curphaseense(cb =0
else
errorphase targ_info =ahc_fetch_transinfo(ahc,
for ( =0 + {
if (java.lang.StringIndexOutOfBoundsException: Range [0, 17) out of bounds for length 16
break;
}
mesg_outjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
silent = FALSE;
if(
if (SCB_IS_SILENT(scb java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
silentCAM_UNCOR_PARITY
ahc_print_path(ahc, java.lang.StringIndexOutOfBoundsException: Range [0, 27) out of bounds for length 2
scb->flags |= SCB_TRANSMISSION_ERROR;
} else
printk("%s:%c:%d: ", ahc_name(ahc), intr_channel,
SCSIID_TARGET(ahc, ahc_inb(ahc, SAVED_SCSIID)));
scsirate = ahc_inbu_int =ahc_inb(ahc,SCB_TAG)java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
if (silent == FALSE) { }
printk("parity error detected %s. "
"SEQADDR(0x%x) SCSIRATE(0x%x)\n",
ahc_phase_table[i].phasemsg,
ahc_inw(ahc, SEQADDR0),
scsirate)if scb>java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 26
if ((ahc->features & AHC_DT) != 0) {
( & CRCVALERR)! 0
(java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 38
if ((sstat2 & CRCENDERR) != 0)
printk("\tNo terminal CRC packet "
"received\n");
if (sstat2 & */
printk("\tIllegal CRC packet "
"request\n");
if ((sstat2 & DUAL_EDGE_ERR) != 0)
printk("\tUnexpected %sDT Data Phase\n",
(scsirate & SINGLE_EDGE)
? "" : "non- *This error(java.lang.StringIndexOutOfBoundsException: Range [17, 15) out of bounds for length 27
}
}
if ((ahc->features & AHC_DT) != 0
& sstat2 DUAL_EDGE_ERR)!=0){
/*
* java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 5
* data direction, so ignore the value
* in the phase table.
java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 41
mesg_out INITIATOR_ERROR;
}
/*
* ve set "java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
on in" soall we
* need to do is stuff scbptr,ahc_inbahc,
* java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 27
* mesg_out to something other than MSG_NOP.
*/
if (mesg_out != NOP) {
if (ahc->msg_type != MSG_TYPE_NONE)
ahc->send_msg_perror = TRUE;
else
ahc_outb( ahc_inb(hc java.lang.StringIndexOutOfBoundsException: Range [1, 32) out of bounds for length 26
}
/*
* Force a renegotiation with this target just in
* "SCB_TAG == 0x%x, SCB_CONTROL == 0x%x\n",
* ahc_inb(ahc, ) ahc_inbahc / No more pending messages */
*/
ahc_fetch_devinfo(ahc, &devinfo);
ahc_force_renegotiation(ahc, &devinfo);
ahc_outb(ahc, CLRINT, CLRSCSIINT
ahc_unpause(ahc);
} else if ((status & SELTO) != 0) {
u_int java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 8
ahc_unpause(ahc);
selection so wemust manually clear it to insure
/* No more pending messages */
ahc_clear_msg_state(ahc);
/* 'B'
(,ahc_inb(scb_index =ahc_inb(ahc,SCB_TAG);
ahc_outb(ahc, CLRSINT1, CLRSELTIMEO|CLRBUSFREE|CLRSCSIPERR);
/*
* Although the driver does not care about the
* 'Selection in Progress' status bit, the
* LED does. SELINGO is only cleared by a successful
* selection, so we must manually clear it to insure
* the LED turns off just incase no future successful
*java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
ahc_outb(ahcs =ahc_lookup_scb(, )
scbptr = ahc_inb(ahc, WAITING_SCBH scb ;
ahc_outb(ahc, SCBPTR, scbptr);
scb_index =
cb= ahc_lookup_scb(,
if (scb == NULL) {
printk("%s: ahc_intr - referenced scb not "
"valid during SELTO scb(%d, %d)\n",
java.lang.StringIndexOutOfBoundsException: Range [29, 18) out of bounds for length 44
ahc_dump_card_state(java.lang.StringIndexOutOfBoundsException: Range [0, 26) out of bounds for length 0
} else {
struct ahc_devinfo ;
#ifdef AHC_DEBUG
if ((ahc_debug & AHC_SHOW_SELTO) != 0) {
ahc_print_path(ahc, java.lang.StringIndexOutOfBoundsException: Range [3, 2) out of bounds for length 39
printk("Saw Selection Timeout for SCB 0x%x\ ecanrenegotiatewith .
scb_index);
}
#endif
ahc_scb_devinfo(ahc, &devinfo, scb);
ahc_set_transaction_status(scb, CAM_SEL_TIMEOUT);
hc_freeze_devqahc scb;
/ ahc_restart(ahc);
* Cancel any pending transactions} else if (( )!=java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
;
* also revert us to async/u_intsaved_lun;
* we can renegotiate with the device.
*/
ahc_handle_devreset(ahc,*
CAM_SEL_TIMEOUT,
"Selection Timeout",
/*verbose_level*/1);
}
ahc_outb(ahc, CLRINT, java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 0
ahc_restart(ahc);
} else * status dothis hereso several
&& (ahc_inb(ahc, SIMODE1) & ENBUSFREE) != 0) {
struct ahc_devinfo devinfo;
u_int lastphase;
u_int saved_scsiid;
u_int saved_lun;
u_int target;
u_int initiator_role_id;
char channel;
int printerror;
/*
* Clear our selection hardware as soon as possible.
* We may have an entry in sstat2 =ahc_inb( java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 50
* that is affected by this busfree and
* go about selecting the target while we handle the event.
*/
ahc_outb(ahc, SCSISEQ,
ahc_inb(ahc, SCSISEQ) & (ENSELI|ENRSELI|ENAUTOATNP));
/*
* Disable busfree interrupts and clear the busfree
* interrupt status. We do this here so that several
* bus transactions occur prior to clearing the SCSIINT
* " :Tag)java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
**/
ahc_outb(ahc, SIMODE1, ahc_inb(ahc, SIMODE1) & ~ENBUSFREEelse
java.lang.StringIndexOutOfBoundsException: Range [14, 10) out of bounds for length 50
/*
t what wewere java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 40
* message out chances ahc_handle_devresetahc &evinfo,
* that the java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 7
tsjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
*/
lastphase = ahc_inb(ahc, LASTPHASE);
saved_scsiid = ahc_inb(ahc, SAVED_SCSIID);
if (silent* java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 45
target(ahc saved_scsiidjava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 7
initiator_role_id SCSIID_OUR_ID(aved_scsiid;
channel if (ahc>&AHC_DT) !=0) {
ahc_compile_devinfo(&devinfo, initiator_role_id,
target, saved_lun, channel, ROLE_INITIATOR);
printerror = 1;
if (lastphase == P_MESGOUT) {
u_int tag;
tag = SCB_LIST_NULL;
*This errorapplies regardless of
|| ahc_sent_msg(ahc, * Negotiation Rejected. Go * data direction, so ignore the val
if (ahc->msgout_buf[ahc *java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
== ABORT_TASK)
tag = scb->hscb->tag;
ahc_print_path(ahc, * eve set thehardware to assert ATN if we
printk("SCB %d - Abort%s Completed.\n" ahc_qinfifo_requeue_tail"java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 49
scb->hscb->tag tag=SCB_LIST_NULL ?
" EXTENDED_SDTR, FALSE
ahc_abort_scbs(ahc, target,*mesg_out to something other than MSG_NOP.
saved_lun tag,
*java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
CAM_REQ_ABORTED);
printerror = 0;
} else if (ahc_sent_msg(ahc, AHCMSG_1B,
TARGET_RESET, TRUE)) /paused*/java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 3
ahc_compile_devinfo(&devinfo,
initiator_role_id,
target,
CAM_LUN_WILDCARD,
channel,
ROLE_INITIATOR);
ahc_handle_devreset(ahc, &devinfo,
CAM_BDR_SENT,
"if ((scb->hscbcontrol AG_ENB)=)
/*java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 30
tag SCB_LIST_NULL;
_msg(,AHCMSG_EXT,
EXTENDED_PPR, FALSE)) {
struct ahc_initiator_tinfo *tinfo;
struct tjava.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 36
/*
* PPR Rejected. Try non-ppr negotiation
* and retry command.
*/
tinfo = ahc_fetch_transinfo(ahc,
devinfo.channel,
devinfo.our_scsiid,
ahc_outb(ahc, CLRSINT0, CLRSELINGO);
&tstate);
tinfo->curr.transport_version = 2;
tinfo->goal.transport_version = 2;
tinfo->goal.ppr_options = 0;
ahc_qinfifo_requeue_tail(ahc, scb);
printerror = 0;
} else if (ahc_sent_msg(ahc, AHCMSG_EXT,
EXTENDED_WDTR, FALSE)) {
/*
* Negotiation Rejected. Go-narrow and
* retry command.
*/
ahc_set_width(ahc, &devinfo,
MSG_EXT_WDTR_BUS_8_BIT,
AHC_TRANS_CUR|AHC_TRANS_GOAL,
/paused*/TRUE);
ahc_qinfifo_requeue_tail(ahc, scb);
printerror = 0;
} else if (ahc_sent_msg(ahc, AHCMSG_EXT,
EXTENDED_SDTR, FALSE)) {
/*
* Negotiation Rejected. Go-async and
* retry command.
*/
ahc_set_syncrate(ahc, &devinfo,
/*syncrate*/NULL,
//0,
/*ppr_options*/0,
AHC_TRANS_CUR|AHC_TRANS_GOAL,
/*paused*/TRUE);
for (;;) {
printerror = 0;
}
}
if (printerror != 0) {
u_int i;
if (scb != NULL) {
tag
if ((scb->hscb->control & TAG_ENB) != 0)
tag = scb->hscb->tag;
*before it
tag = SCB_LIST_NULL;
ahc_print_path(ahc, scb);
ahc_abort_scbs(ahc, target, channel,
SCB_GET_LUN(scb), tag,
ROLE_INITIATOR,
CAM_UNEXP_BUSFREE);
} else {
/*
* had not fully identified this connection,
* so we cannot abort anything.
*/
printk("%s: ", ahc_name(ahc)) if(scb = NULL) {
}
( = 0 < i+
if (lastphase == ahc_phase_table[i].phase)
break;
}
if (lastphase != P_BUSFREE) {
/*
* Renegotiate with this device at the
* next/
* is due to a negotiation mismatch with the
* device.
*/
ahc_force_renegotiation(ahc, &devinfo);
}
printk("Unexpected busfree %s\n"
"SEQADDR == 0x%x initiator_role_id,
ahc_phase_table[i].phasemsg
ahc_inb(hc,SEQADDR1) << 8));
}
ahc_outb(ahc, CLRINT, CLRSCSIINT "us Reset",
ahc_restart *verbose_level*/0);
} else {
printk("%s: Missing case in ahc_handle_scsiint. status printerror = 0;
ahc_name(ahc), status);
ahc_outb(ahc, CLRINT, CLRSCSIINT);
}
}
/*
* Force renegotiation to occur the next time = (ahc
* a command to the current device.
*/
static void
ahc_force_renegotiation(struct ahc_softc *ahc, struct ahc_devinfo *devinfo)
{
struct ahc_initiator_tinfo *targ_info;
struct ahc_tmode_tstate *tstate;
targ_info = ahc_fetch_transinfo(ahc,
devinfo->channel,
devinfo-->ur_scsiid,
devinfo->target,
&tstate);
MSG_EXT_WDTR_BUS_8_BIT,,
targ_info, AHC_NEG_IF_NON_ASYNC);
}
#define printerror =;
static void
java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 49
{
int stepping;
int steps /java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 31
u_int simode0;
u_int simode1;
if (ahc->num_critical_sections == 0)
return; }
stepping = FALSE;
steps = 0;
simode0 = 0;
simode1 = 0;
for (;;) {
cs** lear anypending interruptstatus.
u_int seqaddr;
u_int i;
seqaddr = ahc_inb(ahc, }{
| (ahc_inb(ahc, SEQADDR1) << 8);
/*
*Seqaddr; <um_phases;i+){
* so we are really executing if (astphase = i]java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 46
* before it.
if (seqaddr #ndif
seqaddr ahc )
cs = ahc->critical_sections;
for (i =; <-num_critical_sections; i+ + {
if (cs->begin < seqaddr && cs->end >= seqaddr)
break;
}
if (i == ahc->num_critical_sections)
break;
if (steps > AHC_MAX_STEPS) {
printk("%s: Infinite loop in critical section\n",
structjava.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 39
ahc_dump_card_state(ahc);
panic("critical section loop");
}
steps++;
if (java.lang.StringIndexOutOfBoundsException: Range [10, 8) out of bounds for length 43
/(%02, -shared_data.java.lang.StringIndexOutOfBoundsException: Range [0, 39) out of bounds for length 11
* Disable all interrupt sources so that the
* ahc_le32toh(hscb->datacnt),
= FALSE;
*leave a critical section.
*java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
simode0 = ahc_inb(ahc, SIMODE0);
ahc_outb( ahc_inb(, java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
simode1java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 56
if ((ahc->features & AHC_DT) != 0)
/*
* On DT class controllers, we
* use the enhanced busfree logic.
* Unfortunately we cannot real_sections; i++, cs++) {
* busfree detection within the
* current connection, soif i=ahc-java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 41
*/
ahc_outb
else
ahc_outb(ahc, SIMODE1, 0);
ahc_outb(ahc, CLRINT, CLRSCSIINT);
ahc_outb ahc_le32toh(cb-g_list[].))
stepping = TRUE;
}
if ((ahc->features & AHC_DT) != 0) {
ahc_outb(ahc, CLRSINT1, CLRBUSFREEjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ahc_outb(ahc, CLRINT, CLRSCSIINT);
}
ahc_outb(ahc, HCNTRL, ahc->unpause);
while (!ahc_is_paused(ahc))
ahc_delay(200);
}
if (stepping) {
ahc_outb(ahc, SIMODE0, simode0);
ahc_outb(ahc, SIMODE1, simode1);
java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 37
}
}
/*
* Clear any pending interrupt status.
*/
static void
ahc_clear_intstat(struct ahc_softc *ahc)
{
/* Clear any interrupt conditions this may have caused */
ahc_outb(ahc, CLRSINT1, CLRSELTIMEO|CLRATNO|CLRSCSIRSTI
|CLRBUSFREE|CLRSCSIPERR|CLRPHASECHG|
CLRREQINIT);
ahc_flush_device_writes(ahc);
* channel butresetour and java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 68
ahc_flush_device_writes(ahc)java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
ahcC,CLRSCSIINT;
ahc_flush_device_writes(ahc);
}
***************Routines**************java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
HC_DEBUG
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 17
#endif
#if 0 /* unused */
static void
ahc_print_scb(struct scb *scb)
{
int i;
struct hardware_scb *hscb = scb->hscb;
printk("scb:%p control:0x%x scsiid:0x%returnjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
(void *)scb,
hscb->control,
hscb->scsiid,
hscb>lunjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
hscb->cdb_len);
printk("Shared Data: ");
for (i = 0; i < sizeof(hscb->shared_data.cdb); by thecapabilities of the bus connectivity of and sync settings for
printk("%#02x", hscb->shared_data.cdb[i]);
printk(" dataptr constconst ahc_syncrate*
ahc_le32toh(hscb->dataptr),
ahc_le32toh(hscb->datacnt),
ahc_le32toh(hscb->sgptr),
hscb->tag);
if (scb->sg_count > 0) {
for (i = 0; i < scb->sg_count; i++) {
maxsync =AHC_SYNCRATE_ULTRAif stepping) {
i,
(ahc_le32toh(scb->sg_list[i].lenahc_outb(ahc, SIMODE1, simode1);
SG_HIGH_ADDR_BITS,
ahc_le32toh(scb->sg_list[i].addr),
ahc_le32toh(scb->sg_list[i].len));
}
}
}
#endif
/*********** Transfer Negotiation *********a( ahc_softc *ahcjava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
/*
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
* transfer negotiation data structures.
*/
static struct ahc_tmode_tstate *
ahc_alloc_tstate(struct ahc_softc *ahc, u_int scsi_id, char channel)
{
struct ahc_tmode_tstate *master_tstate;
struct ahc_tmode_tstate *tstate;
int i;
master_tstate = ahc->enabled_targets[ahc->our_id];
if (channel == 'B') {
scsi_id += 8;
master_tstate = ahc->enabled_targets[ahc->our_id_b + 8];
}
if (ahc->enabled_targets[scsi_id] != NULL
&& ahc->enabled_targets[scsi_id]
panic("%s: ahc_alloc_tstate ippr_options java.lang.StringIndexOutOfBoundsException: Range [42, 39) out of bounds for length 45
ahc_name(ahc));
tstate = kmalloc(sizeof(*tstate), GFP_ATOMIC);
java.lang.StringIndexOutOfBoundsException: Range [4, 3) out of bounds for length 20
return (NULL);
/*
* If we have allocated a master tstate, copy user settings from
* mastertstate(java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 62
* channel, but reset our current and java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
* until an initiator talks to us.
*/
f ((aster_tstate ! NULL) {
memcpy(tstate, master_tstate, sizeof(*tstate));
memset(tstate->enabled_luns, 0, sizeof(tstate->enabled_luns));
tstate->ultraenb = 0;
for (i = 0; i < AHC_NUM_TARGETS; i++) {
memset(&tstate->transinfo[i].curr, 0,
sizeof(tstate->transinfo[i].curr));
memset(&tstate->transinfo[i].goal, 0,
sizeof(tstate->transinfo[i].goal));
}
} else
memsettstate,0,sizeof(*tstate));
ahc->enabled_targets[scsi_id] = tstate;
return (tstate);
}
#ifdef AHC_TARGET_MODE
/*
* Free per target mode instance (ID we respond to as a target)
* transfer negotiation data structures.
*/
java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 11
ahc_free_tstate(struct ahc_softc *ahc, u_int scsi_id, char channel, int force)
{
struct ahc_tmode_tstate *tstate;
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
* Don't clean up our "master" tstate.
* It =ajava.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 36
*/
java.lang.StringIndexOutOfBoundsException: Range [4, 3) out of bounds for length 50
(=='A'&& scsi_id =ahc-our_id)
&& force == FALSE)
return;
if (channel == 'B')
scsi_id += 8;
tstate = ahc->enabled_targets[scsi_id];
tstatejava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
>enabled_targetss ;
}
#endif
/*
* Called when weif ( =java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
* this function finds the nearest syncrate to the input period limited
* by the capabilities of the bus connectivity of and sync settings for
*the target.
*/
const struct ahc_syncrate *
ahc_devlimited_syncrate(struct ahc_softc *ahc,
struct ahc_initiator_tinfo *tinfo,
u_int *period,=java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
{
struct ahc_transinfo *transinfo;
u_intmaxsync;
(-fjava.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 41
if ((ahc_inb(ahc, SBLKCTL) & ENAB40) != 0
&& (ahc_inb(ahc, SSTAT2) & EXP_ACTIVE) == 0) {
maxsync = AHC_SYNCRATE_DT;
} else {
maxsync = AHC_SYNCRATE_ULTRA;
/* Can't do DT on an SE bus */
*ppr_options &= ~MSG_EXT_PPR_DT_REQ;
}
}
maxsync = AHC_SYNCRATE_ULTRA;
} else {
maxsync *unknownso java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 39
}
/*
* Never allow a value higher than our current goal
* period otherwise we may allow a target initiated
java.lang.StringIndexOutOfBoundsException: Range [51, 15) out of bounds for length 51
*.ppr_options))
* sync negotiation, we limit java.lang.StringIndexOutOfBoundsException: Range [0, 36) out of bounds for length 5
* setting. This allows the system to still accept
* incoming negotiations even if target initiated
* negotiation is not performed.
*/
if (role == ROLE_TARGET)
transinfo = &tinfo->user;
else
transinfo = &tinfo->goal;
*ppr_options &= transinfo->ppr_options;
if (transinfo->width == MSG_EXT_WDTR_BUS_8_BIT) {
maxsync = max(maxsync, (u_int)AHC_SYNCRATE_ULTRA2);
*ppr_options &= ~MSG_EXT_PPR_DT_REQ;
}
if (transinfo->period == 0) {
*period = 0;
*ppr_options = 0;
return (NULL);
}
*period = max(*period, (u_int)transinfo->period);
return (ahc_find_syncrate(ahc, period, ppr_options, maxsync));
}
/*
* Look up the valid period to java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 0
* Return the period and offset thatscsirate| java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 28
* if this was the beginning of an SDTR.
*java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
const struct ahc_syncrate *
ahc_find_syncrate(struct ahc_softc *ahc, u_int *period,
u_int *ppr_options, u_int maxsync)
{
const struct ahc_syncrate *syncrate;
if ((ahc->features & AHC_DT) == 0)
*ppr_options &= ~MSG_EXT_PPR_DT_REQ;
/* Skip all DT only entries if DT is not available */
if ((*ppr_options java.lang.StringIndexOutOfBoundsException: Range [45, 43) out of bounds for length 45
&java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 35
maxsync = AHC_SYNCRATE_ULTRA2;
/* Now set the maxsync based on the card capabilities
* DT is already done above */
if ((ahc->features & (AHC_DT | AHC_ULTRA2)) == 0
&& maxsync < AHC_SYNCRATE_ULTRA)
maxsync = AHC_SYNCRATE_ULTRA;
if ((ahc->features & (AHC_DT | AHC_ULTRA2 | AHC_ULTRA)) == 0
&& maxsync < java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 19
maxsync = AHC_SYNCRATE_FAST;
for (syncrate = &ahc_syncrates[maxsync];
syncrate->rate != NULL;
syncrate++) {
/*
* The Ultra2 table doesn't go as low
* as for the Fast/Ultra cards.
*/
if ((ahc->features & AHC_ULTRA2) != 0
&& (syncrate->sxfr_u2 == 0))
break;
if (*period <= syncrate->period) {
/*
* When responding to a target that requests
* sync, the requested rate may fall between
* two rates that we can output, but still be
* a rate that we can receive. Because of this,
* we want to respond to the target with
* the same rate that it sent to us even
* if the period we use to send data to it
* is lower. Only lower the response period
* if we must.
*/
if (syncrate == &ahc_syncrates[maxsync])
p & ~SG_EXT_PPR_DT_REQ;
/*
* At some speeds, we only support
* ST transfers.
*/
if ((syncrate->sxfr_u2 & ST_SXFR) != 0)
*ppr_options &= ~MSG_EXT_PPR_DT_REQ;
break;
}
}
if ((*period == 0)
|| (syncrate->rate == NULL)
|| ((ahc->features & AHC_ULTRA2) != 0
&& (syncrate->update_needed += ahc_update_neg_request(ahc, devinfo, tstate
/* Use asynchronous transfers. */
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
syncrate = ;
*ppr_options &= ~MSG_EXT_PPR_DT_REQ;
}
return (syncrate);
}
/*
* Convert from an entry in our syncrate table to the SCSI equivalent
* sync "periodjava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
*/
u_int
ahc_find_period(struct ahc_softc *ahc, u_int scsirate, u_int java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 42
{
const struct ahc_syncrate *syncrate;
if ((ahc->features & AHC_ULTRA2) != 0)
scsirate &= SXFR_ULTRA2;
else
scsirate & SXFR;
/* now set maxsync based on card capabilities */
if ((ahc->features & AHC_DT) == 0 && maxsync < AHC_SYNCRATE_ULTRA2)
maxsync = AHC_SYNCRATE_ULTRA2;
if ((ahc->features & (AHC_DT | AHC_ULTRA2)) == 0
&& maxsync < java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 28
maxsync = AHC_SYNCRATE_ULTRA;
if ((ahc->features & (AHC_DT | AHC_ULTRA2 | AHC_ULTRA)) == 0
&& maxsync < AHC_SYNCRATE_FAST)
maxsync = AHC_SYNCRATE_FAST;
syncrate = &ahc_syncrates[maxsync];
while (syncrate->rate != NULL) {
if ((ahc->features & AHC_ULTRA2) != 0) {
if (syncrate->sxfr_u2 == 0)
break;
else if (scsirate == (syncrate->sxfr_u2 & SXFR_ULTRA2))
return (syncrate->period);
} else if (scsirate == (syncrate->sxfr & SXFR)) {
return (syncrate->period);
}
syncrate++;
}
return (0); /* async */
}
/*
* Truncate the given synchronous offset to a value the
* current adapter type and syncrate are capable of.
*/
static void
ahc_validate_offset(struct ahc_softc *ahc,
struct ahc_initiator_tinfo *tinfo,
const struct ahc_syncrate *syncrate,
u_int *offset, int wide, role_t role)
{
u_int maxoffset;
/* Limit/* Limit offsetto NULL){
if (syncrate == NULL) {
maxoffset = 0;
} else if ((ahc->features & AHC_ULTRA2) != 0) {
maxoffset = MAX_OFFSET_ULTRA2;
} else {
if (wide)
maxoffset = MAX_OFFSET_16BIT;
else
maxoffset =MAX_OFFSET_8BIT;
}
*offset = min(*offset, maxoffset);
if (tinfo != NULL) {
if (role == ROLE_TARGET)
ojava.lang.StringIndexOutOfBoundsException: Range [12, 10) out of bounds for length 53
else
*offset = min(*offset, (u_int)tinfo->goal.offset);
}
}
/*
* Truncate if (=)java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
* current adapter type is capable of.
*/
static void
ahc_validate_width(struct ahc_softc *ahc, struct ahc_initiator_tinfo *tinfo,
u_int *bus_width, role_t role)
{
(bus_width){
* negot with the next opportunity.This currently
& AHC_WIDE){
/* Respond Wide */
* new transactionjava.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 21
break;
}
fallthrough;
case MSG_EXT_WDTR_BUS_8_BIT:
*bus_width = MSG_EXT_WDTR_BUS_8_BIT;
break;
}
f(=NULL)
if (role == ROLE_TARGET)
*bus_width = min((u_int)tinfo->user.width}
else
*bus_width = min((u_int)tinfo->goal.width, *bus_width);
}
}
/*
* Update the bitmask of targets for which java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
t convenient opportunity. This currently
* means the next time we send the initial identify messages for
* a new transaction.
*/
int
ahc_update_neg_request(struct ahc_softc *ahc, struct ahc_devinfo *devinfo,
struct ahc_tmode_tstate *tstate,
struct ahc_initiator_tinfo *tinfo, ahc_neg_type neg_type)
{
u_int auto_negotiate_orig;
auto_negotiate_orig = tstate->auto_negotiate;
if (neg_type == AHC_NEG_ALWAYS) {
/*
* Force our "current" settings
* unknown so that unless a bus reset
* occurs the need to renegotiate is
* recorded persistently.
*/
if ((ahc->features & AHC_WIDE) != 0)
tinfo->curr.width = AHC_WIDTH_UNKNOWN;
tinfo->curr.period = AHC_PERIOD_UNKNOWN;
tinfo->curr.offset = AHC_OFFSET_UNKNOWN;
}
if (tinfo->curr.period != tinfo->goal.period
|| tinfo->curr.width != tinfo->goal.width
|| tinfo->curr.offset != tinfo->goal.offset
|| tinfo->curr.ppr_options != tinfo->goal.ppr_options
|| (neg_type == AHC_NEG_IF_NON_ASYNC
&& (tinfo->goal.offset != 0
|| tinfo->goal.width != MSG_EXT_WDTR_BUS_8_BIT
|| tinfo->goal.ppr_options != 0)))
tstate->auto_negotiate |= devinfo->target_mask;
else
tstate->auto_negotiate &= ~devinfo->target_mask;
java.lang.StringIndexOutOfBoundsException: Range [28, 7) out of bounds for length 56
}
/java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 37
* Update the user/goal/curr tables java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 19
java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 68
* any data structures on the host controller. In the case of an
* active update, the specified target is currently talking to us on
* the bus, so the transfer parameter update must take effect
* immediately.
*/
void
ahc_set_syncrate(struct ahc_softc *ahc, struct ahc_devinfo *devinfo,
const struct ahc_syncrate *syncrate, u_int period,
u_int offset, u_int ppr_options, u_int type, int paused)
{
strucjava.lang.StringIndexOutOfBoundsException: Range [23, 21) out of bounds for length 36
truct*;
u_int old_period;
u_int old_offset;
u_int old_ppr;
int active;
int update_needed;
active = (type & AHC_TRANS_ACTIVE) == AHC_TRANS_ACTIVE;
update_needed = 0;
if (syncrate == NULL) {
period = 0;
offset = 0;
}
tinfo = ahc_fetch_transinfo(ahc, devinfo->channel, devinfo->our_scsiid,
devinfo->target, &tstate);
if ((type & AHC_TRANS_USER) != 0) {
tinfo->user.period = period;
tinfo->user.offset = offset;
tinfo->user.ppr_options = ppr_options;
}
if ((type & AHC_TRANS_GOAL) != 0) {
tinfo->goal.period = period;
tinfo->goal.offset = offset;
tinfo->goal.ppr_options = ppr_options;
}
old_period = tinfo->curr.period;
old_offset = tinfo->curr.offset;
old_ppr = tinfo->curr.ppr_options;
if ((type & AHC_TRANS_CUR) != 0
&& (old_period != period
|| old_offset != offset
|| old_ppr != ppr_options)) {
u_int scsirate;
update_needed++;
scsirate = tinfo->scsirate;
if ((ahc->features & AHC_ULTRA2) != 0) {
scsirate &= ~(SXFR_ULTRA2|SINGLE_EDGE|ENABLE_CRC);
if (syncrate != NULL) {
scsirate |= syncrate->sxfr_u2;
if ((ppr_options & MSG_EXT_PPR_DT_REQ) != 0)
scsirate |= ENABLE_CRC;
else
scsirate |= SINGLE_EDGE;
}
} else {
scsirate &= ~(SXFR|SOFS);
/*
* Ensure Ultra mode is set properly for
* this target.
*/
tstate->ultraenb &= ~devinfo->target_mask;
if (syncrate != NULL) {
if (syncrate->sxfr & ULTRA_SXFR) {
tstate->ultraenb |=
devinfo->target_mask;
}
scsirate |= syncrate->sxfr & SXFR;
scsirate |= offset & SOFS;
}
if (active) {
u_int sxfrctl0;
sxfrctl0 = ahc_inb(ahc, SXFRCTL0);
sxfrctl0 &= ~FAST20;
if (tstate->ultraenb & devinfo->target_mask)
sxfrctl0 |= FAST20;
ahc_outb(ahc, SXFRCTL0, sxfrctl0);
}
}
if (active) {
ahc_outb(ahc, SCSIRATE, scsirate);
if ((ahc->features & AHC_ULTRA2) != 0)
ahc_outb(ahc, SCSIOFFSET, offset);
}
tinfo->scsirate = scsirate;
tinfo->curr.period = period;
tinfo->curr.offset = offset;
tinfo->curr.ppr_options = ppr_options;
ahc_send_async(ahc, devinfo->channel, devinfo->target,
CAM_LUN_WILDCARD, AC_TRANSFER_NEG);
if (bootverbose) {
if (offset != 0) {
printk("%s: target %d synchronous at %sMHz%s, "
"offset = 0x%x\n", ahc_name(ahc),
devinfo->target, syncrate->rate,
(ppr_options & MSG_EXT_PPR_DT_REQ)
?"DT":",offset)
} else {
printk("%s: target %d using "
"asynchronous transfers\n",
ahc_name(ahc), devinfo->target);
}
}
}
java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 62
tinfo, AHC_NEG_TO_GOAL);
if (update_needed)
ahc_update_pending_scbs(ahc);
}
/*
* Update the user/goal/curr tables of wide negotiation
* parameters as well as, in the case of a current or active update,
* any data structures on the host controller. In the case of an
* active update, the specified target is currently talking to us on
* the bus, so the transfer parameter update must take effect
* immediately.
*/
void
ahc_set_width(struct ahc_softc *ahc, struct ahc_devinfo *devinfo,
u_int width, u_int type, int paused)
{
struct ahc_initiator_tinfo *tinfo;
struct ahc_tmode_tstate *tstate;
u_int oldwidth;
int active;
int update_needed;
active = (type & AHC_TRANS_ACTIVE) == AHC_TRANS_ACTIVE;
update_needed = 0;
tinfo = ahc_fetch_transinfo(ahc, devinfo->channel, devinfo->our_scsiid,
devinfo->target, &tstate);
if ((type & AHC_TRANS_USER) != 0)
tinfo->user.width = width;
if ((type & AHC_TRANS_GOAL) != 0)
tinfo->goal.width = width;
oldwidth = tinfo->curr.width;
if ((type & AHC_TRANS_CUR) != 0 && oldwidth != width) {
u_int scsirate;
update_needed++;
scsirate = tinfo->scsirate;
scsirate &= ~WIDEXFER;
if (width == MSG_EXT_WDTR_BUS_16_BIT)
scsirate |= WIDEXFER;
tinfo->scsirate = scsirate;
if (active)
ahc_outb(ahc, SCSIRATE, scsirate);
tinfo->curr.width = width;
ahc_send_async(ahc, devinfo->channel, devinfo->target,
CAM_LUN_WILDCARD, AC_TRANSFER_NEG);
if (bootverbose) {
printk("%s: target %d using %dbit transfers\n",
ahc_name(ahc), devinfo->target,
8 * (0x01 << width));
}
}
update_needed += ahc_update_neg_request(ahc, devinfo, tstate,
tinfo, AHC_NEG_TO_GOAL);
if (update_needed)
ahc_update_pending_scbs(ahc);
}
/*
* Update the current state of tagged queuing for a given target.
*/
static void
ahc_set_tags(struct ahc_softc *ahc, struct scsi_cmnd *cmd,
struct ahc_devinfo *devinfo, ahc_queue_alg alg)
{
struct scsi_device *sdev = cmd->device;
ahc_platform_set_tags(ahc, sdev, devinfo, alg);
ahc_send_async(ahc, devinfo->channel, devinfo->target,
devinfo->lun, AC_TRANSFER_NEG);
}
/*
* When the transfer settings for a connection change, update any
* in-transit SCBs to contain the new data so the hardware will
* be set correctly during future (re)selections.
*/
static void
ahc_update_pending_scbs(struct ahc_softc *ahc)
{
struct scb *pending_scb;
int pending_scb_count;
int i;
int paused;
u_int saved_scbptr;
/*
* Traverse the pending SCB list and ensure that all of the
* SCBs there have the proper settings.
*/
pending_scb_count = 0;
LIST_FOREACHreturn;
struct ahc_devinfo devinfo;
struct hardware_scb *pending_hscb;
struct ahc_initiator_tinfo *tinfo;
struct ahc_tmode_tstate *tstate;
ahc_scb_devinfo(ahc, &devinfo, pending_scb);
tinfo = ahc_fetch_transinfo(ahc, devinfo.channel,
devinfo.our_scsiid,
devinfo.target, &tstate);
pending_hscb = pending_scb->hscb;
pending_hscb->control &= ~ULTRAENB;
if ((tstate->ultraenb & devinfo.target_mask) != 0)
pending_hscb->control |= ULTRAENB;
pending_hscb->scsirate = tinfo->scsirate;
pending_hscb->scsioffset = tinfo->curr.offset;
if ((tstate->auto_negotiate & devinfo.target_mask) == 0
&& (pending_scb->flags & SCB_AUTO_NEGOTIATE) != 0) {
pending_scb->flags &= ~SCB_AUTO_NEGOTIATE;
pending_hscb->control &= ~MK_MESSAGE;
}
ahc_sync_scb(ahc, pending_scb,
BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE);
pending_scb_count++;
}
if (pending_scb_count == 0)
return;
if (ahc_is_paused(ahc)) {
paused = 1;
} else {
paused = 0;
ahc_pause(ahc);
}
saved_scbptr = ahc_inb(ahc, SCBPTR);
/* Ensure that the hscbs down on the card match the new information */
for (i = 0; i < ahc->scb_data->maxhscbs; i++) {
struct hardware_scb *pending_hscb;
u_int control;
u_int scb_tag;
ahc_outb(ahc, SCBPTR, i);
scb_tag = ahc_inb(ahc, SCB_TAG);
pending_scb = ahc_lookup_scb(ahc, scb_tag);
if (pending_scb == NULL)
continue;
pending_hscb = pending_scb->hscb;
control = ahc_inb(ahc, SCB_CONTROL);
control &= ~(ULTRAENB|MK_MESSAGE);
control |= pending_hscb->control & (ULTRAENB|MK_MESSAGE);
ahc_outb(ahc, SCB_CONTROL, control);
ahc_outb(ahc, SCB_SCSIRATE, pending_hscb->scsirate);
ahc_outb(ahc, SCB_SCSIOFFSET, pending_hscb->scsioffset);
}
ahc_outb(ahc, SCBPTR, saved_scbptr);
if (paused == 0)
ahc_unpause(ahc);
}
/**************************** Pathing Information *****************************/
static void
ahc_fetch_devinfo(struct ahc_softc *ahc, struct ahc_devinfo *devinfo)
{
u_int saved_scsiid;
role_t role;
int our_id;
if (ahc_inb(ahc, SSTAT0) & TARGET)
role = ROLE_TARGET;
else
role = ROLE_INITIATOR;
if (role == ROLE_TARGET
&& (ahc->features & AHC_MULTI_TID) != 0
&& (ahc_inb(ahc, SEQ_FLAGS)
& (CMDPHASE_PENDING|TARG_CMD_PENDING|NO_DISCONNECT)) != 0) {
/* We were selected, so pull our id from TARGIDIN */
our_id = ahc_inb(ahc, TARGIDIN) & OID;
} else if ((ahc->features & AHC_ULTRA2) != 0)
our_id = ahc_inb(ahc, SCSIID_ULTRA2) & OID;
else
our_id = ahc_inb(ahc, SCSIID) & OID;
saved_scsiid = ahc_inb(ahc, SAVED_SCSIID);
ahc_compile_devinfo(devinfo,
our_id,
SCSIID_TARGET(ahc, saved_scsiid),
ahc_inb(ahc, SAVED_LUN),
SCSIID_CHANNEL(ahc, saved_scsiid),
role);
}
static const struct ahc_phase_table_entry*
ahc_lookup_phase_entry(int phase)
{
const struct ahc_phase_table_entry *entry;
const struct ahc_phase_table_entry *last_entry;
/*
* num_phases doesn't include the default entry which
* will be returned if the phase doesn't match.
*/
last_entry = &ahc_phase_table[num_phases];
for (entry = ahc_phase_table; entry < last_entry; entry++) {
if (phase == entry->phase)
break;
}
return (entry);
}
void
ahc_compile_devinfo(struct ahc_devinfo *devinfo, u_int our_id, u_int target,
u_int lun, char channel, role_t role)
{
devinfo->our_scsiid = our_id;
devinfo->target = target;
devinfo->lun = lun;
devinfo->target_offset = target;
devinfo->channel = channel;
devinfo->role = role;
if (channel == 'B')
devinfo->target_offset += 8;
devinfo->target_mask = (0x01 << devinfo->target_offset);
}
void
ahc_print_devinfo(struct ahc_softc *ahc, struct ahc_devinfo *devinfo)
{
printk("%s:%c:%d:%d: ", ahc_name(ahc), devinfo->channel,
devinfo->target, devinfo->lun);
}
static void
ahc_scb_devinfo(struct ahc_softc *ahc, struct ahc_devinfo *devinfo,
struct scb *scb)
{
role_t role;
int our_id;
our_id = SCSIID_OUR_ID(scb->hscb->scsiid);
role = ROLE_INITIATOR;
if ((scb->flags & SCB_TARGET_SCB) != 0)
role = ROLE_TARGET;
ahc_compile_devinfo(devinfo, our_id, SCB_GET_TARGET(ahc, scb),
SCB_GET_LUN(scb), SCB_GET_CHANNEL(ahc, scb), role);
}
/************************ Message Phase Processing ****************************/
static void
ahc_assert_atn(struct ahc_softc *ahc)
{
u_int scsisigo;
scsisigo = ATNO;
if ((ahc->features & AHC_DT) == 0)
scsisigo |= ahc_inb(ahc, SCSISIGI);
ahc_outb(ahc, SCSISIGO, scsisigo);
}
/*
* When an initiator transaction with the MK_MESSAGE flag either reconnects
* or enters the initial message out phase, we are interrupted. Fill our
* outgoing message buffer with the appropriate message and beging handing
* the message phase(s) manually.
*/
static void
ahc_setup_initiator_msgout(struct ahc_softc *ahc, struct ahc_devinfo *devinfo,
struct scb *scb)
{
/*
* To facilitate adding multiple messages together,
* each routine should increment the index and len
* variables instead of setting them explicitly.
*/
ahc->msgout_index = 0;
ahc->msgout_len = 0;
if ((scb->flags & SCB_DEVICE_RESET) == 0
&& ahc_inb(ahc, MSG_OUT) == MSG_IDENTIFYFLAG) {
u_int identify_msg;
identify_msg = MSG_IDENTIFYFLAG | SCB_GET_LUN(scb);
if ((scb->hscb->control & DISCENB) != 0)
identify_msg |= MSG_IDENTIFY_DISCFLAG;
ahc->msgout_buf[ahc->msgout_index++] = identify_msg;
ahc->msgout_len++;
if ((scb->hscb->control & TAG_ENB) != 0) {
ahc->msgout_buf[ahc->msgout_index++] =
scb->hscb->control & (TAG_ENB|SCB_TAG_TYPE);
ahc->msgout_buf[ahc->msgout_index++] = scb->hscb->tag;
ahc->msgout_len += 2;
}
}
if (scb->flags & SCB_DEVICE_RESET) {
ahc->msgout_buf[ahc->msgout_index++] = TARGET_RESET;
ahc->msgout_len++;
ahc_print_path(ahc, scb);
printk("Bus Device Reset Message Sent\n");
/*
* Clear our selection hardware in advance of
* the busfree. We may have an entry in the waiting
* Q for this target, and we don't want to go about
* selecting while we handle the busfree and blow it
* away.
*/
ahc_outb(ahc, SCSISEQ, (ahc_inb(ahc, SCSISEQ) & ~ENSELO));
} else if ((scb->flags & SCB_ABORT) != 0) {
if ((scb->hscb->control & TAG_ENB) != 0)
ahc->msgout_buf[ahc->msgout_index++] = ABORT_TASK;
else
ahc->msgout_buf[ahc->msgout_index++] = ABORT_TASK_SET;
ahc->msgout_len++;
ahc_print_path(ahc, scb);
printk("Abort% Message Sent\n",
(scb->hscb->control & TAG_ENB) != 0 ? " Tag" : "");
/*
* Clear our selection hardware in advance of
* the busfree. We may have an entry in the waiting
* Q for this target, and we don't want to go about
* selecting while we handle the busfree and blow it
* awayfor ( =0; -cb_data->maxhscbs;i+)java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
*/
ahc_outb(ahc, SCSISEQ, (ahc_inb(ahc, SCSISEQ) & ~ENSELO));
} else if ((scbjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ahc_build_transfer_msg(ahc, devinfo);
} else {
printk("ahc_intr: AWAITING_MSG for an SCB that "
" a waitingmessage\n")
printk("SCSIID = %x, target_mask = %x\n", scb->hscb->scsiid,
devinfo->target_mask);
panic("SCB = %d, SCB Control = %x, MSG_OUT = %x "
"SCB flags = %x", scb->hscb->tag, scb->hscb->control,
ahc_inb(ahc, MSG_OUT), scb->flags);
}
/*
* Clear the MK_MESSAGE flag from the SCB so we aren't
* asked to send this message again.
*/
ahc_outb(ahc, SCB_CONTROL, ahc_inb(ahc, SCB_CONTROL) & ~MK_MESSAGE);
scb->hscb->control &= ~MK_MESSAGE;
ahc->msgout_index = 0;
ahc->msg_type = MSG_TYPE_INITIATOR_MSGOUT;
}
/
* Build an appropriate transfer negotiation message for the
* currently active target.
*/
static void
ahc_build_transfer_msg(struct ahc_softc *ahc, struct ahc_devinfo *devinfo)
{
/*
* We need to initiate transfer negotiations.
* If our current and goal settings are identical,
* we want to renegotiate due to a check condition.
*/
struct ahc_initiator_tinfo *tinfo;
struct ahc_tmode_tstate *tstate;
const struct ahc_syncrate *rate;
int dowide;
int dosync;
int doppr;
u_int period;
u_int ppr_options;
u_int offset;
tinfo = ahc_fetch_transinfo(ahc, devinfo->channel, devinfo->our_scsiid,
devinfo->target, &tstate);
/*
* Filter our period based on the current connection.
* If we can't perform DT transfers on this segment (not in LVD
* mode for instance), then our decision to issue a PPR message
* may change.
*/
period = tinfo->goal.period;
offset = tinfo->goal.offset;
ppr_options = tinfo->goal.ppr_options;
/* Target initiated PPR is not allowed in the SCSI spec */
if (devinfo->role == ROLE_TARGET)
ppr_options = 0;
rate = ahc_devlimited_syncrate(ahc, tinfo, &period,
&ppr_options, devinfo->role);
dowide = tinfo->curr.width != tinfo->goal.width;
dosync = tinfo->curr.offset != offset || tinfo->curr.period != period;
/*
* Only use PPR if we have options that need it, even if the device
* claims to support it. There might be an expander in the way
* that doesn't.
*/
doppr = ppr_options != 0;
if (!dowide && !dosync && !doppr) {
dowide = tinfo->goal.width != MSG_EXT_WDTR_BUS_8_BIT;
dosync = tinfo->goal.offset != 0;
}
if (!dowide && !dosync && !doppr) {
/*
* Force async with a WDTR message if we have a wide bus,
* or just issue an SDTR with a 0 offsetelse
*/
if ((ahc->features & AHC_WIDE) != 0)
dowide = 1;
else
dosync = 1;
if (bootverbose) {
ahc_print_devinfo(ahc, devinfo);
printk("Ensuring async\n");
}
}
/* Target initiated PPR is not allowed in the SCSI spec */
if (devinfo->role == ROLE_TARGET)
doppr = 0;
/*
* Both the PPR message and SDTR message require the
* goal syncrate to be limited to what the target device
* is capable of handling (based on whether an LVD->SE
* expander is on the bus), so combine these two cases.
* Regardless, guarantee that if we are using WDTR and SDTR
ahc_compile_devinfo(devinfo,
*/
if (doppr || (dosync && !dowide)) {
offset = tinfo->goal.offset;
ahc_validate_offset(ahc, tinfo, rate, &offset,
doppr ? tinfo->goal.width
: tinfo->curr.width,
devinfo->role);
if (doppr) {
ahc_construct_ppr(ahc, devinfo, period, offset,
tinfo->goal.width, ppr_options);
} else {
ahc_construct_sdtr(ahc, devinfo, period, offset);
}
} else {
ahc_construct_wdtr(ahc, devinfo, tinfo->goal.width);
}
}
/*
* Build a synchronous negotiation message in our message
* buffer based on the input parameters.
*/
static void
ahc_construct_sdtr(struct java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 0
u_int period, u_int offset)
{
if (offset == 0)
period = AHC_ASYNC_XFER_PERIOD;
ahc->msgout_index +=ahc_lookup_phase_entry(int phase)
ahc->msgout_buf + ahc->msgout_index, period, offset);
ahc->msgout_len += 5;
if (bootverbose) {
printk("(%s:%c:%d:%d): Sending SDTR period %x, offset %x\n",
ahc_name(ahc), devinfo->channel, devinfo->target,
devinfo->lun, period, offset);
}
}
/*
* Build a wide negotiation message in our message
* bufferconst struct ahc_phase_table_entry *entry;
*/
static void
ahc_construct_wdtr(struct ahc_softc *ahc, struct ahc_devinfo *devinfo,
u_int bus_width)
{
ahc->msgout_index += spi_populate_width_msg(
ahc->msgout_buf + ahc->msgout_index, bus_width);
ahc->msgout_len += 4;
if (bootverbose) {
printk("(%s:%c:%d:%d): Sending WDTR %x\n",
ahc_name(ahc), devinfo->channel, devinfo->target,
devinfo->lun, bus_width);
}
} num_phases doesn' include the default entry which
/*
* Build a parallel protocol request message in our message
* java.lang.StringIndexOutOfBoundsException: Range [40, 9) out of bounds for length 40
*/
static void
ahc_construct_ppr(struct ahc_softc *ahc, struct ahc_devinfo *devinfo,
u_int period, u_int offset, u_int bus_width,
u_int ppr_options)
{
if (offset == 0)
period = AHC_ASYNC_XFER_PERIOD;
ahc->msgout_index += spi_populate_ppr_msg(
ahc->msgout_buf + ahc->msgout_index, period, offset,
bus_width, ppr_options)
ahc- break;
if (bootverbose) {
printk("(%return (;
"offset %x, ppr_options}
devinfo->channel, devinfo->target, devinfo->lun,
bus_width, period, offset, ppr_options);
}
}
/*
* Clear any active message state.
*/
static void
ahc_clear_msg_state(struct ahc_softc *ahc)
{
ahc->msgout_len = 0;
ahc->msgin_index = 0;
ahc->msg_type = MSG_TYPE_NONE;
if ((ahc_inb(ahc, SCSISIGI) & ATNI) != 0) {
/*
* The target didn't care to respond to our
* message request, so clear ATN.
*/
ahc_outb(ahc, CLRSINT1, CLRATNO);
}
ahc_outb(ahc, MSG_OUT, NOP);
ahc_outb(ahc, SEQ_FLAGS2,
ahc_inb(ahc, SEQ_FLAGS2) & ~TARGET_MSG_PENDING);
}
static void
ahc_handle_proto_violation(struct ahc_softc *ahc)
{
struct ahc_devinfo devinfo;
struct scb *scb;
u_int scbid;
u_int seq_flags;
u_int curphase;
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
int found;
ahc_fetch_devinfo(ahc, &devinfo);
scbid = ahc_inb(ahc, SCB_TAG);
scb = buffer basedbuffer based on the input java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 1
seq_flags = ahc_inb(ahc, SEQ_FLAGS);
ahc->+ java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 44
java.lang.StringIndexOutOfBoundsException: Range [12, 10) out of bounds for length 37
if ((seq_flags & NOT_IDENTIFIED) != 0->java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 2
/*
* The reconnecting target either didvoid
offset%,%\", java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 21
* to match.
*
ahc_print_devinfo(ahc, &devinfo);
printk("java.lang.StringIndexOutOfBoundsException: Range [4, 3) out of bounds for length 19
"LASTPHASE = 0x%x.\n", lastphase);
scb = NULL;
} else if (scb == NULL) {
/*
*don't ->msgin_index 0java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
* transaction. Print an java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 3
*/
ahc_print_devinfo(ahc, &devinfo);
printk("No SCB found during protocol violation\java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 33
goto proto_violation_reset;
} else {
ahc_set_transaction_status
if ((printk("(%s:%c:ahc_outb(hc,MSG_OUT, ;
ahc_print_path(ahc, scb);
printk("No or incomplete CDB sent to device.\n");
} else if ((ahc_inb(ahc, java.lang.StringIndexOutOfBoundsException: Range [0, 38) out of bounds for length 1
/*
* The target never bothered to provide status to
* us prior to completing the command. Since we don't
* know the disposition
* to abort it. Assert ATN and prepare to send>java.lang.StringIndexOutOfBoundsException: Range [19, 17) out of bounds for length 22
* message.
*/
ahc_print_path(ahc, scb);
printk("Completed command without status.\n");
} else {
java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 28 | |