the BAR after parsing the CIS. This forces the resource range to be
reallocated if the BAR is reused by the device.
Submitted by: deischen
Reviewed by: imp
Approved by: re (kib)
o Consider No CIS a normal event and stop whining about it so much
(too many cards are like this, espeically usb/firewire cards).
o Add comments to the cis reading code.
o Made the read from config space a smidge easier to read and eliminate
a loop that can be done mathematically.
the recent changes to track BAR state explicitly. The code would now
attempt to add the same BAR twice in this case. Instead, change this so
that it recognizes this case and only adds it once and do not delete the
BAR outright after parsing the CIS.
Tested by: bschmidt
stored in a BAR since the CIS BAR is mapped before the PCI bus driver
enumerates all the BARs. Without this change, the PCI bus driver would
attempt to initialize a BAR that was already allocated resulting in a panic.
handling for the PCIR_BIOS decoding enable bit from the cardbus driver.
The PCIR_BIOS BAR does include type bits like other BARs. Instead, it is
always a 32-bit non-prefetchable memory BAR where the low bit is used as a
flag to enable decoding.
Reviewed by: imp
read before we configure the card, so we can implement
/dev/cardbus*.cis. Also, do this on a per-child basis, so we now have
a different name than before. I think i'll have to fix that for some
legacy tools to keep working.
I can now do a dumpcis on my running atheros card and have it still work!
redundant malloc/free. Add comments about how this should really be
done. Fix an overly verbose comment about under 1MB mapping: go ahead
and set the bits, but we ignore them.
allocating resources to read the CIS. I'm not sure when this changed,
but it is totally wrong. Also, add a minor improvement to the
debugging.
This should help everybody trying to run dumpcis on atheros wireless
card as well.
MFC after: 2 days
allocating a resource that's in the card itself.
Remove more now-redundant resource_list_add, and now-redunant code
that lives in the pci layer.
# This fixes the atheros card that I have which had its CIS in one of
# the BARs. Don't know yet if this fixes the amd64 issues reported.
They have nothing at all to do with CIS parsing.
Remove some unused funce parsing: nothing used the results.
Use more of pccard_cis.h's deifnitions for the cardbus specific cis
parsing we do. More work is needed in this area.
This reduces the size of the cardbus module by 380 bytes or so...
o minor optimization of cardbus_cis processing. Remove a bunch of generic
entries that are handled by generic.
o no longer need the card_get_type stuff.
set on realtek cards, but they work without it (and don't work with
it). The standard seems to imply that this is just a hint anyway, so
this should be harmless. It doesn't appear to be set on any other
cardbus cards that I have (or have seen).
This should make the rl based CardBus cards work again. I've been
running it for about a month now.
Approved by: re@ (jhb)
Minor CIS resource allocation code cleanup
Remove some fairly useless debug writes.
This finishes the work to move as much cardbus code as possible into
pci. We wind up removing 800-odd lines from cardbus.c: we go from
1285 to 400 lines.
Reviewed by: mdodd
is encoded in the PCI BAR. The latter is more reliable.
This allows the sio/modem function of the Xircom RealPort ethernet+modem
card to work. Note that there still seem to be issues with sio_pci not
releasing resources on detach.
Kill the slightly bogus #define for DECODE_PROTOTYPE
Be less verbose. Hide most (all I hope) of the CIS
parsing behind cardbus_debug_cis (which is set with
hw.cardbus.debug_cis=1).
This doesn't fix problems with parsing, but should make cardbus
less chatty. There appears to be some issues still with the
parsing of the CIS, but this won't fix them.
Prompted by: scottl
sometimes, so return it when requested and it does. Also a little
more infrastructure for a few other things.
Submitted by: sam
Approved by: re (blanket for NEWCARD)
bit in the PCI command register for the device. Otherwise, device drivers
that look at this register to see which types of BARs are usable will think
that none of them are.
This allows my Adaptec 1480A cardbus card to finally work.
Reviewed by: imp