linux-stable/drivers/usb
Bastien Nocera 0cb686692f USB: apple-mfi-fastcharge: don't probe unhandled devices
From: Bastien Nocera <hadess@hadess.net>

Contrary to the comment above the id table, we didn't implement a match
function. This meant that every single Apple device that was already
plugged in to the computer would have its device driver reprobed
when the apple-mfi-fastcharge driver was loaded, eg. the SD card reader
could be reprobed when the apple-mfi-fastcharge after pivoting root
during boot up and the module became available.

Make sure that the driver probe isn't being run for unsupported
devices by adding a match function that checks the product ID, in
addition to the id_table checking the vendor ID.

Link: https://bugzilla.redhat.com/show_bug.cgi?id=1878347
Link: https://lore.kernel.org/linux-usb/CAE3RAxt0WhBEz8zkHrVO5RiyEOasayy1QUAjsv-pB0fAbY1GSw@mail.gmail.com/
Fixes: 249fa8217b ("USB: Add driver to control USB fast charge for iOS devices")
Cc: <stable@vger.kernel.org> # 5.8
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Alan Stern <stern@rowland.harvard.edu>
[m.v.b: Add Link and Reported-by tags to the commit message]
Reported-by: Pany <pany@fedoraproject.org>
Tested-by: Pan (Pany) YUAN <pany@fedoraproject.org>
Tested-by: Bastien Nocera <hadess@hadess.net>
Signed-off-by: Bastien Nocera <hadess@hadess.net>
Signed-off-by: M. Vefa Bicakci <m.v.b@runbox.com>
Link: https://lore.kernel.org/r/20201022135521.375211-3-m.v.b@runbox.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-28 13:25:01 +01:00
..
atm usb: atm: don't use snprintf() for sysfs attrs 2020-08-25 19:11:18 +02:00
c67x00 Linux 5.9-rc3 2020-08-31 07:11:45 +02:00
cdns3 usb: cdns3: gadget: enlarge the TRB ring length 2020-10-02 09:57:46 +03:00
chipidea usb: chipidea: ci_hdrc_imx: restore pinctrl 2020-09-03 16:32:07 +08:00
class usb: cdc-acm: fix cooldown mechanism 2020-10-28 13:20:21 +01:00
common usb: common: usb-conn-gpio: Print error on failure to get VBUS 2020-08-18 12:13:44 +02:00
core usbcore: Check both id_table and match() when both available 2020-10-28 13:24:58 +01:00
dwc2 usb: dwc2: Fix INTR OUT transfers in DDMA mode. 2020-10-02 13:29:13 +03:00
dwc3 usb: fix kernel-doc markups 2020-10-28 13:18:56 +01:00
early usb: early: ehci-dbgp: convert to readl_poll_timeout_atomic() 2020-09-25 16:29:09 +02:00
gadget usb: fix kernel-doc markups 2020-10-28 13:18:56 +01:00
host usb: host: ehci-tegra: Fix error handling in tegra_ehci_probe() 2020-10-28 13:23:07 +01:00
image USB: microtek: use set_host_byte() 2020-09-16 12:42:10 +02:00
isp1760 usb: isp1760-hcd: convert to readl_poll_timeout_atomic() 2020-09-25 16:30:05 +02:00
misc USB: apple-mfi-fastcharge: don't probe unhandled devices 2020-10-28 13:25:01 +01:00
mon
mtu3 usb: mtu3: Remove unsused inline function is_first_entry 2020-10-02 09:43:36 +03:00
musb usb: musb: gadget: Use fallthrough pseudo-keyword 2020-10-10 12:32:29 +02:00
phy usb: phy: phy-ab8500-usb: fix spello of "function" 2020-10-02 09:57:41 +03:00
renesas_usbhs usb: Use fallthrough pseudo-keyword 2020-07-10 08:55:17 +02:00
roles device connection: Remove struct device_connection 2020-09-07 11:14:09 +02:00
serial USB-serial updates for 5.10-rc1 2020-10-08 17:29:39 +02:00
storage USB: UAS: use macro for reporting results 2020-09-16 12:43:35 +02:00
typec usb: typec: stusb160x: fix an IS_ERR() vs NULL check in probe 2020-10-28 13:22:19 +01:00
usbip usbip: vhci_hcd: fix calling usb_hcd_giveback_urb() with irqs enabled 2020-10-07 09:25:48 +02:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile
usb-skeleton.c