Port-sparc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

ts102 (tadpole controller) bug

While trying to get a tadpole (SparcBook 3GS) working (NetBSD 4.0.1,
NETBSD 5.0.1 crashed at startup during install), I had a lot of trouble
with getting a Cisco Aironet 350 wireless card to work.  The 350 worked
in other places (laptops running Windows and Linux) and the Tadpole
recognized other cards on insertion, but when you put the 350 in, it
would report a corrupt CIS (all CISTPL_NONE) and wouldn't start.  After
turning on some more debugging, I found that the card was returning a
status code 0x8a21, which I parsed as "active, level-triggered
interrupts, battery low(?!?), card present."  I went poking around in a
few places, and ended up finding the following bit of code in the
Tadpole TS102 code (/usr/src/sys/arch/sparc/dev/ts102.c):

         * wait 100ms until power raise (Tpr) and 20ms to become
         * stable (Tsu(Vcc)).
        DELAY((100 + 20) * 1000);

        status &= ~TS102_CARD_STS_VPP1_MASK;
        status |= TS102_CARD_STS_VPP1_VCC;
        TSLOT_WRITE(td, TS102_REG_CARD_A_STS, status);

(This code appears unchanged in 5.0.1, so I do not believe this problem
has been addressed.)

TS102_CARD_STS_VPP1_VCC sets the voltage bit for the slot.  Setting it
to 1 forces the slot to 3.3v.  The status before initialization showed
up as 0x201, which meant it was 5v before initialization.  So I removed
the TS102_CARD_STS_VPP1_VCC line to leave the power bit alone, and sure
enough, the Aironet 350 came right up.

What I don't know is: should this line be removed entirely, and the card
voltage will be read from the card on instertion and left alone?  Or are
status registers on cards not trustworthy before initialization, and
leaving this will cause the Tadpole to set lower voltage devices on
fire?  Alternately, should the wait-for-unbusy loop check the power bit
and crank it up if the card complains about low power, or is the
Aironet's use of the "battery low" bit nonstandard? 


Home | Main Index | Thread Index | Old Index