Lines Matching refs:fw_event

245 	struct fw_event_work *fw_event;  in alloc_fw_event_work()  local
247 fw_event = kzalloc(sizeof(*fw_event) + len, GFP_ATOMIC); in alloc_fw_event_work()
248 if (!fw_event) in alloc_fw_event_work()
251 kref_init(&fw_event->refcount); in alloc_fw_event_work()
252 return fw_event; in alloc_fw_event_work()
3552 _scsih_fw_event_add(struct MPT3SAS_ADAPTER *ioc, struct fw_event_work *fw_event) in _scsih_fw_event_add() argument
3560 fw_event_work_get(fw_event); in _scsih_fw_event_add()
3561 INIT_LIST_HEAD(&fw_event->list); in _scsih_fw_event_add()
3562 list_add_tail(&fw_event->list, &ioc->fw_event_list); in _scsih_fw_event_add()
3563 INIT_WORK(&fw_event->work, _firmware_event_work); in _scsih_fw_event_add()
3564 fw_event_work_get(fw_event); in _scsih_fw_event_add()
3565 queue_work(ioc->firmware_event_thread, &fw_event->work); in _scsih_fw_event_add()
3579 *fw_event) in _scsih_fw_event_del_from_list()
3584 if (!list_empty(&fw_event->list)) { in _scsih_fw_event_del_from_list()
3585 list_del_init(&fw_event->list); in _scsih_fw_event_del_from_list()
3586 fw_event_work_put(fw_event); in _scsih_fw_event_del_from_list()
3601 struct fw_event_work *fw_event; in mpt3sas_send_trigger_data_event() local
3607 fw_event = alloc_fw_event_work(sz); in mpt3sas_send_trigger_data_event()
3608 if (!fw_event) in mpt3sas_send_trigger_data_event()
3610 fw_event->event = MPT3SAS_PROCESS_TRIGGER_DIAG; in mpt3sas_send_trigger_data_event()
3611 fw_event->ioc = ioc; in mpt3sas_send_trigger_data_event()
3612 memcpy(fw_event->event_data, event_data, sizeof(*event_data)); in mpt3sas_send_trigger_data_event()
3613 _scsih_fw_event_add(ioc, fw_event); in mpt3sas_send_trigger_data_event()
3614 fw_event_work_put(fw_event); in mpt3sas_send_trigger_data_event()
3624 struct fw_event_work *fw_event; in _scsih_error_recovery_delete_devices() local
3626 fw_event = alloc_fw_event_work(0); in _scsih_error_recovery_delete_devices()
3627 if (!fw_event) in _scsih_error_recovery_delete_devices()
3629 fw_event->event = MPT3SAS_REMOVE_UNRESPONDING_DEVICES; in _scsih_error_recovery_delete_devices()
3630 fw_event->ioc = ioc; in _scsih_error_recovery_delete_devices()
3631 _scsih_fw_event_add(ioc, fw_event); in _scsih_error_recovery_delete_devices()
3632 fw_event_work_put(fw_event); in _scsih_error_recovery_delete_devices()
3642 struct fw_event_work *fw_event; in mpt3sas_port_enable_complete() local
3644 fw_event = alloc_fw_event_work(0); in mpt3sas_port_enable_complete()
3645 if (!fw_event) in mpt3sas_port_enable_complete()
3647 fw_event->event = MPT3SAS_PORT_ENABLE_COMPLETE; in mpt3sas_port_enable_complete()
3648 fw_event->ioc = ioc; in mpt3sas_port_enable_complete()
3649 _scsih_fw_event_add(ioc, fw_event); in mpt3sas_port_enable_complete()
3650 fw_event_work_put(fw_event); in mpt3sas_port_enable_complete()
3656 struct fw_event_work *fw_event = NULL; in dequeue_next_fw_event() local
3660 fw_event = list_first_entry(&ioc->fw_event_list, in dequeue_next_fw_event()
3662 list_del_init(&fw_event->list); in dequeue_next_fw_event()
3663 fw_event_work_put(fw_event); in dequeue_next_fw_event()
3667 return fw_event; in dequeue_next_fw_event()
3682 struct fw_event_work *fw_event; in _scsih_fw_event_cleanup_queue() local
3697 while ((fw_event = dequeue_next_fw_event(ioc)) || in _scsih_fw_event_cleanup_queue()
3698 (fw_event = ioc->current_event)) { in _scsih_fw_event_cleanup_queue()
3714 if (fw_event == ioc->current_event && in _scsih_fw_event_cleanup_queue()
3729 if (fw_event->event == MPT3SAS_PORT_ENABLE_COMPLETE) { in _scsih_fw_event_cleanup_queue()
3742 if (cancel_work_sync(&fw_event->work)) in _scsih_fw_event_cleanup_queue()
3743 fw_event_work_put(fw_event); in _scsih_fw_event_cleanup_queue()
4649 struct fw_event_work *fw_event; in _scsih_check_topo_delete_events() local
4694 list_for_each_entry(fw_event, &ioc->fw_event_list, list) { in _scsih_check_topo_delete_events()
4695 if (fw_event->event != MPI2_EVENT_SAS_TOPOLOGY_CHANGE_LIST || in _scsih_check_topo_delete_events()
4696 fw_event->ignore) in _scsih_check_topo_delete_events()
4699 fw_event->event_data; in _scsih_check_topo_delete_events()
4708 fw_event->ignore = 1; in _scsih_check_topo_delete_events()
4730 struct fw_event_work *fw_event; in _scsih_check_pcie_topo_remove_events() local
4765 list_for_each_entry(fw_event, &ioc->fw_event_list, list) { in _scsih_check_pcie_topo_remove_events()
4766 if (fw_event->event != MPI2_EVENT_PCIE_TOPOLOGY_CHANGE_LIST || in _scsih_check_pcie_topo_remove_events()
4767 fw_event->ignore) in _scsih_check_pcie_topo_remove_events()
4771 fw_event->event_data; in _scsih_check_pcie_topo_remove_events()
4780 fw_event->ignore = 1; in _scsih_check_pcie_topo_remove_events()
5600 struct fw_event_work *fw_event; in _scsih_send_event_to_turn_on_pfa_led() local
5602 fw_event = alloc_fw_event_work(0); in _scsih_send_event_to_turn_on_pfa_led()
5603 if (!fw_event) in _scsih_send_event_to_turn_on_pfa_led()
5605 fw_event->event = MPT3SAS_TURN_ON_PFA_LED; in _scsih_send_event_to_turn_on_pfa_led()
5606 fw_event->device_handle = handle; in _scsih_send_event_to_turn_on_pfa_led()
5607 fw_event->ioc = ioc; in _scsih_send_event_to_turn_on_pfa_led()
5608 _scsih_fw_event_add(ioc, fw_event); in _scsih_send_event_to_turn_on_pfa_led()
5609 fw_event_work_put(fw_event); in _scsih_send_event_to_turn_on_pfa_led()
7568 struct fw_event_work *fw_event) in _scsih_sas_topology_change_event() argument
7581 fw_event->event_data; in _scsih_sas_topology_change_event()
7594 if (fw_event->ignore) { in _scsih_sas_topology_change_event()
7625 if (fw_event->ignore) { in _scsih_sas_topology_change_event()
8317 struct fw_event_work *fw_event) in _scsih_pcie_topology_change_event() argument
8326 (Mpi26EventDataPCIeTopologyChangeList_t *) fw_event->event_data; in _scsih_pcie_topology_change_event()
8336 if (fw_event->ignore) { in _scsih_pcie_topology_change_event()
8343 if (fw_event->ignore) { in _scsih_pcie_topology_change_event()
8495 struct fw_event_work *fw_event) in _scsih_pcie_device_status_change_event() argument
8502 (Mpi26EventDataPCIeDeviceStatusChange_t *)fw_event->event_data; in _scsih_pcie_device_status_change_event()
8577 struct fw_event_work *fw_event) in _scsih_sas_enclosure_dev_status_change_event() argument
8582 (Mpi2EventDataSasEnclDevStatusChange_t *)fw_event->event_data; in _scsih_sas_enclosure_dev_status_change_event()
8589 fw_event->event_data); in _scsih_sas_enclosure_dev_status_change_event()
8642 struct fw_event_work *fw_event) in _scsih_sas_broadcast_primitive_event() argument
8655 fw_event->event_data; in _scsih_sas_broadcast_primitive_event()
8807 struct fw_event_work *fw_event) in _scsih_sas_discovery_event() argument
8810 (Mpi2EventDataSasDiscovery_t *) fw_event->event_data; in _scsih_sas_discovery_event()
8842 struct fw_event_work *fw_event) in _scsih_sas_device_discovery_error_event() argument
8845 (Mpi25EventDataSasDeviceDiscoveryError_t *)fw_event->event_data; in _scsih_sas_device_discovery_error_event()
8873 struct fw_event_work *fw_event) in _scsih_pcie_enumeration_event() argument
8876 (Mpi26EventDataPCIeEnumeration_t *)fw_event->event_data; in _scsih_pcie_enumeration_event()
9326 struct fw_event_work *fw_event) in _scsih_sas_ir_config_change_event() argument
9333 fw_event->event_data; in _scsih_sas_ir_config_change_event()
9396 struct fw_event_work *fw_event) in _scsih_sas_ir_volume_event() argument
9405 (Mpi2EventDataIrVolume_t *) fw_event->event_data; in _scsih_sas_ir_volume_event()
9477 struct fw_event_work *fw_event) in _scsih_sas_ir_physical_disk_event() argument
9486 (Mpi2EventDataIrPhysicalDisk_t *) fw_event->event_data; in _scsih_sas_ir_physical_disk_event()
9603 struct fw_event_work *fw_event) in _scsih_sas_ir_operation_status_event() argument
9607 fw_event->event_data; in _scsih_sas_ir_operation_status_event()
10692 _mpt3sas_fw_work(struct MPT3SAS_ADAPTER *ioc, struct fw_event_work *fw_event) in _mpt3sas_fw_work() argument
10694 ioc->current_event = fw_event; in _mpt3sas_fw_work()
10695 _scsih_fw_event_del_from_list(ioc, fw_event); in _mpt3sas_fw_work()
10699 fw_event_work_put(fw_event); in _mpt3sas_fw_work()
10704 switch (fw_event->event) { in _mpt3sas_fw_work()
10708 fw_event->event_data); in _mpt3sas_fw_work()
10750 _scsih_turn_on_pfa_led(ioc, fw_event->device_handle); in _mpt3sas_fw_work()
10753 _scsih_sas_topology_change_event(ioc, fw_event); in _mpt3sas_fw_work()
10759 fw_event->event_data); in _mpt3sas_fw_work()
10762 _scsih_sas_discovery_event(ioc, fw_event); in _mpt3sas_fw_work()
10765 _scsih_sas_device_discovery_error_event(ioc, fw_event); in _mpt3sas_fw_work()
10768 _scsih_sas_broadcast_primitive_event(ioc, fw_event); in _mpt3sas_fw_work()
10772 fw_event); in _mpt3sas_fw_work()
10775 _scsih_sas_ir_config_change_event(ioc, fw_event); in _mpt3sas_fw_work()
10778 _scsih_sas_ir_volume_event(ioc, fw_event); in _mpt3sas_fw_work()
10781 _scsih_sas_ir_physical_disk_event(ioc, fw_event); in _mpt3sas_fw_work()
10784 _scsih_sas_ir_operation_status_event(ioc, fw_event); in _mpt3sas_fw_work()
10787 _scsih_pcie_device_status_change_event(ioc, fw_event); in _mpt3sas_fw_work()
10790 _scsih_pcie_enumeration_event(ioc, fw_event); in _mpt3sas_fw_work()
10793 _scsih_pcie_topology_change_event(ioc, fw_event); in _mpt3sas_fw_work()
10798 fw_event_work_put(fw_event); in _mpt3sas_fw_work()
10813 struct fw_event_work *fw_event = container_of(work, in _firmware_event_work() local
10816 _mpt3sas_fw_work(fw_event->ioc, fw_event); in _firmware_event_work()
10836 struct fw_event_work *fw_event; in mpt3sas_scsih_event_callback() local
10992 fw_event = alloc_fw_event_work(sz); in mpt3sas_scsih_event_callback()
10993 if (!fw_event) { in mpt3sas_scsih_event_callback()
10999 memcpy(fw_event->event_data, mpi_reply->EventData, sz); in mpt3sas_scsih_event_callback()
11000 fw_event->ioc = ioc; in mpt3sas_scsih_event_callback()
11001 fw_event->VF_ID = mpi_reply->VF_ID; in mpt3sas_scsih_event_callback()
11002 fw_event->VP_ID = mpi_reply->VP_ID; in mpt3sas_scsih_event_callback()
11003 fw_event->event = event; in mpt3sas_scsih_event_callback()
11004 _scsih_fw_event_add(ioc, fw_event); in mpt3sas_scsih_event_callback()
11005 fw_event_work_put(fw_event); in mpt3sas_scsih_event_callback()