Lines Matching refs:hdev
132 bt_dev_err(hu->hdev, "Device boot interrupted"); in intel_wait_booting()
137 bt_dev_err(hu->hdev, "Device boot timeout"); in intel_wait_booting()
155 bt_dev_err(hu->hdev, "LPM transaction interrupted"); in intel_wait_lpm_transaction()
160 bt_dev_err(hu->hdev, "LPM transaction timeout"); in intel_wait_lpm_transaction()
180 bt_dev_dbg(hu->hdev, "Suspending"); in intel_lpm_suspend()
184 bt_dev_err(hu->hdev, "Failed to alloc memory for LPM packet"); in intel_lpm_suspend()
203 bt_dev_err(hu->hdev, "Device suspend error"); in intel_lpm_suspend()
207 bt_dev_dbg(hu->hdev, "Suspended"); in intel_lpm_suspend()
223 bt_dev_dbg(hu->hdev, "Resuming"); in intel_lpm_resume()
229 bt_dev_err(hu->hdev, "Failed to alloc memory for LPM packet"); in intel_lpm_resume()
247 bt_dev_err(hu->hdev, "Device resume error"); in intel_lpm_resume()
251 bt_dev_dbg(hu->hdev, "Resumed"); in intel_lpm_resume()
269 bt_dev_err(hu->hdev, "Failed to alloc memory for LPM packet"); in intel_lpm_host_wake()
281 bt_dev_dbg(hu->hdev, "Resumed by controller"); in intel_lpm_host_wake()
450 static int inject_cmd_complete(struct hci_dev *hdev, __u16 opcode) in inject_cmd_complete() argument
472 return hci_recv_frame(hdev, skb); in inject_cmd_complete()
478 struct hci_dev *hdev = hu->hdev; in intel_set_baudrate() local
494 bt_dev_info(hdev, "Change controller speed to %d", speed); in intel_set_baudrate()
498 bt_dev_err(hdev, "Unsupported speed"); in intel_set_baudrate()
505 skb = __hci_cmd_sync(hdev, 0xfc05, 0, NULL, HCI_INIT_TIMEOUT); in intel_set_baudrate()
507 bt_dev_err(hdev, "Reading Intel version information failed (%ld)", in intel_set_baudrate()
515 bt_dev_err(hdev, "Failed to alloc memory for baudrate packet"); in intel_set_baudrate()
543 struct hci_dev *hdev = hu->hdev; in intel_setup() local
558 bt_dev_dbg(hdev, "start intel_setup"); in intel_setup()
560 hu->hdev->set_diag = btintel_set_diag; in intel_setup()
561 hu->hdev->set_bdaddr = btintel_set_bdaddr; in intel_setup()
593 skb = __hci_cmd_sync(hdev, 0xfc05, 0, NULL, HCI_INIT_TIMEOUT); in intel_setup()
595 bt_dev_err(hdev, "Reading Intel version information failed (%ld)", in intel_setup()
601 bt_dev_err(hdev, "Intel version event size mismatch"); in intel_setup()
608 bt_dev_err(hdev, "Intel version command failure (%02x)", in intel_setup()
619 bt_dev_err(hdev, "Unsupported Intel hardware platform (%u)", in intel_setup()
631 bt_dev_err(hdev, "Unsupported Intel hardware variant (%u)", in intel_setup()
637 btintel_version_info(hdev, ver); in intel_setup()
655 btintel_check_bdaddr(hdev); in intel_setup()
663 bt_dev_err(hdev, "Unsupported Intel firmware variant (%u)", in intel_setup()
674 skb = __hci_cmd_sync(hdev, 0xfc0d, 0, NULL, HCI_INIT_TIMEOUT); in intel_setup()
676 bt_dev_err(hdev, "Reading Intel boot parameters failed (%ld)", in intel_setup()
682 bt_dev_err(hdev, "Intel boot parameters size mismatch"); in intel_setup()
689 bt_dev_err(hdev, "Intel boot parameters command failure (%02x)", in intel_setup()
696 bt_dev_info(hdev, "Device revision is %u", in intel_setup()
699 bt_dev_info(hdev, "Secure boot is %s", in intel_setup()
702 bt_dev_info(hdev, "Minimum firmware build %u week %u %u", in intel_setup()
711 bt_dev_err(hdev, "Unsupported Intel firmware loading method (%u)", in intel_setup()
721 bt_dev_info(hdev, "No device address configured"); in intel_setup()
722 set_bit(HCI_QUIRK_INVALID_BDADDR, &hdev->quirks); in intel_setup()
734 err = request_firmware(&fw, fwname, &hdev->dev); in intel_setup()
736 bt_dev_err(hdev, "Failed to load Intel firmware file (%d)", in intel_setup()
742 bt_dev_info(hdev, "Found device firmware: %s", fwname); in intel_setup()
751 bt_dev_err(hdev, "Invalid size of firmware file (%zu)", in intel_setup()
762 err = btintel_secure_send(hdev, 0x00, 128, fw->data); in intel_setup()
764 bt_dev_err(hdev, "Failed to send firmware header (%d)", err); in intel_setup()
771 err = btintel_secure_send(hdev, 0x03, 256, fw->data + 128); in intel_setup()
773 bt_dev_err(hdev, "Failed to send firmware public key (%d)", in intel_setup()
781 err = btintel_secure_send(hdev, 0x02, 256, fw->data + 388); in intel_setup()
783 bt_dev_err(hdev, "Failed to send firmware signature (%d)", in intel_setup()
796 bt_dev_dbg(hdev, "Patching %td/%zu", (fw_ptr - fw->data), in intel_setup()
813 err = btintel_secure_send(hdev, 0x01, frag_len, fw_ptr); in intel_setup()
815 bt_dev_err(hdev, "Failed to send firmware data (%d)", in intel_setup()
826 bt_dev_info(hdev, "Waiting for firmware download to complete"); in intel_setup()
843 bt_dev_err(hdev, "Firmware loading interrupted"); in intel_setup()
849 bt_dev_err(hdev, "Firmware loading timeout"); in intel_setup()
855 bt_dev_err(hdev, "Firmware loading failed"); in intel_setup()
864 bt_dev_info(hdev, "Firmware loaded in %llu usecs", duration); in intel_setup()
883 skb = __hci_cmd_sync(hdev, 0xfc01, sizeof(reset_param), reset_param, in intel_setup()
897 bt_dev_info(hdev, "Waiting for device to boot"); in intel_setup()
909 bt_dev_info(hdev, "Device booted in %llu usecs", duration); in intel_setup()
927 bt_dev_info(hdev, "Enabling LPM"); in intel_setup()
929 skb = __hci_cmd_sync(hdev, 0xfc8b, sizeof(lpm_param), lpm_param, in intel_setup()
932 bt_dev_err(hdev, "Failed to enable LPM"); in intel_setup()
941 btintel_load_ddc_config(hdev, fwname); in intel_setup()
943 skb = __hci_cmd_sync(hdev, HCI_OP_RESET, 0, NULL, HCI_CMD_TIMEOUT); in intel_setup()
954 bt_dev_info(hdev, "Setup complete"); in intel_setup()
961 static int intel_recv_event(struct hci_dev *hdev, struct sk_buff *skb) in intel_recv_event() argument
963 struct hci_uart *hu = hci_get_drvdata(hdev); in intel_recv_event()
1000 return hci_recv_frame(hdev, skb); in intel_recv_event()
1003 static void intel_recv_lpm_notify(struct hci_dev *hdev, int value) in intel_recv_lpm_notify() argument
1005 struct hci_uart *hu = hci_get_drvdata(hdev); in intel_recv_lpm_notify()
1008 bt_dev_dbg(hdev, "TX idle notification (%d)", value); in intel_recv_lpm_notify()
1018 static int intel_recv_lpm(struct hci_dev *hdev, struct sk_buff *skb) in intel_recv_lpm() argument
1021 struct hci_uart *hu = hci_get_drvdata(hdev); in intel_recv_lpm()
1027 bt_dev_err(hu->hdev, "Invalid LPM notification packet"); in intel_recv_lpm()
1030 intel_recv_lpm_notify(hdev, lpm->data[0]); in intel_recv_lpm()
1047 bt_dev_err(hdev, "Unknown LPM opcode (%02x)", lpm->opcode); in intel_recv_lpm()
1077 intel->rx_skb = h4_recv_buf(hu->hdev, intel->rx_skb, data, count, in intel_recv()
1082 bt_dev_err(hu->hdev, "Frame reassembly failed (%d)", err); in intel_recv()
1139 inject_cmd_complete(hu->hdev, opcode); in intel_dequeue()