Input updates for v6.8-rc7
- a revert of endpoint checks in bcm5974 - the driver is being naughty and pokes at unclaimed USB interface, so the check fails. We need to fix the driver to claim both interfaces, and then re-implement the endpoints check - a fix to Synaptics RMI driver to avoid UAF on driver unload or device unbinding - a few new VID/PIDs added to xpad game controller driver - a change to gpio_keys_polled driver to quiet it when GPIO causes probe deferral. -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQST2eWILY88ieB2DOtAj56VGEWXnAUCZeqhHAAKCRBAj56VGEWX nNV/AQDOrCWfqrL932EV6/K45siU+sUeTVd2iRIlS3jg52DohgEA53uWXmmU0kvH Hkr6d/cng8X+BfOrO3N7y99Zhc0nlgs= =QQR8 -----END PGP SIGNATURE----- Merge tag 'input-for-v6.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input updates from Dmitry Torokhov: - a revert of endpoint checks in bcm5974 - the driver is being naughty and pokes at unclaimed USB interface, so the check fails. We need to fix the driver to claim both interfaces, and then re-implement the endpoints check - a fix to Synaptics RMI driver to avoid UAF on driver unload or device unbinding - a few new VID/PIDs added to xpad game controller driver - a change to gpio_keys_polled driver to quiet it when GPIO causes probe deferral. * tag 'input-for-v6.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: synaptics-rmi4 - fix UAF of IRQ domain on driver removal Input: gpio_keys_polled - suppress deferred probe error for gpio Revert "Input: bcm5974 - check endpoint type before starting traffic" Input: xpad - add additional HyperX Controller Identifiers
This commit is contained in:
commit
7a4f31c776
@ -130,7 +130,12 @@ static const struct xpad_device {
|
||||
{ 0x0079, 0x18d4, "GPD Win 2 X-Box Controller", 0, XTYPE_XBOX360 },
|
||||
{ 0x03eb, 0xff01, "Wooting One (Legacy)", 0, XTYPE_XBOX360 },
|
||||
{ 0x03eb, 0xff02, "Wooting Two (Legacy)", 0, XTYPE_XBOX360 },
|
||||
{ 0x03f0, 0x038D, "HyperX Clutch", 0, XTYPE_XBOX360 }, /* wired */
|
||||
{ 0x03f0, 0x048D, "HyperX Clutch", 0, XTYPE_XBOX360 }, /* wireless */
|
||||
{ 0x03f0, 0x0495, "HyperX Clutch Gladiate", 0, XTYPE_XBOXONE },
|
||||
{ 0x03f0, 0x07A0, "HyperX Clutch Gladiate RGB", 0, XTYPE_XBOXONE },
|
||||
{ 0x03f0, 0x08B6, "HyperX Clutch Gladiate", 0, XTYPE_XBOXONE }, /* v2 */
|
||||
{ 0x03f0, 0x09B4, "HyperX Clutch Tanto", 0, XTYPE_XBOXONE },
|
||||
{ 0x044f, 0x0f00, "Thrustmaster Wheel", 0, XTYPE_XBOX },
|
||||
{ 0x044f, 0x0f03, "Thrustmaster Wheel", 0, XTYPE_XBOX },
|
||||
{ 0x044f, 0x0f07, "Thrustmaster, Inc. Controller", 0, XTYPE_XBOX },
|
||||
@ -463,6 +468,7 @@ static const struct usb_device_id xpad_table[] = {
|
||||
{ USB_INTERFACE_INFO('X', 'B', 0) }, /* Xbox USB-IF not-approved class */
|
||||
XPAD_XBOX360_VENDOR(0x0079), /* GPD Win 2 controller */
|
||||
XPAD_XBOX360_VENDOR(0x03eb), /* Wooting Keyboards (Legacy) */
|
||||
XPAD_XBOX360_VENDOR(0x03f0), /* HP HyperX Xbox 360 controllers */
|
||||
XPAD_XBOXONE_VENDOR(0x03f0), /* HP HyperX Xbox One controllers */
|
||||
XPAD_XBOX360_VENDOR(0x044f), /* Thrustmaster Xbox 360 controllers */
|
||||
XPAD_XBOX360_VENDOR(0x045e), /* Microsoft Xbox 360 controllers */
|
||||
|
@ -315,12 +315,10 @@ static int gpio_keys_polled_probe(struct platform_device *pdev)
|
||||
|
||||
error = devm_gpio_request_one(dev, button->gpio,
|
||||
flags, button->desc ? : DRV_NAME);
|
||||
if (error) {
|
||||
dev_err(dev,
|
||||
"unable to claim gpio %u, err=%d\n",
|
||||
button->gpio, error);
|
||||
return error;
|
||||
}
|
||||
if (error)
|
||||
return dev_err_probe(dev, error,
|
||||
"unable to claim gpio %u\n",
|
||||
button->gpio);
|
||||
|
||||
bdata->gpiod = gpio_to_desc(button->gpio);
|
||||
if (!bdata->gpiod) {
|
||||
|
@ -19,7 +19,6 @@
|
||||
* Copyright (C) 2006 Nicolas Boichat (nicolas@boichat.ch)
|
||||
*/
|
||||
|
||||
#include "linux/usb.h"
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/slab.h>
|
||||
@ -194,8 +193,6 @@ enum tp_type {
|
||||
|
||||
/* list of device capability bits */
|
||||
#define HAS_INTEGRATED_BUTTON 1
|
||||
/* maximum number of supported endpoints (currently trackpad and button) */
|
||||
#define MAX_ENDPOINTS 2
|
||||
|
||||
/* trackpad finger data block size */
|
||||
#define FSIZE_TYPE1 (14 * sizeof(__le16))
|
||||
@ -894,18 +891,6 @@ static int bcm5974_resume(struct usb_interface *iface)
|
||||
return error;
|
||||
}
|
||||
|
||||
static bool bcm5974_check_endpoints(struct usb_interface *iface,
|
||||
const struct bcm5974_config *cfg)
|
||||
{
|
||||
u8 ep_addr[MAX_ENDPOINTS + 1] = {0};
|
||||
|
||||
ep_addr[0] = cfg->tp_ep;
|
||||
if (cfg->tp_type == TYPE1)
|
||||
ep_addr[1] = cfg->bt_ep;
|
||||
|
||||
return usb_check_int_endpoints(iface, ep_addr);
|
||||
}
|
||||
|
||||
static int bcm5974_probe(struct usb_interface *iface,
|
||||
const struct usb_device_id *id)
|
||||
{
|
||||
@ -918,11 +903,6 @@ static int bcm5974_probe(struct usb_interface *iface,
|
||||
/* find the product index */
|
||||
cfg = bcm5974_get_config(udev);
|
||||
|
||||
if (!bcm5974_check_endpoints(iface, cfg)) {
|
||||
dev_err(&iface->dev, "Unexpected non-int endpoint\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
/* allocate memory for our device state and initialize it */
|
||||
dev = kzalloc(sizeof(struct bcm5974), GFP_KERNEL);
|
||||
input_dev = input_allocate_device();
|
||||
|
@ -978,12 +978,12 @@ static int rmi_driver_remove(struct device *dev)
|
||||
|
||||
rmi_disable_irq(rmi_dev, false);
|
||||
|
||||
irq_domain_remove(data->irqdomain);
|
||||
data->irqdomain = NULL;
|
||||
|
||||
rmi_f34_remove_sysfs(rmi_dev);
|
||||
rmi_free_function_list(rmi_dev);
|
||||
|
||||
irq_domain_remove(data->irqdomain);
|
||||
data->irqdomain = NULL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user