Lines Matching refs:fw_event
107 static void mptsas_send_sas_event(struct fw_event_work *fw_event);
108 static void mptsas_send_raid_event(struct fw_event_work *fw_event);
109 static void mptsas_send_ir2_event(struct fw_event_work *fw_event);
124 static void mptsas_send_link_status_event(struct fw_event_work *fw_event);
129 static void mptsas_send_expander_event(struct fw_event_work *fw_event);
132 static void mptsas_broadcast_primitive_work(struct fw_event_work *fw_event);
133 static void mptsas_handle_queue_full_event(struct fw_event_work *fw_event);
285 mptsas_add_fw_event(MPT_ADAPTER *ioc, struct fw_event_work *fw_event, in mptsas_add_fw_event() argument
291 list_add_tail(&fw_event->list, &ioc->fw_event_list); in mptsas_add_fw_event()
292 fw_event->users = 1; in mptsas_add_fw_event()
293 INIT_DELAYED_WORK(&fw_event->work, mptsas_firmware_event_work); in mptsas_add_fw_event()
296 fw_event, smp_processor_id())); in mptsas_add_fw_event()
298 &fw_event->work, delay); in mptsas_add_fw_event()
304 mptsas_requeue_fw_event(MPT_ADAPTER *ioc, struct fw_event_work *fw_event, in mptsas_requeue_fw_event() argument
311 fw_event, smp_processor_id())); in mptsas_requeue_fw_event()
312 fw_event->retries++; in mptsas_requeue_fw_event()
314 &fw_event->work, msecs_to_jiffies(delay)); in mptsas_requeue_fw_event()
319 struct fw_event_work *fw_event) in __mptsas_free_fw_event() argument
322 ioc->name, __func__, fw_event)); in __mptsas_free_fw_event()
323 list_del(&fw_event->list); in __mptsas_free_fw_event()
324 kfree(fw_event); in __mptsas_free_fw_event()
329 mptsas_free_fw_event(MPT_ADAPTER *ioc, struct fw_event_work *fw_event) in mptsas_free_fw_event() argument
334 fw_event->users--; in mptsas_free_fw_event()
335 if (!fw_event->users) in mptsas_free_fw_event()
336 __mptsas_free_fw_event(ioc, fw_event); in mptsas_free_fw_event()
345 struct fw_event_work *fw_event; in mptsas_cleanup_fw_event_q() local
371 fw_event = list_first_entry(&ioc->fw_event_list, in mptsas_cleanup_fw_event_q()
373 fw_event->users++; in mptsas_cleanup_fw_event_q()
375 if (cancel_delayed_work_sync(&fw_event->work)) in mptsas_cleanup_fw_event_q()
380 fw_event->users--; in mptsas_cleanup_fw_event_q()
381 fw_event->users--; in mptsas_cleanup_fw_event_q()
382 WARN_ON_ONCE(fw_event->users); in mptsas_cleanup_fw_event_q()
383 __mptsas_free_fw_event(ioc, fw_event); in mptsas_cleanup_fw_event_q()
1019 struct fw_event_work *fw_event; in mptsas_queue_device_delete() local
1021 fw_event = kzalloc(sizeof(*fw_event) + in mptsas_queue_device_delete()
1024 if (!fw_event) { in mptsas_queue_device_delete()
1029 memcpy(fw_event->event_data, sas_event_data, in mptsas_queue_device_delete()
1031 fw_event->event = MPI_EVENT_SAS_DEVICE_STATUS_CHANGE; in mptsas_queue_device_delete()
1032 fw_event->ioc = ioc; in mptsas_queue_device_delete()
1033 mptsas_add_fw_event(ioc, fw_event, msecs_to_jiffies(1)); in mptsas_queue_device_delete()
1039 struct fw_event_work *fw_event; in mptsas_queue_rescan() local
1041 fw_event = kzalloc(sizeof(*fw_event), GFP_ATOMIC); in mptsas_queue_rescan()
1042 if (!fw_event) { in mptsas_queue_rescan()
1047 fw_event->event = -1; in mptsas_queue_rescan()
1048 fw_event->ioc = ioc; in mptsas_queue_rescan()
1049 mptsas_add_fw_event(ioc, fw_event, msecs_to_jiffies(1)); in mptsas_queue_rescan()
1647 struct fw_event_work *fw_event = in mptsas_firmware_event_work() local
1649 MPT_ADAPTER *ioc = fw_event->ioc; in mptsas_firmware_event_work()
1652 if (fw_event->event == -1) { in mptsas_firmware_event_work()
1665 mptsas_free_fw_event(ioc, fw_event); in mptsas_firmware_event_work()
1672 mptsas_free_fw_event(ioc, fw_event); in mptsas_firmware_event_work()
1677 "event = (0x%02x)\n", ioc->name, __func__, fw_event, in mptsas_firmware_event_work()
1678 (fw_event->event & 0xFF))); in mptsas_firmware_event_work()
1680 switch (fw_event->event) { in mptsas_firmware_event_work()
1682 mptsas_send_sas_event(fw_event); in mptsas_firmware_event_work()
1685 mptsas_send_raid_event(fw_event); in mptsas_firmware_event_work()
1688 mptsas_send_ir2_event(fw_event); in mptsas_firmware_event_work()
1693 mptsas_free_fw_event(ioc, fw_event); in mptsas_firmware_event_work()
1696 mptsas_broadcast_primitive_work(fw_event); in mptsas_firmware_event_work()
1699 mptsas_send_expander_event(fw_event); in mptsas_firmware_event_work()
1702 mptsas_send_link_status_event(fw_event); in mptsas_firmware_event_work()
1705 mptsas_handle_queue_full_event(fw_event); in mptsas_firmware_event_work()
3626 mptsas_send_expander_event(struct fw_event_work *fw_event) in mptsas_send_expander_event() argument
3634 ioc = fw_event->ioc; in mptsas_send_expander_event()
3636 fw_event->event_data; in mptsas_send_expander_event()
3659 mptsas_free_fw_event(ioc, fw_event); in mptsas_send_expander_event()
3702 mptsas_send_link_status_event(struct fw_event_work *fw_event) in mptsas_send_link_status_event() argument
3712 ioc = fw_event->ioc; in mptsas_send_link_status_event()
3713 link_data = (MpiEventDataSasPhyLinkStatus_t *)fw_event->event_data; in mptsas_send_link_status_event()
3791 mptsas_free_fw_event(ioc, fw_event); in mptsas_send_link_status_event()
4045 mptsas_handle_queue_full_event(struct fw_event_work *fw_event) in mptsas_handle_queue_full_event() argument
4058 ioc = fw_event->ioc; in mptsas_handle_queue_full_event()
4059 qfull_data = (EventDataQueueFull_t *)fw_event->event_data; in mptsas_handle_queue_full_event()
4128 mptsas_free_fw_event(ioc, fw_event); in mptsas_handle_queue_full_event()
4327 mptsas_hotplug_work(MPT_ADAPTER *ioc, struct fw_event_work *fw_event, in mptsas_hotplug_work() argument
4350 mptsas_free_fw_event(ioc, fw_event); in mptsas_hotplug_work()
4587 mptsas_free_fw_event(ioc, fw_event); in mptsas_hotplug_work()
4591 mptsas_send_sas_event(struct fw_event_work *fw_event) in mptsas_send_sas_event() argument
4599 ioc = fw_event->ioc; in mptsas_send_sas_event()
4601 fw_event->event_data; in mptsas_send_sas_event()
4608 mptsas_free_fw_event(ioc, fw_event); in mptsas_send_sas_event()
4616 mptsas_free_fw_event(ioc, fw_event); in mptsas_send_sas_event()
4637 mptsas_hotplug_work(ioc, fw_event, &hot_plug_info); in mptsas_send_sas_event()
4643 mptsas_free_fw_event(ioc, fw_event); in mptsas_send_sas_event()
4651 mptsas_free_fw_event(ioc, fw_event); in mptsas_send_sas_event()
4657 mptsas_send_raid_event(struct fw_event_work *fw_event) in mptsas_send_raid_event() argument
4668 ioc = fw_event->ioc; in mptsas_send_raid_event()
4669 raid_event_data = (EVENT_DATA_RAID *)fw_event->event_data; in mptsas_send_raid_event()
4767 mptsas_hotplug_work(ioc, fw_event, &hot_plug_info); in mptsas_send_raid_event()
4769 mptsas_free_fw_event(ioc, fw_event); in mptsas_send_raid_event()
4861 mptsas_broadcast_primitive_work(struct fw_event_work *fw_event) in mptsas_broadcast_primitive_work() argument
4863 MPT_ADAPTER *ioc = fw_event->ioc; in mptsas_broadcast_primitive_work()
4882 mptsas_requeue_fw_event(ioc, fw_event, 1000); in mptsas_broadcast_primitive_work()
4947 mptsas_free_fw_event(ioc, fw_event); in mptsas_broadcast_primitive_work()
4959 mptsas_send_ir2_event(struct fw_event_work *fw_event) in mptsas_send_ir2_event() argument
4967 ioc = fw_event->ioc; in mptsas_send_ir2_event()
4968 ir2_data = (MPI_EVENT_DATA_IR2 *)fw_event->event_data; in mptsas_send_ir2_event()
4993 mptsas_free_fw_event(ioc, fw_event); in mptsas_send_ir2_event()
4996 mptsas_hotplug_work(ioc, fw_event, &hot_plug_info); in mptsas_send_ir2_event()
5004 struct fw_event_work *fw_event; in mptsas_event_process() local
5113 fw_event = kzalloc(sizeof(*fw_event) + event_data_sz, GFP_ATOMIC); in mptsas_event_process()
5114 if (!fw_event) { in mptsas_event_process()
5119 memcpy(fw_event->event_data, reply->Data, event_data_sz); in mptsas_event_process()
5120 fw_event->event = event; in mptsas_event_process()
5121 fw_event->ioc = ioc; in mptsas_event_process()
5122 mptsas_add_fw_event(ioc, fw_event, delay); in mptsas_event_process()