Re: usb2: scanner no longer working

From: Hans Petter Selasky <hselasky_at_c2i.net>
Date: Thu, 13 Nov 2008 18:04:00 +0100
On Thursday 13 November 2008, Stefan Ehmann wrote:
> On Thursday 13 November 2008 16:57:55 Hans Petter Selasky wrote:
> > On Thursday 13 November 2008, Stefan Ehmann wrote:
> > > On Friday 07 November 2008 19:35:17 Hans Petter Selasky wrote:
> > > > On Friday 07 November 2008, Stefan Ehmann wrote:
> > > > > On Friday 07 November 2008 18:42:49 Hans Petter Selasky wrote:
> > > > > > On Friday 07 November 2008, Hans Petter Selasky wrote:

You could also try:

sysctl hw.usb2.dev.debug=15

I have a patch which you can try. Apply to libusb20.c the following diff:

==== src/lib/libusb20/libusb20.c#9 - src/lib/libusb20/libusb20.c ====
_at__at_ -886,7 +886,7 _at__at_
 void
 libusb20_dev_wait_process(struct libusb20_device *pdev, int timeout)
 {
-       struct pollfd pfd[2];
+       struct pollfd pfd[1];
 
        if (!pdev->is_opened) {
                return;
_at__at_ -894,11 +894,8 _at__at_
        pfd[0].fd = pdev->file;
        pfd[0].events = (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM);
        pfd[0].revents = 0;
-       pfd[1].fd = 0;                  /* standard input */
-       pfd[1].events = (POLLIN | POLLRDNORM);
-       pfd[1].revents = 0;
 
-       if (poll(pfd, 2, timeout)) {
+       if (poll(pfd, 1, timeout)) {
                /* ignore any error */
        }
        return;


--HPS
Received on Thu Nov 13 2008 - 16:01:54 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:37 UTC