Date: Tue, 06 Jan 2009 09:01:29 -0700 (MST) From: "M. Warner Losh" <imp@bsdimp.com> To: hselasky@c2i.net Cc: usb@FreeBSD.org, freebsd-usb@FreeBSD.org Subject: Re: xsane busted with usb2 Message-ID: <20090106.090129.-432836982.imp@bsdimp.com> In-Reply-To: <200901061653.11745.hselasky@c2i.net> References: <20090106.083501.-861032140.imp@bsdimp.com> <20090106.084445.-432836711.imp@bsdimp.com> <200901061653.11745.hselasky@c2i.net>
next in thread | previous in thread | raw e-mail | index | archive | help
In message: <200901061653.11745.hselasky@c2i.net> Hans Petter Selasky <hselasky@c2i.net> writes: : On Tuesday 06 January 2009, M. Warner Losh wrote: : > In message: <20090106.083501.-861032140.imp@bsdimp.com> : > : > "M. Warner Losh" <imp@bsdimp.com> writes: : > : In message: <200901061630.02022.hselasky@c2i.net> : > : : > : Hans Petter Selasky <hselasky@c2i.net> writes: : > : : On Tuesday 06 January 2009, M. Warner Losh wrote: : > : : > In message: <200901060940.21830.hselasky@c2i.net> : > : : > : > : : > Hans Petter Selasky <hselasky@c2i.net> writes: : > : : > : On Tuesday 06 January 2009, M. Warner Losh wrote: : > : : > : > With sys/dev/usb, I'm able to kldload uscanner and xsane just : > : : > : > works. With usb2, I klduscanner, and it doesn't. There's no : > : : > : > /dev/uscanner0 in the ls listing, but one can open that file : > : : > : > directly. trussing sane-find-scanners yields: : > : : > : > : > : : > : > ... : > : : > : > open("/dev/",O_NONBLOCK,020222513) = 4 (0x4) : > : : > : > fstat(4,{ mode=dr-xr-xr-x ,inode=2,size=512,blksize=4096 }) = 0 : > : : > : > (0x0) fcntl(4,F_SETFD,FD_CLOEXEC) = 0 (0x0) : > : : > : > fstatfs(0x4,0x7fffffffda80,0x0,0x0,0x60,0x801200110) = 0 (0x0) : > : : > : > getdirentries(0x4,0x80120c000,0x1000,0x80120a0a8,0x30,0x801200158 : > : : > : >) = 1516 (0x5ec) : > : : > : > getdirentries(0x4,0x80120c000,0x1000,0x80120a0a8,0xffffffff8064d1 : > : : > : >80,0x7 ffff fffdd18) = 0 (0x0) lseek(4,0x0,SEEK_SET) = 0 (0x0) : > : : > : > close(4) = 0 (0x0) : > : : > : > open("/dev/usb0",O_RDWR,00) ERR#6 'Device not configured' : > : : > : > open("/dev/usb1",O_RDWR,00) ERR#6 'Device not configured' : > : : > : > open("/dev/usb2",O_RDWR,00) ERR#6 'Device not configured' : > : : > : > open("/dev/usb3",O_RDWR,00) ERR#6 'Device not configured' : > : : > : > open("/dev/usb4",O_RDWR,00) ERR#6 'Device not configured' : > : : > : > open("/dev/usb5",O_RDWR,00) ERR#6 'Device not configured' : > : : > : > open("/dev/usb6",O_RDWR,00) ERR#6 'Device not configured' : > : : > : > open("/dev/usb7",O_RDWR,00) ERR#6 'Device not configured' : > : : > : > open("/dev/usb8",O_RDWR,00) ERR#6 'Device not configured' : > : : > : > open("/dev/usb9",O_RDWR,00) ERR#6 'Device not configured' : > : : > : > write(1," # No USB scanners found. If yo"...,79) = 79 (0x4f) : > : : > : > ... : > : : > : > : > : : > : > Is there a fix for this? : > : : > : : > : : > : Hi, : > : : > : : > : : > : I looks like xsane is linked with libusb-0.1 . Try re-linking xsane : > : : > : with libusb20. Then everything should work. : > : : : > : : FYI: libusb20 in FreeBSD is binary compatible with libusb-0.1 : > : : > : I built all these things with ports, will just updating the ports fix : > : them, or will I need to jump through some weird hoops? : > : : Hi, : : > And does it work with the old USB stack? : : No, then you have to restore the libusb-0.1 library. Yes. We need a migration guide to usb2 that documents these sorts of things for people, or we're going to get hammered with lots of questions from people using ports that suddenly don't work... The fix may be easy, but people have to know about it. Ideally, the ports folks would be involved with a solution too... : > I'm still finding odd things : > that don't work with usb2, and so far my fallback has been to just use : > the old stack for those things... : : Can you explain a little bit more what you mean. Are these things Host : Controller drivers, middle ware or USB device drivers? Devices are what are failing. : Are you sure that you have tried every possible command in usbconfig and your : device does still not work? I haven't. But usually it is things like burning a DVD from a usb disk doesn't work to a USB DVD player (using storage_ata). Burning it from a firewire disk does seem to work. There's no I/O errors when this happens. The uscanner thing that maybe this will fix. I've had trouble unloading usb2 modules since sometimes they hang. It can be quite time consuming to file bug reports on all these things, since I don't want to file one that wastes your time for being too vague or unreproducible. I've only recently started using usb2 heavily for day-to-day tasks rather than just-test-it-out tasks I'd been doing before. Warner
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090106.090129.-432836982.imp>