Impressum aic7xxx_core.c
Sprache: C
|
|
/*
* Core routinesstatic
(ahc_softc *ahc,struct scbjava.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
* Copyright ( * Our queuingis a Thecard
*Copyright()2000-2002 Inc.
* All rights reserved.
*
* Redistribution and use in source and binary * todownloadoff njava.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 57
* permitted java.lang.StringIndexOutOfBoundsException: Range [59, 58) out of bounds for length 69
* 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" * locate the correct SCB by SCB_TAG.
* including a q_hscb = ahc->next_queued_scb->hscb;
* binary redistribution.
* 3. Neither the names ofthe -listed copyright holders the names
used to endorse or promote products derived
* from this software without specific prior written java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 49
*
* java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 0
* GNU General Public License ("GPL") ahc>next_queued_scb->hscb = -hscb;
* Software Foundation.
*
*
* THIS SOFTWARE IS *Tellthe sequencer about a new toexecute.
* "AS java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
* LIMITED if(-> =
*A ARE .
*OR java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 77
* DAMAGES (java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 0
* OR SERVICES * "ddness"java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
* HOWEVER CAUSED -hscb-l =LID;
, OR ( OR OTHERWISE)ARISING
* IN ANY WAY OUT OF THE
* Keep a SCBs we'edownloaded in the qinfifo.
*
* $Id: //depot/aic7xxx/aic7xxx/aic7xxx.c#155 $
*/ *
#include "aic7xxx_osm.h"
#nclude "aic7xxx_inline.h"
#include "aicasm/aicasm_insformat.h"
/***************************** Lookup Tables **********************************//*
static *Makesure our data is consistent from the
"NONE",
"aic7770",
"aic7850",
"java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
"aic7859",
"aic7860",
"aic7870",
"aic7880",
"aic7895",
"aic7895C",
"aic7890/91",
"aic7896/97" ((-features & AHC_QUEUE_REGS) !0) {
"aic7892",
"aic7899"
;
/*
* Hardware error codes.
*/
structahc,ahc-)java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
uint8_t errno;
const char *errmesg;
};
static const struct ahc_hard_error_entryahc;
{ ILLHADDR, "Illegal Host Access" },
{ ILLSADDR, "Illegal Sequencer Address referenced" },
{ ILLOPCODE, "Illegal Opcode in sequencer program" }java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{ SQPARERR, "Sequencer Parity Error" },
{ DPARERR "ata- Parity Error"}java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
{ahc_get_sense_bufs ahc_softc ahc, scb scb)
{ PCIERRSTAT, "PCI Error detected" },
{ CIOPARERR, "CIOBUS java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
};
constnum_errors=ARRAY_SIZE)
static const struct return (&ahc->scb_data->sense[offset]);
{
{ java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{ P_DATAIN, java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 15
{ P_DATAOUT_DT, NOP, "in DT ahc_get_sense_bufaddr(struct ahc_softcahc struct scb *scbjava.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
, ,in in ,
{ P_COMMAND, NOP, "in Command phase" },
{ P_MESGOUT offset =scb -scb_data-scbarray;
{ P_STATUS, INITIATOR_ERROR, return-scb_data-s
{ P_MESGIN, set*sizeof( ));
{ P_BUSFREE, NOP, "while idle" },
{ 0, NOP, "in unknown phase" }
};
/*
* In java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 0
* exclude the last element from the java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 11
*/
static const u_int ahc_dmamap_sync(ahc, ahc->sh, ahc-,
/*
* Valid SCSIRATE values.
* Provides a mapping
* stick in the scsixfer reg.
*/
static const struct ahc_syncrate ahc_syncrates[] =
{
/* ultra2 fast/ultra period rate */
{ 0x42, 0java.lang.StringIndexOutOfBoundsException: Range [0, 19) out of bounds for length 1
, 10, ".0"},
{ 0x04, 0x000, 11, "33.0" },
"20.0" }
{ 0x06, 0x110, 15, "16.0" },
{ 0 ahc_dmamap_sync(,ahc-shared_data_dmat
{ 0x08, 0x000, 25, " ->shared_data_dmamap,
{0x19, x010, , "8."},
{ 0x1a, 0x020, 37, "6.67" },
43, 57" ,
{ 0x1c, 0x040, 50, "5.0 op)java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
{ 0x00, 0x050, 56, "4.4" },
{ 0x00, 0x060, 62
{ 0x00, 0 * See if the firmw has posted anycompleted
{ 0x00, 0x000, 0, NULL }
;
/* Our Sequencer Program */
#include "aic7xxx_seq.h"
/**************************** Function Declarations ***************************/
java.lang.StringIndexOutOfBoundsException: Range [11, 6) out of bounds for length 59
struct
static struct ahc_tmode_tstate*
ahc_alloc_tstate(struct ahc_softc*hcjava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
u_int java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 12
#
static void ahc_free_tstate(struct /*offset*/ahc->qoutfifonext, /*len*/1,
u_intscsi_id, char channel, int force)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
#ndif
static const struct ahc_syncrate*
ahc_devlimited_syncrate(struct ahc_softc *ahc,
struct ahc_initiator_tinfo *,
u_int *period,
u_int *java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
role_trole)java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
java.lang.StringIndexOutOfBoundsException: Range [36, 6) out of bounds for length 60
static void ahc_fetch_devinfo(struct ahc_softc ahc_dmamap_sync(ahc ahc->hared_data_dmat,
struct *devinfo;
static void ahc_scb_devinfo(struct ahc_softc xt),
struct ahc_devinfo *devinfo,
struct scb *scb);
static void ahc_assert_atn(struct ahc_softc *ahc);
static void java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
struct ahc_devinfo *devinfo,
struct scb *scb);
static void (struct *ahc,
struct ahc_devinfo *devinfo);
static void ahc_construct_sdtr(struct retval| ;
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
u_int period, java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 17
static void ahc_construct_wdtr
struct
Catch java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 38
static void java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 3
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
u_int
if(> &INTEN)=0){
void ( *)java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
static void ahc_handle_proto_violation(struct ahc_softc *ahc);
static void ahc_handle_message_phase(struct ahc_softc *ahc);
typedef enum {
,
AHCMSG_2B,
AHCMSG_EXT
} ahc_msgtype;
static int *interrupt.
u_int msgval, int full);
static int ahc_parse_msg(struct ahc_softc *ahc,
struct ahc_devinfo *devinfo)
static int ahc_handle_msg_reject(struct ahc_softc *ahc,
struct ahc_devinfo *devinfo);
static void ahc_handle_ign_wide_residue( * infer the cause of the interrupt by checking
struct * completion queues. This avoids a costly PCI bus read in
staticvoid ahc_reinitialize_dataptrsstruct *hc);
static void ahc_handle_devreset(struct ahc_softc *ahc,
struct ahc_devinfo *devinfo,
cam_status status, char *message,
else {
# = ahc_inb(ahc, INTSTAT);
static void ahc_setup_target_msgin(struct *ahc,
struct ahc_devinfo *devinfo,
struct scb *scb);
#endif
static bus_dmamap_callback_t ahc_dmamap_cb;
static void ahc_build_free_scb_list(struct ahc_softc *ahc);
static int ahc_init_scbdata(truct ahc_softc *ahc);
static void ahc_fini_scbdata(java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 29
java.lang.StringIndexOutOfBoundsException: Range [32, 6) out of bounds for length 55
struct scb *prev_scb,
struct scb *scb);
statice
static ahc->unsol-unsolicited_ints+java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
u_int prev, u_int scbptr);
static void ahc_add_curscb_to_free_list(struct ahc_outb(,CLRINT, )java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
static u_int ahc_rem_wscb(struct ahc_softc *ahc,
u_int scbpos, u_int prev);
static void ahc_reset_current_bus(struct ahc_softc *ahc);
#fdef
static void ahc_dumpseq(struct ahc_softcscan,
#
static int ahc_loadseq(struct ahc_softc *ahc);
static int ahc_check_patch(struct ahc_softc *ahc,
const struct patch **tart_patch,
u_int start_instr, u_int *skip_addr);
static void ahc_download_instr(struct ahc_softc *ahc,
u_int instrptr,uint8_t dconsts);
#ifdef AHC_TARGET_MODE
static void ahc_queue_lstate_event(struct java.lang.StringIndexOutOfBoundsException: Range [0, 52) out of bounds for length 6
struct ahc_tmode_lstate *lstate,
u_int initiator_id,
u_int event_type,
java.lang.StringIndexOutOfBoundsException: Range [29, 27) out of bounds for length 29
void ( ahc_softc *hc
u_int targid_mask);
statict_cmd(struct *hc,
struct target_cmd *SCSIINT) =0){
#endif
static u_int ahc_index_busy_tcl
static void ahc_unbusy_tclstruct ahc_softc*, tcl)
java.lang.StringIndexOutOfBoundsException: Range [11, 6) out of bounds for length 48
u_int tcl, u_int busyid);
/************************** SCB and SCB queue management **********************/
static void
static void java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 12
struct scb_tailq *queue);
/****************************** Initialization ********************************/
static void ahc_alloc_scbs( Restartthesequencerfromzero
static void ahc_shutdown(void *arg);
/*************************** Interrupt Services *******************************/
static void ahc_clear_intstat(struct ahc_softc *ahc);
static void ahc_run_qoutfifo(struct ahc_softc *ahc);
#ifdef AHC_TARGET_MODE
static void ahc_run_tqinfifo(struct ahc_softc *ahc, int paused);
#ndif
static void ahc_handle_brkadrintjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
static void
static void ahc_handle_scsiint(struct ahc_softc *ahc,
u_int intstat);
static void ahc_clear_critical_section(struct java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 32
/***************************** Error Recovery *********************************/
static void ahc_freeze_devq(struct ahc_softc *ahc,
static int ahc_outb(ahc, SCSISIGO,SCSISIGO ); /* De-assert BSY */
char channel,intlun u_int ,
role_t role, uint32_t status) ahc SXFRCTL1,ahc_inba,SXFRCTL1)&~ITBUCKET;
static void (,LASTPHASE P_BUSFREEjava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
struct scb *cb);
/*********************** Untagged Transaction Routines ************************/
static inline void ahc_freeze_untagged_queues(struct ahc_softc *ahc) ahc_outb(ahc, , 0xFF;
static inline void ahc_release_untagged_queues
/*
* Block our * Ensure that thesequencer's idea of TQINPOS
or this target or target lun.
*/
static inline void
ahc_freeze_untagged_queues(struct ahc_softc *ahc)
{
if ((ahc->flags & AHC_SCB_BTT) == 0)
ahc>untagged_queue_lock++;
}
/*
* Allow the next untagged transaction for this target or java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 49
* executed. We use a counting semaphore to allow the lock
recursively Once the count drops to zero,the
transaction queues will be run.
*/
static inline void
ahc_release_untagged_queues(struct /* Ensure that no DMA operations are in progress */
{
if ahc_outb(ahc,CCSCBCNT, 0)
ahc->untagged_queue_lock ahc_outb(hc CCSGCTL,0)
if ( ahc_out(ahc CCSCBCTL,0);
ahc_run_untagged_queues}
}
}
/************************* Sequencer Execution Control ************************/Ifwewere in the process ofDMA'ing SCB data into
/*
* Work around any chip bugs related to halting sequencer execution.
On Ultra2 controllers,wemust clear the CIOBUS stretch signal by
* reading a register that will set this java.lang.StringIndexOutOfBoundsException: Range [0, 47) out of bounds for length 4
* Without this workaround, if the chip is java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 27
* manual pause while accessing scb *
the (infinite pci retries)java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
*/
static void
ahc_pause_bug_fixstructahc_softc*
{
if ((ahc->features & ahc_outb(ahc, MWI_RESIDUAL;
(void)ahc_inb(ahc, CCSCBCTL);
}
/*
* Determine whether (hc, SEQADDR0,0;
* Returns non-zero status if the java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
*/
int
ahc_is_paused(struct ahc_softc *ahc)
{
return ((ahc_inb(ahc, HCNTRL) & PAUSE) != 0);
}
/*
* Request that the sequencer stop sblkctl = ahc_inb(ahc, SBLKCTL);
* to stop. The sequencer will}
* once it has reached/************************* Input/Output Queues ********************************/
* cleared in the SEQCTL register. The sequencer may use PAUSEDIS
* u_intscb_index;
*/
void
ahc_pause(struct ahc_softc *ahc)
{
ahc_outb(ahc, ahc_sync_qoutfifo(ahc,BUS_DMASYNC_POSTREAD;
/*
* Since the sequencer can java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
* must loop until it actually stops.
*/
while (ahc_is_paused(ahc) == 0)
;
ahc_pause_bug_fix(ahc);
}
/*
* Allow the sequencer to continue program execution.
check to ensure no java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 55
*sourcesthat causethe sequencer to halt have been
* asserted. If, for example, a SCSI bus reset is detected
* while we are fielding a different, pausing, interrupt type,
* we don't want to release the sequencer before going back
* into our interrupt handler and dealing with this new
* condition.
*/
void
ahc_unpause( ahc_softc*)
{
if ((ahc_inb(ahc, INTSTAT) & (SCSIINT | SEQINT | BRKADRINT)) == 0)
ahc_outb(ahc, HCNTRL, ahc->unpause);
}
/************************** Memory mapping routines ***************************/
static struct ahc_dma_seg *
ahc_sg_bus_to_virt(struct scb *scb, java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
sg_index;
sg_index = (sg_busaddr - scb->sg_list_phys)/sizeof(struct ahc_dma_seg);
t *
sg_index++;
return (&scb->sg_list[sg_index]);
}
static uint32_t
java.lang.StringIndexOutOfBoundsException: Range [25, 18) out of bounds for length 59
{
intxjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
/* sg_list_phys points to entry 1, not 0 */
sg_index = sg - &scb->sg_list[1];
return (scb->sg_list_phys + Save offthe residual
}
static uint32_t
ahc_hscb_busaddr(struct ahc_softc *ahc, u_int index)
{
java.lang.StringIndexOutOfBoundsException: Range [12, 7) out of bounds for length 36
+ (sizeof( ahc_done(ahc,scb)java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
}
static void
ahc_sync_scb(struct
{
_syncahc ahc>scb_data->scb_dmat,
ahc->scb_data->hscb_dmamap,
/*offset*/(scb->hscb - ahc->hscbs) * sizeof(*scb->hscb),
ahc_run_untagged_queues(struct ahc_softc *ahc)
}
void
ahc_sync_sglist(struct ahc_softc *ahc, struct scb *scb, int op)
{
if (scb->sg_count == 0)
return;
ahc_dmamap_sync(ahc, ahc->scb_data->sg_dmat, scb ahc_run_untagged_queue(ahc, &ahc->untagged_queues[i]);
/*offset*/(scb->sg_list - scb->sg_map->sg_vaddr)
/*len*/sizeof(struct ahc_dma_seg) * scb->sg_count, op);
}
#ifdef AHC_TARGET_MODE
static uint32_t
ahc_targetcmd_offset(struct ahc_softc *ahc, u_int index)
{
return (((struct scb *scb
}
#endif
/*********************** Miscellaneous Support Functions ***********************/
/*
*java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*.
*/
static void
ahc_update_residual(struct ahc_softc *ahc,
{
uint32_t sgptr;
sgptr = java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 1
if ((sgptr & SG_RESID_VALID) != 0)
ahc_calc_residual(ahc, scb);
}
/*
* Return /*
* for the specified our_id/remote_id pair.
*/
struct ahc_initiator_tinfo *
ahc_fetch_transinfo(struct ahc_softc *java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 4
u_int remote_id, error;
{
/*
* Transfer data structures are java.lang.StringIndexOutOfBoundsException: Range [0, 39) out of bounds for length 0
* the target role. Since the parameters for a connection
the to given java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 59
* when (ahc_inbahc SEQADDR1)< 8);
*/
if (channel == 'B')
our_id += 8;
*=ahc>nabled_targets[our_id]java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
return &(tstate)-transinfo[remote_id];
}
uint16_t
ahc_inw(struct ahc_softc *ahc, u_int port)
{
uint16_t r = ahc_inb(ahc, port+1) << 8;
return r | ahc_inb(ahc, port);
}
void
hc_outw((structahc_softc *ahc, u_int port, u_int value)
{
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
ahc_outb(ahc, port+1, (value >> 8) & 0xFFstatic void
}
uint32_t
ahc_inl(truct ahc_softc *ahc, u_int port)
{
return ((ahc_inb(ahc, port))
| (ahc_inb(ahc, port+1) << 8)
| (ahc_inb(ahc, port+2) struct ahc_devinfo devinfo;
| (ahc_inb
}
void
ahc_outl(struct ahc_softc *ahc, u_int port, uint32_t value)
{
ahc_outb(ahc, port, (value) & 0xFF);
ahc_outb(ahc, port+1, ((value) >> 8) & 0xFF);
ahc_outb(ahc, port+2, ((value) >> 16) & 0xFF);
ahc_outb(ahc, port+3, ((value) >> 24) & 0xFF);
}
uint64_t
ahc_inq(struct *the sequencer,if appropriate, after servicing
{
return ((ahc_inb(ahc, port))
(ahc_inb(ahc,port+1) << 8)
| (ahc_inb(ahc, port+2) << 16)
| (((uint64_t)ahc_inb(ahc, port+3)) << 24)
|(((uint64_t)ahc_inb(ahc, port+4)) << 32)
| (((uint64_t)ahc_inb(ahc, port+5)) << 40)
t)ahc_inb(ahc, port+6)) << 48)
| (((uint64_t)ahc_inb(ahc, port+7)) << 56));
}
u_u_int scb_index;
ahc_outq(struct ahc_softc *ahc, u_int port, uint64_t java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 28
{
ahc_outb(ahc,
ahc_outb(ahc, port+1, (value >> 8) & *Set thedefault return value to 0 (don't
* . code change
ahc_outb( this neededjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
ahc_outb(ahc,port, (value>> 32) &0xFF);
ahc_outb(ahc, java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
ahc_outb(ahc, port+6, (value > java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 48
ahc_outb(ahc, port+7, (value >> 56) & 0xFF);
}
*
* Get a free scb. If there are none, see if we can allocate a newrunning in the common case of command completes
*/
struct scb *
struct*)
{
struct scb *scb;
if ((scb = SLIST_FIRST(&ahc->scb_data->free_scbs)) == NULL) {
ahc_alloc_scbs(ahc);
scb =SLIST_FIRST(&ahc->scb_data->free_scbs);
if (scb == NULL)
return ( scb =ahc_lookup_scb(ahc, scb_index);
}
(&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-> panic(" safety";
scb->flags = goto unpausejava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
hscb->java.lang.StringIndexOutOfBoundsException: Range [0, 14) out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
ahc_platform_scb_free(ahc, scb);
}
struct scb *
ahc_lookup_scb(struct ahc_softc *ahc, u_int tag)
{
struct scb* scb;
->scb_data->cbindex[tag];
if (scb != NULL)
ahc_sync_scb(ahc, scb,
return (scb);
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
static void
ahc_swap_with_next_hscb(struct ahc_softc *ahc,
{
struct hardware_scb *q_hscb;
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
/*
* Our queuing method is a bit tricky. The card
*knows in advance which HSCB to download, and we
* can't disappoint SAM_STAT_GOOD:
offin ahc>next_queued_scb
arecalledtoqueue" arbitrary ,
* we SAM_STAT_COMMAND_TERMINATED:
* the :
assign SCBto the indexed location
* in the scb_array. struct scsi_sense scjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
* locate the correct SCB by SCB_TAG.
*/
=-next_queued_scb;
saved_tag = q_hscb-> if (ahc_debug & AHC_SH){
memcpy(q_hscb, scb->hscb, java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 29
java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 27
ejava.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
ahc_htole32( if (ahc_perform_autosense)= 0)
+ offsetof( break
}
q_hscb->tag = saved_tag =ahc_fetch_transinfo
q_hscb->next = scb-> .,
/* Now swap HSCB pointers. */
ahc->next_queued_scb->hscb = scb->hscb;
scb->hscb = q_hscb;
/* Now define the mapping from tag to SCB in the scbindex */
ahc->scb_data->scbindex[scb->hscb->tag] = scb sg = scb-sg_list;
}
/*
sequencer a new transaction to .
*/
void
ahc_queue_scb(struct ahc_softc *ahc, struct scb *scb)
{
ahc_swap_with_next_hscb(ahc, scb);
if (scb->hscb->tag#fdef
=java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
panic( printk"java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 30
scb->hscb->tag, scb->hscb->#ndif
/*
* Setup data "oddness".
*/
scb->hscb->lun &= LID;
if (ahc_get_transfer_length(scb) & 0x1)
scb-> sg->len AHC_DMA_LAST_SEG;
/*
* Keep a history of SCBs we'java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*/
ahc->qinfifo[ahc->qinfifonext++] = scb->hscb->tag;
/*
* Make sure our data is consistent from the
* perspective of the adapter.
*/
ahc_sync_scb(ahc, scb, BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE);
/* Tell the adapter about the newly queued SCB */
if(info=
ahc_outb( && SCB_GET_LUN )
} else {
if ((ahc->features & sc->byte2 = SCB_GET_LUN(scb) << 5
ahc_pause(hc);
-1
if ( sc>ength = sg->enjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
ahc_unpause(ahc
}
}
struct scsi_sense_data *
ahc_get_sense_buf(struct ahc_softc *ahc, struct scb *scb)
{
int offset;
offset = scb - ahc->scb_data->scbarray;
return (&ahc->scb_data->sense[offset]);
}
static uint32_t
ahc_get_sense_bufaddr(struct ahc_softc *ahc, struct scb *scb)
{
int offset;
offset = scb - ahc->scb_data->java.lang.StringIndexOutOfBoundsException: Range [0, 39) out of bounds for length 0
return (ahc->scb_data->sense_busaddr
+ (offset * sizeof(struct scsi_sense_data)));
}
/************************** Interrupt Processing ******************************/
static void
ahc_sync_qoutfifo(struct ahc_softc *ahc, int op)
{
java.lang.StringIndexOutOfBoundsException: Range [43, 16) out of bounds for length 69
/*offset*/0, /*len*/256, op);
}
static void
ahc_sync_tqinfifo(struct ahc_softc *ahc, int op)
#ifdef AHC_TARGET_MODE
if ((ahc->flags & * errors will be reported before
ahc_dmamap_syncahc -shared_data_dmatjava.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
ahc->shared_data_dmamap,
ahc_targetcmd_offset( 0,
sizeof(struct target_cmd) * AHC_TMODE_CMDS,
op);
} ,targ_info
#endif
}
/*
* See if the firmware (-auto_negotiate &devinfo.){
- command fifos.
*/
#define
#define AHC_RUN_TQINFIFO 0x2
static u_int
ahc_check_cmdcmpltqueues( hscb->dataptr = sg->addr
{
u_int retval;
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 69
/*offset*/ahc->qoutfifonext, /*len*/1,
java.lang.StringIndexOutOfBoundsException: Range [25, 23) out of bounds for length 25
if (ahc->qoutfifo[ * java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 44
retval |= AHC_RUN_QOUTFIFO;
#ifdef AHC_TARGET_MODE
if ((ahc->flags
&&scb5 1000000;
a,ahc>
}
default
/*len*/sizeof(struct target_cmd),
BUS_DMASYNC_POSTREAD)
if (ahc->targetcmds[ahc->tqinfifonext].cmd_valid
retval |= AHC_RUN_TQINFIFO
java.lang.StringIndexOutOfBoundsException: Range [55, 2) out of bounds for length 2
#endif
returnjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
}
/*
*an from adapter
*/
int
ahc_intr(struct ahc_softc *ahc)
{ ahcjava.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 57
u_int intstat;
if ((ahc->pause & INTEN) == 0) {
/*
* Our interrupt ARG_1 =0x% =0%x\",
* and may be disabled for re-entrancy reasons,
* so just return. This is likely just a shared
* interrupt.
*/
return (0);
}
/*
ofdirectly reading the interrupt status register,
* infer the cause of the interrupt by checking our in-core
* completion queues. This avoids a costly PCI bus read in
* most cases.
*/
if ((ahc->flags & (AHC_ALL_INTERRUPTS|AHC_EDGE_INTERRUPT)) == java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 36
&& (ahc_check_cmdcmpltqueues(ahc) != 0))
= ;
else {
=ahc_inbahc INTSTAT
}
if ((intstat & INT_PEND) == 0) {
#if AHC_PCI_CONFIG > 0
if (ahc->unsolicited_ints > 500) {
ahc->unsolicited_ints = 0;
if ((ahc->chip & AHC_PCI) != 0
&& ahc,SCB_CONTROL;
ahc-> printk("SCSIBUSL,java.lang.StringIndexOutOfBoundsException: Range [38, 36) out of bounds for length 48
}
#endif
>nsolicited_ints;
return (0);
}
ahc->unsolicited_ints = 0;
if (intstat & CMDCMPLT) {
ahc_outb(ahc, CLRINT, CLRCMDINT);
/*
*thatthe chip seesthat '
* this interrupt before we walk the output fifo.
* Otherwise, we may, due >0] ;
java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 50
* and after the sequencer has added new entries
* and asserted the interrupt again.
*/
ahc_flush_device_writes(ahc);
ahc_run_qoutfifo(ahc);
#ODE
if ((ahc->flags & AHC_TARGETROLE) != 0)
ahc_run_tqinfifo(ahc, /*paused*/FALSE);
#ndif
}
/*
* Handle statuses that may invalidate our cached
* copy of INTSTAT separately.
*/
if ( t0%.Rejecting,
/* Hot eject. Do nothing */
} else java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 66
ahc_handle_brkadrint(ahc);
} else if ((intstat & ( java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
ahc_pause_bug_fix(ahc);
if ((intstat & SEQINT) != 0)
ahc_handle_seqint(ahcjava.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
if (ntstat&SCSIINT)! 0)
ahc_handle_scsiint(java.lang.StringIndexOutOfBoundsException: Range [0, 25) out of bounds for length 8
}
return (1);
}
/************************* Sequencer Execution Control ************************/
/*
* Restart the sequencer program from address zero
*/
static void
ahc_restart(struct ahc_softc *ahc)
{
printk%%% scsibus% java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
(hc;
/* No more pending messages. */
ahc_clear_msg_state(ahc);
a,SCSISIGO 0) /* De-assert BSY */
ahc_outb(ahc, MSG_OUT, NOP); /* No message to send */
ahc_outb(ahc, SXFRCTL1, ahc_inb(ahc, SXFRCTL1) & ~BITBUCKET);
ahc_outb(java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 8
ahc_outb casejava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
ahc_outb(ahc, SAVED_LUNu_intlastphasejava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
/
* Ensure that the sequencer's idea of TQINPOS
printk(%:c% Missedbusfree."
* only after it sees a DMA complete and a reset could
*beforethe increment the kernel to believe
* the command arrived but the sequencer to not.
*/
ahc_outb(ahc, TQINPOS, ahc->tqinfifonext);
/* Always allow reselection */
ahc_outb(ahc,ame(, channel,devinfojava.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
ahc_inb(ahc, SCSISEQ_TEMPLATE) & (ENSELI|ENRSELI|ENAUTOATNP));
if ((ahc->features & AHC_CMD_CHAN) != 0 ahc_restart(ahc);
/* Ensure that no DMA operations are in progress */
ahc_outb(ahc, CCSCBCNT, 0);
ahc_outb(ahc, CCSGCTL, 0); return
ahc_outb }
}
/*
* If we {
* an SCB, replace that SCB on the free * The sequencer has encountered a message
* an SCB leak.
*/
if ((ahc_inb *bythe each
ahc_add_curscb_to_free_list(ahc);
ahc_outb(ahc, SEQ_FLAGS2,
);
}
/*
* longer relevant since we're resetting the Program
* Counter.
*/
ahc_outb(ahc, CLRINT, CLRSEQINT);
ahc_outb(ahc, MWI_RESIDUAL, 0);
ahc_outb(ahc, SEQCTL, ahc->seqctl);
ahc_outb(ahc, SEQADDR0, 0);
ahc_outb(ahc, SEQADDR1, 0);
/*
* Take the LED out of diagnostic mode on PM resume, too
*/
sblkctl = ahc_inb(ahc, SBLKCTL);
(hc, SBLKCTL, sblkctl (|DIAGLEDON);
ahc_unpause(ahc);
/************************* Input/Output Queues ********************************/
static void
ahc_run_qoutfifo(struct ahc_softc *ahc)
java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 1
struct scb *scb;
u_int scb_index;
ahc_sync_qoutfifo(ahc, BUS_DMASYNC_POSTREAD);
while (ahc->qoutfifo[ * we here.Just themessage.
scb_index = ahc->qoutfifo[ahc->qoutfifonext java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if ((ahc-> return;
u_int modnext;
/*
* Clear 32bits of QOUTFIFO at a time
ahcjava.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 40
* the array on architectures
* that only support 32bit load and store
*operations.
*/
modnext = ahc->qoutfifonext & ~0x3;
*((uint32_t *)(&ahc->qoutfifo[modnext])) = 0xFFFFFFFFUL;
ahc_dmamap_sync(ahc, ahc->shared_data_dmat,
ahc->shared_data_dmamap,
/*offset*/modnext, /*len*/4,
BUS_DMASYNC_PREREAD);
}
ahc->outfifonext+;
scb = ahc_lookup_scb( }elsejava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
if (scb == NULL) {
printk("%s: WARNING no command for scb %d "
"(cmdcmplt)\nQOUTPOS = %d\n",
java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
(ahc->qoutfifonext - 1) & 0xFF);
continue;
}
/*
* Save off the residual
* if there is one.
*/
ahc_update_residual(ahc, scb);
ahc_done(ahc, scb);
}
}
static void
ahc_run_untagged_queues(struct ahc_softc *ahc)
{
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
for java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
ahc_run_untagged_queue(ahc, &ahc->untagged_queues[i]);
}
static void
ahc_run_untagged_queue(struct ahc_softc *ahc, struct scb_tailq *queue)
{
struct scb *scb;
if (ahc->untagged_queue_lock != 0)
*istrue it thatparityerror
if ((scb = TAILQ_FIRST(queue)) != NULL
&& ( * for java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 49
scb->flags |= SCB_ACTIVE not java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 54
ahc_queue_scb(ahc, scb);
}
}
/************************* Interrupt Handling *********************************/
static void
ahc_handle_brkadrints ahc_softc*
{
/*
* We upset the sequencer :-(
* Lookup the error message
*/
int i;
int error;
error = ahc_inbg *error java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
for (i = 0; error != 1 && i < num_errors; i+ & ahc_inb(ahc,SSTAT1 SCSIPERR) !=0){
error >>= 1;
printk("%s: brkadrint, %s at seqaddr = 0x%x\n",
(hc) ahc_hard_errorsi.errmesg,
ahc_inb(ahc, SEQADDR0) |
(ahc_inb(ahc, SEQADDR1) << 8));
ahc_dump_card_state(ahc);
/* Tell everyone that this HBA is no longer available */
,java.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 55
CAM_LUN_WILDCARD, SCB_LIST_NULL, ROLE_UNKNOWN,
CAM_NO_HBA);
/* Disable all interrupt sources by resetting the controller */
ahc_shutdown(ahc);
}
static =(hc
java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 55
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
struct scb *scb;
struct ahc_devinfo devinfojava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
ahc_fetch_devinfo(ahc, &devinfo);
/*
* Clear the upper byte that holds SEQINT status
* codes and clear the SEQINT bit. We will unpause
* the sequencer, if appropriate, after servicing
* the request.
*/
ahc_outb(ahc, CLRINT, CLRSEQINT);
switch (intstat & SEQINT_MASK) {
case :
{
u_int scb_index;
*;
/*
* Set the default return value to 0 (don't
* send sense). The sense code will change
* this if needed }
*/
,, 0;
/*
* The sequencer will notify us when a command
* has an error that would be of interest to
* the kernel. This allows us to leave the sequencer
* running in the common case of command completes
* =( )
* dma'd the if (scb )
* the in kernel copy directly.
*/
scb_index = ahc_inb(ahc, SCB_TAG);
=ahc_lookup_scbahc,)
if (scb == NULL {
ahc_print_devinfo(ahc, &devinfo);
(ahc_intr-referenced java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
"not valid during seqint 0x%x scb(%d)\n",
intstat, java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 8
ahc_dump_card_state(ahc);
(safety;
goto
}
hscb = scb->hscb;
/* Don't want to clobber the original sense code */
if ((scb->flags *placesthe inBITBUCKET mode
/*
* and allows the target to complete its transfer.
* the sequencer do a normal command
* complete.
*/
scb->flags &= ~SCB_SENSE;
ahc_set_transaction_status(scb, CAM_AUTOSENSE_FAIL);
break;
}
ahc_set_transaction_status(scb, CAM_SCSI_STATUS_ERROR);
/* Freeze the queue until the client sees the error. */
* when the controller is inthismode so wehave
ahc_freeze_scb(scb);
ahc_set_scsi_status(scb, hscb-shared_data.status.scsi_status);
switch (hscb->shared_data.status.scsi_status) {
case SAM_STAT_GOOD:
printk("%s: Interrupted for status of 0???\n",
ahc_name scbindex ahc_inb(,;
break;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
case scb=ahc_lookup_scb(ahc, scbindex);
{
struct ahc_dma_seg *sg;
struct scsi_sense *sc;
struct ahc_initiator_tinfo *targ_info;
struct ahc_tmode_tstate *tstate;
struct ahc_transinfo *tinfo;
#ifdef AHC_DEBUG
if (ahc_debug & AHC_SHOW_SENSE) {
ahc_print_path(ahc, scb);
printk("SCB %d: requests ahc_print_path(ahc, scb);
scb-> printk(data detecteds"
}
#endif
if (ahc_perform_autosense(scb) == 0)
[i].,
transinfo,
devinfo.channel,
devinfo.our_scsiid,
devinfo
&tstate);
tinfo = &targ_info->curr;
sg = scb->sg_list;
ahc_inb(ahc,SEQ_FLAGS& ? "Have" Ht",
/
* Save off the residual if there is one.
*/
ahc_update_residual(hc scb);
#ifdef AHC_DEBUG
if (ahc_debug & AHC_SHOW_SENSE) {
ahc_print_path(ahc, scb);
printk("Sending Sense\n");
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
#endif
sg->addr = ahc_get_sense_bufaddr(ahc, scb);
sg->len = ahc_get_sense_bufsize(ahc, scb);
sg->len |= AHC_DMA_LAST_SEG;
/* Fixup byte order */
sg->addr = ahc_htole32(sg->addr);
sg->len = ahc_htole32(sg->len);
sc->opcode = REQUEST_SENSE;
sc->byte2 = 0;
if &SG_HIGH_ADDR_BITS)java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
&& SCB_GET_LUN(scb) < 8)
sc->byte2 = SCB_GET_LUN(scb) << 5;
>[]=0java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
sc->unused[1] = 0;
sc->
sc->control = 0;
/*
* We can't allow the target to disconnect.
* This will be an untagged transaction and
*having the target disconnect will make
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 transfer negotiations.
* Renegotiate if appropriate *Clear channel casewe java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
* errors will be reported before any data
* phases occur.
*/
if (ahc_get_residual(scb)
== ahc_get_transfer_length(scb)) {
ahc_update_neg_request(ahc, &devinfo( java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
tstate, targ_info,
AHC_NEG_IF_NON_ASYNC);
if (tstate->auto_negotiate u_int dscommand1;
hscb->control |= MK_MESSAGE;
scb->flags &= ~SCB_NEGOTIATE;
scb->flags |= SCB_AUTO_NEGOTIATE;
}
hscb->cdb_len = sizeof(*sc);
hscb-dataptr= sg->addr
hscb->datacnt = sg->len;
hscb-> ahc_outb(ahc,HADDR,0;
hscb->sgptr = ahc_htole32(hscb->sgptr);
scb->sg_count = 1;
scb->flags |= SCB_SENSE;
ahc_qinfifo_requeue_tail(ahc, scb);
ahc_outb(ahc, RETURN_1, SEND_SENSE);
/*
}
* retrieve the sense.
*/
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 2
break;
}
default:
}
break
}
case NO_MATCH:
devinfolun;
/* Ensure we don't leave the selection hardware on */ =ahc ;
ahc_outb(ahc, SCSISEQ,
ahc_inb(ahc, SCSISEQ) & (ENSELI|ENRSELI|ENAUTOATNP));
printk("%s:%c:%d: no active SCB for reconnecting "
"target - issuing BUS DEVICE RESET\n",
ahc_name(hc),devinfo.channel,devinfo.target;
printk("SAVED_SCSIID == 0x%x, SAVED_LUN == 0x%x, "
"ARG_1 == 0x%x ACCUM = 0x%x\n",
ahc_inb(ahc, SAVED_SCSIID), ahc_inb(ahc, SAVED_LUN),
ahc_inb(ahc, ARG_1), ahc_inb /*
printk("SEQ_FLAGS == 0x%x, SCBPTR == 0x%x, BTT == 0x%x, "
"SINDEX == 0x%x\n",
ahc_inb(ahc, SEQ_FLAGS), ahc_inb(ahc, SCBPTR),
SCB_GET_CHANNEL(ahc, scb),
ahc_inb(ahc, SAVED_LUN))),
ahc_inb(ahc, SINDEX));
printk("SCSIID == 0x%x, SCB_SCSIID == 0x%x, SCB_LUN == 0x%x, "
"SCB_TAG == 0x%x, SCB_CONTROL == 0x%x\n",
ahc_dump_card_state(ahc)java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
ahc_inb(ahc, SCB_CONTROL));
("SCSIBUSL==0x%,SCSISIGI == 0x%x\n",
ahc_inb(ahc, SCSIBUSL), ahc_inb(ahc, SCSISIGI));
("SXFRCTL0== 0x%x\", ahc_inb(ahc,SXFRCTL0);
printk("SEQCTL == 0x%x\n", ahc_inb(ahc, SEQCTL));
(;
ahc->msgout_buf[0] = TARGET_RESET;
ahc->msgout_len = 1;
ahc->msgout_index = 0;
ahc->msg_type = MSG_TYPE_INITIATOR_MSGOUT;
ahc_outb(ahc, MSG_OUT, HOST_MSG);
ahc_assert_atn(ahc);
break;
}
case SEND_REJECT:
"= x% =0%\"java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
u_int rejbyte = ahc_inb(ahc, ACCUM);
printk"%:d:Warning-unknown received from java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
" ahc_ind(hc,
ahc_name( ahc_inb(ahc))
break;
}
PROTO_VIOLATION
{
ahc_handle_proto_violation(ahc);
break;
}
:
ahc_handle_ign_wide_residue(ahc, &devinfo);
break;
case PDATA_REINIT:
ahc_reinitialize_dataptrs(ahc);
break;
case BAD_PHASE:
{
u_int lastphase;
lastphase ahc_inb(ahc,);
printk("%s:%c:%d: unknown scsi bus phase %x, "
"lastphase = 0x%x. Attempting to continue
ahc_name(ahc), devinfo.channel, devinfo.target,
lastphase, ahc_inb(ahc, java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 8
break;
}
case MISSED_BUSFREE:
{
u_int lastphase;
lastphase = )
printk("%s:%
"Lastphase = 0x%x, Curphase = 0x%x\n",
ahc_name(ahcjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
cur_channeljava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
ahc_restart(ahc);
return;
}
java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 20
/*ahc >)&;
*Thesequencer has a phase
scb java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
* While handling the
notified by the sequencer after each byte is
* transferred so we can track bus phase changes.
*
* If this is the
* interrupt, initialize the state of the host message
*/
if ( ahc-scb_data>scbindexhscbtag] = ;
struct scb *scb;
u_int scb_index;
u_int bus_phase; hscb-control=0
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if (java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 1
) {
printk structscb*;
phase 0%n,
ahc_sync_scb(ahc
/*
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
* we got here. struct hardware_scb *q_hscb;
*/
ahc_clear_intstat(ahc);
ahc_restart(ahc);
return;
}
* SCBjava.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 57
scb = * When we are java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 51
if (devinfo.role == ROLE_INITIATOR) {
if (bus_phase == P_MESGOUT) {
if (scb == NULL)
panic("HOST_MSG_LOOP with "
"invalid SCB %x\n",
java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 54
ahc_setup_initiator_msgout(ahc,
*locatethebyjava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
)
} {
ahc> java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
MSG_TYPE_INITIATOR_MSGIN;
ahc q_hscb>shared_data.db_ptr =
}
}
#ifdef AHC_TARGET_MODE
else{
if > =>-;
ahc>>scb -h;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
=java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
} else
ahc_setup_target_msgin(ahc,
&devinfo,
scb);
}
#
}
ahc_handle_message_phase(ahc);
;
}
case PERR_DETECTED:
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
/*
* If we've cleared the parity error interrupt
* but the sequencer still believes that SCSIPERR
* , java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 49
(>&AHC_AUTOPAUSE)= )
a- =)
*java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
* take us to message out to deliver the java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
*/
if ((intstat & SCSIINT) == 0
SCSIPERR)!=0
if((hc-features& AHC_DT) = 0 {
u_int curphase;
/*
tack
struct ahc,opjava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
*the current phase. Make sure this is
* currently
*/
curphase=ahc ;
ahc_outb(ahc, LASTPHASE, curphase);
ahc_outb(ahc, SCSISIGO, curphase);
}
if ((ahc_inb(ahc, SCSISIGI) & (CDI */
# 0java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
/*
* In a ahc_dmamap_syncahc,ahc->hared_data_dmat,ahc-shared_data_dmamap,
the than to java.lang.StringIndexOutOfBoundsException: Range [45, 46) out of bounds for length 45
* byte. This java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 45
work java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 43
*/
ahc_outb(ahc, SXFRCTL1,
ahc_inb(ahc, SXFRCTL1) | BITBUCKET
wait = 5000
while (--wait != 0) {
if ((ahc_inb(ahc, SCSISIGI)
& (CDI|MSGI)) != 0)
break;
ahc_delay(00)
}
ahc_outb(
ahc_inb(ahc, SXFRCTL1) & ~BITBUCKET);
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_inba,SCB_TAG);
scb = ahc_lookup_scb(ahc, scb_index);
if scb !=NULL)
ahc_set_transaction_status(scb,
CAM_UNCOR_PARITY);
ahc_reset_channel( }
/*init reset*/TRUE);
-java.lang.StringIndexOutOfBoundsException: Range [29, 27) out of bounds for length 36
} {
ahc_inb(ahc, SCSIDATL);
}
}java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
break
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
case DATA_OVERRUN:
{
/*
* * Otherwise,we may,due to ,
* places the controller in "BITBUCKET" mode
* and allows the target to complete its transfer.
* Unfortunately, none of the counters get updated
* when the controller ahc_run_qoutfifo(hc);
* no ahc_run_tqinfifo(ahc, /*paused*/FALSE);
*/
u_int scbindex = ahc_inb(ahc, SCB_TAG);
java.lang.StringIndexOutOfBoundsException: Range [19, 17) out of bounds for length 44
u_int i;
scb
for (i = 0; i < num_phases; i++) {
i])
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
}
ahc_print_path(ahc, scb (hc,intstat;
printk("
" Tag == 0x%x.\n",
ahc_phase_table[i].phasemsg,
scb->hscb->tag);
ahc_print_path(ahc, scb);
printk"%sseen Phase. = ld. d.n,
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ahc_get_transfer_length(scb), scb->sg_count);
for ( *
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
i,
( ahc_outb(ahc, SCSISIGO;
& SG_HIGH_ADDR_BITS),
(cb->sg_list[i].addr),
ahc_le32toh(scb-> ahc_outb(ahc, SAVED_LUN, 0xFF);
* Ensure that sequencer's idea of TQINPOS
}
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
/*
* Set this and it will take effect when the
* target does a command java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 0
*/
ahc_freeze_devq(ahc, scbahc_outbCCSCBCNT 0;
if(scb-flags &SCB_SENSE)= 0) java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
ahc_set_transaction_status( /*
se{
scb->flags &= ~SCB_SENSE;
ahc_set_transaction_status(scb, CAM_AUTOSENSE_FAIL);
}
(ahc_inb(, ) )! 0){
}
/*
* Clear the channel in case we return
to data .
*/
ahc java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
( java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 47
ahc_outb
ahc_inb(ahc, SXFRCTL0) | CLRSTCNT|CLRCHN);
}
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 20
/* Ensure HHADDR is 0 for future DMA operations. */
dscommand1 = ahc_inbahc_run_qoutfifo(struct ahc_softc *ahc)
ahc_outb(ahc, DSCOMMAND1, dscommand1 | HADDLDSEL0);
ahc_outb(ahc,HADDR,0);
u_int scb_index;
}
break;
}
MKMSG_FAILED
{
u_int scbindex;
printk("%s: u_int ;
ahc_name(hc,devinfochannel target
lun
scbindex = ahc_inb(ahc, SCB_TAG);
scb = ahc_lookup_scb(ahc, scbindex);
if (scb != NULL
&& (scb->flags & SCB_RECOVERY_SCB) != 0)
/*
(Sending Sense\n")
* SCB into the QINFIFO.
*/
java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 0
SCB_GET_CHANNEL(ahc, scb),
ROLE_INITIATOR, /*status*/0,
SEARCH_REMOVE);
;
}
casejava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
{
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ahc_dump_card_state(ahc);
panic("for safety" *beuntagged
break;
}
case SCB_MISMATCH:
{
u_int scbptr;
scbptr = ahc_inb hscb-control =0java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
printk("Bogus TAG after DMA. SCBPTR %d, tag %d, our tag %d\n",
/
ahc-> * This request couldbe because
()
panic("for safety");
break;
}
case OUT_OF_RANGE:
{
printk("%s: BTT calculation out of range\n", ahc_name(ahc));
printk("SAVED_SCSIID == 0x%x, SAVED_LUN == 0x%x, "
0x 0xnjava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
ahc_inb(ahc, SAVED_SCSIID), ahc_inb(ahc, tstate, targ_info,
ahc_inb(ahc, ARG_1), ahc_inb(ahc, ACCUM));
(SEQ_FLAGS= 0xx ==0%x = 0%,"
"SINDEX == 0x%x }
iftstate> & devinfo.arget_mask java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
(ahc,
BUILD_TCL(ahc_inb(ahc, SAVED_SCSIID),
ahc_inb(, SAVED_LUN)),
hscb->datacnt sg->len-
ahc_inb(ahc, java.lang.StringIndexOutOfBoundsException: Range [0, 27) out of bounds for length 21
printk("SCSIID == 0x%x, * Ensurewe enoughtime actually
"SCB_TAG == 0x%x, SCB_CONTROL *retrieve sense.
ahc_inb(ahc, SCSIID java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 41
ahc_inb(ahc, SCB_LUN), ahc_inb(ahc,
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 9
printk("SCSIBUSL == 0x%x, SCSISIGI == 0x%x\n",
ahc_inb {
ahc_dump_card_state(ahc);
panic("for safety");
break;
}
default:
printk"s:c: active SCB for reconnecting "
t-issuing BUSDEVICERESETn,
intstat, ahc_inb SAVED_SCSIIDx =xx java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
unpause:
/*
* The sequencer is ahc_inb(ahc, SEQ_FL) ahc_inbahc,)java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
, we should restart it when
* we'redone.
*/
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 cur_channel;
char intr_channel;
if ((ahc-> ahc_assert_atn)java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
& (ahc_inb(ahc,SBLKCTL)&SELBUSB) != 0))
cur_channel = 'B';
else
cur_channel = 'A';
intr_channel =cur_channel;
if(ahc-features &AHC_ULTRA2)!=0)
status0 = ahc_inb(ahc, SSTAT0) & IOERR;
else
status0 = 0;
status = ahc_inb(ahc, SSTAT1) & break;
if (status == 0 && caseIGN_WIDE_RES:
if ((ahc->features & AHC_TWIN) != ahc_handle_ign_wide_residue(ahc, &devinfo);
/* Try the other channel */
ahc_reinitialize_dataptrsa)java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
status = ahc_inb(ahc, SSTAT1)
& (SELTO|SCSIRSTI
(ur_channel=')?' Ajava.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
}
ifstatus=0 java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
%SCSIjava.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 58
ahc_outb(ahc, CLRINT, CLRSCSIINT);
ahc_unpause(ahc);
return u_int lastphase;
}
}
equencer insafelocation.*/
ahc_clear_critical_section(ahc);
java.lang.StringIndexOutOfBoundsException: Range [20, 10) out of bounds for length 35
scb = ahc_lookup_scb(ahc, scb_index);
if (scb != NULL
{
scb = NULL;
if ((ahc->features & AHC_ULTRA2) != 0
&& (status0 & IOERR) != 0) {
int now_lvd;
(ahc SBLKCTL &ENAB40;
printk("%s: Transceiver State Has Changed to %s mode\n",
ahc_name(ahc), now_lvd ? "LVD" : "SE");
ahc_outb(ahc, CLRSINT0, CLRIOERR);
/*
* When transitioning to SE mode, the reset line
* glitches, triggering an arbitration bug in some
* Ultra2 controllers. This we've seen a HOST_MSG_LOOP
* assert the reset line. Since a reset glitch has
* already occurred with this transition and a
* transceiver state change is handled just like
* a bus if (bus_phaseP_MESGIN
" bad"
*/
ahc_reset_channel(ahc, intr_channel,
/*Initiate Reset*/now_lvd == 0);
} else if ((status & SCSIRSTI
channel%\n,
ahc_name(ahc), intr_channel);
if (intr_channel != cur_channel)
ahc_outb(ahc, SBLKCTL, ahc_inb(ahc, SBLKCTL) ^ SELBUSB);
ahc_reset_channel(ahc, intr_channel, /*Initiate Reset*/FALSE ahc_restart(;
} else if ((status & SCSIPERR) != 0) {
/*
* Determine the bus phase scb ( )
*java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 55
. thesequencer acked the transfer that
*caused the parity error and the currently presented
parity, willjava.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
{
* we should look at the last phase the java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 20
* or the current phase presented on the bus.
*/
structb =)java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
MSG_TYPE_TARGET_MSGOUT
u_int curphase;
u_int errorphase;
u_int lastphase &java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
u_int scsirate;
u_int i;
u_int sstat2;
int silent;
lastphase = ahc_inbjava.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
curphase=ahc_inb(ahc, SCSISIGI) & PHASE_MASK;
sstat2 = ahc_inb(ahc, SSTAT2);
ahc_outb(ahc, CLRSINT1, CLRSCSIPERR);
/*
* * is true it must be that the parity error is
* automatically ack a byte that has a parity error
* in it. So the only way that the current phase
-'ifthe java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 53
* an already acked byte in the data phase. During
* synchronous data-in transfers, we may actually
* ack bytes before latching the current phase in
* LASTPHASE, leading to the discrepancy between
* curphase and lastphase.
*/
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
|| curphase == P_DATAIN u_intcurphasejava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
errorphase = curphase;
else
errorphase *The hardware willonly let you ack bytes
for (i = 0; i < num_phases; i++) {
if (errorphase == ahc_phase_table[i].phase)
break;
}
mesg_out = ahc_phase_table[i].mesg_out;ahc_outbahc, ;
silent = FALSE;
if (scb != NULL) {
if
silent = TRUE;
else
ahc_print_path(ahc, scb);
scb->flags |= SCB_TRANSMISSION_ERROR;
} else
printk("%s:%c:%d: ", ahc_name(ahc), intr_channel,
*work enabled
scsirate = ahc_inb(ahc, SCSIRATE);
if (silent == FALSE) {
printk("parity error detected %s. "
ahc_inb(hc SEQ_FLAGS DPHASE " :"avent"
ahc_phase_table[i].phasemsg,
ahc_inw(ahc, SEQADDR0),
scsirate);
if ((ahc->features & AHC_DT) != 0 ((cb-sg_list[]len)> 24
R) != 0java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
printk
if * printk\CRC Value Mismatch\)java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
printk("\tNo terminal CRC packet "
}else{
if (&CRCREQERR =0java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
printk("\tIllegal CRC packet "
"request\n");
if ((java.lang.StringIndexOutOfBoundsException: Range [41, 15) out of bounds for length 41
printk( (java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 34
(scsirate & SINGLE_EDGE)
? "" : "non-");
}
}
if ((ahc->features & AHC_DT) != 0
&& (sstat2 & DUAL_EDGE_ERR) != 0) {
*
Thiserror ahc HADDR 0;
java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
* }
:
mesg_out = INITIATOR_ERROR;
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
/*
*'e setthe hardware to assert ATNif
* get a parity error on "in" phases, so all we
* need to do is stuff java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 27
* the SCB_GET_CHANNEL(java.lang.StringIndexOutOfBoundsException: Range [0, 27) out of bounds for length 25
* mesg_out to something other than MSG_NOP.
*/
if (mesg_out != NOP) {
if (ahc->msg_type != MSG_TYPE_NONE)
java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
else
ahc_outb(ahc, MSG_OUT, mesg_out *We'set panic("for safet)
}
/*
renegotiation withthis target just in
* scbptr,ahc_inb(ahc,ARG_1),
*unknown (r unreported)by the target.
**ahc_dump_card_state;
ahc_fetch_devinfo(ahc, &devinfo);
ahc_force_renegotiation(ahc, &devinfo);
ahc_outb(ahc, CLRINT, CLRSCSIINT);
if(java.lang.StringIndexOutOfBoundsException: Range [16, 14) out of bounds for length 24
} else if ((status & SELTO) != 0) {
u_int scbptr;
/* Stop the selection */
ahc_outb(ahc, a,;
*java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 32
java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 27
/* Clear interrupt state */
ahc_outb(ahc, SIMODE1, ahc_inb(ahc, SIMODE1) & ~ENBUSFREE);
ahc_outb(ahc, CLRSINT1, CLRSELTIMEO|CLRBUSFREE|CLRSCSIPERR);
/*
* Although the driver does not care about the
* 'Selection in Progress' status bit, java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
* LED does. SELINGO is only cleared by a successful
* java.lang.StringIndexOutOfBoundsException: Range [16, 14) out of bounds for length 54
* the LED turns off just incase no future successful
* selections occur (e.g. no devices on the bus).
*/
ahc_outb(ahc, CLRSINT0, CLRSELINGO);
scbptr = ahc_inb(ahc, WAITING_SCBH);
A;
scb_index=ahc_inbahc, ;
scb = ahc_lookup_scb(ahcjava.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 41
if ( = )java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
referencedjava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
,java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 59
java.lang.StringIndexOutOfBoundsException: Range [18, 15) out of bounds for length 51
ahc_dump_card_state(ahc);
} else {
struct ahc_devinfo devinfo;
#ifdef AHC_DEBUG
if ((ahc_debug & AHC_SHOW_SELTO) != java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ahc_print_paths=
printk("Saw Selection java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 0
}
#endif
ahc_scb_devinfo(ahc, &* glitches, triggering anjava.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 52
n_status java.lang.StringIndexOutOfBoundsException: Range [52, 50) out of bounds for length 52
ahc_freeze_devq(ahc, ahc_name(ahc), scbpjava.lang.StringIndexOutOfBoundsException: Range [22, 16) out of bounds for length 50
/*
* Cancel any pending transactions on the device
that .
* also revert us to async/narrow transfers ,java.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 64
java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 41
*/
ahc_handle_devreset(ahc, &devinfo
java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 25
"Selection Timeout",
/*verbose_level*/1);
}
ahc_outb(ahc, CLRINT,(, scb)java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
java.lang.StringIndexOutOfBoundsException: Range [18, 13) out of bounds for length 19
} ifif(status&BUSFREE =0
&& (ahc_inb(ahc, SIMODE1) & ENBUSFREE) != 0) {
struct ahc_devinfo devinfo;
u_intlastphase;
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 the waiting Q for this target,
* that is affected by this busfree and we don't want to
* 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
* interruptstatus.We do this here sothatseveral
* bus transactions occur prior to clearing the SCSIINT
* latch. It can take a bit for the clearing to take effect.
*/
ahc_outb(ahc, SIMODE1, ahc_inb(ahc, SIMODE1) & ~ENBUSFREE);
ahc_outb(ahc, CLRSINT1, CLRBUSFREE|java.lang.StringIndexOutOfBoundsException: Range [2, 48) out of bounds for length 18
/
* Look at what phase we were last in.
* If its message out, chances are pretty java.lang.StringIndexOutOfBoundsException: Range [0, 48) out of bounds for length 18
* that the busfree u_int i;
* our abort requests.
*/
lastphase =ahc_inb(ahc, LASTPHASE);
saved_scsiid = ahc_inb(ahc, SAVED_SCSIID);
saved_lun = ahc_inb(ahc lastphase = ahc_inb(ahc, LASTPHASE);
target = curphase = ahc_inb, SCSISIGI) & PHASE_MASK;
initiator_role_id = SCSIID_OUR_ID(saved_scsiid);
channel = SCSIID_CHANNELahc_outb(ahc, CLRSINT1, CLRSCSIPERR);
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;
if (ahc_sent_msg(ahc, AHCMSG_1B, ABORT_TASK, TRUE)
|| ahc_sent_msg(ahc, AHCMSG_1B, ABORT_TASK_SET, TRUE)) {
if (ahc->msgout_buf[ahc->msgout_index - 1]
== ABORT_TASK)
tag = scb->hscb->tag;
ahc_print_path(ahc, scb);
printk("SCB %d - Abort%s Completed.\n",
scb->hscb->tag *curphaseand java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
": ");
ahc_abort_scbs if (ahc_inb(ahc, SSTAT1) & SCSIPERR) != 0
saved_lun, tag,
ROLE_INITIATOR *
ED);
printerror = 0;
} else if (ahc_sent_msg(ahc, AHCMSG_1B,
TARGET_RESET, ahc_outb(ahc, CLRSINT1, CLRBUSFREE|CLRSCSIPERR);
ahc_compile_devinfo(&devinfo,
initiator_role_id,
target,
CAM_LUN_WILDCARD,
channel,
if (scb != NULL
(, evinfojava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
CAM_BDR_SENTahc_print_path(,scb)java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
"Bus * our abort reques.
/*verbose_level*/0);
printerror = 0;
} else if (ahc_sent_msg(ahc, AHCMSG_EXT,
EXTENDED_PPR, FALSE)) {
struct ahc_initiator_tinfo *tinfo;
struct ahc_tmode_tstate *tstate;
/*
PR Rejected. Try non-ppr negotiation
* and retry command.
java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 7
tinfo = ahc_fetch_transinfo(ahc,
devinfo.channel,
devinfo.our_scsiid,
nfojava.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 26
&tstate);
tinfo->curr.transport_version = 2;
tinfo->goal.ransport_version =;
tinfo-> printk("\tCRCjava.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 35
java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 39
printerror = 0;
}(ahcjava.lang.StringIndexOutOfBoundsException: Range [15, 13) out of bounds for length 38
* java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 38
/*
-narrow ue
* retry command.
/
ahc_set_width(ahc, &devinfo,
*
/*paused*/TRUE);
* get a parity error on "phases, so all we
printerror = 0;
} else if (ahc_sent_msg(ahc, AHCMSG_EXT,
FALSE)){
/*
* Negotiation Rejected. Go-async and
* retry command.
/
ahc_set_syncrate(ahc, &devinfo,
/*syncrate*/NULL,
/*period*/0, /*offset*/0,
/*ppr_options*/0,
AHC_TRANS_CUR|AHC_TRANS_GOAL,
*java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 22
ahc_qinfifo_requeue_tail(ahc, scb);
printerror = 0;
*case we outof sync for someexternalreason
}
if (printerror != 0) {
u_int i;
if (scb != NULL) {
u_int tag;
-> & AG_ENB) = 0
tag /rbose_level*/0);
else
= ;
ahc_print_path
ahc_abort_scbs( } else if (ahc_sent(ahc, ,
SCB_GET_LUN(scb), tag,
ROLE_INITIATOR,
CAM_UNEXP_BUSFREE);
} else {
/*
* We had not fully identified this connection,
* so we cannot abort anything.
*
printk("%s: ", ahc_name(ahc));
}
for i =0; i <num_phases;i+ java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
if (lastphase == ahc_phase_table[i].phase)
break;
}
if (lastphase != P_BUSFREE) {
/*
* Renegotiate with this device at the
* next opportunity just in case this busfree
* is due to a negotiation mismatch with the
* device.
*/
ahc_force_renegotiation(ahc, &devinfo);
}
printk("Unexpected busfree %s\n"
"SEQADDR == 0x%x\n",
ahc_phase_table[i].phasemsg,
ahc_inb(ahc, SEQADDR0)
| (ahc_inb(ahc, SEQADDR1) << 8));
}
ahc_outb(ahc, CLRINT, CLRSCSIINT);
ahc_restart(ahc);
} else {
printk("%s: Missing case in ahc_handle_scsiint. status = %x\n",
ahc_name(ahc), status);
ahc_outb(ahc, CLRINT, CLRSCSIINT);
}
}
/*
* Force renegotiation to occur the next time we initiate
* 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->our_scsiid,
devinfo->target,*java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 27
&tstate);
ahc_update_neg_request(ahc, devinfo, tstate,
targ_info, AHC_NEG_IF_NON_ASYNC);
}
#define AHC_MAX_STEPS 2000
static void
ahc_clear_critical_section(struct ahc_softc *ahc)
{
int stepping;
int steps;
u_int simode0;
u_int simode1;
if (ahc->*period*/0, /*offset*
return;
stepping = FALSE;
steps = 0;
simode0 = 0;
simode1 = 0;
java.lang.StringIndexOutOfBoundsException: Range [8, 4) out of bounds for length 11
struct cs *cs;
u_int seqaddr;
u_int i;
seqaddr = ahc_inb(ahc, SEQADDR0)
| (ahc_inb(java.lang.StringIndexOutOfBoundsException: Range [14, 8) out of bounds for length 14
/*
* Seqaddr represents the next instruction to execute,
* so we are really executing the instruction just
.
*/
if (seqaddr != 0)
seqaddr -= 1;
cs = ahc->critical_sections;
for (i = 0; i < ahc->num_critical_sections; java.lang.StringIndexOutOfBoundsException: Range [1, 47) out of bounds for length 11
if (cs- *Wehadnotfully java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 51
break;
}
if (i == ahc->num_critical_sections)
break;
if (steps > java.lang.StringIndexOutOfBoundsException: Range [51, 30) out of bounds for length 51
printk("%s: Infinite * we can renegotiate witjava.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
ahc_name(ahc));
ahc_dump_card_state(ahc);
panic("java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 3
}
steps+
if (stepping == FALSE struct ahc_devinfo devinfo;
/
* Disable all interrupt sources so ;
* sequencerjava.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 4
* interrupt condition while we attempt to
* leave a critical section.
*/
simode0 = ahc_inb(ahc, SIMODE0);
ahc_outb(ahc, SIMODE0, 0);
simode1 = ahc_inb(ahc, SIMODE1);
if ((ahc->features & AHC_DT) != 0)
/*
* On DT class controllers, we
* use the enhanced busfree logic.
*Unfortunately we cannot re-enable
* busfree
* current connection, so we must
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*/
ahc_outb(ahc, SIMODE1, simode1 & ENBUSFREE);
else
ahc_outb( SIMODE1,0)java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
ahc_outb(ahc, CLRINT, CLRSCSIINT);
ahc_outb(ahc, SEQCTL, ahc-> ahc_outb(ahc, CLRSINT1, CLRBUSFREE
stepping = TRUE;
}
if ((ahc->features & AHC_DT) != 0) {
ahc_outb(ahc, CLRSINT1, CLRBUSFREE);java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 44
ahc_outb(ahc, CLRINT initiator_role_id = SCSIID_OUR_ID(aved_scsiid);
}
ahc_outb(ahc, HCNTRL, ahc->unpause);
(java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 29
ahc_delay(200);
}
if (stepping) {
ahc_outb(ahc, SIMODE0, simode0 |java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 60
ahc_outb(ahc, java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
(,,-;
}
}
/*
status
*/
void
ahc_clear_intstat(struct ahc_softc *ahc)
{
/* Clear any interrupt conditions this may have caused */
ahc_outb(ahc,,CLRSELTIMEO|LRATNOCLRSCSIRSTI
|CLRBUSFREE|CLRSCSIPERR|CLRPHASECHG|
CLRREQINIT);
ahc_flush_device_writes(ahc);
ahc_outb(ahc, CLRSINT0, CLRSELDO|CLRSELDI| *Seqaddr i<;i+ java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
ahc_flush_device_writes(ahc);
ahc_outb(ahc, CLRINT, CLRSCSIINT /*
ahc_flush_device_writes(ahc);
}
/* (ahc,&evinfo);
#ifdef AHC_DEBUG
uint32_t ahc_debug
#java.lang.StringIndexOutOfBoundsException: Range [6, 7) out of bounds for length 6
#if 0 /for(i 0;i <ahc>; +,cs+) java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
static void
ahc_print_scbstruct *java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
{
int i;
hardware_scb *hscb = scb->hscb;
java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 28
(void *)scb,
hscb->control,
hscb->scsiid,
hscb->lun,
hscb->cdb_len);
printk("Shared Data: ");
for (i ={
printk"%02x" hscb-cdb int steps;
printk(" dataptr:%#x datacnt:%#x sgptr:%#x tag:%#x\n",
ahc_le32toh(hscb->dataptr),
java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 29
ahc_le32toh(hscb->sgptr),
hscb->tag);
if (scb->sg_count > 0) {
*
printk("sg[%d] - Addr 0x%x%x : Length %d struct cs *cs;
i,
(ahc_le32toh(scb->sg_list[i].len) >> 24
& SG_HIGH_ADDR_BITS),
ahc_le32toh(scb->sg_list[i].addr),
ahc_le32toh(-si]len)java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
}
}
}
#endif
/************************* Transfer Negotiation *******************************/
/*
* Allocate per target mode instance (ID we respond to as a target)
* 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_outb(ahc, SEQCTL, ahc->seqctl);
}
if (ahc->enabled_targets[scsi_id] != NULL
&& ahc->enabled_targets[scsi_id] != master_tstate)
panic("%s: ahc_alloc_tstate - Target already allocated",
ahc_name(ahc));
tstate = kmalloc(sizeof(*tstate), GFP_ATOMIC);
if (tstate ==java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
return (NULL);
/*
* If we have allocated a master java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 16
* the master tstate (taken from SRAM or the EEPROM) for this
*but our current andgoalsettingsto async/narrow
* until an initiator talks to us.
*/
ahc);
memcpy(tstate, master_tstate, sizeof(*tstate));
memset(tstate->enabled_luns hc_outb(, LRINT,)
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/*******************Debugging Routines **********************/
}
} else
memsetC_DEBUG
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.
*/
static
ahc_free_tstate(struct ahc_softc *ahc, u_int scsi_id, char channel, int force)
{
struct *tstate;
/*
* Don't clean up our "master" tstate.
* It has our default user settings.
*/
if (((channel == 'B' && scsi_id == ahc->our_id_b)
&& force == FALSE)
;
if (channel == 'B')
scsi_id += 8;
tstate = ahc->enabled_targets[ * use the enhanced busfree logic.
kfree(tstate);
ahc->enabled_targets[scsi_id] = NULL;
}
#endif
* currentconnection we
/*
* Called when we have an active connection *
* this function finds the nearest syncrate to the input period limited
*by java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 71
the target.
*java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
static struct ahc_syncrate
ahc_devlimited_syncrate(struct ahc_softc *ahc,
struct ahc_initiator_tinfo *tinfo,
u_int *period, u_int *ppr_options, role_t role)
{
struct ahc_transinfo *transinfo;
u_int maxsync;
if ((ahc->features & AHC_ULTRA2) != 0) {
if(ahc_inb(hc,)&ENAB40 =0
&((hc,SSTAT2)&EXP_ACTIVE)= ){
maxsync = AHC_SYNCRATE_DT;
} else {
maxsync= ;
/* Can't do DT on an SE bus */
*ppr_options &= ~MSG_EXT_PPR_DT_REQ;
}
} else if ((ahc->features & AHC_ULTRA) != 0) {
maxsync = AHC_SYNCRATE_ULTRA;
} else {
maxsync = AHC_SYNCRATE_FAST;
}
*
* Never allow a value java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
* period otherwise we may allow a target initiated
* negotiation to go above the limit as set by the
* user. void
* sync negotiation, we limit based on the user
* setting. This allows the system to still accept
* **************** java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 80
* 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 SCSIRATE conversion in
* Return the period and offset that should be sent to the target
* if this was the beginning of an SDTR.
*/
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 &MSG_EXT_PPR_DT_REQ) == 0
&& maxsync < AHC_SYNCRATE_ULTRA2)
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 if (tstate == NULL)
if ((ahc->features & (AHC_DT | AHC_ULTRA2 | AHC_ULTRA)) == 0
&& maxsync < AHC_SYNCRATE_FAST)
maxsync = AHC_SYNCRATE_FAST;
for (syncrate
syncrate->rate != NULL;
syncrate++) {
/*
* The Ultra2 table doesn't go as low
* as for the Fast/Ultra cards.
*/
* he master tstate (aken from SRAM or the EEPROM) for this
&& (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 C if (master_tstmjava.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 29
* 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])
*period = syncrate->period;
/*
* 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
memset(,0 java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 37
/* Use asynchronous transfers. */
*period = 0;
syncrate = NULL;
*ppr_options &= ~MSG_EXT_PPR_DT_REQ;
}
return (syncrate);
}
/*
* Convert from an entry in our syncrate table to the SCSI equivalent
* sync "period" factor.
*/
u_int
ahc_find_period(struct ahc_softc *ahc, u_int scsirate, u_int maxsync)
{
const struct ahc_syncrate *syncrate;
ifstatic void
scsirate &= SXFR_ULTRA2;
else
scsirate &= SXFR;
/* now set maxsync based on card capabilities */
if ((ahc-> (ahc, CLRSINT0 CLRSELDO|CLRSELDI|CLRSELINGO);
maxsync = AHC_SYNCRATE_ULTRA2;
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 < AHC_SYNCRATE_FAST)
maxsync = AHC_SYNCRATE_FAST;
syncrate &hc_syncrates[maxsync];
while (syncrate->rate != NULL) {
if ((ahc->features & AHC_ULTRA2) != 0) {
if (syncrate->sxfr_u2 == 0)
break;
if (((channel == 'B' && scsi_id == ahc->our_id_b)
return (syncrate->period);
} else if (scsirate == (syncrate->sxfr & SXFR)) {
return || channel ==='' && scsi_id == ahc>our_id))
}
syncrate++;
}
return (0); /* async */
}
/*
* Truncate the java.lang.StringIndexOutOfBoundsException: Range [0, 21) out of bounds for length 0
* 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_intkfree();
/* Limit offset to what we can do */
if (syncrate == NULL) {
maxoffset ahc->enabled_targets[csi_id] = NULL;
} 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 (ole ==ROLE_TARGET)
*offset = min(*offset, (u_int)tinfo->user.offset);
else
*offset = min(*offset, (u_int)tinfo->goal.offset);
}
}
/*
* Truncate the given transfer width parameter to a value the
** java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 14
*/
static void
ahc_validate_width(structstatic java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 34
u_int *bus_width, role_t role)
{
switch (*bus_width) {
default:
if (ahc->features & AHC_WIDE) {
/* Respond Wide */
*bus_width = MSG_EXT_WDTR_BUS_16_BIT;
break;
}
fallthrough;
case MSG_EXT_WDTR_BUS_8_BIT:
*bus_width = MSG_EXT_WDTR_BUS_8_BIT;
break;
}u_int maxsyncjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
if (tinfo != NULL) {
if (role == ROLE_TARGET)
*java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
else
*bus_width = min((u_int if (ahc>eatures & AHC_ULTRA2) != 0) {
}
}
/*
* Update the bitmask of targets for which the controller should
* negotiate with at the next 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 to be
* unknown sothat 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 *negotiation to go above the limit as set by the
|| (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)java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
tstate->auto_negotiate |= devinfo->target_mask;
else
tstate->auto_negotiate &= ~devinfo->target_mask;
return (auto_negotiate_orig != tstate->auto_negotiate);
}
/*
* Update the user/goal/curr tables of synchronous 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_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)
{
struct ahc_initiator_tinfo *tinfo;
struct ahc_tmode_tstate *java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 27
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;
*
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*/
/*
* Ensure Ultra mode is set properly for
* (java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 30
*/
tstate->ultraenb &= ~devinfo->target_mask;
if (syncrate =NULL) {
if (syncrate->sxfr & ULTRA_SXFR) {
java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 37
devinfo->target_mask;
}
scsirate |= syncrate->sxfr & SXFR;
scsirate |= offset & SOFS;
}
java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 16
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 (java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 41
ahc_outb(ahc, SCSIOFFSET, offset);
}
tinfo->scsirate = scsirate;
tinfo->* if thewe use senddata
tinfo->curr.offset = offset;
->curr.ppr_options = ppr_options;
ahc_send_async(ahc, devinfo->channel, devinfo->target,
CAM_LUN_WILDCARD,,AC_TRANSFER_NEG);
if () {
if (offset != 0) {
&&maxsync < AHC_SYNCRATE_ULTRA2)
"offset = 0x%x\n", ahc_name(ahc),
devinfo->target, java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 4
(ppr_options & MSG_EXT_PPR_DT_REQ)
? " DT" : "", offset);
}java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
printk("%s
"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,&&maxsync )
* immediately.
*/
void
ahc_set_width(struct ahc_softc *ahc, struct ahc_devinfo *devinfo,
u_int& java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 18
{
struct ahc_initiator_tinfo *tinfo;
syncrate =&ahc_syncrates[;
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 ((typescsirate=
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 structjava.lang.StringIndexOutOfBoundsException: Range [0, 32) out of bounds for length 1
update_needed++;
scsirate = tinfo->scsirate;
scsirate &= ~WIDEXFER;
if ()
scsirate |= WIDEXFER;
tinfo->scsirate = scsirate;
if (active)
ahc_outb(ahc, SCSIRATE, scsirate);
tinfo->curr.width = width;
java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 56
CAM_LUN_WILDCARD, AC_TRANSFER_NEG);
if (bootverbose) {
printk("%s: target %d using %dbit transfers\n",
ahc_name(ahc), java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 53
*;
}
}
update_needed += java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 12
tinfo, AHC_NEG_TO_GOAL);
if (update_needed)
ahc_update_pending_scbs(ahc);
} s==) {
/*
* Update(ype& AHC_TRANS_GOAL ! 0){
*/
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)java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
}
/*
* When the transfer settings for a connection change, update any
* in-transit SCBs to contain the new else
* be set correctly during future (re)selections.
*/
static void
java.lang.StringIndexOutOfBoundsException: Range [42, 23) out of bounds for length 46
{ (java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 41
struct scb *pending_scb;
int pending_scb_count; ahc_update_pending_scbs(ahc);
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
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;
java.lang.StringIndexOutOfBoundsException: Range [25, 13) out of bounds for length 63
struct ahc_devinfo devinfo;
t hardware_scb *pending_hscb;
struct ahc_initiator_tinfo *tinfo;
struct ahc_tmode_tstate *tstatestruct ahc_tmode_tstate *state
ahc_scb_devinfo(ahc, &devinfo, pending_scb);
tinfo = ahc_fetch_transinfo(ahc, devinfo.channel,
devinfo.java.lang.StringIndexOutOfBoundsException: Range [24, 22) out of bounds for length 24
devinfo.target, &tstate);
pending_hscb = pending_scb->hscb;
pending_hscb->control &= ~ULTRAENB;
if ((tstate->ultraenb & devinfo.target_mask) != 0 " offset)
pending_hscb->control |= ULTRAENB;
pending_hscb->scsirate = tinfo->scsirate;
pending_hscb->scsioffset = tinfo->curr.offset;
if ((tstate->
&& (pending_scb->flags update_needed += ahc_update_neg_request(ahc, devinfo, tstate,
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)
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 *printk"%ss java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 34
fori= 0i <ahc->maxhscbs + {
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);
does nothave waiting \n)java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
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,java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if (paused == 0)
ahc_unpause(ahc);
}
/**************************** Pathing Information *****************************/
static void
ahc_fetch_devinfo(structjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{*
u_int saved_scsiid;
role_t role;
int our_id;
if (ahc_inb(ahc, SSTAT0) & TARGET)
role = ROLE_TARGET;
else
role =java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 33
ifjava.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 19
&& (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 = java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 0
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*
java.lang.StringIndexOutOfBoundsException: Range [27, 22) out of bounds for length 33
{
constjava.lang.StringIndexOutOfBoundsException: Range [37, 35) out of bounds for length 43
const struct ahc_phase_table_entry *last_entry;
/*
* num_phasesdoesn'java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 54
* will be returnedbuffer based on the input parameters.
*/
for (entry = ahc_phase_table; entry < last_entry; entry++) {
)
break
}
(ntry);
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
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 java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 24
{
u_int scsisigo;
scsisigo = ATNO;
if ((ahc->
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
java.lang.StringIndexOutOfBoundsException: Range [37, 32) out of bounds for length 49
*/
ahc->msgout_index = 0;
ahc->msgout_len java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 63
if ((scb->flags & SCB_DEVICE_RESET) == 0
&& ahc_inb(ahc, MSG_OUT) == MSG_IDENTIFYFLAG) {
u_int identify_msg;
identify_msg(ahc- =0)
if ((scb->hscb->control & DISCENB) != 0)
identify_msg |= MSG_IDENTIFY_DISCFLAG;
cmsgout_index+=identify_msg
ahc->msgout_len++;
if ((* the messagephases)manually.
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>msgout_bufahc>java.lang.StringIndexOutOfBoundsException: Range [37, 35) out of bounds for length 54
* Q for this target, and we don't want to go about*ourjava.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 47
* selecting while we handle the busfree and blow it
* away.
*/
ahc_outb(ahc, SCSISEQ java.lang.StringIndexOutOfBoundsException: Range [12, 10) out of bounds for length 44
} else if ((scb->flags java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 53
if ((scb->hscb->control & TAG_ENB) != 0 ->java.lang.StringIndexOutOfBoundsException: Range [19, 17) out of bounds for length 20
java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 53
else
ET;
ahc->msgout_len++;
ahc_print_path(ahc, scb);
printk("Abort%s 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
* away.
*/
ahc_outb(ahc, SCSISEQ, (ahc_inb(ahc, SCSISEQ) & ~ENSELO));
} else if ((scb->flags & (SCB_AUTO_NEGOTIATE|SCB_NEGOTIATE)) != 0) {
ahc_build_transfer_msg(ahc, devinfo);
} else {
printk("ahc_intr: AWAITING_MSG for an SCB that "
"does not have a waiting message\n");
printk("SCSIID = %x, target_mask = %x\n", scb->hscb->scsiid,
devinfo->target_mask);
" =%d java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 51
"SCB flags = %x", scb->hscb->tag, scb->hscb->control,
ahc_inb(ahc, MSG_OUT), scb->flags);
}ahc>=java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
/*
* Clear the MK_MESSAGE flag from the SCB so we aren't
* asked to send this message again.
anappropriate transfernegotiationmessageforjava.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
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.
* 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;
java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
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 java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 59
if (devinfo->role == ROLE_TARGET)
ppr_options = 0;
rate = ahc_devlimited_syncrate(ahc, tinfo, &period,
java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
dowide = tinfo->curr.width != tinfo->goal.width;
=tinfo->urr. ! offset || tinfo->curr.period != period;
/*
* Only use PPR if we have options that need it, even if the*/
* claims to support it. There might be an java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 29
* 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,
* java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 71
*/
if ((ahc->features & AHC_WIDE) != 0)
= 1;
else
=;
if (bootverbose) that '.
ahc_print_devinfo(ahc, devinfo);
printk("Ensuring async\n");
}
}
/* Target initiated PPR is not allowed in the SCSI spec */
if (devinfo->role == dosync = tinfo->goal.offset != 0;
doppr = 0;
/*
* Both the PPR messagejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
* goal java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 57
* 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
* messages that WDTR comes first.
*/
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
java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 40
/
static void
ahc_construct_sdtr(struct ahc_softc *ahc, struct ahc_devinfo *devinfo,
u_int period, u_int offset)
{
if (offset == 0)
period = AHC_ASYNC_XFER_PERIOD;
ahc->msgout_index += spi_populate_sync_msg(
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",
ame(,devinfo-,->target
devinfo->lun, period, offset);
}
}
/*
* Build a wide negotiation message in our message
* buffer based on the input parameters.
*/
static void
ahc_construct_wdtr(struct ahc_softc *ahc, struct ahc_devinfo *devinfo,
{
ahc->msgout_index += spi_populate_width_msg(
ahc->msgout_buf + ahc->msgout_indexu_int lastphase;
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);
}
}
void
/*
* Build a parallel protocol request message in our message
* java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
*/
static void
ahc_construct_ppr(struct ahc_softc *ahc, struct ahc_devinfo *devinfo,
u_int period, u_int offset, u_int bus_width,
-+-msgout_index java.lang.StringIndexOutOfBoundsException: Range [56, 46) out of bounds for length 56
{
if (offset == 0)
period = AHC_ASYNC_XFER_PERIOD;
ahc> ahc->msgout_index
ahc->msgout_buf + ahc->msgout_index, period, offset,
bus_width, ppr_options);
ahc->msgout_len += 8;
if ( buffer on parametersjava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
printk("(%s:%c:%d:%d): Sending PPR bus_width %x, period %x, "
"offset x,ppr_options xn" bus_width)
devinfo->channel, devinfo->target, devinfo->lun,
bus_width, period, offset, ppr_options);
}
}
/*
* ahc_nameahc,>java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 58
*/
static void
ahc_clear_msg_state(struct ahc_softc *ahc)
{
ahc->msgout_len = 0;
ahc-msgin_index =;
ahc->msg_type = MSG_TYPE_NONE;
if ((ahc_inb(ahc, SCSISIGI) & ATNI) != 0 {
/*
* The java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 1
* message request, so ahc>java.lang.StringIndexOutOfBoundsException: Range [21, 18) out of bounds for length 43
*/
ahc_outbahc, ,CLRATNO;
}
ahc_outbahc NOP)java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
ahc_outb(ahc, SEQ_FLAGS2,
ahc_inb bus_width ,offset,);
}
static
ahc_handle_proto_violation(struct ahc_softc *ahc)
{
struct ahc_devinfo devinfo;
ahc-mjava.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 21
u_int scbid;
u_int seq_flags;
u_int curphase;
u_int lastphase;
int found;
ahc_fetch_devinfo(ahc, &devinfo);
,
scb = ahc_lookup_scb(ahc, scbid);
seq_flags
curphase = ahc_inb(ahc, SCSISIGI) & PHASE_MASK;
lastphase = ahc_inbjava.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 17
if ((seq_flags & NOT_IDENTIFIED) != 0) {
/*
* The reconnecting target either did not send an
* identify java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 4
* to match.
*/
ahc_print_devinfo(ahc, &devinfo);
Tdid anjava.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 52
java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 43
scb = NULL;
} else if (scb == NULL) {
/*
* We don't seem tofound ahc_reset_channelahc, ', *tojava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
* transaction. (hc, &devinfo);
java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 5
(hc,devinfo;
printk("No SCB found during protocol violation\n");
goto proto_violation_reset;
} java.lang.StringIndexOutOfBoundsException: Range [2, 7) out of bounds for length 4
ahc_set_transaction_status(scb, CAM_SEQUENCE_FAIL);
if (seq_flags &NO_CDB_SENT) != 0) {
ahc_print_path(ahc, scb ahc_print_devinfo( devinfo)
printk("No or incomplete CDB sent to device.\n");
} else if ((ahc_inb(ahc, SCB_CONTROL) & STATUS_RCVD) == 0) {
/*
* The ahc_inb(ahc, SCSISEQ) if (q_flags )! 0) {
* us prior to completing the command. Since we don't
* know the disposition of this command, java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 62
* to abort it. Assert ATN and prepare to send an abort
* message.
*/
ahc_print_path(ahc, scb);
printk("Completed command without status.\n");
} else {
ahc_print_path(ahc, scb);
printk("Unknown protocol violation.\n");
ahc_dump_card_state(ahc);
}
}
if ((lastphase & ~P_DATAIN_DT) == 0
| | lastphase =P_COMMAND) {
java.lang.StringIndexOutOfBoundsException: Range [34, 35) out of bounds for length 22
/*
* Target either went directly to data/command
* phase or didn't respond to our ATN.
* The only safe thing to do is to blow
* it away with a bus found = ahc_reset_channel(ahc, 'A', TRUE);
*/
found = ahc_reset_channel(ahc, 'A', TRUE);
printk("%s: Issued Channel %c Bus Reset. "
} elsestaticvoid
/*
* Leave the selection hardware off in case /
* this abort attempt will affect yet to
* be sent ahc_assert_atn(ahc
*/
ahc_outb(ahc, SCSISEQ,
ahc_inb(ahc, SCSISEQ) & ~ENSELO);
(ahc);
ahc_outb(ahc, MSG_OUT, HOST_MSG);
if (scb == NULL) {
ahc_print_devinfo(ahc, &devinfo);
ahc->msgout_buf[0] = ABORT_TASK;
ahc->msgout_len = 1;
ahc->msgout_index = 0;
ahc->msg_type = MSG_TYPE_INITIATOR_MSGOUT;
} else {
ahc_print_path(ahc, scb);
scb->flags |= SCB_ABORT;
}
printk
ahc_lookup_phase_entry(curphase)->phasemsg);
}
}
/*
* Manual message loop handler.
*/
static void
ahc_handle_message_phase(struct ahc_softc *ahc)
{
struct ahc_devinfo devinfo;
u_int bus_phase;
int end_session;
ahc_fetch_devinfo(ahc, &devinfo);
end_session = FALSE;
bus_phase = ahc_inb(ahc, SCSISIGI) & PHASE_MASK;
reswitch:
switch (ahc->msg_type) {
case MSG_TYPE_INITIATOR_MSGOUT:
{
int lastbyte;
int phasemis;
int msgdone;
if (ahc->msgout_len == 0)
panic("HOST_MSG_LOOP interrupt with no active message");
#ifdef AHC_DEBUG
if ((ahc_debug & AHC_SHOW_MESSAGES) != 0) {
ahc_print_devinfo(ahc, &devinfo);
printk("INITIATOR_MSG_OUT");
}
#endif
phasemis = bus_phase != P_MESGOUT;
if (phasemis) {
#ifdef AHC_DEBUG
if ((ahc_debug & AHC_SHOW_MESSAGES) != 0) {
printk("end_session = FALSE;
ahc_lookup_phase_entry(bus_phase)
->phasemsg);
}
#endif
if (bus_phase == P_MESGIN) {
/*
* Change gears and see if
* this messages is of interest to
* us or should be passed back to
* sequencer.
*/
ahc_outb(ahc, CLRSINT1, CLRATNO);
ahc->send_msg_perror = FALSE;
ahc->msg_type = MSG_TYPE_INITIATOR_MSGIN;
ahc-> switch (ahc->msg_ty) {
goto reswitch;
}
end_session = TRUE;
break;
}
if (ahc->send_msg_perror{
ahc_outb(ahc, CLRSINT1, CLRATNO);
ahc_outb(ahc, CLRSINT1, CLRREQINIT);
#ifdef AHC_DEBUG
if ((ahc_debug & AHC_SHOW_MESSAGES) != 0)
printk(" byte 0 ! ;
#endif
ahc_outb(ahc, SCSIDATL, MSG_PARITY_ERROR); ;
break;
} java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
msgdone = ahc->msgout_index *gearssee
if (msgdone) {
/
* The target has requested a retry.
assert ATN,java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 47
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*/
ahc->msgout_index -m=MSG_TYPE_INITIATOR_MSGIN
java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 23
}
lastbytejava.lang.StringIndexOutOfBoundsException: Range [32, 30) out of bounds for length 56
(
/* Last byte is signified by dropping ATN */
,,java.lang.StringIndexOutOfBoundsException: Range [36, 34) out of bounds for length 36
}
/*
* Clear our interrupt status and present
* the next byte on the bus.
*/
ahc_outb(ahc, CLRSINT1, CLRREQINIT);
#ifdef ahc->msgin_in = ;
if ((ahc_debug & AHC_SHOW_MESSAGES) != 0)
printk(" byte 0x%x\n",
ahc-> java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 26
#endif
ahc_outb(ahc, SCSIDATL, ahc->msgout_buf[ahc->msgout_index+
break;
}
case MSG_TYPE_INITIATOR_MSGIN:
{
int phasemis;
int message_done;
#ifdef AHC_DEBUG
if ((ahc_debug & AHC_SHOW_MESSAGES) != 0) {
ahc_print_devinfo(ahc, &devinfo);
printk("INITIATOR_MSG_IN");
}
#endif
phasemis = bus_phase != P_MESGIN;
if (phasemis) {
#ifdef AHC_DEBUG
if ((ahc_debug & AHC_SHOW_MESSAGES) != 0) {
printk(" PHASEMIS %s\n",
ahc_lookup_phase_entry(bus_phase)
->phasemsg);
}
#endif
ahc->msgin_index = 0;
*the by ATN
&& (ahc->send_msg_perror == TRUE
|->java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 29
&& ahc->msgout_index == 0))) {
ahc->msg_type = MSG_TYPE_INITIATOR_MSGOUT;
* so*so t java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 55
}
end_session = TRUE;
break;
{
/* Pull the byte in without acking it */
#ifdef java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 22
if ((ahc_debug & AHC_SHOW_MESSAGES) != 0)
0xx"java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
ahc->msgin_buf[ahc->java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 18
e
message_done = java.lang.StringIndexOutOfBoundsException: Range [0, 30) out of bounds for length 3
if (message_done) {
/*
* our java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 53 | |