*buf = 0; for (port = 0; port < uhci->rh_numports; ++port) { if ((inw(uhci->io_addr + USBPORTSC1 + port * 2) & RWC_BITS) || test_bit(port, &uhci->port_c_suspend)) *buf |= (1 << (port + 1)); 
uhci_check_ports(uhci); status = get_hub_status_data(uhci, buf);  switch (uhci->rh_state) { case UHCI_RH_SUSPENDING: case UHCI_RH_SUSPENDED: /* if port change, ask to be resumed */ if (status) usb_hcd_resume_root_hub(hcd); break;  case UHCI_RH_AUTO_STOPPED: /* if port change, auto start */ if (status) wakeup_rh(uhci); break;  case UHCI_RH_RUNNING: /* are any devices attached? */ if (!any_ports_active(uhci)) { uhci->rh_state = UHCI_RH_RUNNING_NODEVS; uhci->auto_stop_time = jiffies + HZ; } break;  case UHCI_RH_RUNNING_NODEVS: /* auto-stop if nothing connected for 1 second */ if (any_ports_active(uhci)) uhci->rh_state = UHCI_RH_RUNNING; else if (time_after_eq(jiffies, uhci->auto_stop_time)) suspend_rh(uhci, UHCI_RH_AUTO_STOPPED); break;  default: break; 
static int uhci_hub_status_data(struct usb_hcd *hcd, char *buf){	struct uhci_hcd *uhci = hcd_to_uhci(hcd);	int port;	if (uhci->hc_inaccessible)		return 0;	*buf = 0;	for (port = 0; port < uhci->rh_numports; ++port) {		if ((inw(uhci->io_addr + USBPORTSC1 + port * 2) & RWC_BITS) ||				test_bit(port, &uhci->port_c_suspend))			*buf |= (1 << (port + 1));	}	if (*buf && uhci->is_stopped)		uhci->resume_detect = 1;	return !!*buf;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/6c1b445c226dd82d0961725dec8051b95003723a/uhci-hub.c/clean/drivers/usb/host/uhci-hub.c