Re: [RFC] USB: driver for iphone charging

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Oliver Neukum
Date: Friday, August 24, 2007 - 12:20 am

Am Freitag 24 August 2007 schrieb Greg KH:

Hi,


int usb_driver_set_configuration(struct usb_device *udev, int config)
{
	struct set_config_request *req;

	req = kmalloc(sizeof(*req), GFP_KERNEL);
	if (!req)
		return -ENOMEM;
	req->udev = udev;
	req->config = config;
	INIT_WORK(&req->work, driver_set_config_work);

	usb_get_dev(udev);
	schedule_work(&req->work);
	return 0;
}

This schedules the change via a workqueue, so you'll be reprobed. If you
fire of the first vendor command you are doing so before the configuration
is changed. How is this supposed to work?

	Regards
		Oliver
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC] USB: driver for iphone charging, Greg KH, (Thu Aug 23, 3:45 pm)
Re: [RFC] USB: driver for iphone charging, Oliver Neukum, (Fri Aug 24, 12:20 am)