Context |
Check |
Description |
tedd_an/pre-ci_am |
success
|
Success
|
tedd_an/checkpatch |
success
|
Checkpatch PASS
|
tedd_an/gitlint |
fail
|
[v2] Bluetooth: btusb: Introduce generic USB reset
18: B1 Line exceeds max length (87>80): "ERR kernel: [ 716.929206] Bluetooth: hci_cmd_timeout() hci0: command 0x0000 tx timeout"
19: B1 Line exceeds max length (109>80): "ERR kernel: [ 716.929218] Bluetooth: btusb_rtl_cmd_timeout() hci0: No gpio to reset Realtek device, ignoring"
22: B1 Line exceeds max length (87>80): "ERR kernel: [ 225.270048] Bluetooth: hci_cmd_timeout() hci0: command 0x0000 tx timeout"
23: B1 Line exceeds max length (89>80): "ERR kernel: [ 225.270060] Bluetooth: btusb_rtl_cmd_timeout() hci0: Resetting usb device."
24: B1 Line exceeds max length (88>80): "INFO kernel: [ 225.386613] usb 3-3: reset full-speed USB device number 3 using xhci_hcd"
|
tedd_an/subjectprefix |
success
|
PASS
|
tedd_an/buildkernel |
success
|
Build Kernel PASS
|
tedd_an/buildkernel32 |
success
|
Build Kernel32 PASS
|
tedd_an/incremental_build |
success
|
Pass
|
tedd_an/testrunnersetup |
success
|
Test Runner Setup PASS
|
tedd_an/testrunnerl2cap-tester |
success
|
Total: 40, Passed: 40 (100.0%), Failed: 0, Not Run: 0
|
tedd_an/testrunneriso-tester |
success
|
Total: 55, Passed: 55 (100.0%), Failed: 0, Not Run: 0
|
tedd_an/testrunnerbnep-tester |
success
|
Total: 1, Passed: 1 (100.0%), Failed: 0, Not Run: 0
|
tedd_an/testrunnermgmt-tester |
success
|
Total: 494, Passed: 494 (100.0%), Failed: 0, Not Run: 0
|
tedd_an/testrunnerrfcomm-tester |
success
|
Total: 11, Passed: 11 (100.0%), Failed: 0, Not Run: 0
|
tedd_an/testrunnersco-tester |
success
|
Total: 12, Passed: 12 (100.0%), Failed: 0, Not Run: 0
|
tedd_an/testrunnerioctl-tester |
success
|
Total: 28, Passed: 28 (100.0%), Failed: 0, Not Run: 0
|
tedd_an/testrunnersmp-tester |
success
|
Total: 8, Passed: 8 (100.0%), Failed: 0, Not Run: 0
|
tedd_an/testrunneruserchan-tester |
success
|
Total: 4, Passed: 4 (100.0%), Failed: 0, Not Run: 0
|
@@ -696,6 +696,19 @@ struct btusb_data {
unsigned cmd_timeout_cnt;
};
+static void generic_usb_reset(struct hci_dev *hdev, struct btusb_data *data)
+{
+ int err;
+
+ bt_dev_err(hdev, "Resetting usb device.");
+ /* This is not an unbalanced PM reference since the device will reset */
+ err = usb_autopm_get_interface(data->intf);
+ if (!err)
+ usb_queue_reset_device(data->intf);
+ else
+ bt_dev_err(hdev, "Failed usb_autopm_get_interface: %d", err);
+}
+
static void btusb_intel_cmd_timeout(struct hci_dev *hdev)
{
struct btusb_data *data = hci_get_drvdata(hdev);
@@ -705,7 +718,7 @@ static void btusb_intel_cmd_timeout(struct hci_dev *hdev)
return;
if (!reset_gpio) {
- bt_dev_err(hdev, "No way to reset. Ignoring and continuing");
+ generic_usb_reset(hdev, data);
return;
}
@@ -736,7 +749,7 @@ static void btusb_rtl_cmd_timeout(struct hci_dev *hdev)
return;
if (!reset_gpio) {
- bt_dev_err(hdev, "No gpio to reset Realtek device, ignoring");
+ generic_usb_reset(hdev, data);
return;
}
@@ -761,7 +774,6 @@ static void btusb_qca_cmd_timeout(struct hci_dev *hdev)
{
struct btusb_data *data = hci_get_drvdata(hdev);
struct gpio_desc *reset_gpio = data->reset_gpio;
- int err;
if (++data->cmd_timeout_cnt < 5)
return;
@@ -787,13 +799,7 @@ static void btusb_qca_cmd_timeout(struct hci_dev *hdev)
return;
}
- bt_dev_err(hdev, "Multiple cmd timeouts seen. Resetting usb device.");
- /* This is not an unbalanced PM reference since the device will reset */
- err = usb_autopm_get_interface(data->intf);
- if (!err)
- usb_queue_reset_device(data->intf);
- else
- bt_dev_err(hdev, "Failed usb_autopm_get_interface with %d", err);
+ generic_usb_reset(hdev, data);
}
static inline void btusb_free_frags(struct btusb_data *data)