This commit adds counters for successful and failed soft retry
attempts.
bug
200162414
Change-Id: I7406cea4368da85c78c8fe350398031fc8121015
Signed-off-by: JC Kuo <jckuo@nvidia.com>
Reviewed-on: http://git-master/r/
1169997
GVS: Gerrit_Virtual_Submit
Reviewed-by: ChihMin Cheng <ccheng@nvidia.com>
Tested-by: Mark Kuo <mkuo@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
if (ep_ring->soft_try) {
xhci_dbg(xhci, "soft retry completed successfully\n");
ep_ring->soft_try = false;
+ xhci->xhci_ereport.soft_retry_success++;
+ xhci_dbg(xhci, "soft_retry_success counter %u\n",
+ xhci->xhci_ereport.soft_retry_success);
+ xhci_dbg(xhci, "soft_retry_failure counter %u\n",
+ xhci->xhci_ereport.soft_retry_failure);
xhci_endpoint_soft_retry(xhci,
slot_id, ep_index + 1, false);
}
} else {
xhci_dbg(xhci, "soft retry complete but transfer still failed\n");
ep_ring->soft_try = false;
+ xhci->xhci_ereport.soft_retry_failure++;
+ xhci_dbg(xhci, "soft_retry_success counter %u\n",
+ xhci->xhci_ereport.soft_retry_success);
+ xhci_dbg(xhci, "soft_retry_failure counter %u\n",
+ xhci->xhci_ereport.soft_retry_failure);
}
xhci_endpoint_soft_retry(xhci,
slot_id, ep_index + 1, false);
struct platform_device *pdev = NULL;
struct tegra_xhci_hcd *tegra = NULL;
struct xhci_hcd *xhci = NULL;
- ssize_t ret;
+ ssize_t ret = 0;
if (dev != NULL)
pdev = to_platform_device(dev);
if (tegra != NULL) {
xhci = tegra->xhci;
- ret = snprintf(buf, PAGE_SIZE, "comp_tx_err:%u\nversion:%u\n",
- xhci->xhci_ereport.comp_tx_err,
+ ret += snprintf(&buf[ret], PAGE_SIZE - ret, "version:%u\n",
xhci->xhci_ereport.version);
+ ret += snprintf(&buf[ret], PAGE_SIZE - ret, "comp_tx_err:%u\n",
+ xhci->xhci_ereport.comp_tx_err);
+ ret += snprintf(&buf[ret], PAGE_SIZE - ret,
+ "soft_retry_success:%u\n",
+ xhci->xhci_ereport.soft_retry_success);
+ ret += snprintf(&buf[ret], PAGE_SIZE - ret,
+ "soft_retry_failure:%u\n",
+ xhci->xhci_ereport.soft_retry_failure);
} else
- ret = snprintf(buf, PAGE_SIZE, "comp_tx_err:0\nversion:0\n");
+ ret = snprintf(buf, PAGE_SIZE, "counters are not available\n");
return ret;
}
struct xhci_err_cnt {
unsigned int version;
unsigned int comp_tx_err;
+ unsigned int soft_retry_success;
+ unsigned int soft_retry_failure;
};
/* There is one xhci_hcd structure per controller */