Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
aic94xx_sds.c File Reference
#include <linux/pci.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include "aic94xx.h"
#include "aic94xx_reg.h"
#include "aic94xx_sds.h"

Go to the source code of this file.

Data Structures

struct  asd_ocm_dir_ent
 
struct  asd_ocm_dir
 
struct  asd_bios_chim_struct
 
struct  asd_flash_de
 
struct  asd_flash_dir
 
struct  asd_manuf_sec
 
struct  asd_manuf_phy_desc
 
struct  asd_manuf_phy_param
 
struct  asd_ms_sb_desc
 
struct  asd_ms_conn_desc
 
struct  asd_nd_phy_desc
 
struct  asd_ms_node_desc
 
struct  asd_ms_conn_map
 
struct  asd_ctrla_phy_entry
 
struct  asd_ctrla_phy_settings
 
struct  asd_ll_el
 

Macros

#define OCM_DE_OCM_DIR   0x00
 
#define OCM_DE_WIN_DRVR   0x01
 
#define OCM_DE_BIOS_CHIM   0x02
 
#define OCM_DE_RAID_ENGN   0x03
 
#define OCM_DE_BIOS_INTL   0x04
 
#define OCM_DE_BIOS_CHIM_OSM   0x05
 
#define OCM_DE_BIOS_CHIM_DYNAMIC   0x06
 
#define OCM_DE_ADDC2C_RES0   0x07
 
#define OCM_DE_ADDC2C_RES1   0x08
 
#define OCM_DE_ADDC2C_RES2   0x09
 
#define OCM_DE_ADDC2C_RES3   0x0A
 
#define OCM_INIT_DIR_ENTRIES   5
 
#define THREE_TO_NUM(X)   ((X)[0] | ((X)[1] << 8) | ((X)[2] << 16))
 
#define OCM_BIOS_CHIM_DE   2
 
#define BC_BIOS_PRESENT   1
 
#define FLASH_RESET   0xF0
 
#define ASD_FLASH_SIZE   0x200000
 
#define FLASH_DIR_COOKIE   "*** ADAPTEC FLASH DIRECTORY *** "
 
#define FLASH_NEXT_ENTRY_OFFS   0x2000
 
#define FLASH_MAX_DIR_ENTRIES   32
 
#define FLASH_DE_TYPE_MASK   0x3FFFFFFF
 
#define FLASH_DE_MS   0x120
 
#define FLASH_DE_CTRL_A_USER   0xE0
 
#define MS_PHY_STATE_ENABLED   0
 
#define MS_PHY_STATE_REPORTED   1
 
#define MS_PHY_STATE_HIDDEN   2
 

Functions

struct asd_ocm_dir_ent __attribute__ ((packed))
 
int asd_read_ocm (struct asd_ha_struct *asd_ha)
 
int asd_read_flash (struct asd_ha_struct *asd_ha)
 
int asd_verify_flash_seg (struct asd_ha_struct *asd_ha, const void *src, u32 dest_offset, u32 bytes_to_verify)
 
int asd_write_flash_seg (struct asd_ha_struct *asd_ha, const void *src, u32 dest_offset, u32 bytes_to_write)
 
int asd_chk_write_status (struct asd_ha_struct *asd_ha, u32 sector_addr, u8 erase_flag)
 
int asd_erase_nv_sector (struct asd_ha_struct *asd_ha, u32 flash_addr, u32 size)
 
int asd_check_flash_type (struct asd_ha_struct *asd_ha)
 

Variables

u8 type
 
u8 offs [3]
 
u8 _r1
 
u8 size [3]
 
char sig [2]
 
u8 major
 
u8 minor
 
u8 _r2
 
u8 num_de
 
struct asd_ocm_dir_ent entry [15]
 
u8 bios_major
 
u8 bios_minor
 
__le32 bios_build
 
u8 flags
 
u8 pci_slot
 
__le16 ue_num
 
__le16 ue_size
 
u8 _r [14]
 
__le32 pad_size
 
__le32 image_size
 
__le32 chksum
 
u8 version [32]
 
u8 cookie [32]
 
__le32 rev
 
__le32 chksum_antidote
 
__le32 bld
 
u8 bld_id [32]
 
u8 ver_data [32]
 
__le32 ae_mask
 
__le32 v_mask
 
__le32 oc_mask
 
struct asd_flash_de dir_entry [FLASH_MAX_DIR_ENTRIES]
 
u16 offs_next
 
u8 maj
 
u8 min
 
u8 sas_addr [SAS_ADDR_SIZE]
 
u8 pcba_sn [ASD_PCBA_SN_SIZE]
 
u8 linked_list [0]
 
u8 state
 
u8 phy_id
 
u8 phy_control_0
 
u8 phy_control_1
 
u8 phy_control_2
 
u8 phy_control_3
 
u16 next
 
u8 num_phy_desc
 
u8 phy_desc_size
 
u8 usage_model_id
 
struct asd_manuf_phy_desc phy_desc [ASD_MAX_PHYS]
 
u8 node_desc_index
 
u8 conn_desc_index
 
u8 _recvd [0]
 
u8 location
 
u8 num_sideband_desc
 
u8 size_sideband_desc
 
u32 _resvd
 
u8 name [16]
 
struct asd_ms_sb_desc sb_desc [0]
 
u8 vp_attch_type
 
u8 attch_specific [0]
 
u8 size_phy_desc
 
__le16 cm_size
 
u8 num_conn
 
u8 conn_size
 
u8 num_nodes
 
struct asd_ms_conn_desc conn_desc [0]
 
struct asd_ms_node_desc node_desc [0]
 
u8 sas_link_rates
 
u8 sata_link_rates
 
u8 id0
 
u8 num_phys
 
struct asd_ctrla_phy_entry phy_ent [ASD_MAX_PHYS]
 
u8 id1
 
u8 something_here [0]
 

Macro Definition Documentation

#define ASD_FLASH_SIZE   0x200000

Definition at line 382 of file aic94xx_sds.c.

#define BC_BIOS_PRESENT   1

Definition at line 213 of file aic94xx_sds.c.

#define FLASH_DE_CTRL_A_USER   0xE0

Definition at line 389 of file aic94xx_sds.c.

#define FLASH_DE_MS   0x120

Definition at line 388 of file aic94xx_sds.c.

#define FLASH_DE_TYPE_MASK   0x3FFFFFFF

Definition at line 387 of file aic94xx_sds.c.

#define FLASH_DIR_COOKIE   "*** ADAPTEC FLASH DIRECTORY *** "

Definition at line 383 of file aic94xx_sds.c.

#define FLASH_MAX_DIR_ENTRIES   32

Definition at line 385 of file aic94xx_sds.c.

#define FLASH_NEXT_ENTRY_OFFS   0x2000

Definition at line 384 of file aic94xx_sds.c.

#define FLASH_RESET   0xF0

Definition at line 380 of file aic94xx_sds.c.

#define MS_PHY_STATE_ENABLED   0

Definition at line 443 of file aic94xx_sds.c.

#define MS_PHY_STATE_HIDDEN   2

Definition at line 445 of file aic94xx_sds.c.

#define MS_PHY_STATE_REPORTED   1

Definition at line 444 of file aic94xx_sds.c.

#define OCM_BIOS_CHIM_DE   2

Definition at line 212 of file aic94xx_sds.c.

#define OCM_DE_ADDC2C_RES0   0x07

Definition at line 62 of file aic94xx_sds.c.

#define OCM_DE_ADDC2C_RES1   0x08

Definition at line 63 of file aic94xx_sds.c.

#define OCM_DE_ADDC2C_RES2   0x09

Definition at line 64 of file aic94xx_sds.c.

#define OCM_DE_ADDC2C_RES3   0x0A

Definition at line 65 of file aic94xx_sds.c.

#define OCM_DE_BIOS_CHIM   0x02

Definition at line 57 of file aic94xx_sds.c.

#define OCM_DE_BIOS_CHIM_DYNAMIC   0x06

Definition at line 61 of file aic94xx_sds.c.

#define OCM_DE_BIOS_CHIM_OSM   0x05

Definition at line 60 of file aic94xx_sds.c.

#define OCM_DE_BIOS_INTL   0x04

Definition at line 59 of file aic94xx_sds.c.

#define OCM_DE_OCM_DIR   0x00

Definition at line 55 of file aic94xx_sds.c.

#define OCM_DE_RAID_ENGN   0x03

Definition at line 58 of file aic94xx_sds.c.

#define OCM_DE_WIN_DRVR   0x01

Definition at line 56 of file aic94xx_sds.c.

#define OCM_INIT_DIR_ENTRIES   5

Definition at line 67 of file aic94xx_sds.c.

#define THREE_TO_NUM (   X)    ((X)[0] | ((X)[1] << 8) | ((X)[2] << 16))

Definition at line 192 of file aic94xx_sds.c.

Function Documentation

struct asd_ocm_dir_ent __attribute__ ( (packed)  )
read

Definition at line 171 of file esd_usb2.c.

int asd_check_flash_type ( struct asd_ha_struct asd_ha)

Definition at line 1314 of file aic94xx_sds.c.

int asd_chk_write_status ( struct asd_ha_struct asd_ha,
u32  sector_addr,
u8  erase_flag 
)

Definition at line 1206 of file aic94xx_sds.c.

int asd_erase_nv_sector ( struct asd_ha_struct asd_ha,
u32  flash_addr,
u32  size 
)

asd_hwi_erase_nv_sector - Erase the flash memory sectors. : pointer to the host adapter structure : pointer to offset from flash memory : total bytes to erase.

Definition at line 1269 of file aic94xx_sds.c.

int asd_read_flash ( struct asd_ha_struct asd_ha)

asd_read_flash - read flash memory : pointer to the host adapter structure

Definition at line 1047 of file aic94xx_sds.c.

int asd_read_ocm ( struct asd_ha_struct asd_ha)

asd_read_ocm - read on chip memory (OCM) : pointer to the host adapter structure

Definition at line 354 of file aic94xx_sds.c.

int asd_verify_flash_seg ( struct asd_ha_struct asd_ha,
const void src,
u32  dest_offset,
u32  bytes_to_verify 
)

asd_verify_flash_seg - verify data with flash memory : pointer to the host adapter structure : pointer to the source data to be verified : offset from flash memory : total bytes to verify

Definition at line 1096 of file aic94xx_sds.c.

int asd_write_flash_seg ( struct asd_ha_struct asd_ha,
const void src,
u32  dest_offset,
u32  bytes_to_write 
)

asd_write_flash_seg - write data into flash memory : pointer to the host adapter structure : pointer to the source data to be written : offset from flash memory : total bytes to write

Definition at line 1127 of file aic94xx_sds.c.

Variable Documentation

u8 _r

Definition at line 134 of file aic94xx_sds.c.

u8 _r1

Definition at line 46 of file aic94xx_sds.c.

u8 _r2

Definition at line 58 of file aic94xx_sds.c.

u8 _recvd[0]

Definition at line 475 of file aic94xx_sds.c.

u32 _resvd

Definition at line 505 of file aic94xx_sds.c.

__le32 ae_mask

Definition at line 422 of file aic94xx_sds.c.

u8 attch_specific[0]

Definition at line 507 of file aic94xx_sds.c.

__le32 bios_build

Definition at line 129 of file aic94xx_sds.c.

u8 bios_major

Definition at line 127 of file aic94xx_sds.c.

u8 bios_minor

Definition at line 128 of file aic94xx_sds.c.

__le32 bld

Definition at line 419 of file aic94xx_sds.c.

u8 bld_id[32]

Definition at line 420 of file aic94xx_sds.c.

u16 chksum

Definition at line 404 of file aic94xx_sds.c.

__le32 chksum_antidote

Definition at line 418 of file aic94xx_sds.c.

__le16 cm_size

Definition at line 545 of file aic94xx_sds.c.

struct asd_ms_conn_desc conn_desc[0]

Definition at line 551 of file aic94xx_sds.c.

u8 conn_desc_index

Definition at line 474 of file aic94xx_sds.c.

u8 conn_size

Definition at line 547 of file aic94xx_sds.c.

__le64 cookie

Definition at line 415 of file aic94xx_sds.c.

Definition at line 426 of file aic94xx_sds.c.

Definition at line 60 of file aic94xx_sds.c.

u8 flags

Definition at line 130 of file aic94xx_sds.c.

u8 id0

Definition at line 558 of file aic94xx_sds.c.

u8 id1

Definition at line 566 of file aic94xx_sds.c.

Definition at line 403 of file aic94xx_sds.c.

u8 linked_list[0]

Definition at line 439 of file aic94xx_sds.c.

Definition at line 502 of file aic94xx_sds.c.

u8 maj

Definition at line 431 of file aic94xx_sds.c.

u8 major

Definition at line 56 of file aic94xx_sds.c.

u8 min

Definition at line 432 of file aic94xx_sds.c.

u8 minor

Definition at line 57 of file aic94xx_sds.c.

u8 name[16]

Definition at line 506 of file aic94xx_sds.c.

__le16 next

Definition at line 456 of file aic94xx_sds.c.

struct asd_ms_node_desc node_desc[0]

Definition at line 552 of file aic94xx_sds.c.

u8 node_desc_index

Definition at line 473 of file aic94xx_sds.c.

u8 num_conn

Definition at line 546 of file aic94xx_sds.c.

u8 num_de

Definition at line 59 of file aic94xx_sds.c.

u8 num_nodes

Definition at line 548 of file aic94xx_sds.c.

u8 num_phy_desc

Definition at line 459 of file aic94xx_sds.c.

u8 num_phys

Definition at line 561 of file aic94xx_sds.c.

u8 num_sideband_desc

Definition at line 503 of file aic94xx_sds.c.

__le32 oc_mask

Definition at line 424 of file aic94xx_sds.c.

__le32 offs

Definition at line 45 of file aic94xx_sds.c.

u16 offs_next

Definition at line 430 of file aic94xx_sds.c.

__le32 pad_size

Definition at line 402 of file aic94xx_sds.c.

u8 pcba_sn[ASD_PCBA_SN_SIZE]

Definition at line 437 of file aic94xx_sds.c.

Definition at line 131 of file aic94xx_sds.c.

u8 phy_control_0

Definition at line 448 of file aic94xx_sds.c.

u8 phy_control_1

Definition at line 449 of file aic94xx_sds.c.

u8 phy_control_2

Definition at line 450 of file aic94xx_sds.c.

u8 phy_control_3

Definition at line 451 of file aic94xx_sds.c.

Definition at line 464 of file aic94xx_sds.c.

u8 phy_desc_size

Definition at line 460 of file aic94xx_sds.c.

Definition at line 563 of file aic94xx_sds.c.

u8 phy_id

Definition at line 446 of file aic94xx_sds.c.

__le32 rev

Definition at line 416 of file aic94xx_sds.c.

u8 sas_addr

Definition at line 436 of file aic94xx_sds.c.

u8 sas_link_rates

Definition at line 550 of file aic94xx_sds.c.

u8 sata_link_rates

Definition at line 552 of file aic94xx_sds.c.

struct asd_ms_sb_desc sb_desc[0]

Definition at line 507 of file aic94xx_sds.c.

char sig[2]

Definition at line 54 of file aic94xx_sds.c.

u16 size

Definition at line 47 of file aic94xx_sds.c.

u8 size_phy_desc

Definition at line 528 of file aic94xx_sds.c.

u8 size_sideband_desc

Definition at line 504 of file aic94xx_sds.c.

u8 something_here[0]

Definition at line 568 of file aic94xx_sds.c.

Definition at line 442 of file aic94xx_sds.c.

Definition at line 44 of file aic94xx_sds.c.

__le16 ue_num

Definition at line 132 of file aic94xx_sds.c.

__le16 ue_size

Definition at line 133 of file aic94xx_sds.c.

u8 usage_model_id

Definition at line 462 of file aic94xx_sds.c.

__le32 v_mask

Definition at line 423 of file aic94xx_sds.c.

u8 ver_data[32]

Definition at line 421 of file aic94xx_sds.c.

u8 version[32]

Definition at line 406 of file aic94xx_sds.c.

u8 vp_attch_type

Definition at line 506 of file aic94xx_sds.c.