1/* $FreeBSD: head/sys/dev/usb2/core/usb2_hub.c 187170 2009-01-13 19:02:40Z 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: --- 1505 unchanged lines hidden (view full) --- 1515 DPRINTF("bus=%p\n", bus); 1516 1517 USB_BUS_LOCK(bus); 1518 1519 /* 1520 * The root HUB device is never suspended 1521 * and we simply skip it. 1522 */ |
1523 for (x = USB_ROOT_HUB_ADDR + 1;; x++) { 1524#if ((USB_ROOT_HUB_ADDR + 1) > USB_MIN_DEVICES) 1525#error "Incorrect device limit." 1526#endif 1527 if (x == bus->devices_max) 1528 break; |
1529 1530 udev = bus->devices[x]; 1531 if (udev == NULL) 1532 continue; 1533 1534 rem_wakeup = usb2_peer_can_wakeup(udev); 1535 1536 temp = ticks - udev->pwr_save.last_xfer_time; --- 26 unchanged lines hidden (view full) --- 1563 mintime = 0 - 1; 1564 type_refs[0] = 0; 1565 type_refs[1] = 0; 1566 type_refs[2] = 0; 1567 type_refs[3] = 0; 1568 1569 /* Re-loop all the devices to get the actual state */ 1570 |
1571 for (x = USB_ROOT_HUB_ADDR + 1;; x++) { 1572#if ((USB_ROOT_HUB_ADDR + 1) > USB_MIN_DEVICES) 1573#error "Incorrect device limit." 1574#endif 1575 if (x == bus->devices_max) 1576 break; |
1577 1578 udev = bus->devices[x]; 1579 if (udev == NULL) 1580 continue; 1581 1582 /* "last_xfer_time" can be updated by a resume */ 1583 temp = ticks - udev->pwr_save.last_xfer_time; 1584 --- 259 unchanged lines hidden --- |