Deleted Added
full compact
usb_device.c (187180) usb_device.c (188411)
1/* $FreeBSD: head/sys/dev/usb2/core/usb2_device.c 187180 2009-01-13 19:04:58Z thompsa $ */
1/* $FreeBSD: head/sys/dev/usb2/core/usb2_device.c 188411 2009-02-09 21:56:33Z 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.

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

1396 * address, then we know that the set-address command
1397 * was successful.
1398 */
1399 if (err) {
1400 DPRINTFN(0, "set address %d failed "
1401 "(ignored)\n", udev->address);
1402 }
1403 /* allow device time to set new address */
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.

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

1396 * address, then we know that the set-address command
1397 * was successful.
1398 */
1399 if (err) {
1400 DPRINTFN(0, "set address %d failed "
1401 "(ignored)\n", udev->address);
1402 }
1403 /* allow device time to set new address */
1404 usb2_pause_mtx(&Giant, USB_SET_ADDRESS_SETTLE);
1404 usb2_pause_mtx(&Giant,
1405 USB_MS_TO_TICKS(USB_SET_ADDRESS_SETTLE));
1405 } else {
1406 /* We are not self powered */
1407 udev->flags.self_powered = 0;
1408
1409 /* Set unconfigured state */
1410 udev->curr_config_no = USB_UNCONFIG_NO;
1411 udev->curr_config_index = USB_UNCONFIG_INDEX;
1412

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

1946 sizeof(udev->product));
1947 }
1948 } else {
1949 snprintf(udev->product,
1950 sizeof(udev->product), "product 0x%04x", product_id);
1951 }
1952}
1953
1406 } else {
1407 /* We are not self powered */
1408 udev->flags.self_powered = 0;
1409
1410 /* Set unconfigured state */
1411 udev->curr_config_no = USB_UNCONFIG_NO;
1412 udev->curr_config_index = USB_UNCONFIG_INDEX;
1413

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

1947 sizeof(udev->product));
1948 }
1949 } else {
1950 snprintf(udev->product,
1951 sizeof(udev->product), "product 0x%04x", product_id);
1952 }
1953}
1954
1955/*
1956 * Returns:
1957 * See: USB_MODE_XXX
1958 */
1954uint8_t
1959uint8_t
1960usb2_get_mode(struct usb2_device *udev)
1961{
1962 return (udev->flags.usb2_mode);
1963}
1964
1965/*
1966 * Returns:
1967 * See: USB_SPEED_XXX
1968 */
1969uint8_t
1955usb2_get_speed(struct usb2_device *udev)
1956{
1957 return (udev->speed);
1958}
1959
1960uint32_t
1961usb2_get_isoc_fps(struct usb2_device *udev)
1962{

--- 215 unchanged lines hidden ---
1970usb2_get_speed(struct usb2_device *udev)
1971{
1972 return (udev->speed);
1973}
1974
1975uint32_t
1976usb2_get_isoc_fps(struct usb2_device *udev)
1977{

--- 215 unchanged lines hidden ---