]> git.baikalelectronics.ru Git - kernel.git/commit
usb: cdns3: Fix issue with using incorrect PCI device function
authorPawel Laszczak <pawell@cadence.com>
Wed, 8 Mar 2023 12:44:27 +0000 (07:44 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Apr 2023 09:16:40 +0000 (11:16 +0200)
commit1d5de9e91c419b92d035ea41b5d34a4bfcf0a1fa
tree9603edf0b795f605fdc1cd059fae606f20fa2be1
parenta978755ed5e3fb32b02faf61171d89a113d72cb4
usb: cdns3: Fix issue with using incorrect PCI device function

commit 1272fd652a226ccb34e9f47371b6121948048438 upstream.

PCI based platform can have more than two PCI functions.
USBSS PCI Glue driver during initialization should
consider only DRD/HOST/DEVICE PCI functions and
all other should be ignored. This patch adds additional
condition which causes that only DRD and HOST/DEVICE
function will be accepted.

cc: <stable@vger.kernel.org>
Fixes: 890954bdc8d0 ("usb: cdns3: Add Cadence USB3 DRD Driver")
Signed-off-by: Pawel Laszczak <pawell@cadence.com>
Link: https://lore.kernel.org/r/20230308124427.311245-1-pawell@cadence.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/cdns3/cdns3-pci-wrap.c