Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
megaraid_sas_fp.c File Reference
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/pci.h>
#include <linux/list.h>
#include <linux/moduleparam.h>
#include <linux/module.h>
#include <linux/spinlock.h>
#include <linux/interrupt.h>
#include <linux/delay.h>
#include <linux/uio.h>
#include <linux/uaccess.h>
#include <linux/fs.h>
#include <linux/compat.h>
#include <linux/blkdev.h>
#include <linux/poll.h>
#include <scsi/scsi.h>
#include <scsi/scsi_cmnd.h>
#include <scsi/scsi_device.h>
#include <scsi/scsi_host.h>
#include "megaraid_sas_fusion.h"
#include "megaraid_sas.h"
#include <asm/div64.h>

Go to the source code of this file.

Macros

#define ABS_DIFF(a, b)   (((a) > (b)) ? ((a) - (b)) : ((b) - (a)))
 
#define MR_LD_STATE_OPTIMAL   3
 
#define FALSE   0
 
#define TRUE   1
 

Functions

void mr_update_load_balance_params (struct MR_FW_RAID_MAP_ALL *map, struct LD_LOAD_BALANCE_INFO *lbInfo)
 
u32 mega_mod64 (u64 dividend, u32 divisor)
 
u64 mega_div64_32 (uint64_t dividend, uint32_t divisor)
 
struct MR_LD_RAIDMR_LdRaidGet (u32 ld, struct MR_FW_RAID_MAP_ALL *map)
 
u16 MR_GetLDTgtId (u32 ld, struct MR_FW_RAID_MAP_ALL *map)
 
u16 MR_TargetIdToLdGet (u32 ldTgtId, struct MR_FW_RAID_MAP_ALL *map)
 
u8 MR_ValidateMapInfo (struct MR_FW_RAID_MAP_ALL *map, struct LD_LOAD_BALANCE_INFO *lbInfo)
 
u32 MR_GetSpanBlock (u32 ld, u64 row, u64 *span_blk, struct MR_FW_RAID_MAP_ALL *map, int *div_error)
 
u8 MR_GetPhyParams (struct megasas_instance *instance, u32 ld, u64 stripRow, u16 stripRef, u64 *pdBlock, u16 *pDevHandle, struct RAID_CONTEXT *pRAID_Context, struct MR_FW_RAID_MAP_ALL *map)
 
u8 MR_BuildRaidContext (struct megasas_instance *instance, struct IO_REQUEST_INFO *io_info, struct RAID_CONTEXT *pRAID_Context, struct MR_FW_RAID_MAP_ALL *map)
 
u8 megasas_get_best_arm (struct LD_LOAD_BALANCE_INFO *lbInfo, u8 arm, u64 block, u32 count)
 
u16 get_updated_dev_handle (struct LD_LOAD_BALANCE_INFO *lbInfo, struct IO_REQUEST_INFO *io_info)
 

Macro Definition Documentation

#define ABS_DIFF (   a,
  b 
)    (((a) > (b)) ? ((a) - (b)) : ((b) - (a)))

Definition at line 58 of file megaraid_sas_fp.c.

#define FALSE   0

Definition at line 60 of file megaraid_sas_fp.c.

#define MR_LD_STATE_OPTIMAL   3

Definition at line 59 of file megaraid_sas_fp.c.

#define TRUE   1

Definition at line 61 of file megaraid_sas_fp.c.

Function Documentation

u16 get_updated_dev_handle ( struct LD_LOAD_BALANCE_INFO lbInfo,
struct IO_REQUEST_INFO io_info 
)

Definition at line 516 of file megaraid_sas_fp.c.

u64 mega_div64_32 ( uint64_t  dividend,
uint32_t  divisor 
)
Parameters
dividend: Dividend
divisor: Divisor
Returns
quotient

Definition at line 86 of file megaraid_sas_fp.c.

u32 mega_mod64 ( u64  dividend,
u32  divisor 
)

Definition at line 68 of file megaraid_sas_fp.c.

u8 megasas_get_best_arm ( struct LD_LOAD_BALANCE_INFO lbInfo,
u8  arm,
u64  block,
u32  count 
)

Definition at line 490 of file megaraid_sas_fp.c.

u8 MR_BuildRaidContext ( struct megasas_instance instance,
struct IO_REQUEST_INFO io_info,
struct RAID_CONTEXT pRAID_Context,
struct MR_FW_RAID_MAP_ALL map 
)

Definition at line 314 of file megaraid_sas_fp.c.

u16 MR_GetLDTgtId ( u32  ld,
struct MR_FW_RAID_MAP_ALL map 
)

Definition at line 132 of file megaraid_sas_fp.c.

u8 MR_GetPhyParams ( struct megasas_instance instance,
u32  ld,
u64  stripRow,
u16  stripRef,
u64 pdBlock,
u16 pDevHandle,
struct RAID_CONTEXT pRAID_Context,
struct MR_FW_RAID_MAP_ALL map 
)

Definition at line 230 of file megaraid_sas_fp.c.

u32 MR_GetSpanBlock ( u32  ld,
u64  row,
u64 span_blk,
struct MR_FW_RAID_MAP_ALL map,
int div_error 
)

Definition at line 175 of file megaraid_sas_fp.c.

struct MR_LD_RAID* MR_LdRaidGet ( u32  ld,
struct MR_FW_RAID_MAP_ALL map 
)
read

Definition at line 100 of file megaraid_sas_fp.c.

u16 MR_TargetIdToLdGet ( u32  ldTgtId,
struct MR_FW_RAID_MAP_ALL map 
)

Definition at line 137 of file megaraid_sas_fp.c.

void mr_update_load_balance_params ( struct MR_FW_RAID_MAP_ALL map,
struct LD_LOAD_BALANCE_INFO lbInfo 
)

Definition at line 447 of file megaraid_sas_fp.c.

u8 MR_ValidateMapInfo ( struct MR_FW_RAID_MAP_ALL map,
struct LD_LOAD_BALANCE_INFO lbInfo 
)

Definition at line 151 of file megaraid_sas_fp.c.