Re: [zd1211-devs] Vendor driver v2.16.0.0

2006-12-25 Thread Ulrich Kunitz
Hi,

  Matthieu CASTET wrote:
  BTW doing the reset in probe seems to work with new firmware :
  http://castet.matthieu.free.fr/tmp/zd_reset.diff

I made my own research here and added usb_reset_device to the
probe function. It works here with 2.6.19.2 + unrelated
softmac-patches. The interesting part is it works also with the
old 2_13_0_0 firmware.

I would like everybody, who had the reboot/reset problems to test
it, so that we are sure, we have nailed the problem.

Cheers,

Uli

[PATCH] zd1211rw: Reset device in the probe call

This resets the device in the probe call. It does work with
2.6.19.2 including the softmac patches. It might fix the
reboot/reset problems a lot of people reported.

Signed-off-by: Ulrich Kunitz [EMAIL PROTECTED]
---
 zd_usb.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/zd_usb.c b/zd_usb.c
index 1b8ea88..7ec2dd3 100644
--- a/zd_usb.c
+++ b/zd_usb.c
@@ -922,6 +922,8 @@ static int probe(struct usb_interface *i
goto error;
}
 
+   usb_reset_device(interface_to_usbdev(intf));
+
netdev = zd_netdev_alloc(intf);
if (netdev == NULL) {
r = -ENOMEM;
-- 
Uli Kunitz

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Zd1211-devs mailing list - http://zd1211.ath.cx/
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/zd1211-devs


Re: [zd1211-devs] Vendor driver v2.16.0.0

2006-12-23 Thread Hans Dingemans
Uli, it seems we are going in circles here. As I pointed out three months
ago, it is simply _not_ true that you can rely on host controllers to cycle
the power of their USB devices during reboot. Lots of machines do not do
this, and the machines that do can have USB-Hub's connected which in my
experience most of the time just keep the power on all USB-devices
connected.

For instance, I currently have a (not really down-end priced, excellent
performing) Gigabyte K8NS Ultra 939 board that keeps all its on-board USB
ports powered, _even_ after a shutdown. You really have to pull out the
mains cord to get the USB ports powerless...

So, regardless whether it is against any standard or not, if the zd1211rw
driver is not dealing with this fact of life, a lot of users will keep these
reboot/reset/reload problems, and that would be a shame for a driver that
apart from this works beautifully.

I'm not the expert here, but wouldn't it be a good idea to make sure
disconnect() is called on both reset and reboot (by root), and all other
exit scenario's possible. That then would be a clean exit, not relying
on how other components in the environment are acting?
You nor Daniel would need extensive bug logs for that, which then are so
voluminous they cannot be handled, nor would you need to be able to
reproduce the bug on your own machines.

Not sure what the consequences of my suggestion are, just trying to
contribute...

Best regards to all!

 -Oorspronkelijk bericht-
 Van: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] Namens Uli Kunitz
 Verzonden: zaterdag 23 december 2006 0:38
 Aan: Matthieu CASTET
 CC: zd1211-devs@lists.sourceforge.net
 Onderwerp: Re: [zd1211-devs] Vendor driver v2.16.0.0
 
 
 
 Am 22.12.2006 um 23:59 schrieb Matthieu CASTET:
 
  On Fri, 22 Dec 2006 14:10:08 -0500, Daniel Drake wrote:
 
  Matthieu CASTET wrote:
  BTW if I remove usb_reset_device in zd1211rw disconnect, the
  firmware
  upload fails. This doesn't seem woorking :(
 
  That's why the reset is there. The vendor driver does it the same
  way.
 
  Yes but in case of reset/reboot disconnect is not called. So I
  failed to
  see how the firmware will recover from these cases if it is not  
  able to
  recover a missing reset in disconnect.
 
 Do you mean reset or reboot? In the reset case disconnect() will not  
 be called. In the reboot case, defined by calling reboot as root, I  
 would expect it to happen. However it shouldn't matter because the  
 host controller should cycle the power during reboot.
 
 My current assumption is, that the bug appears, if disconnect() is  
 not called and during system start the power for the device is not  
 cycled. I would like to see that proven, however I have never seen  
 the bug, because all my systems are cycling the USB power during boot.
 
 Regards,
 
 Uli
 
 --
 Uli Kunitz
 
 
 
 
 --
 ---
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the 
 chance to share your opinions on IT  business topics through 
 brief surveys - and earn cash 
 http://www.techsay.com/default.php?page=join.phpp=sourceforge
CID=DEVDEV
___
Zd1211-devs mailing list - http://zd1211.ath.cx/
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/zd1211-devs


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Zd1211-devs mailing list - http://zd1211.ath.cx/
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/zd1211-devs


Re: [zd1211-devs] Vendor driver v2.16.0.0

2006-12-23 Thread Matthieu CASTET
On Sat, 23 Dec 2006 10:10:56 +0100, Hans Dingemans wrote:

 I'm not the expert here, but wouldn't it be a good idea to make sure
 disconnect() is called on both reset and reboot (by root), and all other
 exit scenario's possible. That then would be a clean exit, not relying
 on how other components in the environment are acting?

The problem is that we can't rely in all case in a clean exit solution.
For example if you kernel panic and reboot, the kernel will reboot without
notifying the drivers. Same problem if you use the hardware reset. I am not
even certain that Linux call driver disconnect on normal reboot.

All sane device has a way (often reset) to go from an unknow state to a
know state.

The best solution should be to find a way to do the black magic for
reseting the device in probe and not in disconnect.

Matthieu


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Zd1211-devs mailing list - http://zd1211.ath.cx/
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/zd1211-devs


Re: [zd1211-devs] Vendor driver v2.16.0.0

2006-12-23 Thread Daniel Drake
Matthieu CASTET wrote:
 BTW doing the reset in probe seems to work with new firmware :
 http://castet.matthieu.free.fr/tmp/zd_reset.diff

What do you mean by 'new firmware'? Does this work on all of:
  cold plugin
  warm rmmod/insmod
  warm reboot

Daniel


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Zd1211-devs mailing list - http://zd1211.ath.cx/
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/zd1211-devs


Re: [zd1211-devs] Vendor driver v2.16.0.0

2006-12-23 Thread Matthieu CASTET
On Sat, 23 Dec 2006 09:23:47 -0500, Daniel Drake wrote:

 Matthieu CASTET wrote:
 BTW doing the reset in probe seems to work with new firmware :
 http://castet.matthieu.free.fr/tmp/zd_reset.diff
 
 What do you mean by 'new firmware'?
Firmware for 2.16.0.0

 Does this work on all of:
   cold plugin
yes
   warm rmmod/insmod
yes
   warm reboot
I don't try it yet.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Zd1211-devs mailing list - http://zd1211.ath.cx/
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/zd1211-devs


Re: [zd1211-devs] Vendor driver v2.16.0.0

2006-12-22 Thread Matthieu CASTET
On Thu, 21 Dec 2006 10:43:11 -0500, Daniel Drake wrote:

 Hi,
Hi,
 
 The ZD1211 download page has been removed from Atheros.com, but ZyDAS 
 sent me a new driver release.
 
 You can download it from:
 
 http://dsd.object4.net/zd1211-vendor/releases/
 
 Large packet support is now disabled by default due to the reboot/module 
 reload problems that the large packet firmware introduces. There are 
 some other small changes as well.
 
Great, I will try it.

BTW if I remove usb_reset_device in zd1211rw disconnect, the firmware
upload fails. This doesn't seem woorking :(

Matthieu


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Zd1211-devs mailing list - http://zd1211.ath.cx/
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/zd1211-devs


Re: [zd1211-devs] Vendor driver v2.16.0.0

2006-12-22 Thread Daniel Drake
Matthieu CASTET wrote:
 BTW if I remove usb_reset_device in zd1211rw disconnect, the firmware
 upload fails. This doesn't seem woorking :(

That's why the reset is there. The vendor driver does it the same way.

Daniel


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Zd1211-devs mailing list - http://zd1211.ath.cx/
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/zd1211-devs


Re: [zd1211-devs] Vendor driver v2.16.0.0

2006-12-22 Thread Matthieu CASTET
On Fri, 22 Dec 2006 14:10:08 -0500, Daniel Drake wrote:

 Matthieu CASTET wrote:
 BTW if I remove usb_reset_device in zd1211rw disconnect, the firmware
 upload fails. This doesn't seem woorking :(
 
 That's why the reset is there. The vendor driver does it the same way.
 
Yes but in case of reset/reboot disconnect is not called. So I failed to
see how the firmware will recover from these cases if it is not able to
recover a missing reset in disconnect.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Zd1211-devs mailing list - http://zd1211.ath.cx/
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/zd1211-devs