Home | History | Annotate | Download | only in ic
History log of /src/sys/dev/ic/mx98905.c
RevisionDateAuthorComments
 1.18  21-May-2024  andvar s/amout/amount/ in comments.
 1.17  01-Aug-2023  andvar s/diabling/disabling/ in comment.
 1.16  03-Sep-2018  riastradh Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int. The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a name change -- no functional change intended.

HOWEVER! Some subsystems have

#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) > (b) ? (a) : (b))

even though our standard name for that is MIN/MAX. Although these
may invite multiple evaluation bugs, these do _not_ cause integer
truncation.

To avoid `fixing' these cases, I first changed the name in libkern,
and then compile-tested every file where min/max occurred in order to
confirm that it failed -- and thus confirm that nothing shadowed
min/max -- before changing it.

I have left a handful of bootloaders that are too annoying to
compile-test, and some dead code:

cobalt ews4800mips hp300 hppa ia64 luna68k vax
acorn32/if_ie.c (not included in any kernels)
macppc/if_gm.c (superseded by gem(4))

It should be easy to fix the fallout once identified -- this way of
doing things fails safe, and the goal here, after all, is to _avoid_
silent integer truncations, not introduce them.

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate. But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all. (Who knows, maybe in some cases integer
truncation is actually intended!)
 1.15  14-Mar-2009  dsl branches: 1.15.62; 1.15.64;
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.14  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.13  28-Apr-2008  martin branches: 1.13.8; 1.13.14;
Remove clause 3 and 4 from TNF licenses
 1.12  12-Mar-2008  cube branches: 1.12.2; 1.12.4;
Split device_t and softc for the NE2000 Ethernet chip and all its variants
and attachments. Use device_t accessors, correct types, and ANSIfy when
appropriate.
 1.11  08-Jan-2008  matt branches: 1.11.2; 1.11.6;
Don't do arithmetic on void pointers.
 1.10  19-Oct-2007  ad branches: 1.10.2; 1.10.8;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h
 1.9  04-Mar-2007  christos branches: 1.9.2; 1.9.14; 1.9.16; 1.9.20;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.8  24-Dec-2005  perry branches: 1.8.26;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.7  11-Dec-2005  christos merge ktrace-lwp.
 1.6  18-Mar-2004  he branches: 1.6.16;
Adapt to the removal of NE2000_USE_WORD() macro, now replaced
by a field in ne2000_softc.
 1.5  04-Dec-2003  keihan netbsd.org -> NetBSD.org

This was the last commit of this kind to src/sys, which is now totally
"NetBSD.org clean". Thanks for the patiance, and sorry for all the commits.
 1.4  03-May-2003  wiz branches: 1.4.2;
DMA, not dma nor Dma.
 1.3  15-Jan-2003  bouyer Zero out the NIC memory when padding packet to ETHER_MIN_LEN-ETHER_CRC_LEN
sc->write_mbuf now return len of buffer, including padding.
Tested with a PCI ne2000.
 1.2  17-Feb-2002  bjh21 branches: 1.2.10;
Add prototypes for static functions.
 1.1  15-Dec-2001  bjh21 branches: 1.1.2; 1.1.4;
Add code to support the bugged Macronix MX98905 chip, as used in several
podulebus Ethernet cards. This replaces the NE2000 memory-access routines
with ones that don't try to transfer more than 255 bytes at a time.

This code should perhaps be merged into ne2000.c, but presumably most NE2000
clones won't need it.
 1.1.4.3  16-Mar-2002  jdolecek Catch up with -current.
 1.1.4.2  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.4.1  15-Dec-2001  thorpej file mx98905.c was added on branch kqueue on 2002-01-10 19:54:53 +0000
 1.1.2.4  17-Jan-2003  thorpej Sync with HEAD.
 1.1.2.3  28-Feb-2002  nathanw Catch up to -current.
 1.1.2.2  08-Jan-2002  nathanw Catch up to -current.
 1.1.2.1  15-Dec-2001  nathanw file mx98905.c was added on branch nathanw_sa on 2002-01-08 00:29:59 +0000
 1.2.10.1  27-Jan-2003  jmc Pullup revisions 1.2-1.3 (requested by bouyer in ticket #1096)
Zero out the NIC memory when padding packet to
ETHER_MIN_LEN-ETHER_CRC_LEN sc->write_mbuf now return len of
buffer, including padding.
 1.4.2.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.4.2.2  18-Sep-2004  skrll Sync with HEAD.
 1.4.2.1  03-Aug-2004  skrll Sync with HEAD
 1.6.16.5  17-Mar-2008  yamt sync with head.
 1.6.16.4  21-Jan-2008  yamt sync with head
 1.6.16.3  27-Oct-2007  yamt sync with head.
 1.6.16.2  03-Sep-2007  yamt sync with head.
 1.6.16.1  21-Jun-2006  yamt sync with head.
 1.8.26.1  12-Mar-2007  rmind Sync with HEAD.
 1.9.20.1  25-Oct-2007  bouyer Sync with HEAD.
 1.9.16.3  23-Mar-2008  matt sync with HEAD
 1.9.16.2  09-Jan-2008  matt sync with HEAD
 1.9.16.1  06-Nov-2007  matt sync with HEAD
 1.9.14.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.9.2.1  23-Oct-2007  ad Sync with head.
 1.10.8.1  08-Jan-2008  bouyer Sync with HEAD
 1.10.2.1  18-Feb-2008  mjf Sync with HEAD.
 1.11.6.2  02-Jun-2008  mjf Sync with HEAD.
 1.11.6.1  03-Apr-2008  mjf Sync with HEAD.
 1.11.2.1  24-Mar-2008  keiichi sync with head.
 1.12.4.2  04-May-2009  yamt sync with head.
 1.12.4.1  16-May-2008  yamt sync with head.
 1.12.2.1  18-May-2008  yamt sync with head.
 1.13.14.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.13.8.1  28-Apr-2009  skrll Sync with HEAD.
 1.15.64.1  10-Jun-2019  christos Sync with HEAD
 1.15.62.1  06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)

RSS XML Feed