# zydas device timeout



## twoface (Feb 27, 2009)

Hi everybody

I hope my english will not be too bad, and that I'll be understandable. Sorry in advance.

So here my problem

I've got 2 wireless networking usb devices, with  zydas's firmware. I configured both of them with wpa encryption.

 With  both of devices, I get the same problem, which i don't with wired connection:

Network (every time, and very quickly) randomly dies. 
How and when? 
Well, when I use lynx web browser in a ttys, when i download things from it, or when i use Â« make install clean Â», or pkgdb etc... the connection every so often dies quickly (it's much better Â« stable Â»),  but when I use a web browser with GUI like epiphany or firefox, (under gnome2), connection dies immediatly after the load (often before) of a search page or entered adress!

Then, I get this messages
Feb 28 15:18:07 BSD kernel: zyd0: device timeout

Feb 28 15:18:12 BSD kernel: zyd0: could not transmit buffer: TIMEOUT

And unfortunately, I can't bring up network even if typing Â« ifconfig zyd0; ifconfig zyd0 up Â»; the only why to bring up zydas's devices it's to reboot the machine. 

And before or after network dies randomly, I get a several of  this sort of messages (numbers and letters are not always the same).

Feb 28 00:03:09 BSD kernel: t_delta 16.01895b86b8d0ab80 too long

Feb 28 00:03:25 BSD kernel: t_delta 16.06a81324a98e29a0 too long

Feb 28 00:03:41 BSD kernel: t_delta 15.f7cef99d94d3c040 too short

And the Â« t_delta messages Â» thought me to a IQR problem.can also appear when system idle (for example, during compilation time) or not.

I can also down the network by myself by doing like this :
ping -i0,000001 -c100000 192.168.1.1

and I get this message:

Â« no buffer space available Â»

and then 

Feb 28 15:18:07 BSD kernel: zyd0: device timeout

Feb 28 15:18:12 BSD kernel: zyd0: could not transmit buffer: TIMEOUT

I don't think this message below I get at  each boot time is concerned:

Â« zyd0: WARNING: using obsoleted IFF_NEEDSGIANT flag
 Â»
What it means? What can I do to fix it?

So, after reading a lot af man and after some search, and almost, after reading the english handbook, i read that the problem come/arise from IRQ.

From english Handbook:
Â« 
   2.11.3.4. The system finds my ed(4) network card, but I keep

   getting device timeout errors.



   2.11.3.1. My system hangs while probing hardware during boot, or

   it behaves strangely during install, or the floppy drive is not

   probed.



   FreeBSD makes extensive use of the system ACPI service on the

   i386, amd64 and ia64 platforms to aid in system configuration if

   it is detected during boot. Unfortunately, some bugs still exist

   in both the ACPI driver and within system motherboards and BIOS.

   The use of ACPI can be disabled by setting the

   hint.acpi.0.disabled hint in the third stage boot loader:

   set hint.acpi.0.disabled="1"

  Â» 

or

Â« 
  getting device timeout errors.



   Your card is probably on a different IRQ from what is specified in

   the /boot/device.hints file. The ed(4) driver does not use the

   "soft" configuration by default (values entered using EZSETUP in

   DOS), but it will use the software configuration if you specify -1

   in the hints for the interface.



   Either move the jumper on the card to a hard configuration setting

   (altering the kernel settings if necessary), or specify the IRQ as

   -1 by setting the hint hint.ed.0.irq="-1" This will tell the

   kernel to use the soft configuration.



   Another possibility is that your card is at IRQ 9, which is shared

   by IRQ 2 and frequently a cause of problems (especially when you

   have a VGA card using IRQ 2!). You should not use IRQ 2 or 9 if at

   all possible.



 Â»

What can I do to solve the problem?



Here my uname -a:

$ uname -a

FreeBSD BSD.BSD 7.1-RELEASE FreeBSD 7.1-RELEASE #9: Fri Feb 28 15:13:07 CET 2009     root@BSD.BSD:/usr/obj/usr/src/sys/BSDx  i386

here zydas 's sysctl :
$ sysctl -a|grep -i zyd

net.wlan.0.%parent: zyd0

dev.zyd.0.%desc: ZyDAS USB2.0 WLAN, class 255/255, rev 2.00/43.30, addr 2

dev.zyd.0.%driver: zyd

dev.zyd.0.%location: port=4 interface=0

dev.zyd.0.%pnpinfo: vendor=0x0ace product=0x1211 devclass=0xff devsubclass=0xff release=0x4330 sernum="" intclass=0xff intsubclass=0x00

dev.zyd.0.%parent: uhub4


Note that changing clockrate with sysctl doesn't do any thing.

Thank you.


----------



## trev (Feb 28, 2009)

I remember people using laptops had similar issues with zyd WLAN USB devices last year. Possible solutions canvassed at the time included:

1) Upgrade system BIOS to latest available;
2) Disable ACPI;
3) Unplug wireless device, boot, plugin wireless device.


----------



## twoface (Mar 3, 2009)

trev said:
			
		

> I remember people using laptops had similar issues with zyd WLAN USB devices last year. Possible solutions canvassed at the time included:
> 
> 1) Upgrade system BIOS to latest available;
> 2) Disable ACPI;
> 3) Unplug wireless device, boot, plugin wireless device.



Hi everybody

Thank trev for your answer. So

1) I already got the latest BIOS available for my motherboard.

2) I can't, disable ACPI, because kernel does not want to boot without it. Maybe it's because of that I've "SMP" enable for my Prescott Pentium IV?

3) Well, when I unplug wireless device before boot time, and then, I waiting for system finish to boot, for plug it, I get this kind of messages:



> zyd0: zyd_read sleep timeout
> zyd0: could not send command (error=IOERROR)
> last message repeated 2 times
> zyd0: detached



or



> Fatal trap 12: page fault while in kernel mode
> cpuid = 1; apic id = 01
> fault virtual address   = 0x38
> fault code              = supervisor read data, page not present
> ...



 Messages above are not coming from my system, because Iâ€™m not currently on my computer under FreeBSD, but messages seem to be the same that you can read here:

http://www.mail-archive.com/freebsd-usb@freebsd.org/msg03908.html

or here

http://markmail.org/message/ins6ggxvw3skruj7#query:%22kernel%20panic%22%20zyd0+page:1+mid:5fm2nhhzh4tpi3zl+state:results

or 

http://www.freebsd.org/cgi/query-pr.cgi?pr=128745

or here again

http://lists.freebsd.org/pipermail/freebsd-current/2007-August/076641.html

So "what do you propose"?

thank you again


----------



## trev (Mar 3, 2009)

I'm out of ideas...


----------



## richardpl (Mar 6, 2009)

I remember reading in svn src-head archives that some improvements were made to zyd driver in CURRENT and some of them, if not all where MFC to 7 STABLE.

Better to ask developers directly or test 7 STABLE.


----------

