usb_transfer.c (190754) | usb_transfer.c (191400) |
---|---|
1/* $FreeBSD: head/sys/dev/usb/usb_transfer.c 190754 2009-04-06 00:22:49Z thompsa $ */ | 1/* $FreeBSD: head/sys/dev/usb/usb_transfer.c 191400 2009-04-22 17:08:10Z thompsa $ */ |
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. --- 807 unchanged lines hidden (view full) --- 817 TAILQ_INIT(&info->dma_q.head); 818 info->dma_q.command = &usb2_bdma_work_loop; 819#endif 820 info->done_m[0].hdr.pm_callback = &usb2_callback_proc; 821 info->done_m[0].xroot = info; 822 info->done_m[1].hdr.pm_callback = &usb2_callback_proc; 823 info->done_m[1].xroot = info; 824 | 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. --- 807 unchanged lines hidden (view full) --- 817 TAILQ_INIT(&info->dma_q.head); 818 info->dma_q.command = &usb2_bdma_work_loop; 819#endif 820 info->done_m[0].hdr.pm_callback = &usb2_callback_proc; 821 info->done_m[0].xroot = info; 822 info->done_m[1].hdr.pm_callback = &usb2_callback_proc; 823 info->done_m[1].xroot = info; 824 |
825 if (xfer_mtx == &Giant) | 825 /* 826 * In device side mode control endpoint 827 * requests need to run from a separate 828 * context, else there is a chance of 829 * deadlock! 830 */ 831 if (setup_start == usb2_control_ep_cfg) |
826 info->done_p = | 832 info->done_p = |
833 &udev->bus->control_xfer_proc; 834 else if (xfer_mtx == &Giant) 835 info->done_p = |
|
827 &udev->bus->giant_callback_proc; 828 else 829 info->done_p = 830 &udev->bus->non_giant_callback_proc; 831 } 832 /* reset sizes */ 833 834 parm.size[0] = 0; --- 1958 unchanged lines hidden --- | 836 &udev->bus->giant_callback_proc; 837 else 838 info->done_p = 839 &udev->bus->non_giant_callback_proc; 840 } 841 /* reset sizes */ 842 843 parm.size[0] = 0; --- 1958 unchanged lines hidden --- |