Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
mpt2sas_config.c File Reference
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/errno.h>
#include <linux/blkdev.h>
#include <linux/sched.h>
#include <linux/workqueue.h>
#include <linux/delay.h>
#include <linux/pci.h>
#include <linux/slab.h>
#include "mpt2sas_base.h"

Go to the source code of this file.

Data Structures

struct  config_request
 

Macros

#define MPT2_CONFIG_PAGE_DEFAULT_TIMEOUT   15
 
#define MPT2_CONFIG_COMMON_SGLFLAGS
 
#define MPT2_CONFIG_COMMON_WRITE_SGLFLAGS
 

Functions

u8 mpt2sas_config_done (struct MPT2SAS_ADAPTER *ioc, u16 smid, u8 msix_index, u32 reply)
 
int mpt2sas_config_get_manufacturing_pg0 (struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t *mpi_reply, Mpi2ManufacturingPage0_t *config_page)
 
int mpt2sas_config_get_manufacturing_pg10 (struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t *mpi_reply, Mpi2ManufacturingPage10_t *config_page)
 
int mpt2sas_config_get_bios_pg2 (struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t *mpi_reply, Mpi2BiosPage2_t *config_page)
 
int mpt2sas_config_get_bios_pg3 (struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t *mpi_reply, Mpi2BiosPage3_t *config_page)
 
int mpt2sas_config_get_iounit_pg0 (struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t *mpi_reply, Mpi2IOUnitPage0_t *config_page)
 
int mpt2sas_config_get_iounit_pg1 (struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t *mpi_reply, Mpi2IOUnitPage1_t *config_page)
 
int mpt2sas_config_set_iounit_pg1 (struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t *mpi_reply, Mpi2IOUnitPage1_t *config_page)
 
int mpt2sas_config_get_iounit_pg3 (struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t *mpi_reply, Mpi2IOUnitPage3_t *config_page, u16 sz)
 
int mpt2sas_config_get_ioc_pg8 (struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t *mpi_reply, Mpi2IOCPage8_t *config_page)
 
int mpt2sas_config_get_sas_device_pg0 (struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t *mpi_reply, Mpi2SasDevicePage0_t *config_page, u32 form, u32 handle)
 
int mpt2sas_config_get_sas_device_pg1 (struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t *mpi_reply, Mpi2SasDevicePage1_t *config_page, u32 form, u32 handle)
 
int mpt2sas_config_get_number_hba_phys (struct MPT2SAS_ADAPTER *ioc, u8 *num_phys)
 
int mpt2sas_config_get_sas_iounit_pg0 (struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t *mpi_reply, Mpi2SasIOUnitPage0_t *config_page, u16 sz)
 
int mpt2sas_config_get_sas_iounit_pg1 (struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t *mpi_reply, Mpi2SasIOUnitPage1_t *config_page, u16 sz)
 
int mpt2sas_config_set_sas_iounit_pg1 (struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t *mpi_reply, Mpi2SasIOUnitPage1_t *config_page, u16 sz)
 
int mpt2sas_config_get_expander_pg0 (struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t *mpi_reply, Mpi2ExpanderPage0_t *config_page, u32 form, u32 handle)
 
int mpt2sas_config_get_expander_pg1 (struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t *mpi_reply, Mpi2ExpanderPage1_t *config_page, u32 phy_number, u16 handle)
 
int mpt2sas_config_get_enclosure_pg0 (struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t *mpi_reply, Mpi2SasEnclosurePage0_t *config_page, u32 form, u32 handle)
 
int mpt2sas_config_get_phy_pg0 (struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t *mpi_reply, Mpi2SasPhyPage0_t *config_page, u32 phy_number)
 
int mpt2sas_config_get_phy_pg1 (struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t *mpi_reply, Mpi2SasPhyPage1_t *config_page, u32 phy_number)
 
int mpt2sas_config_get_raid_volume_pg1 (struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t *mpi_reply, Mpi2RaidVolPage1_t *config_page, u32 form, u32 handle)
 
int mpt2sas_config_get_number_pds (struct MPT2SAS_ADAPTER *ioc, u16 handle, u8 *num_pds)
 
int mpt2sas_config_get_raid_volume_pg0 (struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t *mpi_reply, Mpi2RaidVolPage0_t *config_page, u32 form, u32 handle, u16 sz)
 
int mpt2sas_config_get_phys_disk_pg0 (struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t *mpi_reply, Mpi2RaidPhysDiskPage0_t *config_page, u32 form, u32 form_specific)
 
int mpt2sas_config_get_volume_handle (struct MPT2SAS_ADAPTER *ioc, u16 pd_handle, u16 *volume_handle)
 
int mpt2sas_config_get_volume_wwid (struct MPT2SAS_ADAPTER *ioc, u16 volume_handle, u64 *wwid)
 

Macro Definition Documentation

#define MPT2_CONFIG_COMMON_SGLFLAGS
Value:

Definition at line 63 of file mpt2sas_config.c.

#define MPT2_CONFIG_COMMON_WRITE_SGLFLAGS
#define MPT2_CONFIG_PAGE_DEFAULT_TIMEOUT   15

Definition at line 60 of file mpt2sas_config.c.

Function Documentation

u8 mpt2sas_config_done ( struct MPT2SAS_ADAPTER ioc,
u16  smid,
u8  msix_index,
u32  reply 
)

mpt2sas_config_done - config page completion routine : per adapter object : system request message index : MSIX table index supplied by the OS : reply message frame(lower 32bit addr) Context: none.

The callback handler when using _config_request.

Return 1 meaning mf should be freed from _base_interrupt 0 means the mf is freed from this function.

Definition at line 240 of file mpt2sas_config.c.

int mpt2sas_config_get_bios_pg2 ( struct MPT2SAS_ADAPTER ioc,
Mpi2ConfigReply_t mpi_reply,
Mpi2BiosPage2_t config_page 
)

mpt2sas_config_get_bios_pg2 - obtain bios page 2 : per adapter object : reply mf payload returned from firmware : contents of the config page Context: sleep.

Returns 0 for success, non-zero for failure.

Definition at line 515 of file mpt2sas_config.c.

int mpt2sas_config_get_bios_pg3 ( struct MPT2SAS_ADAPTER ioc,
Mpi2ConfigReply_t mpi_reply,
Mpi2BiosPage3_t config_page 
)

mpt2sas_config_get_bios_pg3 - obtain bios page 3 : per adapter object : reply mf payload returned from firmware : contents of the config page Context: sleep.

Returns 0 for success, non-zero for failure.

Definition at line 551 of file mpt2sas_config.c.

int mpt2sas_config_get_enclosure_pg0 ( struct MPT2SAS_ADAPTER ioc,
Mpi2ConfigReply_t mpi_reply,
Mpi2SasEnclosurePage0_t config_page,
u32  form,
u32  handle 
)

mpt2sas_config_get_enclosure_pg0 - obtain enclosure page 0 : per adapter object : reply mf payload returned from firmware : contents of the config page : GET_NEXT_HANDLE or HANDLE : expander handle Context: sleep.

Returns 0 for success, non-zero for failure.

Definition at line 1100 of file mpt2sas_config.c.

int mpt2sas_config_get_expander_pg0 ( struct MPT2SAS_ADAPTER ioc,
Mpi2ConfigReply_t mpi_reply,
Mpi2ExpanderPage0_t config_page,
u32  form,
u32  handle 
)

mpt2sas_config_get_expander_pg0 - obtain expander page 0 : per adapter object : reply mf payload returned from firmware : contents of the config page : GET_NEXT_HANDLE or HANDLE : expander handle Context: sleep.

Returns 0 for success, non-zero for failure.

Definition at line 1017 of file mpt2sas_config.c.

int mpt2sas_config_get_expander_pg1 ( struct MPT2SAS_ADAPTER ioc,
Mpi2ConfigReply_t mpi_reply,
Mpi2ExpanderPage1_t config_page,
u32  phy_number,
u16  handle 
)

mpt2sas_config_get_expander_pg1 - obtain expander page 1 : per adapter object : reply mf payload returned from firmware : contents of the config page : phy number : expander handle Context: sleep.

Returns 0 for success, non-zero for failure.

Definition at line 1057 of file mpt2sas_config.c.

int mpt2sas_config_get_ioc_pg8 ( struct MPT2SAS_ADAPTER ioc,
Mpi2ConfigReply_t mpi_reply,
Mpi2IOCPage8_t config_page 
)

mpt2sas_config_get_ioc_pg8 - obtain ioc page 8 : per adapter object : reply mf payload returned from firmware : contents of the config page Context: sleep.

Returns 0 for success, non-zero for failure.

Definition at line 731 of file mpt2sas_config.c.

int mpt2sas_config_get_iounit_pg0 ( struct MPT2SAS_ADAPTER ioc,
Mpi2ConfigReply_t mpi_reply,
Mpi2IOUnitPage0_t config_page 
)

mpt2sas_config_get_iounit_pg0 - obtain iounit page 0 : per adapter object : reply mf payload returned from firmware : contents of the config page Context: sleep.

Returns 0 for success, non-zero for failure.

Definition at line 587 of file mpt2sas_config.c.

int mpt2sas_config_get_iounit_pg1 ( struct MPT2SAS_ADAPTER ioc,
Mpi2ConfigReply_t mpi_reply,
Mpi2IOUnitPage1_t config_page 
)

mpt2sas_config_get_iounit_pg1 - obtain iounit page 1 : per adapter object : reply mf payload returned from firmware : contents of the config page Context: sleep.

Returns 0 for success, non-zero for failure.

Definition at line 623 of file mpt2sas_config.c.

int mpt2sas_config_get_iounit_pg3 ( struct MPT2SAS_ADAPTER ioc,
Mpi2ConfigReply_t mpi_reply,
Mpi2IOUnitPage3_t config_page,
u16  sz 
)

mpt2sas_config_get_iounit_pg3 - obtain iounit page 3 : per adapter object : reply mf payload returned from firmware : contents of the config page : size of buffer passed in config_page Context: sleep.

Returns 0 for success, non-zero for failure.

Definition at line 696 of file mpt2sas_config.c.

int mpt2sas_config_get_manufacturing_pg0 ( struct MPT2SAS_ADAPTER ioc,
Mpi2ConfigReply_t mpi_reply,
Mpi2ManufacturingPage0_t config_page 
)

mpt2sas_config_get_manufacturing_pg0 - obtain manufacturing page 0 : per adapter object : reply mf payload returned from firmware : contents of the config page Context: sleep.

Returns 0 for success, non-zero for failure.

Definition at line 443 of file mpt2sas_config.c.

int mpt2sas_config_get_manufacturing_pg10 ( struct MPT2SAS_ADAPTER ioc,
Mpi2ConfigReply_t mpi_reply,
Mpi2ManufacturingPage10_t config_page 
)

mpt2sas_config_get_manufacturing_pg10 - obtain manufacturing page 10 : per adapter object : reply mf payload returned from firmware : contents of the config page Context: sleep.

Returns 0 for success, non-zero for failure.

Definition at line 479 of file mpt2sas_config.c.

int mpt2sas_config_get_number_hba_phys ( struct MPT2SAS_ADAPTER ioc,
u8 num_phys 
)

mpt2sas_config_get_number_hba_phys - obtain number of phys on the host : per adapter object : pointer returned with the number of phys Context: sleep.

Returns 0 for success, non-zero for failure.

Definition at line 846 of file mpt2sas_config.c.

int mpt2sas_config_get_number_pds ( struct MPT2SAS_ADAPTER ioc,
u16  handle,
u8 num_pds 
)

mpt2sas_config_get_number_pds - obtain number of phys disk assigned to volume : per adapter object : volume handle : returns pds count Context: sleep.

Returns 0 for success, non-zero for failure.

Definition at line 1258 of file mpt2sas_config.c.

int mpt2sas_config_get_phy_pg0 ( struct MPT2SAS_ADAPTER ioc,
Mpi2ConfigReply_t mpi_reply,
Mpi2SasPhyPage0_t config_page,
u32  phy_number 
)

mpt2sas_config_get_phy_pg0 - obtain phy page 0 : per adapter object : reply mf payload returned from firmware : contents of the config page : phy number Context: sleep.

Returns 0 for success, non-zero for failure.

Definition at line 1139 of file mpt2sas_config.c.

int mpt2sas_config_get_phy_pg1 ( struct MPT2SAS_ADAPTER ioc,
Mpi2ConfigReply_t mpi_reply,
Mpi2SasPhyPage1_t config_page,
u32  phy_number 
)

mpt2sas_config_get_phy_pg1 - obtain phy page 1 : per adapter object : reply mf payload returned from firmware : contents of the config page : phy number Context: sleep.

Returns 0 for success, non-zero for failure.

Definition at line 1179 of file mpt2sas_config.c.

int mpt2sas_config_get_phys_disk_pg0 ( struct MPT2SAS_ADAPTER ioc,
Mpi2ConfigReply_t mpi_reply,
Mpi2RaidPhysDiskPage0_t config_page,
u32  form,
u32  form_specific 
)

mpt2sas_config_get_phys_disk_pg0 - obtain phys disk page 0 : per adapter object : reply mf payload returned from firmware : contents of the config page : GET_NEXT_PHYSDISKNUM, PHYSDISKNUM, DEVHANDLE : specific to the form Context: sleep.

Returns 0 for success, non-zero for failure.

Definition at line 1349 of file mpt2sas_config.c.

int mpt2sas_config_get_raid_volume_pg0 ( struct MPT2SAS_ADAPTER ioc,
Mpi2ConfigReply_t mpi_reply,
Mpi2RaidVolPage0_t config_page,
u32  form,
u32  handle,
u16  sz 
)

mpt2sas_config_get_raid_volume_pg0 - obtain raid volume page 0 : per adapter object : reply mf payload returned from firmware : contents of the config page : GET_NEXT_HANDLE or HANDLE : volume handle : size of buffer passed in config_page Context: sleep.

Returns 0 for success, non-zero for failure.

Definition at line 1310 of file mpt2sas_config.c.

int mpt2sas_config_get_raid_volume_pg1 ( struct MPT2SAS_ADAPTER ioc,
Mpi2ConfigReply_t mpi_reply,
Mpi2RaidVolPage1_t config_page,
u32  form,
u32  handle 
)

mpt2sas_config_get_raid_volume_pg1 - obtain raid volume page 1 : per adapter object : reply mf payload returned from firmware : contents of the config page : GET_NEXT_HANDLE or HANDLE : volume handle Context: sleep.

Returns 0 for success, non-zero for failure.

Definition at line 1220 of file mpt2sas_config.c.

int mpt2sas_config_get_sas_device_pg0 ( struct MPT2SAS_ADAPTER ioc,
Mpi2ConfigReply_t mpi_reply,
Mpi2SasDevicePage0_t config_page,
u32  form,
u32  handle 
)

mpt2sas_config_get_sas_device_pg0 - obtain sas device page 0 : per adapter object : reply mf payload returned from firmware : contents of the config page : GET_NEXT_HANDLE or HANDLE : device handle Context: sleep.

Returns 0 for success, non-zero for failure.

Definition at line 769 of file mpt2sas_config.c.

int mpt2sas_config_get_sas_device_pg1 ( struct MPT2SAS_ADAPTER ioc,
Mpi2ConfigReply_t mpi_reply,
Mpi2SasDevicePage1_t config_page,
u32  form,
u32  handle 
)

mpt2sas_config_get_sas_device_pg1 - obtain sas device page 1 : per adapter object : reply mf payload returned from firmware : contents of the config page : GET_NEXT_HANDLE or HANDLE : device handle Context: sleep.

Returns 0 for success, non-zero for failure.

Definition at line 809 of file mpt2sas_config.c.

int mpt2sas_config_get_sas_iounit_pg0 ( struct MPT2SAS_ADAPTER ioc,
Mpi2ConfigReply_t mpi_reply,
Mpi2SasIOUnitPage0_t config_page,
u16  sz 
)

mpt2sas_config_get_sas_iounit_pg0 - obtain sas iounit page 0 : per adapter object : reply mf payload returned from firmware : contents of the config page : size of buffer passed in config_page Context: sleep.

Calling function should call config_get_number_hba_phys prior to this function, so enough memory is allocated for config_page.

Returns 0 for success, non-zero for failure.

Definition at line 896 of file mpt2sas_config.c.

int mpt2sas_config_get_sas_iounit_pg1 ( struct MPT2SAS_ADAPTER ioc,
Mpi2ConfigReply_t mpi_reply,
Mpi2SasIOUnitPage1_t config_page,
u16  sz 
)

mpt2sas_config_get_sas_iounit_pg1 - obtain sas iounit page 1 : per adapter object : reply mf payload returned from firmware : contents of the config page : size of buffer passed in config_page Context: sleep.

Calling function should call config_get_number_hba_phys prior to this function, so enough memory is allocated for config_page.

Returns 0 for success, non-zero for failure.

Definition at line 936 of file mpt2sas_config.c.

int mpt2sas_config_get_volume_handle ( struct MPT2SAS_ADAPTER ioc,
u16  pd_handle,
u16 volume_handle 
)

mpt2sas_config_get_volume_handle - returns volume handle for give hidden raid components : per adapter object : phys disk handle : volume handle Context: sleep.

Returns 0 for success, non-zero for failure.

Definition at line 1387 of file mpt2sas_config.c.

int mpt2sas_config_get_volume_wwid ( struct MPT2SAS_ADAPTER ioc,
u16  volume_handle,
u64 wwid 
)

mpt2sas_config_get_volume_wwid - returns wwid given the volume handle : per adapter object : volume handle : volume wwid Context: sleep.

Returns 0 for success, non-zero for failure.

Definition at line 1476 of file mpt2sas_config.c.

int mpt2sas_config_set_iounit_pg1 ( struct MPT2SAS_ADAPTER ioc,
Mpi2ConfigReply_t mpi_reply,
Mpi2IOUnitPage1_t config_page 
)

mpt2sas_config_set_iounit_pg1 - set iounit page 1 : per adapter object : reply mf payload returned from firmware : contents of the config page Context: sleep.

Returns 0 for success, non-zero for failure.

Definition at line 659 of file mpt2sas_config.c.

int mpt2sas_config_set_sas_iounit_pg1 ( struct MPT2SAS_ADAPTER ioc,
Mpi2ConfigReply_t mpi_reply,
Mpi2SasIOUnitPage1_t config_page,
u16  sz 
)

mpt2sas_config_set_sas_iounit_pg1 - send sas iounit page 1 : per adapter object : reply mf payload returned from firmware : contents of the config page : size of buffer passed in config_page Context: sleep.

Calling function should call config_get_number_hba_phys prior to this function, so enough memory is allocated for config_page.

Returns 0 for success, non-zero for failure.

Definition at line 976 of file mpt2sas_config.c.