[Bulk] Re: [Bulk] Re: New if_zyd driver

John Merryweather Cooper john_m_cooper at yahoo.com
Mon Oct 22 03:29:14 PDT 2007


Weongyo Jeong wrote:
> On Sun, Oct 21, 2007 at 12:05:42AM -0700, John Merryweather Cooper wrote:
>   
>> Weongyo Jeong wrote:
>>     
>>> On Thu, Aug 30, 2007 at 04:14:22PM +0200, Ted Lindgreen wrote:
>>> [... snipped ...]
>>>   
>>>       
>>>> However, the stick needs to be inserted after booting up. Then I can
>>>> also remove the stick without ill effects (for logmessages see below).
>>>>
>>>> When the stick is present during boot, the log shows:
>>>>  Aug 30 15:25:17 lapje kernel: zyd0: <ZyDAS USB2.0 WLAN, class 255/255, rev 2.00/48.10, addr 2> on uhub4
>>>>  Aug 30 15:25:17 lapje kernel: zyd0: setting config no failed
>>>>     
>>>>         
>>> [... snipped ...]
>>>
>>> Hello Ted,
>>>
>>> I send you a patch which is attached with this email to fix a reset
>>> problem of the zyd driver when we reboot.
>>>
>>> In my environment, this patch was worked.  Would you please test this
>>> patch and send me results?  I hope it works.  :-)
>>>
>>> Regards,
>>> Weongyo Jeong
>>>       
>> Well, the patch applies cleanly and builds on an amd64:
>>
>> Copyright (c) 1992-2007 The FreeBSD Project.
>> Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
>>         The Regents of the University of California. All rights reserved.
>> FreeBSD is a registered trademark of The FreeBSD Foundation.
>> FreeBSD 7.0-BETA1 #16: Sat Oct 20 14:58:28 PDT 2007
>>     root at borgdemon3.temp.wsu.edu:/usr/obj/usr/src/sys/TURION
>> Timecounter "i8254" frequency 1193182 Hz quality 0
>> CPU: AMD Turion(tm) 64 X2 Mobile Technology TL-64 (2210.07-MHz K8-class CPU)
>>   Origin = "AuthenticAMD"  Id = 0x60f81  Stepping = 1
>>  
>> Features=0x178bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT>
>>   Features2=0x2001<SSE3,CX16>
>>   AMD Features=0xea500800<SYSCALL,NX,MMX+,FFXSR,RDTSCP,LM,3DNow!+,3DNow!>
>>   AMD Features2=0x11f<LAHF,CMP,SVM,ExtAPIC,CR8,Prefetch>
>>   Cores per package: 2
>>
>> . . . .
>>
>> zyd0: <Belkin USB2.0 WLAN, class 255/255, rev 2.00/48.10, addr 3> on uhub1
>> zyd0: HMAC ZD1211B, FW 47.25, RF AL2230, PA 0, address 00:17:3f:b0:d4:97
>> zyd0: Ethernet address: 00:17:3f:b0:d4:97
>> zyd0: if_start running deferred for Giant
>>
>> I realize that the patch wasn't designed to fix my problem (locking up
>> when zyd0 is on a moderate load--like cvsup'ing).  Nevertheless, here's
>> what kgdb has to say:
>>
>> jcooper at borgdemon3$ sudo kgdb kernel.debug /var/crash/vmcore.9
>> [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
>> conditions.
>> Type "show copying" to see the conditions.
>> There is absolutely no warranty for GDB.  Type "show warranty" for details.
>> This GDB was configured as "amd64-marcel-freebsd".
>>
>> Unread portion of the kernel message buffer:
>> zyd0: could not transmit buffer: SHORT_XFER
>>
>>
>> Fatal trap 12: page fault while in kernel mode
>> cpuid = 1; apic id = 01
>> fault virtual address   = 0x2734
>> fault code              = supervisor write data, page not present
>> instruction pointer     = 0x8:0xffffffff808a94fa
>> stack pointer           = 0x10:0xffffffffab8dfaf0
>> frame pointer           = 0x10:0xffffffffab8dfb30
>> code segment            = base 0x0, limit 0xfffff, type 0x1b
>>                         = DPL 0, pres 1, long 1, def32 0, gran 1
>> processor eflags        = interrupt enabled, resume, IOPL = 0
>> current process         = 23 (irq22: ohci0 ehci0)
>> trap number             = 12
>> panic: page fault
>> cpuid = 1
>> Uptime: 8m38s
>> Physical memory: 1973 MB
>> Dumping 233 MB: 218 202 186 170 154 138 122 106 90 74 58 42 26 10
>>
>> #0  doadump () at pcpu.h:194
>> 194             __asm __volatile("movq %%gs:0,%0" : "=r" (td));
>> (kgdb)
>>
>> -------
>>
>> jmc
>>     
>
> Yes.  This patch isn't related with your problem.  Your problem is
> on my TODO list but I think that it would be hard and takes some times
> to fix because of the lack of environments that I don't have amd64,
> Belkin devices and the zyd driver on my environment works well without
> problems.
>
> Can you show me the backtrace log of `$ kgdb kernel.debug
> /var/crash/vmcore.9'?
>
> Regards,
> Weongyo Jeong
>
>   
Sure.  The backtrace is:

#0  doadump () at pcpu.h:194
#1  0x0000000000000004 in ?? ()
#2  0xffffffff802db510 in boot (howto=260)
    at /usr/src/sys/kern/kern_shutdown.c:409
#3  0xffffffff802db92d in panic (fmt=0x104 <Address 0x104 out of bounds>)
    at /usr/src/sys/kern/kern_shutdown.c:563
#4  0xffffffff80512c74 in trap_fatal (frame=Variable "frame" is not
available.
)
    at /usr/src/sys/amd64/amd64/trap.c:695
#5  0xffffffff80513045 in trap_pfault (frame=0xffffffffab8dfa40, usermode=0)
    at /usr/src/sys/amd64/amd64/trap.c:588
#6  0xffffffff805139eb in trap (frame=0xffffffffab8dfa40)
    at /usr/src/sys/amd64/amd64/trap.c:393
#7  0xffffffff804f986e in alltraps_pushregs_no_rdi ()
    at /usr/src/sys/amd64/amd64/exception.S:155
#8  0xffffff0001254000 in ?? ()
#9  0xffffffff80a4b878 in ?? ()
#10 0x0000000000000000 in ?? ()
#11 0xffffffffab907c00 in ?? ()
#12 0xffffff00011d4000 in ?? ()
#13 0x00000000000005cb in ?? ()
#14 0xffffffff808a94a0 in ?? ()
#15 0x0000000000000000 in ?? ()
#16 0xffffffffab8dfb30 in ?? ()
#17 0xffffff0001254000 in ?? ()
#18 0xffffffff806e5240 in ehci_device_ctrl_methods ()
#19 0xffffffff80a4b878 in ?? ()
#20 0x0000000000000000 in ?? ()
#21 0xffffff0001279800 in ?? ()
#22 0xffffffff80a4a000 in ?? ()
#23 0x000000000000000c in ?? ()
#24 0x0000000000002734 in ?? ()
#25 0xffffffff80250af7 in ehci_device_bulk_start (xfer=0xffffffff80a4b878)
    at /usr/src/sys/dev/usb/ehci.c:3078
#26 0xffffffff80272ad4 in usb_transfer_complete (xfer=0xffffff0001254000)
    at /usr/src/sys/dev/usb/usbdi.c:977
#27 0xffffffff8024eace in ehci_softintr (v=Variable "v" is not available.
) at /usr/src/sys/dev/usb/ehci.c:884
#28 0xffffffff80250583 in ehci_intr1 (sc=0xffffff00011d4000)
    at /usr/src/sys/dev/usb/ehci.c:603
#29 0xffffffff802bf1b0 in ithread_loop (arg=0xffffff000125a300)
    at /usr/src/sys/kern/kern_intr.c:1036
#30 0xffffffff802bc152 in fork_exit (
    callout=0xffffffff802bf040 <ithread_loop>, arg=0xffffff000125a300,
    frame=0xffffffffab8dfc80) at /usr/src/sys/kern/kern_fork.c:796
#31 0xffffffff804f9bde in nmi_restoreregs ()
    at /usr/src/sys/amd64/amd64/exception.S:386
#32 0x0000000000000000 in ?? ()
#33 0x0000000000000000 in ?? ()
#34 0x0000000000000001 in ?? ()
#35 0x0000000000000000 in ?? ()
#36 0x0000000000000000 in ?? ()
#37 0x0000000000000000 in ?? ()
#38 0x0000000000000000 in ?? ()
#39 0x0000000000000000 in ?? ()
#40 0x0000000000000000 in ?? ()
#41 0x0000000000000000 in ?? ()
#42 0x0000000000000000 in ?? ()
#43 0x0000000000000000 in ?? ()
#44 0x0000000000000000 in ?? ()
#45 0x0000000000000000 in ?? ()
#46 0x0000000000000000 in ?? ()
#47 0x0000000000000000 in ?? ()
#48 0x0000000000000000 in ?? ()
#49 0x0000000000000000 in ?? ()
#50 0x0000000000000000 in ?? ()
#51 0x0000000000000000 in ?? ()
#52 0x0000000000000000 in ?? ()
#53 0x0000000000000000 in ?? ()
#54 0x0000000000000000 in ?? ()
#55 0x0000000000000000 in ?? ()
#56 0x00000000009ab000 in ?? ()
#57 0xffffffff8075ce00 in tdq_cpu ()
#58 0xffffffff80768a00 in tdq_groups ()
#59 0xffffffff80768980 in tdq_cpu ()
#60 0xffffff000125c9f0 in ?? ()
#61 0x0000000000000000 in ?? ()
#62 0xffffffffab8df6b8 in ?? ()
#63 0xffffff000125c9f0 in ?? ()
#64 0xffffffff802f9404 in sched_switch (td=0xffffffff802bf040, newtd=0x0,
    flags=0) at /usr/src/sys/kern/sched_ule.c:1902
#65 0x0000000000000000 in ?? ()
#66 0x0000000000000000 in ?? ()
#67 0x0000000000000000 in ?? ()
#68 0x0000000000000000 in ?? ()
#69 0x0000000000000000 in ?? ()
#70 0x0000000000000000 in ?? ()
#71 0x0000000000000000 in ?? ()
#72 0x0000000000000000 in ?? ()
#73 0x0000000000000000 in ?? ()
#74 0x0000000000000000 in ?? ()
#75 0x0000000000000000 in ?? ()
#76 0x0000000000000000 in ?? ()
#77 0x0000000000000000 in ?? ()
#78 0x0000000000000000 in ?? ()
#79 0x0000000000000000 in ?? ()
#80 0x0000000000000000 in ?? ()
#81 0x0000000000000000 in ?? ()
#82 0x0000000000000000 in ?? ()
#83 0x0000000000000000 in ?? ()
#84 0x0000000000000000 in ?? ()
#85 0x0000000000000000 in ?? ()
#86 0x0000000000000000 in ?? ()
#87 0x0000000000000000 in ?? ()
#88 0x0000000000000000 in ?? ()
#89 0x0000000000000000 in ?? ()
#90 0x0000000000000000 in ?? ()
#91 0x0000000000000000 in ?? ()
#92 0x0000000000000000 in ?? ()
#93 0x0000000000000000 in ?? ()
#94 0x0000000000000000 in ?? ()
#95 0x0000000000000000 in ?? ()
#96 0x0000000000000000 in ?? ()
#97 0x0000000000000000 in ?? ()
#98 0x0000000000000000 in ?? ()
#99 0x0000000000000000 in ?? ()
#100 0x0000000000000000 in ?? ()
#101 0x0000000000000000 in ?? ()
#102 0x0000000000000000 in ?? ()
#103 0x0000000000000000 in ?? ()
#104 0x0000000000000000 in ?? ()
#105 0x0000000000000000 in ?? ()
#106 0x0000000000000000 in ?? ()
#107 0x0000000000000000 in ?? ()
#108 0x0000000000000000 in ?? ()
#109 0x0000000000000000 in ?? ()
#110 0x0000000000000000 in ?? ()
#111 0x0000000000000000 in ?? ()
#112 0x0000000000000000 in ?? ()
#113 0x0000000000000000 in ?? ()
#114 0x0000000000000000 in ?? ()
#115 0x0000000000000000 in ?? ()
#116 0x0000000000000000 in ?? ()
#117 0x0000000000000000 in ?? ()
#118 0x0000000000000000 in ?? ()
#119 0x0000000000000000 in ?? ()
#120 0x0000000000000000 in ?? ()
#121 0x0000000000000000 in ?? ()
#122 0x0000000000000000 in ?? ()
#123 0x0000000000000000 in ?? ()
#124 0x0000000000000000 in ?? ()
#125 0x0000000000000000 in ?? ()
#126 0x0000000000000000 in ?? ()
#127 0x0000000000000000 in ?? ()
#128 0x0000000000000000 in ?? ()
#129 0x0000000000000000 in ?? ()
#130 0x0000000000000000 in ?? ()
#131 0x0000000000000000 in ?? ()
#132 0x0000000000000000 in ?? ()
Cannot access memory at address 0xffffffffab8e0000

jmc



More information about the freebsd-current mailing list