Home | History | Annotate | Download | only in cardbus
History log of /src/sys/dev/cardbus/ahc_cardbus.c
RevisionDateAuthorComments
 1.38  10-Nov-2019  chs in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAIT
and remove code to handle failures that can no longer happen.
 1.37  02-Apr-2018  rin branches: 1.37.2;
Remove extra printf duplicate with MI codes.
 1.36  14-Jul-2016  msaitoh branches: 1.36.16;
- Use aprint*() instead of printf() in xxx_attach().
- Add missing aprint_naive("\n");
- KNF
 1.35  01-Aug-2011  drochner branches: 1.35.12; 1.35.30;
remove some bloat:
-cardbus doesn't use multiple interrupt lines like PCI, and it doesn't
use machanisms like interrupt line register and swizzling -- no need
to carry around dummy information, this is all dealt with by the
bridge
(I'm asking myself how "rbus_ppb" can work -- a bridge attached to
cardbus just can't work like a normal PCI bridge as far as interrupts
are concerned. I thing that should be a hardware specific driver
because behavior is not covered by a standard.)
-cardbus always uses 3.3V -- no need for a variable to keep track
of the voltage
 1.34  18-Mar-2010  dyoung This is *always* compiled with #define rbus 1, so get rid of the
conditional compilation.

Simplify interrupt (dis)establishment by two source transformations:

- cardbus_intr_disestablish(cc, cf, ih);
+ Cardbus_intr_disestablish(ct, ih);

- ih = cardbus_intr_establish(cc, cf, ...);
+ ih = Cardbus_intr_establish(ct, ...);

The identical change to a few other CardBus NICs has not caused any
problems, as expected, so I'm going to commit this rather safe change
and get on with the work.

Testers have been enlisted. I will revisit this change if I get any
negative responses.
 1.33  26-Feb-2010  dyoung branches: 1.33.2;
Use PCI_ constants and macros instead of CARDBUS_. Use
Cardbus_conf_{read,write}() instead of cardbus_conf_{read,write}().
Delete all of the CARDBUS_ constants and macros that replicate PCI_.

Compile-tested, only.
 1.32  26-Feb-2010  dyoung sc_csr is read & written from the PCI Command & Status Register,
so make its type pcireg_t.
 1.31  25-Feb-2010  dyoung Make fxp at cardbus detach during shutdown.

Stop calling (*cardbus_ctrl) to enable bus mastering, I/O and memory
spaces on the CardBus bridge. cbb(4) always enables that stuff,
anyway. In the process, avoid remembering what BAR we mapped by
writing CARDBUS_{IO,MEM}_ENABLE to sc_cben or sc_cbenable, and
record the BAR in use sc_bar, instead.

Replace more CARDBUS_ constants with PCI_ constants.

Compile-tested, only.
 1.30  24-Feb-2010  dyoung Start to tuck Cardbus under the PCI abstraction. Step #1, textual
substitution: for all practical purposes, pcitag_t and cardbustag_t
are interchangeable, so just use pcitag_t. Ditto pcireg_t and
cardbusreg_t.

While I'm here, don't make a copy (sc_intrline) of
cardbus_attach_args.ca_intrline unless we use it, later.
 1.29  12-Nov-2009  dyoung branches: 1.29.2;
Remove superfluous activation hook.
 1.28  16-May-2009  tsutsui Make ahc_detach() take struct ahc_softc * as well as ahc_attach()
and remove bogus casts around ahc_detach().

XXX: There is a pmf_device_deregister(9) call in ahc_detach()
XXX: while there is no pmf_device_register(9) in ahc_attach().
XXX: It looks more pmf(9) stuff is required for cardbus detach.
 1.27  05-May-2009  cegger device_t/softc split
 1.26  14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.25  24-Jun-2008  drochner branches: 1.25.4; 1.25.10;
clean up the cardbus interrupt stuff:
There were cardbus_intr_line_t and cardbus_intr_handle_t used intermixed
for the same variable, and that variable is pretty much useless because
cardbus doesn't follow the PCI interrupt swizzling etc scheme.
Useless interrupt numbers were printed on cardbus device attach.
So as a first step to sanity, kill cardbus_intr_handle_t and poison
cardbus_intr_line_t to discourage printing it as a %d.
Use cardbus_intr_line_t consistently throughout the code.
Remove the "interrupting at foo" messages because the information
is misleading. We could come up with a better interrupt vector
information, but because cardbus interrupts are mediated by pccbb
it would still be misleading.
 1.24  28-Apr-2008  martin branches: 1.24.2; 1.24.4;
Remove clause 3 and 4 from TNF licenses
 1.23  18-Feb-2008  dyoung branches: 1.23.6; 1.23.8; 1.23.10;
Use device_xname().
 1.22  19-Oct-2007  ad branches: 1.22.2;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h
 1.21  16-Nov-2006  christos branches: 1.21.8; 1.21.22; 1.21.24; 1.21.28;
__unused removal on arguments; approved by core.
 1.20  12-Oct-2006  christos - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
 1.19  29-Mar-2006  thorpej branches: 1.19.8; 1.19.10;
Use device_private().
 1.18  11-Dec-2005  christos branches: 1.18.4; 1.18.6; 1.18.8; 1.18.10; 1.18.12;
merge ktrace-lwp.
 1.17  12-May-2005  augustss branches: 1.17.2;
Make the Adaptec 1480 cardbus Slim SCSI card work.
From a person wishing to remain anonymous.
 1.16  27-Feb-2005  perry nuke trailing whitespace
 1.15  04-Feb-2005  perry de-__P
 1.14  02-Aug-2004  mycroft branches: 1.14.4; 1.14.6;
cardbusdevs -> pcidevs
 1.13  19-Jan-2004  jdolecek adapt to latest ahc(4) changes, so that this wouldn't panic kernel on boot
problem reported by Hilmar Both on current-users
 1.12  20-Apr-2003  fvdl branches: 1.12.2;
Initialize name and dma tag.
 1.11  20-Apr-2003  fvdl Call ahc_softc_init in attach function.
 1.10  19-Apr-2003  fvdl Fix this to compile with the new driver. Needs testing.
 1.9  02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.8  30-Sep-2002  thorpej Use CFATTACH_DECL().
 1.7  27-Sep-2002  thorpej Declare all cfattach structures const.
 1.6  16-Jan-2002  ichiro add detach/activate routine
 1.5  13-Nov-2001  lukem add RCSID
 1.4  29-Sep-2001  yamt fix wrong ca_devsize.
 1.3  16-Mar-2000  enami branches: 1.3.6; 1.3.8; 1.3.10; 1.3.12;
Make this file just compiles again.
XXX Don't expect to work yet. It fails even to link depending on your
XXX kernel config file.
 1.2  15-Mar-2000  fvdl Update cardbus frontend for new ahc driver.
 1.1  26-Jan-2000  thorpej First attempt at a CardBus front-end for the `ahc' driver. This will
support the Adaptec ADP-1480 CardBus SCSI cards, which are a stright
AIC-7860 implementation.
 1.3.12.1  01-Oct-2001  fvdl Catch up with -current.
 1.3.10.3  10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.3.10.2  11-Feb-2002  jdolecek Sync w/ -current.
 1.3.10.1  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.3.8.4  18-Oct-2002  nathanw Catch up to -current.
 1.3.8.3  28-Feb-2002  nathanw Catch up to -current.
 1.3.8.2  14-Nov-2001  nathanw Catch up to -current.
 1.3.8.1  08-Oct-2001  nathanw Catch up to -current.
 1.3.6.2  20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.3.6.1  16-Mar-2000  bouyer file ahc_cardbus.c was added on branch thorpej_scsipi on 2000-11-20 11:39:52 +0000
 1.12.2.6  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.12.2.5  04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.12.2.4  04-Feb-2005  skrll Sync with HEAD.
 1.12.2.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.12.2.2  18-Sep-2004  skrll Sync with HEAD.
 1.12.2.1  03-Aug-2004  skrll Sync with HEAD
 1.14.6.2  19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.14.6.1  12-Feb-2005  yamt sync with head.
 1.14.4.1  29-Apr-2005  kent sync with -current
 1.17.2.4  27-Feb-2008  yamt sync with head.
 1.17.2.3  27-Oct-2007  yamt sync with head.
 1.17.2.2  30-Dec-2006  yamt sync with head.
 1.17.2.1  21-Jun-2006  yamt sync with head.
 1.18.12.1  31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.18.10.1  19-Apr-2006  elad sync with head.
 1.18.8.1  01-Apr-2006  yamt sync with head.
 1.18.6.1  22-Apr-2006  simonb Sync with head.
 1.18.4.1  09-Sep-2006  rpaulo sync with head
 1.19.10.2  10-Dec-2006  yamt sync with head.
 1.19.10.1  22-Oct-2006  yamt sync with head
 1.19.8.1  18-Nov-2006  ad Sync with head.
 1.21.28.1  25-Oct-2007  bouyer Sync with HEAD.
 1.21.24.2  23-Mar-2008  matt sync with HEAD
 1.21.24.1  06-Nov-2007  matt sync with HEAD
 1.21.22.1  26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.21.8.1  23-Oct-2007  ad Sync with head.
 1.22.2.1  18-Feb-2008  mjf Sync with HEAD.
 1.23.10.5  11-Aug-2010  yamt sync with head.
 1.23.10.4  11-Mar-2010  yamt sync with head
 1.23.10.3  16-May-2009  yamt sync with head
 1.23.10.2  04-May-2009  yamt sync with head.
 1.23.10.1  16-May-2008  yamt sync with head.
 1.23.8.1  18-May-2008  yamt sync with head.
 1.23.6.2  29-Jun-2008  mjf Sync with HEAD.
 1.23.6.1  02-Jun-2008  mjf Sync with HEAD.
 1.24.4.1  27-Jun-2008  simonb Sync with head.
 1.24.2.1  18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.25.10.2  23-Jul-2009  jym Sync with HEAD.
 1.25.10.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.25.4.1  28-Apr-2009  skrll Sync with HEAD.
 1.29.2.1  30-Apr-2010  uebayasi Sync with HEAD.
 1.33.2.1  30-May-2010  rmind sync with head
 1.35.30.1  05-Oct-2016  skrll Sync with HEAD
 1.35.12.1  03-Dec-2017  jdolecek update from HEAD
 1.36.16.1  07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.37.2.1  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411

RSS XML Feed