Home | History | Annotate | Download | only in pci
History log of /src/sys/dev/pci/if_gem_pci.c
RevisionDateAuthorComments
 1.55  15-Feb-2025  hannken Use "int" format for constant "GEM_TMP_BUFSIZE - 1".

Kernel ALL/amd64 builds again.
 1.54  13-Feb-2025  joe use the right buffer size for shared pin check and debug

avoid the use of sizeof(pointer) and use the Temp BUF limit
 1.53  13-Feb-2025  joe fix: wrong size of buffer limit used when reading through the pci bus

use the GEM_TMP_BUFSIZE rather than the sizeof pointer
 1.52  02-Jul-2020  msaitoh branches: 1.52.20; 1.52.26;
prop_data_data_nocopy -> prop_data_value
 1.51  30-May-2020  thorpej gem_pci_attach(): avoid allocating a 2K buffer on the stack.
 1.50  02-Mar-2020  msaitoh KNF. No functional change.
 1.49  01-Mar-2020  thorpej Use the 64-bit PCI DMA tag if available.
 1.48  09-Dec-2018  jdolecek use pci_intr_establish_xname() everywhere
 1.47  29-Mar-2014  christos branches: 1.47.28; 1.47.30;
make pci_intr_string and eisa_intr_string take a buffer and a length
instead of relying in local static storage.
 1.46  30-Mar-2013  christos branches: 1.46.4;
remove trailing whitespace
 1.45  23-Sep-2012  chs fix a debug printf.
 1.44  30-Jan-2012  drochner branches: 1.44.6;
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.43  13-Nov-2010  uebayasi branches: 1.43.8; 1.43.12;
Don't pull in the whole uvm(9) API to access only PAGE_SIZE and
some other constants. These are provided by sys/param.h now.
 1.42  24-Feb-2010  dyoung branches: 1.42.2;
A pointer typedef entails trading too much flexibility to declare const
and non-const types, and the kernel uses both const and non-const
PMF qualifiers and device suspensors, so change the pmf_qual_t and
device_suspensor_t typedefs from "pointers to const" to non-pointer,
non-const types.
 1.41  21-Jan-2010  macallan branches: 1.41.2;
get rid of architecture-specific firmware calls to determine the MAC address
on sparc(64) and macppc - use device properties instead
tested by myself on macppc and martin on sparc64
 1.40  19-Jan-2010  pooka Redefine bpf linkage through an always present op vector, i.e.
#if NBPFILTER is no longer required in the client. This change
doesn't yet add support for loading bpf as a module, since drivers
can register before bpf is attached. However, callers of bpf can
now be modularized.

Dynamically loadable bpf could probably be done fairly easily with
coordination from the stub driver and the real driver by registering
attachments in the stub before the real driver is loaded and doing
a handoff. ... and I'm not going to ponder the depths of unload
here.

Tested with i386/MONOLITHIC, modified MONOLITHIC without bpf and rump.
 1.39  08-Jan-2010  dyoung Expand PMF_FN_* macros.
 1.38  26-Nov-2009  njoly Cleanup interrupt establish error messages. Do not mix
aprint_error/aprint_normal/printf calls for a single line.
 1.37  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.36  27-Jul-2009  dyoung Do a complete device_t/softc split for the PCI attachment. I have
not finished the device_t/softc split for the SBus attachment
because I don't have an SBus gem(4) to test with.

Convert from legacy shutdownhooks to a PMF shutdown hook. Add PMF
suspend/resume handlers.

Factor a detachment hook out of gem_attach(). During device
attachment, track which resources are reserved in sc_attach_state,
and release only those resources during detachment.

Tested on gem0 and gem1 at pci1 on a Sun Fire V120.
 1.35  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.34  06-May-2009  cegger struct device * -> device_t, no functional changes intended.
 1.33  06-May-2009  cegger struct cfdata * -> cfdata_t, no functional changes intended.
 1.32  14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.31  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.30  25-May-2008  chs branches: 1.30.6; 1.30.12;
recognize the variant found in the last model of powermac G5.
 1.29  10-Apr-2008  cegger branches: 1.29.2; 1.29.4; 1.29.6;
use aprint_*_dev and device_xname
 1.28  04-Apr-2008  martin Make this compile w/o GEM_DEBUG on non-sparc systems
 1.27  01-Feb-2008  jdc branches: 1.27.6;
Set the chip revision in the softc.
 1.26  19-Jan-2008  aymeric recognize (again) the Intrepid 2 gem adapter in the Powerbook5,8
 1.25  05-Jan-2008  jdc Add support for Sun PCI X1141A (SX fibre) cards.
Add support for GEM cards on non-OFW machines.
 1.24  19-Oct-2007  ad branches: 1.24.2; 1.24.8;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h
 1.23  25-Jun-2007  aymeric branches: 1.23.6; 1.23.8; 1.23.12;
Recognize the Intrepid2 gem. Needed at least on the last PowerBook G4.
 1.22  24-Nov-2006  martin branches: 1.22.2; 1.22.8; 1.22.10; 1.22.16;
In preparation for gem @ sbus: split the GEM registers into two halfs
and provide a bus_space_handle_t for each. While there, fix a typo
in gem_bitwait().
 1.21  05-Aug-2006  sanjayl branches: 1.21.4; 1.21.6;
1st cut of Powermac G5 support (uses bridge mode).
 1.20  11-Dec-2005  christos branches: 1.20.4; 1.20.8;
merge ktrace-lwp.
 1.19  27-Feb-2005  perry branches: 1.19.4;
nuke trailing whitespace
 1.18  04-Feb-2005  perry de-__P
 1.17  17-Oct-2004  heas branches: 1.17.4; 1.17.6;
Adjust/add a few comments and add defines for PCS (aka GEM_MII) FSM and
interrupt registers.
drop some trailing WS.

no functional changes.
 1.16  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.15  17-Mar-2004  martin For sparc*: myetheraddr is no more
 1.14  31-Jan-2003  thorpej branches: 1.14.2;
Use aprint_*().
 1.13  02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.12  30-Sep-2002  thorpej Use CFATTACH_DECL().
 1.11  27-Sep-2002  thorpej Declare all cfattach structures const.
 1.10  09-Jul-2002  matt Match Apple GMAC id #3.
 1.9  21-May-2002  matt branches: 1.9.2;
Add code to distinguish between apple and sun gem cores.
 1.8  13-Nov-2001  lukem branches: 1.8.2; 1.8.10;
add RCSID
 1.7  18-Oct-2001  thorpej Remove more cruft left over from copying bits of other drivers.
 1.6  18-Oct-2001  thorpej Remove some more stuff left over from copying bits of the HME driver.
 1.5  18-Oct-2001  thorpej Remove some unneeded stuff from the gem_pci_softc.
 1.4  18-Oct-2001  thorpej Add goo to fetch the MAC address from OpenFirmware on the macppc
port. Copied from the macppc "gmac" driver, but otherwise untested.
 1.3  18-Oct-2001  thorpej - The GEM registers are always memory type registers. Don't use a
broken hueristic to determine memory vs. i/o (one should never make
an assumption that the bus_space_tag_t is a pointer, as this code
did).
- Fix the "can't map registers" error message.
- Garbage-collect some code that is not relevant to the GEM (which
was already #if 0'd out).
- Cluster all the SPARC-specific code into one place (will be
replaced with Properties once that is fleshed out).
 1.2  24-Sep-2001  eeh branches: 1.2.2;
Print out device details.
 1.1  16-Sep-2001  eeh branches: 1.1.2;
Driver for Sun GEM gigabit ethernet, Sun ERI 10/100, and Apple GMAC.
 1.1.2.8  18-Oct-2002  nathanw Catch up to -current.
 1.1.2.7  01-Aug-2002  nathanw Catch up to -current.
 1.1.2.6  20-Jun-2002  nathanw Catch up to -current.
 1.1.2.5  14-Nov-2001  nathanw Catch up to -current.
 1.1.2.4  22-Oct-2001  nathanw Catch up to -current.
 1.1.2.3  26-Sep-2001  nathanw Catch up to -current.
Again.
 1.1.2.2  21-Sep-2001  nathanw Catch up to -current.
 1.1.2.1  16-Sep-2001  nathanw file if_gem_pci.c was added on branch nathanw_sa on 2001-09-21 22:35:55 +0000
 1.2.2.2  01-Oct-2001  fvdl Catch up with -current.
 1.2.2.1  24-Sep-2001  fvdl file if_gem_pci.c was added on branch thorpej-devvp on 2001-10-01 12:45:54 +0000
 1.8.10.2  15-Jul-2002  gehenna catch up with -current.
 1.8.10.1  30-May-2002  gehenna Catch up with -current.
 1.8.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.8.2.4  06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.8.2.3  23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.8.2.2  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.8.2.1  13-Nov-2001  thorpej file if_gem_pci.c was added on branch kqueue on 2002-01-10 19:56:40 +0000
 1.9.2.1  12-Jul-2002  thorpej pullup-1-6 ticket #491 (matt).

Original log message:
Match Apple GMAC id #3.
 1.14.2.6  04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.14.2.5  04-Feb-2005  skrll Sync with HEAD.
 1.14.2.4  19-Oct-2004  skrll Sync with HEAD
 1.14.2.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.14.2.2  18-Sep-2004  skrll Sync with HEAD.
 1.14.2.1  03-Aug-2004  skrll Sync with HEAD
 1.17.6.2  19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.17.6.1  12-Feb-2005  yamt sync with head.
 1.17.4.1  29-Apr-2005  kent sync with -current
 1.19.4.5  04-Feb-2008  yamt sync with head.
 1.19.4.4  21-Jan-2008  yamt sync with head
 1.19.4.3  27-Oct-2007  yamt sync with head.
 1.19.4.2  03-Sep-2007  yamt sync with head.
 1.19.4.1  30-Dec-2006  yamt sync with head.
 1.20.8.1  11-Aug-2006  yamt sync with head
 1.20.4.1  09-Sep-2006  rpaulo sync with head
 1.21.6.1  10-Dec-2006  yamt sync with head.
 1.21.4.1  12-Jan-2007  ad Sync with head.
 1.22.16.1  03-Jun-2008  skrll Sync with netbsd-4.
 1.22.10.1  11-Jul-2007  mjf Sync with head.
 1.22.8.2  23-Oct-2007  ad Sync with head.
 1.22.8.1  15-Jul-2007  ad Sync with head.
 1.22.2.1  17-May-2008  bouyer Pull up following revision(s) (requested by jdc in ticket #1145):
src/share/man/man4/gem.4 1.5,1.6 via patch
src/sys/arch/sparc64/conf/GENERIC 1.97 via patch
src/sys/dev/ic/gem.c 1.59,1.61-1.68,1.70-1.73 via patch
src/sys/dev/ic/gemreg.h 1.11 via patch
src/sys/dev/ic/gemvar.h 1.16,1.18 via patch
src/sys/dev/mii/bmtphy.c 1.24 via patch
src/sys/dev/pci/if_gem_pci.c 1.25,1.27 via patch
src/sys/dev/pci/pcidevs 1.12 via patch
src/sys/dev/pci/pcidevs.h regenerate
src/sys/dev/pci/pcidevs_data.h regenerate
Add support for Sun PCI X1141A (SX fibre) cards.
Add improvements to the driver.
Disable HW UDP4 and RX TCP4 checksums because they are buggy (PR#34799)
Add improvements to bmtphy.
 1.23.12.1  25-Oct-2007  bouyer Sync with HEAD.
 1.23.8.3  23-Mar-2008  matt sync with HEAD
 1.23.8.2  09-Jan-2008  matt sync with HEAD
 1.23.8.1  06-Nov-2007  matt sync with HEAD
 1.23.6.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.24.8.2  20-Jan-2008  bouyer Sync with HEAD
 1.24.8.1  08-Jan-2008  bouyer Sync with HEAD
 1.24.2.1  18-Feb-2008  mjf Sync with HEAD.
 1.27.6.1  02-Jun-2008  mjf Sync with HEAD.
 1.29.6.1  23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.29.4.5  11-Mar-2010  yamt sync with head
 1.29.4.4  16-Sep-2009  yamt sync with head
 1.29.4.3  19-Aug-2009  yamt sync with head.
 1.29.4.2  16-May-2009  yamt sync with head
 1.29.4.1  04-May-2009  yamt sync with head.
 1.29.2.1  04-Jun-2008  yamt sync with head
 1.30.12.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.30.6.1  28-Apr-2009  skrll Sync with HEAD.
 1.41.2.1  30-Apr-2010  uebayasi Sync with HEAD.
 1.42.2.1  05-Mar-2011  rmind sync with head
 1.43.12.1  18-Feb-2012  mrg merge to -current.
 1.43.8.3  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.43.8.2  30-Oct-2012  yamt sync with head
 1.43.8.1  17-Apr-2012  yamt sync with head
 1.44.6.3  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.44.6.2  23-Jun-2013  tls resync from head
 1.44.6.1  20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.46.4.1  18-May-2014  rmind sync with head
 1.47.30.2  08-Apr-2020  martin Merge changes from current as of 20200406
 1.47.30.1  10-Jun-2019  christos Sync with HEAD
 1.47.28.1  26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.52.26.1  02-Aug-2025  perseant Sync with HEAD
 1.52.20.2  22-Feb-2025  martin Pull up following revision(s) (requested by joe in ticket #1054):

sys/dev/pci/if_gem_pci.c: revision 1.54
sys/dev/pci/if_gem_pci.c: revision 1.55

use the right buffer size for shared pin check and debug
avoid the use of sizeof(pointer) and use the Temp BUF limit.

Use "int" format for constant "GEM_TMP_BUFSIZE - 1".
Kernel ALL/amd64 builds again.
 1.52.20.1  22-Feb-2025  martin Pull up following revision(s) (requested by joe in ticket #1053):

sys/dev/pci/if_gem_pci.c: revision 1.53

fix: wrong size of buffer limit used when reading through the pci bus
use the GEM_TMP_BUFSIZE rather than the sizeof pointer

RSS XML Feed