Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 08 May 2008 13:23:45 +0200
From:      Vincenzo Palazzo <vpa@bit4id.com>
To:        freebsd-usb@freebsd.org
Subject:   Re: freebsd 6.3 smart card reader usb hang?
Message-ID:  <4822E2C1.9040608@bit4id.com>
In-Reply-To: <4822E006.9080902@NOSPAMkurganme.cjb.net>
References:  <4822E006.9080902@NOSPAMkurganme.cjb.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Btw I've tested the code on a Virtual Machine, with the same kernel, 
same test code (I have copied the binaries) and, as you can see below, 
it WORKS!
I obtain response from the usb reader, and it is correct!
This is the log for the execution on the Virtual Machine.

The VM is created with VMWare Server on a Windows XP host.

 > sudo ./a.out
opening...
writing...
reading...
0100001041435233382d31313030ffff00060c00
closing...

---- BEGIN KERNEL LOG ----
ugenopen: flag=3, mode=8192, unit=0 endpt=2
ugenopen: sc=0xc2697000, endpt=2, dir=0, sce=0xc269739c
usbd_open_pipe: iface=0xc2641440 address=0x2 flags=0x0
usbd_setup_pipe: dev=0xc268c080 iface=0xc2641440 ep=0xc267a5cc 
pipe=0xd153d964
uhci_open: pipe=0xc273cc80, addr=2, endpt=2 (1)
ugenopen: sc=0xc2697000, endpt=2, dir=1, sce=0xc269747c
usbd_open_pipe: iface=0xc2641440 address=0x82 flags=0x0
usbd_setup_pipe: dev=0xc268c080 iface=0xc2641440 ep=0xc267a5d8 
pipe=0xd153d964
uhci_open: pipe=0xc27afa00, addr=2, endpt=130 (1)
ugen0: ugenwrite: 2
usbd_alloc_xfer() = 0xc2645000
ugenwrite: transfer 4 bytes
usbd_bulk_transfer: start transfer 4 bytes
usbd_transfer: xfer=0xc2645000, flags=0, pipe=0xc273cc80, running=0
usbd_dump_queue: pipe=0xc273cc80
usb_allocmem: use frag=0xc2650f40 size=4
usb_insert_transfer: pipe=0xc273cc80 running=0 timeout=0
uhci_device_bulk_start: xfer=0xc2645000 len=4 flags=0 ii=0xc2645074
uhci_alloc_std_chain: addr=2 endpt=2 len=4 speed=2 flags=0x0
uhci_alloc_std_chain: maxp=64 ntd=1
uhci_alloc_std_chain: nexttog=0
uhci_device_bulk_transfer: data(1)
TD(0xc264af80) at 0f39ef80 = link=0x00000005 status=0x198003ff 
token=0x006902e1 buffer=0x0f8e4f40
5<T,VF> 198003ff<ACTIVE,IOC>,errcnt=3,actlen=0 
pid=e1,addr=2,endpt=2,D=1,maxlen=4
uhci_add_bulk: sqh=0xc264bf20
uhci_start_loop: add
uhci_device_bulk_transfer: data(2)
TD(0xc264af80) at 0f39ef80 = link=0x00000005 status=0x198003ff 
token=0x006902e1 buffer=0x0f8e4f40
5<T,VF> 198003ff<ACTIVE,IOC>,errcnt=3,actlen=0 
pid=e1,addr=2,endpt=2,D=1,maxlen=4
usb_schedsoftintr: polling=0
usb0: uhci_softintr (0)
uhci_check_intr: ii=0xc2645074 done
uhci_idone: ii=0xc2645074
uhci_idone: ii=0xc2645074, xfer=0xc2645000, pipe=0xc273cc80 ready
TD(0xc264af80) at 0f39ef80 = link=0x00000005 status=0x19000003 
token=0x006902e1 buffer=0x0f8e4f40
5<T,VF> 19000003<IOC>,errcnt=3,actlen=4 pid=e1,addr=2,endpt=2,D=1,maxlen=4
uhci_idone: actlen=4, status=0x0
usb_transfer_complete: pipe=0xc273cc80 xfer=0xc2645000 status=0 actlen=4
usb_freemem: frag=0xc2650f40
usb_transfer_complete: repeat=0 new head=0
uhci_device_bulk_done: xfer=0xc2645000 ii=0xc2645074 sc=0xc264f000 
upipe=0xc273cc80
uhci_remove_bulk: sqh=0xc264bf20
uhci_end_loop: remove
uhci_device_bulk_done: length=4
usbd_start_next: pipe=0xc273cc80, xfer=0
uhci_idone: ii=0xc2645074 done
usbd_bulk_transfer: transferred 4
usbd_free_xfer: 0xc2645000
ugen0: ugenread: 2
usbd_alloc_xfer() = 0xc2645000
ugenread: start transfer 20 bytes
usbd_bulk_transfer: start transfer 20 bytes
usbd_transfer: xfer=0xc2645000, flags=0, pipe=0xc27afa00, running=0
usbd_dump_queue: pipe=0xc27afa00
usb_allocmem: use frag=0xc2650f40 size=20
usb_insert_transfer: pipe=0xc27afa00 running=0 timeout=0
uhci_device_bulk_start: xfer=0xc2645000 len=20 flags=0 ii=0xc2645074
uhci_alloc_std_chain: addr=2 endpt=2 len=20 speed=2 flags=0x0
uhci_alloc_std_chain: maxp=64 ntd=1
uhci_alloc_std_chain: nexttog=0
uhci_device_bulk_transfer: data(1)
TD(0xc264af80) at 0f39ef80 = link=0x00000005 status=0x198003ff 
token=0x02690269 buffer=0x0f8e4f40
5<T,VF> 198003ff<ACTIVE,IOC>,errcnt=3,actlen=0 
pid=69,addr=2,endpt=2,D=1,maxlen=20
uhci_add_bulk: sqh=0xc264bf40
uhci_start_loop: add
uhci_device_bulk_transfer: data(2)
TD(0xc264af80) at 0f39ef80 = link=0x00000005 status=0x198003ff 
token=0x02690269 buffer=0x0f8e4f40
5<T,VF> 198003ff<ACTIVE,IOC>,errcnt=3,actlen=0 
pid=69,addr=2,endpt=2,D=1,maxlen=20
usb_schedsoftintr: polling=0
usb0: uhci_softintr (0)
uhci_check_intr: ii=0xc2645074 done
uhci_idone: ii=0xc2645074
uhci_idone: ii=0xc2645074, xfer=0xc2645000, pipe=0xc27afa00 ready
TD(0xc264af80) at 0f39ef80 = link=0x00000005 status=0x19000013 
token=0x02690269 buffer=0x0f8e4f40
5<T,VF> 19000013<IOC>,errcnt=3,actlen=20 pid=69,addr=2,endpt=2,D=1,maxlen=20
uhci_idone: actlen=20, status=0x0
usb_transfer_complete: pipe=0xc27afa00 xfer=0xc2645000 status=0 actlen=20
usb_freemem: frag=0xc2650f40
usb_transfer_complete: repeat=0 new head=0
uhci_device_bulk_done: xfer=0xc2645000 ii=0xc2645074 sc=0xc264f000 
upipe=0xc27afa00
uhci_remove_bulk: sqh=0xc264bf40
uhci_end_loop: remove
uhci_device_bulk_done: length=20
usbd_start_next: pipe=0xc27afa00, xfer=0
uhci_idone: ii=0xc2645074 done
usbd_bulk_transfer: transferred 20
ugenread: got 20 bytes
usbd_free_xfer: 0xc2645000
ugenclose: flag=3, mode=8192, unit=0, endpt=2
ugenclose: endpt=2 dir=0 sce=0xc269739c
usbd_ar_pipe: pipe=0xc273cc80
usbd_dump_queue: pipe=0xc273cc80
ugenclose: endpt=2 dir=1 sce=0xc269747c
usbd_ar_pipe: pipe=0xc27afa00
usbd_dump_queue: pipe=0xc27afa00
---- END KERNEL LOG ----

 > dmesg | grep -iE '^.hci[0-9]|usb[0-9]'
uhci0: <Intel 82371AB/EB (PIIX4) USB controller> port 0x1060-0x107f irq 
19 at device 7.2 on pci0
uhci0: [GIANT-LOCKED]
uhci0: LegSup = 0x003b
usb0: <Intel 82371AB/EB (PIIX4) USB controller> on uhci0
usb0: USB revision 1.0



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4822E2C1.9040608>