Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The KP40D wireless receiver dongle (0x20dd:0x515c) is defined with vendor ID 0x20dd in the HID driver but incorrectly listed as 0x20bc in the USB driver tables, preventing the driver from binding.
--
--- Patch [1]: [PATCH] Input: xpad - add support for Beitong KP series controllers ---
commit a241c834ca356248bc12344397a71cd6ee7c97b1
Author: vegetablecat <[email protected]>
Input: xpad - add support for Beitong KP series controllers
This commit adds support for Beitong KP series controllers by issuing an
XUSB10 descriptor read during probe to prevent them from reverting to
Nintendo Switch mode. It also includes an optional HID receiver driver for
the KP40D dongle to prevent interference from hid-generic.
> diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
> --- a/drivers/input/joystick/xpad.c
> +++ b/drivers/input/joystick/xpad.c
[ ... ]
> @@ -332,6 +334,32 @@ static const struct xpad_device {
> { 0x1bad, 0xfd00, "Razer Onza TE", 0, XTYPE_XBOX360 },
> { 0x1bad, 0xfd01, "Razer Onza", 0, XTYPE_XBOX360 },
> { 0x1ee9, 0x1590, "ZOTAC Gaming Zone", 0, XTYPE_XBOX360 },
> + { 0x20bc, 0x5125, "BETOP BTP-KP20A/BTP-KP40A Controller", 0, XTYPE_XBOX360, FLAG_READ_XUSB10 },
[ ... ]
> + { 0x20bc, 0x515b, "BETOP BTP-KP40D Controller (White)", 0, XTYPE_XBOX360, FLAG_READ_XUSB10 },
> + { 0x20bc, 0x515c, "BETOP BTP-KP40D Controller (White)", 0, XTYPE_XBOX360, FLAG_READ_XUSB10 },
[Severity: Medium]
The commit message states the receiver dongle (0x515c) has a distinct vendor
ID of 0x20dd. However, this entry maps it to the controller's vendor ID
of 0x20bc.
Will this incorrect vendor ID, along with the omission of 0x20dd in the
xpad_table USB match list, prevent the xpad driver from binding to the
dongle's USB interface?
[ ... ]
> @@ -2312,7 +2357,79 @@ static struct usb_driver xpad_driver = {
> .id_table = xpad_table,
> };
>
[ ... ]
> +static const struct hid_device_id xpad_receiver_devices[] = {
> + { HID_USB_DEVICE(0x20dd, 0x515c) },
> + { }
> +};
[Severity: Medium]
This correctly identifies the dongle with vendor ID 0x20dd, but contradicts
the xpad_device array above.
Could the xpad_device array and the xpad_table be updated to include 0x20dd
so the USB driver can successfully probe the device?
--
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.