Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 275191 Details for
Bug 408131
libusb wakes up 1000 times/sec while transfer outstanding
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
eliminate 1 ms wakeups
libusb-no-wakeups.patch (text/plain), 1.75 KB, created by
Scott Lamb
on 2007-12-03 01:48:55 UTC
(
hide
)
Description:
eliminate 1 ms wakeups
Filename:
MIME Type:
Creator:
Scott Lamb
Created:
2007-12-03 01:48:55 UTC
Size:
1.75 KB
patch
obsolete
>Remove unnecessary 1ms wakeups while USB transfers are in progress > >--- linux.c.orig 2007-12-02 16:02:27.000000000 -0800 >+++ linux.c 2007-12-02 16:33:12.000000000 -0800 >@@ -14,6 +14,7 @@ > #include <errno.h> > #include <sys/time.h> > #include <dirent.h> >+#include <poll.h> > > #include "linux.h" > #include "usbi.h" >@@ -164,7 +165,7 @@ > { > struct usb_urb urb; > int bytesdone = 0, requested; >- struct timeval tv, tv_ref, tv_now; >+ struct timeval tv_ref, tv_now; > struct usb_urb *context; > int ret, waiting; > >@@ -191,8 +192,6 @@ > } > > do { >- fd_set writefds; >- > requested = size - bytesdone; > if (requested > MAX_READ_WRITE) > requested = MAX_READ_WRITE; >@@ -213,25 +212,25 @@ > return ret; > } > >- FD_ZERO(&writefds); >- FD_SET(dev->fd, &writefds); >- > restart: > waiting = 1; > context = NULL; > while (!urb.usercontext && ((ret = ioctl(dev->fd, IOCTL_USB_REAPURBNDELAY, &context)) == -1) && waiting) { >- tv.tv_sec = 0; >- tv.tv_usec = 1000; // 1 msec >- select(dev->fd + 1, NULL, &writefds, NULL, &tv); //sub second wait >+ struct pollfd pollfd; >+ int poll_timeout = -1; >+ >+ pollfd.fd = dev->fd; >+ pollfd.events = POLLOUT; >+ pollfd.revents = 0; > > if (timeout) { >- /* compare with actual time, as the select timeout is not that precise */ > gettimeofday(&tv_now, NULL); >- >- if ((tv_now.tv_sec > tv_ref.tv_sec) || >- ((tv_now.tv_sec == tv_ref.tv_sec) && (tv_now.tv_usec >= tv_ref.tv_usec))) >- waiting = 0; >+ poll_timeout = (tv_ref.tv_sec-tv_now.tv_sec)*1000 + >+ (tv_ref.tv_usec-tv_now.tv_usec)/1000; > } >+ >+ if ((ret = poll(&pollfd, 1, poll_timeout)) != 1) >+ waiting = 0; > } > > if (context && context != &urb) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 408131
: 275191