Commit 4f9c1a08 authored by Manish Mandlik's avatar Manish Mandlik Committed by Luiz Augusto von Dentz

Bluetooth: btusb: Add btusb devcoredump support

This patch implements the btusb driver side .coredump() callback to
trigger a devcoredump via sysfs.
Signed-off-by: default avatarManish Mandlik <mmandlik@google.com>
Reviewed-by: default avatarAbhishek Pandit-Subedi <abhishekpandit@chromium.org>
Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
parent ab4e4380
......@@ -4397,6 +4397,17 @@ static int btusb_resume(struct usb_interface *intf)
}
#endif
#ifdef CONFIG_DEV_COREDUMP
static void btusb_coredump(struct device *dev)
{
struct btusb_data *data = dev_get_drvdata(dev);
struct hci_dev *hdev = data->hdev;
if (hdev->dump.coredump)
hdev->dump.coredump(hdev);
}
#endif
static struct usb_driver btusb_driver = {
.name = "btusb",
.probe = btusb_probe,
......@@ -4408,6 +4419,14 @@ static struct usb_driver btusb_driver = {
.id_table = btusb_table,
.supports_autosuspend = 1,
.disable_hub_initiated_lpm = 1,
#ifdef CONFIG_DEV_COREDUMP
.drvwrap = {
.driver = {
.coredump = btusb_coredump,
},
},
#endif
};
module_usb_driver(btusb_driver);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment