Deleted Added
full compact
usb_dev.c (207079) usb_dev.c (207080)
1/* $FreeBSD: head/sys/dev/usb/usb_dev.c 207079 2010-04-22 22:00:16Z thompsa $ */
1/* $FreeBSD: head/sys/dev/usb/usb_dev.c 207080 2010-04-22 22:15:08Z 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.

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

610
611static struct usb_endpoint *
612usb_dev_get_ep(struct usb_device *udev, uint8_t ep_index, uint8_t dir)
613{
614 struct usb_endpoint *ep;
615 uint8_t ep_dir;
616
617 if (ep_index == 0) {
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.

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

610
611static struct usb_endpoint *
612usb_dev_get_ep(struct usb_device *udev, uint8_t ep_index, uint8_t dir)
613{
614 struct usb_endpoint *ep;
615 uint8_t ep_dir;
616
617 if (ep_index == 0) {
618 ep = &udev->default_ep;
618 ep = &udev->ctrl_ep;
619 } else {
620 if (dir == USB_FIFO_RX) {
621 if (udev->flags.usb_mode == USB_MODE_HOST) {
622 ep_dir = UE_DIR_IN;
623 } else {
624 ep_dir = UE_DIR_OUT;
625 }
626 } else {

--- 1652 unchanged lines hidden ---
619 } else {
620 if (dir == USB_FIFO_RX) {
621 if (udev->flags.usb_mode == USB_MODE_HOST) {
622 ep_dir = UE_DIR_IN;
623 } else {
624 ep_dir = UE_DIR_OUT;
625 }
626 } else {

--- 1652 unchanged lines hidden ---