diff options
-rw-r--r-- | drivers/usb/host/xhci-ring.c | 5 | ||||
-rw-r--r-- | drivers/usb/host/xhci.c | 15 | ||||
-rw-r--r-- | drivers/usb/host/xhci.h | 2 |
3 files changed, 22 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index 0c008497edfd..436332aa341b 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c | |||
@@ -1733,6 +1733,7 @@ static int process_isoc_td(struct xhci_hcd *xhci, struct xhci_td *td, | |||
1733 | frame->status = -EOVERFLOW; | 1733 | frame->status = -EOVERFLOW; |
1734 | skip_td = true; | 1734 | skip_td = true; |
1735 | break; | 1735 | break; |
1736 | case COMP_DEV_ERR: | ||
1736 | case COMP_STALL: | 1737 | case COMP_STALL: |
1737 | frame->status = -EPROTO; | 1738 | frame->status = -EPROTO; |
1738 | skip_td = true; | 1739 | skip_td = true; |
@@ -2016,6 +2017,10 @@ static int handle_tx_event(struct xhci_hcd *xhci, | |||
2016 | TRB_TO_SLOT_ID(le32_to_cpu(event->flags)), | 2017 | TRB_TO_SLOT_ID(le32_to_cpu(event->flags)), |
2017 | ep_index); | 2018 | ep_index); |
2018 | goto cleanup; | 2019 | goto cleanup; |
2020 | case COMP_DEV_ERR: | ||
2021 | xhci_warn(xhci, "WARN: detect an incompatible device"); | ||
2022 | status = -EPROTO; | ||
2023 | break; | ||
2019 | case COMP_MISSED_INT: | 2024 | case COMP_MISSED_INT: |
2020 | /* | 2025 | /* |
2021 | * When encounter missed service error, one or more isoc tds | 2026 | * When encounter missed service error, one or more isoc tds |
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; |
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h index 7d1ea3bf5e1f..ba90af1c34b4 100644 --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h | |||
@@ -874,6 +874,8 @@ struct xhci_transfer_event { | |||
874 | #define COMP_PING_ERR 20 | 874 | #define COMP_PING_ERR 20 |
875 | /* Event Ring is full */ | 875 | /* Event Ring is full */ |
876 | #define COMP_ER_FULL 21 | 876 | #define COMP_ER_FULL 21 |
877 | /* Incompatible Device Error */ | ||
878 | #define COMP_DEV_ERR 22 | ||
877 | /* Missed Service Error - HC couldn't service an isoc ep within interval */ | 879 | /* Missed Service Error - HC couldn't service an isoc ep within interval */ |
878 | #define COMP_MISSED_INT 23 | 880 | #define COMP_MISSED_INT 23 |
879 | /* Successfully stopped command ring */ | 881 | /* Successfully stopped command ring */ |