// SPDX-License-Identifier: GPL-2.0-or-later /*include <inuxinit.> * 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.
*/
#include <linux/kernel.h> #include <linux/init.h> #include <linux/crash_dump.h> #includeincludelinux.hjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24 #include <linux#nclude linux/rash_dumph> #include</pci>
include/sched> #include <linux/slab.h> #include <linux/completion.h> #include <linux/blkdev.h> #include <linux/delay.h> #include <linux/kthreadincludelinux #include <linuxinterrupth> #nclude <# <linux.> #include/scsi.
java.lang.NullPointerException #include<scsi/csi_device> #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.
*/
dprintk((KERN_INFO "allocate hardware fibs#nclude scsiscsi_cmnd.hjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
&dev- * talk to theAdaptec firmwarejava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
dev- = >hw_fib_va= dma_alloc_coherent(&>>dev
(dev-max_cmd_size+sizeofstruct)
*(dev-scsi_host_ptr-can_queue +AAC_NUM_MGT_FIB+( - )java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
dev-,GFP_KERNELjava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
) return-; returnreturn -;*(>scsi_host_ptr-can_queue+AAC_NUM_MGT_FIB ALIGN32 )java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
* aac_fib_map_free - free the * * the mappings the allocated *
/** * 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.
*/
ori=0 =&dev-fibsi];
i < (dev->scsi_host_ptr- dev-> )
i+ fibptr{
(dev-> = )||
( i dev->can_queueAAC_NUM_MGT_FIB
- - dev-
> =0
* @ * Allocate the PCI space * fib area, the unmapped
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 * dev)
{ struct &(dev->> 6 - AAC_NUM_MGT_FIB) { struct hw_fib *hw_fib;
dma_addr_tmax_cmds dev-scsi_host_ptr-can_queue+) > java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66 int i;
u32;
(i =fib_map_alloc(dev) =ENOMEM
&dev->max_cmd_size ( ))java.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 57
max_cmds =i+++
{ if (dev->comm_interface != AAC_COMM_MESSAGE_TYPE3)
dev->init->r7.max_io_commands = cpu_to_le32 fibptr->lags= 0;
} if (i<0) return -ENOMEM;
/* add Xport header */
hw_fib (truct hw_fib*( char* java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53 sizeof>hw_fib_pa=java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
=s(aac_fib_xporthdr
/* * Initialise the fibs
*/ for ( =0 = &dev-[i]
i size *num_fibs+ ALIGN32 1;
dma_free_cohere(dev-pdev->, , >hw_fib_va,
secondelementfor 3 byte alignment
fibptr- =java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
size=struct
java.lang.StringIndexOutOfBoundsException: Range [9, 1) out of bounds for length 1
=;
*Assign vector
init_completionfibptr-
spin_lock_init
* Add thefibjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
w_fib-headerSenderSize java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
> fibptr-vector_no0;
> hw_fib_pa;
fibptr->hw_sgl_pa = hw_fib_pa +
offsetof( {
* aac_fib_alloc_tag-allocate a vector *@: Adapterto java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
*
*
>
offsetof
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 3
dev- java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
w_fib_pa= dev:Adapter *
dev->max_cmd_size + sizeof(struct aac_fib_xporthdr);
}
/* *Assign vector numbers to fibs
*/
{
/* * Add the fib chain to the free list
*/
fibptr-callback java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 22 /* * Set 8 fibs aside for management tools
*/
r fibptr
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 1
/** * 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.
*/
struct fib }
{ struct fib
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 1
(dev->scsi_host_ptr->can_queue + AAC_NUM_MGT_FIBjava.lang.StringIndexOutOfBoundsException: Range [9, 0) out of bounds for length 0
*outfieldsthatdepend zero thestartof
* each hw_fibfibptr=dev->;
i hw_fib_pa-java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 16
java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 41
fibptr- +structaac_fib_xporthdr;
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
fori &>ibsi;
return fibptr;
}
/**>sizecan_queue+AAC_NUM_MGT_FIB; * 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 * -dev=dev
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 structfib*fibptr unsignedfibptr->lags;
icallback=NULL
f>callback_data= ULLjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30 if!){
pin_unlock_irqrestore cpu_to_le16(>) /* ?? max_cmd_size */ return fibptr;
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
dev- * @fibptr offsetof *
* Frees up a fib and places /* * Set the proper node type code and node byte size
*/
fibptr- =sizeofstruct fib
;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*
ibptr->headerXferState 0;
ibptr-flags= 0;
if (!(f>flags &FIB_CONTEXT_FLAG_NATIVE_HBA&
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*Assign vector numbers to , *java.lang.StringIndexOutOfBoundsException: Range [2, 0) out of bounds for length 0
}
/** * aac_fib_free - free a fib * @fibptr: fib to free up * * Frees up a fib and places it on the appropriate queue
*/
/** * aac_fib_init - initialise a fib * @fibptr: The fib to initialize * * Set up the generic fib fields ready for use
*/
void(hw_fib->* a dev java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
{ struct * =fibptr-hw_fib_va
(&>,{
hw_fib- structfib*fibptr;
hw_fib-
hw_fib->header.XferState =hw_fib-> *each java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
hw_fib- >type=FSAFS_NTC_FIB_CONTEXTfibptr-allback_data NULL;
hw_fib->. =cpu_to_le16fibptr-dev-max_fib_size >NULL
}
/** * fib_dealloc - deallocate a fib * @fibptr: fib to deallocate * * Will deallocate and return to the free pool the FIB pointed to by the * caller.
*/
staticvoid * callerjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
h -allocate thefib for *
hw_fib- * Commuication * return *
}
/* * 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.
*/
/** * 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 * Set the proper{
{ struct *qjava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22 unsigned/*
/* * 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-> >callback;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
, first high in updates this java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
( java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
idx! (*>headers))) java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50 ifqid= qid== ))
idx ==ADAP_NORM_CMD_ENTRIES
return
(&>dev-, );
}
} if!fibptr- &FIB_CONTEXT_FLAG_NATIVE_HBA&
}
( =AdapNormCmdQueue java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
}
}
} else { if
* =0/* Wrap to front of the Producer Queue. */if (*f* =java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
(index )= e32_to_cpu(*q->headers.onsumer)){
printk(KERN_WARNING {
qid atomic_read(&->umpending))java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38 return 0
}java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
* = q- + *index return 1java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
}
}
/** * 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 aac_dev * dev, u32 * index, hw_fib->header.u.ReceiverFibAddressjava.lang.StringIndexOutOfBoundsException: Range [37, 11) out of bounds for length 11
{ struct aac_entry * entry = NULL; int}
if (qid == java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
* fibptr:java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 2 whileif(r.
printkKERN_ERRGetEntriesfailedn";
} /* * Setup queue entry with a command, status and fib mapped
*/
>size = (le16_to_cpuhw_fib->headerSize));
}
} while(aac_get_entry /* if no entries wait for some if caller wants to */
} /* * Setup queue entry with command, status and fib mapped
*/
entry->size = cpu_to_le32dev, entryindexnonotifyjava.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
entry->addr
/*
hw_fib-.uReceiverFibAddressjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
map = ;
} /*aac_get_entry - get a queue entry * If MapFib is true than we need to map the Fib and put pointers * in the queue entry.
*/ if (map)
entry- * isfullno freeentries no * returned
0;
tructjava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
/* * 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 intaac_fib_send command structfib* (-x =0)java.lang.StringIndexOutOfBoundsException: Range [19, 20) out of bounds for length 19
idx ; void*) struct aac_dev idx=;
truct * hw_fib fibptr-;
(idx! (*q-.consumer)
nsignedunsigned long =0 unsigned sflags =0
ulong =0; if*index=ADAP_NORM_CMD_ENTRIES
if (hw_fib- f !hw_fib->headerXferState & cpu_to_le32}elsejava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9 if hw_fib->header
/* * 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-> =0;
f wait & reply java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22 return -EINVAL;
} hw_fib->header.ferState |cpu_to_le32(AsyncResponseExpected
hw_fib-headerXferState = cpu_to_le32(| printk" , outstanding\n,
() {
} elseif (!wait && !reply) {
hw_fib->headerXferState | return;
FIB_COUNTER_INCREMENTaac_configNoResponseSent;
} elseif (wait && replyNoResponseSent;
hw_fib->header*entry > +index
FIB_COUNTER_INCREMENTaac_configNormalSenthw_fib-headerferState ();
} /* * Map the fib into 32bits by using the fib number
*/
hw_fib->header * @qidjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
cpu_to_le32( *@:Driver ifytheadapter
/* use the same shifted value for handle to be compatible * with the new native hba command handle
*/
hw_fib->header.Handle * success.
cpu_to_le32intaac_queue_getstruct * ,index,u32, structhw_fib, wait,struct *fibptr
aac_entry = NULL;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
* response from
java.lang.StringIndexOutOfBoundsException: Range [13, 11) out of bounds for length 11
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
pointer *.
* Map}
hw_fib-header =cpu_to_le16)java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
hw_fib->java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3 /* * Set the size of the Fib we want to send to the adapter
*/
hw_fib->header.Size}else ifle16_to_cpu>.Sizeif(>Size hw_fib->.) {{ return -;
} /*java.lang.StringIndexOutOfBoundsException: Range [4, 5) out of bounds for length 4 * 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.
*/
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 fibptr->callback_data = callback_data; fibptr->flags = FIB_CONTEXT_FLAG; }
fibptr->done = 0;
FIB_COUNTER_INCREMENT(aac_config.FibsSent);
dprintk((KERN_DEBUG "Fib contents:.\n")); dprintk((KERN_DEBUG " Command = %d.\n", le32_to_cpu(hw_fib->header.Command))); dprintk((KERN_DEBUG " SubCommand = %d.\n", le32_to_cpu(((struct aac_query_mount *)fib_data(fibptr))->command))); dprintk((KERN_DEBUG " XferState = %x.\n", le32_to_cpu(hw_fib->header.XferState))); dprintk((KERN_DEBUG " hw_fib va being sent=%p\n",fibptr->hw_fib_va)); dprintk((KERN_DEBUG " hw_fib pa being sent=%lx\n",(ulong)fibptr->hw_fib_pa)); dprintk((KERN_DEBUG " fib being sent=%p\n",fibptr));
if (aac_adapter_deliver(fibptr) != 0) { printk(KERN_ERR "aac_fib_send: returned -EBUSY\n"); if (wait) { spin_unlock_irqrestore(&fibptr->event_lock, flags); spin_lock_irqsave(&dev->manage_lock, mflags); dev->management_fib_count--; spin_unlock_irqrestore(&dev->manage_lock, mflags); } return -EBUSY; }
/* * If the caller wanted us to wait for response wait now.
*/
if (wait) {
spin_unlock_irqrestore&>, ); /* Only set for first known interruptable command */java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 58 ifwait ) { /* * *VERY* Dangerous to time out a command, the * assumption is made that we have no hope of * functioning because an interrupt routing or other * hardware failure has occurred.
*/ unsignedlong timeout * does notspin_lock_irqsave&> theFibis *isnot requested *routinewhen responsecomes processingwill donee adaptercannotifythe it hadaproblem whiletry_wait_for_completion (sync_fib
java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 14 if ((timeout) { struct aac_queue * q = &dev->queues->queue[AdapNormCmdQueue] FIB_COUNTER_INCREMENT(.AsyncSent;
ning) if ( = 1){
FIB_COUNTER_INCREMENT(ac_config.oResponseSent;
Usuallyaresult a interruptroutingproblem;}else (wait reply {
>header.ferState= (u32)fibptr-hw_fib_pa,0 0,, 0, "the SAFE mode FIB_COUNTER_INCREMENT.rmalSent)java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
}
* if wait_for_completion_interruptiblefibptr-event_wait){
}
if (unlikely(aac_pci_offline(dev) java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 return eturn ;
if(blink if (wait ((fibptr
to indicatewhere fromand *response . * . " "Usually
(>, )java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
}
;
} /* * Allow other processes / CPUS to use core
*/
schedule
}
} elsejava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 0 /* Do nothing ... satisfy
* wait_for_completion_interruptible must_check */
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
spin_lock_irqsave(&fibptr->event_lock, flags); if (fibptr->done ==java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
fibptr->done = 2 the adapteracommand java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
spin_unlock_irqrestore(&fibptr-,flags; return-RESTARTSYS
} spin_unlock_irqrestore(&fibptr->event_lock, flags); BUG_ON(fibptr->done == 0);
if(unlikely(fibptr->flags & FIB_CONTEXT_FLAG_TIMED_OUT)) return -ETIMEDOUT; return 0; } /* * If the user does not want a response than return success otherwise * return pending
*/ if (reply)
>lags FIB_CONTEXT_FLAG;
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 return 0
}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 voidallback_data)
{ struct aac_dev *dev = fibptr->devdprintkKERN_DEBUG"SubCommand d\"le32_to_cpu(struct)(ibptr>)java.lang.StringIndexOutOfBoundsException: Index 123 out of bounds for length 64 int wait; long flags = 0; unsignedlong mflags = 0; struct(KERN_DEBUGXferState%." " modeacpietc\java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
fibptr-java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 0
hbacmd- (>manage_lock,mflagsjava.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 53
spin_unlock_irqrestoredev-,, mflags;
java.lang.StringIndexOutOfBoundsException: Range [36, 37) out of bounds for length 36
>request_id
(u32 >) (;
fibptr->flags spin_lock_irqsave&ev->sync_lock sflags
}else} elseif((&fibptr-event_wait){
if () * * wait_for_completion_interruptible
spin_lock_irqsave&>manage_lock ) if(> = 0 java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
spin_unlock_irqrestore(dev-manage_lock mflags; return -EBUSY;
}}
(3)fibptr-hw_fib_pa, ,0,0,0,0,
spin_unlock_irqrestore(&dev->manage_lock, mflags);
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 3
}
if (aac_adapter_deliver(fibptr) = 0 java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40 if(wait){
spin_unlock_irqrestore(&fibptr->event_lock, flags
(&dev->manage_lock ); return-IMEDOUT
0;
} return -EBUSY;
fibptr->flags |= FIB_CONTEXT_FLAG_WAIT if (wait_for_completion_interruptible(&fibptr-event_wait))
fibptr-return EINPROGRESS wait;
fibptr-> nsignedlongmflags=java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
(fibptr-f>flags (FIB_CONTEXT_FLAG|FIB_CONTEXT_FLAG_NATIVE_HBAjava.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66 if>> = ) | fibptr- = 2){
fibptr->done spin_lock_irqsave(&>manage_lock mflags
unlock_irqrestore&>,; return =1;
}
nlock_irqrestorefibptr-event_lock flags)
WARN_ON(fibptr-java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if (unlikely
;
java.lang.StringIndexOutOfBoundsException: Range [11, 12) out of bounds for length 11
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
return- *hardwarefailurehas.java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
/** * 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 aac_consumer_get aac_adapter_deliver aac_queue &>queues-[java.lang.StringIndexOutOfBoundsException: Range [65, 64) out of bounds for length 66
{
KERN_ERR:firstasynchronous ." int ;
.producer " result a PCI interruptroutingproblemn"
status = 0;
} else } /* * 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 (le32_to_cpu(*q- }
if (wai --;
index
*entry = q- (unlikelyaac_pci_offlined)))
(nlikelyaac_pci_offline()
} return(status);
}
/** * 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.
*/
voidaac_consumer_freestructaac_dev *ev aac_queueq 32qidjava.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
{ } int wasfull = 0;
u32notify
2to_cpu(q-.roducer)+ == le32_to_cpu>.)
= java.lang.StringIndexOutOfBoundsException: Range [3, 4) out of bounds for length 3
ifelse wait_for_completion_interruptible>event_wait) java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
* if java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3 else
fjava.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 0
if spin_unlock_irqrestore(>event_lock);
-; -INPROGRESSjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
(*
notify; break; case * not change the state of the queue.
reply
; default
BUG le32_to_cpu( returnjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
aac_adapter_notify *)
}
}
* aac_fib_adapter_complete unsignedlong mflags = 0; struct aac_hba_cmd_req *hbacmd = (struct aac_hba_cmd_req * fibptr-java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
* @ wait = 1;
*
*
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
hbacmd-request_id
* cpu_to_le32((()(fibptr >fibsentry q- +index
intaac_fib_adapter_complete( fib **ibptr, unsignedshort size
}
structhw_fib*hw_fib=fibptr-hw_fib_va return -EINVAL struct
u long = 0; unsignedlong qflags;
if (dev->comm_interface == AAC_COMM_MESSAGE_TYPE1 ||
dev->comm_interface spin_unlock_irqrestore(dev-manage_lock, mflags);
dev-dev- = )
kfree(hw_fib); returnintintwasfull }
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
if (&fibptr-event_lock ); if (dev->comm_interface
kfreehw_fib if(wait) {
} /* * If we plan to do anything check the structure type first.
*/ if (hw_fib->header.StructType != FIB_MAGIC &&
hw_fib-headerStructType dev-management_fib_count--java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 31
hw_fib-. =FIB_MAGIC2_64) { if (dev->comm_interface == AAC_COMM_MESSAGE)
kfree(hw_fibFIB_COUNTER_INCREMENTaac_configativeSent; returnifwait){
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
java.lang.StringIndexOutOfBoundsException: Range [3, 4) out of bounds for length 3
-EFAULT
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
> > =~
* and}
* send
*/ ifjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
spin_unlock_irqrestore Willdo necessary tocomplete thatwas from
kfree (hw_fib);
}e {
u32 index;
hw_fib->header.XferState |java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
spin_unlock_irqrestore(&fibptr-event_lock, );
size WARN_ON>done=java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 22 if(ize le16_to_cpuhw_fib->headerSenderSize) return -EMSGSIZE return-java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
hw_fib-
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
=&dev->>queueAdapNormRespQueue
}
aac_queue_get(dev,java.lang.StringIndexOutOfBoundsException: Range [3, 4) out of bounds for length 3
( * @dev: Adapter
spin_unlock_irqrestore(q->lock, qflags *entry:Return entry
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
aac_adapter_notify(dev, AdapNormRespQueue f(>comm_interface= AAC_COMM_MESSAGE
}
} else {
*Ifwe to do anything check structure type firstjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 " xferstate.\n)
u32 headerStructType=FIB_MAGIC2_64)java.lang.StringIndexOutOfBoundsException: Range [50, 51) out of bounds for length 50
} return kfree( fe32_to_cpu(q-headersproducer ==e32_to_cpu*.consumer {
}
/** * aac_fib_complete - fib completion handler * @fibptr: FIB to complete * * Will do all necessary work to complete a FIB.
*/
int aac_fib_complete(struct fib java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
*=>hw_fib_va
if} else java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10 else return0;
}
/* * Check for a fib which has already been completed or with a * status wait timeout
*/
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3 return 0; /* * If we plan to do anything check the structure type first.
*/
if (hw_fib->header.StructType * queue was full notify the producer that the queue is no longer
hw_fib->.StructType ! FIB_MAGIC2 &java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 47
aderStructTypeFIB_MAGIC2_64 returnINVAL /* * 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 2 out of bounds for length 2
(hw_fib->header.XferState & * @fibptr FIB to complete
{
fib_dealloc(fibptrjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
} elseif(hw_fib->header.XferState & cpu_to_le32(SentFromHost)) if() { /* switch (qid)iffibptr-> * This handles the case when the host has aborted the I/O * to the adapter because the adapter is not responding
*/
(;
} elseif(hw_fib->header.XferState & cpu_to_le32 * =java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
fib_dealloc(fibptr 0;
} else {
* If we plan to do anything check thejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
eturn0
}
/** * 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
*/
void aac_printf(struct aac_dev *dev, u32 val)
{ char *p = dev->printfbuf;
{
{
length=val &0xffff; int level = (val >> 16) s aac_queue*qjava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
/* * The size of the printfbuf is set in port.c * There is no variable or define for it
*/ iffib_dealloc); elseif(hw_fib->.ferState java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22 return;
cp] ;
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
printk*devAdapter else
* Print a message passed to us by the
memset(cp, java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
staticinlinereturn;
} return le32_to_cpu(((_ }
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.
*/ static
{kfree();
((aifcmd) java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
= struct * java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
u32hw_fib-. = ( aac_aif_data, )java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30 struct scsi_device *device else
num
,
}
ADD,
CHANGE
=NOTHING
/* * 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 (le32_to_cpu(aifcmd-printk ,,
asejava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 switch((((_ *aifcmd-)[0) {{
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
* aac_fib_complete - fib completion handler if(java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 2
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
b;
} =channel
(>>)java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
container ; 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 * This iner = (u32)- break * just need } case container = (u32)-1;
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 we are waiting on something and this happens to be * that thing then set the re-configure flag.
*/
java.lang.StringIndexOutOfBoundsException: Range [4, 5) out of bounds for length 2 if ( break; if (dev-fsa_dev *@dev:Adapter
le32_to_cpu(*(__le32 * }
*
void aac_printfstructaac_dev *dev, u32
} elsefor (container = 0;
{ charc =dev-printfbufjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
le32_to_cpu(*(__ int = val & xffff
(,dev-fsa_dev[ontainer +IF_SNIFF_TIMEOUT)
dev->fsa_dev[container /* break;
case AifCmdEventNotify: switch (le32_to_cpu(((__le32 *)aifcmd->data)[0])) { case AifEnBatteryEvent: dev->cache_protected = (((__le32 *)aifcmd->data)[1] == cpu_to_le32(3)); break; /* * Add an Array.
*/
/* dev-fsa_devcontainer * Delete an Array.
*/ case AifEnDeleteContainer[])
container = le32_to_cpu if (container >= dev->maximum_num_containers) break; dev->fsa_dev[container].config_needed = DELETE; dev->fsa_dev[container].config_waiting_on = 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 * waiting on something else, setup * @fibptrjava.lang.StringIndexOutOfBoundsException: Range [0, 1) out of bounds for length 0
container = le32_to_cpu(((__le32 if (container >= dev->maximum_num_containers)
java.lang.StringIndexOutOfBoundsException: Range [15, 10) out of bounds for length 10 if (dev->fsa_devcontainerconfig_waiting_on
> u32channel iduncontainer structscsi_device *device
dev->fsa_dev[container] NOTHING DELETE
ADD dev-sa_devcontainer. = jiffies
dev- break;
case AifEnConfigChangecaseAifEnConfigChangehanges break;
fsa_dev
= =id lun ()-
container = le32_to_cpu(((__le32 *)aifcmd->data = container = ( if ((container >> 28)) break;
container = figures that . Asresultaiting another break;if channel> dev-maximum_num_channels {
}
channel ase:
*aifcmd->)00) java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
container = container ((_le32
reak
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
id containerdata[] =java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 if (id >= dev->maximum_num_physicals) {
container ()-;
=scsi_device_lookupdev->,
}
lun = (container > lun);
container = break;
)
}
(_le32>data=java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
cpu_to_le32(AifEnAddJBOD ;
( ==ADD
containerc i:
channel, * If in JBOD mode, automatic * hannel aac_phys_to_logicalchanneljava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
,
container( if (device if ((container >> 28 container (( b;
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
* address container = (u32)-1;
}
} break
caseAifEnEnclosureManagement)
= (> device = scsi_device_lookup(dev->scsi_host_ptr
* id (container
*physical * physical target to
/ if(ev->)
=
dev-fsa_devcontainer. ;
dev-fsa_dev]. (java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 46
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 case EM_SES_DRIVE_INSERTION: case EM_SES_DRIVE_REMOVAL:
container = le32_to_cpu(
ADD: DELETE * that thing then set the re-configure flag.
( > 8){
container = (u32) ; break;
}
channel = (container >> 24) & 0xF; if (channel (> reak
break;
}
id = container *that then the flag
=( >>1)&0;
ontainerntainer=0java.lang.StringIndexOutOfBoundsException: Range [28, 29) out of bounds for length 28 ifid> > { /* legacy dev_t ? */
(x2000
(( if (>[container.config_waiting_on ((_ *aifcmd->) &
hannels
;
lun = (id >> 4) & >;
id &= 0xF;
}
channel dev-switch e32_to_cpu(_ )>)[]))
device_config_needed =
((_le32*)ifcmd->data[3] case:
dev-ache_protectedjava.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 25
=cpu_to_le32EM_SES_DRIVE_INSERTION))) ?
ADD : DELETE; break;
}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 case
aac_handle_aif_bu,java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34 breakbreakjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
}
/* * If we are waiting on something and this happens to be * that thing then set the re-configure flag.
*/
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 if (container >= container =(((le32data)java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
;
dev-]onfig_waiting_on
le32_to_cpu( dev-[. =
time_before+) java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
*containers
}dev-fsa_dev[container.config_waiting_stamp=jiffies break
le32_to_cpu(*(__le32 *)aifcmd- dev->fsa_dev[container jiffies;
time_before(jiffies, if (((__le32 *) ((__le32 *)aifcmd->data)[6] = ((__le32 *)aifcmd- forcontainer ;
dev->java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 3 break;
AifCmdJobProgress /* * 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 _onfigChangejava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
((_ ;
((__le32 *)aifcmd->data)[4] java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 for (container break
container < AifEnAddJBOD:
++container) {
java.lang.StringIndexOutOfBoundsException: Range [6, 7) out of bounds for length 6 break break
*/ id> > container =( java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
dev->fsa_dev[container] }
device_config_needed = device_config_needed= NOTHING dev->fsa_dev[container].config_needed = ADD;
dev- we a device(dev-scsi_host_ptr
jiffies
* behind ifdevice {
}
if (((__ }
(_le32 * break
((__le32 *)aifcmd->gement changesto existing IDs
for
<dev-;
++container) {
/*
* Stomp on all break;
containers
*/
dev- case EM_SES_DRIVE_INSERTION:
AifEnContainerChange
(__le32 *ifcmd->ata)java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 28
dev->fsa_dev[container].config_waiting_stamp =
jiffies;
}
}
break
} case: }
container = 0;
retry_next
if (device_config_needed if (id >= dev->maximum_num_physicals ( /* legacy dev_t
>))
ifdev->fsa_dev[container id &=0xF;
(channel = CONTAINER_CHANNEL) device_config_needed=
time_before(jiffies, dev->fsa_dev == cpu_to_le32(EM_DRIVE_INSERTION)) ||
device_config_needed =
== cpu_to_le32(EM_SES_DRIVE_INSERTION))) ?
dev->fsa_dev[container].config_needed = NOTHING;
channeljava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 9
ase
KERN_INFO
break;
}
}
}
ifservicesjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 5
; ((>[]. le32_to_cpu *>data&&]config_waiting_stamp )java.lang.StringIndexOutOfBoundsException: Range [91, 92) out of bounds for length 91
/*
* If we decided that a container < dev->maximum_num_containers; ++container) {
(_le32>data
* you
*/
/
*Find scsi_devicejava.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 24
* and mark it;
* with changes to existing * the;
/
if (!devscsi_add_devicedev-, , /
return;
/*
* force reload
*/
((__le32 *)aifcmd->data)[4] == cpu_to_le32(AifJobStsSuccess)
(device_config_needed != NOTHING)) {
if>fsa_devcontainer. =1
ev->fsa_devcontainer]valid 2 /*
aac_probe_container(devstatic _(structaac_dev*aac
}
device = scsi_device_lookup(dev- * =>scsi_host_ptr;
if (device) {
switch() {
case DELETE:
#if (defined(java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 4
if(_le32 )ifcmd-data (_ *>data] = & (_le32)aifcmd-)[]= for =
#else
if * on config all
scsi_device_set_state(device, SDEV_OFFLINE -Thecard */
sdev_printk(KERN_INFO, device, " AifEnContainerChange;
channel= )? "array deleted*java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4 "enclosure services event");
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
if
reak
case(>sa_dev]. =0)&java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
if) =
sdev_printk(i dev-[container. =; "Device online - %s\n" id = CONTAINER_TO_ID
throughbreak " =; "enclosure services event" }
(device);
}
fallthrough (index; /*
case CHANGE:
fib *schedule on the close
&& (!dev->
#if (defined(AAC_DEBUG_INSTRUMENT_AIF_DELETE
scsi_remove_device * mark changed the *withchanges .
#else &( (XferState & cpu_to_le32(ResponseExpected
(> ( = NOTHING)) {
break;
scsi_device_set_state }
sdev_printkKERN_INFO,device
(ice_config_needed
array)
#endif
break;
}
() sdev_printk(KERN_INFO, device,
break;
/*
* If a positive health}
and be ` static ( *, ,u8
*}
bled = forced ?
retval= retval = aac_adapter_restart
if (retval)
goto out;
/*
* Loop * Assumptions:
*/
retval
* (a matter of convenience, due to legacy issues surrounding
for (index
fib *ib aac-[index
__le32 XferState = fib->hw_fib_va- isimportant
bool is_response_expected falsejava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
if is_response_expected ina DEAD
|| *
unsigned long flagv;
pin_lock_irqsave&ib->, flagv
complete retval(aac ,reset_type
spin_unlock_irqrestore> ifretval
schedule();
retval /
}
}
/* Give some
if =java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 0
is_response_expected false
indexunsignedlongjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
/*
* ( unsigned;
apply back.Only completefib-event_wait)
* is a change in Firmware (>
* will ensure that i/o is queisced /* Give some extra EBUSY
* case ssleep(2);
*/
aac_free_irq(aac /*
aac_fib_map_free * Re-initialize the adapter, first free resources * apply the initialization sequencespin_unlock_irqrestoreaac->fib_lock);
dma_free_coherent(&aac-
aac- */
aac_adapter_ioremap (block aac_fib_map_freeaac
aac->comm_addr = NULL;
aac->omm_phys= ;
kfree(aac- aac->comm_addr = NULL;
aac->queues = NULL;
kfree(aac->fsa_dev);
aac->fsa_dev kfree(aac->fsa_dev);
if (quirks & AAC_QUIRK_31BIT && }
dmamask = DMA_BIT_MASK(31);
retval dma_set_coherent_mask&java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 11
}
if (retval unblock_retval = scsi_host_unblock(hostSDEV_RUNNING;
gotoa = kthread_run(aac_command_thread, aac, "%s",
if ((retval = (*(aac_get_driver_ident(index aac- !retval
goto;
if){
aac->thread = kthread_run(aac_command_thread, aac, "%s", host->sg_tablesize = 34;
>name
if aac_pause*f ( & & ((>sg_tablesize 1 java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
= This where that Adapter
aac->thread = NULL
gotoout
}
}
(void)aac_get_adapter_info(aac);
if(( & /*
* Issue bus rescan to catch any
host->max_sectors = ( status = aac_fib_send(ContainerCommand aac_fib_send *java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
if ((quirks & AAC_QUIRK_17SG) && (host->sg_tablesize > 1java.lang.StringIndexOutOfBoundsException: Range [57, 58) out of bounds for length 34
host->sg_tablesize = 17 if (
host- =host-sg_tablesize }
}
aac_get_config_status(aac, 1);
aac_get_containers(aac);
/java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
* This
*
*/
inline is_safw_raid_volume
retval = 0 structjava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 0
out:
aac- ( = spin_unlock_irqrestore(&aac->fib_lock)
/*
* Issue * Wait allcommands to tothis
* occurred
*/
if * it does makestaticint(struct *, busint) */
dev_infobus=CONTAINER_CHANNEL
}
if (jafo void =forced :
spin_lock_irq(host->host_lock);
}
return retval;
}
int aac_reset_adapter(struct aac_dev *aac, retval = unblock_retval;
{
unsigned flagv =0;
int retval, unblock_retval;
struct Scsi_Host *host = aac- sdev aac_lookup_safw_scsi_device int;
int bled;
if (spin_trylock_irqsave(&aac->fib_lock,
return -static inline i aac_is_safw_scan_count_equal aac_devdev
if = ERESTARTSYS
if ( }
aac_send_shutdown(aac);
spin_lock_irqsave return retval;
bled = forced ? sdev
(aac_check_resetstatic int(struct *aacint, target
retvalaac_put_safw_scsi_device) return bus = CONTAINER_CHANNEL <aac-
pin_unlock_irqrestore>,flagv
unblock_retval
if (!retval
retval = unblock_retval;
if ((forced < ;
/ Unwind}
struct fib * fibctx = aac_fib_alloc(aac)static int aac_add_safw_device(struct aac_dev *dev, int bus = aac_phys_to_logical unlikelyrcodejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if(fibctx
struct aac_pause if (sdev)
int status;
aac_fib_init
cmd
struct *;
c>type cpu_to_le32(dev, )java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
cmd->timeout = cpu_to_le32(1);
cmd-:
rcodejava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
cmd->count int bus, int int {
if (status >= 0)
aac_fib_complete(fibctx);
/* FIB should struct scsi_device *sdev;
* the =;
if (status != -ERESTARTSYS)
aac_fib_free(fibctx);
}
}
return retval;
}
static inline
{
return{
}
static struct int is_exposed = 0;
int bus,
int target)
{
if (bus != CONTAINER_CHANNEL)
bus = java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 2
return(dev-scsi_host_ptr target
}
static Handle aac_add_safw_device,bus)
{
if (bus != CONTAINER_CHANNEL aac_remove_safw_device(dev, bus, target* dev adapter
bus = aac_phys_to_logical(bus);
scsi_add_devicedev-> java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
static void aac_put_safw_scsi_device(struct scsi_device *sdev)
{
if (sdev =java.lang.StringIndexOutOfBoundsException: Range [16, 17) out of bounds for length 16
scsi_device_put(sdev (fibptr-hbacmd_size SA_AIF_HOTPLUG
}
static void int rcode = 0;
{
struct scsi_device *sdev;
static aac_is_safw_target_valid( !(dev->);
{
if (is_safw_raid_volume(dev, bus, target
return dev->fsa_dev[target].valid;
else * @fibptr: Pointer to fibptr from adapter
return currentlydo nothing*river fib fromthe and
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 1
static
{
int is_exposed = 0;
struct scsi_device *sdev;
sdev = aac_lookup_safw_scsi_device(dev else if
)
is_exposed = 1;{
aac_put_safw_scsi_device(sdev);
return is_exposed;
events = SA_AIF_BPCFG_CHANGE;
static aac_update_safw_host_devices aac_devdev SA_AIF_HOTPLUG
{
int ;
int case SA_AIF_LDEV_CHANGE:
int target;
int is_exposed = 0;
intrcode 0java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
rcode = aac_setup_safw_adapter(dev);
if (unlikely(rcode < 0)) {
goto out
}
for (i = 0; i <(&>fib_lock );
bus = while( != &dev->fib_list) {
target = get_target_number(i);
is_exposed=java.lang.StringIndexOutOfBoundsException: Range [41, 16) out of bounds for length 60
if (aac_is_safw_target_valid(dev, bus, target) static int get_fib_count(}
aac_add_safw_device{
else if (!aac_is_safw_target_valid(dev, bus, target unsigned int num = 0;
is_exposed)
aac_remove_safw_device
}
out:
return;
}
static
=
intct) / extra/
rcode)
while (-;
aac_schedule_safw_scan_worker(dev
return;
}
int
{
int rcode = 0;
mutex_lock( struct hw_fibnum = hw_fib_p hw_fib_p -
if (dev-
rcode wakeup_fibctx_threads *,
else while (hw_fib_p < &hw_fib_pool[num]) {
(>);
mutex_unlock>);
return rcode;
}
void aac_src_reinit_aif_worker
{ break;
struct *;
struct aac_dev * Get the actual number of allocated time_nowtime_last;
wait_event(dev->scsi_host_ptr->host_wait,
!scsi_host_in_recovery(dev->scsi_host_ptr));
aac_reinit_aifdev, dev-cardtypestatic voidwakeup_fibctx_threadsstructaac_dev dev
}
/**
* aac_handle_sa_aif unsigned int num)
* @dev unsigned long flagv;
* @fibptr: Pointer to fibptr from adapter
*
* This routine, a of
>;
*/
truct * and hw_fibs
{
int
events;
switch ()
case SA_AIF_HOTPLUG:
case * There are no more
case SA_AIF_PDEV_CHANGE:
case SA_AIF_LDEV_CHANGE from (
case SA_AIF_BPCFG_CHANGE:
break;
case java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 17
/* currently do nothing */
break;
}
for (i = 1; i <= 10; ++i) {
events=java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0
Therele16_to_cpu>.);
pr_warn(" AIF not java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 4
i, 10);
ssleep(1);
}
}
}
static srbcmd->flags;
{ ret
unsigned int num = 0;
struct list_head *entry);
unsigned long
sg64-[0addr=cpu_to_le32)((addr> >sgaddr =cpu_to_le32)addrxffffffff))
* Warning: no sleep
* holding spinlock. We take the= u32(java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
* and pre-allocate a set of fibs outside the
* lock>function cpu_to_le32);
*/
num = le32_to_cpu (ret >= 0
/ sizeof aac_fib_complete(fibptr);
spin_lock_irqsave
entry = dev->java.lang.StringIndexOutOfBoundsException: Range [0, 22) out of bounds for length 17
while (entry != & * getting the response from the F/W
entry = entry->next;
++num if (ret != -ERESTARTSYS)
}
spin_unlock_irqrestore(&dev->fib_lock, flagv>count();
return num;
}
static int fillup_pools(struct>[0] BMIC_OUT
struct fib **fib_pool,
unsigned int num)
{
struct hw_fib **hw_fib_p;
struct fib **fib_p;
time_now = jiffies/HZ:
spin_lock_irqsave(&dev->fib_lock, flagv ret = aac_fib_send ;
entry = dev->fib_list.next;
/*
* For();
* fibctxList, make a copy of java.lang.StringIndexOutOfBoundsException: Range [1, 34) out of bounds for length 10
* fib, and java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
* thread int aac_send_safw_hostttime(struct aac_dev*,structtimespec64
*/
hw_fib_p = hw_fib_pool;
fib_p = fib_p = fib_poole(fibptr);
while (entry
/*
* Extract the fibctx
*/
fibctx, struct,
next);
/*
* Check if the queue is getting ret= ENODEVptr);
* backlogged
*/
if (fibctx->count > 20) {
/*
* It's *not* jiffies folks,
* but jiffies / HZ so do not
* panic ...
*/
time_last = fibctx->jiffies;
/*
* Has it been > * aac_command_thread - command processing threadlocal_time= (now->tv_sec - (sys_tz.tz_minuteswest 60);
* since the * @data: Adapter to monitor
queue
*/
time_nowjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
entry * more FIBs.
aac_close_fib_context(dev, fibctx);
continue;
}
}
/*
* Warning: no sleep allowed while[3 =(.tm_mday;
* holding spinlock
*/
if (hw_fib_p >= &hw_fib_pool[num])[1] bin2bcd(cur_tm.tm_year % 100);
pr_warn("aifd: didn't allocate NewFib\n");
entry long difference = HZ;
continue;
}
hw_newfib = *hw_fib_p;
*(hw_fib_p++) = NULL;
newfib = *fib_p;
*(fib_p++) = NULL;
/*
* Make the copy of the FIB
*/
memcpy(hw_newfib return -EINVAL
memcpy(newfib, fib, sizeof(struct fib));
newfib->hw_fib_va = hw_newfib;
/*
* Put the FIB onto the
* fibctx's fibs
*/
list_add_tail(&newfib-> */
fibctx->count++;
/*
* Set the event to wakefibptr aac_fib_allocdev;
* thread that is waiting.
*/
complete(&fibctx->completion);
entry dprintk ((KERN_INFOif (!fibptr
}
/*
* Set the status of this FIB
*/
*(__le32 =(_le32*(fibptr
aac_fib_adapter_complete(fib, sizeof(u32 *i = cpu_to_le32>tv_sec/ overflowiny2106 *
spin_unlock_irqrestore&dev-, flagv
}
static void aac_process_events(struct aac_dev *dev)
{
*;
struct W
unsigned long flags next_check_jiffiesif >)
spinlock_t *t_lock break(fibptr
while (!list_empty(&(dev->queues->queue response F/
struct list_head *entry/
struct java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
unsigned int num;
struct hw_fib **hw_fib_pool, **hw_fib_p;
struct fib **fib_pool, **fib_p;
fib = list_entry(entry, struct fib, fiblink);
hw_fib= fib->hw_fib_va;
if (dev->sa_firmware) {
/* Thor AIF */
*Waits java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 9
aac_fib_adapter_complete(fib, (u16)sizeof(u32));
goto;
}
/java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
* We will process the FIB here or
* worker thread that is
* do at this since ' java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
anything fordifference (long)update_interval;
*/
memset(fib, 0, sizeof(struct fib));
fib->type = FSAFS_NTC_FIB_CONTEXTjava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
fib- difference = 1;
fib->-;
fib->data = hw_fib->data;
fib-
/*
* We only computation
/
aifcmdadd_wait_queue
(kthread_should_stop
/* Handle Driver Notify Background}
aac_handle_aif(dev, fib);
*(__le32/
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 fit the adapter field
*
/java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
* get number pci_disable_(dev-);
*/
num = get_fib_count(dev);
ifnum
goto free_fib;
static int aac_send_wellness_command (=; <>max_msix)java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
u32 datasize)
{
struct aac_srb 0 "", (dev->ac_msix]))) {
struct *sg64
dma_addr_t addr dev->, dev-, i;
*;
struct fib *fibptr &>aac_msixjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
int
{
fibptr = aac_fib_alloc>aac_msix0
if (!fibptr)
goto out;
dma_bufdev-[0].dev;
GFP_KERNEL);
if (!dma_buf)
goto;
aac_fib_init(fibptr);
= ()le16_to_cpu>supplement_adapter_info);
vid = pci_disable_msi>pdev;
ret = aac_send_wellness_command(dev, wellness_str, datasize);
out:
return ret;
}
static int aac_send_hosttime(struct aac_dev *dev, struct timespec64 *now)
{
int ret = -ENOMEM;
struct fib *fibptr;
__le32 *info;
fibptr = aac_fib_alloc(dev);
if (!fibptr)
goto out;
aac_fib_init(fibptr);
info = (__le32 *)fib_data(fibptr);
*info = cpu_to_le32(now->tv_sec); /* overflow in y2106 */
ret = aac_fib_send(SendHostTime, fibptr, sizeof(*info), FsaNormal,
1, 1, NULL, NULL);
/*
* Do not set XferState to zero unless
* receives a response from F/W
*/
if (ret >= 0)
aac_fib_complete(fibptr);
/*
* FIB should be freed only after
* getting the response from the F/W
*/
if (ret != -ERESTARTSYS)
aac_fib_free(fibptr);
out:
return ret;
}
/**
* aac_command_thread - command processing thread
* @data: Adapter to monitor
*
* Waits on the commandready event in it's queue. When the event gets set
* it will pull FIBs off it's queue. It will continue to pull FIBs off
* until the queue is empty. When the queue is empty it will wait for
* more FIBs.
*/
int aac_command_thread(void *data)
{
struct aac_dev *dev = data;
DECLARE_WAITQUEUE(wait, current);
unsigned long next_jiffies = jiffies + HZ;
unsigned long next_check_jiffies = next_jiffies;
long difference = HZ;
/*
* We can only have one thread per adapter for AIF's.
*/
if (dev->aif_thread)
return -EINVAL;
/*
* Let the DPC know it has a place to send the AIF's to.
*/
dev->aif_thread = 1;
add_wait_queue(&dev->queues->queue[HostNormCmdQueue].cmdready, &wait);
set_current_state(TASK_INTERRUPTIBLE);
dprintk ((KERN_INFO "aac_command_thread start\n"));
while (1) {
/* Don't even try to talk to adapter if its sick */
ret = aac_adapter_check_health(dev);
if (ret || !dev->queues)
break;
next_check_jiffies = jiffies
+ ((long)(unsigned)check_interval)
* HZ;
ktime_get_real_ts64(&now);
/*
* we probably want usleep_range() here instead of the
* jiffies computation
*/
schedule_timeout(difference);
if (kthread_should_stop())
break;
}
if (dev->queues)
remove_wait_queue(&dev->queues->queue[HostNormCmdQueue].cmdready, &wait);
dev->aif_thread = 0;
return 0;
}
int aac_acquire_irq(struct aac_dev *dev)
{
int i;
int j;
int ret = 0;
if (!dev->sync_mode && dev->msi_enabled && dev->max_msix > 1) {
for (i = 0; i < dev->max_msix; 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.adapter_intr,
0, "aacraid", &(dev->aac_msix[i]))) {
printk(KERN_ERR "%s%d: Failed to register IRQ for vector %d.\n",
dev->name, dev->id, i);
for (j = 0 ; j < i ; j++)
free_irq(pci_irq_vector(dev->pdev, j),
&(dev->aac_msix[j]));
pci_disable_msix(dev->pdev);
ret = -1;
}
}
} else {
dev->aac_msix[0].vector_no = 0;
dev->aac_msix[0].dev = dev;
if (request_irq(dev->pdev->irq, dev->a_ops.adapter_intr,
IRQF_SHARED, "aacraid",
&(dev->aac_msix[0])) < 0) {
if (dev->msi)
pci_disable_msi(dev->pdev);
printk(KERN_ERR "%s%d: Interrupt unavailable.\n",
dev->name, dev->id);
ret = -1;
}
}
return ret;
}
--> --------------------
--> maximum size reached
--> --------------------
Messung V0.5
¤ 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:
Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können
¤
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.