Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 99154fd3 authored by Mathias Nyman's avatar Mathias Nyman Committed by Greg Kroah-Hartman
Browse files

xhci: cleanup error message if halting the host failed.



The old error message always stated that host was not halted
even after trying a certain time.

Host may fail the halt immediately as well with -ENODEV if device
is removed and returns 0xffffffff.

Use a more generic error message and show return value to know if we
failed with -ETIMEDOUT or -ENODEV

Signed-off-by: default avatarMathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent cf5d344e
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -113,12 +113,12 @@ int xhci_halt(struct xhci_hcd *xhci)

	ret = xhci_handshake(&xhci->op_regs->status,
			STS_HALT, STS_HALT, XHCI_MAX_HALT_USEC);
	if (!ret) {
	if (ret) {
		xhci_warn(xhci, "Host halt failed, %d\n", ret);
		return ret;
	}
	xhci->xhc_state |= XHCI_STATE_HALTED;
	xhci->cmd_ring_state = CMD_RING_STATE_STOPPED;
	} else
		xhci_warn(xhci, "Host not halted after %u microseconds.\n",
				XHCI_MAX_HALT_USEC);
	return ret;
}