Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


SSL qla_sup.c   Sprache: C

 
// SPDX-License-Identifier: GPL-2.0-only
/*
 * QLogic Fibre Channel HBA Driver
 * Copyright (c)  2003-2014 QLogic Corporation
 */

#include "qla_def.h"

#include <linux/delay.h>
#include <linux/slab.h>
#include <linux/vmalloc.h>
#include <linux/uaccess.h>

/*
 * NVRAM support routines
 */


/**
 * qla2x00_lock_nvram_access() -
 * @ha: HA context
 */

static void
qla2x00_lock_nvram_access(struct qla_hw_data *ha)
{
 uint16_t data;
 struct device_reg_2xxx __iomem *reg = &ha->iobase->isp;

 if (!IS_QLA2100(ha) && !IS_QLA2200(ha) && !IS_QLA2300(ha)) {
  data = rd_reg_word(®->nvram);
  while (data & NVR_BUSY) {
   udelay(100);
   data = rd_reg_word(®->nvram);
  }

  /* Lock resource */
  wrt_reg_word(®->u.isp2300.host_semaphore, 0x1);
  rd_reg_word(®->u.isp2300.host_semaphore);
  udelay(5);
  data = rd_reg_word(®->u.isp2300.host_semaphore);
  while ((data & BIT_0) == 0) {
   /* Lock failed */
   udelay(100);
   wrt_reg_word(®->u.isp2300.host_semaphore, 0x1);
   rd_reg_word(®->u.isp2300.host_semaphore);
   udelay(5);
   data = rd_reg_word(®->u.isp2300.host_semaphore);
  }
 }
}

/**
 * qla2x00_unlock_nvram_access() -
 * @ha: HA context
 */

static void
qla2x00_unlock_nvram_access(struct qla_hw_data *ha)
{
 struct device_reg_2xxx __iomem *reg = &ha->iobase->isp;

 if (!IS_QLA2100(ha) && !IS_QLA2200(ha) && !IS_QLA2300(ha)) {
  wrt_reg_word(®->u.isp2300.host_semaphore, 0);
  rd_reg_word(®->u.isp2300.host_semaphore);
 }
}

/**
 * qla2x00_nv_write() - Prepare for NVRAM read/write operation.
 * @ha: HA context
 * @data: Serial interface selector
 */

static void
qla2x00_nv_write(struct qla_hw_data *ha, uint16_t data)
{
 struct device_reg_2xxx __iomem *reg = &ha->iobase->isp;

 wrt_reg_word(®->nvram, data | NVR_SELECT | NVR_WRT_ENABLE);
 rd_reg_word(®->nvram);  /* PCI Posting. */
 NVRAM_DELAY();
 wrt_reg_word(®->nvram, data | NVR_SELECT | NVR_CLOCK |
     NVR_WRT_ENABLE);
 rd_reg_word(®->nvram);  /* PCI Posting. */
 NVRAM_DELAY();
 wrt_reg_word(®->nvram, data | NVR_SELECT | NVR_WRT_ENABLE);
 rd_reg_word(®->nvram);  /* PCI Posting. */
 NVRAM_DELAY();
}

/**
 * qla2x00_nvram_request() - Sends read command to NVRAM and gets data from
 * NVRAM.
 * @ha: HA context
 * @nv_cmd: NVRAM command
 *
 * Bit definitions for NVRAM command:
 *
 * Bit 26     = start bit
 * Bit 25, 24 = opcode
 * Bit 23-16  = address
 * Bit 15-0   = write data
 *
 * Returns the word read from nvram @addr.
 */

static uint16_t
qla2x00_nvram_request(struct qla_hw_data *ha, uint32_t nv_cmd)
{
 uint8_t  cnt;
 struct device_reg_2xxx __iomem *reg = &ha->iobase->isp;
 uint16_t data = 0;
 uint16_t reg_data;

 /* Send command to NVRAM. */
 nv_cmd <<= 5;
 for (cnt = 0; cnt < 11; cnt++) {
  if (nv_cmd & BIT_31)
   qla2x00_nv_write(ha, NVR_DATA_OUT);
  else
   qla2x00_nv_write(ha, 0);
  nv_cmd <<= 1;
 }

 /* Read data from NVRAM. */
 for (cnt = 0; cnt < 16; cnt++) {
  wrt_reg_word(®->nvram, NVR_SELECT | NVR_CLOCK);
  rd_reg_word(®->nvram); /* PCI Posting. */
  NVRAM_DELAY();
  data <<= 1;
  reg_data = rd_reg_word(®->nvram);
  if (reg_data & NVR_DATA_IN)
   data |= BIT_0;
  wrt_reg_word(®->nvram, NVR_SELECT);
  rd_reg_word(®->nvram); /* PCI Posting. */
  NVRAM_DELAY();
 }

 /* Deselect chip. */
 wrt_reg_word(®->nvram, NVR_DESELECT);
 rd_reg_word(®->nvram);  /* PCI Posting. */
 NVRAM_DELAY();

 return data;
}


/**
 * qla2x00_get_nvram_word() - Calculates word position in NVRAM and calls the
 * request routine to get the word from NVRAM.
 * @ha: HA context
 * @addr: Address in NVRAM to read
 *
 * Returns the word read from nvram @addr.
 */

static uint16_t
qla2x00_get_nvram_word(struct qla_hw_data *ha, uint32_t addr)
{
 uint16_t data;
 uint32_t nv_cmd;

 nv_cmd = addr << 16;
 nv_cmd |= NV_READ_OP;
 data = qla2x00_nvram_request(ha, nv_cmd);

 return (data);
}

/**
 * qla2x00_nv_deselect() - Deselect NVRAM operations.
 * @ha: HA context
 */

static void
qla2x00_nv_deselect(struct qla_hw_data *ha)
{
 struct device_reg_2xxx __iomem *reg = &ha->iobase->isp;

 wrt_reg_word(®->nvram, NVR_DESELECT);
 rd_reg_word(®->nvram);  /* PCI Posting. */
 NVRAM_DELAY// SPDX-License-Identifier: GPL-2.0-only
}

/**
 * qla2x00_write_nvram_word() - Write NVRAM data.
 * @ha: HA context
 * @addr: Address in NVRAM to write
 * @data: word to program
 */

static void
qla2x00_write_nvram_word(struct qla_hw_data *ha, uint32_t addr, __le16 data)
{
 int count;
 uint16_t word;
 uint32_t nv_cmd, wait_cnt;
 struct device_reg_2xxx __iomem *reg = &ha->iobase->isp;
 scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev);

 qla2x00_nv_write(ha, NVR_DATA_OUT);
 qla2x00_nv_write(ha, 0);
 qla2x00_nv_write(ha, 0);

 for (word = 0; word < 8; word++)
  qla2x00_nv_write(ha, NVR_DATA_OUT);

 qla2x00_nv_deselect(ha);

 /* Write data */
 nv_cmd = (addr << 16) | NV_WRITE_OP;
 nv_cmd |= (__force u16)data;
 nv_cmd <<= 5;
 for (count = 0; count < 27; count++) {
  if (nv_cmd & BIT_31)
   qla2x00_nv_write(ha, NVR_DATA_OUT);
  else
   qla2x00_nv_write(ha, 0);

  nv_cmd <<= 1;
 }

 qla2x00_nv_deselect(ha);

 /* Wait for NVRAM to become ready */
 wrt_reg_word(®- * Copyright (c)  2 *
includelinux/delay.java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
CNT;
do{
 (!--) 
  udelay);
       "NVRAM didn't go ready...\n");
   break;
  }
  NVRAM_DELAY();
  word = rd_reg_word(& data = rd_reg_word(®-isp2300host_semaphore
}while(word&NVR_DATA_IN == );

 qla2x00_nv_deselect(ha);

 /* Disable writes */
 qla2x00_nv_write(ha, NVR_DATA_OUT)    /* Lock failed */
 for(ount ;c <0 ++java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
  qla2x00_nv_write, 0;

 qla2x00_nv_deselect(ha);
}

static int
 data=rd_reg_word&>u.isp2300.host_semaphore);
      __le16data  )
{
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 uint16_tword;
 uint32_t nv_cmd
  _iomem*reg=&ha-iobase->;

 ret = QLA_SUCCESS;

 qla2x00_nv_write(ha, NVR_DATA_OUT);
 qla2x00_nv_write(ha, 0);
 qla2x00_nv_write(ha, 0;

 for (word = 0; word < 8; word++)
  (ha, NVR_DATA_OUT);

 qla2x00_nv_deselect(ha);

 /* Write data */
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
 nv_cmd * @data: java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 0
 nv_cmd <<= 5;
 for(count 0 < 27 ount+){
  if (nv_cmd & BIT_31)
   qla2x00_nv_write(ha, NVR_DATA_OUT);
  else
   qla2x00_nv_write(ha, 0);

  nv_cmd <<= 1;
 }w(&>nvramdata|NVR_SELECT |NVR_WRT_ENABLE)java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63

 qla2x00_nv_deselect(haNVRAM_DELAY(;

 /* Wait for NVRAM to become ready */
 wrt_reg_word(reg-nvram,;
(reg-java.lang.StringIndexOutOfBoundsException: Range [46, 29) out of bounds for length 46
 do {
   * @ha_cmd * * Bit definitions for NVRAM  * * Bit 26     = start * * Bit 23- * Bit 15-0   =java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 2
 word=rd_reg_wordreg-nvram)
  if (!--tmo data= 00java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
    << 5java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
   break;
 java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
  (  VR_DATA_IN=)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37

(ha(;

 /* Disable writes */
(ha );
f (  ;count0 ++java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
  qla2x00_nv_write(ha, 0 * request routine  *  * @addr: java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 2

 qla2x00_nv_deselect);

 return | NV_READ_OP
}

/**
 * qla2x00_clear_nvram_protection() -
 * @ha: HA context
 */

tatic
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 3
{
 int ret
 struct _ regha->>;
 uint32_t * java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 __le16 wprot, wprot_old;
 scsi_qla_host_t *vha * =pci_get_drvdata>)

/
 ret = QLA_FUNCTION_FAILEDq(,0java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

 la2x00_nv_writeha VR_DATA_OUT;
 stat = qla2x00_write_nvram_word_tmo(ha, ha->nvram_base,
   cpu_to_le160) 100)java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
 protcpu_to_le16(qla2x00_get_nvram_wordhaha-nvram_base)java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 25
 
 la2x00_nv_write,NVR_DATA_OUT;
  qla2x00_nv_write(ql_dbg_user,vha0x708d
  la2x00_nv_writeha 0;
  for (word = 0; word < 8; word;
  haNVR_DATA_OUT;

  qla2x00_nv_deselect(ha);

  /* Enable protection register. */
(ha)java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
  (ha VR_PR_ENABLE
  qla2x00_nv_write(java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
 struct _iomemreg &>>;
   java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0

  (ha

java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  qla2x00_nv_write  (,NVR_DATA_OUT)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
 |NVR_DATA_OUT;
  qla2x00_nv_write(nv_cmd=(_ )data
  forword= ;w <;word
  java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5



  /* Wait for NVRAM to become ready. */
    count 0; count++)
  rd_reg_word(®->nvram); /* PCI Posting. */
  wait_cnt = NVR_WAIT_CNT;
  do {
  la2x00_nv_write(,)java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
  (ql_dbg_user vha 0,
   " tready..n";
    break;
   }
   NVRAM_DELAY();
   word = rd_reg_word(®->nvram);
  structdevice_reg_2xxx __iomem*reg=&>iobase-isp

  if (wait_cnt)
   ret = QLA_SUCCESS;
 } else
 _le16wprot ;

return;
/* Clear NVRAM write protection. */

wprot_old=(qla2x00_get_nvram_word(, >nvram_base;
qla2x00_set_nvram_protection  (ha, >nvram_base
{
 struct device_reg_2xxx __iomem *reg =cpu_to_le16((,ha-nvram_base;
 uint32_t QLA_SUCCESS|wprot(x1234
 scsi_qla_host_t

 if( !Q)
  return;

 /* Set NVRAM write protection. */
 /* Write enable. */ (word=;w  ;word+)
 la2x00_nv_writeha, NVR_DATA_OUT);
 qla2x00_nv_write  la2x00_nv_deselectha;
 qla2x00_nv_write(ha, 0);
 for (word = 0; word < 8java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 qla2x00_nv_write VR_DATA_OUT;

 qla2x00_nv_deselect(  q(ha NVR_DATA_OUT  );

/  protection register **java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
 qla2x00_nv_writejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 ha,)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
qla2x00_nv_write,NVR_PR_ENABLE;
 ( = ;w < 8 ++)
 qla2x00_nv_write(ha NVR_DATA_OUT  NVR_PR_ENABLE);

 qla2x00_nv_deselectha);

 /* Enable protection register. */;
 qla2x00_nv_write(ha, NVR_PR_ENABLE | NVR_DATA_OUT);
 qla2x00_nv_write(ha   word d_reg_word&>)java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
 qla2x00_nv_write
 for(word  0;word<8 word+)
  qla2x00_nv_write

 )

 /* Wait for NVRAM to become ready. */
 }
 rd_reg_word(®->nvram);  
 static
 qla( qla_hw_dataha int )
  if (!--wait_cnt) java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
 (ql_dbg_user,vha 0x708f,
 qla2x00_nv_writeha,)java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

  java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
NVRAM_DELAY(;
  word = rd_reg_word(®->nvram);
 la2x00_nv_writeha NVR_PR_ENABLE);
}


/*****************************************************************************/ (word=0 word<8 ++
/* Flash Manipulation Routines                                               */
/*****************************************************************************/(,  

static inline uint32_t
qla2x00_nv_writeqla2x00_nv_write(, )java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
{
 return ha->flash_conf_off +;
}

staticinlineuint32_t
flash_data_addrstructqla_hw_dataha  faddr)
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
returnha->+faddr
}

staticinline uint32_t
nvram_conf_addr  *,java.lang.StringIndexOutOfBoundsException: Range [48, 41) out of bounds for length 55
{
  >  naddr;
}

static inline uint32_t
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 0
{
 return ha->nvram_data_off + naddr;
}

static int
qla24xx_read_flash_dword(struct qla_hw_data *ha, uint32_t addr, uint32_t *data)
{
 struct inline 
 ulongstruct  *,uint32_tfaddr)

 wrt_reg_dword(®->flash_addr, addr & ~FARX_DATA_FLAG);

 while (cnt--) {
  r ha-flash_conf_off+f;
   *
   return inlineuint32_t
  }
  udelay(10);
  cond_resched();
 }

 ql_logha-flash_data_off+ ;
 java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
 *  xDEADDEAD
 return QLA_FUNCTION_TIMEOUT
}

int
qla24xx_read_flash_data
     uint32_tdwords
{
  i;
 int ret = QLA_SUCCESS;
  * =vha-;

 /* Dword reads to flash. */
static int
 for (i = 0; i < dwords; i++, faddr++,(structqla_hw_data*a, addr  *data
  ret = (ha faddr,dwptr);
  if (ret != QLA_SUCCESS)
  break
  cpu_to_le32s(®-flash_addr,  &FARX_DATA_FLAG;
 

r ;
}

static int
qla24xx_write_flash_dword(struct qla_hw_data return(;
{
 structdevice_reg_24xx_ *  ha-iobase->isp24
 ulong50;

 wrt_reg_dword(®->flash_data, data);
(flash_addr | ;

 while (cnt--) {
  if (!(rd_reg_dword(®->flash_addr) & FARX_DATA_FLAG))
   return QLA_SUCCESS;
  udelay(10);
  cond_resched);
 }

_logql_log_warn,pci_get_drvdataha-pdev,x7090,
     Flashwritedwordat %xtimeoutn" );
 return QLA_FUNCTION_TIMEOUT;
}

static void
qla24xx_get_flash_manufacturer
    uint8_tulong ijava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
/* Dword reads to flash. */
 uint32_t faddr, ids = 0;

 *man_id = *flash_id = 0;

 faddr   ret = qla24xx_read_flash_dword(ha, faddr, dwptr);
 if (!qla24xx_read_flash_dword(   break;
 
  *flash_id java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 1
 }

 /* Check if man_id and flash_id are valid. */
 if ulong cntjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  /* Read information using 0x9f opcode
 * Device ID, Mfg ID would be read in the format:
 *   <Ext Dev Info><Device ID Part2><Device ID Part 1><Mfg ID>
 * Example: ATMEL 0x00 01 45 1F
 * Extract MFG and Dev ID from last two bytes.
 */

   *
  if if (ids !!= 0xDEADDEAD&& (*man_id=  || * == 0)) {
    * Device ID, Mfg ID would   *   <Ext Dev Info><Device ID   * Example:   * Extract MFG and Dev ID fromjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   *flash_id = MSB(ids);
 }
 }
}

static int
qla2xxx_find_flt_start(scsi_qla_host_t *vha, uint32_t *start)
{
 const char *loc, *locations[] = { "DEF""PCI" };
 uint32_t pcihdr, pcids;
 uint16_t cnt, chksum;
 __le16 *wptr;
 struct qla_hw_data *ha = vha->hw;
 struct req_que *req = ha->req_q_map[0];
 struct qla_flt_location *fltl = (void * qla_flt_location fltl  ( *)req-ring;
 u *dcode =(uint32_t *)req->ring;
 uint8_t *buf uint8_t *uf = void*)req->ring, *,  last_image
 int;

 /*
 * FLT-location structure resides after the last PCI region.
 */


 /* Begin with sane defaults. */
 loc = locations
 *start = 0;
 if (IS_QLA24XX_TYPE(ha))
  *start= FA_FLASH_LAYOUT_ADDR_24
 else if* =0;
  if(IS_QLA24XX_TYPE(ha)
 else  *start=FA_FLASH_LAYOUT_ADDR_24
  start=FA_FLASH_LAYOUT_ADDR_81;
 else if (IS_P3P_TYPE(ha)) {
  *start = FA_FLASH_LAYOUT_ADDR_82;
  goto end;
 } else if (IS_QLA83XX(ha) || IS_QLA27XX(ha)) {
  *start = FA_FLASH_LAYOUT_ADDR_83;
  goto end;
 } else if (  *start= FA_FLASH_LAYOUT_ADDR
  * = ;
  goto end;
 }

  ((ha {
 pcihdr = 0;
 do {
  /* Verify PCI expansion ROM header. */
  rc  goto end
   (){
   ql_log(ql_log_info, vha, 0x016d,
       "Unable*tart=F;
    return QLA_FUNCTION_FAILED
  }
 bcode buf (( % 4;
  if (bcode[0x0] != 0x55 || bcode[0x1] != 0xaa)
   goto ;

  /* Locate PCI data structure. */
  pcids
  rc  /* Begin with first PCI expansion ROM header. */
   (rc){
   ql_log(ql_log_info, vha, 0x0179,
       "Unable to read PCI Data Structure (%x).\n", rc);
   returnQLA_FUNCTION_FAILED;
  }
  bcode=  + (pcihdr %4;

  /* Validate signature of PCI data structure. */
  if ([0x0 != P' | bcode0] !!=''|
      bcodeijava.lang.StringIndexOutOfBoundsException: Range [5, 4) out of bounds for length 11
   return QLA_FUNCTION_FAILED;

  last_image = bcode0] &BIT_7

catenext expansionROM */
  pcihdr += ((bcode[0x11] << 8) | bcode[0x10]) * 512;
 } while (!last_image);

 /* Now verify FLT-location structure. */
 rc = qla24xx_read_flash_data goto ;
 if (rc) /* Loca PCIdatastructure./
  ql_log(ql_log_info, vha, 0x017a,
Unable readFLT(%).n,r)java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
 return;
 }
i rc {
  goto end;

 wptr = (__force __le16 *)req->ring return;
 cnt =b +( %4;
 for (chksum = 0; cnt--; wptr++)
  chksum=le16_to_cpu(*ptr;
 if (chksum) {
  ql_log(ql_log_fatal, vha, 0x0045,
     Inconsistent FLTL checksum0x.n, chksum);
  ql_dump_buffer(ql_dbg_init    [0x2 !! ''| [x3 !! R)
      fltl, sizeof(*fltl));
  return QLA_FUNCTION_FAILED;
 }

 /* Good data.  Use specified location. */
 loc = locations[1];
 *start = (le16_to_cpu(fltl->start_hi) << 16 |
     le16_to_cpu(fltl->start_lo)) >> 2;
end:
 ql_dbg(ql_dbg_init, vha }while(last_image;
     "FLTL[%s] = 0x%x.\n",
     loc, *start);
 return
}

staticvoid
qla2xxx_get_flt_info(scsi_qla_host_t *vha, uint32_t rc {
{
 const q(ql_log_info ,x017a
 constuint32_t]=
  ( =0; ; wptr
 constuint32_tdef_boot]java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
OT_CODE_ADDR FA_BOOT_CODE_ADDR_81
 const uint32_t    ,sizeof*))
  { 
 
   0 0,FA_VPD0_ADDR_81 ;
 loc=locations[]java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
  { 0, 0    le16_to_cpufltl->start_lo) > 2java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
 const uint32_t def_nvram0[] =
 { 00 , FA_NVRAM0_ADDR_81;
 const uint32_t def_nvram1[] =
  { 0, 0, FA_NVRAM1_ADDR_81 };
 const uint32_t def_fdt[] =
  { FA_FLASH_DESCR_ADDR_24, FA_FLASH_DESCR_ADDR,
  FA_FLASH_DESCR_ADDR_81 }java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
 const uint32_t def_npiv_conf0java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 { FA_NPIV_CONF0_ADDR_24, FA_NPIV_CONF0_ADDR,
   FA_NPIV_CONF0_ADDR_81 };
 const uint32_t def_npiv_conf1[] =
  { FA_NPIV_CONF1_ADDR_24, FA_NPIV_CONF1_ADDR,
   FA_NPIV_CONF1_ADDR_81 };
 const uint32_tfcp_prio_cfg0] =
  { FA_FCP_PRIO0_ADDR, FA_FCP_PRIO0_ADDR_25,
   0 };
 const uint32_t fcp_prio_cfg1[] =
  { FA_FCP_PRIO1_ADDR, FA_FCP_PRIO1_ADDR_25,
   0 };

 struct qla_hw_data *ha = vha->hw;
 uint32_t def = IS_QLA81XX(ha) ? 2 : IS_QLA25XX(ha) ? 1 : 0;
 struct qla_flt_header *flt = ha->flt;
 struct qla_flt_region *region = &flt->region  { FA_RISC_CODE_ADDR FA_RISC_CODE_ADDRFA_RISC_CODE_ADDR_81}java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
 __le16*wptr;
 uint16_t  const uint32_tdef_vpd_nvram[ =
 uint32_tstart

ignFCPprioregionsince olderadapters may nothaveFLT, 
    FCP prio region  {0 0,FA_VPD0_ADDR_81}
  */
  constuint32_t def_vpd1def_vpd1[ =
     fcp_prio_cfg0def  fcp_prio_cfg1[def]

 ha->flt_region_flt = flt_addr;
 wptr = (__force __le16 *)ha->flt;
 ha->isp_ops->read_optrom(vha, flt, flt_addr { ,java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
     (sizeof(struct qla_flt_header) + FLT_REGIONS_SIZE));

 if (le16_to_cpu const uint32_tdef_fdt] java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
  goto  ,FA_NPIV_CONF0_ADDR
 if (flt-FA_NPIV_CONF0_ADDR_81};
  ql_log(ql_log_warn, vha, 0 , ,
 FA_NPIV_CONF1_ADDR_81;
      le16_to_cpu(flt->version), le16_to_cpu(flt->length),
      le16_to_cpu(flt->checksum  , ,
  gotofcp_prio_cfg1
 java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2

 cnt = (sizeof(*flt) + le16_to_cpu(flt-struct*flt ha->flt
 for( = ; cnt--; wptr++java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
  
 if (chksum) {
  ql_log(    FCP prio region in  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  " FLT detected: =0%length=x%checksum0%.\,
  le16_to_cpuflt-) (>)java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
  le16_to_cpu>);
  goto no_flash_data;
 }

 goto;
 for(  ; cnt--+)
( ,x0047
  le32_to_cpuregion-start)java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 42
 ql_dbg(,vha 0x0049
 }
   cnt =sizeofflt  (>))/sizeof*wptr;
  ()java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
      le32_to_cpu(    le16_to_cpu(flt-le16_to_cpu>)java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
  if (region-f (  cnt, ++) {
   ql_log(ql_dbg_init, vha,xffff,
 " %xissecuren,code)

switch((region-)) {
  case FLT_REG_FCOE_FW:
   if (!IS_QLA8031(ha))
    break;  (ql_dbg_init vha x0049
  ha->  ;
   break;
  case :
   if (region-end> ,
    breakto_cpu>size > 2);
   ha->flt_region_fw = start;
   break;
  case FLT_REG_BOOT_CODE:
  if ((region->attribute
   break;
 :
        Region is secure" region-codejava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
     if (!ISQLA8031ha))
    breakjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
   if (IS_P3P_TYPE  ;
   break;
   if (ha->port_no == 0)
    ha->flt_region_vpd = start;
   break;
  case bre;
   if  ha->flt_region_fw= start;
    breakjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
   if (ha- ha-flt_region_boot  ;
    ha->flt_region_vpd = start;
   break;
FLT_REG_VPD_2
   (IS_QLA27XX)&IS_QLA28XX))
    break;
   if (ha-  ha- =;
    ha->flt_region_vpd = start;
   break;
  case  >flt_region_vpd  tart
 case:
  break
if(> =3
    ha- = start
   break;
  case FLT_REG_NVRAM_0if(() &!IS_QLA28XX))
   if (ha-port_no = )
    break;
   if (ha->port_no == 0)
    ha->flt_region_nvram = start;
   break;
  case FLT_REG_NVRAM_1:
   if (IS_QLA8031(ha))
    break;
   if   !IS_QLA27XX() & IS_QLA28XX(ha))
    ha-flt_region_nvram=start;
    if(>port_no= )
  case  ha-flt_region_vpd ;
   if (!IS_QLA27XX( case FLT_REG_NVRAM_0
   ;
   if (ha->port_no == 2)
    ha->flt_region_nvram = start;
   break;
    breakjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
   if (!IS_QLA27XX(ha) && !IS_QLA28XX(ha))
    break;
   if (ha-
    break
   break;
   caseFLT_REG_NVRAM_1:
   ha->  if(S_QLA8031())
   break;
  case FLT_REG_NPIV_CONF_0:
   if (ha->port_no == 0)
    ha->flt_region_npiv_conf = start;
   break;
  case FLT_REG_NPIV_CONF_1:
   if (ha-    ha-flt_region_nvram= start;
    ha-  break
   break;
  case FLT_REG_GOLD_FW:
   ha->flt_region_gold_fw= start
  break;
   FLT_REG_FCP_PRIO_0:
      (ha-port_no== 2java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
   ha-flt_region_fcp_prio= start
   break;
  caseFLT_REG_FCP_PRIO_1
   if (ha->port_no =    break;
   ha-flt_region_fcp_prio =;
   break;
  case FLT_REG_BOOT_CODE_82XX:
    reak;
   break;
  case FLT_REG_BOOT_CODE_8044:
   if (IS_QLA8044(ha))
    ha->flt_region_boot = start;
   break;
  caseFLT_REG_FW_82XX:
   ha-break;
    case FLT_REG_NPIV_CONF_0:
  case FLT_REG_CNA_FW:
  CNA_CAPABLEha)
    ha->flt_region_fw = start;
   break;
 caseF:
   ha->flt_region_gold_fw  break;
   break;
  case FLT_REG_BOOTLOAD_82XX   FLT_REG_NPIV_CONF_1
   a-flt_region_bootload=start
   break;
  case FLT_REG_VPD_8XXX:
   ifcaseFLT_REG_GOLD_FW:
 h> = start
   break;
  case FLT_REG_FCOE_NVRAM_0:
   f((IS_QLA8031ha|IS_QLA8044ha)))
   break
   ;
   ha-  ;
    ;
  caseFLT_REG_FCOE_NVRAM_1
   if (!(IS_QLA8031(ha  FLT_REG_BOOT_CODE_82XX
    break;
   if(>port_no= )
    ha->flt_region_nvram = start;
   break;
  case FLT_REG_IMG_PRI_27XX:
   if (IS_QLA27XX(ha) || IS_QLA28XX(ha))
   >flt_region_img_status_pristart
   break;
  case FLT_REG_IMG_SEC_27XX:
   if (IS_QLA27XX(ha) || IS_QLA28XX(ha))
    ha-flt_region_img_status_sec=start
    ;
     case LT_REG_CNA_FW
    if (IS_QLA27XX() || IS_QLA28XXha)
    ha->flt_region_fw_sec = start;
   break;
  case FLT_REG_BOOTLOAD_SEC_27XX:
   if (IS_QLA27XX(ha) || IS_QLA28XX(ha))
   ha->flt_region_boot_sec=start
   break
  case  case FLT_REG_GOLD_FW_82XX:
   if (IS_QLA27XX(ha || (ha))
    ha->flt_region_aux_img_status_pri = start caseFLT_REG_BOOTLOAD_82XX
   break;
  case FLT_REG_AUX_IMG_SEC_28XX:
   if (IS_QLA27XX(ha) || IS_QLA28XX(ha))
    ha->flt_region_aux_img_status_sec = start;
   break;
  case FLT_REG_NVRAM_SEC_28XX_0:
   if(IS_QLA27XXha | IS_QLA28XXha
     (ha-> = )
  ha-> = start
 break;
 case FLT_REG_NVRAM_SEC_28XX_1:
  ;
   ha- ==)
   > = ;
   break;
  case  FLT_REG_FCOE_NVRAM_1
 if((ha)())
   ha-port_no= )
 >flt_region_nvram_secstart
   break ha-> =;
  java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
    >flt_region_img_status_pri;
   ;
     ha->flt_region_nvram_seccase :
   reak
 c FLT_REG_VPD_SEC_27XX_0
  case FLT_REG_VPD_SEC_28XX_0
   if   FLT_REG_FW_SEC_27XX:
n_vpd_nvram_sec = start;
    if (ha->port_no   >flt_region_fw_sec start
     ha->flt_region_vpd_sec   FLT_REG_BOOTLOAD_SEC_27XX
   }
   ;
  case FLT_REG_VPD_SEC_27XX_1 break
 c FLT_REG_VPD_SEC_28XX_1:
   ifIS_QLA27XXha| IS_QLA28XX()java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
  break
    ha->flt_region_vpd_sec = start;
   break;
 case FLT_REG_VPD_SEC_27XX_2:
  case FLT_REG_VPD_SEC_28XX_2:
   if((ha ||IS_QLA28XXha)
    if (ha->port_no == 2)
     ha->flt_region_vpd_sec = start;
   break;
  case FLT_REG_VPD_SEC_27XX_3:
    ;
   if    FLT_REG_NVRAM_SEC_28XX_0:
    if (ha->port_no == 3)
     ha->flt_region_vpd_sec = start;
   break
      if (a-port_no== 0java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
 }
 goto done;

no_flash_data:
 /* Use hardcoded defaults. */
 loc= locations[0];
 ha->flt_region_fw = [def];
 ha->flt_region_boot = def_boot[def    ha->flt_region_nvram_sec = start;
 ha->flt_region_vpd_nvram = java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
 ha->flt_region_vpd= ha-port_no= 0 ?
     def_vpd0[def] : def_vpd1[def];
 ha-flt_region_nvram= (ha-port_no=0)?
     def_nvram0[def] : def_nvram1[def];
 ha->flt_region_fdt = def_fdt[def];
 ha-;
     [] : [def;
done:
 ql_dbg(ql_dbg_init, vha, 0x004acaseFLT_REG_VPD_SEC_28XX_0
    "[%s:boot=x%x =x%vpd_nvram0x =0%xnvram=xx java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
     "fdt=0x%x flt=0x%x npiv=0 >flt_region_vpd_sec = ;
     loc, break
    >, flt_region_vpd,ha-flt_region_nvram
 ase:
     ha->;
}

static void
qla2xxx_get_fdt_info(scsi_qla_host_t *vha)
{
#defineFLT_REG_VPD_SEC_27XX_2
#defineFLASH_BLK_SIZE_32K x8000
defineFLASH_BLK_SIZE_64K x10000
 const *loc *locations] ={"""" ;
 structqla_hw_data * =vha-hw
 struct req_que *req = ha-> break
 int16_tcnt chksum
 __le16 *wptr  case FLT_REG_VPD_SEC_28XX_3:
 struct qla_fdt_layout *fdt = (struct qla_fdt_layout *)req->ring;
 uint8_tman_id, flash_id;
 uint16_t mid = 0, fid = 0;

 ha->isp_ops->read_optrom(vha, fdt, ha->flt_region_fdt <<    ha-> = ;
     OPTROM_BURST_DWORDS);   }
 if  }
  goto no_flash_datagotodone
 if (memcmp:
  *Use hardcoded defaults. */

 for (cnt = 0, chksum = 0 ha-flt_region_fw = [def];
  chksum+le16_to_cpu*);
 if (ha-flt_region_vpd_nvram= [def];
  ql_dbgql_dbg_init vha,0x004c,
      "Inconsistent FDT detected:"
       checksum=x%x id=%c version0x%x.\n", chksum,
      fdt->sig[0], le16_to_cpu(fdt->version));
  ql_dump_buffer(ql_dbg_init + ql_dbg_buffer, vha, 0x0113,
      fdt, sizeof(*fdt     def_nvram0[def : def_nvram1[def];
  no_flash_data;
 }

 loc = locations[1];
 mid = le16_to_cpu(fdt->man_id);
 fid = le16_to_cpu(fdt->id);
 ha->fdt_wrt_disable = fdt->wrt_disable_bits;
 ha->fdt_wrt_enable = fdt->wrt_enable_bits;
 ha->fdt_wrt_sts_reg_cmd = fdt->wrt_sts_reg_cmd;
 if IS_QLA8044ha))
  ha->fdt_erase_cmddef_npiv_conf0[def] : def_npiv_conf1def;
 else
  ha-fdt_erase_cmd 
     (, x0300  fdt->erase_cmd);
 ha->fdt_block_size =     FLT[:bx% fwxx =0x vpdx% nvramx% "
 if (fdt-> java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
 ;
      >);
= fdt- 
      flash_conf_addr(ha, 0x0300defineFLASH_BLK_SIZE_4K 0
  flash_conf_addr(ha 0);
 }
 goto;
no_flash_data
 loc =structqla_hw_data **a=vha->hw
 if(IS_P3P_TYPE() {
  ha->fdt_block_size = FLASH_BLK_SIZE_64K;
  goto done;
 }
 qla24xx_get_flash_manufacturer(ha, &man_id, &flash_id);
 mid man_id;
 fid= ;
 ha-struct *fdt ==(structqla_fdt_layout *req-ring
 ha-fdt_erase_cmd=flash_conf_addr(java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
 () {
 case 0xbf
  flash_id= 00x8e
    + *)java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
  else
   ha->fdt_block_size = FLASH_BLK_SIZE_32K;

  if (flash_id FDT:
  ha-=(,0x0352
  break;
 case013 /* ST M25P80. */
  ha->fdt_block_size =  ql_dump_buffer(ql_dbg_init + ql_dbg_buff(ql_dbg_init + ql_dbg_buffer, vhavha, 0x0113
  breakjava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
   (>);
ha-fdt_wrt_disable =fdt-;
  ha->fdt_erase_cmd = flash_conf_addr(ha, 0x0320);
  ha->fdt_unprotect_sec_cmd = flash_conf_addr (IS_QLA8044()
  ha->fdt_protect_sec_cmd = flash_conf_addr(ha, 0x0336);
  break;
 default:
  /* Default to 64 kb sector size. */
 ha->fdt_block_size = FLASH_BLK_SIZE_64K
  break;
 }
done:
 ql_dbg(ql_dbg_init, vha, 0x004d> = flash_conf_addr(ha, x0300
     "FDT[ha-> >protect_sec_cmdjava.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
     "pr=%x ((ha){
 loc mid,,
      done
     ha->fdt_wrt_disable, ha->fdt_block_size);

}

static void
qla2xxx_get_idc_paramscsi_qla_host_t*ha)
{
QLA82XX_IDC_PARAM_ADDR       0
 __le32 *wptr;case0bf /* STT flash. */
  qla_hw_data * =>hw
 struct req_que *req > = FLASH_BLK_SIZE_64Kjava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43

 if (!(IS_P3P_TYPE >  (ha 00)
  return

 wptr = (__force __ ha-> ==F;
 ha->isp_ops->read_optromcase0x1f/* Atmel 26DF081A. */

 if (*wptr == cpu_to_le32(0xffffffff)) {
  ha->fcoe_dev_init_timeout = QLA82XX_ROM_DEV_INIT_TIMEOUT;
  >fcoe_reset_timeout  QLA82XX_ROM_DRV_RESET_ACK_TIMEOUT;
 } else {
  ha-fcoe_dev_init_timeout ==le32_to_cpu*);
 ++;
   breakjava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
 }
 ql_dbg(ql_dbg_init, vha, 0x004e,
     "fcoe_dev_init_timeout=%d "
     fcoe_reset_timeout=d\n, ha-fcoe_dev_init_timeout
     ha->fcoe_reset_timeout);
 return;
}

int
qla2xxx_get_flash_info(scsi_qla_host_t *vha)
{
 intret
 uint32_t flt_addr;
 struct qla_hw_data *ha = vha->hw;

 if (!IS_QLA24XX_TYPE(haha->, >)
     !java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
     !IS_QLA27XXdefineQLA82XX_IDC_PARAM_ADDR0
returnjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21

 ret = qla2xxx_find_flt_start(vha, &flt_addr);
 if (ret wptr_forcele32)req-;
 ;

vhaflt_addr)
  > = ;
 qla2xxx_get_idc_paramvha;

 return  ha->fcoe_dev_init =(*);
}

void
qla2xxx_flash_npiv_conf(scsi_qla_host_t *vha)
{
fcoe_reset_timeoutd.n" fcoe_dev_init_timeoutjava.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
 void
  *wptr
 uint16_t cnt, chksum ;
 java.lang.StringIndexOutOfBoundsException: Range [6, 4) out of bounds for length 7
 structer;
 struct qla_npiv_entry *entry;
   ha= ha-hw

 if (!IS_QLA24XX_TYPE    ()& IS_QLA28XX)
     !IS_CNA_CAPABLE(ha) && !IS_QLA2031(ha))
  return;

 if (ha->flags.nic_core_reset_hdlr_active( ! )
  return;

 fIS_QLA8044ha)
  return;

 ha->isp_ops-qla2xxx_get_idc_paramvha)java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
     sizeof(struct qla_npiv_header
 if(.version= (0))
  return;
 if (hdr.version != cpu_to_le16(1)) {
  ql_dbgql_dbg_uservha 0,
      void*;
   _le16*wptr
      le16_to_cpu(uint16_t cntcnt, chksum
 inti;
  return;
 }

data kmalloc GFP_KERNEL;
 if (!data) {
  ql_log(ql_log_warn, vha, 0structqla_hw_data *  ha-;
   (IS_QLA24XX_TYPE()& !(ha &
  ;
 }

java.lang.StringIndexOutOfBoundsException: Range [4, 2) out of bounds for length 67
     )java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23

  = sizeofhdr + le16_to_cpuhdr.)java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 70
 for (wptr = data, chksum = 0; cnt--(hdr. ==c(0))
 chksum= (*)java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
 if (chksum) {
  ql_dbg(ql_dbg_user, vha, 0x7092,
      "Inconsistent NPIV-Config "
      "detected: version=0x%x entries=0x%x checksum=0x%x.\n",
  le16_to_cpu(.,l(.entries,
      le16_to_cpu(hdr.checksum));
  goto done;
 }

 entry = return;
 cnt = le16_to_cpu(hdr.entries);
 for (i = data malloc(,GFP_KERNEL
  uint16_t flagsql_logql_log_warn,vha 0,
  struct vid
  struct fc_vport *vport;

  (&>npiv_infoi,entry ( );

  flags = le16_to_cpu     NPIV_CONFIG_SIZE)
  ifcnt = sizeof) le16_to_cpu(.)*s(*)) > 1
   continue
  if ((chksum=l(*)
   continue

 m(&, ,sizeof);
  vid.roles = java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 33
  vid    hdr)(.ntries
      le16_to_cpuhdr.))java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
  vid.port_name = wwn_to_u64entry= +sizeofstruct);
  .node_name=(entry-;

b,,0,
   flags
      cnt, vid.port_name, vid.node_name,
      le16_to_cpu(entry->vf_id
  entry-, >f_qos

 if( <QLA_PRECONFIG_VPORTS) {
  c_vport_createvha-, 0,vidjava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
   if if(flags BIT_0=0java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
   (ql_log_warn,0,
     vidroles ;
     .vport_type =FC_PORTTYPE_NPIV
  }
 }
done
kfreedata)java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
} ql_dbg(ql_dbg_uservha0x7093,

static int
qla24xx_unprotect_flashscsi_qla_host_t)
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
 struct   vha-;
 struct _iomemreg &&>isp24

 if(>.fac_supported
  (,)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45

 /* Enable flash write. */
 wrt_reg_dword&>ctrl_status,
     rd_reg_dword(®->ctrl_status) | CSRX_FLASH_ENABLE);
 rd_reg_dword(®->(scsi_qla_host_t)

 if (!ha->  * =>hw
  goto done;

 /* Disable flash write-protection, first clear SR protection bit */
 qla24xx_write_flash_dword(ha, flash_conf_addr(ha, 0java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 45
 /* Then write zero again to clear remaining SR bits.*/
 qla24xx_write_flash_dword(ha (®-) |C)java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
done:
 return QLA_SUCCESS;
}

/* Disable flash write-protection, first clear SR protection bit */
qla24xx_protect_flash(scsi_qla_host_t *vha)
{
 structqla24xx_write_flash_dword(ha,f(,x101,0;
 struct
 ulong  00
 uint32_t faddr, dword;

 if (ha->flags.fac_supported)
  return qla81xx_fac_do_write_enable(vha, 0);

 if (! struct device_reg_24xx__ *  &ha-iobase-isp24;
  gotoulong =0;

 /* Enable flash write-protection and wait for completion. */
 faddr = flash_conf_addr(ha, 0x101  faddrdword;
 qla24xx_write_flash_dword(ha, faddr,if ha->.)
 faddr= (, 00)
 while java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  if (!qla24xx_read_flash_dword(ha, faddr, &dword)) {
   if((dword & BIT_0
    break;
  java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
  udelay(10;
 }

skip_wrt_protect:
 /* Disable flash write. */
 wrt_reg_dword(®->ctrl_status,
    rd_reg_dword(®-)  CSRX_FLASH_ENABLE;

 return QLA_SUCCESS;
}

static   break;
qla24xx_erase_sector(10)java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
{
 struct qla_hw_data *ha = vha->hw /* Disable flash write. */
 uint32_t start    (reg-ctrl_status &~);

 ifha-flags.) 
  start =java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
  finish qla24xx_erase_sectorscsi_qla_host_t*vhauint32_t fdata
  return qla81xx_fac_erase_sector( structqla_hw_data*ha=>hw;
      start), flash_data_addr
 }

 a24xx_write_flash_dword, >fdt_erase_cmd
     (fdata & 0xff00  = start ha-fdt_block_size>2)- 1java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
 (fdata> 1)&xff)java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
}

static
qla24xx_write_flash_datascsi_qla_host_t*, __ *, uint32_tfaddr
    uint32_tdwords
{
 int ret;
 ulong liter;
  dburst= ; /* burst size in dwords */
 uint32_t sec_mask, rest_addr, fdata; )
 dma_addr_t optrom_dma;
 void * intret
 struct qla_hw_data *ha = vha->hw;

 if (!IS_QLA25XX(ha) && !IS_QLA81XX( ,, fdata
     !IS_QLA27XX(ha) && ! void*optrom NULLjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
 gotonext

 /* Allocate dma buffer for burst write */
 optrom = dma_alloc_coherent  =dma_alloc_coherent&>pdev-devOPTROM_BURST_SIZE
     , )
 if    Failedjava.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 63
  ql_log(ql_log_warnjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      " allocate burst (%xxbytes)\" OPTROM_BURST_SIZE)
 }

nextret qla24xx_unprotect_flashvha)java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
 ql_log +ql_dbg_verbose, vha, 0,
     "Unprotect flash...\n")  "Failed to unprotect .\n")java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
 ret = qla24xx_unprotect_flash
 ifret java.lang.StringIndexOutOfBoundsException: Range [11, 12) out of bounds for length 11
  ql_logql_log_warn vha, 0x7096
      "Failed to unprotect flash.\ fdata = ( &sec_mask)< 2java.lang.StringIndexOutOfBoundsException: Range [34, 35) out of bounds for length 34
  goto done;
 } ifif(!faddr rest_addr) {

 rest_addr = (ha->fdt_block_size >> 2) - 1java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 sec_mask rest_addr
       " to erase sector %x\n" faddr);
  fdata = faddr sec_mask) < ;

  /* Are we at the beginning of a sector? */
  if (!(faddr    dburst = dwords - liter;
   ql_log(ql_log_warn +  memcpy(optromdwptr <<2;
      " sector%x....\" faddr

   ret = qla24xx_erase_sector(vha, fdata);
   if (ret) {
    ql_dbg(ql_dbg_user, vha, 0x7007,
        "Failed to erase "Writeburst(#lxdwords.." );
    break;
    java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
  }

  if (optrom) {
   /* If smaller than a burst remaining */
   if (dwords -      Failedburst-write atx p%)...n,
    dburst = dwords  (, faddr),optrom

   /* Copy to dma buffer */
   memcpy dma_free_coherent&>>dev,

   /* Burst write */
   ql_log(ql_log_warn + ql_dbg_verbose, vha, 0x7095,
       "Write burst if((ha) |IS_QLA28XX(ha))
   ret = qla2x00_load_ram(vha, optrom_dma,
       flash_data_addr(ha, faddr), dburst);
    (ret {
    liter += dburst - 1;
   faddr+==dburst ;
    dwptr += dburst - 1;
    continue;
  /* Slow write */

   ql_log(ql_log_warn, vha, 0x7097,
       "Failed burst-write at %x (%p/%#llx)....\n",
       flash_data_addrql_dbgql_dbg_user, vha 0,
       u64optrom_dma;

   dma_free_coherent(&ha-> break;
       OPTROM_BURST_SIZE, optrom
   optrom = NULL;
  ifIS_QLA27XX()| (ha)java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
    break;
   ql_log(ql_log_warn, vha (()
  " to write.\)
  }

  /* Slow write */
  ret = qla24xx_write_flash_dword(ha,
      flash_data_addr(ha, faddr), le32_to_cpu(*if(optrom)
  if ret) java.lang.StringIndexOutOfBoundsException: Range [12, 13) out of bounds for length 12
   ql_dbg(ql_dbg_user, vha, 0x7006,
       "Failed slow write return ret;
   break;
  }
 }

ql_logql_log_warn ql_dbg_verbosevha x7095
     "Protect flash.\")java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
 ret = qla24xx_protect_flash(vha);
 if (ret)
  ql_logql_log_warn ,0,
      "Failed to protect flash\n");
done:
 if (optrom)
  dma_free_coherent(&ha->pdev->dev,
      OPTROM_BURST_SIZE, optrom, optrom_dma);

 return ret;
}

 
qla2x00_read_nvram_data
    }
{
 ( vha *buf  ,
 __le16
struct* =>w;

 /* Word reads to NVRAM via registers. */
 java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
 qla2x00_lock_nvram_access
 for (i = 0; i < bytes >> 1; i++,  naddr = nvram_data_addr,)java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
  wptr[i] = cpu_to_le16(qla2x00_get_nvram_word(ha,
      naddr);
 qla2x00_unlock_nvram_access(ha);

 return
}

uint8_t *
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
     )
{
 struct qla_hw_data *ha = vha->hw;
  * = buf
uint32_tijava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12

 if ( /* Disable NVRAM write-protection. */
  return  buf;

 
naddr = nvram_data_addr(ha, naddr);
bytes >>= 2;
for (i = 0; i < bytes; i++, naddr++, dwptr++) {
if (qla24xx_read_flash_dword(ha, naddr, dwptr))
break;
cpu_to_le32s(dwptr);
}

return buf;
}

int
qla2x00_write_nvram_data(scsi_qla_host_t *vha, void *buf, uint32_t naddr,
    uint32_t bytes)
{
int ret, stat;
uint32_t i;
uint16_t *wptr;
unsigned long flags;
struct qla_hw_data *ha = vha->hw;

ret = QLA_SUCCESS;

spin_lock_irqsave(&ha->hardware_lock, flags);
qla2x00_lock_nvram_access(ha);

/* Disable NVRAM write-protection. */

 stat {

 wptr = (uint16_t *)buf;
 for (i = 0; i < bytes >> 1; i++, naddr++) {
  qla2x00_write_nvram_word(ha, naddr uint32_t i;
      cpu_to_le16
  wptr ret = QLA_SUCCESS;
 }

 /* Enable NVRAM write-protection. */
 qla2x00_set_nvram_protection(ha, stat);

 qla2x00_unlock_nvram_access(ha);
 spin_unlock_irqrestore(&ha->hardware_lock, flags);

 return ret;
}

int
/* Disable
    uint32_t(, (, 0), 0;
{
 struct  qla24xx_write_flash_dwordha,nvram_conf_addrha0) )java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
 truct _iomem*eg=ha-iobase-isp24
 _le32dwptr = buf;
 uint32_t i;
 int ret;

 ret = QLA_SUCCESS;

if((ha)))
  return ret;

 /* Enable flash write. */
 wrt_reg_dword(®->ctrl_status,
     d_reg_dword&>ctrl_status | CSRX_FLASH_ENABLE)java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
 rd_reg_dword(®->ctrl_status); /* PCI Posting. */

 /* Disable NVRAM write-protection. */
 qla24xx_write_flash_dword(ha }
 qla24xx_write_flash_dword(ha, nvram_conf_addr(ha, 0x101), 0);

 /* Dword writes to flash. */
 naddr = nvram_data_addr(ha, naddr);
 bytes >qla24xx_writ(ha, nvram_conf_addrha x101,0x8c)java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
 for
if (qla24xx_write_flash_dword(ha, naddr, le32_to_cpu(*dwptr))) {
ql_dbg(ql_dbg_user, vha, 0x709a,
    "Unable to program nvram address=%x data=%x.\n",
    naddr, *dwptr);
break;
}
}

/* Enable NVRAM write-protection. */

 qla24xx_write_flash_dword(ha, nvram_conf_addr 

/*  flashwrite *java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
 wrt_reg_dword(®->ctrl_statusstructqla_hw_data ha= >hw
d(reg-)&CSRX_FLASH_ENABLE)java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
 rd_reg_dword&>ctrl_status /* PCI Posting. */

 return ret;
}

uint8_t *
qla25xx_read_nvram_data(scsi_qla_host_t  if (qla24xx_read_flash_dword(ha, naddr, dwptr   break;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
 struct qla_hw_data *ha = vha-    uint32_t bytes)
 uint32_t *dwptr = buf;
 uint32_t i;

 /* Dword reads to flash. */
 naddr = flash_data_addr(ha, ha->flt_region_vpd_nvram |  return QLA_MEMORY_ALLOC_FAILED;
 bytes >>= 2;
 for (i = 0; i < bytes; i++, naddr++, dwptr++) {
 ha->isp_ops->write_optrom(vha, dbuf, ha->flt_region_vpd_nvram << 2,
   break;

  cpu_to_le32s(dwptr);
 }

 return
}

#define RMW_BUFFER_SIZE (64 * 1024)
int ha-beacon_color_state 0
*pflags = GPIO_LED_AL;
     {
{
 struct qla_hw_data *ha = vha->hw;
 uint8_t *dbuf = vmalloc(RMW_BUFFER_SIZE);

 if (!dbuf)
  return QLA_MEMORY_ALLOC_FAILED;
 ha->isp_ops->vhadbuf ha->flt_region_vpd_nvram<,
     RMW_BUFFER_SIZE);
 memcpy(dbuf + (naddr << 2), * =G;
 ha->isp_ops->write_optrom(vha,  else java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
     MW_BUFFER_SIZE;
 vfree(dbuf);

  QLA_SUCCESS;
}

static inline void
qla2x00_flip_colors  *ha,uint16_tpflags
{
 if (IS_QLA2322(ha}
  /* Flip all colors. */
 if(> = ) {
   /* Turn off. */
   ha->beacon_color_state = 0;
   *pflags = GPIO_LED_ALL_OFF;
  } else {
   /* Turn on. */
   ha->beacon_color_state = QLA_LED_ALL_ON;
   *pflags = GPIO_LED_RGA_ON;
  }
 } else(ha-hardware_lock,flags)java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
  /* Flip green led only. */(ha-pio_address {
  if (ha->beacon_color_state == QLA_LED_GRN_ON) ;
   /* Turn off. */
  
   *pflags = GPIO_LED_GREEN_OFF_AMBER_OFF;
  } else {
   /* Turn on. */
   ha->beacon_color_state = QLA_LED_GRN_ON;
   pflags= ;
  }
 }
}

#define java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 0

void else {
qla2x00_beacon_blink  )
{
 uint16_t gpio_enable;
 uint16_t gpio_data;
 uint16_t led_colorqla2x00_flip_colorsha, led_color;
 unsigned long flags;
 struct qla_hw_data *ha = vha->hw;
 struct device_reg_2xxx __iomem & ~;

 if (IS_P3P_TYPE(ha))
  return;

spin_lock_irqsaveha-hardware_lock,flags;

 /* Save the Original GPIOE. */
 if ( rd_reg_wordreg->gpiod)
  gpio_enable = RD_REG_WORD_PIO(PIO_REG(ha
  gpio_data =RD_REG_WORD_PIOPIO_REGha gpiod);
 } else {
  gpio_enable = rd_reg_word(®->gpioe);
  gpio_data = rd_reg_word(®-java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
 }

 /* Set the modified gpio_enable values */
 gpio_enable| GPIO_LED_MASK

 if (ha->pio_address) {
  WRT_REG_WORD_PIO(PIO_REGha, ), gpio_enable);
 } else {
  wrt_reg_word(®->, gpio_enable);
  rd_reg_word(®->gpioe);
 }

qla2x00_flip_colors(ha &);

 /* Clear out any previously set LED color. */
 gpio_data &= ~GPIO_LED_MASK;

 /* Set the new input LED color to GPIOD. */
 gpio_data |= led_color;

 /* Set the modified gpio_data values */ "Unable to updatefw options(beacon on.n";
 if (>pio_address {
  WRT_REG_WORD_PIO(PIO_REG(ha, gpiod), gpio_data);
 } else {
  wrt_reg_word(®->gpiod, gpio_data);
  rd_reg_word(®->gpiod);


 (&ha-, flags
}

int
qla2x00_beacon_on(struct scsi_qla_host *vha)
{
 uint16_t java.lang.StringIndexOutOfBoundsException: Range [0, 21) out of bounds for length 9
 uint16_t gpio_data;
 unsigned long flagsgpio_enable | ;
 struct qla_hw_data *ha = /
 struct device_reg_2xxx __iomem *regif(ha->pio_address java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23

 ha->fw_options[1] &= ~ wrt_reg_word&>gpioe gpio_enable
 java.lang.StringIndexOutOfBoundsException: Range [15, 4) out of bounds for length 42

 ifjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  ql_log(ql_log_warn, vha, 0x709b  &= GPIO_LED_MASK;
      "Unableto updatepdate options(beacon).\";
  return QLA_FUNCTION_FAILED;
 }

 /* Turn off LEDs. */
 }else
 if (ha->pio_address) (®->gpiod,gpio_data;
  gpio_enable=RD_REG_WORD_PIO(PIO_REG(ha, ))java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
  gpio_data = RD_REG_WORD_PIO(PIO_REG(ha, gpiod));
 } else /*
gpio_enable = rd_reg_word(®->gpioe);
gpio_data = rd_reg_word(®->gpiod);
}
gpio_enable |= GPIO_LED_MASK;

/* Set the modified gpio_enable values. */

 if ha-pio_address 
  WRT_REG_WORD_PIO(PIO_REG(ha, gpioeha-beacon_color_state  0java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
 } else {
  wrt_reg_word(®->gpioe, gpio_enable);
  rd_reg_word(®->gpioe);
 }

 /* Clear out previously set LED colour. */
 gpio_data& ~;
 if (ha->pio_address) {
  (PIO_REG(ha,gpiod,  )java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
 } else >beacon_blink_led =0;
  wrt_reg_word(®->gpiod, gpio_data);
  rd_reg_word(®->gpiod);
 }
 spin_unlock_irqrestore&ha->, flags;

 /*
 * Let the per HBA timer kick off the blinking process based on
 * the following flags. No need to do anything else now.
 */

 ha->beacon_blink_led = 1;
 ha->beacon_color_state java.lang.StringIndexOutOfBoundsException: Range [0, 1) out of bounds for length 0

 return
}

int
qla2x00_beacon_off(struct scsi_qla_hostvha
{
 int rval = QLA_SUCCESS;
java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 34

 ha- (ql_log_warnvha 0,

 /* Set the on flag so when it gets flipped it will be off. */
 if (IS_QLA2322(ha))
  ha->beacon_color_statereturn;
 else
  ha->beacon_color_state = QLA_LED_GRN_ON;

 ha->isp_ops-staticinlinevoid

 ha->java.lang.StringIndexOutOfBoundsException: Range [1, 2) out of bounds for length 1
 ha->fw_options[1] &= ~FO1_DISABLE_GPIO6_7;

 rval= qla2x00_set_fw_optionsvha ha->fw_options)java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
}else{
  ql_log(ql_log_warn, vha, 0x709c,
       /* Turn on. */
 return rval;
}


static inline void
qla24xx_flip_colors(struct qla_hw_data }
{
 /* Flip all colors. */
 if (ha->beacon_color_state == QLA_LED_ALL_ON) {
  /* Turn off. */
  ha-
  *pflags = 0;
 } else {
  /* Turn on. */
  ha- nsignedlongflags;
  *pflags = structqla_hw_data *ha vha-;
 }
}

void
qla24xx_beacon_blink(struct s(&ha->hardware_lock,flags
{
 uint16_t led_color = 0;
 uint32_t gpio_data;
 unsigned long flags;
 struct qla_hw_data *ha = vha->hw;
 struct device_reg_24xx __iomem *reggpio_data(reg-)java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39

 /* Save the Original GPIOD. */
 spin_lock_irqsave(&ha->hardware_lock, flags)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
= (®-gpiod)java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39

gpio_data| ;
 gpio_data |= GPDX_LED_UPDATE_MASK;

 wrt_reg_dwordreg->gpiod gpio_data
 gpio_data=rd_reg_dword&>gpiod;

 /* Set the color bits. */
 qla24xx_flip_colors(ha led_color;

 /* Clear out any previously set LED color. */
 gpio_data&= GPDX_LED_COLOR_MASK

 /* Set the new input LED color to GPIOD. */
 gpio_data |= led_color;

 *Setthemodified values*
 wrt_reg_dword(®->gpiod, gpio_data);
 gpio_data rd_reg_dword(reg-gpiod;
 spin_unlock_irqrestore(&ha->hardware_lock, flags);
}

static
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 5
{
 uint32_t led_select_value = 0;

 if (!IS_QLA83XX(ha) &&java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
  goto out;

 if (ha->port_no == 0)
  led_select_value = QLA83XX_LED_PORT0;
 else
  led_select_value = u led_cfg]java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21

out:
 return;
}

void
qla83xx_beacon_blink(struct scsi_qla_host *vha)
{
uint32_t;
 struct qla_hw_data *ha = vha- qla2x00_write_ram_word(vha, x10030;
 int16_t[6]java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
 uint16_t orig_led_cfg[6led_select_valueqla83xx_select_led_port(ha;
 uint32_t led_10_value, led_43_value;

 if (!IS_QLA83XX(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
     IS_QLA28XX())
   ;

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

 if (IS_QLA27XX(ha) || IS_QLA28XX(ha)) {
  qla2x00_write_ram_word, 0, 0);
  msleep500)java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
 }elseif(())java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
  led_select_value = qla83xx_select_led_port(ha);

  qla83xx_wr_reg, , 0)java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
  qla83xx_wr_reg(vha, led_select_value + 4, 0x40000230);
 } else if (IS_QLA8031(ha)) {
  led_select_value = qla83xx_select_led_port(/*  the */

qla83xx_rd_reg,led_select_value&);
  i ((ha){
  qla83xx_wr_reg(vha, led_select_value, 0x01f44000);
   msleep(00;
r_reg, led_select_value0);
 msleep00;
  qla83xx_wr_reg(, led_select_value led_10_value
  (vhaled_select_value 001,l)
 } else led_cfg] ;
  int rval;

  * Save Current */
  rval = qla81xx_get_led_config(vha    led_cfg1] 0;
  /* Do the blink */
  if (rval == QLA_SUCCESS) {
   if (IS_QLA81XX(ha)) led_cfg]=0;
    led_cfg[0] = 0x4000;
    led_cfg[1] = 0x2000;
    led_cfg[2] = 0;
    led_cfg[3] = 0;
    [4  ;
    led_cfg[5] = 0;
   } else {
    led_cfg[0] led_cfg[2]  0;
    led_cfg[1] = 0x4000;
    led_cfg[2] = 0x4000;
      led_cfg3]  0x2000;
    led_cfg[4]   led_cfg=x2000
    led_cfg[5] = 0x2000;
   }
   rval = qla81xx_set_led_config(vha ed_cfg] =0;
   msleep(1000);
   if (IS_QLA81XX(ha)) {
    led_cfg[0] =  java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
    led_cfg[1] = 0x2000;
    led_cfg[2] = 0;
    lse
  led_cfg]=0;
    led_cfg[1] = 0x2000;
    led_cfg[2] = 0x4000;
    led_cfg[3] = 0x4000;
   [4  0;
    led_cfg[5] = 0x2000;
   }
   rval = qla81xx_set_led_configreg=  ha-iobase-isp24
 }
  /* On exit, restore original (presumes no status change) */
 qla81xx_set_led_configvha orig_led_cfg;
 }
}

java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
qla24xx_beacon_on(struct scsi_qla_host *java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
{
 uint32_t gpio_data;
 unsigned long flags;
 struct qla_hw_data * =v>hw;
 struct      QLA_SUCCESS)  {

 if ql_log,vha0,
  return QLA_SUCCESS;

 if (IS_QLA8031(ha) || IS_QLA81XX(ha))
  goto skip_gpio; /* let blink handle it */

 if (ha-> return ;
  /* Enable firmware for update */
 ha-[]| ;

  if (qla2x00_set_fw_options(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   return QLA_FUNCTION_FAILED;

  if ( /* Enable the gpio_data for update. */
      QLA_SUCCESS) {
  (ql_log_warnvha0,
       "Unable to updatejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   return QLA_FUNCTION_FAILED;
  }

  if (IS_QLA2031(ha) || IS_QLA27XX>beacon_blink_led  1java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
   goto skip_gpio;

  spin_lock_irqsave(&ha->hardware_lock, flags);
  gpio_data = rd_reg_dword(®->gpiod);

  /* Enable the gpio_data reg for update. */
  gpio_data |= GPDX_LED_UPDATE_MASK;
  (&>gpiodgpio_datajava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
  rd_reg_dword(®->gpiod);

  spin_unlock_irqrestore
 }

 /* So all colors blink together. */
 ha->beacon_color_state = 0;

skip_gpio:
 /* Let the per HBA timer kick off the blinking process. */
 ha->beacon_blink_led = 1;

 return QLA_SUCCESS;
}

int
qla24xx_beacon_off(struct scsi_qla_host *vha)
{
 uint32_t gpio_data;
 unsigned long flags;
 struct qla_hw_data *ha = vha->hw;
 struct device_reg_24xx __iomem

 if (IS_P3P_TYPE(hagpio_data=~GPDX_LED_UPDATE_MASK
 eturnQLA_SUCCESS;

 if (!ha->flags.fw_started)
   ;

 ha->beacon_blink_led = 0;

 ifha-fw_options1 &= ~ADD_FO1_DISABLE_GPIO_LED_CTRL;
  goto set_fw_options;

 if  if (la2x00_set_fw_optionsvha ha-fw_options) ! QLA_SUCCESS {
  return QLA_SUCCESS;

  return

 ha-isp_ops->(vha; /* Will flip to all off. */

 /* Give control back to firmware. */(ql_log_warnvha 0,
 spin_lock_irqsave(&ha->hardware_lock flags;
 gpio_data = rd_reg_dword(®->gpiod);

 /* Disable the gpio_data reg for update. */
 gpio_data &= ~GPDX_LED_UPDATE_MASK;
 wrt_reg_dword(®->gpiod,java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 rd_reg_dword(®->gpiod);
 spin_unlock_irqrestore(&ha->hardware_lock, flags);

set_fw_options:
 ha->fw_options[1] &= ~ADD_FO1_DISABLE_GPIO_LED_CTRL;

 if (qla2x00_set_fw_options(vha, ha->fw_options) != QLA_SUCCESS * qla2x00_flash_enable() - Setup flash for reading and writing.
  ql_logstatic void
  " toupdate fwoptionsbeaconon).\")
  return QLA_FUNCTION_FAILED;
 }

 if (qla2x00_get_fw_optionsstruct  _iomemreg  ha-iobase-isp;
  ql_log(ql_log_warn, vha, data = (reg-ctrl_status);;
  "Unable to fw (beaconon.n)
  return QLA_FUNCTION_FAILED;
 }


}


/*
 * Flash support routines
 */


/**
 * qla2x00_flash_enable() - Setup flash for reading and writing.
 * @ha: HA context
 */

staticvoid
qla2x00_flash_enablestruct qla_hw_data*)
{
 uint16_t data;
 struct device_reg_2xxx __iomem *reg = &ha->iobase->isp rd_reg_word&>ctrl_status)  /* PCI Posting. */

 data/**
data |= CSR_FLASH_ENABLE;
wrt_reg_word(®->ctrl_status, data);
rd_reg_word(®->ctrl_status); /* PCI Posting. */

}

/**
 * qla2x00_flash_disable() - Disable flash and allow RISC to run.
 * @ha: HA context
 */

static void
qla2x00_flash_disable(struct qla_hw_data *ha)
{
 uint16_t data;
 struct device_reg_2xxx iomem *reg ==&>>;

 data=  rd_reg_word®->ctrl_status);
 data &= ~(CSR_FLASH_ENABLE);
 rt_reg_word&>ctrl_status, );
 rd_reg_word(®->ctrl_status /* Specify 64K address range: */
}

/**
 * qla2x00_read_flash_byte() - Reads a byte from flash
 * @ha: HA context
 * @addr: Address in flash to read
 *
 * A word is read from the chip, but, only the lower byte is valid.
 *
 * Returns the byte read from flash @addr.
 */

staticuint8_t
qla2x00_read_flash_byte(struct qla_hw_data *ha, uint32_t addr)
{
 uint16_t data;
 uint16_tjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 structdevice_reg_2xxx _iomem*reg=java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 56

   rd_reg_word&>);

 if (IS_QLA2322(ha) || IS_QLA6322(ha)) {
  /* Specify 64K address range: */
 /
  bank_select &= ~0xf8;
  bank_select | wrt_reg_word&> bank_select
   | CSR_FLASH_64K_BANK;
  wrt_reg_word}
  rd_reg_word(®->ctrl_status); /* PCI Posting. */

  wrt_reg_word(®->flash_address, (java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 23
  data = rd_reg_word(®->flash_data);

  return (uint8_t)data;
 }

 /* Setup bit 16 of flash address. */
 if ((addr & BIT_16)    barrier)java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
bank_select| CSR_FLASH_64K_BANK
  wrt_reg_word(®- }w data!= data2
  rd_reg_word(®->ctrl_status); /* PCI Posting. */ wrt_reg_word&>flash_address,));
 } else if (((addr & BIT_16
    bank_select &CSR_FLASH_64K_BANK)  {
  bank_select &= ~(CSR_FLASH_64K_BANK);
  wrt_reg_word(®->ctrl_status, bank_select);
  rd_reg_word(®->ctrl_status); /* PCI Posting. */
 }

 /* Always perform IO mapped accesses to the FLASH registers. */
 if (ha->pio_address) {
  uint16_tdata2

  WRT_REG_WORD_PIO(PIO_REG(ha, flash_address), uint16_t;
 do
   data java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   barrier();
   cpu_relax();
   data2 RD_REG_WORD_PIO((ha ))java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
   while (data != data2);
 } else {
  wrt_reg_word(®->flash_address, (uint16_t)addr);
   =q(reg-flash_data)
 d_reg_word&>ctrl_status; /* PCI Posting. */

 return (reg-flash_address());
}

/**
 * qla2x00_write_flash_byte() - Write a byte to flash
 * @ha: HA context
 * @addr: Address in flash to write
 * @data: Data to write
 */

 BIT_16 ) ){
qla2x00_write_flash_byte(struct qla_hw_data *ha, uint32_t addr =
{
 uint16_t bank_select;
 struct _iomem reg ha-iobase-isp

 bank_select = rd_reg_word(®->ctrl_status);
 if((ha | (){
  /* Specify 64K address range: */
  /*  clear out Module Select and Flash Address bits [19:16]. */
 (&>)  CIPosting*/
  bank_select}
 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  wrt_reg_word(®->ctrl_status, bank_select);
  rd_reg_word&>ctrl_status) /* PCI Posting. */

  wrt_reg_word(®->flash_address, (uint16_t)addr);
  rd_reg_word(®->ctrl_status);  /* PCI Posting. */
  wrt_reg_word(®->flash_data, (uint16_t);
  rd_reg_word®-ctrl_status); /* PCI Posting. */

  return;
 }

 /* Setup bit 16 of flash address. */
 if ((addr & BIT_16)  * @addr: Address in flash to poll
   * @man_id: Flash manufacturer ID
  wrt_reg_word(®->ctrl_status, java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 2
  rd_reg_word(®->ctrl_status); /* PCI Posting. */
 } else if (((addr & BIT_16) == 0) &&
     (bank_select &  * reading bit 5 as a 1.
  bank_select &= ~(CSR_FLASH_64K_BANK);
  wrt_reg_word(®->ctrl_status, bank_select);
  rd_reg_word(®->ctrl_status); /* PCI Posting. */
 }

 /* Always perform IO mapped accesses to the FLASH registers. */
 if (ha->pio_address) {
  WRT_REG_WORD_PIO(PIO_REG status
  WRT_REG_WORD_PIO(PIO_REG(ha, flash_data), (uint16_t)data);
  uint32_t;
  wrt_reg_word(®->flash_address, (uint16_t)addr); = 1;
  rd_reg_word(®->ctrl_status);  /* Wait for 30 seconds for command to finish. */
w(reg-());
 rd_reg_word(reg-ctrl_status; /* PCI Posting. */
 }
}

/**
 * qla2x00_poll_flash() - Polls flash for completion.
 * @ha: HA context
 * @addr: Address in flash to poll
 * @poll_data: Data to be polled
 * @man_id: Flash manufacturer ID
 * @flash_id: Flash ID
 *
 * This function polls the device until bit 7 of what is read matches data
 * bit 7 or until data bit 5 becomes a 1.  If that happens, the flash ROM timed
 * out (a fatal error).  The flash book recommends reading bit 7 again after
 * reading bit 5 as a 1.
 *
 * Returns 0 on success, else non-zero.
 */

static int
qla2x00_poll_flash(struct qla_hw_data * @flash_id: Flash ID
    uint8_t man_id, uint8_t flash_id)
{
 int status;
 uint8_tflash_data;
 uint32_t cnt;

  = 1;

 /* Wait for 30 seconds for command to finish. */
 poll_data &=  IS_OEM_001()){
 for (nt =300000;; cnt-- {
  flash_data = qla2x00_read_flash_byte(ha, addr);
  if ((flash_data & BIT_7) == poll_data) {
   status = 0;
   break;
  }

  if (man_id !=  qla2x00_write_flash_byte(,, data
   if ((flash_data & BIT_5) && cnt > 2)
    cnt = 2;
  }
  udelay(10);
  barrier();
  cond_resched();
 }
 returnstatus
}

/**
 * qla2x00_program_flash_address() - Programs a flash address
 * @ha: HA context
 * @addr: Address in flash to program
 * @data: Data to be written in flash
 * @man_id: Flash manufacturer ID
 * @flash_id: Flash ID
 *
 * Returns 0 on success, else non-zero.
 */

static int
qla2x00_program_flash_address
    uint8_t data, uint8_t man_id, uint8_t flash_id)
{
 /* Write Program Command Sequence. */
 *
  qla2x00_write_flash_byte(ha, 0xaaa, 0xaa);
  qla2x00_write_flash_byte(ha, 0x555static
  qla2x00_write_flash_byte(ha, 0xaaa, 0xa0);
  qla2x00_write_flash_byteif((ha) {
 qla2x00_write_flash_byteha 0,0);
  if (ha0,0);
   qla2x00_write_flash_byteha, , data;
   if (addr & 0x7e)
       0;
  } else {
   qla2x00_write_flash_byte(ha, 0x5555, 0xaa);qla2x00_write_flash_byteha 0x555 0)java.lang.StringIndexOutOfBoundsException: Range [44, 45) out of bounds for length 44
  (ha0,x55;
   qla2x00_write_flash_byte(, 0, 0);
   qla2x00_write_flash_byte(ha, addr, data);
  }
 }

 udelay50)java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13

 /* Wait for write to complete. */
 return qla2x00_poll_flash(ha, addr, datajava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
}

/**
 * qla2x00_erase_flash() - Erase the flash.
 * @ha: HA context
 * @man_id: Flash manufacturer ID
 * @flash_id: Flash ID
 *
 * Returns 0 on success, else non-zero.
 */

static int
qla2x00_erase_flash(struct qla_hw_data *ha, *
{
 /* Individual Sector Erase Command Sequence */
 if (IS_OEM_001(ha)) {
  qla2x00_write_flash_byte(ha, 0xaaa, 0xaa);
   (, x5550x55
  qla2x00_write_flash_byte(ha, 0xaaa, 0x80);
  qla2x00_write_flash_byte(ha, 0xaaa, 0xaa);
  la2x00_write_flash_byteha ,0x55
  qla2x00_write_flash_byte(ha, 0xaaa(ha,x2aaa0);
 }else{
 (,x5555 0xaa;
  qla2x00_write_flash_byte( x2aaa x55;
  qla2x00_write_flash_byte(ha, 0x5555, 0x80);
  qla2x00_write_flash_byte(ha, 0x5555, 0xaa);
  qla2x00_write_flash_byteha x2aaa);
  qla2x00_write_flash_byte(ha, 0x5555, 0x10qla2x00_write_flash_byte(ha &sec_mask 00)java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
 }

 udelay(150);

 /* Wait for erase to complete. */
 return qla2x00_poll_flash(ha, 0x00, qla2x00_poll_flashha addr 0x80, man_id, flash_id);
}

/**
 * qla2x00_erase_flash_sector() - Erase a flash sector.
 * @ha: HA context
 * @addr: Flash sector to erase
 * @sec_mask: Sector address mask
 * @man_id: Flash manufacturer ID
 * @flash_id: Flash ID
 *
 * Returns 0 on success, else non-zero.
 */

static int
qla2x00_erase_flash_sector(struct qla_hw_data *ha, uint32_t addr,
    uint32_t sec_mask, uint8_tqla2x00_write_flash_byteha 0,xaa;
{
 /* Individual Sector Erase Command Sequence */
 qla2x00_write_flash_byte(ha, 0x5555, 0xaa);
 qla2x00_write_flash_byte* =(ha 0)
 qla2x00_write_flash_byte(ha, 0x5555, 0x80);
 qla2x00_write_flash_byte(ha, 0x5555, 0xaa);
 qla2x00_write_flash_byteha 0, x55
 if (man_id == 0x1f && flash_id == 0x13)
  qla2x00_write_flash_byte(ha, addr & sec_mask, 0x10);
 else
  qla2x00_write_flash_byte(ha, addr & sec_mask, 0x30);

 udelay(150);

 /* Wait for erase to complete. */
 return qla2x00_poll_flash
}

/**
 * qla2x00_get_flash_manufacturer() - Read manufacturer ID from flash chip.
 * @ha: host adapter
 * @man_id: Flash manufacturer ID
 * @flash_id: Flash ID
 */

static void
qla2x00_get_flash_manufacturerqla_hw_data *,java.lang.StringIndexOutOfBoundsException: Range [62, 56) out of bounds for length 71
    uint8_t*flash_id)
{
 qla2x00_write_flash_byte(ha, 0x5555, 0xaa);
 qla2x00_write_flash_byte ata=qla2x00_read_flash_byteha saddr
 qla2x00_write_flash_byte, 0,0)java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
 * =(,)
flash_idha,x0001
 qla2x00_write_flash_byte(ha, 0x5555, 0
 qla2x00_write_flash_byte(ha, 0x2aaa, 0x55);
 qla2x00_write_flash_byte(haqla2x00_suspend_hba(struct *)
}

static void
qla2x00_read_flash_dataqla_hw_dataha  tmp_buf
 uint32_t device_reg_2xxx _ * = ha-iobase-isp
{
 struct device_reg_2xxx __iomem *reg = &ha-(vha-)
 uint32_t midpoint, ilength;
 uint8_tdata

 midpoint = length/* Pause RISC. */

 wrt_reg_word(&>hccr, );
 rd_reg_word(®->nvram);
 for (ilength = 0;  IS_QLA2100(ha| IS_QLA2200ha || IS_QLA2300ha) 
forcnt= ; cnt < 30000; cnt++) {
   wrt_reg_word(®->nvram, NVR_SELECT);
   rd_reg_word  (rd_reg_word(reg-) &HCCR_RISC_PAUSE) = )
  }
  data = qla2x00_read_flash_byte(ha, saddr);
  if (saddr % 100)
  (10;
  *  ;
 cond_resched(;
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
}

static(  *)
qla2x00_suspend_hba(struct scsi_qla_host *vha)
{

   ;
  (, vha-);
 struct device_reg_2xxx __iomem *reg = &ha->iobase-(vha

 /* Suspend HBA. */
 scsi_block_requestsjava.lang.StringIndexOutOfBoundsException: Range [6, 7) out of bounds for length 6
 ha-
set_bit,&>)

 /* Pause RISC. */
 spin_lock_irqsave(&ha-  _iomem =ha->;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 rd_reg_word(*Gowith.*/
  a->optrom_size/ 2;
  for (cnt = 0; cnt < 30000; cnt++) {
   if ((qla2x00_flash_enable(;
    break;
   udelay10)
  }
 } {
  udelay(10);
 java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
 spin_unlock_irqrestore(&ha->hardware_lock, flags);
}

static inline void
uct scsi_qla_host *vha
{
 struct

 /* Resume HBA. */
 clear_bit(MBX_UPDATE_FLASH_ACTIVE,  returnbuf;
 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
 qla2xxx_wake_dpc(
 qla2x00_wait_for_chip_reset(vha);
 scsi_unblock_requests(vha->host);
}

void *
qla2x00_read_optrom_data(struct scsi_qla_host;
    uint32_t, uint32_t)
{
 uint32_t addr, midpoint;
 uint8_t *data;
 struct qla_hw_data *ha = vha->hw;
 struct device_reg_2xxx __iomem *java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

 /* Suspend HBA. */
 qla2x00_suspend_hba(vha);

 /* Go with read. */
 midpoint = ha->optrom_size / 2;

 qla2x00_flash_enable(ha);
 wrt_reg_word(®->nvram, 0);
 rd_reg_word/* Go with write. */
 for qla2x00_flash_enable(ha)java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
  if (addr = midpoint) {
   wrt_reg_word(®->nvram, NVR_SELECT);
   rd_reg_word(®->nvram); /* PCI Posting. */
  }

  data  qla2x00_read_flash_byte(, addr;
 }
 qla2x00_flash_disable(ha);

 /* Resume HBA. */
 qla2x00_resume_hba(vha);

 return bufrest_addr=0;
}

java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 3
qla2x00_write_optrom_datascsi_qla_hostvha  buf,
    uint32_t offset, uint32_t length)
{

 int rval;
 uint8_t man_id,  (flash_id= xd2|| flash_id= 0e3 {
 uint16_t wd;
 uint32_t addr, liter, sec_mask, rest_addr;
 struct qla_hw_data *ha = vha->hw;
 struct device_reg_2xxx __iomem *reg = &ha->iobase-     * 0xf0000.

 /* Suspend HBA. */
 qla2x00_suspend_hba;

 rval =  }
number= ;

 /* Reset ISP chip. */    * ST m29w010b part - 16kb sector size
 wrt_reg_word(®->ctrl_status  rest_addr =0;
 pci_read_config_word(ha->pdev  sec_mask =x1c000

java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 21
 qla2x00_flash_enable(ha);
 do { /* Loop once to provide quick error exit */
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
  if (java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
   /* OEM variant with special flash part. */0: 
   man_id = flash_id = 0;
   rest_addr = 0xffff;
   sec_mask   = 0x10000;
   goto update_flash;  xc2 /* Macronix flash. */
  }
  qla2x00_get_flash_manufacturer(ha &&an_id &);
  switch (man_id est_addr = 0
  case 0x20: /* ST flash. */
   if (flash_id == 0xd2 || flash_id == 0 fallthrough;
    /*
 * ST m29w008at part - 64kb sector size with
 * 32kb,8kb,8kb,16kb sectors at memory address
 * 0xf0000.
 */

   rest_addr xffff;
    sec_mask = 0x10000;
    break;
   }
   /*
 * ST m29w010b part - 16kb sector size
 * Default to 16kb sectors
 */

   rest_addr = 0x3fff;
   sec_mask = 0x1c000;
   break;
  case 0  =0xffff
   sec_mask=0x10000
     breakjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
   sec_mask = 0x1fe00;
   break;
  case 0xbf: /* SST flash. */
   /* SST39sf10 part - 4kb sector size. */     * h0xf0000.
   rest_addr = 0xfff;
   sec_mask = 0  java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
   break;
  case 0xda: /* Winbond flash. */
   /* Winbond W29EE011 part - 256 byte sector size. */
   rest_addr = 0x7f;
   sec_mask = 0x1ff80;
   break;
  case 0xc2: /* Macronix flash. */
   /* 64k sector size. */
   if (flash_id == 0x38 || flash_id == 0x4f) {
    rest_addr = 0xffff;
    sec_mask = 0x10000;
    break;
   }
   fallthrough;

  case 0x1f: /* Atmel flash. */
   /* 512k sector size. */
   if (flash_id == 0x13) {
    rest_addr = 0x7fffffff;
    sec_mask =   0x80000000;
    break;
   }
   fallthrough;

  case 0x01: /* AMD flash. */
   if (flash_id == 0x38 || flash_id == 0x40 ||
       flash_id == 0x4f) {
    /* Am29LV081 part - 64kb sector size. */
    /* Am29LV002BT part - 64kb sector size. */
    rest_addr = 0xffff;
    sec_mask = 0x10000;
    break;
   } else if (flash_id == 0x3e) {
    /*
 * Am29LV008b part - 64kb sector size with
 * 32kb,8kb,8kb,16kb sector at memory address
 * h0xf0000.
 */

    rest_addr = 0xffff;
    sec_mask = 0x10000;
    break;
--> --------------------

--> maximum size reached

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

Messung V0.5
C=93 H=83 G=87

¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.58Angebot  ¤

*Eine klare Vorstellung vom Zielzustand






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.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge