Bug 28506

Summary: problems with wi0 driver
Product: Base System Reporter: Alan Larson <larson>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description Alan Larson 2001-06-29 07:30:01 UTC
Using an HP Omnibook 6000, the wi0 device doesn't work.  It gets
many errors of the form:
wi0: tx buffer allocation failed
wi0: xmit failed
wi0: device timeout
sometimes also 
wi0: mgmt. buffer allocation failed

building test systems, with extra print messages in the driver,
I find that the calls to wi_alloc_nicmem are failing, returning EIO.
This comes from wi_seek in wi_alloc_nicmem, which is returning ETIMEDOUT.
This is because the CSR_READ_2 of offreg is returning WI_OFF_ERR (0x4000)
and continuing to return that, so the loop never gets a non-error reply.

Tracing back further, we find that this occurs when the value of  'id'
is 0, as returned by the read of WI_ALLOC_FID back in wi_alloc_nicmem.
If we get a 0 for id, which we apparently get when we call wi_alloc_nicmem
from wi_init, the wi_seek will fail.

I have no idea why this happens.

Bizarrely, when I first tried using this machine, I had the same problem
for several tries of loading the system, then eventually, all the parameters
got sorted out, and it worked -- until the hard disk stopped working...
(It spins, seeks, sounds fine, but won't read.)
The relaoded system now cannot talk to the wireless card.  The card
works just fine in the same system running windows 2000.  The card is
loaded with the current firmware.

PLEASE HELP.  IF I CAN'T FIX THIS, I HAVE TO USE WIN2K -- CLEARLY A
TERRIBLE FATE.

How-To-Repeat: Boot the computer, and after setting the encryption parameters
(necessary), do an ifconfig wi0 <address> .. and you will start
getting errors.  If that isn't enough, try using the interface.
Comment 1 Alan Larson 2001-06-30 00:54:48 UTC
  More on this -- I have discovered it is because the driver is unaware that
pccardd assigns it an already used irq 5.  Switching to irq 11 made it work.

  Sometimes it will work, if you have been throuh the dialog in the install
that discover the irq for pccardd and includes pccardd_flags="-i xxx" in
the /etc/rc.conf file, but it doesn't seem to tell you when it doesn't do
this, so the user is unaware of the change.

  Since it is working and I don't have to use windows all the time, this
becomes (for me) less urgent.  However, it should be fixed somehow, as a
search for this found lots of people in the mailing archives who have
gotten these errors, without a lot of answers for their problems.


	Alan
Comment 2 Jonathan Chen freebsd_committer freebsd_triage 2001-08-02 21:28:31 UTC
State Changed
From-To: open->closed

Originator reports problem goes away after correcting configuration. 

Note to originator: 
Instead of running the IRQ detection in sysinstall, you can also specify 
the IRQs usable in /etc/pccard.conf. 
An improved pccard support is currently in the works in FreeBSD-CURRENT.