Deleted Added
full compact
usb_transfer.c (213435) usb_transfer.c (215649)
1/* $FreeBSD: head/sys/dev/usb/usb_transfer.c 213435 2010-10-04 23:18:05Z hselasky $ */
1/* $FreeBSD: head/sys/dev/usb/usb_transfer.c 215649 2010-11-22 01:11:28Z weongyo $ */
2/*-
3 * Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.

--- 45 unchanged lines hidden (view full) ---

55#include <dev/usb/usb_process.h>
56#include <dev/usb/usb_transfer.h>
57#include <dev/usb/usb_device.h>
58#include <dev/usb/usb_debug.h>
59#include <dev/usb/usb_util.h>
60
61#include <dev/usb/usb_controller.h>
62#include <dev/usb/usb_bus.h>
2/*-
3 * Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.

--- 45 unchanged lines hidden (view full) ---

55#include <dev/usb/usb_process.h>
56#include <dev/usb/usb_transfer.h>
57#include <dev/usb/usb_device.h>
58#include <dev/usb/usb_debug.h>
59#include <dev/usb/usb_util.h>
60
61#include <dev/usb/usb_controller.h>
62#include <dev/usb/usb_bus.h>
63#include <dev/usb/usb_pf.h>
63
64struct usb_std_packet_size {
65 struct {
66 uint16_t min; /* inclusive */
67 uint16_t max; /* inclusive */
68 } range;
69
70 uint16_t fixed[4];

--- 2120 unchanged lines hidden (view full) ---

2191 if (xfer->flags_int.bdma_enable &&
2192 (!xfer->flags_int.bdma_no_post_sync)) {
2193 usb_bdma_post_sync(xfer);
2194 }
2195#endif
2196 }
2197 }
2198
64
65struct usb_std_packet_size {
66 struct {
67 uint16_t min; /* inclusive */
68 uint16_t max; /* inclusive */
69 } range;
70
71 uint16_t fixed[4];

--- 2120 unchanged lines hidden (view full) ---

2192 if (xfer->flags_int.bdma_enable &&
2193 (!xfer->flags_int.bdma_no_post_sync)) {
2194 usb_bdma_post_sync(xfer);
2195 }
2196#endif
2197 }
2198 }
2199
2200 if (xfer->usb_state != USB_ST_SETUP)
2201 usbpf_xfertap(xfer, USBPF_XFERTAP_DONE);
2202
2199 /* call processing routine */
2200 (xfer->callback) (xfer, xfer->error);
2201
2202 /* pickup the USB mutex again */
2203 USB_BUS_LOCK(info->bus);
2204
2205 /*
2206 * Check if we got started after that we got cancelled, but

--- 171 unchanged lines hidden (view full) ---

2378{
2379 struct usb_xfer *xfer = arg;
2380 struct usb_endpoint *ep = xfer->endpoint;
2381
2382 USB_BUS_LOCK_ASSERT(xfer->xroot->bus, MA_OWNED);
2383
2384 DPRINTF("start\n");
2385
2203 /* call processing routine */
2204 (xfer->callback) (xfer, xfer->error);
2205
2206 /* pickup the USB mutex again */
2207 USB_BUS_LOCK(info->bus);
2208
2209 /*
2210 * Check if we got started after that we got cancelled, but

--- 171 unchanged lines hidden (view full) ---

2382{
2383 struct usb_xfer *xfer = arg;
2384 struct usb_endpoint *ep = xfer->endpoint;
2385
2386 USB_BUS_LOCK_ASSERT(xfer->xroot->bus, MA_OWNED);
2387
2388 DPRINTF("start\n");
2389
2390 usbpf_xfertap(xfer, USBPF_XFERTAP_SUBMIT);
2391
2386 /* start the transfer */
2387 (ep->methods->start) (xfer);
2388
2389 xfer->flags_int.can_cancel_immed = 1;
2390
2391 /* check for error */
2392 if (xfer->error) {
2393 /* some error has happened */

--- 161 unchanged lines hidden (view full) ---

2555 usbd_transfer_timeout_ms(xfer,
2556 &usbd_transfer_start_cb,
2557 xfer->interval);
2558 return;
2559 }
2560 }
2561 DPRINTF("start\n");
2562
2392 /* start the transfer */
2393 (ep->methods->start) (xfer);
2394
2395 xfer->flags_int.can_cancel_immed = 1;
2396
2397 /* check for error */
2398 if (xfer->error) {
2399 /* some error has happened */

--- 161 unchanged lines hidden (view full) ---

2561 usbd_transfer_timeout_ms(xfer,
2562 &usbd_transfer_start_cb,
2563 xfer->interval);
2564 return;
2565 }
2566 }
2567 DPRINTF("start\n");
2568
2569 usbpf_xfertap(xfer, USBPF_XFERTAP_SUBMIT);
2570
2563 /* start USB transfer */
2564 (ep->methods->start) (xfer);
2565
2566 xfer->flags_int.can_cancel_immed = 1;
2567
2568 /* check for error */
2569 if (xfer->error) {
2570 /* some error has happened */

--- 705 unchanged lines hidden ---
2571 /* start USB transfer */
2572 (ep->methods->start) (xfer);
2573
2574 xfer->flags_int.can_cancel_immed = 1;
2575
2576 /* check for error */
2577 if (xfer->error) {
2578 /* some error has happened */

--- 705 unchanged lines hidden ---