if ((hub->descriptor->wHubCharacteristics & HUB_CHAR_LPSM) < 2 
if ((wHubCharacteristics & HUB_CHAR_LPSM) < 2 
static void hub_port_connect_change(struct usb_hub *hub, int port1,					u16 portstatus, u16 portchange){	struct usb_device *hdev = hub->hdev;	struct device *hub_dev = hub->intfdev;	int status, i; 	dev_dbg (hub_dev,		"port %d, status %04x, change %04x, %s\n",		port1, portstatus, portchange, portspeed (portstatus));	if (hub->has_indicators) {		set_port_led(hub, port1, HUB_LED_AUTO);		hub->indicator[port1-1] = INDICATOR_AUTO;	} 	/* Disconnect any existing devices under this port */	if (hdev->children[port1-1])		usb_disconnect(&hdev->children[port1-1]);	clear_bit(port1, hub->change_bits);#ifdef	CONFIG_USB_OTG	/* during HNP, don't repeat the debounce */	if (hdev->bus->is_b_host)		portchange &= ~USB_PORT_STAT_C_CONNECTION;#endif	if (portchange & USB_PORT_STAT_C_CONNECTION) {		status = hub_port_debounce(hub, port1);		if (status < 0) {			dev_err (hub_dev,				"connect-debounce failed, port %d disabled\n",				port1);			goto done;		}		portstatus = status;	}	/* Return now if nothing is connected */	if (!(portstatus & USB_PORT_STAT_CONNECTION)) {		/* maybe switch power back on (e.g. root hub was reset) */		if ((hub->descriptor->wHubCharacteristics					& HUB_CHAR_LPSM) < 2				&& !(portstatus & (1 << USB_PORT_FEAT_POWER)))			set_port_feature(hdev, port1, USB_PORT_FEAT_POWER); 		if (portstatus & USB_PORT_STAT_ENABLE)  			goto done;		return;	}#ifdef  CONFIG_USB_SUSPEND	/* If something is connected, but the port is suspended, wake it up. */	if (portstatus & USB_PORT_STAT_SUSPEND) {		status = hub_port_resume(hub, port1, NULL);		if (status < 0) {			dev_dbg(hub_dev,				"can't clear suspend on port %d; %d\n",				port1, status);			goto done;		}	}#endif	for (i = 0; i < SET_CONFIG_TRIES; i++) {		struct usb_device *udev;		/* reallocate for each attempt, since references		 * to the previous one can escape in various ways		 */		udev = usb_alloc_dev(hdev, hdev->bus, port1);		if (!udev) {			dev_err (hub_dev,				"couldn't allocate port %d usb_device\n",				port1);			goto done;		}		usb_set_device_state(udev, USB_STATE_POWERED);		udev->speed = USB_SPEED_UNKNOWN; 		/* set the address */		choose_address(udev);		if (udev->devnum <= 0) {			status = -ENOTCONN;	/* Don't retry */			goto loop;		}		/* reset and get descriptor */		status = hub_port_init(hub, udev, port1, i);		if (status < 0)			goto loop;		/* consecutive bus-powered hubs aren't reliable; they can		 * violate the voltage drop budget.  if the new child has		 * a "powered" LED, users should notice we didn't enable it		 * (without reading syslog), even without per-port LEDs		 * on the parent.		 */		if (udev->descriptor.bDeviceClass == USB_CLASS_HUB				&& hub->power_budget) {			u16	devstat;			status = usb_get_status(udev, USB_RECIP_DEVICE, 0,					&devstat);			if (status < 0) {				dev_dbg(&udev->dev, "get status %d ?\n", status);				goto loop_disable;			}			cpu_to_le16s(&devstat);			if ((devstat & (1 << USB_DEVICE_SELF_POWERED)) == 0) {				dev_err(&udev->dev,					"can't connect bus-powered hub "					"to this port\n");				if (hub->has_indicators) {					hub->indicator[port1-1] =						INDICATOR_AMBER_BLINK;					schedule_work (&hub->leds);				}				status = -ENOTCONN;	/* Don't retry */				goto loop_disable;			}		} 		/* check for devices running slower than they could */		if (le16_to_cpu(udev->descriptor.bcdUSB) >= 0x0200				&& udev->speed == USB_SPEED_FULL				&& highspeed_hubs != 0)			check_highspeed (hub, udev, port1);		/* Store the parent's children[] pointer.  At this point		 * udev becomes globally accessible, although presumably		 * no one will look at it until hdev is unlocked.		 */		down (&udev->serialize);		status = 0;		/* We mustn't add new devices if the parent hub has		 * been disconnected; we would race with the		 * recursively_mark_NOTATTACHED() routine.		 */		spin_lock_irq(&device_state_lock);		if (hdev->state == USB_STATE_NOTATTACHED)			status = -ENOTCONN;		else			hdev->children[port1-1] = udev;		spin_unlock_irq(&device_state_lock);		/* Run it through the hoops (find a driver, etc) */		if (!status) {			status = usb_new_device(udev);			if (status) {				spin_lock_irq(&device_state_lock);				hdev->children[port1-1] = NULL;				spin_unlock_irq(&device_state_lock);			}		}		up (&udev->serialize);		if (status)			goto loop_disable;		status = hub_power_remaining(hub);		if (status)			dev_dbg(hub_dev,				"%dmA power budget left\n",				2 * status);		return;loop_disable:		hub_port_disable(hub, port1, 1);loop:		ep0_reinit(udev);		release_address(udev);		usb_put_dev(udev);		if (status == -ENOTCONN)			break;	} done:	hub_port_disable(hub, port1, 1);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/74ad9bd2fcf0fa203655e0d904809b06c4202bf8/hub.c/buggy/drivers/usb/core/hub.c