Subject: Re: cardbus fwohci detach
To: Ichiro Fukuhara <ichiro@netbsd.org>
From: Love <lha@stacken.kth.se>
List: current-users
Date: 12/30/2001 18:59:14
Love <lha@stacken.kth.se> writes:

> > Modified Files:
> > 	syssrc/sys/dev/cardbus: fwohci_cardbus.c
> > 	syssrc/sys/dev/ieee1394: fwohci.c fwohcivar.h
> > 
> > Log Message:
> > implement fwohci detach routine.
> 
> But this doesn't free all resources ?

Follow-up to myself.

The patch contains a little more then just to get my
SIIG cardbus OHCI/VIATECH VT6306 card to work.

The extras is a chardev that you can use to extract some info from the
fwochi device. Its not really ready for including. Its in there since
it partly got included in the patch. I want to extract the all the
nodes on the bus, the speed, power map, etc to a userland tool.

The things from the patch you want to keep is:

- Wait on LPS and LinkEnable, remove duplicate LPS enable (I removed
  the first one). This is little verbose, and its probably as the
  linux driver claims for the viatech chip, its just turns LPS on.
  
  This is somewhat bogus since it doesn't improve the sitution.

- Improved detach, now it no longer crashes, there was waiting events
  in the at queue that needed to be killed. I modified
  fwohci_at_done() so it can avoid to write to the extracted hardware.

- A gross hack that waits a second before doing the busreset. Now,
  this is wrong, waiting 2 seconds make it never work and wait shorter
  make it work somewhat more, but not if you wait shorter then 1/2
  second. It most be something else that should be done, I just don't
  know what.

This at least make me able to attach to the SBP2 disk I have in 1 of 4
tries. w/o the patch I crash and burn.

The diff is to the fwochi/cardbus stuff before Ichiro patch.

Love

http://www.e.kth.se/~lha/patches/netbsd/fw-ohci-cardbus2