Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Jan 2001 14:02:30 -0500
From:      Jonathan Chen <jon@spock.org>
To:        freebsd-mobile@freebsd.org
Cc:        imp@freebsd.org, gibbs@scsiguy.com
Subject:   NEWCARD update
Message-ID:  <20010106140230.A48327@spock.org>

next in thread | raw e-mail | index | archive | help
I just committed a bunch of NEWCARD fixes/improvements, cvs log included
below:

  Modified files:
    sys/dev/cardbus      cardbus.c cardbus_cis.c cardbus_cis.h 
    sys/dev/pccard       card_if.m pccard.c pccardvar.h 
    sys/dev/pccbb        pccbb.c pccbbvar.h 
  Log:
  * Better kld support in pccbb/cardbus
    - pccbb no longer needs to remember whether a card is inserted.
    - pccbb reissues insertion on load of cardbus/pccard modules.
    - got rid of unnecessary delays in power functions.
    - Cardbus children are no longer deleted if probe/attach fails.
    - non-attached child devices are reprobed at driver_added.
  
  * CARD interface to read CIS
    - added card_cis_read/card_cis_free interface to read arbitrary CIS
      data.  This currently is only implemented in cardbus.
  
  * pccbb/pccard begins to work
    - pccard can now use higher memory space (and uses it by default).
    - set_memory_offset interface changed.
    - fixed ccr access, which was broken at multiple locations.
    - implement an interrupt handler - pccard can now share interrupts.
    - resource alloc/release/activate/deactivate functions gutted: some
      resources are allocated by the bridge before the child device is
      probed or attached.  Thus the resource "belongs" to the bridge, and
      the pccard_*_resource functions need to fudge the owner/rid.
    - changed some error conditions to panics to speed debugging.
  
  * Mutex fix - Giant is entered at the beginning of thread
  
[end cvs log]

I probably broke a thing or two while doing these fixes.  As I don't have
any pccard/cardbus references with me currently, some of the methods I used
might be wrong as well.  Those with time on their hands are invited to dig
through the code to find my screwups...

At this point, what remains to be looked at:
 - pccard bus code needs cleanup/improvements.  There's a bunch of
   unnecessary artifacts leftover from the NetBSD port.  I've gotten a
   16-bit modem card to probe, attach and dial, but I haven't tried
   anything else and make no warrantee whatsoever.  Removal of 16-bit cards
   or unload of 16-bit card related modules are likely to make Bad Things
   happen.
 - interface to determine existence of card need to be implemented.
 - I could use some feedback on whether my implementation of
   card_cis_read/free is a good way to go about this.  I decided to
   implement this in the style of device_get_children as it seemed to me
   that this is a good balance between ease of use and being generic
   enough.  Comments?
 - pccard children currently shares irq lines.  It appears to work for my
   laptop, but is this good/correct for pci based pccbb bridges?  What
   about ISA based pcic bridges?
 - pccbb bridge probably don't need a mutex at all -- I still need to think
   this one through.

Justin Gibbs also has some nice improvements that might be committed soon,
[Justin - apologies if my changes walked in areas you were working on], and
Warner has been doing some infrastructure work cleaning up and organizing
my messy code.  On the whole though, it seems that newcard development is
chugging nicely along...



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-mobile" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010106140230.A48327>