Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Jan 2005 00:47:01 +0000
From:      Chris Hodgins <chodgins@cis.strath.ac.uk>
To:        freebsd-hackers@freebsd.org
Subject:   Re: uscanner problem with HP Scanjet 3400C
Message-ID:  <41F2F405.9050909@cis.strath.ac.uk>
In-Reply-To: <41F27927.60202@cis.strath.ac.uk>
References:  <41F27927.60202@cis.strath.ac.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
Chris Hodgins wrote:
> -------- Original Message --------
> Subject: Re: uscanner problem with HP Scanjet 3400C
> Date: Sat, 22 Jan 2005 12:32:25 +0000
> From: Chris Hodgins <chodgins@cis.strath.ac.uk>
> To: Chris Hodgins <chodgins@cis.strath.ac.uk>
> References: <41F23BCF.40901@cis.strath.ac.uk>
> 
> Chris Hodgins wrote:
> 
>> Hi,
>>
>> I am trying to get my HP ScanJet 3400C scanner to work with FreeBSD 
>> 5.3.  Whenever I plug it into the usb port on my laptop I get in dmesg:
>>
>> uscanner0: Hewlett Packard ScanJet 3400cse, rev 1.00/0.00, addr 2
>> uscanner0: setting config no failed
>> device_attach: uscanner0 attach returned 6
>> uhub0: port 1, set config at addr 2 failed
>> uhub0: device problem, disabling port 1
>>
>> Naturally after that sane can't find it.  This is a device that is 
>> fully supported now with Sane and one that uscanner claims to 
>> support.  I am happy to do any testing required to get this to work.
>>
>> This problem seems to have been around for a while now and I have 
>> found a few unanswered threads about it on google.
>>
>> Thanks for your help.
>> Chris Hodgins
>>
>> # uname -a
>> FreeBSD paranoia 5.3-RELEASE FreeBSD 5.3-RELEASE #1: Fri Dec  3 
>> 18:15:16 GMT 2004     root@paranoia:/usr/obj/usr/src/sys/paranoia  i386
>> _______________________________________________
>> freebsd-questions@freebsd.org mailing list
>> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
>> To unsubscribe, send any mail to 
>> "freebsd-questions-unsubscribe@freebsd.org"
>>
> 
> I just recompiled my kernel to include uscanner support and USB_DEBUG.
> 
> chris@paranoia:/usr/src/sys/i386/conf$ diff -u paranoia paranoia_usb_debug
> --- paranoia    Sat Oct 30 18:33:02 2004
> +++ paranoia_usb_debug  Sat Jan 22 12:08:02 2005
> @@ -108,3 +108,6 @@
>  device         ukbd            # Keyboard
>  device         umass           # Disks/Mass storage - Requires scbus
> and da
>  device         ums             # Mouse
> +device         uscanner
> +
> +options                USB_DEBUG
> 
> I was expecting a lot more output in dmesg about my problem but only one
> extra line appeared:
> 
> uscanner0: Hewlett Packard ScanJet 3400cse, rev 1.00/0.00, addr 2
> uscanner0: setting config no failed
> device_attach: uscanner0 attach returned 6
> uhub_explore: usb_new_device failed, error=STALLED
> uhub0: device problem, disabling port 2
> 
> Have I done something wrong in getting the USB_DEBUG option into my
> kernel?  Should I just of ran this instead? :
> 
> # make -DUSB_DEBUG -KERNCONF=paranoia buildkernel
> 
> Chris
> 
> _______________________________________________
> freebsd-hackers@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
> 

Finally worked out what was going wrong.  You need to set both the 
USB_DEBUG option on in your kernel and set the sysctl hw.usb.debug to 6.

Anyway I now have some pretty good output and have traced the code and 
am pretty certain of what is happening now.  How to fix it....I have no 
idea!  Here is the dmesg out from the time I plugge my scanner into my 
laptop:

usbd_alloc_xfer() = 0xc1951a00
usbd_transfer: xfer=0xc1951a00, flags=6, pipe=0xc239c900, running=0
usbd_dump_queue: pipe=0xc239c900
usb_allocmem: use frag=0xc19d9e80 size=15
usb_insert_transfer: pipe=0xc239c900 running=0 timeout=5000
usb_add_task: task=0xc1951a84
usb_task_thread: woke up task=0xc1951a84
usb_transfer_complete: pipe=0xc239c900 xfer=0xc1951a00 status=15 actlen=0
usb_freemem: frag=0xc19d9e80
usb_transfer_complete: repeat=0 new head=0
usbd_start_next: pipe=0xc239c900, xfer=0
usbd_free_xfer: 0xc1951a00
usbd_alloc_xfer() = 0xc1951a00
usbd_transfer: xfer=0xc1951a00, flags=6, pipe=0xc239c900, running=0
usbd_dump_queue: pipe=0xc239c900
usb_allocmem: use frag=0xc19d9e80 size=2
usb_insert_transfer: pipe=0xc239c900 running=0 timeout=5000
usb_add_task: task=0xc1951a84
usb_task_thread: woke up task=0xc1951a84
usb_transfer_complete: pipe=0xc239c900 xfer=0xc1951a00 status=15 actlen=0
usb_freemem: frag=0xc19d9e80
usb_transfer_complete: repeat=0 new head=0
usbd_start_next: pipe=0xc239c900, xfer=0
usbd_free_xfer: 0xc1951a00
uscanner1: Hewlett Packard ScanJet 3400cse, rev 1.00/0.00, addr 2
usbd_set_config_no: 1
usbd_get_config_desc: confidx=0
usbd_get_desc: type=2, index=0, len=9
usbd_alloc_xfer() = 0xc1951a00
usbd_transfer: xfer=0xc1951a00, flags=2, pipe=0xc239c900, running=0
usbd_dump_queue: pipe=0xc239c900
usb_allocmem: use frag=0xc19d9e80 size=9
usb_insert_transfer: pipe=0xc239c900 running=0 timeout=5000


At this point is hangs for I am guessing exactly 5000ms.


usb_transfer_complete: pipe=0xc239c900 xfer=0xc1951a00 status=17 actlen=0


status 17 above is USBD_STALLED.  So I am guessing that the scanner is 
not responding at this point...although it seemed to respond above..no?

Can anyone point me at least in the right direction to fixing this.  Is 
it a hardware or a software problem?  If it is fixable and I can somehow 
manage to fix it, I will post my patch here.

Thanks
Chris

PS: Just added the rest of the usb dmesg output below for good measure.

usb_freemem: frag=0xc19d9e80
usb_transfer_complete: repeat=0 new head=0
usbd_start_next: pipe=0xc239c900, xfer=0
usbd_transfer: xfer=0xc1951a00, flags=2, pipe=0xc239c900, running=0
usbd_dump_queue: pipe=0xc239c900
usb_allocmem: use frag=0xc19d9e80 size=2
usb_insert_transfer: pipe=0xc239c900 running=0 timeout=5000
usb_transfer_complete: pipe=0xc239c900 xfer=0xc1951a00 status=17 actlen=0
usb_freemem: frag=0xc19d9e80
usb_transfer_complete: repeat=0 new head=0
usbd_start_next: pipe=0xc239c900, xfer=0
usbd_free_xfer: 0xc1951a00
uscanner1: setting config no failed
device_attach: uscanner1 attach returned 6
usbd_probe_and_attach: no device specific driver found
usbd_probe_and_attach: looping over 1 configurations
usbd_probe_and_attach: trying config idx=0
usbd_set_config_index: dev=0xc239cb00 index=0
usbd_get_config_desc: confidx=0
usbd_get_desc: type=2, index=0, len=9
usbd_alloc_xfer() = 0xc1951a00
usbd_transfer: xfer=0xc1951a00, flags=2, pipe=0xc239c900, running=0
usbd_dump_queue: pipe=0xc239c900
usb_allocmem: use frag=0xc19d9e80 size=9
usb_insert_transfer: pipe=0xc239c900 running=0 timeout=5000
usb_transfer_complete: pipe=0xc239c900 xfer=0xc1951a00 status=17 actlen=0
usb_freemem: frag=0xc19d9e80
usb_transfer_complete: repeat=0 new head=0
usbd_start_next: pipe=0xc239c900, xfer=0
usbd_transfer: xfer=0xc1951a00, flags=2, pipe=0xc239c900, running=0
usbd_dump_queue: pipe=0xc239c900
usb_allocmem: use frag=0xc19d9e80 size=2
usb_insert_transfer: pipe=0xc239c900 running=0 timeout=5000
usb_transfer_complete: pipe=0xc239c900 xfer=0xc1951a00 status=17 actlen=0
usb_freemem: frag=0xc19d9e80
usb_transfer_complete: repeat=0 new head=0
usbd_start_next: pipe=0xc239c900, xfer=0
usbd_free_xfer: 0xc1951a00
uhub1: port 1, set config at addr 2 failed, error=STALLED
usbd_remove_device: 0xc239cb00
usbd_ar_pipe: pipe=0xc239c900
usbd_dump_queue: pipe=0xc239c900
uhub_explore: usb_new_device failed, error=STALLED
uhub1: device problem, disabling port 1
usbd_alloc_xfer() = 0xc1951a00
usbd_transfer: xfer=0xc1951a00, flags=2, pipe=0xc19c4b80, running=0
usbd_dump_queue: pipe=0xc19c4b80
usb_insert_transfer: pipe=0xc19c4b80 running=0 timeout=5000
usb_transfer_complete: pipe=0xc19c4b80 xfer=0xc1951a00 status=0 actlen=0
usb_transfer_complete: repeat=0 new head=0
usbd_start_next: pipe=0xc19c4b80, xfer=0
usbd_free_xfer: 0xc1951a00
usbd_alloc_xfer() = 0xc1951a00
usbd_transfer: xfer=0xc1951a00, flags=2, pipe=0xc19c4b80, running=0
usbd_dump_queue: pipe=0xc19c4b80
usb_allocmem: use frag=0xc19d9e80 size=4
usb_insert_transfer: pipe=0xc19c4b80 running=0 timeout=5000
usb_transfer_complete: pipe=0xc19c4b80 xfer=0xc1951a00 status=0 actlen=4
usb_freemem: frag=0xc19d9e80
usb_transfer_complete: repeat=0 new head=0
usbd_start_next: pipe=0xc19c4b80, xfer=0
usbd_free_xfer: 0xc1951a00








Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?41F2F405.9050909>