diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-05-18 07:55:55 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-05-18 07:55:55 +0200 |
commit | 48a789079a146ecd916e29cc5e47410d9cb05fbe (patch) | |
tree | 04f890f10e9cbdd97b4bf72647656ec94cb8d51f /drivers/usb/host | |
parent | usb: renesas-xhci: Add ROM loader for uPD720201 (diff) | |
parent | Linux 5.7-rc6 (diff) | |
download | linux-48a789079a146ecd916e29cc5e47410d9cb05fbe.tar.xz linux-48a789079a146ecd916e29cc5e47410d9cb05fbe.zip |
Merge 5.7-rc6 into usb-next
We need the USB fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r-- | drivers/usb/host/xhci-plat.c | 4 | ||||
-rw-r--r-- | drivers/usb/host/xhci-ring.c | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c index 44406d0eb317..38ac6efb2cc2 100644 --- a/drivers/usb/host/xhci-plat.c +++ b/drivers/usb/host/xhci-plat.c @@ -372,6 +372,7 @@ static int xhci_plat_remove(struct platform_device *dev) struct clk *reg_clk = xhci->reg_clk; struct usb_hcd *shared_hcd = xhci->shared_hcd; + pm_runtime_get_sync(&dev->dev); xhci->xhc_state |= XHCI_STATE_REMOVING; usb_remove_hcd(shared_hcd); @@ -385,8 +386,9 @@ static int xhci_plat_remove(struct platform_device *dev) clk_disable_unprepare(reg_clk); usb_put_hcd(hcd); - pm_runtime_set_suspended(&dev->dev); pm_runtime_disable(&dev->dev); + pm_runtime_put_noidle(&dev->dev); + pm_runtime_set_suspended(&dev->dev); return 0; } diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index 0fda0c0f4d31..2c255d0620b0 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c @@ -3433,8 +3433,8 @@ int xhci_queue_bulk_tx(struct xhci_hcd *xhci, gfp_t mem_flags, /* New sg entry */ --num_sgs; sent_len -= block_len; - if (num_sgs != 0) { - sg = sg_next(sg); + sg = sg_next(sg); + if (num_sgs != 0 && sg) { block_len = sg_dma_len(sg); addr = (u64) sg_dma_address(sg); addr += sent_len; |