From owner-freebsd-current@FreeBSD.ORG Sun Jul 17 10:30:22 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 34A8C16A41F for ; Sun, 17 Jul 2005 10:30:22 +0000 (GMT) (envelope-from freebsd-current@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2748C43D46 for ; Sun, 17 Jul 2005 10:30:20 +0000 (GMT) (envelope-from freebsd-current@m.gmane.org) Received: from root by ciao.gmane.org with local (Exim 4.43) id 1Du6PR-0002y2-1C for freebsd-current@freebsd.org; Sun, 17 Jul 2005 12:30:09 +0200 Received: from wd197.bfl19.vectant.ne.jp ([210.131.181.197]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 17 Jul 2005 12:30:09 +0200 Received: from davidsmith by wd197.bfl19.vectant.ne.jp with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 17 Jul 2005 12:30:09 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-current@freebsd.org From: davidsmith@acm.org (David D. Smith) Date: Sun, 17 Jul 2005 19:04:34 +0900 Organization: Only myself Lines: 645 Message-ID: <87ackliw99.fsf@exponent.dds.no-ip.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: wd197.bfl19.vectant.ne.jp X-GPG-Fingerprint: CE01 474D B8C6 CDE5 FA32 6DC9 1091 8EB9 E651 1C7E Mail-Followup-To: Mail-Copies-To: nobody Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEUVFBE0KB9aRDRvRDSERTqcXE2KZlOytLFZATVYAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH1AESFxQCW8JBsQAAAdFJREFUeNp11MFyozAMAFCRw+41dmbSazFTci4C9gOw8wEbm3uToF63PSS/X4kQbJJZ5aYXydaAgOs9vpUy1xgw54FDP8OYB1g9wfoGsH2ArykP2ecSXmfYLuBy7wSgdil8JbBNIVcSI6xVAheVjaK4UGW7CNyJs5WuBLOXCB8CxaFAjUU+HQLTEVpjwNB4rJROoUAMwYUQPKagVB3ugUp9RtAJ5P+D9xTSVu86BZzSByyq9FaZQN+HQ65VtfkTJ9eIBQ581/aMpt6noNGgsygx9DOcuKJDdB5l1OHvDL5CzDWD77DuhtjqfJIzrPOua0LXtDMMh9rXNjhv5cZv8VaXfhyQKwSaCNcg4LnCCewSkAE5a53j4RMY0AXvrbfWO6quKfDR1ra1dQ2V6QuHNRcE4jloAdcjHaSPxT3RLoUL0Zn/TPWeji+LNShpsHuytqePX4u3fUMDT2E7oleIT5D3aUVDsNYSVQC/I/yDVXmSEftTPu0bTIu2MmaQx1uZHLIIAMboMvR0Usasx0NmqIzm6+baHG+9bm+JVEjkXHCUTRxhXMBNizcbAWAH02KuuA9xui3vCzx9EqBkaPl3hIcYS0gGf4xyzD8VyGdE8vPC/wD2qUwW+F1N3QAAAABJRU5ErkJggg== Emacs: resistance is futile; you will be assimilated and byte-compiled. User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (berkeley-unix) Cancel-Lock: sha1:N3gn1S3pEqgTgCqa632m7XNMYos= Sender: news Subject: Improving uscanner X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jul 2005 10:30:22 -0000 --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Transfer-Encoding: quoted-printable Hello! I'm new to FreeBSD but eager to work and read! I want to get my Epson PX-A550 (CX-4600 outside of Japan) device working as both a printer and a scanner at the same time, so I started working on uscanner.c taking the advice from a few threads on -current talking about the existing problem. Those threads are: http://thread.gmane.org/gmane.os.freebsd.current/69777 http://thread.gmane.org/gmane.os.freebsd.current/52610 http://thread.gmane.org/gmane.os.freebsd.current/33890 I modified uscanner's USB_ATTACH and USB_MATCH to be more like ulpt's. My patch for these is the first attachment to this mail. This seems to work well as I can now plug-in the device and see both devices created successfully, but if I attempt to write to the ulpt device, I inevitably get a panic. I've been trying to debug the panic; backtrace along with log of my kgdb session is the second attachment. AFAICS the crash is because of the sc_iface being incomplete, particularly sc_iface->device being set to NULL, but I can't tell how this situation is coming about and I don't have a second machine to step through the running kernel and retrieve better information. I also have quite a bit of debugging output from the USB layer captured but nothing seems anymore helpful than the backtrace, yet I will happily provide that info if anyone is interested. M. Warner Losh claimed to be working on this problem on 2005/05/31. Could you tell me how you were going about this problem? I have been trying to dig through the heart of the USB code to find the reason the simple patch to uscanner does not suffice but without a debugger it is taking me a very long time to do alone. Thanks, =2D-=20 David D. Smith A man without doubt is a monster. --=-=-= Content-Disposition: attachment Content-Description: uscanner.c.patch cd /tmp/ diff -Naur /tmp/uscanner.c.orig /tmp/uscanner.c --- /tmp/uscanner.c.orig Sun Jul 17 18:27:28 2005 +++ /tmp/uscanner.c Sun Jul 17 18:31:11 2005 @@ -78,6 +78,8 @@ #include "usbdevs.h" +#define USCANNER_CLASS_SCANJET 0x10 + #ifdef USB_DEBUG #define DPRINTF(x) if (uscannerdebug) logprintf x #define DPRINTFN(n,x) if (uscannerdebug>(n)) logprintf x @@ -205,6 +207,7 @@ {{ USB_VENDOR_EPSON, USB_PRODUCT_EPSON_3200 }, USC_KEEP_OPEN }, {{ USB_VENDOR_EPSON, USB_PRODUCT_EPSON_GT9700F }, USC_KEEP_OPEN }, {{ USB_VENDOR_EPSON, USB_PRODUCT_EPSON_GT9300UF }, 0 }, + {{ USB_VENDOR_EPSON, USB_PRODUCT_EPSON_CX4600 }, 0 }, /* UMAX */ {{ USB_VENDOR_UMAX, USB_PRODUCT_UMAX_ASTRA1220U }, 0 }, @@ -298,12 +301,20 @@ USB_MATCH(uscanner) { USB_MATCH_START(uscanner, uaa); - - if (uaa->iface != NULL) + usb_interface_descripor_t *id; + + if (uaa->iface == NULL) return UMATCH_NONE; - return (uscanner_lookup(uaa->vendor, uaa->product) != NULL ? - UMATCH_VENDOR_PRODUCT : UMATCH_NONE); + id = usbd_get_interface_descriptor(uaa->iface); + if (id != NULL && + (id->bInterfaceClass == UICLASS_VENDOR || + id->bInterfaceClass == UICLASS_UNSPEC || + id->bInterfaceClass == UICLASS_CDC_DATA || + id->bInterfaceClass == USCANNER_CLASS_SCANJET)) + return (uscanner_lookup(uaa->vendor, uaa->product) != NULL ? + UMATCH_VENDOR_PRODUCT : UMATCH_NONE); + return UMATCH_NONE; } USB_ATTACH(uscanner) Diff finished at Sun Jul 17 18:31:14 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment Content-Transfer-Encoding: quoted-printable Content-Description: vmcore.17.gdb.log Current directory is /usr/src/sys/i386/compile/EXPONENT/ [GDB will not be able to debug user-mode threads: /usr/lib/libthread_db.so:= Undefined symbol "ps_pglobal_lookup"] GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain condition= s. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-marcel-freebsd". #0 doadump () at pcpu.h:159 (kgdb) bt #0 doadump () at pcpu.h:159 #1 0xc067b7ee in boot (howto=3D260) at ../../../kern/kern_shutdown.c:410 #2 0xc067baf5 in panic (fmt=3D0xc08e84c0 "%s") at ../../../kern/kern_shutd= own.c:566 #3 0xc089929d in trap_fatal (frame=3D0xd068f940, eva=3D0) at ../../../i386/i386/trap.c:817 #4 0xc0898fc0 in trap_pfault (frame=3D0xd068f940, usermode=3D0, eva=3D4) at ../../../i386/i386/trap.c:735 #5 0xc0898b8c in trap (frame=3D {tf_fs =3D 24, tf_es =3D 16, tf_ds =3D 16, tf_edi =3D 4, tf_esi =3D -= 1048176128, tf_ebp =3D -798426708, tf_isp =3D -798426772, tf_ebx =3D 0, tf_= edx =3D -1046252836, tf_ecx =3D 0, tf_eax =3D 0, tf_trapno =3D 12, tf_err = =3D 0, tf_eip =3D -1067432071, tf_cs =3D 8, tf_eflags =3D 66178, tf_esp =3D= 0, tf_ss =3D 5000}) at ../../../i386/i386/trap.c:425 #6 0xc088a17a in calltrap () at ../../../i386/i386/exception.s:140 #7 0x00000018 in ?? () #8 0x00000010 in ?? () #9 0x00000010 in ?? () #10 0x00000004 in ?? () #11 0xc1861a00 in ?? () #12 0xd068f9ac in ?? () #13 0xd068f96c in ?? () #14 0x00000000 in ?? () #15 0xc1a372dc in ?? () #16 0x00000000 in ?? () #17 0x00000000 in ?? () #18 0x0000000c in ?? () #19 0x00000000 in ?? () #20 0xc0604779 in usbd_open_pipe_ival (iface=3D0xc1a372dc, address=3D4 '\00= 4',=20 flags=3D0 '\0', pipe=3D0x0, ival=3D0) at ../../../dev/usb/usbdi.c:199 #21 0xc0604758 in usbd_open_pipe (iface=3D0x0, address=3D4 '\004', flags=3D= 0 '\0',=20 pipe=3D0x0) at ../../../dev/usb/usbdi.c:183 #22 0xc05fbbca in ulptopen (dev=3D0x0, flag=3D2051, mode=3D8192, p=3D0xc181= d600) at ../../../dev/usb/ulpt.c:568 #23 0xc0634db2 in spec_open (ap=3D0xd068fa6c) at ../../../fs/specfs/spec_vn= ops.c:207 #24 0xc0634a8c in spec_vnoperate (ap=3D0x0) at ../../../fs/specfs/spec_vnop= s.c:118 #25 0xc06ea1a9 in vn_open_cred (ndp=3D0xd068fbd8, flagp=3D0xd068fcd8, cmode= =3D0,=20 cred=3D0xc1861400, fdidx=3D0) at vnode_if.h:228 #26 0xc06e9d5b in vn_open (ndp=3D0x0, flagp=3D0x0, cmode=3D0, fdidx=3D0) at ../../../kern/vfs_vnops.c:91 #27 0xc06e2c4b in kern_open (td=3D0xc181d600, path=3D0x0, pathseg=3DUIO_USE= RSPACE,=20 flags=3D2051, mode=3D0) at ../../../kern/vfs_syscalls.c:957 #28 0xc06e2b3a in open (td=3D0x0, uap=3D0x0) at ../../../kern/vfs_syscalls.= c:926 #29 0xc0899649 in syscall (frame=3D {tf_fs =3D 47, tf_es =3D 47, tf_ds =3D 47, tf_edi =3D 134518742, tf_e= si =3D -1077940767, tf_ebp =3D -1077952088, tf_isp =3D -798425740, tf_ebx = =3D 134523168, tf_edx =3D -1077943808, tf_ecx =3D 0, tf_eax =3D 5, tf_trapn= o =3D 12, tf_err =3D 2, tf_eip =3D 672102075, tf_cs =3D 31, tf_eflags =3D 6= 42, tf_esp =3D -1077952132, tf_ss =3D 47}) at ../../../i386/i386/trap.c:1009 #30 0xc088a1cf in Xint0x80_syscall () at ../../../i386/i386/exception.s:201 #31 0x0000002f in ?? () #32 0x0000002f in ?? () #33 0x0000002f in ?? () #34 0x080497d6 in ?? () #35 0xbfbfede1 in ?? () #36 0xbfbfc1a8 in ?? () #37 0xd068fd74 in ?? () #38 0x0804a920 in ?? () #39 0xbfbfe200 in ?? () #40 0x00000000 in ?? () #41 0x00000005 in ?? () #42 0x0000000c in ?? () #43 0x00000002 in ?? () #44 0x280f76bb in ?? () #45 0x0000001f in ?? () #46 0x00000282 in ?? () #47 0xbfbfc17c in ?? () #48 0x0000002f in ?? () #49 0x00000000 in ?? () #50 0x00000000 in ?? () #51 0x00000000 in ?? () #52 0x00000000 in ?? () #53 0x04d72000 in ?? () #54 0xc181c388 in ?? () #55 0xc181d600 in ?? () #56 0xd068f53c in ?? () #57 0xd068f524 in ?? () #58 0xc12c2d80 in ?? () #59 0xc068e326 in sched_switch (td=3D0xbfbfede1, newtd=3D0x804a920, flags= =3DCannot access memory at address 0xbfbfc1b8 ) at ../../../kern/sched_4bsd.c:881 Previous frame inner to this frame (corrupt stack?) #1 0xc067b7ee in boot (howto=3D260) at ../../../kern/kern_shutdown.c:410 #2 0xc067baf5 in panic (fmt=3D0xc08e84c0 "%s") at ../../../kern/kern_shutd= own.c:566 #3 0xc089929d in trap_fatal (frame=3D0xd068f940, eva=3D0) at ../../../i386/i386/trap.c:817 #2 0xc067baf5 in panic (fmt=3D0xc08e84c0 "%s") at ../../../kern/kern_shutd= own.c:566 #3 0xc089929d in trap_fatal (frame=3D0xd068f940, eva=3D0) at ../../../i386/i386/trap.c:817 #4 0xc0898fc0 in trap_pfault (frame=3D0xd068f940, usermode=3D0, eva=3D4) at ../../../i386/i386/trap.c:735 #5 0xc0898b8c in trap (frame=3D {tf_fs =3D 24, tf_es =3D 16, tf_ds =3D 16, tf_edi =3D 4, tf_esi =3D -= 1048176128, tf_ebp =3D -798426708, tf_isp =3D -798426772, tf_ebx =3D 0, tf_= edx =3D -1046252836, tf_ecx =3D 0, tf_eax =3D 0, tf_trapno =3D 12, tf_err = =3D 0, tf_eip =3D -1067432071, tf_cs =3D 8, tf_eflags =3D 66178, tf_esp =3D= 0, tf_ss =3D 5000}) at ../../../i386/i386/trap.c:425 #6 0xc088a17a in calltrap () at ../../../i386/i386/exception.s:140 Current language: auto; currently asm #7 0x00000018 in ?? () #8 0x00000010 in ?? () (kgdb) bt #0 doadump () at pcpu.h:159 #1 0xc067b7ee in boot (howto=3D260) at ../../../kern/kern_shutdown.c:410 #2 0xc067baf5 in panic (fmt=3D0xc08e84c0 "%s") at ../../../kern/kern_shutd= own.c:566 #3 0xc089929d in trap_fatal (frame=3D0xd068f940, eva=3D0) at ../../../i386/i386/trap.c:817 #4 0xc0898fc0 in trap_pfault (frame=3D0xd068f940, usermode=3D0, eva=3D4) at ../../../i386/i386/trap.c:735 #5 0xc0898b8c in trap (frame=3D {tf_fs =3D 24, tf_es =3D 16, tf_ds =3D 16, tf_edi =3D 4, tf_esi =3D -= 1048176128, tf_ebp =3D -798426708, tf_isp =3D -798426772, tf_ebx =3D 0, tf_= edx =3D -1046252836, tf_ecx =3D 0, tf_eax =3D 0, tf_trapno =3D 12, tf_err = =3D 0, tf_eip =3D -1067432071, tf_cs =3D 8, tf_eflags =3D 66178, tf_esp =3D= 0, tf_ss =3D 5000}) at ../../../i386/i386/trap.c:425 #6 0xc088a17a in calltrap () at ../../../i386/i386/exception.s:140 #7 0x00000018 in ?? () #8 0x00000010 in ?? () #9 0x00000010 in ?? () #10 0x00000004 in ?? () #11 0xc1861a00 in ?? () #12 0xd068f9ac in ?? () #13 0xd068f96c in ?? () #14 0x00000000 in ?? () #15 0xc1a372dc in ?? () #16 0x00000000 in ?? () #17 0x00000000 in ?? () #18 0x0000000c in ?? () #19 0x00000000 in ?? () #20 0xc0604779 in usbd_open_pipe_ival (iface=3D0xc1a372dc, address=3D4 '\00= 4',=20 flags=3D0 '\0', pipe=3D0x0, ival=3D0) at ../../../dev/usb/usbdi.c:199 #21 0xc0604758 in usbd_open_pipe (iface=3D0x0, address=3D4 '\004', flags=3D= 0 '\0',=20 pipe=3D0x0) at ../../../dev/usb/usbdi.c:183 #22 0xc05fbbca in ulptopen (dev=3D0x0, flag=3D2051, mode=3D8192, p=3D0xc181= d600) at ../../../dev/usb/ulpt.c:568 #23 0xc0634db2 in spec_open (ap=3D0xd068fa6c) at ../../../fs/specfs/spec_vn= ops.c:207 #24 0xc0634a8c in spec_vnoperate (ap=3D0x0) at ../../../fs/specfs/spec_vnop= s.c:118 #25 0xc06ea1a9 in vn_open_cred (ndp=3D0xd068fbd8, flagp=3D0xd068fcd8, cmode= =3D0,=20 cred=3D0xc1861400, fdidx=3D0) at vnode_if.h:228 #26 0xc06e9d5b in vn_open (ndp=3D0x0, flagp=3D0x0, cmode=3D0, fdidx=3D0) at ../../../kern/vfs_vnops.c:91 #27 0xc06e2c4b in kern_open (td=3D0xc181d600, path=3D0x0, pathseg=3DUIO_USE= RSPACE,=20 flags=3D2051, mode=3D0) at ../../../kern/vfs_syscalls.c:957 #28 0xc06e2b3a in open (td=3D0x0, uap=3D0x0) at ../../../kern/vfs_syscalls.= c:926 #29 0xc0899649 in syscall (frame=3D {tf_fs =3D 47, tf_es =3D 47, tf_ds =3D 47, tf_edi =3D 134518742, tf_e= si =3D -1077940767, tf_ebp =3D -1077952088, tf_isp =3D -798425740, tf_ebx = =3D 134523168, tf_edx =3D -1077943808, tf_ecx =3D 0, tf_eax =3D 5, tf_trapn= o =3D 12, tf_err =3D 2, tf_eip =3D 672102075, tf_cs =3D 31, tf_eflags =3D 6= 42, tf_esp =3D -1077952132, tf_ss =3D 47}) at ../../../i386/i386/trap.c:1009 #30 0xc088a1cf in Xint0x80_syscall () at ../../../i386/i386/exception.s:201 #31 0x0000002f in ?? () #32 0x0000002f in ?? () #33 0x0000002f in ?? () #34 0x080497d6 in ?? () #35 0xbfbfede1 in ?? () #36 0xbfbfc1a8 in ?? () #37 0xd068fd74 in ?? () #38 0x0804a920 in ?? () #39 0xbfbfe200 in ?? () #40 0x00000000 in ?? () #41 0x00000005 in ?? () #42 0x0000000c in ?? () #43 0x00000002 in ?? () #44 0x280f76bb in ?? () #45 0x0000001f in ?? () #46 0x00000282 in ?? () #47 0xbfbfc17c in ?? () #48 0x0000002f in ?? () #49 0x00000000 in ?? () #50 0x00000000 in ?? () #51 0x00000000 in ?? () #52 0x00000000 in ?? () #53 0x04d72000 in ?? () #54 0xc181c388 in ?? () #55 0xc181d600 in ?? () #56 0xd068f53c in ?? () #57 0xd068f524 in ?? () #58 0xc12c2d80 in ?? () #59 0xc068e326 in sched_switch (td=3D0xbfbfede1, newtd=3D0x804a920, flags= =3DCannot access memory at address 0xbfbfc1b8 ) at ../../../kern/sched_4bsd.c:881 (kgdb) up #9 0x00000010 in ?? () (kgdb) up #10 0x00000004 in ?? () (kgdb) up #11 0xc1861a00 in ?? () (kgdb) up #12 0xd068f9ac in ?? () (kgdb) up #13 0xd068f96c in ?? () (kgdb) up #14 0x00000000 in ?? () (kgdb) up #15 0xc1a372dc in ?? () (kgdb) up #16 0x00000000 in ?? () (kgdb) up #17 0x00000000 in ?? () (kgdb) up #18 0x0000000c in ?? () (kgdb) up #19 0x00000000 in ?? () (kgdb) up #20 0xc0604779 in usbd_open_pipe_ival (iface=3D0xc1a372dc, address=3D4 '\00= 4',=20 flags=3D0 '\0', pipe=3D0x0, ival=3D0) at ../../../dev/usb/usbdi.c:199 Current language: auto; currently c (kgdb) up #21 0xc0604758 in usbd_open_pipe (iface=3D0x0, address=3D4 '\004', flags=3D= 0 '\0',=20 pipe=3D0x0) at ../../../dev/usb/usbdi.c:183 (kgdb) up #22 0xc05fbbca in ulptopen (dev=3D0x0, flag=3D2051, mode=3D8192, p=3D0xc181= d600) at ../../../dev/usb/ulpt.c:568 (kgdb) up #23 0xc0634db2 in spec_open (ap=3D0xd068fa6c) at ../../../fs/specfs/spec_vn= ops.c:207 (kgdb) up #24 0xc0634a8c in spec_vnoperate (ap=3D0x0) at ../../../fs/specfs/spec_vnop= s.c:118 (kgdb) up #25 0xc06ea1a9 in vn_open_cred (ndp=3D0xd068fbd8, flagp=3D0xd068fcd8, cmode= =3D0,=20 cred=3D0xc1861400, fdidx=3D0) at vnode_if.h:228 (kgdb) up #26 0xc06e9d5b in vn_open (ndp=3D0x0, flagp=3D0x0, cmode=3D0, fdidx=3D0) at ../../../kern/vfs_vnops.c:91 (kgdb) up #27 0xc06e2c4b in kern_open (td=3D0xc181d600, path=3D0x0, pathseg=3DUIO_USE= RSPACE,=20 flags=3D2051, mode=3D0) at ../../../kern/vfs_syscalls.c:957 #26 0xc06e9d5b in vn_open (ndp=3D0x0, flagp=3D0x0, cmode=3D0, fdidx=3D0) at ../../../kern/vfs_vnops.c:91 #25 0xc06ea1a9 in vn_open_cred (ndp=3D0xd068fbd8, flagp=3D0xd068fcd8, cmode= =3D0,=20 cred=3D0xc1861400, fdidx=3D0) at vnode_if.h:228 #24 0xc0634a8c in spec_vnoperate (ap=3D0x0) at ../../../fs/specfs/spec_vnop= s.c:118 #23 0xc0634db2 in spec_open (ap=3D0xd068fa6c) at ../../../fs/specfs/spec_vn= ops.c:207 #22 0xc05fbbca in ulptopen (dev=3D0x0, flag=3D2051, mode=3D8192, p=3D0xc181= d600) at ../../../dev/usb/ulpt.c:568 #21 0xc0604758 in usbd_open_pipe (iface=3D0x0, address=3D4 '\004', flags=3D= 0 '\0',=20 pipe=3D0x0) at ../../../dev/usb/usbdi.c:183 #20 0xc0604779 in usbd_open_pipe_ival (iface=3D0xc1a372dc, address=3D4 '\00= 4',=20 flags=3D0 '\0', pipe=3D0x0, ival=3D0) at ../../../dev/usb/usbdi.c:199 #21 0xc0604758 in usbd_open_pipe (iface=3D0x0, address=3D4 '\004', flags=3D= 0 '\0',=20 pipe=3D0x0) at ../../../dev/usb/usbdi.c:183 #22 0xc05fbbca in ulptopen (dev=3D0x0, flag=3D2051, mode=3D8192, p=3D0xc181= d600) at ../../../dev/usb/ulpt.c:568 #23 0xc0634db2 in spec_open (ap=3D0xd068fa6c) at ../../../fs/specfs/spec_vn= ops.c:207 #24 0xc0634a8c in spec_vnoperate (ap=3D0x0) at ../../../fs/specfs/spec_vnop= s.c:118 #25 0xc06ea1a9 in vn_open_cred (ndp=3D0xd068fbd8, flagp=3D0xd068fcd8, cmode= =3D0,=20 cred=3D0xc1861400, fdidx=3D0) at vnode_if.h:228 #24 0xc0634a8c in spec_vnoperate (ap=3D0x0) at ../../../fs/specfs/spec_vnop= s.c:118 #23 0xc0634db2 in spec_open (ap=3D0xd068fa6c) at ../../../fs/specfs/spec_vn= ops.c:207 #22 0xc05fbbca in ulptopen (dev=3D0x0, flag=3D2051, mode=3D8192, p=3D0xc181= d600) at ../../../dev/usb/ulpt.c:568 A syntax error in expression, near `'. Attempt to use a type name as an expression No symbol "ulpt_softc" in current context. $1 =3D 0xc1a372dc $2 =3D 0xc1a372dc (kgdb) print sc_iface No symbol "sc_iface" in current context. (kgdb) print sc->sc_out $3 =3D 4 (kgdb) p sc->sc_dying $4 =3D 0 '\0' (kgdb) p sc->sc_state $5 =3D 4 '\004' (kgdb) p ulpt_status(sc) You can't do that without a process to debug. (kgdb) p flags=20 $6 =3D 0 '\0' (kgdb) p sc->sc_refcnt $7 =3D 1 (kgdb) p sc->sc_flags $8 =3D 0 '\0' (kgdb) p sc->sc_state $9 =3D 4 '\004' (kgdb) p sc->sc_iface $10 =3D 0xc1a372dc (kgdb) p sc->sc_out $11 =3D 4 (kgdb) p sc->sc_out_pipe $12 =3D 0x0 (kgdb) p sc->sc_iface->index $13 =3D 0 (kgdb) p sc->sc_iface->altindex $14 =3D 0 (kgdb) p sc->sc_iface->pipes $15 =3D {lh_first =3D 0x0} (kgdb) p sc->sc_iface->device $16 =3D (struct usbd_device *) 0x0 (kgdb) p dev $17 =3D (struct cdev *) 0x0 (kgdb) p flag $18 =3D 2051 (kgdb) p dev $19 =3D (struct cdev *) 0x0 (kgdb) p (dev =3D=3D NULL) No symbol "NULL" in current context. (kgdb) p (dev =3D=3D 0) $20 =3D 1 (kgdb) p sc $21 =3D (struct ulpt_softc *) 0xc1861a00 (kgdb) p minor(dv) No symbol "dv" in current context. (kgdb) p minor(dev) You can't do that without a process to debug. (kgdb) p unit No symbol "unit" in current context. (kgdb) p cd_ndevs No symbol "cd_ndevs" in current context. (kgdb) p ulpt_cd.cd_ndevs No symbol "ulpt_cd" in current context. (kgdb) p ulpt_cd No symbol "ulpt_cd" in current context. (kgdb) p sc $22 =3D (struct ulpt_softc *) 0xc1861a00 (kgdb) p sc->sc_iface $23 =3D 0xc1a372dc (kgdb) p sc->sc_iface->device $24 =3D (struct usbd_device *) 0x0 (kgdb) p sc->sc_iface->endpoints $25 =3D (struct usbd_endpoint *) 0xc145bb70 (kgdb) p sc->sc_iface->device->cdesc Cannot access memory at address 0x4c (kgdb) p &sc->sc_iface->device $26 =3D (struct usbd_device **) 0xc1a372dc (kgdb) p *sc->sc_iface->device Cannot access memory at address 0x0 (kgdb) p sc->sc_iface->device->ifaces Cannot access memory at address 0x34 (kgdb) p sc->sc_iface->device->cdesc Cannot access memory at address 0x4c (kgdb) p sc->sc_iface->idesc $27 =3D (usb_interface_descriptor_t *) 0x0 (kgdb) p sc->sc_iface->ifaceidx There is no member named ifaceidx. (kgdb) p sc->sc_iface->index $28 =3D 0 (kgdb) p sc->sc_iface->endpoints $29 =3D (struct usbd_endpoint *) 0xc145bb70 (kgdb) p *sc->sc_iface->endpoints $30 =3D {edesc =3D 0x61007768, refcnt =3D 6910051} (kgdb) p sc->sc_iface->endpoints->edesc $31 =3D (usb_endpoint_descriptor_t *) 0x61007768 (kgdb) p *sc->sc_iface->endpoints->edesc Cannot access memory at address 0x61007768 (kgdb) p sc->sc_iface->device->speed Cannot access memory at address 0xb (kgdb) p sc->sc_iface->idesc $32 =3D (usb_interface_descriptor_t *) 0x0 (kgdb) p *sc->sc_iface->idesc Cannot access memory at address 0x0 (kgdb) p *sc->sc_in Cannot access memory at address 0x83 (kgdb) p sc->sc_in $33 =3D 131 (kgdb) p sc->sc_out $34 =3D 4 (kgdb) p sc->sc_ifaceno $35 =3D 1 (kgdb) p sc->sc_udev $36 =3D 0xc185ed00 (kgdb) p *sc->sc_udev $37 =3D {bus =3D 0xc13ea000, default_pipe =3D 0xc1860380, address =3D 2 '\0= 02',=20 config =3D 1 '\001', depth =3D 1 '\001', speed =3D 2 '\002', self_powered= =3D 1 '\001',=20 power =3D 2, langid =3D 1033, cookie =3D {cookie =3D 6}, powersrc =3D 0xc= 1403044,=20 myhub =3D 0xc13d9a80, myhsport =3D 0x0, def_ep =3D {edesc =3D 0xc185ed2c,= refcnt =3D 1},=20 def_ep_desc =3D {bLength =3D 7 '\a', bDescriptorType =3D 5 '\005',=20 bEndpointAddress =3D 0 '\0', bmAttributes =3D 0 '\0', wMaxPacketSize = =3D "\b",=20 bInterval =3D 0 '\0'}, ifaces =3D 0xc1a36b00, ddesc =3D {bLength =3D 18= '\022',=20 bDescriptorType =3D 1 '\001', bcdUSB =3D "\020\001", bDeviceClass =3D 0= '\0',=20 bDeviceSubClass =3D 0 '\0', bDeviceProtocol =3D 0 '\0', bMaxPacketSize = =3D 8 '\b',=20 idVendor =3D "=C2=B8\004", idProduct =3D "\016\b", bcdDevice =3D "\000\= 001",=20 iManufacturer =3D 1 '\001', iProduct =3D 2 '\002', iSerialNumber =3D 3 = '\003',=20 bNumConfigurations =3D 1 '\001'}, cdesc =3D 0xc1a36b80, quirks =3D 0xc0= 8be8f8,=20 hub =3D 0x0, subdevs =3D 0xc145b0d0, ifacenums =3D 0xc14d7270 ""} (kgdb) p *sc->sc_udev->subdevs $38 =3D 0xc1860400 (kgdb) p sc->sc_udev->subdevs $39 =3D (device_t *) 0xc145b0d0 (kgdb) p *sc->sc_udev->subdevs $40 =3D 0xc1860400 #21 0xc0604758 in usbd_open_pipe (iface=3D0x0, address=3D4 '\004', flags=3D= 0 '\0',=20 pipe=3D0x0) at ../../../dev/usb/usbdi.c:183 #20 0xc0604779 in usbd_open_pipe_ival (iface=3D0xc1a372dc, address=3D4 '\00= 4',=20 flags=3D0 '\0', pipe=3D0x0, ival=3D0) at ../../../dev/usb/usbdi.c:199 (kgdb) p iface $41 =3D 0xc1a372dc (kgdb) p iface->idesc $42 =3D (usb_interface_descriptor_t *) 0x0 #19 0x00000000 in ?? () #20 0xc0604779 in usbd_open_pipe_ival (iface=3D0xc1a372dc, address=3D4 '\00= 4',=20 flags=3D0 '\0', pipe=3D0x0, ival=3D0) at ../../../dev/usb/usbdi.c:199 #21 0xc0604758 in usbd_open_pipe (iface=3D0x0, address=3D4 '\004', flags=3D= 0 '\0',=20 pipe=3D0x0) at ../../../dev/usb/usbdi.c:183 (kgdb) p iface $43 =3D 0x0 #22 0xc05fbbca in ulptopen (dev=3D0x0, flag=3D2051, mode=3D8192, p=3D0xc181= d600) at ../../../dev/usb/ulpt.c:568 (kgdb) p sc->sc_iface $44 =3D 0xc1a372dc (kgdb) p *sc->sc_iface $45 =3D {device =3D 0x0, idesc =3D 0x0, index =3D 0, altindex =3D 0, endpoi= nts =3D 0xc145bb70,=20 priv =3D 0x0, pipes =3D {lh_first =3D 0x0}} #21 0xc0604758 in usbd_open_pipe (iface=3D0x0, address=3D4 '\004', flags=3D= 0 '\0',=20 pipe=3D0x0) at ../../../dev/usb/usbdi.c:183 #20 0xc0604779 in usbd_open_pipe_ival (iface=3D0xc1a372dc, address=3D4 '\00= 4',=20 flags=3D0 '\0', pipe=3D0x0, ival=3D0) at ../../../dev/usb/usbdi.c:199 #21 0xc0604758 in usbd_open_pipe (iface=3D0x0, address=3D4 '\004', flags=3D= 0 '\0',=20 pipe=3D0x0) at ../../../dev/usb/usbdi.c:183 #22 0xc05fbbca in ulptopen (dev=3D0x0, flag=3D2051, mode=3D8192, p=3D0xc181= d600) at ../../../dev/usb/ulpt.c:568 (kgdb) p up No symbol "up" in current context. (kgdb) up #23 0xc0634db2 in spec_open (ap=3D0xd068fa6c) at ../../../fs/specfs/spec_vn= ops.c:207 (kgdb) down #22 0xc05fbbca in ulptopen (dev=3D0x0, flag=3D2051, mode=3D8192, p=3D0xc181= d600) at ../../../dev/usb/ulpt.c:568 (kgdb) down #21 0xc0604758 in usbd_open_pipe (iface=3D0x0, address=3D4 '\004', flags=3D= 0 '\0',=20 pipe=3D0x0) at ../../../dev/usb/usbdi.c:183 (kgdb) up #22 0xc05fbbca in ulptopen (dev=3D0x0, flag=3D2051, mode=3D8192, p=3D0xc181= d600) at ../../../dev/usb/ulpt.c:568 (kgdb) up #23 0xc0634db2 in spec_open (ap=3D0xd068fa6c) at ../../../fs/specfs/spec_vn= ops.c:207 (kgdb) down #22 0xc05fbbca in ulptopen (dev=3D0x0, flag=3D2051, mode=3D8192, p=3D0xc181= d600) at ../../../dev/usb/ulpt.c:568 (kgdb) up #23 0xc0634db2 in spec_open (ap=3D0xd068fa6c) at ../../../fs/specfs/spec_vn= ops.c:207 (kgdb) down #22 0xc05fbbca in ulptopen (dev=3D0x0, flag=3D2051, mode=3D8192, p=3D0xc181= d600) at ../../../dev/usb/ulpt.c:568 (kgdb) p sc->sc_iface $46 =3D 0xc1a372dc (kgdb) p sc->sc_iface->device $47 =3D (struct usbd_device *) 0x0 (kgdb) p sc->sc_iface->pipes $48 =3D {lh_first =3D 0x0} (kgdb) quit Debugger finished --=-=-=-- --==-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) iD8DBQBC2i0yEJGOueZRHH4RAiYmAKCl3ha6cLqd2H5bC3MVYcCnWIQbpwCfVVPL jk2FWVvm+sqX/nxPqu8Mvxw= =GCDG -----END PGP SIGNATURE----- --==-=-=--