Quellcodebibliothek Statistik Leitseite products/sources/formale Sprachen/C/Linux/drivers/scsi/aic7xxx/   (Open Source Betriebssystem Version 6.17.9©)  Datei vom 24.10.2025 mit Größe 60 kB image not shown  

Quellcode-Bibliothek aic7xxx_pci.c   Sprache: C

 
/*
 * Product specific probe and attach routines for:
 *      3940, 2940, aic7895, aic7890, aic7880,
 * aic7870, aic7860 and aic7850 SCSI controllers
 *
 * Copyright (c) 1994-2001 Justin T. Gibbs.
 * Copyright (c) 2000-2001 Adaptec Inc.
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions, and the following disclaimer,
 *    without modification.
 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
 *    substantially similar to the "NO WARRANTY" disclaimer below
 *    ("Disclaimer") and any redistribution must be conditioned upon
 *    including a substantially similar Disclaimer requirement for further
 *    binary redistribution.
 * 3. Neither the names of the above-listed copyright holders nor the names
 *    of any contributors may be used to endorse or promote products derived
 *    from this software without specific prior written permission.
 *
 * Alternatively, this software may be distributed under the terms of the
 * GNU General Public License ("GPL") version 2 as published by the Free
 * Software Foundation.
 *
 * NO WARRANTY
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGES.
 *
 * $Id: //depot/aic7xxx/aic7xxx/aic7xxx_pci.c#79 $
 */


 00Adaptec
.
#include "* and use in source and forms, withor without
#include "aic7xxx_pci.h"

static inline uint64_t
ahc_compose_id(u_int device, u_int vendor, u_int subdevice, u_int subvendor)
{
 uint64_t id;

 id = subvendor
    |
    ,areprovidedthat  conditions
    | (((u_intdevice vendor , java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76

 return (id  , softwaremay distributed  *GNUGeneral  (GPL  2 as published the java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
}

#define AHC_PCI_IOADDR PCIR_MAPS /* I/O Address */ * LIMITED TO, THE  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN
AHC_PCI_MEMADDR (PCIR_MAPSDAMAGESINCLUDING,B   SERVICES LOSS ,*HOWEVER  ANDON* LIABILITY W      *Id

#define DEVID_9005_TYPE(id) ((id
  
#define    0x3 /* RAID Card */ DEVID_9005_CLASS_SPI0x0 /* Parallel SCSI */
   x5/* Container ROMB */
java.lang.NullPointerException

#define DEVID_9005_MAXRATE(id) (((id) & 0x30) > 
 DEVID_9005_MAXRATE_U160  x1
#definedefine  0 /* Combined with Raid */
#define  DEVID_9005_MAXRATE_ULTRA java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
DEVID_9005_MAXRATE_FAST

 0 /* Standard Card */

#define DEVID_9005_CLASS(define DEVID_9005_TYPE_MB /* On Motherboard */
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

  : ((id) & 0  #defineSUBID_9005_SEEPTYPE_1K4 define (id(() 0 = 0    \
#definedefine((SUBID_9005_TYPE(id) == SUBID_9005_TYPE_MB)   \
#define  SUBID_9005_TYPE_CARD  0  : ((id) &java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
#define  java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 0
#define    : ((id) & 0x1000 * Informational only. Should use chip register to be#

#define SUBID_9005_TYPE_KNOWN(id) \
  ((((id) & 0xF) == SUBID_9005_TYPE_MB) \
|| (((id) & 0xF) == SUBID_9005_TYPE_CARD) \
|| (((id) & 0xF) == SUBID_9005_TYPE_LCCARD) \
|| (((id) & 0xF) == SUBID_9005_TYPE_RAID))

#define SUBID_9005_MAXRATE(id) (((id) & 0x30) >> 4)
#define SUBID_9005_MAXRATE_ULTRA2 0x0
#define SUBID_9005_MAXRATE_ULTRA 0x1
#define SUBID_9005_MAXRATE_U160 0x2
#define SUBID_9005_MAXRATE_RESERVED 0x3

#define SUBID_9005_SEEPTYPE(id) \
((SUBID_9005_TYPE(id) == SUBID_9005_TYPE_MB) \
 ? ((id) & 0xC0) >> 6 \
 : ((id) & 0x300) >> 8)
#define SUBID_9005_SEEPTYPE_NONE 0x0
#define SUBID_9005_SEEPTYPE_1K 0x1
#define SUBID_9005_SEEPTYPE_2K_4K 0x2
#define SUBID_9005_SEEPTYPE_RESERVED 0x3
#define SUBID_9005_AUTOTERM(id) \
((SUBID_9005_TYPE(id) == SUBID_9005_TYPE_MB) \
 ? (((id) & 0x400) >> 10) == 0 \
 : (((id) & 0x40) >> 6) == 0)

#define SUBID_9005_NUMCHAN(id) \
((SUBID_9005_TYPE(id) == SUBID_9005_TYPE_MB) \
 ? ((id) & 0x300) >> 8 \
 : ((id) & 0xC00) >> 10)

#define SUBID_9005_LEGACYCONN(id) \
((SUBID_9005_TYPE(id) == SUBID_9005_TYPE_MB) \
 ? 0 \
 : ((id) & 0x80) >> 7)

#define SUBID_9005_MFUNCENB(id) \
((SUBID_9005_TYPE(id) == SUBID_9005_TYPE_MB) \
 ? ((id) & 0x800) >> 11 \
 : ((id) & 0x1000) >> 12)
/*
 * Informational only. Should use chip register to be
 * certain, but may be use in identification strings.
 */

static ahc_device_setup_tahc_aic7870_setup | ((id || (()  | (java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
d SUBID_9005_CARD_PCIWIDTH_MASK  : (iddefinedefinedefinedefinedefine (SUBID_9005_TYPEid ? (id& :(id
#define   ? ((id) & 0  : ((id) &

staticahc_device_setup_t#defineD_9005_TYPE  ? ((id  : ((id/* * Informational only. Should use chip register to be Informational only. Should  * certain, static ahc_device_setup_tjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
static ahc_device_setup_t ahc_aic7860_setup;
static ahc_device_setup_t ahc_apa1480_setup;
static ahc_device_setup_t ahc_aic7870_setup;
static ahc_device_setup_t ahc_aic7870h_setup;
static ahc_device_setup_t ahc_aha394X_setup;
static ahc_device_setup_t ahc_aha394Xh_setup;
static ahc_device_setup_t ahc_aha494X_setup;
static ahc_device_setup_t ahc_aha494Xh_setup;
static ahc_device_setup_t ahc_aha398X_setup;
static ahc_device_setup_t ahc_aic7880_setup;
static ahc_device_setup_t ahc_aic7880h_setup;
static ahc_device_setup_t ahc_aha2940Pro_setup;
static ahc_device_setup_t ahc_aha394XU_setup;
static ahc_device_setup_t ahc_aha394XUh_setup;
static ahc_device_setup_t ahc_aha398XU_setup;
static ahc_device_setup_t ahc_aic7890_setup;
static ahc_device_setup_t ahc_aic7892_setup;
static ahc_device_setup_t ahc_aic7895_setup;
static ahc_device_setup_t ahc_aic7895h_setup;
static ahc_device_setup_t ahc_aic7896_setup;
static ahc_device_setup_t ahc_aic7899_setup;
static ahc_device_setup_t ahc_aha29160C_setup;
static ahc_device_setup_t ahc_raid_setup;
static ahc_device_setup_t ahc_aha394XX_setup;
static ahc_device_setup_t ahc_aha494XX_setup;
static ahc_device_setup_t ahc_aha398XX_setup;

static const struct ahc_pci_identity ahc_pci_ident_table[] = {
/* aic7850 based controllers */

 
java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
 ID_ALL_MASK
02/  "
 
 }java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
 /* aic7860 based controllers */
 {
java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 16
 2Ultrajava.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 43
 java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
  
},ahc_aic7860_setup
 {
  &,
 ID_DEV_VENDOR_MASK,
 "ID_ALL_MASK,
  ahc_apa1480_setup  Adaptec 9X
 },,
 {
  ID_AHA_2940AU_0
 ,
 ID_AHA_3940
  ,
  Adaptec34  adapter
 {java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
  ID_AHA_2940AU_CN  Adaptecjava.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
 ID_AHA_2944java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
  java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 14
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
  ID_DEV_VENDOR_MASK0SCSIjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
ajava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
  ID_DEV_VENDOR_MASK
  " 290 Ultra adapter ()"java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
  ID_DEV_VENDOR_MAS
 }
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
 {
I,
 ,
  "Adaptec 2940 SCSI adapter",
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
 },
 {
  Adaptec2Adaptec94Ultraa,
  ID_ALL_MASK
  },java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
,  ,
 },
 java.lang.StringIndexOutOfBoundsException: Range [2, 3) out of bounds for length 2
    * XXX Don't know * so we can't identify channels
 I  ,
  "Adaptec java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
 java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
 java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
 {
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
*  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  
  ahc_aic7870h_setupID_AHA_2930U&,
  ,
 {
  ,
  ,
" 24/ java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
 ahc_aha394Xh_setup
 },
 {
 ID_9005_SISL_MASK
  java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 7

  ahc_aha494Xh_setup
 },
 /* aic7880 based controllers */
 {
 &,
  ID_DEV_VENDOR_MASK,
 "Adaptec_setup
 } java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
 },
 
ID_AHA_3940U ,
  ID_DEV_VENDOR_MASKNULL
 ptec
 ahc_aha394XU_setup
 }, ,
 {
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
  ID_DEV_VENDOR_MASKID_AHA_2930U2,
  Adaptec9ajava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
  ahc_aic7880h_setup
 }java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
 
  ID_AHA_3944U
  ID_DEV_VENDOR_MASK,
  "java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 2
  
 },
 {
   20Ultra2,
  ID_DEV_VENDOR_MASKID_AHA_2950U2B
  "Adaptec java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 3
  ,
 ,
  D_AIC7890_AROA90Ultra2SCSIadapter,
  /*
 * XXX Don't know the slot numbers
 * so we can't identify channels
 */

 ID_AHA_4944U ID_DEV_VENDOR_MASK
  ID_DEV_VENDOR_MASK java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
  "Adaptec 494 " aic78909java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
  ahc_aic7880h_setupahc_aic7890_setup
 }java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
 java.lang.StringIndexOutOfBoundsException: Range [14, 2) out of bounds for length 2
 
  ID_DEV_VENDOR_MASK,,
  "Adaptec 2930 Ultra SCSI adapter",
  ahc_aic7880_setup /* aic7892 based controllers */
 },
 {
 {
  ID_DEV_VENDOR_MASKID_AHA_29160
 java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
  ro_setup
  " 2960ujava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
 {
 ID_AHA_2940U_CN &ID_DEV_VENDOR_MASK
  ID_DEV_VENDOR_MASK,
  Adaptec9java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 3
  ahc_aic7880_setup
 } ID_ALL_MASK
 /* Ignore all SISL (AAC on MB) based controllers. */(  96   ,
 {
  ID_9005_SISL_ID,
  java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 2
  java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14

 } 
 /* aic7890 based controllers */,
 {
  ID_AHA_2930U2CUltra160
 java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
"90Ultra2 "java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
   ahc_aic7890_setup
 }ID_AHA_19160B,
 {
  ID_AHA_2940U2B,
  1B  "java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
 I,
   ID_ALL_MASK
 },
 {
  ID_AHA_2940U2_OEM
  ID_ALL_MASK
  java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 3
  java.lang.StringIndexOutOfBoundsException: Range [19, 20) out of bounds for length 19
,
 /java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
  ID_AHA_2940U2,
  ID_ALL_MASK,
  "Adaptec 29a
aic7892 java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
"10 java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 44
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
  java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 2
  ID_ALL_MASKID_AHA_2940U_DUAL
   ID_ALL_MASKjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
  ahc_aic7890_setup
 }
  34Ultrajava.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 37
   ID_ALL_MASK
 java.lang.StringIndexOutOfBoundsException: Range [19, 3) out of bounds for length 19
  0   ,
  ahc_aic7890_setup
 ,
 }java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
 ID_AAA_131U2ID_AIC7895_ARO,
  ID_ALL_MASKI,java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
  
  ahc_aic7890_setup
 } "java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
 /* aic7892 based controllers */
 
  ID_AHA_29160,
 *ic789697  

  ahc_aic7892_setup
 },
 {
 ID_AHA_3950U2B_0,
  ,
  " "Adaptec 3A 90java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 40
  ahc_aic7892_setup,
 }Ijava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
 {
  ID_AHA_29160N
  ID_ALL_MASK,
   Adaptec90java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
  hc_aic7892_setup
 ,
{
  ID_AHA_29160C
 java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
  "Adaptec 2 ID_AIC7850 &ID_DEV_VENDOR_MASK,
  ahc_aha29160C_setup
 },
 {
 I,
  ID_ALL_MASK  ajava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
  "&ID_DEV_VENDOR_MASKjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
  ahc_aic7892_setup
 },
 {
 java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
  ID_ALL_MASKahc_aic7860_setup
  "Adaptec,
 a
 },
 & java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
  " /9Ultra2SCSI adapter ARO,
  ID_ALL_MASK,
  " aic7892 Ultra160java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
  ahc_aic7892_setup  ,
  ,
 {
  ID_AHA_2915_30LP,
  ID_ALL_MASK,
  java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
  ahc_aic7892_setup
 }java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
 /* aic7895 based controllers */
 {
 java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
  ID_ALL_MASK
  "Adaptec java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
   ID_AHA_3960D_CPQ ID_9005_GENERIC_MASK
 },
 {
   ID_ALL_MASK,
  ID_ALL_MASK  Adaptec
  "Adaptec},
  ahc_aic7895_setup
 java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
 {
  D_AHA_3944AUID_ALL_MASKjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
  ID_ALL_MASK
  java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
  ahc_aic7895h_setup
 } java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
 {
  ID_AIC7895_ARO
   & ,
  java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
  
 },
 /* aic7896/97 based controllers */   SCSI",
 {
  ID_AHA_3950U2B_0java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
  ID_ALL_MASK
 
  ahc_aic7896_setup  SCSIadapter,
 },
 {
  ID_AHA_3950U2B_1,
  ID_ALL_MASK,
  "Adaptec 3
  ahc_aic7896_setup
 }I&,
 {
 0java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
  ID_ALL_MASK,
 
  ahc_aic7896_setup
 }
 {
  
  ID_ALL_MASK,
 tra2 SCSIadapterAHC_394X_SLOT_CHANNEL_A
  define AHC_394X_SL 5
 },
 {
  ID_AIC7896_ARO,
  ID_ALL_MASK,
 "  "Adaptec aic7896
  ahc_aic7896_setup
 },
 /* aic7899 based controllers */ {java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 {
 ID_AHA_3960D
  ID_ALL_MASK,
  java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
  ahc_aic7899_setup
 },

  ID_AHA_3960D_CPQ,java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
  ID_ALL_MASK
  "Adaptec (Compaq OEM) 39#define REXTVALID 0Ijava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
   Adaptec    /* aic7870+ only */
 },
 {
  ID_AIC7899_ARO,
  ID_ALL_MASK SCBRAMSEL000008java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
  "Adaptec aic7899{
  ahc_aic7899_setup
 },
 /* Generic chip probes for devices we don't know 'exactly' */
 {
 ID_DEV_VENDOR_MASK
  ID_DEV_VENDOR_MASK"aic7880 SCSI adapterjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
 }
  
 },
 {
  ID_AIC7855 & ID_DEV_VENDOR_MASK
  ID_DEV_VENDOR_MASK,
  "SCSIadapter",
   #defineCSIZE_LATTIME  x0c
 },
 {
  ID_AIC7859
  ID_DEV_VENDOR_MASK
  "Adaptec aic7859 SCSI /* PCI STATUS definitions */
  ahc_aic7860_setup
 ID_AIC7892&java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
 {
  D_AIC7860 ,
  ID_DEV_VENDOR_MASK  0java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
  "Adaptec aic7860 Ultra SCSI adapter",
 ahc_aic7860_setup
 },
 {
  ID_AIC7870 & ID_DEV_VENDOR_MASKstatic ahc_9005_subdevinfo_valid( deviceuint16_tjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
  ID_DEV_VENDOR_MASK,
  java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
  ahc_aic7870_setup void ( ahc_softc*hc int,
 },
 {
 ID_AIC7880 & ID_DEV_VENDOR_MASK
  ID_DEV_VENDOR_MASK  aic7895SCSI",
 "Adaptec  Ultra SCSI adapter"java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
  ahc_aic7880_setup
 }java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
 {
  ID_AIC7890java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 2
 java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 23
  Aaic7896 Ultra2SCSI"java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
  ahc_aic7890_setup
 }sta voidahc_new_term_detectahc_aic7896_setup
 {}
  ID_AIC7892  {
  ID_9005_GENERIC_MASKjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
 AdaptecUltra160SCSIadapter
  ahc_aic7892_setup
 },
 {
  ID_AIC7895  intI,
  ID_DEV_VENDOR_MASK   "java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
  Adaptec
 ahc_aic7895_setup
 },
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
  ID_AIC7896 java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
 , java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 48
 #0 /* aic789X only */
  ahc_aic7896_setupjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
 },
 {
  ID_AIC7899 & ID_9005_GENERIC_MASK,
  ID_9005_GENERIC_MASK,
  "Adaptec aic7899 Ultra160 SCSI adapter",
  ahc_aic7899_setup
 },
 {
  ID_AIC7810 & ID_DEV_VENDOR_MASK,
  ID_DEV_VENDOR_MASK,
  "Adaptec aic7810 RAID memory controller",
  ahc_raid_setup
 },
 {
  ID_AIC7815 & ID_DEV_VENDOR_MASK,
  ID_DEV_VENDOR_MASK,
  "Adaptec aic7815 RAID memory controller",
  ahc_raid_setup
 }
};

static const u_int ahc_num_pci_devs = ARRAY_SIZE(ahc_pci_ident_table);
  
#define AHC_394X_SLOT_CHANNEL_A 4
AHC_394X_SLOT_CHANNEL_B 5

 AHC_398X_SLOT_CHANNEL_A4
void check_extport(struct *,  *);
#defineAHC_398X_SLOT_CHANNEL_C2

#define AHC_494X_SLOT_CHANNEL_A 4
#define AHC_494X_SLOT_CHANNEL_B 5
# AHC_494X_SLOT_CHANNEL_C
#define AHC_494X_SLOT_CHANNEL_D 7

#define 0
    ,
#define   *);
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 MPORTMODE0java.lang.StringIndexOutOfBoundsException: Range [51, 52) out of bounds for length 51
#define  RAMPSM void struct*, *,
#define       java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
 PCI64BITx00000080ul/* 64Bit PCI bus (Ultra2 Only)*/
#   0
 externalcable_present
#define  0x00000020ul
#define  EXTSCBPEN 0x00000010ul     ( ahc_softc ahc, uint8_tvalue);
uint8_t (  ahc;
#define  DACEN  0x00000004ul
#define  STPWLEVEL 0x00000002ul
#define  DIFACTNEGEN 0x00000001ul /* aic7870 only */

CSIZE_LATTIME x0c
#define  CACHESIZE 0x0000003ful int( ahc_softcahc;
#definejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

/* PCI STATUS definitions */
#define DPE 0x80
#define SSE 0x40
#define RMA 0x20
#define RTA 0x10
#define STA 0x08
#define DPR 0x01

static subdeviceuint16_tsubvendor)
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
static (struct *)java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
staticvoid ( ahc_softc,  enable
      int pcheck&subvendor==0java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
static void ahc_probe_ext_scbram(struct ahc_softc
static voidcheck_extport(struct *,u_int*)java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
static ahc_parse_pci_eeprom( ahc_softc *ahc
     struct seeprom_config :
static configure_terminationstructahc_softcahc
      struct seeprom_descriptor */*
  u_int adapter_control,
    u_int *sxfrctl1);

static void ahc_new_term_detect(struct ahc_softc *ahc,
int *enableSEC_low,
int *enableSEC_high,
int *enablePRI_low,
int *enablePRI_high,
int *eeprom_present);
static void aic787X_cable_detect(struct ahc_softc *ahc, int *internal50_present,
 int *internal68_present,
 int *externalcable_present,
 int *eeprom_present);
static void aic785X_cable_detect(struct ahc_softc *ahc, int *internal50_present,
 int *externalcable_present,
 int *eeprom_present);
static void    write_brdctl(struct ahc_softc *ahc, uint8_t value);
static uint8_t read_brdctl(struct ahc_softc *ahc);
static void ahc_pci_intr(struct ahc_softc *ahc);
static int  ahc_pci_chip_init(struct ahc_softc *ahc);

static int
ahc_9005_subdevinfo_valid(uint16_t device, uint16_t vendor,
  uint16_t subdevice, uint16_t subvendor)
{
int result;

/* Default to invalid. */

 result = 0;
 if (vendor == 0x9005
  &&   }
java.lang.StringIndexOutOfBoundsException: Range [1, 9) out of bounds for length 2
         & SUBID_9005_TYPE_KNOWN() != ){

  switch (SUBID_9005_TYPE(subdevice)) {
  case SUBID_9005_TYPE_MB:
   break;
  case SUBID_9005_TYPE_CARD:
  case SUBID_9005_TYPE_LCCARD:
   /*
 * Currently only trust Adaptec cards to
 * get the sub device info correct.
 */

   if (DEVID_9005_TYPE(device) =
    result = 1;
   break;
  case SUBID_9005_TYPE_RAID:
   break;
  default:
   break;
  java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
 
 return onststruct  *entry
}

conststructahc_pci_identity *
ahc_find_pci_device( )
{
 uint64_t;
 uint16_t  = (,PCI_SUBSYSTEM_ID, /*bytes*/2);bytes*);
 uint16_tvendor;
 uint16_t  subdevice;
 uint16_t  subvendor;
 const struct ahc_pci_identity *entry  * If the second function is not hooked   * Unfortunately, not all MB vendors implement our best
 u_int   i ((pci>0

 vendor = ahc_pci_read_config(pci, PCIR_DEVVENDOR, /*bytes*/2);
 device = ahc_pci_read_config(pci, PCIR_DEVICE, /*bytes*/2);
 subvendor=ahc_pci_read_config,PCI_SUBSYSTEM_VENDOR_ID/*bytes*/2);
 subdevice = ahc_pci_read_config &SUBID_9005_MFUNCENB() =java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
 full_id (, vendor ubdevice)java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64

 /*
 * If the second function is not hooked up, ignore it.
 * Unfortunately, not all MB vendors implement the
 * subdevice ID as per the Adaptec spec, so do our best
 * to sanity check it prior to accepting the subdevice
 * ID as valid.
 */

 if ((pci  0
  && ahc_9005_subdevinfo_valid(device, java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 27
     NULL
   return)

 for (i = 0; i}
 entry ahc_pci_ident_table];
  if (entry->full_id == (full_id & entry->id_mask)) {
   /* Honor exclusion entries. */
   if (entry-ahc_pci_config(struct ahc, const structahc_pci_identity*entry)
     return(NULL);
   return (entry);
  }
 }
n(NULL;
}

int
ahc_pci_config(struct ahc_softc *ahc, const struct ahc_pci_identity * u_intintdscommand0
{
   ;
 u_int java.lang.StringIndexOutOfBoundsException: Range [7, 0) out of bounds for length 0
   ;
 java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
 u_int  * storm
 uint32_t;
 int
   sblkctl

  = 0;
 error = entry->setup(ahc);
 if (error != 0)
  return (error);
 ahc->chip |= AHC_PCI;
 ahc->description = entry->name;

 pci_set_power_state(ahc->dev_softc,   * 64bit bus (PCI64BIT set  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

 error = ahc_pci_map_registers(ahc);
 if (error != 0)
  return();

 /*
 * Before we continue probing the card, ensure that
 * its interrupts are *disabled*.  We don't want
 * a misstep to hang the machine in an interrupt
 * storm.
 */

 ahc_intr_enableahc FALSE

 devconfig =  ahc_pci_write_configahc-dev_softc , devconfig, /*bytes*/4);*/4)

 /*
 * If we need to support high memory, enable dual
 * address cycles.  This bit must be set to enable
 * high address bit generation even if we are on a
 * 64bit bus (PCI64BIT set in devconfig).
 */

 if ((ahc->flags & AHC_39BIT_ADDRESSING) != 0) {

  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      ();
  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  devconfig /* Default to invalid. */java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 }
 
 /* Ensure that pci error generation, a test feature, is disabled. */
 =;

 ahc_pci_write_config  parity  be java.lang.StringIndexOutOfBoundsException: Range [0, 49) out of bounds for length 4

 /* Ensure busmastering is enabled */
  * Remember how the card was setup in case there is no SEEPROM */
 f((ahc) &POWRDN=){

  1

 /* On all PCI adapters, we allow SCB paging */
 flags;

 error =  struct ahc_pci_identity  = _( )
 if (error != 0)
  return (error);

 /*
 * Disable PCI parity error checking.  Users typically
 * do this to work around broken PCI chipsets that get
 * the parity timing wrong and thus generate lots of spurious
 * errors.  The chip only allows us to disable *all* parity
 * error reporting when doing this, so CIO bus, scb ram, and
 * scratch ram parity errors will be ignored too.
 */

RR != ))
  ahc-u_int i

 ahc->bus_intr =java.lang.StringIndexOutOfBoundsException: Range [0, 17) out of bounds for length 2
 ahc-> =ahc_pci_chip_init( != 0

 /* Remember how the card was setup in case there is no SEEPROM */

  ahc_pause(ahc);
 if((hc-features AHC_ULTRA2ecspec so our java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
 
    /* Perform ALT-Mode Setup */
   our_id = ahc_inb(  * to sanity check it prior to accepting the subdevice  * ID as valid.
   ahc_outbahc, |ALT_MODE;
 scsiseq(, );
 } else {
  sxfrctl1 = STPWEN;
  our_id = 7;
  scsiseqcsiseq == 0java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
 }

 error = ahc_reset(ahc, /*reinit*/FALSE);
 if (error   }
  return (

 if ((  = ahc_inbahc DSCOMMAND0;
  sfunct

 /* Perform ALT-Mode Setup */
  sfunct =java.lang.StringIndexOutOfBoundsException: Range [4, 5) out of bounds for length 4
}
java.lang.StringIndexOutOfBoundsException: Range [3, 4) out of bounds for length 3
   OPTIONMODE_DEFAULTS|AUTOACKENBUSFREEREVEXPPHASEDIS;
  ahc_outb(ahc, SFUNCT, sfunct);

  /* Normal mode setup */
CRCCONTROL1, CRCVALCHKEN|CRCENDCHKEN|CRCREQCHKEN
 }
 }

 dscommand0= ahc_inbahc,java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 dscommand0 |= MPARCKEN|CACHETHEN;
}

  /*
 * DPARCKEN doesn't work correctly on
 * some MBs so don't use it.
 */

 dscommand0 {
 }

/
  * Handle>bugs & AHC_PCI_2_1_RETRY_BUG) != 0
  * streaming (dis/en  u_inttes1);
 u_int_
  u_int perform  * ofthe precisionjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  dscommand0if REXTVALID )

 if ((ahc->bugs & AHC_CACHETHEN_BUG) != 0)
  dscommand0=~CACHETHEN;

 java.lang.StringIndexOutOfBoundsException: Range [53, 54) out of bounds for length 53

 ahc->  *TaketheLED outof   *
 ahc_pci_read_configahc-dev_softc, ,
    /*bytes*/1) & CACHESIZE;(ahc,SBLKCTL ( & ~(DIAGLEDENDIAGLEDON);
 ahc->pci_cachesize * 4java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
& >>pci_cachesize= 4 java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31

 ahc_pci_write_config
tes1;
  ahc->pci_cachesize
 }

 /*   * Should only   * a misstep to hang    *  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 * We cannot perform ULTRA speeds without the presence
 * of the external precision resistor.
 */

 if ((ahc->features & AHC_ULTRA) != 0) {
  uint32_t devconfig;

  devconfig = ahc_pci_read_config(ahc->dev_softc,
    ahc->flags &= ~AHC_USEDEFAULTS;  ahc->flags |= AHC_BIOS_ENABLED
    * 64bit bus (PCI64BIT  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   ahc->features &= ~AHC_ULTRA  = ;
 }

 /* See if we have a SEEPROM and perform auto-term */>our_idour_id
 (,sxfrctl1;

 /*
 * Take the LED out of diagnostic mode
 */

 sblkctl =
 ahc_outb  * Record our termination   * generic initialization routine.

 if ((ahc->features & AHC_ULTRA2) != 0) {
 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 } else
  (ahc,)
 ahc_pci_read_config>, ,/

   java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
  /*
 * PCI Adapter default setup
 * Should only be used if the adapter does not have
 * a SEEPROM.
 */

  /* See if someone else set us up already */
if>&) =0
 & scsiseq= 0 java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
   printk.. java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    ahc_name
> &~java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
 flags| java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
  } else  * Disable PCI parity error checking.  Users typically
   /*
 * Assume only one connector and always turn
 * on termination.
 */

    our_id = 0x07;
   sxfrctl1 = STPWEN   ahc-.. = (ahcjava.lang.StringIndexOutOfBoundsException: Range [63, 63) out of bounds for length 60
  }
  ahc_outb(ahc, SCSICONF, >bus_softc. =

 ahc- = ;
 }

 /*
 * Take a look to see if we have external SRAM.
 * We currently do not attempt to use SRAM that is
 * shared among multiple controllers.
 */

  java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0

 /*
 * Record our termination setting for the
 * generic initialization routine.
 */

 if/
  >flags ahc

 /*
 * Save chip register configuration data for chip resets
 * that occur during runtime and resume events.
 */

bus_softcpci_softc
     ahc_pci_read_configjava.lang.StringIndexOutOfBoundsException: Range [24, 25) out of bounds for length 3
 bus_softc. java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
     ahc_pci_read_config(  
 ahc->bus_softc.pci_softc
     ahc_pci_read_config(ahc->dev_softc, CSIZE_LATTIME, /*bytes*/1);
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ahc-..dspcistatus=ahc_inb, );
 java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 1
  u_int sfunct;

  sfunct = ahc_inb
 ahc  |)java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
    sfunct
 /java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
 ahc_outb ,;
  ahc-.. java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
 ahc_inb, CRCCONTROL1)java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
 }
 (ahc-   = 0java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
  ahc->bus_softc (ahc CRCCONTROL1    d' SCBspacethe

  r (,java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 39
  ahc-bus_softc.ci_softc = (ahc )

 
 
  error
  (;
 ahc->init_level++;

 /*
 * Allow interrupts now that we are completely setup.
 */

  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}

/*
 * Test for the presence of external sram in an
 * "unshared" configuration.
 */

static int
(   
{
 ;
 int ramps;
 int  Base highest bit
 uint32_tahc_pci_read_configjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

 =ahc-
devconfig (ahc-,
     DEVCONFIG, /*bytes*/4); ahc_pci_write_config(hc-
single_user devconfig ) >pci_cachesize ;

 if ((ahc->features & AHC_ULTRA2 e=ahc_pci_read_config>,,*ytes4;
 ramps ahc_inb  u_int;
 else if (chip ==  if (enable)
  /*
 * External SCBRAM arbitration is flakey
 * on these chips.  Unfortunately this means
 * we don't use the extra SCB ram space on the
 * 3940AUW.
 */

  ramps = 0;
   ()
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 else
  ramps = 0;

 if if (ahc_outb, =;
  ahc_pci_write_config4);
}
}

/* * Take a  
 * Enable external scbram.
 */

static  * shared among multiple controllers.
java.lang.StringIndexOutOfBoundsException: Range [0, 17) out of bounds for length 11
 ahc_probe_ext_scbramstructahc_softc*)
{
  ;

if  test_num_scbs
 nt ;
   *  int fast
   " BIOS settings\"
    java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   ;
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2

 ahc-  * java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if
  ahc->  * Probe for the best parameters to java.lang.StringIndexOutOfBoundsException: Range [0, 40) out of bounds for length 4
 devconfignum_scbsahc_probe_scbs)java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
 if ((ahc-> /* The SRAM wasn't really present. */
 ahc_outbahc, , our_id ;

/
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   dscommand0 (,SEQCTL;
  ahc_outb, CLRINT );
   dscommand0 |= INTSCBRAMSEL ahc_outbahcCLRINT);
  if (large)
   dscommand0 ahc_probe_ext_scbram(ahc;
  else
   dscommand0 |= USCBSIZE32;
  ahc_outb(hc, DSCOMMAND0, dscommand0);
 }  =ahc_probe_scbs);
   (ahc_inb, ) &BRKADRINT = java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
  devconfig
  else
   devconfig |  * Record our terminationjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   ()
 &~    initialization.
    java.lang.StringIndexOutOfBoundsException: Range [2, 0) out of bounds for length 0
   =SCBRAMSEL
  if (large)
   devconfig  *ahc_scbram_config, enable, pcheck /*fast*/TRUE, large);  that during runtime and  events 
  else
   |SCBSIZE32
 }
 ifpcheck( =java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
   ((, )) =java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 44
 else
  & ~;

 /*
}

/*
 * Take a look to see if we have external SRAM.
 * We currently do not attempt to use SRAM that is
 * shared among multiple controllers.
 */

static (ahcenable , , /*large*/TRUE);
( ahc_softc)
{
  ;
 int test_num_scbs;
  enable

  ifnum_scbs=   >>.c=
 int large;

e  ;
  /
 fast = FALSE;
 arge FALSE
 num_scbsahc-bus_softc       java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 
  java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
 goto

*
  * Probe   */
  *
 ahc_scbram_config( * Clear  latched java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
n =ahc_probe_scbs)
 if (num_scbs == 0) {
  /* The SRAM wasn't really present. */
  goto done * "unshared" *
 }
 enable= TRUE }

 /*
 * Clear any outstanding parity error
 * and ensure that parity error reporting
 * is enabled.
 */

, SEQCTL );
 ahc_outb( int ahc-chipAHC_CHIPID_MASK
 ahc_outb(ahc, java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 14

 /* Now see if we can do parity */      ,   generatedbySERR raisedjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ahc_scbram_config(ahc, enable, /*pcheck*/

 num_scbs = ahc_probe_scbs(ahc);
 if (( 
  || (ahc_inb(ahc,  * registers can be  = (  HCNTRL noside   *at onebit that  * be zero so it is a good  * use for this 
  ;

 /* Clear any resulting parity error */
ahc,)java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
 ahc_outb(ahc, CLRINT   *  if( = java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 5

  *   * we don't use the * or read prefetching could be initiated by * 3940AUW. java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ahc_scbram_configahc 
   &=~CHIPRST
 java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
  && ((ahc_inb( (ahc_is_paused)=0
   || (ahc_inb(ahc, ERROR
  fast=TRUE

 
  1);
  ()
  */
 if * E_outb(ahc,CLRINT CLRPARERR;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  =(ahc;
  if (test_num_scbs >= num_scbs) {
   large = TRUE;
scbs
   ( > 4 {
    ahc_outlahcSCB_BASE
     * We have enough space to move the
   *
 way  the fail
    java.lang.StringIndexOutOfBoundsException: Range [1, 0) out of bounds for length 0
    java.lang.StringIndexOutOfBoundsException: Range [2, 0) out of bounds for length 0
    ahc->flags |= java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
   }
 }
 }
done
 /*
 * Disable parity error reporting until we
 * can load instruction ram.
 */

ahc_outb:
/
ahc_outb(ahc, CLRINT, CLRPARERR);
ahc_outb(ahc, CLRINT, CLRBRKADRINT);
if (bootverbose && enable) {
printk("%s: External SRAM, %s access%s, %dbytes/SCB\n",
       ahc_name(ahc), fast ? "fast" : "slow", 
       pcheck ? ", parity checking enabled" : "",
       large ? 64 : 32);
}
ahc_scbram_config(ahc, enable, pcheck, fast, large);
}

/*
 * Perform some simple tests that should catch situations where
 * our registers are invalidly mapped.
 */

int
ahc_pci_test_register_access ahc_softcahc
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
 int error * and/cable contrls.
 u_int  status1;
 java.lang.StringIndexOutOfBoundsException: Range [20, 14) out of bounds for length 14
 uint8_t hcntrl

 error = EIO;

 /*
 * Enable PCI error interrupt status, but suppress NMIs
 * generated by SERR raised due to target aborts.
 */

 cmd  java.lang.StringIndexOutOfBoundsException: Range [12, 2) out of bounds for length 19
a(>,PCIR_COMMANDsd =ahc
 cmd; 

 /*
 * First a simple test to see if any
 * registers can be read.  Reading
 * HCNTRL has no side effects and has
 * at least one bit that is guaranteed to
 * be zero so it is a good register to
 * use for this test.
 */

 hcntrl = ahc_inbjava.lang.StringIndexOutOfBoundsException: Range [17, 18) out of bounds for length 3

 devconfig&= ~EXTSCBPEN;
  goto fail;

 if ((hcntrl & CHIPRST) != 0) {
  /*
 * The chip has not been initialized since
 * PCI/EISA/VLB bus reset.  Don't trust
 * "left over BIOS data".
 */

  ahc->flags |=
 }

 /*
 * Next create a situation where write combining
 * or read prefetching could be initiated by the
 * CPU or host bridge.  Our device does not support
 * either, so look for data corruption and/or flagged
 * PCI errors.  First pause without causing another
 * chip reset.
 */

 hcntrl &= ~CHIPRST;
 ahc_outb(ahc
 hileahc_is_paused) = )
  ;

 /* Clear any PCI errors that occurred before our driver attached. */
status1ahc_pci_read_config>dev_softc
   .sd_CK=SEECK;
 (ahc-java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
       ,
 ahc_outb(ahc, CLRINT, CLRPARERR

 ahc_outb(ahc, SEQCTL, PERRORDIS)
 (ahc SCBPTR, java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 (ahc SCB_BASE05);
 if (ahc_inlint test_num_scbs  (;){
  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

status1(largejava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
          PCIR_STATUS + 1    (*sc2)
 if ((status1 &  if()
  goto fail;

 error = 0;

fail:
 /* Silently clear any latched errors. */
 status1 = ahc_pci_read_config
          PCIR_STATUS + 1   if( !=0| sd ==C56_66{
 ahc_pci_write_config(ahc->dev_softc, PCIR_STATUS + 1,
     f( {
 ahc_outb(ahc  ifhave_seeprom( = 0) {
 ahc_outb (" error\n);
 ahc_pci_write_configahc-dev_softc   else
 return();
}

/*
 * Check the external port logic for a serial eeprom
 * and termination/cable detection contrls.
 */

static void
check_extport(struct ahc_softc *ahc, u_int *sxfrctl1)ahc_outb,CLRINT }
{
 struct seeprom_descriptor sd;
  seeprom_configahc_scbram_configahc ,java.lang.StringIndexOutOfBoundsException: Range [61, 62) out of bounds for length 61
 inthave_seeprom;
  int have_autoterm;

 sd
 sd
sdsd_status_offset= SEECTL
 /* Clear any resulting parity error */
  java.lang.StringIndexOutOfBoundsException: Range [4, 5) out of bounds for length 4

 /*
 * For some multi-channel devices, the c46 is simply too
 * small to work.  For the other controller types, we can
 * get our information from either SEEPROM type.  Set the
 * type to start our probe with accordingly.
 */

 if (ahc-java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 *   ofjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 else
  sd &if (test_num_scbs {

 sdlargeT;
 sd.sd_RDY =    ;   ;
 sd  = java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
 sd
 sd.
 sd.  SEEDI

 have_seeprom
    have_seeprom = ahc_verify_cksum(sc);

  if (bootverbose) 
  ("s eading ..java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4

for ;)java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
 u_int;

   =3  (> - 'A';

  have_seeprom
    f !) {
       sizeof  if ()

   f ()
    have_seeprom = ahc_verify_cksum       ahc_nameahc,fast?"fast"  "

   if (have_seeprom        large?6  2java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
     (ootverbose)
     if (have_seeprom == 0}
      printk ("checksum
     else
     printk (done)
    }
    break;
   }
   .sd_chip *  that the logic to *a SEEPROM,are certain    *necessaryforauto-terminationcontrol   ' java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  }
  ahc_release_seeprom(&sd);

  /* Remember the SEEPROM type for later */    (ahc-features ) ! )java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
ifjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 ahc-> | ;
 }

 (have_seeprom)java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
  /*
 * Pull scratch ram settings and treat them as
 * if they are the contents of an seeprom if
 * the 'ADPT' signature is found in SCB2.
 * We manually compose the data as 16bit values
 * to avoid endian issues.
 */

  ahc_outb(ahc, SCBPTR, 2);
 if(ahc_inb ahc_namehc,
   & (, SCB_BASE + 1) == 'D'
   && ahc_inb         (sxfrctl1&STPWEN"" : dis)
   && ahc_inb(ahc, SCB_BASE java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
   sc_datajava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
   int   i;

   sc_data = (uint16_t *)sc  * where   * use for this
   for int ijava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
  ;

     i*2
  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      | uint16_tdiscenable
   }
   have_seeprom = ahc_verify_cksum(sc);
    =;
   gs ;;
  }
  /*
 * Clear any SCB parity errors in case this data and
 * its associated parity was not initialized by the BIOS
 */

 ahc_outb,CLRINT );
  ahc_outb(ahc,     *chip.
 }

 if!){
  if (bootverbose)
   printk("% (java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 3
-flags 
 (seep_configjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
     ,
  sc = NULLdiscenable=;
 } else {
  ahc_parse_pci_eeprom(ahc, sc);
 java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2

java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
 ultraenb=;
  * a }else (>if( STA =0
   for java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 'java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
  java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
  java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30

java.lang.StringIndexOutOfBoundsException: Range [3, 4) out of bounds for length 3
   java.lang.StringIndexOutOfBoundsException: Range [1, 2) out of bounds for length 1
  * infsethe external port   else 
 * and
 s void
  (ahc-     ighbit     * field.
  ((hc_inbahc ) &) ==java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
  =FALSE
 }

 if|java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
ahc-flags | ;
 (,;
termination>,sxfrctl1
   }. =; 
   if(ave_seeprom){
 sxfrctl1 STPWEN
 /*
*sxfrctl1 |= STPWEN;
if (bootverbose)
printk("%s: Low byte termination %sabled\n",
       ahc_name(ahc),
       (*sxfrctl1 & STPWEN) ? "en" : "dis");
}
}

static void
ahc_parse_pci_eeprom(struct ahc_softc *ahc, struct seeprom_config *sc)
{
/*
 * Put the data we've collected down into SRAM
 * where ahc_init will find it.
 */

  ;
 int . =SEEDO
 u_int  scsi_conf;
   >  CFEXTEND
 >flags=java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37

discenable0java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16

fsc- !) java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
   (>  )
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   * SEEPROM  =0
     sizeof
   (  ;  ifjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
   if (   ( !  |sdsd_chip= ){
    ahc->flags |
    breakjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10

  }
java.lang.StringIndexOutOfBoundsException: Range [3, 2) out of bounds for length 2

 for (i =0 java.lang.StringIndexOutOfBoundsException: Range [0, 14) out of bounds for length 4
 u_intjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
  uint16_t

target_mask = 0x01 << i;
if (sc->device_flags[i] & CFDISC)
discenable |= target_mask;
if ((ahc->flags & AHC_NEWEEPROM_FMT) != 0) {
if ((sc->device_flags[i] & CFSYNCHISULTRA) != 0)
ultraenb |= target_mask;
} else if ((sc->adapter_control & CFULTRAEN) != 0) {
ultraenb |= target_mask;
}
if ((sc->device_flags[i] & CFXFER) == 0x04
 && (ultraenb & target_mask) != 0) {
/* Treat 10MHz as a non-ultra speed */

 >[  &java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 39
    ultraenb &= ~target_mask;
  java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
   ((>features& if ((ahc->features & AHC_ULTRA2
   u_int    (java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

   if (sc-(structahc_softcahc
       seeprom_descriptor*,
    
    offset = 0;
   ahc_outb{

  /*
 * The ultra enable bits contain the
 * high bit of the ultra2 sync rate
 * field.
 */

   scsirate = (sc->device_flags  
     | 
if (sc->device_flags[i] & CFWIDEB)
scsirate |= WIDEXFER;
} else {
scsirate = (sc->device_flags[i] & CFXFER) << 4;
if (sc->device_flags[i] & CFSYNCH)
scsirate |= SOFS;
if (sc->device_flags[i] & CFWIDEB)
scsirate |= WIDEXFER;
}
ahc_outb(ahc, TARG_SCSIRATE + i, scsirate);
}
ahc->our_id = sc->brtime_id & CFSCSIID;

scsi_conf = (ahc->our_id & 0x7);
if (sc->adapter_control & CFSPARITY)
scsi_conf |= ENSPCHK;
if (sc->adapter_control & CFRESETB)
scsi_conf |= RESET_SCSI;

ahc->flags |= (sc->adapter_control & CFBOOTCHAN) >> CFBOOTCHANSHIFT;

if (sc->bios_control & CFEXTEND)
ahc->flags |= AHC_EXTENDED_TRANS_A;

if (sc->bios_control & CFBIOSEN)
ahc->flags |= AHC_BIOS_ENABLED;
if (ahc->features & AHC_ULTRA
 && (ahc->flags & AHC_NEWEEPROM_FMT) == 0) {
/* Should we enable Ultra mode? */

    * if the termination logic is enabled   &,
   /* Treat us as a non-ultra card */    &enablePRI_high  (((, ) &)==0)
   ultraenb = 0;


 if (sc->signature ave_autoterm {
  || sc->signature =ahc->flags=AHC_HAS_TERM_LOGIC
 udevconfigjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21

 java.lang.StringIndexOutOfBoundsException: Range [36, 37) out of bounds for length 36
   ahc-  enableSEC_low= adapter_control&CFSELOWTERMjava.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
         (adapter_control& (ootverbose)
   ("s Low termination%abledn",
  if (  }
  if(    )java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
 ahc_pci_write_config
         devconfig, /*bytes*/4); 
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
java.lang.StringIndexOutOfBoundsException: Range [24, 25) out of bounds for length 24
 ahc_outb(ahc, SCSICONF, scsi_conf);
 ahc_outb(ahc, DISC_DSB, ~(discenable & 0xff  internal50_present
 (, DISC_DSB+ , ~discenable>> 8 & 0xff)
 ahc_outbahc ULTRA_ENB ultraenb&0);
i   = sc-max_targets CFMAXTARG
}

static else (features&) !0{
configure_termination
        struct seeprom_descriptor ultraenb =  (,&,
        u_int adapter_control,
       u_int)
{   * Determine if       eeprom_present
 uint8_t ei  ;
 
 brddat ;

 /*
 * Update the settings in sxfrctl1 to match the
 * termination settings 
 */

rctl1
 
 /*
 * SEECS must be on for the GALS to latch
 * the data properly.  Be sure to leave MS
 * on or we will release the seeprom.
 */

 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 (&)!java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
 java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
  int internal50_present;
 nt;
  ;
  int eeprom_present;
 intenableSEC_low
  int enableSEC_high;
 intenablePRI_low
  int          internal68_present"is:"";
  int sum;

e java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
     ultraenb &= }
 0
 (
 > AHC_NEW_TERMCTL(>& =0java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
   ahc_new_term_detect(   else 
     &enableSEC_high
         &enablePRI_low,
       &enablePRI_high,
         &eeprom_present);
   if ((adapter_control & CFSEAUTOTERM    a  terminatedbus
    if  *   nternal50_present =0
     printk( }
            ahc_name(ahc));
  enableSEC_low=( &java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 0
   * we foundif sc-device_flags  *Flash = java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
        (adapter_control & CFSEHIGHTERM sc-[i &   High  (9)
  java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
   if ((adapter_control & CFAUTOTERM & | java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
    if (bootverbose)
    ("s: ManualLVDTerminationn"java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
          hc_name)
 =( &)java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
    enablePRI_high java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 }
   /* Make the table calculations below happy */    * gives us a more stable bus.
   = 0
 1;
   externalcable_present externalcable_present;
  } else if ((   & ( == 0
5(, internal50_present
       &,
             |   ( java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
 > =CFSIGNATURE)!0
  =java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
  } else {
      java.lang.StringIndexOutOfBoundsException: Range [1, 0) out of bounds for length 0
                S java.lang.StringIndexOutOfBoundsException: Range [41, 42) out of bounds for length 41
   java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
  &);
 +externalcable_present

 &)=)
   internal68_present = 0;

  if    | ;
  * =;;
   printk("%s: internal 50 cable %s (ahc, i (> ) ! java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
          ahc_name(ahc),
          internal50_present ? "is":"not");

 if(>   ()
sent
           internal68_present ? "is"              :  seeprom_descriptorjava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
   printk("
        ahc_nameahc,
 externalcable_presentis:");
  }
  if (bootverbose)imary  Byte*frctl1=0java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
   printk
          ahc_name(ahc

 ifahc-    termination thetech on  cards
  /*
 * The 50 pin connector is a separate bus,
 * so force it to always be terminated.
 * In the future, perform current sensing
 * to determine if we are in the middle of
 * a properly terminated bus.
 */

  ifbootverbose f(>features) =0 java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
 }

  /*
 * Now set the termination based on what
 * we found.
 * Flash Enable = BRDDAT7
 * Secondary High Term Enable = BRDDAT6
 * Secondary Low Term Enable = BRDDAT5 (7890)
 * Primary High Term Enable = BRDDAT4 (7890)
 */

  if ((ahc->features}  {
   && /* Make
 &( ! 0
   & ( =;;
   printk("% i()
        Only  
          "adapter may be used
         "\n" ahc;

   /*
 * Pretend there are no cables in the hope
 * that having all of the termination on
 * gives us a more stable bus.
 */

    internal50_present = }else java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
   java.lang.StringIndexOutOfBoundsException: Range [26, 27) out of bounds for length 26
  externalcable_present;
  }

  (>  AHC_WIDE ? "")java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
   && ((externalcable_present    Setup before    
   java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 |!)java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
   brddat |= BRDDAT6;
   ifwrite_brdctl(,);
 java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
 
             internal68_presentjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
 java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
  ("s:%sHighjava.lang.StringIndexOutOfBoundsException: Range [23, 3) out of bounds for length 3
         "n, (ahc),
         Secondary
             : "");java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
   }
  }

      * to determine  * BRDDAT4 = Enable Primary    * a properly terminated bus  * BRDDAT3 = Enablejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      +  /*
if (sum < 2 || (enableSEC_low != 0)) {
if ((ahc->features & AHC_ULTRA2) != 0)
brddat |= BRDDAT5;
else
*sxfrctl1 |= STPWEN;
if (bootverbose) {
if ((ahc->flags & AHC_INT50_SPEEDFLEX) != 0)
printk("%s: 50 pin termination "
       "Enabled\n", ahc_name(ahc));
else
printk("%s: %sLow byte termination "
       "Enabled\n", ahc_name(ahc),
       enableSEC_low ? "Secondary "
     : "");
}
}

if (enablePRI_low != 0) {
*sxfrctl1 |= STPWEN;
if (bootverbose)
printk("%s: Primary Low Byte termination "
       "Enabled\n", ahc_name(ahc));
}

/*
 * Setup STPWEN before setting up the rest of
 * the termination per the tech note on the U160 cards.
 */

 ahc,sxfrctl1

  if (enablePRI_high
   java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
  ifbootverbose
  Settherom ank 0 
           "termination Enabled\*
           ahc_name  ;
  }
 java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
  write_brdctl(ahc

 } else {
  if(adapter_control& CFSTERM) =0 *connectorsBRDDAT6 isINT50 java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
   *sxfrctl1 |= STPWEN |( ! 0)) {

  i ()
    printk("%s: %sLow byte termination Enabled\n" internal68_present brddat|=RDDAT6
           ahc_nameahc,
  * Set the rom bank to 1 and determine
            : "");
  }

  if ((adapter_control/
   && (ahc->features & AHC_WIDE) != 0           " * connectors. BRDDAT6 is EXT68and
brddat=;
  bootverbose
   =( & ) ?  : ;
 java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
 aic785X_cable_detecttruct ahc_softc*, intinternal50_presentjava.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
         ? "Secondary " : " : ")
  }

  /*
 * Setup STPWEN before setting up the rest of
 * the termination per the tech note on the U160 cards.
 */

 (ahc SXFRCTL1 *)

  ifspiocapEXT_BRDCTL
 write_brdctl brddat
 }(ahc, |BRDCS
 SEEPROM_OUTB ahc_flush_device_writes();
}

static(,,   ( java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
ahc_new_term_detect(  ("b (,;
      int *enableSEC_high, int *enablePRI_low,
     intint*eprom_present

uint8_t brdctl;

 /*
 * BRDDAT7 = Eeprom
 * BRDDAT6 = Enable Secondary High Byte termination
 * BRDDAT5 = Enable Secondary Low Byte termination
 * BRDDAT4 = Enable Primary high byte termination
 * BRDDAT3 = Enable Primary low byte termination
 */

 brdctl = ifif enablePRI_low! ){
   && (ahc_inb(ahc, SPIOCAP) & SEEPROM) == 0)
 * return (0);
 *enableSEC_low = (brdctl & java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 *enablePRI_high =( & BRDDAT4java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
 *enablePRI_low = 
}

static   * the termination per the tech note on the U160  
  * is needed.  Reason: after java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
       int *internal68_present, int *  |=BRDDAT4
      int*eeprom_present
 = 1000;  /* 1 second timeout in msec */ " Enabled\"
dctl

 /*
 * First read the status of our cables.
 * Set the rom bank to 0 since the
 * bank setting serves as a multiplexor
 * for the cable detection logic.
 * BRDDAT5 controls the bank switch.
 */

 write_brdctl(ahc, 0);

 /*
 * Now read the state of the internal
 * connectors.  BRDDAT6 is INT50 and
 * BRDDAT7 is INT68.
 */

 brdctl = read_brdctl(ahc);
 *internal50_present = (brdctl  java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
 *internal68_present = (brdctl & BRDDAT7) ? 0 : 1;

 *
 * Set the rom bank to 1 and determine
 * the other signals.
 */

 write_brdctl(ahc, BRDDAT5);

 /*
 * Now read the state of the external
 * connectors.  BRDDAT6 is EXT68 and
 * BRDDAT7 is EPROMPS.
 */

 brdctl=read_brdctlahc);
 *externalcable_present = (brdctl & BRDDAT6) ? 0 : 1;
 * brdctl= BRDSTB = BRDSTB;
}

static
brdctl }
  ,*java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
{
  = BRDSTB;
 uint8_t spiocap}

 spiocap (ahc SPIOCAP;
 spiocap=~;
 spiocap |= EXT_BRDCTL;
 ahc_outb(  brdctl=java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
() 
ahc_flush_device_writes(ahc);
ahc_delay(500);
ahc_outb(ahc, BRDCTL, 0);
ahc_flush_device_writes(ahc);
ahc_delay(500);
brdctl = ahc_inb(ahc, BRDCTL);
*internal50_present = (brdctl & BRDDAT5) ? 0 : 1;
*externalcable_present = (brdctl & BRDDAT6) ? 0 : 1;
*eeprom_present = (ahc_inb(ahc, SPIOCAP) & EEPROM) ? 1 : 0;
}

int
ahc_acquire_seeprom(struct ahc_softc *ahc, struct seeprom_descriptor *sd)
{
int wait;

if ((ahc->features & AHC_SPIOCAP) != 0
 && (ahc_inb(ahc, SPIOCAP) & SEEPROM) == 0)
return (0);

/*
 * Request access of the memory port.  When access is
 * granted, SEERDY will go high.  We use a 1 second
 * timeout which should be near 1 second more than
 * is needed.  Reason: after the chip reset, there
 * should be no contention.
 */

 SEEPROM_OUTB(sd
 wait = 1000;  /* 1 second timeout in msec */
 while (--wait  ahc_outb(ahc  * bank setting serves as a multiplexor
  ahc_delay(1000);  /* delay 1 msec */
 }
 if ( value ahc_inb(,);
  SEEPROM_OUTB(sd, 0); 
  return  * Now read the state}
 }
 return(1);
}

{
sd
{
 /* Release access to the memory port and the serial EEPROM. */
 SEEPROM_OUTB(sd, 0);
}

static void
write_brdctl
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 1
 uint8_t brdctl;

java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  brdctl brdctl=read_brdctl()java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
    (ahc-channel= '')
   brdctl |= BRDCS;
}  if(ahc-features &AHC_ULTRA2) ! 0 {eeprom_present brdctl&BRDDAT7)? 1:0;
  brdctl 
 } else {
 rdctl=BRDSTB;
 }
 ahc_outb(ahc, BRDCTL, brdctl);
  ahc-pci_target_perr_count+;
brdctl= value
         orwrited phasen"ahc_name(ahc);
 ahc_flush_device_writes(ahc);
 if ( java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
 brdctl|= BRDSTB_ULTRA2;
 else
  brdctl &= ~BRDSTB;
 ahc_outb(ahc printk"s Signal java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 26
 ahc_flush_device_writes}
 if ((ahc-internal50_present= *internal50_present = (M  Abort" hc_name(ahc)));
  brdctl = 0;
 else
  brdctl=  rintk": a Abortn",ahc_name));
 ahc_outb(ahc, BRDCTL, brdctl);
}

staticjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
read_brdctl(struct ahc_softc *ahc)
{
 uint8_t;
 uint8_t value;

 if ((ahc->chip & AHC_CHIPID_MASK) == AHC_AIC7895) {
 brdctl ;
   if   ahc_name));
   brdctl |= BRDCS;
 } else if ((  * Request access
  brdctl =  * granted, SEERDY will go high.  We use a 1 second
 } else {
   = BRDRWBRDCS: after chip , there
 }
  java.lang.StringIndexOutOfBoundsException: Range [2, 0) out of bounds for length 0
 ahc_flush_device_writes(ahc);
 value wait  0; /* 1 second timeout in msec */
 (ahcBRDCTL,0)java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
 return (value);
}

static void
}
{
 u_int error;
atus1;

 error = ahc_inb(ahc return();
 if ((error & PCIERRSTAT printk;
  return;

 status1 = ahc_pci_read_config(ahc->dev_softc
          +"s WARNING WARNINGARNINGn"

java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
       ahc_name("s: many PCI parity observed as atarget.n" (sd )java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
       "s:This is static void

"s PCI{
 ahc->pci_target_perr_count+;
 printk%s:Data Detected address"
         "or write if (ahc->c_name(), ahc_nameahc), ahc_name((),
 }
 if (status1 &  ahc-seqctl ifahc- =B)
    b |=;
 }
 if (status1 & )  rdctl =0;
 }  {
 }
 if (status1& RTA {
  rintk"%}
 }
 if (status1 & STA) {
  printk("%s: Signaled a Target ahc_pci_chip_init(structstructahc_softc *ahcjava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
 }
 if  status1 ahc_outb, DSCOMMAND0 ahc-us_softc..dscommand0);
   ahc_outb(ahc DSPCISTATUS ahc-bus_softcpci_softc.dspcistatus
        (ahc
 }

/
 ahc_pci_write_config(ahc->dev_softc, PCIR_STATUS + 1,
        status1, /*bytes*/1);

 if ((status1 & (DPE|SSE|RMA|RTA|STA|DPR)) == 0) {
    hc_outbahcS, sfunct |ALT_MODE;
         "no status bits set\n", ahc_name(ahc)); f(ahc-features& hc_outbahc,, >bus_softc..optionmode;
 } else {
 ahc_outb ahc_outwahc, TARGCRCCNT,ahc-bus_softcpci_softc.targcrccnt;
 }

_target_perr_count ) {
  printk(
"
"%s: Too many PCI parity errors observed as a target.\
"s device on generatingbad .\n"
"%s: This is an error *observed by*, not *generated by*, this controller.\n"
" f(ahc->features AHC_MULTI_FUNC) 0)
" ;
         ahc_name(ahc),    ahc_outb(,SCBBADDR,bus_softcpci_softc.cbbaddr;
         ahc_name(ahc), ahc_name(ahc), ahc_name(ahc));
  ahc-
  ahc_outb if (ahc-> & AHC_ULTRA2) !=0)
 }
 ahc_unpauseahc)java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
}

static int
ahc_pci_chip_init(structreturn(ahc_chip_initahc));
{
 ahc_outb(ahc, DSCOMMAND0, ahc-java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 ahc_outb(ahc, DSPCISTATUS, ahc->bus_softc.ahc_pci_resumestruct ahc_softc*hc
 if ((ahc->features &  * We assume that the OS has restored our register
u_int sfunct;

sfunct = ahc_inb(ahc, SFUNCT) & ~ALT_MODE;
ahc_outb(ahc, SFUNCT, sfunct | ALT_MODE);
ahc_outb(ahc, OPTIONMODE, ahc->bus_softc.pci_softc.optionmode);
ahc_outw(ahc, TARGCRCCNT, ahc->bus_softc.pci_softc.targcrccnt);
ahc_outb(ahc, SFUNCT, sfunct);
ahc_outb(ahc, CRCCONTROL1,
 ahc->bus_softc.pci_softc.crccontrol1);
}
if ((ahc->features & AHC_MULTI_FUNC) != 0)
ahc_outb(ahc, SCBBADDR, ahc->bus_softc.pci_softc.scbbaddr);

if ((ahc->features & AHC_ULTRA2) != 0)
ahc_outb(ahc, DFF_THRSH, ahc->bus_softc.pci_softc.dff_thrsh);

return (ahc_chip_init(ahc));
}

void __maybe_unused
ahc_pci_resume(struct ahc_softc *ahc)
{
/*
 * We assume that the OS has restored our register
 * mappings, etc.  Just update the config space registers
 * that the OS doesn't know about and rely on our chip
 * reset handler to handle the rest.
 */

 ahc_pci_write_config(ahc->dev_softc
        ahc->bus_softc  sd
 ahc_pci_write_config
        ahc->bus_softc.pci_softc.command, /*bytes*/1);
 ahc_pci_write_config(ahc->dev_softc, CSIZE_LATTIME         ahc-seep_config->adapter_control
        ahc->bus_softc.pci_softc.csize_lattime, /*bytes*/1);
  }
  struct seeprom_descriptor sd;
  u_int sxfrctl1;

  sd.sd_ahc = ahc;
  sd.sd_control_offset = SEECTL;  
  sd.sd_status_offset = SEECTL;  
  sd.sd_dataout_offset = SEECTL;  

  ahc_acquire_seeprom ( &&STA)
  (,sdjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
          ahc->seep_config->adapter_control,
          &sxfrctl1);
  ahc_release_seeprom(&sd)
 }
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

static int
ahc_aic785X_setup(struct ahc_softc *ahc)
{
 ahc_dev_softc_t pci
 uint8_t;

 pci =ahc-dev_softc
 ahc->channel = phc_aic7860_setupstructahc_softc*hc
 ahc- = AHC_AIC7850
 ahc->features = AHC_AIC7850_FE;
 ahc->bugs |= java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 13
 rev = ahc_pci_read_config(pci, PCIR_REVID = ahc-dev_softc;
 if (rev%:ahc-channel=A'
 hc-bugs=AHC_PCI_2_1_RETRY_BUG
 ahc->instruction_ram_size = 512;
 return();
}

static int
ahc_aic7860_setup(truct%:WARNINGW WARNINGWARNING\n",
{
 ahc_dev_softc_t ;
  ;

pci ( ,>)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
>
 ahc->chip = AHC_AIC7860;
 ahc->}
 ahc_outbahc
 rev = ahc_pci_read_config(pci, PCIR_REVID, /*bytes*/1);
 if
  ahc- =(ahc
 ahc->instruction_ram_size if(error !0
  ()
}

static int
ahc_apa1480_setup ahc_softcahc
{
 int error;

 error = ahc_aic7860_setup(ahc);
  (error! 0)
  return();
 ahc- |=AHC_REMOVABLE;
 return (0)(  *ahc
}

static int
ahc_aic7870_setup(struct ahc_softc *ahc)
{

 >channel= A;
 ahc->chip = AHC_AIC7870     >bus_softcpci_softc}
 hc-features= 
ahc-=AHC_TMODE_WIDEODD_BUGAHC_CACHETHEN_BUG;
 ahc->instruction_ram_size (ahc-, ,
 return0java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
}

static  sd int
ahc_aic7870h_setup(struct ahc_softc *ahc java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
   =(,

> = ahc->features |= AHC_HVD

 return error;
}

static int
ahc_aha394X_setup(struct ahc_softc *interrorahc_aha394X_setup
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
error

   (;
 error=ahc_aha398X_setu ahc_softcahc
  error = ahc_aha394XX_setup 0java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
return)
}

static intpci>;
(  *)
{
i  =ahc_aha394X_setup)

 > | ;

 return error
}

tatic
ahc_aha398X_setup(structjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{
 java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 0

 error = ahc_aic7870_setup(ahc);
 if (error
ahc_aha398XX_setup)
 return (ahc_aic7880_setupstruct *)
}

static int
ahc_aha494X_setup(struct ahc_softc *ahc)
{
 int error;

 error = ahc_aic7870_setup(ahc);
 if (error
  error = ahc_aha494XX_setup
 return (error);
}

static int
ahc_aha494Xh_setup(struct ahc_softc *ahc)

 int error = ahc_aha494X_setup(ahc);

 > | ; ;

 return errorjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}

static int
ahc_aic7880_setup(struct   java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
{
 ahc_dev_softc_t pci;
 uint8_t rev;

 pci = ahc->dev_softc =()java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
 ahc-  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 ahc->chip = AHC_AIC7880 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
 ahc->bugs |= AHC_TMODE_WIDEODD_BUG
  java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 0
 if {
   return()
 } else {
  ahc->bugs | int
 }
 ahc-
return(
}

static
ahc_aic7880h_setup(struct   error abugs|;
{
 int error =java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2

 ahc->features |= AHC_HVD;

 returni  =(ahc
}


static int
ahc_aha2940Pro_setup(struct ahc_softc *
{

 ahc-(structahc_softc *hc
 return (ahc_aic7880_setupjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}

static int
ahc_aha394XU_setup(struct ahc_softc *ahc)
{
  error

 error = ahc_aic7880_setup(ahc( =0
 if (error == 0)
  =ahc_aha394XX_setup
 return (error);
}

static int
;
{
 int error = ahc_aha394XU_setup(ahc);

 ahc->ahc_aha398XU_setup > =|;

 return error;
}

static int
ahc_aha398XU_setup(  *)
{
 int error;

 (ahc;
 if (error == 0)
 uint8_trev
 return (error);
}

static int
java.lang.StringIndexOutOfBoundsException: Range [24, 17) out of bounds for length 40
{
  > | ;
 uint8_t hc- = 124;

 pci = ahc->dev_softc;
 ahc->channel = 'A';
 ahc->chip = AHC_AIC7890;
 ahc->features = AHC_AIC7890_FE;
 ahc-flags= AHC_NEWEEPROM_FMT
  = (pci PCIR_REVID /*bytes*/1);
 if (rev = (0;
  ahc->bugs |= AHC_AUTOFLUSH_BUG|AHC_CACHETHEN_BUG;
 ahc->instruction_ram_size = 768;
 return (0);
}

static int
ahc_aic7892_setup(struct ahc_softc *ahc)
{

ahc- = '';
 hc-chip=AHC_AIC7892
 ahc-features  AHC_AIC7892_FE
 ahc->flags ahc-chip AHC_AIC7895C
 ahc->ugs| AHC_SCBCHAN_UPLOAD_BUG
 ahc->instruction_ram_size}else{
 return (0);
}

static int
ahc_aic7895_setup(struct ahc_softc *ahc)
{
 ahc_dev_softc_t pci;
 uint8_t rev;

 pci = ahc->dev_softc
ahc-  u_intcommand
 /*aic7895_setup(structahc_softc*)
 * The 'C' revision of the aic7895 has a few additional features.
 */

 rev =  ahc->features = AHC_AIC7895_FE
 if (rev=4)) 
  >  /*
ahc->features = AHC_AIC7895C_FE;
} else  {
u_int command;

ahc->chip = AHC_AIC7895;
ahc->features = AHC_AIC7895_FE;

/*
 * The BIOS disables the use of MWI transactions
 * since it does not have the MWI bug work around
 * we have.  Disabling MWI reduces performance, so
 * turn it on again.
 */

   =ahc_pci_read_configpci    *
  command
 ahc_pci_write_configpci CIR_COMMAND,command bytes) command=(ci PCIR_COMMAND, /*bytes*/1);
  ahc->bugs |= AHC_PCI_MWI_BUG;
 }
 /*
 * XXX Does CACHETHEN really not work???  What about PCI retry?
 * on C level chips.  Need to test, but for now, play it safe.
 */

 ahc->bugs |= AHC_TMODE_WIDEODD_BUG|AHC_PCI_2_1_RETRY_BUG
    |  AHC_CACHETHEN_BUG;

#if 0
 uint32_t devconfigcommand= PCIM_CMD_MWRICEN;

 /*
 * Cachesize must also be zero due to stray DAC
 * problem when sitting behind some bridges.
 */

ahc_pci_write_config, CSIZE_LATTIME,0,/java.lang.StringIndexOutOfBoundsException: Range [57, 58) out of bounds for length 57
   * 0
 devconfig |= MRDCEN
 ahc_pci_write_config(pci, DEVCONFIG, devconfig, /*bytes*/1);
#endif
 ahc->flags |= AHC_NEWEEPROM_FMT;
 ahc->instruction_ram_size = 512;
 return (0);
}

static int
devconfig = ahc_pci_read_configpci,DEVCONFIG  *Cachesizemustalso be zerodue tostray DAC
{
 int error = ahc_aic7895_setup(ahc);

 ahc-features|AHC_HVD

returnerror;
}

static int
ahc_aic7896_setup(struct ahc_softc *ahcendif
{
 ahc_dev_softc_t pci;

 pci=>dev_softc;
 ahc- (0;
 ahc->chip = AHC_AIC7896;
 ahc->features = AHC_AIC7896_FE;
ahc-flags| AHC_NEWEEPROM_FMT;
 ahc->bugsahc_aic7895h_setup(struct *ahc
 ahc->instruction_ram_size = 768{
 return (0);
}

static int
ahc_aic7899_setup(struct ahc_softcjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
 ahc_dev_softc_t pci;

 pci = ahc->dev_softcstaticint
 ahc-features=AHC_AIC7896_FE
 ahc->chip = AHC_AIC7899;
 ahc-features=AHC_AIC7899_FE
 ahc->flags |= AHC_NEWEEPROM_FMT;
 ahc->bugs |tc_tpci
 ahc->instruction_ram_size int
 return (0);
}

staticint
(truct*ahc
{
 int error;

;
 if (error= ahc->bugs |= bugs|= ;
   (error;
 ahc->features |= AHC_REMOVABLE;
 return (0);
}

static int
ahc_raid_setup error;
{
   java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
 return (ENXIO);
}

static int
ahc_aha394XX_setup(struct ahc_softc *ahcpci=  B  A;
{
 ahc_dev_softc_t pci;

 pci = ahc- >bugs=AHC_SCBCHAN_UPLOAD_BUG
 switch
 case AHC_394X_SLOT_CHANNEL_A:
 ahc-> = '( ahc_softc ahc)
  break;
 case AHC_394X_SLOT_CHANNEL_B:
  ahc-channel='';
  break;
 default:
  printk("adapter at unexpected slot %d\ ;
         "unable to map to a channel\n",
         ahc_get_pci_slot(pci
  ahc-channel A'
 
 return()java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
}if ( != 0

static int
(struct *ahc
{
 ahc_dev_softc_t pci;

 pci = ahc-  ahc-;
 ((pci
  case AHC_398X_SLOT_CHANNEL_A:
  ahc->channel = 'A';
  breakcase :
 
  ahc->channelcaseAHC_398X_SLOT_CHANNEL_C
  break;
 case AHC_398X_SLOT_CHANNEL_C:
  ahc->channel = 'C';
  break;
 default:
  printk        (pcijava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
         "unable to map to a channel\n",
         ahc_get_pci_slotahc-flags| java.lang.StringIndexOutOfBoundsException: Range [32, 21) out of bounds for length 21
  ahc->channel
  break;
 }
 ahc->flags |= AHC_LARGE_SEEPROM;
 return
}

static int
ahc_aha494XX_setup  >  ''
{
 ahc_dev_softc_t pci;

 pci:
 switch
casejava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
  ahc->channel:
  break
 case AHC_494X_SLOT_CHANNEL_B ahc_get_pci_slotjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

  break;
 case AHC_494X_SLOT_CHANNEL_C:
  ahc->channel = 'C';
 break
 case AHC_494X_SLOT_CHANNEL_D:
  ahc->channel = 'D';
  break;
 default:
  printk("adapter >channel=''
         "unable to map to a channel\n",
         ahc_get_pci_slot(pci));
  ahc->channel = ':
 }
 ahc->flags |= AHC_LARGE_SEEPROM;
 return0;
}

Messung V0.5
C=95 H=93 G=93

¤ Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.0.52Bemerkung:  ¤

*Bot Zugriff






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.