@@ -167,10 +167,6 @@ static void inc_deq(struct xhci_hcd *xhci, struct xhci_ring *ring, bool consumer
167
167
next = ring -> dequeue ;
168
168
}
169
169
addr = (unsigned long long ) xhci_trb_virt_to_dma (ring -> deq_seg , ring -> dequeue );
170
- if (ring == xhci -> cmd_ring )
171
- xhci_dbg (xhci , "Command ring deq = 0x%llx (DMA)\n" , addr );
172
- else
173
- xhci_dbg (xhci , "Ring deq = 0x%llx (DMA)\n" , addr );
174
170
}
175
171
176
172
/*
@@ -246,12 +242,6 @@ static void inc_enq(struct xhci_hcd *xhci, struct xhci_ring *ring,
246
242
next = ring -> enqueue ;
247
243
}
248
244
addr = (unsigned long long ) xhci_trb_virt_to_dma (ring -> enq_seg , ring -> enqueue );
249
- if (ring == xhci -> event_ring )
250
- xhci_dbg (xhci , "Event ring enq = 0x%llx (DMA)\n" , addr );
251
- else if (ring == xhci -> cmd_ring )
252
- xhci_dbg (xhci , "Command ring enq = 0x%llx (DMA)\n" , addr );
253
- else
254
- xhci_dbg (xhci , "Ring enq = 0x%llx (DMA)\n" , addr );
255
245
}
256
246
257
247
/*
@@ -634,13 +624,11 @@ static void xhci_giveback_urb_in_irq(struct xhci_hcd *xhci,
634
624
}
635
625
}
636
626
usb_hcd_unlink_urb_from_ep (hcd , urb );
637
- xhci_dbg (xhci , "Giveback %s URB %p\n" , adjective , urb );
638
627
639
628
spin_unlock (& xhci -> lock );
640
629
usb_hcd_giveback_urb (hcd , urb , status );
641
630
xhci_urb_free_priv (xhci , urb_priv );
642
631
spin_lock (& xhci -> lock );
643
- xhci_dbg (xhci , "%s URB given back\n" , adjective );
644
632
}
645
633
}
646
634
@@ -1630,7 +1618,6 @@ static int process_ctrl_td(struct xhci_hcd *xhci, struct xhci_td *td,
1630
1618
"without IOC set??\n" );
1631
1619
* status = - ESHUTDOWN ;
1632
1620
} else {
1633
- xhci_dbg (xhci , "Successful control transfer!\n" );
1634
1621
* status = 0 ;
1635
1622
}
1636
1623
break ;
@@ -1727,7 +1714,6 @@ static int process_isoc_td(struct xhci_hcd *xhci, struct xhci_td *td,
1727
1714
switch (trb_comp_code ) {
1728
1715
case COMP_SUCCESS :
1729
1716
frame -> status = 0 ;
1730
- xhci_dbg (xhci , "Successful isoc transfer!\n" );
1731
1717
break ;
1732
1718
case COMP_SHORT_TX :
1733
1719
frame -> status = td -> urb -> transfer_flags & URB_SHORT_NOT_OK ?
@@ -1837,12 +1823,6 @@ static int process_bulk_intr_td(struct xhci_hcd *xhci, struct xhci_td *td,
1837
1823
else
1838
1824
* status = 0 ;
1839
1825
} else {
1840
- if (usb_endpoint_xfer_bulk (& td -> urb -> ep -> desc ))
1841
- xhci_dbg (xhci , "Successful bulk "
1842
- "transfer!\n" );
1843
- else
1844
- xhci_dbg (xhci , "Successful interrupt "
1845
- "transfer!\n" );
1846
1826
* status = 0 ;
1847
1827
}
1848
1828
break ;
@@ -1856,11 +1836,12 @@ static int process_bulk_intr_td(struct xhci_hcd *xhci, struct xhci_td *td,
1856
1836
/* Others already handled above */
1857
1837
break ;
1858
1838
}
1859
- xhci_dbg (xhci , "ep %#x - asked for %d bytes, "
1860
- "%d bytes untransferred\n" ,
1861
- td -> urb -> ep -> desc .bEndpointAddress ,
1862
- td -> urb -> transfer_buffer_length ,
1863
- TRB_LEN (le32_to_cpu (event -> transfer_len )));
1839
+ if (trb_comp_code == COMP_SHORT_TX )
1840
+ xhci_dbg (xhci , "ep %#x - asked for %d bytes, "
1841
+ "%d bytes untransferred\n" ,
1842
+ td -> urb -> ep -> desc .bEndpointAddress ,
1843
+ td -> urb -> transfer_buffer_length ,
1844
+ TRB_LEN (le32_to_cpu (event -> transfer_len )));
1864
1845
/* Fast path - was this the last TRB in the TD for this URB? */
1865
1846
if (event_trb == td -> last_trb ) {
1866
1847
if (TRB_LEN (le32_to_cpu (event -> transfer_len )) != 0 ) {
@@ -1954,7 +1935,6 @@ static int handle_tx_event(struct xhci_hcd *xhci,
1954
1935
1955
1936
/* Endpoint ID is 1 based, our index is zero based */
1956
1937
ep_index = TRB_TO_EP_ID (le32_to_cpu (event -> flags )) - 1 ;
1957
- xhci_dbg (xhci , "%s - ep index = %d\n" , __func__ , ep_index );
1958
1938
ep = & xdev -> eps [ep_index ];
1959
1939
ep_ring = xhci_dma_to_transfer_ring (ep , le64_to_cpu (event -> buffer ));
1960
1940
ep_ctx = xhci_get_ep_ctx (xhci , xdev -> out_ctx , ep_index );
@@ -2149,9 +2129,15 @@ static int handle_tx_event(struct xhci_hcd *xhci,
2149
2129
xhci_urb_free_priv (xhci , urb_priv );
2150
2130
2151
2131
usb_hcd_unlink_urb_from_ep (bus_to_hcd (urb -> dev -> bus ), urb );
2152
- xhci_dbg (xhci , "Giveback URB %p, len = %d, "
2153
- "status = %d\n" ,
2154
- urb , urb -> actual_length , status );
2132
+ if ((urb -> actual_length != urb -> transfer_buffer_length &&
2133
+ (urb -> transfer_flags &
2134
+ URB_SHORT_NOT_OK )) ||
2135
+ status != 0 )
2136
+ xhci_dbg (xhci , "Giveback URB %p, len = %d, "
2137
+ "expected = %x, status = %d\n" ,
2138
+ urb , urb -> actual_length ,
2139
+ urb -> transfer_buffer_length ,
2140
+ status );
2155
2141
spin_unlock (& xhci -> lock );
2156
2142
usb_hcd_giveback_urb (bus_to_hcd (urb -> dev -> bus ), urb , status );
2157
2143
spin_lock (& xhci -> lock );
@@ -2379,7 +2365,6 @@ static int prepare_ring(struct xhci_hcd *xhci, struct xhci_ring *ep_ring,
2379
2365
u32 ep_state , unsigned int num_trbs , gfp_t mem_flags )
2380
2366
{
2381
2367
/* Make sure the endpoint has been added to xHC schedule */
2382
- xhci_dbg (xhci , "Endpoint state = 0x%x\n" , ep_state );
2383
2368
switch (ep_state ) {
2384
2369
case EP_STATE_DISABLED :
2385
2370
/*
@@ -2416,7 +2401,6 @@ static int prepare_ring(struct xhci_hcd *xhci, struct xhci_ring *ep_ring,
2416
2401
struct xhci_ring * ring = ep_ring ;
2417
2402
union xhci_trb * next ;
2418
2403
2419
- xhci_dbg (xhci , "prepare_ring: pointing to link trb\n" );
2420
2404
next = ring -> enqueue ;
2421
2405
2422
2406
while (last_trb (xhci , ring , ring -> enq_seg , next )) {
0 commit comments