Rename the constants XHCI_TRUST_TX_LENGTH to XHCI_TRUST_RX_LENGTH and COMP_SHORT_TX to COMP_SHORT_RX to avoid any confusion that they might apply to transmit transfers. Signed-off-by: David Laight <david.laight@xxxxxxxxxx> --- I can't actually see any driver that requires this quirk! Note that this replaces part of the earlier patch from me: [PATCH] usb: xhci: Less verbose tracing of short receives drivers/usb/host/xhci-pci.c | 4 ++-- drivers/usb/host/xhci-ring.c | 26 +++++++++++++------------- drivers/usb/host/xhci.h | 4 ++-- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c index b8dffd5..97b3edc 100644 --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c @@ -89,7 +89,7 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) "QUIRK: Fresco Logic revision %u " "has broken MSI implementation", pdev->revision); - xhci->quirks |= XHCI_TRUST_TX_LENGTH; + xhci->quirks |= XHCI_TRUST_RX_LENGTH; } if (pdev->vendor == PCI_VENDOR_ID_NEC) @@ -135,7 +135,7 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) xhci->quirks |= XHCI_RESET_ON_RESUME; xhci_dbg_trace(xhci, trace_xhci_dbg_quirks, "QUIRK: Resetting on resume"); - xhci->quirks |= XHCI_TRUST_TX_LENGTH; + xhci->quirks |= XHCI_TRUST_RX_LENGTH; } if (pdev->vendor == PCI_VENDOR_ID_VIA) xhci->quirks |= XHCI_RESET_ON_RESUME; diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index 6bf8a37..2031dc3 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c @@ -2115,7 +2115,7 @@ static int process_ctrl_td(struct xhci_hcd *xhci, struct xhci_td *td, *status = 0; } break; - case COMP_SHORT_TX: + case COMP_SHORT_RX: if (td->urb->transfer_flags & URB_SHORT_NOT_OK) *status = -EREMOTEIO; else @@ -2210,9 +2210,9 @@ static int process_isoc_td(struct xhci_hcd *xhci, struct xhci_td *td, frame->status = 0; break; } - if ((xhci->quirks & XHCI_TRUST_TX_LENGTH)) - trb_comp_code = COMP_SHORT_TX; - case COMP_SHORT_TX: + if ((xhci->quirks & XHCI_TRUST_RX_LENGTH)) + trb_comp_code = COMP_SHORT_RX; + case COMP_SHORT_RX: frame->status = td->urb->transfer_flags & URB_SHORT_NOT_OK ? -EREMOTEIO : 0; break; @@ -2316,13 +2316,13 @@ static int process_bulk_intr_td(struct xhci_hcd *xhci, struct xhci_td *td, *status = -EREMOTEIO; else *status = 0; - if ((xhci->quirks & XHCI_TRUST_TX_LENGTH)) - trb_comp_code = COMP_SHORT_TX; + if ((xhci->quirks & XHCI_TRUST_RX_LENGTH)) + trb_comp_code = COMP_SHORT_RX; } else { *status = 0; } break; - case COMP_SHORT_TX: + case COMP_SHORT_RX: if (td->urb->transfer_flags & URB_SHORT_NOT_OK) *status = -EREMOTEIO; else @@ -2332,7 +2332,7 @@ static int process_bulk_intr_td(struct xhci_hcd *xhci, struct xhci_td *td, /* Others already handled above */ break; } - if (trb_comp_code == COMP_SHORT_TX) + if (trb_comp_code == COMP_SHORT_RX) xhci_dbg(xhci, "ep %#x - asked for %d bytes, " "%d bytes untransferred\n", td->urb->ep->desc.bEndpointAddress, @@ -2480,12 +2480,12 @@ static int handle_tx_event(struct xhci_hcd *xhci, case COMP_SUCCESS: if (EVENT_TRB_LEN(le32_to_cpu(event->transfer_len)) == 0) break; - if (xhci->quirks & XHCI_TRUST_TX_LENGTH) - trb_comp_code = COMP_SHORT_TX; + if (xhci->quirks & XHCI_TRUST_RX_LENGTH) + trb_comp_code = COMP_SHORT_RX; else xhci_warn_ratelimited(xhci, - "WARN Successful completion on short TX: needs XHCI_TRUST_TX_LENGTH quirk?\n"); - case COMP_SHORT_TX: + "WARN Successful completion on short RX: needs XHCI_TRUST_RX_LENGTH quirk?\n"); + case COMP_SHORT_RX: break; case COMP_STOP: xhci_dbg(xhci, "Stopped on Transfer TRB\n"); @@ -2652,7 +2652,7 @@ static int handle_tx_event(struct xhci_hcd *xhci, ret = skip_isoc_td(xhci, td, event, ep, &status); goto cleanup; } - if (trb_comp_code == COMP_SHORT_TX) + if (trb_comp_code == COMP_SHORT_RX) ep_ring->last_td_was_short = true; else ep_ring->last_td_was_short = false; diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h index 6f38ab7..c49e1de 100644 --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h @@ -1031,7 +1031,7 @@ struct xhci_transfer_event { /* Endpoint Not Enabled Error */ #define COMP_EBADEP 12 /* Short Packet */ -#define COMP_SHORT_TX 13 +#define COMP_SHORT_RX 13 /* Ring Underrun - doorbell rung for an empty isoc OUT ep ring */ #define COMP_UNDERRUN 14 /* Ring Overrun - isoc IN ep ring is empty when ep is scheduled to RX */ @@ -1540,7 +1540,7 @@ struct xhci_hcd { #define XHCI_RESET_ON_RESUME (1 << 7) #define XHCI_SW_BW_CHECKING (1 << 8) #define XHCI_AMD_0x96_HOST (1 << 9) -#define XHCI_TRUST_TX_LENGTH (1 << 10) +#define XHCI_TRUST_RX_LENGTH (1 << 10) #define XHCI_LPM_SUPPORT (1 << 11) #define XHCI_INTEL_HOST (1 << 12) #define XHCI_SPURIOUS_REBOOT (1 << 13) -- 1.8.1.2 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html