diff options
author | Alex He <alex.he@amd.com> | 2011-06-08 06:34:06 -0400 |
---|---|---|
committer | Sarah Sharp <sarah.a.sharp@linux.intel.com> | 2011-06-17 14:28:08 -0400 |
commit | f6ba6fe2d913da6707a71a413d6ec8ae98d6ce18 (patch) | |
tree | 2da2e6bc2b35659e5372825ecfd575ffad70ca5e /drivers/usb/host/xhci.c | |
parent | e1cf486d881d853d710e2d86a7adfc5fd260990f (diff) |
xHCI 1.0: Incompatible Device Error
It is one new TRB Completion Code for the xHCI spec v1.0.
Asserted if the xHC detects a problem with a device that does not allow it to
be successfully accessed, e.g. due to a device compliance or compatibility
problem. This error may be returned by any command or transfer, and is fatal
as far as the Slot is concerned. Return -EPROTO by urb->status or frame->status
of ISOC for transfer case. And return -ENODEV for configure endpoint command,
evaluate context command and address device command if there is an incompatible
Device Error. The error codes will be sent back to the USB core to decide how
to do. It's unnecessary for other commands because after the three commands run
successfully means that the device has been accepted.
Signed-off-by: Alex He <alex.he@amd.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Diffstat (limited to 'drivers/usb/host/xhci.c')
-rw-r--r-- | drivers/usb/host/xhci.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index e5a01713f937..15eb4c3d793c 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c | |||
@@ -1551,6 +1551,11 @@ static int xhci_configure_endpoint_result(struct xhci_hcd *xhci, | |||
1551 | "and endpoint is not disabled.\n"); | 1551 | "and endpoint is not disabled.\n"); |
1552 | ret = -EINVAL; | 1552 | ret = -EINVAL; |
1553 | break; | 1553 | break; |
1554 | case COMP_DEV_ERR: | ||
1555 | dev_warn(&udev->dev, "ERROR: Incompatible device for endpoint " | ||
1556 | "configure command.\n"); | ||
1557 | ret = -ENODEV; | ||
1558 | break; | ||
1554 | case COMP_SUCCESS: | 1559 | case COMP_SUCCESS: |
1555 | dev_dbg(&udev->dev, "Successful Endpoint Configure command\n"); | 1560 | dev_dbg(&udev->dev, "Successful Endpoint Configure command\n"); |
1556 | ret = 0; | 1561 | ret = 0; |
@@ -1585,6 +1590,11 @@ static int xhci_evaluate_context_result(struct xhci_hcd *xhci, | |||
1585 | xhci_dbg_ctx(xhci, virt_dev->out_ctx, 1); | 1590 | xhci_dbg_ctx(xhci, virt_dev->out_ctx, 1); |
1586 | ret = -EINVAL; | 1591 | ret = -EINVAL; |
1587 | break; | 1592 | break; |
1593 | case COMP_DEV_ERR: | ||
1594 | dev_warn(&udev->dev, "ERROR: Incompatible device for evaluate " | ||
1595 | "context command.\n"); | ||
1596 | ret = -ENODEV; | ||
1597 | break; | ||
1588 | case COMP_MEL_ERR: | 1598 | case COMP_MEL_ERR: |
1589 | /* Max Exit Latency too large error */ | 1599 | /* Max Exit Latency too large error */ |
1590 | dev_warn(&udev->dev, "WARN: Max Exit Latency too large\n"); | 1600 | dev_warn(&udev->dev, "WARN: Max Exit Latency too large\n"); |
@@ -2867,6 +2877,11 @@ int xhci_address_device(struct usb_hcd *hcd, struct usb_device *udev) | |||
2867 | dev_warn(&udev->dev, "Device not responding to set address.\n"); | 2877 | dev_warn(&udev->dev, "Device not responding to set address.\n"); |
2868 | ret = -EPROTO; | 2878 | ret = -EPROTO; |
2869 | break; | 2879 | break; |
2880 | case COMP_DEV_ERR: | ||
2881 | dev_warn(&udev->dev, "ERROR: Incompatible device for address " | ||
2882 | "device command.\n"); | ||
2883 | ret = -ENODEV; | ||
2884 | break; | ||
2870 | case COMP_SUCCESS: | 2885 | case COMP_SUCCESS: |
2871 | xhci_dbg(xhci, "Successful Address Device command\n"); | 2886 | xhci_dbg(xhci, "Successful Address Device command\n"); |
2872 | break; | 2887 | break; |