On Fri, 20 Jan 2006, Pete Zaitcev wrote: > Looks like an inverted condition. Maybe it was meant to be a de-Morgan > of "uses new polling and has an URB for that". Not sure though...
No, I think it's correct as written. The idea is that if a driver uses the new polling, the poll should always occur. If a driver uses the old polling then it should get polled only when a status URB is linked. So the condition for returning early is "driver uses old polling and no status URB is linked". It just happened that the first clause had to be written in negated form (the second is already a negative). The way you changed it, a driver that used the old polling method would never get polled! Alan Stern > diff -upr -X dontdiff linux-2.6.16-rc1/drivers/usb/core/hcd.c > linux-2.6.16-rc1-lem/drivers/usb/core/hcd.c > --- linux-2.6.16-rc1/drivers/usb/core/hcd.c 2006-01-17 21:11:27.000000000 > -0800 > +++ linux-2.6.16-rc1-lem/drivers/usb/core/hcd.c 2006-01-20 > 14:47:16.000000000 -0800 > @@ -524,7 +524,7 @@ void usb_hcd_poll_rh_status(struct usb_h > unsigned long flags; > char buffer[4]; /* Any root hubs with > 31 ports? */ > > - if (!hcd->uses_new_polling && !hcd->status_urb) > + if (!hcd->uses_new_polling || !hcd->status_urb) > return; > > length = hcd->driver->hub_status_data(hcd, buffer); ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 _______________________________________________ [email protected] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
