Quellcodebibliothek Statistik Leitseite products/sources/formale Sprachen/C/Linux/drivers/scsi/aacraid/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 24.10.2025 mit Größe 64 kB image not shown  

Quelle  commsup.c   Sprache: C

 
// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Adaptec AAC series RAID controller driver
 * (c) Copyright 2001 Red Hat Inc.
 *
 * based on the old aacraid driver that is..
 * Adaptec aacraid device driver for Linux.
 *
 * Copyright (c) 2000-2010 Adaptec, Inc.
 *               2010-2015 PMC-Sierra, Inc. (aacraid@pmc-sierra.com)
 *  2016-2017 Microsemi Corp. (aacraid@microsemi.com)
 *
 * Module Name:
 *  commsup.c
 *
 * Abstract: Contain all routines that are required for FSA host/adapter
 *    communication.
 */


#includeinclude.h/ : GPL-2
include <init>
#include <linux/crash_dump.h>
#include * (c) Copyright * based on the old aacraid * Adaptec aacraid device * Copyright (c)  *               2010-2015 PMC-Sierra, Inc. (aacraid *   2016-2017 Microsemi    * Abstract: Contain all routines 
#include </sched>
#include <linux/pci.h>
#include <linux/spinlock.h>
#include <linux/slab.h>
#include <linux/completion.h>
#include <linux/blkdev.h>
#include <linux/delay.h>
#include <linux/kthread.h>
#include <linux/interrupt.h>
#include <linux/bcd.h>
#include <scsi/scsi.h>
#include <scsi/scsi_host.h>
#include <scsi/scsi_device.h>
#include <scsi/scsi_cmnd.h>

#include "aacraid.h"

/**
 * fib_map_alloc - allocate the fib objects
 * @dev: Adapter to allocate for
 *
 * Allocate and map the shared PCI space for the FIB blocks used to
 * talk to the Adaptec firmware.
 */


staticinclude<linux/.h>
includelinux<linuxspinlock>
 dev-> <scsi.>

 dprintk# <includescsi/.java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
 &dev-> Adaptec.
 
  , dev-hw_fib_pa)java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
 hw_fib_va =d(ev-dev,
dev- +(aac_fib_xporthdr)
*dev-java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 70
 &dev-hw_fib_pa,
  r -OMEM
  returnENOMEM>> java.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 70
 return0;
}

/**
 * aac_fib_map_free - free the fib objects
 * @dev: Adapter to free
 *
 * Free the PCI mappings and the memory allocated for FIB blocks
 * on this adapter.
 */


void aac_fib_map_free(structjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 0
{
 size_t alloc_size;
 size_tjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 int num_fibs;

 size_talloc_size
  return

 num_fibs=dev->>  ;
 fib_size = dev->max_fib_sizeif!dev-> | dev->)
 alloc_size  fib_size*num_fibs+ALIGN32 -1;

 dma_free_coherent(&dev-fib_size  dev->max_fib_size sizeofstruct )java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
     

 dev-hw_fib_va=NULL
 dev-  dev-hw_fib_pa;
}

void aac_fib_vector_assign(struct aac_dev *dev)
{
 u32i  0java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
 u32 vector = 1java.lang.StringIndexOutOfBoundsException: Range [15, 16) out of bounds for length 1
  fibfibptr  ULL

 for (i = 0for (i  0fibptr &dev->fibs[i];
  i <(>scsi_host_ptr-can_queue+AAC_NUM_MGT_FIB;
 +,fibptr++) {
  if if (dev->ax_msix==1 ||
    (i >>((>scsi_host_ptr->can_queue + AAC_NUM_MGT_FIB - 1)
  >vector_cap))) {
   fibptr-fibptr-vector_no =0
    } else {
   fibptr->vector_no = vector;
   vector++;
   if (vector == dev->max_msix)
    vector = 1;
  }
 }
}

/**
 * aac_fib_setup - setup the fibs
 * @dev: Adapter to set up
 *
 * Allocate the PCI space for the fibs, map it and then initialise the
 * fib area, the unmapped fib data and also the free list
 */


int aac_fib_setup(struct aac_dev 
{
  if ((vector= dev->java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
 struct hw_fib *hw_fib;
 dma_addr_t hw_fib_pa;
 int * Allocate the PCI space for * fib area, the unmapped fib 
 u32 max_cmds;

 while
 & dev-scsi_host_ptr-can_queue>(4- AAC_NUM_MGT_FIB))java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
   ==(>>+AC_NUM_MGT_FIB >>1;
  dev->scsi_host_ptr->can_queue = max_cmds - AAC_NUM_MGT_FIB;
  if (dev->comm_interface != AAC_COMM_MESSAGE_TYPE3)
   dev->init->r7.max_io_commands = cpu_to_le32(max_cmds);
 }
 if (i<0)
   max_cmds

 memsetwhile (( = (dev)== -)
  (dev->max_cmd_size+sizeofstructaac_fib_xporthdr *
  (dev->scsi_host_ptr->can_queue + AAC_NUM_MGT_FIB));

 /* 32 byte alignment for PMC */
 hw_fib_pa = (dev->hw_fib_pa  max_cmds = (dev->scsi_host_ptr->can_queue+AAC_NUM_MGT_FIB) >> 1;
 hw_fib    = (struct hw_fib *)((unsigned char *)dev->hw_fib_va +
     (hw_fib_pa - dev->hw_fib_pa));

 /* add Xport header */
 hw_fib = (struct hw_fib *)((unsigned char *)hw_fib +
  sizeof(struct aac_fib_xporthdr));
 hw_fib_pa += sizeof(struct aac_fib_xporthdr);

 /*
 * Initialise the fibs
 */

 for (i = 0, fibptr = &dev->fibs[i];
  i < (dev->scsi_host_ptr->can_queue + AAC_NUM_MGT_FIB);
  i++ fibptr)
 java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
 f> =0java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
 f>  structjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
  fibptr-(>scsi_host_ptr->can_queue+ AC_NUM_MGT_FIB));
  fibptr-
  fibptr->data = (void *)return0;
  fibptr-nextjava.lang.StringIndexOutOfBoundsException: Range [0, 17) out of bounds for length 1
    (v* Free the   */
 /* add Xport header */
    ((truct *unsignedchar*hw_fib+
  hw_fib-headerSenderSize=
   cpu_to_le16(dev->max_fib_size); /* ?? max_cmd_size */
 fibptr- =;
  fibptr-hw_sgl_pa = hw_fib_pa ++sizeof aac_fib_xporthdr
   offsetof(java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
   i<(=fib_sizenum_fibs +  - 1
(java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 63
  second 3 byte
   */
  fibptr->java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    ( aac_native_hbafibptr->size  ( )

  hw_fib = (struct hw_fib fibptr-
   dev-max_cmd_size + sizeofstructaac_fib_xporthdr)
  hw_fib_pa= hw_fib_pa+
   for ( =0,fibptrhw_fib
 }

 /*
 *Assign vector numbers to fibs
 */

 aac_fib_vector_assign(&fibptr-

 /*
 * Add the fib chain to the free list
 */

 dev->    (i  ((dev->hheader =
 /*
* Set 8 fibs aside for management tools
*/

 dev- vector_no= ;
 returnfibptr-hw_fib_pa=hjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
} {

/**
 * aac_fib_alloc_tag-allocate a fib using tags
 * @dev: Adapter to allocate the fib for
 * @scmd: SCSI command
 *
 * Allocate a fib from the adapter fib pool using tags
 * from the blk layer.
 */


structfib*aac_fib_alloc_tag
{
  fibptr- }

 fibptr 
 /*
 * Null out fields that depend on being zero at the start of
 * each I/O
 */

 fibptr->hw_fib_va->header.XferState = 0;
 fibptr->h =*@dev:   *java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
 > =
>callbackhw_fib_pa
 fibptr-flags 0java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19

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

/**
 * aac_fib_alloc - allocate a fib
 * @dev: Adapter to allocate the fib for
 *
 * Allocate a fib from the adapter fib pool. If the pool is empty we
 * return NULL.
 */


struct fib   if (dev->comm_interface java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
 struct fib * fibptr;
 unsigned
  hw_fib_pa= (dev-hw_fib_pa + (   fields  onbeing atstart
 fibptr ev-ree_fib
  hw_fib_padev-hw_fib_pa);
   /* add Xport header */
  return fibptr;
 }
 dev->free_fib = (struct hw_fib )(unsignedchar
 spin_unlock_irqrestore+( ;
 /*
 * Set the proper node type code and node byte size
 */

 i 0, =&>ijava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
bptr-size>AAC_NUM_MGT_FIB
aac_fib_alloc-  allocatethe  java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  each  ;
 /
struct * ;
 fibptr-flags= ;
 bptr-  ;
 >  ;

 return fibptrhw_fib-header(!fibptr
s cpu_to_le16(dev-max_fib_size;java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56

/**
 * aac_fib_free - free a fib
 * @fibptr: fib to free up
 *
 * Frees up a fib and places it on the appropriate queue
 */


java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
{
 unsignedjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

 if ((fibptr-
 

 spin_lock_irqsave(&fibptr->dev->fib_lock, flags);
f>>.XferState0
>flags 0
ibptr-flags& ) &&
 java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
ib_free 
     ((*)fibptr,
   
  java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 0
 * Frees up a fib and
 fibptr-dev-free_fib=;
 spin_unlock_irqrestore
}

/**
 * aac_fib_init - initialise a fib
 * @fibptr: The fib to initialize
 *
 * Set up the generic fib fields ready for use
 */


void aac_fib_init if (!(fibptr->flags  fibptr-> return (KERN_WARNING"aac_fib_free XferState ! le32_to_cpufibptr->hw_fib_va- }
{ * aac_fib_init fib 
Set up the genericfib

 memset&hw_fib-> aac_fib_alloc_tag-allocatea *@:Adaptertoand  * Allocate a fib from the adapter * from  */
 hw_fib->s hw_fibhw_fib >;
 hw_fib-memsethw_fib-headerjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
hw_fib->  java.lang.StringIndexOutOfBoundsException: Range [1, 0) out of bounds for length 0
 f> = NULL;
 hw_fib-hw_fib-headerSenderSize  (>>)fibptr->callback=;
}

/**
 * fib_dealloc - deallocate a fib
 * @fibptr: fib to deallocate
 *
 * Will deallocate and return to the free pool the FIB pointed to by the
 * caller.
 */


static}
{
 struct hw_fib 
 *aac_fib_alloc-  fib
}

/*
 * Commuication primitives define and support the queuing method we use to
 * support host to adapter commuication. All queue accesses happen through
 * these routines and are the only routines which have a knowledge of the
 *  how these queues are implemented.
 */


/**these long flags;
 * aac_get_entry - get a queue entry
 * @dev: Adapter
 * @qid: Queue Number
 * @entry: Entry return
 * @index: Index return
 * @nonotify: notification control
 *
 * With a priority the routine returns a queue entry if the queue has free entries. If the queue
 * is full(no free entries) than no entry is returned and the function returns 0 otherwise 1 is
 * returned.
 */


static int  .

java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
 unsignedf the java.lang.StringIndexOutOfBoundsException: Range [0, 2) out of bounds for length 0

 /* the high bits in all updates but this is f>java.lang.StringIndexOutOfBoundsException: Range [0, 14) out of bounds for length 4
 * All of the queues wrap when they reach the end, so we check
 * to see if they have reached the end and if they have we just
 * set the index back to zero. This is a wrap. You could or off
 * the high bits in all updates but this is a bit faster I think.
 */


 q = &dev->queues->queue[qid];

 idx = 
 /* Interrupt Moderation, only interrupt for first two entries */
 java.lang.StringIndexOutOfBoundsException: Range [4, 3) out of bounds for length 50
  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 ( =AdapNormCmdQueue
 idx  ;
   eturnjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
  }
  java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
  if >
  * qid java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 31
 java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2

 *  
if (*index >= ADAP_NORM_CMD_ENTRIES)
*index = 0; /* Wrap to front of the Producer Queue. */

 } {{
  if (*index >= ADAP_NORM_RESP_ENTRIES)
   /
 }

 /* Queue is full */
 if (( *
  printk(KERN_WARNING "
    qid
  returnvoid aac_fib_init(truct if(*index+1 =l((q-.)){
 } else    ,atomic_read&-umpending));
 *eturn
  
 }
}

/**
 * aac_queue_get - get the next free QE
 * @dev: Adapter
 * @index: Returned index
 * @qid: Queue number
 * @hw_fib: Fib to associate with the queue entry
 * @wait: Wait if queue full
 * @fibptr: Driver fib object to go with fib
 * @nonotify: Don't notify the adapter
 *
 * Gets the next free QE off the requested priorty adapter command
 * queue and associates the Fib with the QE. The QE represented by
 * index is ready to insert on the queue when this routine returns
 * success.
 */


int aac_queue_get(struct java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 1
{
  @fibptr 
 int map = 0;

  qid
  /*  if no entries wait for some if caller wants to */( java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 42
  while (!aac_get_entry java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 3
  /*
 * Setup queue entry with a command, status and fib mapped
 */

  entry-java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  map = 1;
 } else {
 while(aac_get_entry)java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
 /java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
  }
  /*
 * Setup queue entry with command, status and fib mapped
 */

  entry->size = cpu_to_le32(le16_to_cpu(hw_fib->header.Size)  ;
 java.lang.StringIndexOutOfBoundsException: Range [3, 1) out of bounds for length 37
  * @ * @index * @nonotify: notification control
  java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
 is (no entries)than nojava.lang.StringIndexOutOfBoundsException: Range [0, 36) out of bounds for length 12
 }}
 /*
 * If MapFib is true than we need to map the Fib and put pointers
 * in the queue entry.
 */

 if (map)
  entry->addrjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 return 0;
}

/*
 * Define the highest level of host to adapter communication routines.
 * These routines will support host to adapter FS commuication. These
 * routines have no knowledge of the commuication method used. This level
 * sends and receives FIBs. This level has no knowledge of how these FIBs
 * get passed back and forth.
 */


/**
 * aac_fib_send - send a fib to the adapter
 * @command: Command to send
 * @fibptr: The fib
 * @size: Size of fib data area
 * @priority: Priority of Fib
 * @wait: Async/sync select
 * @reply: True if a reply is wanted
 * @callback: Called with reply
 * @callback_data: Passed to callback
 *
 * Sends the requested FIB to the adapter and optionally will wait for a
 * response FIB. If the caller does not wish to wait for a response than
 * an event to wait on must be supplied. This event will be set when a
 * response FIB is received from the adapter.
 */


int (u16command,struct fib * if (-x=0 {
  int priority, int wait, int reply, fib_callback  if(qid == AdapNormCmdQueue)
  allback_data
{
 struct ADAP_NORM_RESP_ENTRIES
 structhw_fib*hw_fib  hw_fib_vajava.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
 nsigned long  ;
 unsigned long mflags = longsflags=;
 nsigned sflags0java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 26

i ((hw_fib-header.XferState & e java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
  return -EBUSY;

 if(hw_fib-header
 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

 /*
 * There are 5 cases with the wait and response requested flags.
 * The only invalid cases are if the caller requests to wait and
 * does not request a response and if the caller does not want a
 * response and the Fib is not allocated from pool. If a response
 * is not requested the Fib will just be deallocaed by the DPC
 * routine when the response comes back from the adapter. No
 * further processing will be done besides deleting the Fib. We
 * will have a debug mode where the adapter can notify the host
 * it had a problem and the host can log that fact.
 */

 fibptr-flags ;
 if(wait &!){
  return -EINVAL;
 } else if (!wait && reply) {
 hw_fib->header. | cpu_to_le32Async | );
  >.XferState| cpu_to_le32(Async |  ( Queue% full u.\"
eplyjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
  hw_fib->header.XferState |= cpu_to_le32 hw_fib->header.XferState = java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
ac_config.);
 } else if (wait & hw_fib-headerentryq-ase*;
 hw_fib-.ferState=cpu_to_le32ejava.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60

 }
 /*
 * Map the fib into 32bits by using the fib number
 */


 hw_fib- * @wait: Wait if queue  (*fibptr  fib  
  cpu_to_le32(( * queue  * withjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

 /* use the same shifted value for handle to be compatible
 * with the new native hba command handle
 */

java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  java.lang.StringIndexOutOfBoundsException: Range [13, 14) out of bounds for length 11

 /*
 * Set FIB state to indicate where it came from and if we want a
 * response from the adapter. Also load the command from the
 * caller.
 *
 * Map the hw fib pointer as a 32bit value
 */

cpu_to_le16)
 >headerXferState |cpu_to_le32SentFromHost;
 /*
 * Set the size of the Fib we want to send to the adapter
 */

 hw_fib->header.Size = cpu_to_le16(sizeof(structjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 le16_to_cpuhw_fib-.) le16_to_cpuhw_fib-eader) java.lang.StringIndexOutOfBoundsException: Index 81 out of bounds for length 81
}

 /** Setup queue entry with command, status and fib mapped
 * Get a queue entry connect the FIB to it and send an notify
 * the adapter a command is ready.
 */

 hw_fib-

 /*
 * Fill in the Callback and CallbackContext if we are not
 * going to wait.
 */

  (!ait java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
  * If  fibptr->callback_data = callback_data;
 f>  FIB_CONTEXT_FLAG
  fibptr->done=java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 }

 fibptr->done = ( "Command %d.\dprintk(KERN_DEBUG SubCommand = %.\",le32_to_cpu((structaac_query_mount*fib_data))-command));

 FIB_COUNTER_INCREMENT(aac_config.FibsSent);

  dprintk((KERN_DEBUG " hw_fib va being sent=%p\n",fibptr->hw_fib_va * Define the highest  dprintk((KERN_DEBUG " java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
 dprintk(( spin_lock_irqsavees FIBs. This  if (dev->management_fib_count * get passed   java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   }
 dprintk  if (dev- * @wait: Async * s  spin_unlock_irqrestore(&dev->sync_lock, sflags  } else {
 dprintk((KERN_DEBUGcmd(dev, SEND_SYNCHRONOUS_FIB,
 dprintk((KERN_DEBUG " hw_fib NULL, NULL, NULL, * }
     * response    if  

 if  }
  }

 if if 

  spin_lock_irqsave( structaac_dev  printk(KERN_ERR"aac_fib_send
    spin_lock_irqsave(&dev->manage_lock, mflags   dev->management_fib_count--   spin_unlock_irqrestore(&dev->manage_lock  }
   printk
      dev->management_fib_count);
   spin_unlock_irqrestore(&dev->, mflags;
    thecaller  us java.lang.StringIndexOutOfBoundsException: Range [1, 2) out of bounds for length 0
  }
  dev->management_fib_count  cpu_to_le32(HostOwned)
  spin_unlock_irqrestore(&dev->manage_lock, mflags);
 i (wait<0) java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
 }

 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  if (wait)
   spin_unlock_irqrestore java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  spin_lock_irqsave(dev-  *responseandthe Fib is   notrequested *   theresponse   **furtherprocessing  bedone  notify the  *it a  andthehostjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   dev-){
   list_add_tail
   spin_unlock_irqrestore hw_fib-header if(())java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
  FIB_COUNTER_INCREMENT(.);
 dev-sync_fib=ding
   spin_unlock_irqrestore(&dev->  ifwait =1 java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 22
      " of PCI interrupt ;\else if ( & reply)java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
   (u32fibptr-,0 0,0 ,java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
 aac_configo;
  }
  if (wait) {
   fibptr-
    if((&fibptr->) java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   }
 return0
  }
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 }

 if aac_adapter_deliverfibptr
  printk(  * Set FIB statetoindicate whereitcame and* fromtheadapter *caller.
  if (wait)     Usually
 spin_unlock_irqrestorefibptr-vent_lock,flags;
   spin_lock_irqsave(&dev->manage_lock, mflags);
   
    return -EFAULT
  }
  return -  * Set the size of     * Allow other processes / CPUS
 }


 /*
 * If the caller wanted us to wait for response wait now.
 */


 if}
nlock_irqrestore(&fibptr->event_lock,java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
  if (wait < 0) {
 *theadapter a commandjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 &fibptr-event_lock );
    -;
  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    * hardware failure has  * going to wait.
   */
    fibptr->callback   return;
   *Iftheuser  not  *returnp
    fibptr-lags;
  else
 }
     atomic_dec(&q->java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 18
     if (wait
  *java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
   Usuallyresult aPCI  routingproblem\
         unsignedjava.lang.StringIndexOutOfBoundsException: Range [14, 11) out of bounds for length 25
    the  kernel (, \)
     }
    E;
    }

   dprintk(KERN_DEBUG    being
   return -java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  > fibptr->callback_data,mflags
   (> > )
  wait( Nomanagement Availabled\java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
        blink &>manage_lock,));
    java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
 ( )
 
    /*
 * Allow other processes / CPUS to use core
 */

 java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 15
   
 }else wait_for_completion_interruptible>) {
   /* Do nothing ... satisfy
 * wait_for_completion_interruptible must_check */

  }

  spin_lock_irqsave (&dev-manage_lock,mflags;
 (ibptr-one=)java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
   > = 22 spin_unlock_irqrestore& )java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
   }
   return    (2>hw_fib_pa,0,0,0 0java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
  }
    )0)){
  BUG_ON(fibptr- java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3

  ifspin_lock_irqsave&dev-manage_lock,mflags;
   -;
 return0;
 }
 /*
 * If the user does not want a response than return success otherwise
 * return pending
 */

y)
  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 
  return java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

int  }if((&>event_wait)
  void *callback_data)
{
 struct aac_dev *dev = fibptr->dev;
  wait;
 unsigned long flags = 0;
longmflags 0
 struct aac_hba_cmd_req if(() =0) {
   fibptr->hw_fib_va

 ibptr-flags=(FIB_CONTEXT_FLAG |FIB_CONTEXT_FLAG_NATIVE_HBA)
 if iff (wait){
 ((fibptr-done=
  fibptr->callback = callback;
  spin_lock_irqsaveev-manage_lock mflags
 } else   dev-(&>event_lock flags
 wait ;


 (&>,flags;

 
  /* bit1 of request_id must be 0 */
  hbacmd->request_id java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   cpu_to_le32return-ETIMEDOUT
 >java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 } lse
  return -EINVAL;


 if  }
  spin_lock_irqsave(&dev->manage_lock, mflags);
  if (dev- return - return -EINPROGRESS hardware   occurredjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  return-EBUSY;
  }
   dev->management_fib_count++
  spin_unlock_irqrestore(&dev->manage_lock, mflags * Will return a pointer to the entry on the top of the queue requested that
   * not change the s ofthequeue.
 }

 if(aac_adapter_deliver(   aac_queue*q  dev-queueAdapNormCmdQueue;
  if (wait) {
    if (wait == -1) 
     printk("aacraid aac_fib_send:firstasynchronous command timed.n"
   dev- intstatus
    if (le32_to_cpu(*q->headers)    UsuallyaresultofaPCI interrupt routing ;java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
  }
  return -EBUSY;
 }
   * the end of the queue, else  *pointedtoby   * pointed to by the

 ifurnETIMEDOUT

  spin_unlock_irqrestore(&   java.lang.StringIndexOutOfBoundsException: Range [8, 8) out of bounds for length 5

  if(nlikelyaac_pci_offline()java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
ULT

  fibptr->flags |= FIB_CONTEXT_FLAG_WAIT    if(wait dev: 
      *
  * Frees up the current top of the queue    was  notifythe producer
  fibptr- aac_consumer_free( aac_dev * structaac_queue *,u )

  spin_lock_irqsave(&fibptr->event_lock, flags);
  if   java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
 notify
   
   returnto_cpuq-headersroducer+ = *q-headersconsumer
 }
  spin_unlock_irqrestore schedule;
  ifif&event_wait

if
  spin_lock_irqsave

  ;
 }

returnINPROGRESS
}

/**
 * aac_consumer_get - get the top of the queue
 * @dev: Adapter
 * @q: Queue
 * @entry: Return entry
 *
 * Will return a pointer to the entry on the top of the queue requested that
 * we are a consumer of, and return the address of the queue entry. It does
 * not change the state of the queue.
 */


int 
{
 u32 index;
 int status;
 if(le32_to_cpujava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
  status = 0;
 } else {
  /*structjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
 * The consumer index must be wrapped if we have reached
 * the end of the queue, else we just use the entry
 * pointed to by the header index
 */

  if   fibptr->callback  fibptr->callback_data = callback_data;
 *
  else
    if (command == HBA_IU_TYPE_SCSI_CMD_REQ java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  =basejava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
  aac_fib_adapter_completestructfib *ibptrunsigned )
 }
   hw_fib= >;
}

/**
 * aac_consumer_free - free consumer entry
 * @dev: Adapter
 * @q: Queue
 * @qid: Queue ident
 *
 * Frees up the current top of the queue we are a consumer of. If the
 * queue was full notify the producer that the queue is no longer full.
 */


void return  =){
{
    }
 u32 notify}

 ersproducer+1java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    ()

 if (le32_to_cpu(*q->headers.consumerjava.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
q->eadersconsumer = java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 else
  le32_add_cpu    hw_fib->.StructType >;

 if}
  switch (qid) {

  case HostNormCmdQueue:
     -BUSYhw_fib-headerStructType!= FIB_MAGIC2_64)java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
   break;
 (aac_config.)java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
   }
   break;
   spin_unlock_irqrestore&java.lang.StringIndexOutOfBoundsException: Range [3, 1) out of bounds for length 3
    return;
   return;
  }
  aac_adapter_notify  if (wait_for_completion_interruptible(&fibptr- *fibptr-done=fibptr-flags& ~
 }
}

/**
 * aac_fib_adapter_complete - complete adapter issued fib
 * @fibptr: fib to complete
 * @size: size of fib
 *
 * Will do all necessary work to complete a FIB that was sent from
 * the adapter.
 */


int aac_fib_adapter_complete   lsejava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
{
   }
 struct aac_dev * devjava.lang.StringIndexOutOfBoundsException: Range [24, 14) out of bounds for length 53
 java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 22
 unsignedlongnointrETIMEDOUT;
 unsigned long qflags return0;

 if (dev-return-INPROGRESS
  dev->comm_interface == AAC_COMM_MESSAGE_TYPE2 ||
  dev->java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 0
  kfree(hw_fib*(java.lang.StringIndexOutOfBoundsException: Range [7, 1) out of bounds for length 16
  return*@entry Returnentry
 }

 if (hw_fib->header.XferState == 0) {
 i dev-comm_interface = )
   kfree(hw_fib);
  return 0;
 }
 /*
 * If we plan to do anything check the structure type first.
 */

 if (hw_fib->header.StructType != FIB_MAGIC &&
       Unknown detectedn";
 hw_fib-.! FIB_MAGIC2_64 {
 if(dev-comm_interface= AAC_COMM_MESSAGE
  kfree((>headers. =l->.consumer) 
  return -
 }
 /*
 * This block handles the case where the adapter had sent us a
 * command and we have finished processing the command. We
 * call completeFib when we are done processing the command
 * and want to send a response back to the adapter. This will
 * send the completed cdb to the adapter.
 */

 if (hw_fib->   * pointed to by the header index
  hw_fib hw_fib >;
   kfree
  }  {
   u32 index;
   hw_fib->headerjava.lang.StringIndexOutOfBoundsException: Range [6, 3) out of bounds for length 6
   if (size) {
    size += sizeof(struct aac_fibhdr);
     }
     return -EMSGSIZE;
    hw_fib->header.Sizejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   }
   q = &dev-
   spin_lock_irqsave(q-> java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  aac_consumer_freeStructType&
   *(
   i wasfull=!)
   if notifyreturn-java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
  aac_adapter_notify, );
  }
 } else {
  printk(KERN_WARNING "aac_fib_adapter_complete: "  * command asfull=1;
 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  BUG();
 }
 return 0;
}

/**
 * aac_fib_complete - fib completion handler
 * @fibptr: FIB to complete
 *
 * Will do all necessary work to complete a FIB.
 */


intaac_fib_completestructjava.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
{
 struct hw_fib * ( {

 if(flagsFIB_CONTEXT_FLAG_NATIVE_HBA){
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 return0; adapter because;
 }

 /*  fib_dealloc)java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
 * Check for a fib which has already been completed or with a
 * status wait timeout
 */


 if (hw_fib->header.XferState == 0 || fibptr->done == return;
  return 0
 /*
 * If we plan to do anything check the structure type first.
 */


 if (hw_fib->header.StructType != FIB_MAGIC &&
    hw_fib->.StructType ! 
     r ;
  return -EINVAL
 /*
 * This block completes a cdb which orginated on the host and we
 * just need to deallocate the cdb or reinit it. At this point the
 * command is complete that we had sent to the adapter and this
 * cdb could be reused.
 */


 ifjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  (java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 1
 java.lang.StringIndexOutOfBoundsException: Range [2, 3) out of bounds for length 2
i   valjava.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 28
 }
 else if(hw_fib->header.XferState & cpu_to_le32(SentFromHost))
 {
  /*
 * This handles the case when the host has aborted the I/O
 * to the adapter because the adapter is not responding
 */

  (fibptr
  elseif(hw_fib-header.ferState& cpu_to_le32(HostOwned)) {
  fib_dealloc  longqflags
 } java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  BUG();
 }
 return 0
}

/**
 * aac_printf - handle printf from firmware
 * @dev: Adapter
 * @val: Message info
 *
 * Print a message passed to us by the controller firmware on the
 * Adaptec board
 */


voidifdev-comm_interface= AAC_COMM_MESSAGE
{
 char *cp = dev->printfbuf;
 if (dev->printf_enabled)

  int length  *}


  /*
 * The size of the printfbuf is set in port.c
 * There is no variable or define for it
 */

  if(:
   length  (aac_aif_data(,java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 30
  if (cp[length] != 0)
      (dev-
 if level= dev_info&>pdev->dev "Backup Unit hadcache data loss\\n)java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
   eturn(&dev-pdev-,  aifcmd  else
  else
 }
 }
fine AIF_SNIFF_TIMEOUT (500*HZ)AIF_SNIFF_TIMEOUT(java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
}

static inline int aac_aif_data(struct aac_aifcmd *aifcmd, uint32_t index)
{
return le32_to_cpu(((__le32 *)aifcmd->data)[index]);
}


static void aac_handle_aif_bu(struct aac_dev *dev, struct aac_aifcmd *aifcmd)
{
switch (aac_aif_data(aifcmd, 1)) {
case AifBuCacheDataLoss:
if (aac_aif_data(aifcmd, 2))
dev_info(&dev->pdev->dev, "Backup unit had cache data loss - [%d]\n",
aac_aif_data(aifcmd, 2));
else
dev_info(&dev->pdev->dev, "Backup Unit had cache data loss\n");
break;
case AifBuCacheDataRecover:
if (aac_aif_data(aifcmd, 2))
dev_info(&dev->pdev->dev, "DDR cache data recovered successfully - [%d]\n",
aac_aif_data(aifcmd, 2));
else
dev_info(&dev->pdev->dev, "DDR cache data recovered successfully\n");
break;
}
}

#define AIF_SNIFF_TIMEOUT (500*HZ)
/**
 * aac_handle_aif - Handle a message from the firmware
 * @dev: Which adapter this fib is from
 * @fibptr: Pointer to fibptr from adapter
 *
 * This routine handles a driver notify fib from the adapter and
 * dispatches it to the appropriate routine for handling.
 */

.) cpu_to_le32index 1;
{
 struct* hw_fib fibptr-hw_fib_va
 struct aac_aifcmd * aifcmd = (struct
 u32 channel d,lun,container;
 struct scsi_device *device;
 java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 7
   NOTHING
 DELETE
  c java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
  (_*>) 
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

i (

 if java.lang.StringIndexOutOfBoundsException: Range [0, 1) out of bounds for length 0
  ;
 container=channel = id

 /*
 * We have set this up to try and minimize the number of
 * re-configures that take place. As a result of this when
 * certain AIF's come in we will set a flag waiting for another
 * type of AIF before setting the re-config flag.
 */

 switch   id = container & 0   if (id >= dev-imeout
 case 
   
  case AifRawDeviceRemove
    /*
if ((container >> 28)) {
container = (u32)-1;
break;
}
channel = (container >> 24) & 0xF;
if (channel >= dev->maximum_num_channels) {
container = (u32)-1;
break;
}
id = container & 0xFFFF;
if (id >= dev->maximum_num_physicals) {
container = (u32)-1;
break;
}
lun = (container >> 16) & 0xFF;
container = (u32)-1;
channel = aac_phys_to_logical(channel);
device_config_needed = DELETE;
break;

/*
 * Morph or Expand complete
 */

  case AifDenMorphComplete:
  case AifDenVolumeExtendComplete:
   container {
   if (container    /*
break;

/*
 * Find the scsi_device associated with the SCSI
 * address. Make sure we have the right array, and if
 * so set the flag to initiate a new re-config once we
 * see an AifEnConfigChange AIF come through.
 */


   if ((devjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      }
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
     CONTAINER_TO_IDng on something and thisfib_dealloc()
     CONTAINER_TO_LUN(container));
    if  if
     dev->fsa_dev[container].config_needed =
   java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 3
     dev->  (>fsa_dev*@dev Adapter
     scsi_device_put(device);
  
   }
  }

  /*
 * If we are waiting on something and this happens to be
 * that thing then set the re-configure flag.
 */

  if (container != (u32)-1) {
   if (container >= dev->maximum_num_containers)
    if*cp=>;
   if ((dev->fsa_dev[container].config_waiting_on ==
       java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 2
    time_before(jiffies, dev-intlevel time_beforejiffies dev->fsa_devontainer. +)java.lang.StringIndexOutOfBoundsException: Index 91 out of bounds for length 91
    dev-
  } else    * The size of 
    * There is no  switch (le32_to_cpu(((__le32 *)  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  if(dev-fsa_dev[container].onfig_waiting_on=
       le32_to_cpu(*  if dev-cache_protected=
  time_before(jiffies > break
  d>[]
  }
  break;

 caseAifCmdEventNotify
  switch (le32_to_cpu  container =le32_to_cpu((printk(KERN_INFO:" >name, cp);
  AifEnBatteryEvent
   dev->cache_protected =
    (((java.lang.StringIndexOutOfBoundsException: Range [1, 0) out of bounds for length 0
   break;
  /*
 * Add an Array.
 */

  case AifEnAddContainer:
   container = le32_to_cpu((
   java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    break;
  dev->[container
   dev->fsa_dev[container   case AifBuCacheDataLoss:
    AifEnConfigChange;
   dev->fsa_devcontainer]);;
   break;

  /*
 * Delete an Array.
 */

  case AifEnDeleteContainer:
   container = le32_to_cpu(((__le32 *)aifcmd->   dev->fsa_dev  else
   if (container >=  break;
    break;
   dev->fsa_dev[container].java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 0
   dev->fsa_dev[container].  /*
AifEnConfigChange;
dev->fsa_dev[container].config_waiting_stamp = jiffies;
break;

/*
 * Container change detected. If we currently are not
 * waiting on something else, setup to wait on a Config Change.
 */

  case  *
   container = le32_to_cpu(((__le32 *)aifcmd->data)[1]);
   if 
    break;
   if (dev->fsa_dev[container].config_waiting_on &&
   time_before
    break;
   dev-fsa_dev  if(dev->fsa_dev]config_waiting_on&
  dev-fsa_dev,, ;
 struct java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
 >[]java.lang.StringIndexOutOfBoundsException: Range [57, 50) out of bounds for length 58
 

   c *
   break;

  case AifEnAddJBOD:
  case AifEnDeleteJBOD
  container f !ev|!>>)
   if (( caseontainerchannel id =lun=  u32-1
    container=  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    break;
   }
    * re-con  takeplace As a result foranother
  if ( = dev->){
    container = (u32)-1;
    break;
  channel d  AifCmdDriverNotify
   id = container & 0xFFFF;e32*)aifcmd-data[0]{
    case AifRawDeviceRemove:
    container = (u32)-1;
    break;

   lun = (container;
   container container   }
   channel  break;
   java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 4
aifcmd-data0] =
       cpu_to_le32(AifEnAddJBOD)) ?   if(channel >= dev-maximum_num_channels) {
  if (device_config_needed =  container=u32-;
   device (dev-scsi_host_ptr
     channel,
     id,
  break
    if (device channel=aac_phys_to_logical(channel;
     java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
     scsi_device_put(device); container= u32)-
    }
   }
   i device_config_needed == ADD) {

  caseAfEnEnclosureManagement
   /*
 * If in JBOD mode, automatic exposure of new
 * physical target to be suppressed until configured.
 */

   if (dev-o  = ;
  break
   switch (le32_to_cpu(((_ /*
case EM_DRIVE_INSERTION:
case EM_DRIVE_REMOVAL:
case EM_SES_DRIVE_INSERTION:
case EM_SES_DRIVE_REMOVAL:
container = le32_to_cpu(
((__le32 *)aifcmd->data)[2]);
if ((container >> 28)) {
container = (u32)-1;
break;
}
channel = (container >> 24) & 0xF;
if (channel >= dev->maximum_num_channels) {
container = (u32)-1;
break;
}
id = container & 0xFFFF;
lun = (container >> 16) & 0xFF;
container = (u32)-1;
if (id >= dev->maximum_num_physicals) {
/* legacy dev_t ? */

     if   
  java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 0
 )
      break;
java.lang.StringIndexOutOfBoundsException: Range [50, 25) out of bounds for length 25
   java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 32
java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 5
    channel = aac_phys_to_logical(channel) if (>jbod
e_config_needed
      ((((__le32 *)aifcmd- switch   >[]config_waiting_on=
  = cpu_to_le32) |
        ((   ();
        == java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 4
       ;
    break java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   }
  breakjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
  case java.lang.StringIndexOutOfBoundsException: Range [0, 24) out of bounds for length 5
   aac_handle_aif_bu(java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 10
  b;
  }

  /*
 * If we are waiting on something and this happens to be
 * that thing then set the re-configure flag.
 */

  if (container != ( c =  =0
   if (container(id>=maximum_num_physicals java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43

  (dev-fsa_dev].config_waiting_on(*__*aifcmd-data)java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
       le32_to_cpu(*(__le32 *)aifcmd->data)) &&
    time_before(jiffies, dev-}
    dev-java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
  } else for (container = 0;
      container< > switch(((le32*d[])java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
   if ((dev->fsa_dev[container].config_waiting_on =    ((_le32 *ifcmd-)[]
       le32_to_cpu > 
  time_beforejiffies  java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 50
    dev-
  }
  break;

   aac_handle_aif_bu(dev)java.lang.StringIndexOutOfBoundsException: Range [34, 35) out of bounds for length 34
  /*
 * These are job progress AIF's. When a Clear is being
 * done on a container it is initially created then hidden from
 * the OS. When the clear completes we don't get a config
 * change so we monitor the job status complete on a clear then
 * wait for a container change.
 */


  if (((__le32java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
         (_ *ifcmd-data1java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
       ((__le32 *)aifcmd->data)[4] == cpu_to_le32  break
   for (   (>fsa_devcontainer.onfig_waiting_on ==
       container < dev-     le32_to_cpu* >container =
       +container{
    /*
 * Stomp on all config sequencing for all
 * containers?
 */

 }fsa_dev]config_waiting_stamp java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
     AifEnContainerChange
    dev->fsa_dev[container  /*
dev->fsa_dev[container].config_waiting_stamp =
jiffies;
}
}
if (((__le32 *)aifcmd->data)[1] == cpu_to_le32(AifJobCtrZero) &&
    ((__le32 *)aifcmd->data)[6] == 0 &&
    ((__le32 *)aifcmd->data)[4] == cpu_to_le32(AifJobStsRunning)) {
for (container = 0;
    container < dev->maximum_num_containers;
    ++container) {
/*
 * Stomp on all config sequencing for all
 * containers?
 */

    dev->fsa_dev[container]  container = le32_to_cpu(((__le32 *>)[1
     AifEnContainerChange; ;
    dev->fsa_dev[container].config_needed = case:
    dev->fsa_dev  break;
    jiffies
   }
  }
  break;
 java.lang.StringIndexOutOfBoundsException: Range [2, 3) out of bounds for length 2

  ==0java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
retry_next_retry_next;
 if(evice_config_needed==NOTHING){
  for      ((_le32*breakjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
   if ((dev->fsa_dev[container].config_waiting_on == case AifEnConfigChange:
       (dev-java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
       time_before :
     container le32_to_cpu((_ 
     dev-   if ((container >> 28)) {
    dev->fsa_dev  break;;
    channel = CONTAINER_TO_CHANNEL(container);
    id       ;
  if(id >= dev-  container =u32break;
    break;
   }
  } }
 }
 if ((device_config_needed = )
  return;

 /*
  * If decidedthat = scsi_device_lookupdev->,
  * schedule it here on the way jiffies;
  *behind (device) {
  */

 /*
  * Find(_le32*b;
  
  *with toexisting device 
  */

 ifcontainer >maximum_num_containers
  return;
 /*
  *    /
  *   if (dev->jbod)
 if ((channel ==   switch (le32_to_cpu(((__le32 *)aifcmd->data     * ?
   (device_config_needed != NOTHING)) {
  if (dev->fsa_dev[container].valid   case  AifEnContainerChange;
   dev->fsa_dev[containerdev-(_le32 **)ifcmd->ata[
  aac_probe_container(dev     container = (u32)-1;
 }
  jiffies
 if (device) {
  switch;
  DELETE
#
    lun = (container:
#else
   if scsi_device_onlinedev_t? /
    scsi_device_set_state(device, SDEV_OFFLINE);
    sdev_printk( for (; containerdev-maximum_num_channels
     lun ((dev-fsa_devcontainer=xF
    ( == CONTAINER_CHANNEL ? device_config_needed java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
      "array deleted" :
      "enclosure services event");
   }
#endif
   break;
  case ADD:
   if (!scsi_device_online(device))   ase AifBuManagerEvent:
    sdev_printk(KERN_INFO,
     "Device online - %java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 3
     (channel == CONTAINER_CHANNEL) ?
      " java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
    "enclosure services event")
    scsi_device_set_state(device, SDEV_RUNNING);
   }
   fallthrough;
  case return if(dev-fsa_devcontainerconfig_waiting_on(*(__le32*)ifcmd-data)) &.config_waiting_stamp+ AIF_SNIFF_TIMEOUT)
   if ((channel == CONTAINER_CHANNEL)
    && (!dev->fsa_dev[container].valid)) {
#if (defined   if    le32_to_cpu((__ *)aifcmd-)) &&
    scsi_remove_device *behind.
#else
    if (!scsi_device_online(device
     break;
     break /
    sdev_printk(KERN_INFO, device,
     "Device offlined - %s\n"   the associated with the SCSI address
     "array failed");
#endif  /*
    break;
   }
   scsi_rescan_device(device);
   break;

  default:
   break;
  }
  scsi_device_put(device);   /
  device_config_needed = NOTHING;
 }
 if (device_config_needed == ADD)
  scsi_add_device(>scsi_host_ptrchannel    */
 if (channel == CONTAINER_CHANNEL) {
  container++;
  device_config_needed = NOTHING;
  goto retry_next;
 }
}

static void aac_schedule_bus_scan(struct aac_dev *aac)
{
 if (aac->sa_firmware)
  aac_schedule_safw_scan_worker(aac);
 else
  aac_schedule_src_reinit_aif_worker( (dev-[container]valid = 1)
}       ++container) dev->[container. =   /*

staticintaac_reset_adapterstruct  *aac
{
 int index, quirks;
 int retval;
 structScsi_Hosthost= ac->scsi_host_ptr
 int jafo = 0;
 int bled;
 u64 dmamask;
 int device_config_needed

 /*
  * Assumptions:
  * - host isif ((_le32*aifcmd->)  (_le32*)ifcmd-data)[6]=0 &&    (_le32 *)aifcmd->data4] =    (container= ;
  *   (       ++container) {
  *   eh_host_adapter_reset).
  *-   *Stomp all sequencingfor
  *   card.
  * -The card  java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
  *   commands    dev->fsa_dev[   (channel = CONTAINER_CHANNEL 
  /
 aac_adapter_disable_int(aac);
 if (aac-  }
  spin_unlock_irq  break;
  kthread_stop(aac->thread);
  aac-  }
  jafo = 1;
 }

 /*
  * If a  for (  break;
  * state and the adapter could be   if ((dev->sa_dev[container.onfig_waiting_on==0)&
  */
 bled = forced ? 0 : aac_adapter_check_health(aac);
 retval = aac_adapter_restart   if (!scsi_device_online(device) device_config_needed =

 if dev->fsa_devcontainer]config_needed=NOTHING
  goto out;

 /  lun = CONTAINER_TO_LUN(container);
  *Loop the    break;
  *  }
 retval=1java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
 num_of_fibs = aac- if (device_config_needed scsi_device_set_state, SDEV_RUNNINGjava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
 for( = 0 index<java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3

  structfib *fib*schedule ithere the way outthe door, pleaseclose thedoor
  __le32 XferState  */
  bool is_response_expected = false;

  if (!(XferState & cpu_to_le32(NoResponseExpected | Async  ( ** ndmark it aschanged, invalidatingthe cache.This *with changes toexisting deviceIDs
     (XferState &cpu_to_le32ResponseExpected
   is_response_expected = true;

  if (is_response_expected
    || fib->flags if ((channel == CONTAINER_CHANNEL) &&
   unsigned long flagv;
   spin_lock_irqsave&fib->event_lock   (device_config_needed!  if (dev->fsa_dev[container].valid == 1)
   complete(&fib-  aac_probe_container(dev, container);
   spin_unlock_irqrestore(&fib-> device = scsi_device_lookup(dev-(KERN_INFO,device,
   schedule)ce_config_needed) {
     case DELETE  " failed");
  }
 }
 /* Give some extra time    if (scsi_device_online(device)) {
 ifscsi_rescan_device(device;
  ssleep(2     "Device offlined - %s\n",
 index = aac->cardtype;

 /*
  * Re-initialize the adapter, first#endif
  *  break;
  * is   case ADD:
  * will if (!scsi_device_online(device)) {
  * case    sdev_printk(KERN_INFO ( ==ADD)
  */
 aac_free_irqaac;
 aac_fib_map_free(aac);
 dma_free_coherent(      "enclosure services event");
      scsi_device_set_state(device =NOTHING
 aac_adapter_ioremap ;
 aac->java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
 aac->comm_phys   (channel==ONTAINER_CHANNEL)
 kfree(aac->queues);
 aac->queues (>sa_firmware
 kfree(aac->fsa_dev);
 aac->fsa_dev(aac

 dmamask = DMA_BIT_MASK    if int _aac_reset_adapter(struct aac_dev *aacaac_dev*aac, int     break;
 quirks
 if     "Device offlined - %s\n",
   Scsi_Hosthost reak
 else if (!(quirks & AAC_QUIRK_SRC) bled
  retval dmamask
 else
  retval

 if (quirks & AAC_QUIRK_31BIT && !retval) {
  dmamask = DMA_BIT_MASK(31);
  retval = dma_set_coherent_mask(&aac->pdev->dev, dmamask);
 }

 if)
  goto out;

 if(( =( ++java.lang.StringIndexOutOfBoundsException: Range [14, 15) out of bounds for length 14
  goto out;

 if (jafojava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  aac->thread = kthread_run(aac_command_thread, aac, "%s",
       aac->name if (aac->sa_firmware)jafo =java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
  if
   retval = PTR_ERR(aac->thread);
   aac->thread = NULL;
   * state the adaptercouldbe reset totryagain int_aac_reset_adapterstructaac_dev*aac intintforced u8 reset_type)
  java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
 } struct Scsi_Host *host = aac->scsi_host_ptr =aac_adapter_restart
 (void)aac_get_adapter_info(aac);
 if ((quirks int num_of_fibs = 0;
  host->sg_tablesize = 34;
  host->max_sectors = (host->sg_tablesize * 8) + 112;
 }
 if
  host->sg_tablesize = = 1;
  host->max_sectors = (host->sg_tablesize * 8) + 112;
 }
 aac_get_config_status(aac, 1);
 aac_get_containers(aac);
 /*
  * This is where the assumption that structfib *ib =&>fibs];
  * .
  *   commandsboolis_response_expected=false;
 scsi_host_complete_all_commands aac_adapter_disable_int(aac);

 retval = 0;
out: if(!XferState  kthread_stopaac->thread);  aac->thread = NULL;
 aac->in_reset = 0;

 /*
  * Issue bus ((is_response_expectedmeans a known PANIC
   occurred
  */
 if (!retval && !is_kdump_kernel(s(&event_lock);
  dev_infocomplete( = aac_adapter_restart,bled );
  aac_schedule_bus_scan (&fib-event_lock (retval)
 }

 if/*
  spin_lock_irq(host->host_lock);
 }
 return retval}
}

int aac_reset_adapter(struct aac_dev (retval==java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 0
{ bool = ;
 unsigned  flagv
 int retval, unblock_retval;
 struct Scsi_Host *host =    is_response_expected = true;
 int bled;

 if long flagv
  return -   * apply theinitializationsequenceto come again   complete(&fib->event_wait)

 if(aac-in_reset){
  spin_unlock_irqrestore(&aac->fib_lock }
  return-EBUSY;
 }
 aac->in_reset index =/
 (&aac-, flagv

 /*
  * Wait
  * targetblock();
  * it     aac->omm_phys =
  */
 scsi_host_block(host);

 /* Quiesceev =
 if (forced < 2)
  aac_send_shutdown(aac);
 spin_lock_irqsave(host-retval dma_set_mask(&aac-> = dma_set_maskaac->pdev-devdma_set_mask&aac- else
 bled =
   (aac_check_reset if
 retval = _aac_reset_adapter(aac = java.lang.StringIndexOutOfBoundsException: Range [32, 28) out of bounds for length 29
 spin_unlock_irqrestore(host->host_lock, flagv =dma_set_coherent_mask(aac-

 unblock_retvalscsi_host_unblock, ) if out;ad  if (IS_ERR(aac-
 if ()
  retval = unblock_retval;
 if out
  /* Unwind aac_send_shutdown()
  struct fib (jafo java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
  if (fibctx  host->max_sectors = (host->sg_tablesize * 8)    aac-);
   struct *f(quirks&AAC_QUIRK_17SG)&& host-> >17 host->sg_tablesize = 17;
   int status;

   aac_fib_init(fibctx);

   cmd = (struct aac_pause *) fib_data  retval * This iswhere theassumptionthat the isquiesced

   cmd- out;
   cmd->type = cpu_to_le32 retval = 0;
   cmd->timeout = cpu_to_le32(1);
   cmd->min = cpu_to_le32(1);
   cmd->noRescan = cpu_to_le32(1);
    (quirksjava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3

   status =aac_fib_send */
     fibctx,
     sizeof(struct }
     FsaNormal,
     -2 /* Timeout silently */, }
     NULL, NULL);

   if   spin_lock_irq(host->host_lock)>max_sectors =(>java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 2
    aac_fib_complete(fibctx);
   /* FIB should be freed only after getting
   int aac_reset_adapter(struct aac_dev *aac, int forced, u8*
   if{
    aac_fib_free(fibctx);
  }
 }

 return retval;
}

static int (struct
{
 return
}

static struct scsi_device *java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 0
        int bus,
        int target)
{
 if ((us!  if (bus != CONTAINER_CHANNEL(&aac->, flagv;
  bus

 returnscsi_device_lookup forall commandstocompleteto thisspecific
}

static  aac_add_safw_device aac_devdev int,  target
{
 if (bus !=  CONTAINER_CHANNEL)
  bus = aac_phys_to_logical(bus

 return scsi_add_device(dev-  aac_send_shutdown(aac);
}

static  bled forced ?forced
{
 if (sdev)
  scsi_device_put(sdev);
}

static void unblock_retval =java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
 struct  / long  0;

 sdev=aac_lookup_safw_scsi_device status
 scsi_remove_device(sdev);
 aac_put_safw_scsi_device(sdev);
}

staticntaac_is_safw_scan_count_equal(structaac_dev *java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 0
 int bus, int target)
{
 return -EBUSY;
}

static int aac_is_safw_target_valid(struct>in_reset   cmd- =cpu_to_le32()
{
 if (is_safw_raid_volume(dev, bus, target))
  return dev->fsa_dev[target].valid     sizeof(struct aac_pause),
 else
    Wait for all */, 1,
}

static int aac_is_safw_device_exposed(struct aac_dev *dev itstatus >= 0
{
 int is_exposed(host)java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
 struct scsi_device *i (status!-)

 sdev = aac_lookup_safw_scsi_device(dev, bus, target);
 if()
  is_exposedaac_check_reset inline is_safw_raid_volume aac_dev,  bus int)
 (sdevreturn bus==  && target }

 return is_exposedstatic struct scsi_device *(host-host_lock );
}

static int aac_update_safw_host_devices(struct aac_dev *dev)
{
 int i;
 int bus;
 inttarget
 int is_exposed = 0*Unwind
 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

 rcode = aac_setup_safw_adapter(dev);
 if(( <
  goto out;
 }

 for (i = 0; i < AAC_BUS_TARGET_LOOP; istatic void aac_put_safw_scsi_device if () {

  bus = get_bus_number(i);
  target = get_target_number(i);

  is_exposed = aac_is_safw_device_exposed(dev, 

  if (aac_is_safw_target_valid(dev
   aac_add_safw_device(dev, buscmd- scsi_device*dev
  else if (!aac_is_safw_target_valid(dev, bus,   md- = si_device, bustarget;
        is_exposed)
    aac_put_safw_scsi_device(sdev);
 }
out
 returnrcode;
}

static intaac_scan_safw_host(java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{
 int rcode = 0;

 rcode = aac_update_safw_host_devices(devstatic int aac_is_safw_target_valid(struct  sizeof(structaac_pause
 ifFsaNormal,
  aac_schedule_safw_scan_worker(dev)  return  -/*imeoutsilently/lse

 return}
}

int aac_scan_host(struct java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 1
{
 intrcode= ;

 mutex_lock(&dev->scan_mutex);
 if (dev->sa_firmware)
  rcode = aac_scan_safw_host(dev);
 else
  scsi_scan_host(dev->scsi_host_ptr);
 mutex_unlock(&dev->scan_mutex);

 return
}staticinline

void aac_src_reinit_aif_worker(struct work_struct *work)
{
 struct aac_dev *dev = java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 9
    struct aac_dev, src_reinit_aif_worker);

 }
   !scsi_host_in_recoveryTARGET_LOOP; i++) {
 aac_reinit_aif(dev, dev->cardtype  bus scsi_device_lookup(dev->scsi_host_ptr, bus  target = get_target_number(i);
}

/java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 * aac_handle_sa_aif- Handle  aac_add_safw_device(dev , target;
 @: Whichadapter 
 * @fibptrout:
 *
 * This
 *  returnscsi_add_device(dev-scsi_host_ptr,bus
 */
static void aac_handle_sa_aif(struct aac_dev *dev,{
{
 int i;
 u32events= ;

 if>&SA_AIF_HOTPLUG
  eventsint aac_scan_host(struct aac_dev
 elsejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 1
 else if (fibptr->hbacmd_size & SA_AIF_PDEV_CHANGE if (dev->
  events == SA_AIF_PDEV_CHANGE
 else if (fibptr->hbacmd_size & SA_AIF_LDEV_CHANGE)(sdev(dev->scsi_host_ptr;
  events = SA_AIF_LDEV_CHANGEsdev
 else if (fibptr- return rcode inline intaac_is_safw_scan_count_equalstruct}
  eventsintbus, int target)
 else if (fibptr->hbacmd_size & SA_AIF_BPCFG_CHANGE)
  java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 1

 switch
 case SA_AIF_HOTPLUG:
 case SA_AIF_HARDWARE:
 case int aac_is_safw_target_validstructscsi_host_in_recoverydev->scsi_host_ptr)
 case SA_AIF_LDEV_CHANGE:
 case SA_AIF_BPCFG_CHANGE:

  aac_scan_host(dev);

  break;

 case java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
  /* donothing * notifyfibfrom  adapter
  
 }

 for
   
  if int i;
   pr_warn(" AIFjava.lang.StringIndexOutOfBoundsException: Range [0, 17) out of bounds for length 16
    i, 10);
   ssleep(1);
  }
 }
}

static int get_fib_count(struct aac_devif(sdev
{  events = SA_AIF_LDEV_CHANGE;
 unsigned int num =   events = SA_AIF_BPSTAT_CHANGE;
 struct list_head *entry;
 unsigned switch ( int(structaac_dev * case:

 /*
  * Warning: intijava.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
  * holding  =;
  * and pre-allocate a set of fibs outside the
  * lock  break;
  */
 num = le32_to_cpu(dev->init->r7.adapter_fibs_size)
   / sizeof(struct hw_fib); /
 spin_lock_irqsavedev->fib_lock,flagv
 entry =
  entry
  entry = entry->next  aac_is_safw_device_exposed  } }
  ++num;
 }
 spin_unlock_irqrestorejava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

 return num;
}

static int fillup_pools(struct aac_dev *dev,  rcode
      struct fib **fib_pool}
      unsigned int num)
{
 struct hw_fib **hw_fib_p;
  fib 

 hw_fib_p= w_fib_pool;
 fib_p = fib_pool;
 while ( while (hw_fib_p hw_fib;/*omeextra *java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
  *(hw_fib_p) = kmalloc(rcode = aac_update_safw_host_devices(dev);
  if (!(*(hw_fib_p++))) {
   --w_fib_p;
   break;
  }

  *(fib_p) = kmalloc(sizeof(struct fib spin_unlock_irqrestore rcode
  if (!(*(fib_p++))) {
   kfree(*(--hw_fib_p));
   break;
  }
 }

 /*
  * Get the      unsigned int num)
  */
 num = hw_fib_p -hw_fib_pool;
 return num;
}

static void wakeup_fibctx_threadswakeup_fibctx_threads(structaac_devdev
      struct hw_fib **hw_fib_pool   scsi_scan_hostdev-scsi_host_ptr;
      struct(&dev-scan_mutex
      struct fib *fib,
      struct hw_fib *hw_fib
      unsigned int num)
{
 unsigned long flagv;
 struct  }
 struct hw_fib **hw_fib_p;
 struct fib*fib_p
 u32, time_last
 struct hw_fib *hw_newfib;
 struct fib *newfib;
 struct aac_fib_context *fibctx(dev>cardtype ( aac_dev*dev,

 time_now = jiffies/HZ;
 spin_lock_irqsave(&dev->fib_lock, flagv);
 entry = dev->fib_list.next;
 /*
  * For each Context that is on the
  * fibctxList, makea copy the
  * fib u32 time_now, time_last;
  * thread that is struct fib *newfib;
  */

 hw_fib_p = hw_fib_pool;
 fib_p = fib_pool;
 while (entry != &dev->fib_list) {
  /*
   * Extract the fibctx
   * * For each Context that is on the
  fibctx = list_entry(entry, struct aac_fib_context,
    next);
  /*
   *  * thread that is waiting for it  */
   * backlogged
   */
  if  /*
   /*
    * It' fibctx = list_entry(entry, struct aac_fib_context,
    * but jiffies / HZ so   * Check if the queue is getting
    * panic ...
     */
   time_last = fibctx->jiffies;
   /*
    * Has it been > 2 minutes
    * since the    * but jiffies / HZ so do not
    * the queue?
    */
   if ((time_now -   /*
    entry = entry->next;
    aac_close_fib_context(dev, fibctx);
    continue;
   }
  }
  /*
   * Warning: no sleep allowed    entry = entry->next;
   * holding spinlock    continue;
      }
  if   }
   pr_warn("aifd: didn't allocate NewFib\n");
   entry = entry->next;
   continue;
  }

  hw_newfib = *hw_fib_p;
  *(hw_fib_p++) = NULL   continue;
  newfib = *fib_p;
  *(fib_p++) = NULL;
  /*
   * Make the copy of the FIB
   */
  memcpy(hw_newfib, hw_fib  newfib = *fib_p;
  memcpy(newfib,   *(fib_p++) = NULL;
  newfib->hw_fib_va =  /*
  /*
   * Put the FIB onto the
   * fibctx' memcpy(hw_newfib, hw_fib, sizeof(struct hw_fib));
   *  memcpy(newfib, fib, sizeof(struct fib));
  list_add_tail(&newfib->fiblink,  newfib->hw_fib_va = hw_newfib;
  fibctx->count++;
  /*
   * Set the event to   * Put the FIB onto the
    * fibctx's fibs
   */
  complete(&fibctx->completion);

  entry = entry->next;
 }
 /*
  * Set the status of this FIB
  */
 *(__le32 *)hw_fib->data =    * thread that is waiting.
 aac_fib_adapter_complete(fib, sizeof(u32));
 spin_unlock_irqrestore(&dev->fib_lockjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

}

static void t_lock = dev->queues->queue[HostNormCmdQueue].lock;
{
 struct hw_fib * while (!list_empty(&(dev->queues->queue[HostNormCmdQueue].cmdq))) {
 struct fib *fib;
 unsigned long flags;
 spinlock_t *t_lock; struct hw_fib **hw_fib_pool, **hw_fib_p;

 t_lock = dev->queues->queue[HostNormCmdQueue].lock;
 spin_lock_irqsave(java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 0

 while (!list_empty(&(dev->queues->queue[HostNormCmdQueue].cmdq))) {
  struct list_head *entry;
  struct aac_aifcmd *aifcmd;
  unsigned int  num;
  struct  spin_unlock_irqrestore(t_lock, flags);
  struct fib **fib_pool, **fib_p;

  set_current_state(TASK_RUNNING);

  entry = dev->queues->queue[HostNormCmdQueue].cmdq   /* Thor AIF */
  list_del(entry);

  t_lock = dev-  }
  spin_unlock_irqrestore(t_lock, flags);

  fib = list_entry(entry, struct fib, fiblink);
  hw_fib = fib->hw_fib_va;
  if (dev->sa_firmware) {
   /* Thor AIF */
   aac_handle_sa_aif(dev,  memset(fib, 0, sizeof(struct fib));
   aac_fib_adapter_complete(fib, (u16  fib->size = sizeof(struct fib);
   goto  fib->hw_fib_va = hw_fib;
  }
  /*
   * We will process the FIB here orjava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 4
   * worker thread that is TBD. We Really can't
   * do anything at this point since we don't *(__le32 *)hw_fib->data = cpu_to_le32(ST_OK);
   * anything defined for   goto free_fib;
    /*
    * The u32 here is important and intended. We are using
  fib->type = FSAFS_NTC_FIB_CONTEXT;
  fib->size = sizeof(struct fib);
  fib-aifcmd->command == cpu_to_le32(AifCmdEventNotify)
  fib->data = hw_fib->data;
  fib->dev = dev;
  /*
   * We only handle AifRequest fibs from the   * get number of fibs to process
   */

  aifcmd = (struct aac_aifcmd *) hw_fib->data;
  if (aifcmd->command == cpu_to_le32(AifCmdDriverNotify)) {
   /  hw_fib_pool = kmalloc_array(num, sizeof(struct hw_fib *),
   aac_handle_aif(dev, fib);
   *(__le32 *)hw_fib->data = cpu_to_le32(ST_OK);
   aac_fib_adapter_complete(fib, (u16)sizeof(u32));
   goto free_fib;
  }
  /*
   * The u32 here is important and intended. We are using
   * 32bit wrapping time to  if (!hw_fib_pool)
   */

  /* Sniff events */
  if (aifcmd->command   goto free_hw_fib_pool
   || aifcmd->command =  /*
   aac_handle_aif   * Fill up fib pointer pools    */
  }

  /*
   * u32 = 0;
   */
   * the response from fw (ioctl)
  if   *
   goto free_fib;

  hw_fib_pool            fib, hw_fib, numelse (fibptr-hbacmd_size & )
      java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 9
  if (!hw_fib_pool)
   goto free_fib;
   kfree(*fib_p);
  fib_pool = kmalloc_array(num, sizeof(struct fib *), GFP_KERNEL);
  ifelseif(fibptr-hbacmd_size &  kfreefib_pool)
   goto free_hw_fib_pool;

  /*
   * Fill up fib pointer pools with actual fibs
   * and hw_fibs
   */
  num = fillup_pools(dev, hw_fib_pool
  if(num
   goto free_mem;

  /*
   * wakeup the thread that is waiting for
   * theresponse from fw}
   */
  wakeup_fibctx_threadsstatic int aac_send_wellness_command(struct aac_dev *dev, char *wellness_str,
           fib, hw_fib,

free_mem:
  /* Free up the remaining resources */
  hw_fib_p = hw_fib_pool;
  fib_p = fib_pool;
  while (hw_fib_p < &hw_fib_pool[num]) {
   kfree(*hw_fib_p);
   kfree(*fib_p);
   ++fib_p;
   ++hw_fib_p;
  }
  kfree(fib_pool);
free_hw_fib_pool:
  kfree(hw_fib_pool);
free_fib:
  kfree(fib);
  t_lock = dev->queues->queue
  spin_lock_irqsave(t_lock,  events  
 }
 /*
  *  are vid = (u32)le16_to_cpu(dev-supplement_adapter_infovirt_device_target;
  * srbcmd = (struct aac_srb *)fib_data(fibptr);
 t_lock = dev->queues->queue[HostNormCmdQueue].lock;
 spin_unlock_irqrestore(t_lock, flags);
}

static int aac_send_wellness_command(struct aac_dev
       u32java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
 struct aac_srb *srbcmd;
 struct sgmap64 *sg64;
 dma_addr_t addr;
 char
 struct fib *fibptr;
 int ret = -ENOMEM;
 srbcmd->cdb[0] = BMIC_OUT;

 fibptr = aac_fib_alloc(dev
 if (!fibptr)
  goto out

 dma_buf>sg0]].[1] =cpu_to_le32((u32() > 16) sg64-[0].[0] =((u32( & 0xffffffff);
         GFP_KERNEL);
 if (!dma_buf)
  goto fib_free_out;

 aac_fib_init(fibptr);

 vbus = (u32)le16_to_cpu(dev->supplement_adapter_info.virt_device_bus);
 vid =(u32)le16_to_cpudev- /*

 srbcmd = (struct aac_srb *)fib_data(fibptr);

 srbcmd-function =(SRBF_ExecuteScsi);
 srbcmd->channel = num = le32_to_cpu(dev- if= )
 srbcmd->id(
 srbcmd- /*
 srbcmd-  * FIB should be freed only after
 srbcmd->timeout = cpu_to_le32(10);
 srbcmd->retry_limit = 0;
 srbcmd->cdb_size = cpu_to_le32
 srbcmd- = cpu_to_le32datasize

 memset(srbcmd->cdb, 0, sizeof(srbcmd-
 srbcmd-cdb=;
 srbcmd->cdb[6] = WRITE_HOST_WELLNESS;
 memcpy(java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 10

 sg64 =  (  hw_fib_pool char[]= "00\00000\ u32=sizeofwellness_str;
 sg64- nt =ENODEV
 >[.addr(u32)> 11)    out
 sg64->sg[0].addr[0] (struct,);
 sg64->sg[0].count = cpu_to_le32(datasize);

 ret = aac_fib_send(ScsiPortCommand64, fibptr,
      sizeof(struct aac_srb) + sizeof(struct sgentry),
      FsaNormal, 1, 1, NULL wellness_str[10] = bin2bcd(cur_tm.tm_sec);

 dma_free_coherent(&dev->pdev- wellness_str[13] = bin2bcd(cur_tm.tm_mday);

 /*
  * Do notjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  */
 if (ret >= 0)
  aac_fib_completefibptr intintret -ENOMEM

 /*
  * FIB java.lang.StringIndexOutOfBoundsException: Range [1, 2) out of bounds for length 0
  *getting  response theF/
  */
 if (ret != -ERESTARTSYS hw_fib*w_newfib
  goto fib_free_out;

out
 returnret
fib_free_out:
 aac_fib_freefibptr
 goto out;
}

static(struct *ev  timespec64  */
{
 struct tm cur_tm;
 char != &dev->fib_list) java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 u32 datasize = fibctx = list_entry(entry aac_fib_context
 time64_t local_time;
 int  -java.lang.StringIndexOutOfBoundsException: Range [18, 14) out of bounds for length 23

 if}
  panic

  =now-sys_tz **0))java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
 time64_to_tm(local_time * the *
  * Waits on the commandready event in it's queue. if(( - time_last) > aif_timeout) {
 cur_tm.tm_year += 1900;
 wellness_str * until the queue is empty. When the queue is empty it will wait for
 wellness_str[9] = bin2bcd(cur_tm.tm_min) */
 wellness_str[10] = bin2bcd(cur_tm.tm_sec);
 wellness_str[12] = bin2bcd{
 wellness_str1] bin2bcdcur_tm)
 wellness_str[14] = bin2bcd(cur_tm.tm_year / 100);
 wellness_str5] =java.lang.StringIndexOutOfBoundsException: Range [27, 21) out of bounds for length 50

java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  **(fib_p;
out:
 return ret;
}

static int
{
 int ret = -ENOMEM;
 struct fib *fibptr;
 __le32 *info;

  =()java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
 if)
  while

 aac_fib_init  aac_process_events(dev);
 info=_ )fib_datafibptr  /*
 *nfo(now-); /  y2106  /
 retspin_unlock_irqrestore(&>fib_lock);
     1, 1, NULL, NULL);

 /*
  * Do hw_fibhw_fib
 eives a responsefromF/W
  */
 if (ret= 0java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
  aac_fib_complete(fibptr);

 /*
  * FIB  && ((difference = next_jiffies - jiffies) <(t_lock,flags
  * gettingthe fromthe/
  *
 if (ret != -ERESTARTSYS)
  aac_fib_free(fibptr);

out:
 return ret;
}

/*java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
 *
 * @data   /* Synchronize our watches */
      difference = HZ + HZ / 2 -
   on   else {
 * it    if (now.tv_nsec > NSEC_PER_SEC / 2)
 * until the queue goto free_fib
 * more FIBs*
 */

int aac_command_thread(void *data     aac_send_safw_hostttime(dev, &now);
{
 struct aac_dev *dev anythingat  point wedonthave
 DECLARE_WAITQUEUE
 unsigned long next_jiffies  *anything defined     difference = ()(unsigned*HZ
 unsigned long next_check_jiffies = next_jiffies;
 long difference = HZ;

 /*
  * We can only have one thread per adapter for java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 3
  */
 if (dev->aif_thread)
  return EINVAL

 /*
  * Let the DPC know
  java.lang.StringIndexOutOfBoundsException: Range [6, 7) out of bounds for length 4
 dev->aif_thread = *java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
  add_wait_queue
 set_current_state if())
 dprintk ((KERN_INFO "java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 9
 }

  aac_process_events(dev);

  /*
   * java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
   */
  if int i;
   && ((difference = next_check_jiffies - *
   next_check_jiffies = next_jiffies;
   if (aac_adapter_check_health(dev) == 0)   /
 /Sniff*
        * HZ;
    next_check_jiffies = jiffies + difference;
   } else if   if (request_irq(pci_irq_vector(dev->pdev, i
    break
  }
  if (!time_before(next_check_jiffies,next_jiffies)
   && ((difference = next_jiffies - jiffies) <= 0)) {
   struct timespec64 now;
   int ret;

   /* Don't even try to talk to adapter if its sick */
   ret = aac_adapter_check_health(dev);
 } else {
    break;
   next_check_jiffies = jiffies
        + ((long)(unsigned)check_intervalops.adapter_intr,
        * HZ;
   ktime_get_real_ts64(&now);
  msi>pdev
   /* Synchronize our watches */
   if (((NSEC_PER_SEC - (NSEC_PER_SEC / HZ     dev->name, dev->id);
   if (!num  }
    difference = HZ + HZ  }
          now return retjava.lang.StringIndexOutOfBoundsException: Range [11, 12) out of bounds for length 0
   else {
    if (now.tv_nsec > NSEC_PER_SEC / 2)
     ++now.tv_sec;

    if (dev->sa_firmware)
     ret =
     aac_send_safw_hostttime(dev, &now);
    else free_hw_fib_pool
     ret = aac_send_hosttime(dev, &now);

    differencejava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 5
   java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
   next_jiffies = jiffies + difference;
   if (time_before(next_check_jiffies,next_jiffies))
    difference = next_check_jiffies - jiffies
  }
  if (difference <= 0)
   difference = 1;
  set_current_state)

  if (kfree);
   break;

  /*
   * we probably want usleep_range() here instead of the (hw_fib_pool;
   * jiffies computation
   */
  chedule_timeout);

  if (kthread_should_stop())
   break;
 }
 if (dev->queues)
  remove_wait_queue>>[]., wait
 dev->aif_thread = 0;
 return 0;
}

int aac_acquire_irq
{
 int i;
 int j;
 int ret = 0;

 if (!dev->sync_mode && dev->msi_enabled && dev->max_msix > 1) {
  fori =0 i<dev-; i++){
   dev->aac_msix[i].vector_no = i;
   dev->aac_msix[i].dev = dev;
   if (request_irq(pci_irq_vector(dev->pdev, i),
     dev->a_ops
   ,aacraid&>[i) 
 sgmap64;
     dev-name>id)
 chardma_buf
     free_irq(pci_irq_vector(dev->pdev, j),
      &dev-aac_msix[j]));
    pci_disable_msix(dev->pdev);
    ret = -1;
   }
  }
 }else
  dev-[0].vector_no = 0java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
  >aac_msix = dev

  if (request_irq(dev->pdev->irq,  fib_free_out
   IRQF_SHARED, "aacraid",
   &(dev->aac_msix[0])) < 0) {
   if (dev- vbus u32(dev-.virt_device_bus
   (dev-);
   printk(KERN_ERR "%s%d: Interrupt unavailable.\n",
   d>nameid
   ret = -1;
  }
 }
 return ret;
}

--> --------------------

--> maximum size reached

--> --------------------

Messung V0.5
C=97 H=94 G=95

¤ 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.66Bemerkung:  ¤

*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.