usb: renesas-xhci: Fix handling of unknown ROM state
authorMoritz Fischer <mdf@kernel.org>
Tue, 15 Jun 2021 15:37:58 +0000 (08:37 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Jun 2021 13:24:23 +0000 (15:24 +0200)
commitd143825baf15f204dac60acdf95e428182aa3374
tree654363c12baf00ab05d9b71cd8b481c1141d7a74
parent1da8116eb0c5dfc05cfb89896239badb18c4daf3
usb: renesas-xhci: Fix handling of unknown ROM state

The ROM load sometimes seems to return an unknown status
(RENESAS_ROM_STATUS_NO_RESULT) instead of success / fail.

If the ROM load indeed failed this leads to failures when trying to
communicate with the controller later on.

Attempt to load firmware using RAM load in those cases.

Fixes: 2478be82de44 ("usb: renesas-xhci: Add ROM loader for uPD720201")
Cc: stable@vger.kernel.org
Cc: Mathias Nyman <mathias.nyman@intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Vinod Koul <vkoul@kernel.org>
Tested-by: Vinod Koul <vkoul@kernel.org>
Reviewed-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Moritz Fischer <mdf@kernel.org>
Link: https://lore.kernel.org/r/20210615153758.253572-1-mdf@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-pci-renesas.c