]> git.baikalelectronics.ru Git - kernel.git/commit
HID: surface-hid: Add support for hot-removal
authorMaximilian Luz <luzmaximilian@gmail.com>
Fri, 27 May 2022 02:34:42 +0000 (04:34 +0200)
committerHans de Goede <hdegoede@redhat.com>
Mon, 13 Jun 2022 15:25:08 +0000 (17:25 +0200)
commit0b17f8b61d7ffda989baca61678b82538a4766c4
tree19785dbf7b2ddfc5be6ae7bf3a2eea81021121c4
parentf9c5dfd7d5723f67279879852a36ca3d556af1e7
HID: surface-hid: Add support for hot-removal

Add support for hot-removal of SSAM HID client devices.

Once a device has been hot-removed, further communication with it should
be avoided as it may fail and time out. While the device will be removed
as soon as we detect hot-removal, communication may still occur during
teardown, especially when unregistering notifiers.

While hot-removal is a surprise event that can happen at any time, try
to avoid communication as much as possible once it has been detected to
prevent timeouts that can slow down device removal and cause issues,
e.g. when quickly re-attaching the device.

Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
Link: https://lore.kernel.org/r/20220527023447.2460025-8-luzmaximilian@gmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/hid/surface-hid/surface_hid_core.c