Pull HID fixes from Jiri Kosina: - kernel crash fixes for multitouch and wacom drivers, by Brent Adam and Dan Carpenter - cp2112 data packet race condition corruption fix, by Antonio Borneo - a few new device IDs for wacom and microsoft drivers * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: HID: cp2112: fix to force single data-report reply HID: wacom: Enable pad device for older Bamboo Touch tablets HID: multitouch: Fix fields from pen report ID being interpreted for multitouch HID: microsoft: Add quirk for MS Surface Type/Touch cover HID: wacom: NULL dereferences on error in probe()
Unified · Split
| @@ -356,6 +356,8 @@ static int cp2112_read(struct cp2112_device *dev, u8 *data, size_t size) · 355 unmodified lines | |||
| 356 | struct cp2112_force_read_report report; | 356 | struct cp2112_force_read_report report; |
| 357 | int ret; | 357 | int ret; |
| 358 | 358 | ||
| 359 | if (size > sizeof(dev->read_data)) | ||
| 360 | size = sizeof(dev->read_data); | ||
| 359 | report.report = CP2112_DATA_READ_FORCE_SEND; | 361 | report.report = CP2112_DATA_READ_FORCE_SEND; |
| 360 | report.length = cpu_to_be16(size); | 362 | report.length = cpu_to_be16(size); |
| 361 | 363 | ||
| @@ -778,9 +778,16 @@ static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi, · 777 unmodified lines | |||
| 778 | /* | 778 | /* |
| 779 | * some egalax touchscreens have "application == HID_DG_TOUCHSCREEN" | 779 | * some egalax touchscreens have "application == HID_DG_TOUCHSCREEN" |
| 780 | * for the stylus. | 780 | * for the stylus. |
| 781 | * The check for mt_report_id ensures we don't process | ||
| 782 | * HID_DG_CONTACTCOUNT from the pen report as it is outside the physical | ||
| 783 | * collection, but within the report ID. | ||
| 781 | */ | 784 | */ |
| 782 | if (field->physical == HID_DG_STYLUS) | 785 | if (field->physical == HID_DG_STYLUS) |
| 783 | return 0; | 786 | return 0; |
| 787 | else if ((field->physical == 0) && | ||
| 788 | (field->report->id != td->mt_report_id) && | ||
| 789 | (td->mt_report_id != -1)) | ||
| 790 | return 0; | ||
| 784 | 791 | ||
| 785 | if (field->application == HID_DG_TOUCHSCREEN || | 792 | if (field->application == HID_DG_TOUCHSCREEN || |
| 786 | field->application == HID_DG_TOUCHPAD) | 793 | field->application == HID_DG_TOUCHPAD) |
| @@ -87,6 +87,9 @@ static const struct hid_blacklist { · 86 unmodified lines | |||
| 87 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_MOUSE_C05A, HID_QUIRK_ALWAYS_POLL }, | 87 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_MOUSE_C05A, HID_QUIRK_ALWAYS_POLL }, |
| 88 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_MOUSE_C06A, HID_QUIRK_ALWAYS_POLL }, | 88 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_MOUSE_C06A, HID_QUIRK_ALWAYS_POLL }, |
| 89 | { USB_VENDOR_ID_MGE, USB_DEVICE_ID_MGE_UPS, HID_QUIRK_NOGET }, | 89 | { USB_VENDOR_ID_MGE, USB_DEVICE_ID_MGE_UPS, HID_QUIRK_NOGET }, |
| 90 | { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_SURFACE_PRO_2, HID_QUIRK_NO_INIT_REPORTS }, | ||
| 91 | { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_2, HID_QUIRK_NO_INIT_REPORTS }, | ||
| 92 | { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TOUCH_COVER_2, HID_QUIRK_NO_INIT_REPORTS }, | ||
| 90 | { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_3, HID_QUIRK_NO_INIT_REPORTS }, | 93 | { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_3, HID_QUIRK_NO_INIT_REPORTS }, |
| 91 | { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_3_JP, HID_QUIRK_NO_INIT_REPORTS }, | 94 | { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_3_JP, HID_QUIRK_NO_INIT_REPORTS }, |
| 92 | { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_POWER_COVER, HID_QUIRK_NO_INIT_REPORTS }, | 95 | { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_POWER_COVER, HID_QUIRK_NO_INIT_REPORTS }, |
| @@ -1271,11 +1271,13 @@ fail_leds: · 1270 unmodified lines | |||
| 1271 | pad_input_dev = NULL; | 1271 | pad_input_dev = NULL; |
| 1272 | wacom_wac->pad_registered = false; | 1272 | wacom_wac->pad_registered = false; |
| 1273 | fail_register_pad_input: | 1273 | fail_register_pad_input: |
| 1274 | input_unregister_device(touch_input_dev); | 1274 | if (touch_input_dev) |
| 1275 | input_unregister_device(touch_input_dev); | ||
| 1275 | wacom_wac->touch_input = NULL; | 1276 | wacom_wac->touch_input = NULL; |
| 1276 | wacom_wac->touch_registered = false; | 1277 | wacom_wac->touch_registered = false; |
| 1277 | fail_register_touch_input: | 1278 | fail_register_touch_input: |
| 1278 | input_unregister_device(pen_input_dev); | 1279 | if (pen_input_dev) |
| 1280 | input_unregister_device(pen_input_dev); | ||
| 1279 | wacom_wac->pen_input = NULL; | 1281 | wacom_wac->pen_input = NULL; |
| 1280 | wacom_wac->pen_registered = false; | 1282 | wacom_wac->pen_registered = false; |
| 1281 | fail_register_pen_input: | 1283 | fail_register_pen_input: |
| @@ -2213,6 +2213,9 @@ void wacom_setup_device_quirks(struct wacom *wacom) · 2212 unmodified lines | |||
| 2213 | features->x_max = 4096; | 2213 | features->x_max = 4096; |
| 2214 | features->y_max = 4096; | 2214 | features->y_max = 4096; |
| 2215 | } | 2215 | } |
| 2216 | else if (features->pktlen == WACOM_PKGLEN_BBTOUCH) { | ||
| 2217 | features->device_type |= WACOM_DEVICETYPE_PAD; | ||
| 2218 | } | ||
| 2216 | } | 2219 | } |
| 2217 | 2220 | ||
| 2218 | /* | 2221 | /* |