Deleted Added
full compact
usb_device.c (190731) usb_device.c (190732)
1/* $FreeBSD: head/sys/dev/usb/usb_device.c 190731 2009-04-05 18:20:03Z thompsa $ */
1/* $FreeBSD: head/sys/dev/usb/usb_device.c 190732 2009-04-05 18:20:13Z 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.

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

169
170 DPRINTFN(10, "udev=%p iface_index=%d address=0x%x "
171 "type=0x%x dir=0x%x index=%d\n",
172 udev, iface_index, setup->endpoint,
173 setup->type, setup->direction, setup->ep_index);
174
175 /* setup expected endpoint direction mask and value */
176
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.

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

169
170 DPRINTFN(10, "udev=%p iface_index=%d address=0x%x "
171 "type=0x%x dir=0x%x index=%d\n",
172 udev, iface_index, setup->endpoint,
173 setup->type, setup->direction, setup->ep_index);
174
175 /* setup expected endpoint direction mask and value */
176
177 if (setup->direction == UE_DIR_ANY) {
177 if (setup->direction == UE_DIR_RX) {
178 ea_mask = (UE_DIR_IN | UE_DIR_OUT);
179 ea_val = (udev->flags.usb2_mode == USB_MODE_DEVICE) ?
180 UE_DIR_OUT : UE_DIR_IN;
181 } else if (setup->direction == UE_DIR_TX) {
182 ea_mask = (UE_DIR_IN | UE_DIR_OUT);
183 ea_val = (udev->flags.usb2_mode == USB_MODE_DEVICE) ?
184 UE_DIR_IN : UE_DIR_OUT;
185 } else if (setup->direction == UE_DIR_ANY) {
178 /* match any endpoint direction */
179 ea_mask = 0;
180 ea_val = 0;
181 } else {
182 /* match the given endpoint direction */
183 ea_mask = (UE_DIR_IN | UE_DIR_OUT);
184 ea_val = (setup->direction & (UE_DIR_IN | UE_DIR_OUT));
185 }

--- 2255 unchanged lines hidden ---
186 /* match any endpoint direction */
187 ea_mask = 0;
188 ea_val = 0;
189 } else {
190 /* match the given endpoint direction */
191 ea_mask = (UE_DIR_IN | UE_DIR_OUT);
192 ea_val = (setup->direction & (UE_DIR_IN | UE_DIR_OUT));
193 }

--- 2255 unchanged lines hidden ---