Date: Thu, 13 Nov 2008 17:35:30 +0100 From: Stefan Ehmann <shoesoft@gmx.net> To: Hans Petter Selasky <hselasky@c2i.net> Cc: freebsd-current@freebsd.org Subject: Re: usb2: scanner no longer working Message-ID: <200811131735.31998.shoesoft@gmx.net> In-Reply-To: <200811131657.56355.hselasky@c2i.net> References: <200811071134.42761.shoesoft@gmx.net> <200811130956.30584.shoesoft@gmx.net> <200811131657.56355.hselasky@c2i.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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: > > > > > > Hi, > > > > > > > > > > > > Could you dump the current config descriptor of your scanner? > > > > > > > > > > > > usbconfig -u 3 -a 2 dump_curr_config_desc > > > > > > > > # usbconfig -u 3 -a 2 dump_curr_config_desc > > > > <snip> > > > > > > > 3 and 2 are the numbers after ugen, like ugen3.2 > > > > > > > > To your other mail: > > > > I'm running i386. HUB debugging didn't output any obvious errors. > > > > > > Hi, > > > > > > Try the following patch to libusb20. I suspect that it is the > > > set_configuration call that makes trouble! > > > > > > http://perforce.freebsd.org/chv.cgi?CH=152628 > > > > > > Thanks for reporting. > > > > > > My private SVN repository has also been updated to include this patch > > > if you are using that. > > > > As I previously stated in my other mails. The scanner is now properly > > recognized. > > > > Now I got this problem: > > Before scanning starts, the system "locks" for several minutes, i.e. > > - input/output to terminals is no longer working > > - I can still switch consoles and break into ddb > > - CTRL-t on the scanimage console is still working and shows increasing > > sys time > > > > As soon as the actual scanning process starts, everything is fine again. > > Sometimes scanning doesn't start at all (or I'm just not patient enough). > > > > To make debugging a bit more interesting: If I run scanimage with ktrace > > or enable usb debugging via sysctl, scanning starts immediately. Don't > > know if this is always the case but seemed to work a few times at least. > > So maybe it's some kind of timing problem. > > Strange! > > Try this before starting your scanimage: > > sysctl hw.usb2.ugen.debug=15 > > I guess that the program is looping on a poll-syscall, because I poll on > both stdin and the I/O descriptor. This is perhaps another bug in libusb20. I've compared debug output of a scan without delay and one with delay. Couldn't spot anything obvious. I can post the complete logs if you're interested. Here's the snippet where it hangs (look at the timestamps) Nov 13 17:15:07 something kernel: ugen_ioctl:2194: cmd=800155c0 Nov 13 17:15:07 something kernel: ugen_ioctl:2205: error=0 Nov 13 17:15:07 something kernel: ugen_ioctl:2194: cmd=400155c2 Nov 13 17:15:07 something kernel: ugen_ioctl:2205: error=16 Nov 13 17:20:01 something kernel: ugen_default_fs_callback:2215: st=0 alen=0 afr ames=0 Nov 13 17:20:01 something kernel: ugen_default_fs_callback:2215: st=1 alen=16384 aframes=1 Nov 13 17:20:01 something kernel: ugen_ioctl:2194: cmd=400155c2 Nov 13 17:20:01 something kernel: ugen_ioctl:2205: error=0
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811131735.31998.shoesoft>