usb_hub.c (193045) | usb_hub.c (193074) |
---|---|
1/* $FreeBSD: head/sys/dev/usb/usb_hub.c 193045 2009-05-29 18:46:57Z thompsa $ */ | 1/* $FreeBSD: head/sys/dev/usb/usb_hub.c 193074 2009-05-30 00:22:57Z thompsa $ */ |
2/*- 3 * Copyright (c) 1998 The NetBSD Foundation, Inc. All rights reserved. 4 * Copyright (c) 1998 Lennart Augustsson. All rights reserved. 5 * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions 9 * are met: --- 1043 unchanged lines hidden (view full) --- 1053 1054/*------------------------------------------------------------------------* 1055 * usb2_intr_find_best_slot 1056 * 1057 * Return value: 1058 * The best Transaction Translation slot for an interrupt endpoint. 1059 *------------------------------------------------------------------------*/ 1060static uint8_t | 2/*- 3 * Copyright (c) 1998 The NetBSD Foundation, Inc. All rights reserved. 4 * Copyright (c) 1998 Lennart Augustsson. All rights reserved. 5 * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions 9 * are met: --- 1043 unchanged lines hidden (view full) --- 1053 1054/*------------------------------------------------------------------------* 1055 * usb2_intr_find_best_slot 1056 * 1057 * Return value: 1058 * The best Transaction Translation slot for an interrupt endpoint. 1059 *------------------------------------------------------------------------*/ 1060static uint8_t |
1061usb2_intr_find_best_slot(size_t *ptr, uint8_t start, uint8_t end) | 1061usb2_intr_find_best_slot(usb_size_t *ptr, uint8_t start, uint8_t end) |
1062{ | 1062{ |
1063 size_t max = 0 - 1; | 1063 usb_size_t max = 0 - 1; |
1064 uint8_t x; 1065 uint8_t y; 1066 1067 y = 0; 1068 1069 /* find the last slot with lesser used bandwidth */ 1070 1071 for (x = start; x < end; x++) { --- 481 unchanged lines hidden (view full) --- 1553#if USB_HAVE_POWERD 1554void 1555usb2_bus_powerd(struct usb_bus *bus) 1556{ 1557 struct usb_device *udev; 1558 usb_ticks_t temp; 1559 usb_ticks_t limit; 1560 usb_ticks_t mintime; | 1064 uint8_t x; 1065 uint8_t y; 1066 1067 y = 0; 1068 1069 /* find the last slot with lesser used bandwidth */ 1070 1071 for (x = start; x < end; x++) { --- 481 unchanged lines hidden (view full) --- 1553#if USB_HAVE_POWERD 1554void 1555usb2_bus_powerd(struct usb_bus *bus) 1556{ 1557 struct usb_device *udev; 1558 usb_ticks_t temp; 1559 usb_ticks_t limit; 1560 usb_ticks_t mintime; |
1561 size_t type_refs[5]; | 1561 usb_size_t type_refs[5]; |
1562 uint8_t x; 1563 uint8_t rem_wakeup; 1564 1565 limit = usb2_power_timeout; 1566 if (limit == 0) 1567 limit = hz; 1568 else if (limit > 255) 1569 limit = 255 * hz; --- 321 unchanged lines hidden --- | 1562 uint8_t x; 1563 uint8_t rem_wakeup; 1564 1565 limit = usb2_power_timeout; 1566 if (limit == 0) 1567 limit = hz; 1568 else if (limit > 255) 1569 limit = 255 * hz; --- 321 unchanged lines hidden --- |