Home | History | Annotate | Download | only in pci
History log of /src/sys/dev/pci/if_wi_pci.c
RevisionDateAuthorComments
 1.57  09-Dec-2018  jdolecek use pci_intr_establish_xname() everywhere
 1.56  14-Jul-2016  msaitoh branches: 1.56.16; 1.56.18;
- Use aprint*() instead of printf() in xxx_attach().
- Add missing aprint_naive("\n");
- KNF
 1.55  29-Mar-2014  christos branches: 1.55.6;
make pci_intr_string and eisa_intr_string take a buffer and a length
instead of relying in local static storage.
 1.54  30-Jan-2012  drochner branches: 1.54.6; 1.54.10;
Use pci_aprint_devinfo(9) instead of pci_devinfo+aprint_{normal,naive}
where it looks straightforward, and pci_aprint_devinfo_fancy in a few
others where drivers want to supply their own device names instead
of the pcidevs generated one. More complicated cases, where names
are composed at runtime, are left alone for now. It certainly makes
sense to simplify the drivers here rather than inventing a catch-all API.
This should serve as as example for new drivers, and also ensure
consistent output in the AB_QUIET ("boot -q") case. Also, it avoids
excessive stack usage where drivers attach child devices because the
buffer for the device name is not kept on the local stack anymore.
 1.53  26-Jul-2011  dyoung branches: 1.53.2; 1.53.6;
Replace anonymous constants, 0x10, 0x14, ..., with PCI_BAR(0),
PCI_BAR(1), .... There was no change in the generated assembly. I used
this semantic patch:

@ mapsit @
identifier bar;
expression pact;
@@

(
pci_mapreg_map
|
Cardbus_mapreg_map
)(pact, bar, ...)

@ depends on mapsit @
identifier mapsit.bar;
@@
(
- #define bar 0x10
+ #define bar PCI_BAR(0)
|
- #define bar 0x14
+ #define bar PCI_BAR(1)
|
- #define bar 0x18
+ #define bar PCI_BAR(2)
|
- #define bar 0x1C
+ #define bar PCI_BAR(3)
|
- #define bar 0x20
+ #define bar PCI_BAR(4)
)
 1.52  23-Nov-2010  christos fix typos
 1.51  23-Nov-2010  christos split if_wi
 1.50  26-Nov-2009  njoly branches: 1.50.4;
Cleanup interrupt establish error messages. Do not mix
aprint_error/aprint_normal/printf calls for a single line.
 1.49  05-Sep-2009  tsutsui Invert logic around nested pmf(9) registrations for readability.

XXX: should these pmf(9) calls be moved into MI attach functions
XXX: using function pointers for suspend and resume passed via softc?
 1.48  12-May-2009  cegger use device_private().
"looks good" ad@
XXX for the device_t/softc split, please check the driver that no cases have been missed.
 1.47  06-May-2009  cegger struct device * -> device_t, no functional changes intended.
 1.46  06-May-2009  cegger struct cfdata * -> cfdata_t, no functional changes intended.
 1.45  28-Apr-2008  martin branches: 1.45.14;
Remove clause 3 and 4 from TNF licenses
 1.44  10-Apr-2008  cegger branches: 1.44.2; 1.44.4;
use aprint_*_dev and device_xname
 1.43  09-Dec-2007  jmcneill branches: 1.43.10;
Merge jmcneill-pm branch.
 1.42  19-Oct-2007  ad branches: 1.42.4; 1.42.6;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h
 1.41  16-Nov-2006  christos branches: 1.41.8; 1.41.22; 1.41.24; 1.41.28;
__unused removal on arguments; approved by core.
 1.40  12-Oct-2006  christos - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
 1.39  24-Sep-2006  jmcneill Add "name" parameter to powerhook_establish, to aid debugging. No objections
on tech-kern@
 1.38  11-Dec-2005  christos branches: 1.38.20; 1.38.22;
merge ktrace-lwp.
 1.37  22-Jun-2005  dyoung branches: 1.37.2;
Resolve conflicts in importation of 18-May-2005 ath(4) / net80211(9)
from FreeBSD. Introduce compatibility shims (sys/dev/ic/ath_netbsd.[ch],
sys/net80211/ieee80211_netbsd.[ch]). Update drivers (an, atu, atw,
awi, ipw, iwi, rtw, wi) for the new net80211(9) API.
 1.36  27-Feb-2005  perry nuke trailing whitespace
 1.35  21-Aug-2004  thorpej branches: 1.35.4; 1.35.6;
Use ANSI function decls and make use of static.
 1.34  07-Aug-2004  mycroft Don't pass a MAC address to wi_attach() -- yet.
 1.33  17-Jul-2004  mycroft Remove special-casing of Intersil product name.
 1.32  23-Apr-2004  itojun pass string length (= boundary info) to pci_devinfo so that we do not run over
the end of memory region
 1.31  28-Mar-2004  nakayama Avoid use of wi_pci_reset when it uses other chip like PLX bridge chip.
This solves PCI bus error on sparc64 with Eumitcom WL11000P.
 1.30  14-Dec-2003  dyoung PR 23428: support National Datacomm Corporation NCP130A2 board.
Thanks T. M. Pederson for sending the patches.
 1.29  07-Dec-2003  dyoung Enable RSSI-based rate-adaptation for wi(4). This enables wi(4)-based
APs to run at "full speed" where before they ran at just 1 or 2Mb/s.
The AP will adapt the data rate for each client based on packet
losses and the received signal strength.

I have also enabled rate adaptation for STA mode and for IBSS mode,
but the hardware gives us less control over the data rate in those
modes.
 1.28  16-Nov-2003  dyoung Add data-link type DLT_IEEE802_11_RADIO to wi and atw. DLT_IEEE802_11_RADIO
lets you monitor radio stats like received signal strength, which
diversity antenna was used, channel/frequency, modulation, and data
rate.
 1.27  13-Oct-2003  dyoung Switch wi(4) to the new 802.11 layer.
 1.26  29-Sep-2003  scw Copy our pci_chipset_tag_t into wi_pci_softc instead of a pointer
to pci_attach_args. The latter is allocated on the stack during auto-
configuration and so will not be valid after that time.

It's amazing how the old code worked for so long. I guess pci_attach_args
is allocated deep in pid#0's kernel stack on most platforms.
 1.25  29-Jun-2003  fvdl branches: 1.25.2;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.24  28-Jun-2003  darrenr Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records. The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
 1.23  12-Apr-2003  christos PR/21108: Christopher SEKIYA: if_wi_pci.c rev 1.21 is incorrect for PLX-9052
 1.22  29-Mar-2003  jdc Add support for USRobotics Wireless Access PCI adapter (model 132415).
From Sergio Jimenez in PR kern/20642.
 1.21  29-Mar-2003  dyoung Support so-called "PLX" bridge for wi(4). From FreeBSD via Simon
Burge. Simon writes,

"Here's the patch that Grant and I have been using on a combinations of
architectures and both NetBSD 1.6 and -current.

"This is based on FreeBSD - look for
/* We have to do a magic PLX poke to enable interrupts */
in
http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/dev/wi/if_wi_pci.c
 1.20  28-Mar-2003  perry Fix PR/20903 for real.
Identical patches supplied by:
Masuda Hideo <h-masuda@ootani.nagata.kobe.jp>
Christopher SEKIYA <wileyc@rezrov.net>
 1.19  27-Mar-2003  perry ifdef out something dependent on PCI_VENDOR_COREGA for now.
 1.18  27-Mar-2003  perry Tell driver to accept the Corega CGWLPCIA11.
Submitted by h-masuda@ootani.nagata.kobe.jp in PR #20903
 1.17  27-Mar-2003  dyoung Introduced sc_reset to wi_softc. The bus-specific front-end gets
to fill this.
 1.16  02-Jan-2003  dyoung Since the I/O and memory enable bits are written to the PCI CSR by
the PCI bus code, and because wi(4) does not use bus-mastering, we
may entirely skip writing the PCI CSR.
 1.15  01-Jan-2003  dyoung For confidence's sake, enable I/O and memory accesses (which were
previously NOT enabled), but do not enable bus-mastering (which
was previously enabled, but which neither Lucent nor Prism support).
 1.14  31-Dec-2002  dyoung Per discussion in PR 18794, fix PCI resets. Alas, this does not
seem to fix PR 18794.
 1.13  21-Oct-2002  soren WI_PCI_CBMA belongs in dev/pci.
 1.12  02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.11  30-Sep-2002  thorpej Use CFATTACH_DECL().
 1.10  30-Sep-2002  onoe Nuke unneeded member sc_ifp and use #define sc_if instead,
to prepare jumbo commit for wi.c
 1.9  27-Sep-2002  thorpej Declare all cfattach structures const.
 1.8  23-Sep-2002  thorpej Make the PCI reset more robust. From David Young <dyoung@ojctech.com>.
 1.7  04-Apr-2002  jdolecek branches: 1.7.4;
move wi_pci_reset() from ic/wi.c to pci/if_wi_pci.c, where is belongs
 1.6  04-Apr-2002  jdolecek fix sligh confusion on whether or not to supply dv_xname to printf() in
error cases of attach
Noticed in kern/16197 by George E Sollish.
 1.5  15-Jan-2002  augustss Note to self: set variable before using it.
 1.4  13-Jan-2002  augustss Cosmetic error message fix.
 1.3  13-Jan-2002  augustss Add code to handle PCMCIA cards placed on a PCI card with the PLX chip.
From OpenBSD and FreeBSD.
 1.2  13-Nov-2001  lukem branches: 1.2.2;
add RCSID
 1.1  13-Oct-2001  ichiro branches: 1.1.2;
Add Intersil Prism2.5 Mini-PCI wavelan.
 1.1.2.10  03-Jan-2003  thorpej Sync with HEAD.
 1.1.2.9  11-Nov-2002  nathanw Catch up to -current
 1.1.2.8  18-Oct-2002  nathanw Catch up to -current.
 1.1.2.7  05-Oct-2002  gmcgarry Remove CVS conflicts.
 1.1.2.6  23-Sep-2002  thorpej Sync with HEAD.
 1.1.2.5  17-Apr-2002  nathanw Catch up to -current.
 1.1.2.4  28-Feb-2002  nathanw Catch up to -current.
 1.1.2.3  14-Nov-2001  nathanw Catch up to -current.
 1.1.2.2  22-Oct-2001  nathanw Catch up to -current.
 1.1.2.1  13-Oct-2001  nathanw file if_wi_pci.c was added on branch nathanw_sa on 2001-10-22 20:41:24 +0000
 1.2.2.5  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.2.2.4  23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.2.3  11-Feb-2002  jdolecek Sync w/ -current.
 1.2.2.2  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.2.1  13-Nov-2001  thorpej file if_wi_pci.c was added on branch kqueue on 2002-01-10 19:56:47 +0000
 1.7.4.1  28-Jul-2003  he Pull up revisions 1.21,1.23 (via patch, requested by grant in ticket #1281):
Support the so-called ``PLX'' bridge for wi(4).
 1.25.2.8  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.25.2.7  04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.25.2.6  21-Sep-2004  skrll Fix the sync with head I botched.
 1.25.2.5  18-Sep-2004  skrll Sync with HEAD.
 1.25.2.4  25-Aug-2004  skrll Sync with HEAD.
 1.25.2.3  12-Aug-2004  skrll Sync with HEAD.
 1.25.2.2  03-Aug-2004  skrll Sync with HEAD
 1.25.2.1  02-Jul-2003  darrenr Apply the aborted ktrace-lwp changes to a specific branch. This is just for
others to review, I'm concerned that patch fuziness may have resulted in some
errant code being generated but I'll look at that later by comparing the diff
from the base to the branch with the file I attempt to apply to it. This will,
at the very least, put the changes in a better context for others to review
them and attempt to tinker with removing passing of 'struct lwp' through
the kernel.
 1.35.6.1  19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.35.4.1  29-Apr-2005  kent sync with -current
 1.37.2.3  21-Jan-2008  yamt sync with head
 1.37.2.2  27-Oct-2007  yamt sync with head.
 1.37.2.1  30-Dec-2006  yamt sync with head.
 1.38.22.2  10-Dec-2006  yamt sync with head.
 1.38.22.1  22-Oct-2006  yamt sync with head
 1.38.20.1  18-Nov-2006  ad Sync with head.
 1.41.28.1  25-Oct-2007  bouyer Sync with HEAD.
 1.41.24.2  09-Jan-2008  matt sync with HEAD
 1.41.24.1  06-Nov-2007  matt sync with HEAD
 1.41.22.5  08-Dec-2007  jmcneill Rename pnp(9) -> pmf(9), as requested by many.
 1.41.22.4  06-Nov-2007  joerg Refactor PNP API:
- Make suspend/resume directly a device functionality. It consists of
three layers (class logic, device logic, bus logic), all of them being
optional. This replaces D0/D3 transitions.
- device_is_active returns true if the device was not disabled and was
not suspended (even partially), device_is_enabled returns true if the
device was enabled.
- Change pnp_global_transition into pnp_system_suspend and
pnp_system_resume. Before running any suspend/resume handlers, check
that all currently attached devices support power management and bail
out otherwise. The latter is not done for the shutdown/panic case.
- Make the former bus-specific generic network handlers a class handler.
- Make PNP message like volume up/down/toogle PNP events. Each device
can register what events they are interested in and whether the handler
should be global or not.
- Introduce device_active API for devices to mark themselve in use from
either the system or the device. Use this to implement the idle handling
for audio and input devices. This is intended to replace most ad-hoc
watchdogs as well.
- Fix somes situations in which audio resume would lose mixer settings.
- Make USB host controllers better deal with suspend in the light of
shared interrupts.
- Flush filesystem cache on suspend.
- Flush disk caches on suspend. Put ATA disks into standby on suspend as
well.
- Adopt drivers to use the new PNP API.
- Fix a critical bug in the generic cardbus layer that made D0->D3
break.
- Fix ral(4) to set if_stop.
- Convert cbb(4) to the new PNP API.
- Apply the PCI Express SCI fix on resume again.
 1.41.22.3  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.41.22.2  01-Oct-2007  joerg Extend device API by device_power_private and device_power_set_private.
The latter is a temporary mean until the pnp_register API itself is
overhault. This functions allow a generic power handler to store its
state independent of the driver.

Use this and revamp the PCI power handling. Pretty much all PCI devices
had power handlers that did the same thing, generalize this in
pci_generic_power_register/deregister and the handler. This interface
offers callbacks for the drivers to save and restore state on
transistions. After a long discussion with jmcneill@ it was considered
to be powerful enough until evidence is shown that devices can handle
D1/D2 with less code and higher speed than without the full
save/restore. The generic code is carefully written to handle device
without PCI-PM support and ensure that the correct registers are written
to when D3 loses all state.

Reimplement the generic PCI network device handling on
top of PCI generic power handling.

Introduce pci_disable_retry as used and implemented locally at least by
ath(4) and iwi(4). Use it in this drivers to restore behaviour from
before the introduction of generic PCI network handling.

Convert all PCI drivers that were using pnp_register to the new
framework. The only exception is vga(4) as it is commonly used as
console device. Add a note therein that this should be fixed later.
 1.41.22.1  04-Sep-2007  joerg Convert wi(4) to jmcneill-pm style power management.
 1.41.8.1  23-Oct-2007  ad Sync with head.
 1.42.6.1  11-Dec-2007  yamt sync with head.
 1.42.4.1  26-Dec-2007  ad Sync with head.
 1.43.10.1  02-Jun-2008  mjf Sync with HEAD.
 1.44.4.4  11-Mar-2010  yamt sync with head
 1.44.4.3  16-Sep-2009  yamt sync with head
 1.44.4.2  16-May-2009  yamt sync with head
 1.44.4.1  16-May-2008  yamt sync with head.
 1.44.2.1  18-May-2008  yamt sync with head.
 1.45.14.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.50.4.1  05-Mar-2011  rmind sync with head
 1.53.6.1  18-Feb-2012  mrg merge to -current.
 1.53.2.2  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.53.2.1  17-Apr-2012  yamt sync with head
 1.54.10.1  18-May-2014  rmind sync with head
 1.54.6.2  03-Dec-2017  jdolecek update from HEAD
 1.54.6.1  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.55.6.1  05-Oct-2016  skrll Sync with HEAD
 1.56.18.1  10-Jun-2019  christos Sync with HEAD
 1.56.16.1  26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts

RSS XML Feed