Commit 3e9968b
committed
phy: tegra: xusb: Fix crash during pad power on/down
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2122414
Tested: Verify USB-A and USB-C are functional on Nvidia Orin board,
and no regressions on other platforms.
commit 2a4ea83
Author: Jon Hunter <jonathanh@nvidia.com>
Date: Mon Oct 10 14:51:32 2022 +0100
phy: tegra: xusb: Fix crash during pad power on/down
Commit a88520b ("usb: gadget: tegra: Reduce pad power") added calls
to tegra_phy_xusb_utmi_pad_power_on/down in the Tegra XUDC driver to
control the pad power. This change is causing a kernel panic when
powering down the pads on entering suspend with the Jetson TX2 platform.
The panic occurs because the 'xudc->curr_utmi_phy' is not configured on
this platform and we do not check to see if the pointer is valid before
attempting to deference the pointer. Fix this by checking to see if the
'phy' pointer passed to tegra_phy_xusb_utmi_pad_power_on/down is valid.
Fixes: a88520b ("usb: gadget: tegra: Reduce pad power")
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Link: https://lore.kernel.org/r/20221010135132.30809-1-jonathanh@nvidia.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
(cherry picked from commit 2a4ea83)
Signed-off-by: David Marlin <dmarlin@redhat.com>1 parent ad00dc5 commit 3e9968b
1 file changed
+16
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1461 | 1461 | | |
1462 | 1462 | | |
1463 | 1463 | | |
1464 | | - | |
1465 | | - | |
| 1464 | + | |
| 1465 | + | |
| 1466 | + | |
| 1467 | + | |
| 1468 | + | |
| 1469 | + | |
| 1470 | + | |
| 1471 | + | |
1466 | 1472 | | |
1467 | 1473 | | |
1468 | 1474 | | |
| |||
1471 | 1477 | | |
1472 | 1478 | | |
1473 | 1479 | | |
1474 | | - | |
1475 | | - | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
| 1485 | + | |
| 1486 | + | |
| 1487 | + | |
1476 | 1488 | | |
1477 | 1489 | | |
1478 | 1490 | | |
| |||
0 commit comments