usb_dev.c (192054) | usb_dev.c (192499) |
---|---|
1/* $FreeBSD: head/sys/dev/usb/usb_dev.c 192054 2009-05-13 18:05:40Z thompsa $ */ | 1/* $FreeBSD: head/sys/dev/usb/usb_dev.c 192499 2009-05-21 00:04:17Z thompsa $ */ |
2/*- 3 * Copyright (c) 2006-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. --- 582 unchanged lines hidden (view full) --- 592{ 593 struct usb2_pipe *pipe; 594 uint8_t ep_dir; 595 596 if (ep_index == 0) { 597 pipe = &udev->default_pipe; 598 } else { 599 if (dir == USB_FIFO_RX) { | 2/*- 3 * Copyright (c) 2006-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. --- 582 unchanged lines hidden (view full) --- 592{ 593 struct usb2_pipe *pipe; 594 uint8_t ep_dir; 595 596 if (ep_index == 0) { 597 pipe = &udev->default_pipe; 598 } else { 599 if (dir == USB_FIFO_RX) { |
600 if (udev->flags.usb2_mode == USB_MODE_HOST) { | 600 if (udev->flags.usb_mode == USB_MODE_HOST) { |
601 ep_dir = UE_DIR_IN; 602 } else { 603 ep_dir = UE_DIR_OUT; 604 } 605 } else { | 601 ep_dir = UE_DIR_IN; 602 } else { 603 ep_dir = UE_DIR_OUT; 604 } 605 } else { |
606 if (udev->flags.usb2_mode == USB_MODE_HOST) { | 606 if (udev->flags.usb_mode == USB_MODE_HOST) { |
607 ep_dir = UE_DIR_OUT; 608 } else { 609 ep_dir = UE_DIR_IN; 610 } 611 } 612 pipe = usb2_get_pipe_by_addr(udev, ep_index | ep_dir); 613 } 614 --- 1579 unchanged lines hidden --- | 607 ep_dir = UE_DIR_OUT; 608 } else { 609 ep_dir = UE_DIR_IN; 610 } 611 } 612 pipe = usb2_get_pipe_by_addr(udev, ep_index | ep_dir); 613 } 614 --- 1579 unchanged lines hidden --- |