Lines Matching +full:per +full:- +full:context

5  * Copyright (C) 2012-2014  LSI Corporation
6 * Copyright (C) 2013-2014 Avago Technologies
7 * (mailto: MPT-FusionLinux.pdl@avagotech.com)
22 * LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
41 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
74 * struct config_request - obtain dma memory via routine
87 * _config_display_some_debug - debug routine
88 * @ioc: per adapter object
92 * Context: none.
105 switch (mpi_request->Header.PageType & MPI2_CONFIG_PAGETYPE_MASK) { in _config_display_some_debug()
125 switch (mpi_request->ExtPageType) { in _config_display_some_debug()
177 mpi_request->Header.PageNumber, mpi_request->Action, in _config_display_some_debug()
178 le32_to_cpu(mpi_request->PageAddress), smid); in _config_display_some_debug()
183 if (mpi_reply->IOCStatus || mpi_reply->IOCLogInfo) in _config_display_some_debug()
185 le16_to_cpu(mpi_reply->IOCStatus), in _config_display_some_debug()
186 le32_to_cpu(mpi_reply->IOCLogInfo)); in _config_display_some_debug()
190 * _config_alloc_config_dma_memory - obtain physical memory
191 * @ioc: per adapter object
194 * A wrapper for obtaining dma-able memory for config page request.
196 * Return: 0 for success, non-zero for failure.
204 if (mem->sz > ioc->config_page_sz) { in _config_alloc_config_dma_memory()
205 mem->page = dma_alloc_coherent(&ioc->pdev->dev, mem->sz, in _config_alloc_config_dma_memory()
206 &mem->page_dma, GFP_KERNEL); in _config_alloc_config_dma_memory()
207 if (!mem->page) { in _config_alloc_config_dma_memory()
209 __func__, mem->sz); in _config_alloc_config_dma_memory()
210 r = -ENOMEM; in _config_alloc_config_dma_memory()
213 mem->page = ioc->config_page; in _config_alloc_config_dma_memory()
214 mem->page_dma = ioc->config_page_dma; in _config_alloc_config_dma_memory()
216 ioc->config_vaddr = mem->page; in _config_alloc_config_dma_memory()
221 * _config_free_config_dma_memory - wrapper to free the memory
222 * @ioc: per adapter object
225 * A wrapper to free dma-able memory when using _config_alloc_config_dma_memory.
227 * Return: 0 for success, non-zero for failure.
233 if (mem->sz > ioc->config_page_sz) in _config_free_config_dma_memory()
234 dma_free_coherent(&ioc->pdev->dev, mem->sz, mem->page, in _config_free_config_dma_memory()
235 mem->page_dma); in _config_free_config_dma_memory()
239 * mpt3sas_config_done - config page completion routine
240 * @ioc: per adapter object
244 * Context: none.
257 if (ioc->config_cmds.status == MPT3_CMD_NOT_USED) in mpt3sas_config_done()
259 if (ioc->config_cmds.smid != smid) in mpt3sas_config_done()
261 ioc->config_cmds.status |= MPT3_CMD_COMPLETE; in mpt3sas_config_done()
264 ioc->config_cmds.status |= MPT3_CMD_REPLY_VALID; in mpt3sas_config_done()
265 memcpy(ioc->config_cmds.reply, mpi_reply, in mpt3sas_config_done()
266 mpi_reply->MsgLength*4); in mpt3sas_config_done()
268 ioc->config_cmds.status &= ~MPT3_CMD_PENDING; in mpt3sas_config_done()
269 if (ioc->logging_level & MPT_DEBUG_CONFIG) in mpt3sas_config_done()
271 ioc->config_cmds.smid = USHRT_MAX; in mpt3sas_config_done()
272 complete(&ioc->config_cmds.done); in mpt3sas_config_done()
277 * _config_request - main routine for sending config page requests
278 * @ioc: per adapter object
284 * Context: sleep
288 * The ioc->config_cmds.status flag should be MPT3_CMD_NOT_USED before calling
291 * The callback index is set inside `ioc->config_cb_idx.
293 * Return: 0 for success, non-zero for failure.
307 mutex_lock(&ioc->config_cmds.mutex); in _config_request()
308 if (ioc->config_cmds.status != MPT3_CMD_NOT_USED) { in _config_request()
310 mutex_unlock(&ioc->config_cmds.mutex); in _config_request()
311 return -EAGAIN; in _config_request()
317 mpi_request->VF_ID = 0; /* TODO */ in _config_request()
318 mpi_request->VP_ID = 0; in _config_request()
321 mpi_request->Header.PageVersion = mpi_reply->Header.PageVersion; in _config_request()
322 mpi_request->Header.PageNumber = mpi_reply->Header.PageNumber; in _config_request()
323 mpi_request->Header.PageType = mpi_reply->Header.PageType; in _config_request()
324 mpi_request->Header.PageLength = mpi_reply->Header.PageLength; in _config_request()
325 mpi_request->ExtPageLength = mpi_reply->ExtPageLength; in _config_request()
326 mpi_request->ExtPageType = mpi_reply->ExtPageType; in _config_request()
327 if (mpi_request->Header.PageLength) in _config_request()
328 mem.sz = mpi_request->Header.PageLength * 4; in _config_request()
330 mem.sz = le16_to_cpu(mpi_reply->ExtPageLength) * 4; in _config_request()
334 if (mpi_request->Action == in _config_request()
336 mpi_request->Action == in _config_request()
338 ioc->base_add_sg_single(&mpi_request->PageBufferSGE, in _config_request()
345 ioc->base_add_sg_single(&mpi_request->PageBufferSGE, in _config_request()
354 r = -EFAULT; in _config_request()
363 if (r == -ETIME) in _config_request()
368 smid = mpt3sas_base_get_smid(ioc, ioc->config_cb_idx); in _config_request()
371 ioc->config_cmds.status = MPT3_CMD_NOT_USED; in _config_request()
372 r = -EAGAIN; in _config_request()
377 memset(ioc->config_cmds.reply, 0, sizeof(Mpi2ConfigReply_t)); in _config_request()
378 ioc->config_cmds.status = MPT3_CMD_PENDING; in _config_request()
380 ioc->config_cmds.smid = smid; in _config_request()
382 if (ioc->logging_level & MPT_DEBUG_CONFIG) in _config_request()
384 init_completion(&ioc->config_cmds.done); in _config_request()
385 ioc->put_smid_default(ioc, smid); in _config_request()
386 wait_for_completion_timeout(&ioc->config_cmds.done, timeout*HZ); in _config_request()
387 if (!(ioc->config_cmds.status & MPT3_CMD_COMPLETE)) { in _config_request()
388 if (!(ioc->logging_level & MPT_DEBUG_CONFIG)) in _config_request()
392 mpt3sas_base_check_cmd_timeout(ioc, ioc->config_cmds.status, in _config_request()
395 if (ioc->config_cmds.smid == smid) in _config_request()
397 if (ioc->config_cmds.status & MPT3_CMD_RESET) in _config_request()
399 if (ioc->shost_recovery || ioc->pci_error_recovery) { in _config_request()
401 r = -EFAULT; in _config_request()
407 if (ioc->config_cmds.status & MPT3_CMD_REPLY_VALID) { in _config_request()
408 memcpy(mpi_reply, ioc->config_cmds.reply, in _config_request()
412 if ((mpi_request->Header.PageType & 0xF) != in _config_request()
413 (mpi_reply->Header.PageType & 0xF)) { in _config_request()
414 if (!(ioc->logging_level & MPT_DEBUG_CONFIG)) in _config_request()
417 _debug_dump_mf(mpi_request, ioc->request_sz/4); in _config_request()
418 _debug_dump_reply(mpi_reply, ioc->reply_sz/4); in _config_request()
420 ioc->name, __func__, in _config_request()
421 mpi_request->Header.PageType & 0xF, in _config_request()
422 mpi_reply->Header.PageType & 0xF); in _config_request()
425 if (((mpi_request->Header.PageType & 0xF) == in _config_request()
427 mpi_request->ExtPageType != mpi_reply->ExtPageType) { in _config_request()
428 if (!(ioc->logging_level & MPT_DEBUG_CONFIG)) in _config_request()
431 _debug_dump_mf(mpi_request, ioc->request_sz/4); in _config_request()
432 _debug_dump_reply(mpi_reply, ioc->reply_sz/4); in _config_request()
434 ioc->name, __func__, in _config_request()
435 mpi_request->ExtPageType, in _config_request()
436 mpi_reply->ExtPageType); in _config_request()
438 ioc_status = le16_to_cpu(mpi_reply->IOCStatus) in _config_request()
447 config_page && mpi_request->Action == in _config_request()
453 if ((mpi_request->Header.PageType & 0xF) != in _config_request()
455 if (!(ioc->logging_level & MPT_DEBUG_CONFIG)) in _config_request()
458 _debug_dump_mf(mpi_request, ioc->request_sz/4); in _config_request()
459 _debug_dump_reply(mpi_reply, ioc->reply_sz/4); in _config_request()
463 ioc->name, __func__, in _config_request()
464 mpi_request->Header.PageType & 0xF, in _config_request()
468 if (((mpi_request->Header.PageType & 0xF) == in _config_request()
470 (mpi_request->ExtPageType != p[6])) { in _config_request()
471 if (!(ioc->logging_level & MPT_DEBUG_CONFIG)) in _config_request()
474 _debug_dump_mf(mpi_request, ioc->request_sz/4); in _config_request()
475 _debug_dump_reply(mpi_reply, ioc->reply_sz/4); in _config_request()
479 ioc->name, __func__, in _config_request()
480 mpi_request->ExtPageType, p[6]); in _config_request()
491 ioc->config_cmds.status = MPT3_CMD_NOT_USED; in _config_request()
492 mutex_unlock(&ioc->config_cmds.mutex); in _config_request()
495 if (ioc->drv_internal_flags & MPT_DRV_INTERNAL_FIRST_PE_ISSUED) { in _config_request()
497 r = -EFAULT; in _config_request()
500 return -EFAULT; in _config_request()
501 r = -EAGAIN; in _config_request()
508 * mpt3sas_config_get_manufacturing_pg0 - obtain manufacturing page 0
509 * @ioc: per adapter object
512 * Context: sleep.
514 * Return: 0 for success, non-zero for failure.
529 ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); in mpt3sas_config_get_manufacturing_pg0()
544 * mpt3sas_config_get_manufacturing_pg1 - obtain manufacturing page 1
545 * @ioc: per adapter object
548 * Context: sleep.
550 * Return: 0 for success, non-zero for failure.
565 ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); in mpt3sas_config_get_manufacturing_pg1()
580 * mpt3sas_config_get_manufacturing_pg7 - obtain manufacturing page 7
581 * @ioc: per adapter object
585 * Context: sleep.
587 * Return: 0 for success, non-zero for failure.
603 ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); in mpt3sas_config_get_manufacturing_pg7()
618 * mpt3sas_config_get_manufacturing_pg10 - obtain manufacturing page 10
619 * @ioc: per adapter object
622 * Context: sleep.
624 * Return: 0 for success, non-zero for failure.
640 ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); in mpt3sas_config_get_manufacturing_pg10()
655 * mpt3sas_config_get_manufacturing_pg11 - obtain manufacturing page 11
656 * @ioc: per adapter object
659 * Context: sleep.
661 * Return: 0 for success, non-zero for failure.
677 ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); in mpt3sas_config_get_manufacturing_pg11()
692 * mpt3sas_config_set_manufacturing_pg11 - set manufacturing page 11
693 * @ioc: per adapter object
696 * Context: sleep.
698 * Return: 0 for success, non-zero for failure.
714 ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); in mpt3sas_config_set_manufacturing_pg11()
729 * mpt3sas_config_get_bios_pg2 - obtain bios page 2
730 * @ioc: per adapter object
733 * Context: sleep.
735 * Return: 0 for success, non-zero for failure.
750 ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); in mpt3sas_config_get_bios_pg2()
765 * mpt3sas_config_get_bios_pg3 - obtain bios page 3
766 * @ioc: per adapter object
769 * Context: sleep.
771 * Return: 0 for success, non-zero for failure.
786 ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); in mpt3sas_config_get_bios_pg3()
802 * mpt3sas_config_set_bios_pg4 - write out bios page 4
803 * @ioc: per adapter object
807 * Context: sleep.
809 * Return: 0 for success, non-zero for failure.
827 ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); in mpt3sas_config_set_bios_pg4()
843 * mpt3sas_config_get_bios_pg4 - read bios page 4
844 * @ioc: per adapter object
848 * Context: sleep.
850 * Return: 0 for success, non-zero for failure.
866 ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); in mpt3sas_config_get_bios_pg4()
889 * mpt3sas_config_get_iounit_pg0 - obtain iounit page 0
890 * @ioc: per adapter object
893 * Context: sleep.
895 * Return: 0 for success, non-zero for failure.
910 ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); in mpt3sas_config_get_iounit_pg0()
925 * mpt3sas_config_get_iounit_pg1 - obtain iounit page 1
926 * @ioc: per adapter object
929 * Context: sleep.
931 * Return: 0 for success, non-zero for failure.
946 ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); in mpt3sas_config_get_iounit_pg1()
961 * mpt3sas_config_set_iounit_pg1 - set iounit page 1
962 * @ioc: per adapter object
965 * Context: sleep.
967 * Return: 0 for success, non-zero for failure.
982 ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); in mpt3sas_config_set_iounit_pg1()
997 * mpt3sas_config_get_iounit_pg3 - obtain iounit page 3
998 * @ioc: per adapter object
1002 * Context: sleep.
1004 * Return: 0 for success, non-zero for failure.
1019 ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); in mpt3sas_config_get_iounit_pg3()
1033 * mpt3sas_config_get_iounit_pg8 - obtain iounit page 8
1034 * @ioc: per adapter object
1037 * Context: sleep.
1039 * Return: 0 for success, non-zero for failure.
1054 ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); in mpt3sas_config_get_iounit_pg8()
1069 * mpt3sas_config_get_ioc_pg8 - obtain ioc page 8
1070 * @ioc: per adapter object
1073 * Context: sleep.
1075 * Return: 0 for success, non-zero for failure.
1090 ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); in mpt3sas_config_get_ioc_pg8()
1104 * mpt3sas_config_get_ioc_pg1 - obtain ioc page 1
1105 * @ioc: per adapter object
1108 * Context: sleep.
1110 * Return: 0 for success, non-zero for failure.
1125 ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); in mpt3sas_config_get_ioc_pg1()
1140 * mpt3sas_config_set_ioc_pg1 - modify ioc page 1
1141 * @ioc: per adapter object
1144 * Context: sleep.
1146 * Return: 0 for success, non-zero for failure.
1161 ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); in mpt3sas_config_set_ioc_pg1()
1176 * mpt3sas_config_get_sas_device_pg0 - obtain sas device page 0
1177 * @ioc: per adapter object
1182 * Context: sleep.
1184 * Return: 0 for success, non-zero for failure.
1201 ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); in mpt3sas_config_get_sas_device_pg0()
1217 * mpt3sas_config_get_sas_device_pg1 - obtain sas device page 1
1218 * @ioc: per adapter object
1223 * Context: sleep.
1225 * Return: 0 for success, non-zero for failure.
1242 ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); in mpt3sas_config_get_sas_device_pg1()
1258 * mpt3sas_config_get_pcie_device_pg0 - obtain pcie device page 0
1259 * @ioc: per adapter object
1264 * Context: sleep.
1266 * Return: 0 for success, non-zero for failure.
1283 ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); in mpt3sas_config_get_pcie_device_pg0()
1299 * mpt3sas_config_get_pcie_iounit_pg1 - obtain pcie iounit page 1
1300 * @ioc: per adapter object
1304 * Context: sleep.
1306 * Returns 0 for success, non-zero for failure.
1323 ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); in mpt3sas_config_get_pcie_iounit_pg1()
1336 * mpt3sas_config_get_pcie_device_pg2 - obtain pcie device page 2
1337 * @ioc: per adapter object
1342 * Context: sleep.
1344 * Return: 0 for success, non-zero for failure.
1361 ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); in mpt3sas_config_get_pcie_device_pg2()
1377 * mpt3sas_config_get_number_hba_phys - obtain number of phys on the host
1378 * @ioc: per adapter object
1380 * Context: sleep.
1382 * Return: 0 for success, non-zero for failure.
1401 ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); in mpt3sas_config_get_number_hba_phys()
1422 * mpt3sas_config_get_sas_iounit_pg0 - obtain sas iounit page 0
1423 * @ioc: per adapter object
1427 * Context: sleep.
1432 * Return: 0 for success, non-zero for failure.
1449 ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); in mpt3sas_config_get_sas_iounit_pg0()
1463 * mpt3sas_config_get_sas_iounit_pg1 - obtain sas iounit page 1
1464 * @ioc: per adapter object
1468 * Context: sleep.
1473 * Return: 0 for success, non-zero for failure.
1490 ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); in mpt3sas_config_get_sas_iounit_pg1()
1504 * mpt3sas_config_set_sas_iounit_pg1 - send sas iounit page 1
1505 * @ioc: per adapter object
1509 * Context: sleep.
1514 * Return: 0 for success, non-zero for failure.
1531 ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); in mpt3sas_config_set_sas_iounit_pg1()
1548 * mpt3sas_config_get_expander_pg0 - obtain expander page 0
1549 * @ioc: per adapter object
1554 * Context: sleep.
1556 * Return: 0 for success, non-zero for failure.
1572 ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); in mpt3sas_config_get_expander_pg0()
1588 * mpt3sas_config_get_expander_pg1 - obtain expander page 1
1589 * @ioc: per adapter object
1594 * Context: sleep.
1596 * Return: 0 for success, non-zero for failure.
1613 ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); in mpt3sas_config_get_expander_pg1()
1631 * mpt3sas_config_get_enclosure_pg0 - obtain enclosure page 0
1632 * @ioc: per adapter object
1637 * Context: sleep.
1639 * Return: 0 for success, non-zero for failure.
1655 ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); in mpt3sas_config_get_enclosure_pg0()
1671 * mpt3sas_config_get_phy_pg0 - obtain phy page 0
1672 * @ioc: per adapter object
1676 * Context: sleep.
1678 * Return: 0 for success, non-zero for failure.
1694 ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); in mpt3sas_config_get_phy_pg0()
1711 * mpt3sas_config_get_phy_pg1 - obtain phy page 1
1712 * @ioc: per adapter object
1716 * Context: sleep.
1718 * Return: 0 for success, non-zero for failure.
1734 ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); in mpt3sas_config_get_phy_pg1()
1751 * mpt3sas_config_get_raid_volume_pg1 - obtain raid volume page 1
1752 * @ioc: per adapter object
1757 * Context: sleep.
1759 * Return: 0 for success, non-zero for failure.
1775 ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); in mpt3sas_config_get_raid_volume_pg1()
1791 * mpt3sas_config_get_number_pds - obtain number of phys disk assigned to volume
1792 * @ioc: per adapter object
1795 * Context: sleep.
1797 * Return: 0 for success, non-zero for failure.
1816 ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); in mpt3sas_config_get_number_pds()
1840 * mpt3sas_config_get_raid_volume_pg0 - obtain raid volume page 0
1841 * @ioc: per adapter object
1847 * Context: sleep.
1849 * Return: 0 for success, non-zero for failure.
1865 ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); in mpt3sas_config_get_raid_volume_pg0()
1880 * mpt3sas_config_get_phys_disk_pg0 - obtain phys disk page 0
1881 * @ioc: per adapter object
1886 * Context: sleep.
1888 * Return: 0 for success, non-zero for failure.
1904 ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); in mpt3sas_config_get_phys_disk_pg0()
1920 * mpt3sas_config_get_driver_trigger_pg0 - obtain driver trigger page 0
1921 * @ioc: per adapter object
1924 * Context: sleep.
1926 * Returns 0 for success, non-zero for failure.
1943 ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); in mpt3sas_config_get_driver_trigger_pg0()
1958 * _config_set_driver_trigger_pg0 - write driver trigger page 0
1959 * @ioc: per adapter object
1962 * Context: sleep.
1964 * Returns 0 for success, non-zero for failure.
1981 ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); in _config_set_driver_trigger_pg0()
2000 * mpt3sas_config_update_driver_trigger_pg0 - update driver trigger page 0
2001 * @ioc: per adapter object
2004 * Context: sleep.
2006 * Returns 0 for success, non-zero for failure.
2027 return -EFAULT; in mpt3sas_config_update_driver_trigger_pg0()
2047 return -EFAULT; in mpt3sas_config_update_driver_trigger_pg0()
2054 * mpt3sas_config_get_driver_trigger_pg1 - obtain driver trigger page 1
2055 * @ioc: per adapter object
2058 * Context: sleep.
2060 * Returns 0 for success, non-zero for failure.
2077 ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); in mpt3sas_config_get_driver_trigger_pg1()
2092 * _config_set_driver_trigger_pg1 - write driver trigger page 1
2093 * @ioc: per adapter object
2096 * Context: sleep.
2098 * Returns 0 for success, non-zero for failure.
2115 ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); in _config_set_driver_trigger_pg1()
2134 * mpt3sas_config_update_driver_trigger_pg1 - update driver trigger page 1
2135 * @ioc: per adapter object
2138 * Context: sleep.
2140 * Returns 0 for success, non-zero for failure.
2167 rc = -EFAULT; in mpt3sas_config_update_driver_trigger_pg1()
2174 master_tg->MasterData); in mpt3sas_config_update_driver_trigger_pg1()
2191 rc = -EFAULT; in mpt3sas_config_update_driver_trigger_pg1()
2205 * mpt3sas_config_get_driver_trigger_pg2 - obtain driver trigger page 2
2206 * @ioc: per adapter object
2209 * Context: sleep.
2211 * Returns 0 for success, non-zero for failure.
2228 ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); in mpt3sas_config_get_driver_trigger_pg2()
2243 * _config_set_driver_trigger_pg2 - write driver trigger page 2
2244 * @ioc: per adapter object
2247 * Context: sleep.
2249 * Returns 0 for success, non-zero for failure.
2266 ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); in _config_set_driver_trigger_pg2()
2285 * mpt3sas_config_update_driver_trigger_pg2 - update driver trigger page 2
2286 * @ioc: per adapter object
2289 * Context: sleep.
2291 * Returns 0 for success, non-zero for failure.
2318 rc = -EFAULT; in mpt3sas_config_update_driver_trigger_pg2()
2323 count = event_tg->ValidEntries; in mpt3sas_config_update_driver_trigger_pg2()
2328 event_tg->EventTriggerEntry[i].EventValue); in mpt3sas_config_update_driver_trigger_pg2()
2331 event_tg->EventTriggerEntry[i].LogEntryQualifier); in mpt3sas_config_update_driver_trigger_pg2()
2351 rc = -EFAULT; in mpt3sas_config_update_driver_trigger_pg2()
2365 * mpt3sas_config_get_driver_trigger_pg3 - obtain driver trigger page 3
2366 * @ioc: per adapter object
2369 * Context: sleep.
2371 * Returns 0 for success, non-zero for failure.
2388 ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); in mpt3sas_config_get_driver_trigger_pg3()
2403 * _config_set_driver_trigger_pg3 - write driver trigger page 3
2404 * @ioc: per adapter object
2407 * Context: sleep.
2409 * Returns 0 for success, non-zero for failure.
2426 ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); in _config_set_driver_trigger_pg3()
2445 * mpt3sas_config_update_driver_trigger_pg3 - update driver trigger page 3
2446 * @ioc: per adapter object
2449 * Context: sleep.
2451 * Returns 0 for success, non-zero for failure.
2478 return -EFAULT; in mpt3sas_config_update_driver_trigger_pg3()
2482 count = scsi_tg->ValidEntries; in mpt3sas_config_update_driver_trigger_pg3()
2486 scsi_tg->SCSITriggerEntry[i].ASCQ; in mpt3sas_config_update_driver_trigger_pg3()
2488 scsi_tg->SCSITriggerEntry[i].ASC; in mpt3sas_config_update_driver_trigger_pg3()
2490 scsi_tg->SCSITriggerEntry[i].SenseKey; in mpt3sas_config_update_driver_trigger_pg3()
2510 return -EFAULT; in mpt3sas_config_update_driver_trigger_pg3()
2522 * mpt3sas_config_get_driver_trigger_pg4 - obtain driver trigger page 4
2523 * @ioc: per adapter object
2526 * Context: sleep.
2528 * Returns 0 for success, non-zero for failure.
2545 ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); in mpt3sas_config_get_driver_trigger_pg4()
2560 * _config_set_driver_trigger_pg4 - write driver trigger page 4
2561 * @ioc: per adapter object
2564 * Context: sleep.
2566 * Returns 0 for success, non-zero for failure.
2583 ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); in _config_set_driver_trigger_pg4()
2602 * mpt3sas_config_update_driver_trigger_pg4 - update driver trigger page 4
2603 * @ioc: per adapter object
2606 * Context: sleep.
2608 * Returns 0 for success, non-zero for failure.
2635 rc = -EFAULT; in mpt3sas_config_update_driver_trigger_pg4()
2640 count = mpi_tg->ValidEntries; in mpt3sas_config_update_driver_trigger_pg4()
2644 cpu_to_le16(mpi_tg->MPITriggerEntry[i].IOCStatus); in mpt3sas_config_update_driver_trigger_pg4()
2646 cpu_to_le32(mpi_tg->MPITriggerEntry[i].IocLogInfo); in mpt3sas_config_update_driver_trigger_pg4()
2666 rc = -EFAULT; in mpt3sas_config_update_driver_trigger_pg4()
2680 * mpt3sas_config_get_volume_handle - returns volume handle for give hidden
2682 * @ioc: per adapter object
2685 * Context: sleep.
2687 * Return: 0 for success, non-zero for failure.
2710 ioc->build_zero_len_sge_mpi(ioc, &mpi_request.PageBufferSGE); in mpt3sas_config_get_volume_handle()
2720 r = -1; in mpt3sas_config_get_volume_handle()
2733 r = -1; in mpt3sas_config_get_volume_handle()
2738 for (i = 0; i < config_page->NumElements; i++) { in mpt3sas_config_get_volume_handle()
2739 element_type = le16_to_cpu(config_page-> in mpt3sas_config_get_volume_handle()
2747 le16_to_cpu(config_page->ConfigElement[i]. in mpt3sas_config_get_volume_handle()
2751 le16_to_cpu(config_page-> in mpt3sas_config_get_volume_handle()
2763 config_num = config_page->ConfigNum; in mpt3sas_config_get_volume_handle()
2771 * mpt3sas_config_get_volume_wwid - returns wwid given the volume handle
2772 * @ioc: per adapter object
2775 * Context: sleep.
2777 * Return: 0 for success, non-zero for failure.
2793 return -1; in mpt3sas_config_get_volume_wwid()