|
44 | 44 |
|
45 | 45 | #include "musb_core.h" |
46 | 46 | #include "musb_host.h" |
| 47 | +#include "musb_trace.h" |
47 | 48 |
|
48 | 49 | /* MUSB HOST status 22-mar-2006 |
49 | 50 | * |
@@ -225,8 +226,6 @@ musb_start_urb(struct musb *musb, int is_in, struct musb_qh *qh) |
225 | 226 | void *buf = urb->transfer_buffer; |
226 | 227 | u32 offset = 0; |
227 | 228 | struct musb_hw_ep *hw_ep = qh->hw_ep; |
228 | | - unsigned pipe = urb->pipe; |
229 | | - u8 address = usb_pipedevice(pipe); |
230 | 229 | int epnum = hw_ep->epnum; |
231 | 230 |
|
232 | 231 | /* initialize software qh state */ |
@@ -254,16 +253,7 @@ musb_start_urb(struct musb *musb, int is_in, struct musb_qh *qh) |
254 | 253 | len = urb->transfer_buffer_length - urb->actual_length; |
255 | 254 | } |
256 | 255 |
|
257 | | - musb_dbg(musb, "qh %p urb %p dev%d ep%d%s%s, hw_ep %d, %p/%d", |
258 | | - qh, urb, address, qh->epnum, |
259 | | - is_in ? "in" : "out", |
260 | | - ({char *s; switch (qh->type) { |
261 | | - case USB_ENDPOINT_XFER_CONTROL: s = ""; break; |
262 | | - case USB_ENDPOINT_XFER_BULK: s = "-bulk"; break; |
263 | | - case USB_ENDPOINT_XFER_ISOC: s = "-iso"; break; |
264 | | - default: s = "-intr"; break; |
265 | | - } s; }), |
266 | | - epnum, buf + offset, len); |
| 256 | + trace_musb_urb_start(musb, urb); |
267 | 257 |
|
268 | 258 | /* Configure endpoint */ |
269 | 259 | musb_ep_set_qh(hw_ep, is_in, qh); |
@@ -314,13 +304,7 @@ static void musb_giveback(struct musb *musb, struct urb *urb, int status) |
314 | 304 | __releases(musb->lock) |
315 | 305 | __acquires(musb->lock) |
316 | 306 | { |
317 | | - musb_dbg(musb, "complete %p %pF (%d), dev%d ep%d%s, %d/%d", |
318 | | - urb, urb->complete, status, |
319 | | - usb_pipedevice(urb->pipe), |
320 | | - usb_pipeendpoint(urb->pipe), |
321 | | - usb_pipein(urb->pipe) ? "in" : "out", |
322 | | - urb->actual_length, urb->transfer_buffer_length |
323 | | - ); |
| 307 | + trace_musb_urb_gb(musb, urb); |
324 | 308 |
|
325 | 309 | usb_hcd_unlink_urb_from_ep(musb->hcd, urb); |
326 | 310 | spin_unlock(&musb->lock); |
@@ -1296,6 +1280,7 @@ void musb_host_tx(struct musb *musb, u8 epnum) |
1296 | 1280 |
|
1297 | 1281 | pipe = urb->pipe; |
1298 | 1282 | dma = is_dma_capable() ? hw_ep->tx_channel : NULL; |
| 1283 | + trace_musb_urb_tx(musb, urb); |
1299 | 1284 | musb_dbg(musb, "OUT/TX%d end, csr %04x%s", epnum, tx_csr, |
1300 | 1285 | dma ? ", dma" : ""); |
1301 | 1286 |
|
@@ -1853,9 +1838,7 @@ void musb_host_rx(struct musb *musb, u8 epnum) |
1853 | 1838 |
|
1854 | 1839 | pipe = urb->pipe; |
1855 | 1840 |
|
1856 | | - musb_dbg(musb, "<== hw %d rxcsr %04x, urb actual %d (+dma %zu)", |
1857 | | - epnum, rx_csr, urb->actual_length, |
1858 | | - dma ? dma->actual_len : 0); |
| 1841 | + trace_musb_urb_rx(musb, urb); |
1859 | 1842 |
|
1860 | 1843 | /* check for errors, concurrent stall & unlink is not really |
1861 | 1844 | * handled yet! */ |
@@ -2208,6 +2191,8 @@ static int musb_urb_enqueue( |
2208 | 2191 | if (!is_host_active(musb) || !musb->is_active) |
2209 | 2192 | return -ENODEV; |
2210 | 2193 |
|
| 2194 | + trace_musb_urb_enq(musb, urb); |
| 2195 | + |
2211 | 2196 | spin_lock_irqsave(&musb->lock, flags); |
2212 | 2197 | ret = usb_hcd_link_urb_to_ep(hcd, urb); |
2213 | 2198 | qh = ret ? NULL : hep->hcpriv; |
@@ -2444,10 +2429,7 @@ static int musb_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status) |
2444 | 2429 | int is_in = usb_pipein(urb->pipe); |
2445 | 2430 | int ret; |
2446 | 2431 |
|
2447 | | - musb_dbg(musb, "urb=%p, dev%d ep%d%s", urb, |
2448 | | - usb_pipedevice(urb->pipe), |
2449 | | - usb_pipeendpoint(urb->pipe), |
2450 | | - is_in ? "in" : "out"); |
| 2432 | + trace_musb_urb_deq(musb, urb); |
2451 | 2433 |
|
2452 | 2434 | spin_lock_irqsave(&musb->lock, flags); |
2453 | 2435 | ret = usb_hcd_check_unlink_urb(hcd, urb, status); |
|
0 commit comments