Lines Matching full:dump
34 hci_dmp_cb(skb)->pkt_type, hdev->dump.state)
54 hdev->dump.state, state); in hci_devcd_update_state()
56 hdev->dump.state = state; in hci_devcd_update_state()
58 return hci_devcd_update_hdr_state(hdev->dump.head, in hci_devcd_update_state()
59 hdev->dump.alloc_size, state); in hci_devcd_update_state()
64 char dump_start[] = "--- Start dump ---\n"; in hci_devcd_mkheader()
72 if (hdev->dump.dmp_hdr) in hci_devcd_mkheader()
73 hdev->dump.dmp_hdr(hdev, skb); in hci_devcd_mkheader()
83 if (hdev->dump.notify_change) in hci_devcd_notify()
84 hdev->dump.notify_change(hdev, state); in hci_devcd_notify()
90 hdev->dump.head = NULL; in hci_devcd_reset()
91 hdev->dump.tail = NULL; in hci_devcd_reset()
92 hdev->dump.alloc_size = 0; in hci_devcd_reset()
96 cancel_delayed_work(&hdev->dump.dump_timeout); in hci_devcd_reset()
97 skb_queue_purge(&hdev->dump.dump_q); in hci_devcd_reset()
103 vfree(hdev->dump.head); in hci_devcd_free()
111 hdev->dump.head = vmalloc(size); in hci_devcd_alloc()
112 if (!hdev->dump.head) in hci_devcd_alloc()
115 hdev->dump.alloc_size = size; in hci_devcd_alloc()
116 hdev->dump.tail = hdev->dump.head; in hci_devcd_alloc()
117 hdev->dump.end = hdev->dump.head + size; in hci_devcd_alloc()
127 if (hdev->dump.tail + size > hdev->dump.end) in hci_devcd_copy()
130 memcpy(hdev->dump.tail, buf, size); in hci_devcd_copy()
131 hdev->dump.tail += size; in hci_devcd_copy()
139 if (hdev->dump.tail + len > hdev->dump.end) in hci_devcd_memset()
142 memset(hdev->dump.tail, pattern, len); in hci_devcd_memset()
143 hdev->dump.tail += len; in hci_devcd_memset()
185 if (hdev->dump.state != HCI_DEVCOREDUMP_IDLE) { in hci_devcd_handle_pkt_init()
191 bt_dev_dbg(hdev, "Invalid dump init pkt"); in hci_devcd_handle_pkt_init()
197 bt_dev_err(hdev, "Zero size dump init pkt"); in hci_devcd_handle_pkt_init()
202 bt_dev_err(hdev, "Failed to prepare for dump"); in hci_devcd_handle_pkt_init()
207 queue_delayed_work(hdev->workqueue, &hdev->dump.dump_timeout, in hci_devcd_handle_pkt_init()
208 hdev->dump.timeout); in hci_devcd_handle_pkt_init()
213 if (hdev->dump.state != HCI_DEVCOREDUMP_ACTIVE) { in hci_devcd_handle_pkt_skb()
227 if (hdev->dump.state != HCI_DEVCOREDUMP_ACTIVE) { in hci_devcd_handle_pkt_pattern()
248 bt_dev_dbg(hdev, "state %d", hdev->dump.state); in hci_devcd_dump()
250 size = hdev->dump.tail - hdev->dump.head; in hci_devcd_dump()
253 dev_coredumpv(&hdev->dev, hdev->dump.head, size, GFP_KERNEL); in hci_devcd_dump()
258 skb_put_data(skb, hdev->dump.head, size); in hci_devcd_dump()
268 if (hdev->dump.state != HCI_DEVCOREDUMP_ACTIVE) { in hci_devcd_handle_pkt_complete()
274 dump_size = hdev->dump.tail - hdev->dump.head; in hci_devcd_handle_pkt_complete()
277 hdev->dump.alloc_size); in hci_devcd_handle_pkt_complete()
287 if (hdev->dump.state != HCI_DEVCOREDUMP_ACTIVE) { in hci_devcd_handle_pkt_abort()
293 dump_size = hdev->dump.tail - hdev->dump.head; in hci_devcd_handle_pkt_abort()
296 hdev->dump.alloc_size); in hci_devcd_handle_pkt_abort()
312 * HCI_DEVCOREDUMP_DONE: Once the dump collection is complete, the drive
317 * HCI_DEVCOREDUMP_ABORT: The driver can cancel ongoing dump collection in
333 struct hci_dev *hdev = container_of(work, struct hci_dev, dump.dump_rx); in hci_devcd_rx()
337 while ((skb = skb_dequeue(&hdev->dump.dump_q))) { in hci_devcd_rx()
339 * hci_devcd_timeout() will report the available dump data. in hci_devcd_rx()
341 if (hdev->dump.state == HCI_DEVCOREDUMP_TIMEOUT) { in hci_devcd_rx()
347 start_state = hdev->dump.state; in hci_devcd_rx()
372 hci_dmp_cb(skb)->pkt_type, hdev->dump.state); in hci_devcd_rx()
382 if (start_state != hdev->dump.state) in hci_devcd_rx()
383 hci_devcd_notify(hdev, hdev->dump.state); in hci_devcd_rx()
387 if (hdev->dump.state == HCI_DEVCOREDUMP_DONE || in hci_devcd_rx()
388 hdev->dump.state == HCI_DEVCOREDUMP_ABORT) in hci_devcd_rx()
398 dump.dump_timeout.work); in hci_devcd_timeout()
405 cancel_work(&hdev->dump.dump_rx); in hci_devcd_timeout()
409 dump_size = hdev->dump.tail - hdev->dump.head; in hci_devcd_timeout()
411 hdev->dump.alloc_size); in hci_devcd_timeout()
427 * written to. The dmp_hdr() should create a dump header to identify in hci_devcd_register()
434 hdev->dump.coredump = coredump; in hci_devcd_register()
435 hdev->dump.dmp_hdr = dmp_hdr; in hci_devcd_register()
436 hdev->dump.notify_change = notify_change; in hci_devcd_register()
437 hdev->dump.supported = true; in hci_devcd_register()
438 hdev->dump.timeout = DEVCOREDUMP_TIMEOUT; in hci_devcd_register()
447 return hdev->dump.supported; in hci_devcd_enabled()
464 skb_queue_tail(&hdev->dump.dump_q, skb); in hci_devcd_init()
465 queue_work(hdev->workqueue, &hdev->dump.dump_rx); in hci_devcd_init()
483 skb_queue_tail(&hdev->dump.dump_q, skb); in hci_devcd_append()
484 queue_work(hdev->workqueue, &hdev->dump.dump_rx); in hci_devcd_append()
508 skb_queue_tail(&hdev->dump.dump_q, skb); in hci_devcd_append_pattern()
509 queue_work(hdev->workqueue, &hdev->dump.dump_rx); in hci_devcd_append_pattern()
528 skb_queue_tail(&hdev->dump.dump_q, skb); in hci_devcd_complete()
529 queue_work(hdev->workqueue, &hdev->dump.dump_rx); in hci_devcd_complete()
548 skb_queue_tail(&hdev->dump.dump_q, skb); in hci_devcd_abort()
549 queue_work(hdev->workqueue, &hdev->dump.dump_rx); in hci_devcd_abort()