Home | History | Annotate | only in /src/sys/dev/pci/cxgb
History log of /src/sys/dev/pci/cxgb
RevisionDateAuthorComments
 1.5 13-Sep-2019  msaitoh if_flags is neither int nor short. It's unsigned short.
 1.4 19-Apr-2018  christos branches: 1.4.2;
s/static inline/static __inline/g for consistency.
 1.3 27-Oct-2012  chs branches: 1.3.36;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.2 18-May-2011  dyoung branches: 1.2.4; 1.2.14;
MI code must #include <sys/bus.h>, not <machine/bus.h>.
 1.1 21-Mar-2010  jklos branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8;
Reorganizing all Chelsio 10 gig files into separate directory.
 1.1.8.1 06-Jun-2011  jruoho Sync with HEAD.
 1.1.6.2 11-Aug-2010  yamt sync with head.
 1.1.6.1 21-Mar-2010  yamt file cxgb_adapter.h was added on branch yamt-nfs-mp on 2010-08-11 22:54:05 +0000
 1.1.4.3 31-May-2011  rmind sync with head
 1.1.4.2 30-May-2010  rmind sync with head
 1.1.4.1 21-Mar-2010  rmind file cxgb_adapter.h was added on branch rmind-uvmplock on 2010-05-30 05:17:39 +0000
 1.1.2.2 30-Apr-2010  uebayasi Sync with HEAD.
 1.1.2.1 21-Mar-2010  uebayasi file cxgb_adapter.h was added on branch uebayasi-xip on 2010-04-30 14:43:44 +0000
 1.2.14.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.2.4.1 30-Oct-2012  yamt sync with head
 1.3.36.1 22-Apr-2018  pgoyette Sync with HEAD
 1.4.2.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1 21-Mar-2010  jklos branches: 1.1.2; 1.1.4; 1.1.6;
Reorganizing all Chelsio 10 gig files into separate directory.
 1.1.6.2 11-Aug-2010  yamt sync with head.
 1.1.6.1 21-Mar-2010  yamt file cxgb_ael1002.c was added on branch yamt-nfs-mp on 2010-08-11 22:54:05 +0000
 1.1.4.2 30-May-2010  rmind sync with head
 1.1.4.1 21-Mar-2010  rmind file cxgb_ael1002.c was added on branch rmind-uvmplock on 2010-05-30 05:17:39 +0000
 1.1.2.2 30-Apr-2010  uebayasi Sync with HEAD.
 1.1.2.1 21-Mar-2010  uebayasi file cxgb_ael1002.c was added on branch uebayasi-xip on 2010-04-30 14:43:44 +0000
 1.4 29-Jul-2022  andvar s/collissions/collisions/
 1.3 19-Apr-2018  christos s/static inline/static __inline/g for consistency.
 1.2 23-Jan-2013  joerg branches: 1.2.36;
Make cxgb at least compilable. Fix _rt_key usage.
 1.1 21-Mar-2010  jklos branches: 1.1.2; 1.1.4; 1.1.6; 1.1.14; 1.1.24;
Reorganizing all Chelsio 10 gig files into separate directory.
 1.1.24.1 25-Feb-2013  tls resync with head
 1.1.14.1 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.1.6.2 11-Aug-2010  yamt sync with head.
 1.1.6.1 21-Mar-2010  yamt file cxgb_common.h was added on branch yamt-nfs-mp on 2010-08-11 22:54:05 +0000
 1.1.4.2 30-May-2010  rmind sync with head
 1.1.4.1 21-Mar-2010  rmind file cxgb_common.h was added on branch rmind-uvmplock on 2010-05-30 05:17:39 +0000
 1.1.2.2 30-Apr-2010  uebayasi Sync with HEAD.
 1.1.2.1 21-Mar-2010  uebayasi file cxgb_common.h was added on branch uebayasi-xip on 2010-04-30 14:43:44 +0000
 1.2.36.1 22-Apr-2018  pgoyette Sync with HEAD
 1.1 21-Mar-2010  jklos branches: 1.1.2; 1.1.4; 1.1.6;
Reorganizing all Chelsio 10 gig files into separate directory.
 1.1.6.2 11-Aug-2010  yamt sync with head.
 1.1.6.1 21-Mar-2010  yamt file cxgb_config.h was added on branch yamt-nfs-mp on 2010-08-11 22:54:05 +0000
 1.1.4.2 30-May-2010  rmind sync with head
 1.1.4.1 21-Mar-2010  rmind file cxgb_config.h was added on branch rmind-uvmplock on 2010-05-30 05:17:39 +0000
 1.1.2.2 30-Apr-2010  uebayasi Sync with HEAD.
 1.1.2.1 21-Mar-2010  uebayasi file cxgb_config.h was added on branch uebayasi-xip on 2010-04-30 14:43:44 +0000
 1.1 21-Mar-2010  jklos branches: 1.1.2; 1.1.4; 1.1.6;
Reorganizing all Chelsio 10 gig files into separate directory.
 1.1.6.2 11-Aug-2010  yamt sync with head.
 1.1.6.1 21-Mar-2010  yamt file cxgb_ctl_defs.h was added on branch yamt-nfs-mp on 2010-08-11 22:54:05 +0000
 1.1.4.2 30-May-2010  rmind sync with head
 1.1.4.1 21-Mar-2010  rmind file cxgb_ctl_defs.h was added on branch rmind-uvmplock on 2010-05-30 05:17:39 +0000
 1.1.2.2 30-Apr-2010  uebayasi Sync with HEAD.
 1.1.2.1 21-Mar-2010  uebayasi file cxgb_ctl_defs.h was added on branch uebayasi-xip on 2010-04-30 14:43:44 +0000
 1.2 02-Jun-2024  andvar Fix various typos, mainly triple letters.
 1.1 21-Mar-2010  jklos branches: 1.1.2; 1.1.4; 1.1.6;
Reorganizing all Chelsio 10 gig files into separate directory.
 1.1.6.2 11-Aug-2010  yamt sync with head.
 1.1.6.1 21-Mar-2010  yamt file cxgb_firmware_exports.h was added on branch yamt-nfs-mp on 2010-08-11 22:54:05 +0000
 1.1.4.2 30-May-2010  rmind sync with head
 1.1.4.1 21-Mar-2010  rmind file cxgb_firmware_exports.h was added on branch rmind-uvmplock on 2010-05-30 05:17:39 +0000
 1.1.2.2 30-Apr-2010  uebayasi Sync with HEAD.
 1.1.2.1 21-Mar-2010  uebayasi file cxgb_firmware_exports.h was added on branch uebayasi-xip on 2010-04-30 14:43:44 +0000
 1.2 11-Apr-2019  kamil Fix CVS Id usage
 1.1 21-Mar-2010  jklos branches: 1.1.2; 1.1.4; 1.1.6; 1.1.66;
Reorganizing all Chelsio 10 gig files into separate directory.
 1.1.66.1 10-Jun-2019  christos Sync with HEAD
 1.1.6.2 11-Aug-2010  yamt sync with head.
 1.1.6.1 21-Mar-2010  yamt file cxgb_include.h was added on branch yamt-nfs-mp on 2010-08-11 22:54:05 +0000
 1.1.4.2 30-May-2010  rmind sync with head
 1.1.4.1 21-Mar-2010  rmind file cxgb_include.h was added on branch rmind-uvmplock on 2010-05-30 05:17:39 +0000
 1.1.2.2 30-Apr-2010  uebayasi Sync with HEAD.
 1.1.2.1 21-Mar-2010  uebayasi file cxgb_include.h was added on branch uebayasi-xip on 2010-04-30 14:43:44 +0000
 1.2 06-Sep-2015  dholland More on PR 41200: headers that declare ioctls should include sys/ioccom.h.
This covers (I think) all the MI headers outside of external/ (and dist/).
 1.1 21-Mar-2010  jklos branches: 1.1.2; 1.1.4; 1.1.6; 1.1.24; 1.1.42;
Reorganizing all Chelsio 10 gig files into separate directory.
 1.1.42.1 22-Sep-2015  skrll Sync with HEAD
 1.1.24.1 03-Dec-2017  jdolecek update from HEAD
 1.1.6.2 11-Aug-2010  yamt sync with head.
 1.1.6.1 21-Mar-2010  yamt file cxgb_ioctl.h was added on branch yamt-nfs-mp on 2010-08-11 22:54:05 +0000
 1.1.4.2 30-May-2010  rmind sync with head
 1.1.4.1 21-Mar-2010  rmind file cxgb_ioctl.h was added on branch rmind-uvmplock on 2010-05-30 05:17:40 +0000
 1.1.2.2 30-Apr-2010  uebayasi Sync with HEAD.
 1.1.2.1 21-Mar-2010  uebayasi file cxgb_ioctl.h was added on branch uebayasi-xip on 2010-04-30 14:43:44 +0000
 1.3 19-Jun-2025  andvar s/partilar/particular/ in comment.
 1.2 19-Apr-2018  christos branches: 1.2.40;
s/static inline/static __inline/g for consistency.
 1.1 21-Mar-2010  jklos branches: 1.1.2; 1.1.4; 1.1.6; 1.1.64;
Reorganizing all Chelsio 10 gig files into separate directory.
 1.1.64.1 22-Apr-2018  pgoyette Sync with HEAD
 1.1.6.2 11-Aug-2010  yamt sync with head.
 1.1.6.1 21-Mar-2010  yamt file cxgb_jhash.h was added on branch yamt-nfs-mp on 2010-08-11 22:54:05 +0000
 1.1.4.2 30-May-2010  rmind sync with head
 1.1.4.1 21-Mar-2010  rmind file cxgb_jhash.h was added on branch rmind-uvmplock on 2010-05-30 05:17:40 +0000
 1.1.2.2 30-Apr-2010  uebayasi Sync with HEAD.
 1.1.2.1 21-Mar-2010  uebayasi file cxgb_jhash.h was added on branch uebayasi-xip on 2010-04-30 14:43:44 +0000
 1.2.40.1 02-Aug-2025  perseant Sync with HEAD
 1.5 22-Dec-2018  maxv Replace M_ALIGN and MH_ALIGN by m_align.
 1.4 11-Oct-2016  maxv branches: 1.4.14; 1.4.16;
There are two memory leaks here, found by mootja; just add some XXXs.
 1.3 25-Mar-2014  christos branches: 1.3.6; 1.3.10;
kill sprintf
 1.2 23-Jan-2013  joerg branches: 1.2.2;
Make cxgb at least compilable. Fix _rt_key usage.
 1.1 21-Mar-2010  jklos branches: 1.1.2; 1.1.4; 1.1.6; 1.1.14; 1.1.24;
Reorganizing all Chelsio 10 gig files into separate directory.
 1.1.24.3 03-Dec-2017  jdolecek update from HEAD
 1.1.24.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.24.1 25-Feb-2013  tls resync with head
 1.1.14.1 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.1.6.2 11-Aug-2010  yamt sync with head.
 1.1.6.1 21-Mar-2010  yamt file cxgb_l2t.c was added on branch yamt-nfs-mp on 2010-08-11 22:54:05 +0000
 1.1.4.2 30-May-2010  rmind sync with head
 1.1.4.1 21-Mar-2010  rmind file cxgb_l2t.c was added on branch rmind-uvmplock on 2010-05-30 05:17:40 +0000
 1.1.2.2 30-Apr-2010  uebayasi Sync with HEAD.
 1.1.2.1 21-Mar-2010  uebayasi file cxgb_l2t.c was added on branch uebayasi-xip on 2010-04-30 14:43:44 +0000
 1.2.2.1 18-May-2014  rmind sync with head
 1.3.10.1 04-Nov-2016  pgoyette Sync with HEAD
 1.3.6.1 05-Dec-2016  skrll Sync with HEAD
 1.4.16.1 10-Jun-2019  christos Sync with HEAD
 1.4.14.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.2 19-Apr-2018  christos s/static inline/static __inline/g for consistency.
 1.1 21-Mar-2010  jklos branches: 1.1.2; 1.1.4; 1.1.6; 1.1.64;
Reorganizing all Chelsio 10 gig files into separate directory.
 1.1.64.1 22-Apr-2018  pgoyette Sync with HEAD
 1.1.6.2 11-Aug-2010  yamt sync with head.
 1.1.6.1 21-Mar-2010  yamt file cxgb_l2t.h was added on branch yamt-nfs-mp on 2010-08-11 22:54:05 +0000
 1.1.4.2 30-May-2010  rmind sync with head
 1.1.4.1 21-Mar-2010  rmind file cxgb_l2t.h was added on branch rmind-uvmplock on 2010-05-30 05:17:40 +0000
 1.1.2.2 30-Apr-2010  uebayasi Sync with HEAD.
 1.1.2.1 21-Mar-2010  uebayasi file cxgb_l2t.h was added on branch uebayasi-xip on 2010-04-30 14:43:44 +0000
 1.2 18-May-2011  dyoung MI code must #include <sys/bus.h>, not <machine/bus.h>.
 1.1 21-Mar-2010  jklos branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8;
Reorganizing all Chelsio 10 gig files into separate directory.
 1.1.8.1 06-Jun-2011  jruoho Sync with HEAD.
 1.1.6.2 11-Aug-2010  yamt sync with head.
 1.1.6.1 21-Mar-2010  yamt file cxgb_lro.c was added on branch yamt-nfs-mp on 2010-08-11 22:54:05 +0000
 1.1.4.3 31-May-2011  rmind sync with head
 1.1.4.2 30-May-2010  rmind sync with head
 1.1.4.1 21-Mar-2010  rmind file cxgb_lro.c was added on branch rmind-uvmplock on 2010-05-30 05:17:40 +0000
 1.1.2.2 30-Apr-2010  uebayasi Sync with HEAD.
 1.1.2.1 21-Mar-2010  uebayasi file cxgb_lro.c was added on branch uebayasi-xip on 2010-04-30 14:43:44 +0000
 1.10 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.9 24-Apr-2021  thorpej branches: 1.9.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.8 04-Feb-2020  thorpej branches: 1.8.8;
Use ifmedia_fini().
 1.7 09-Dec-2018  jdolecek branches: 1.7.6;
use pci_intr_establish_xname()

XXX due to 2008-01-17 '10 gigabit Chelsio cards now compile and work, although
XXX not very well yet' commit this looks like having worked in past, but since
XXX ~2010 received only mechanical updates, and currently it's unreferenced
XXX and uncompilable - does it make sense to keep the driver around?
 1.6 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.5 26-Jun-2018  msaitoh branches: 1.5.2;
Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward
compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same
as FreeBSD.

This change also fixes a bug that the direction is misunderstand on some
environment by passing the direction to bpf_mtap*() instead of checking
m->m_pkthdr.rcvif.
 1.4 23-Jan-2013  joerg branches: 1.4.36;
Make cxgb at least compilable. Fix _rt_key usage.
 1.3 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.2 18-May-2011  dyoung branches: 1.2.4; 1.2.14;
MI code must #include <sys/bus.h>, not <machine/bus.h>.
 1.1 21-Mar-2010  jklos branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8;
Reorganizing all Chelsio 10 gig files into separate directory.
 1.1.8.1 06-Jun-2011  jruoho Sync with HEAD.
 1.1.6.2 11-Aug-2010  yamt sync with head.
 1.1.6.1 21-Mar-2010  yamt file cxgb_main.c was added on branch yamt-nfs-mp on 2010-08-11 22:54:05 +0000
 1.1.4.3 31-May-2011  rmind sync with head
 1.1.4.2 30-May-2010  rmind sync with head
 1.1.4.1 21-Mar-2010  rmind file cxgb_main.c was added on branch rmind-uvmplock on 2010-05-30 05:17:40 +0000
 1.1.2.2 30-Apr-2010  uebayasi Sync with HEAD.
 1.1.2.1 21-Mar-2010  uebayasi file cxgb_main.c was added on branch uebayasi-xip on 2010-04-30 14:43:44 +0000
 1.2.14.2 25-Feb-2013  tls resync with head
 1.2.14.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.2.4.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.2.4.1 30-Oct-2012  yamt sync with head
 1.4.36.3 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.4.36.2 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.4.36.1 28-Jul-2018  pgoyette Sync with HEAD
 1.5.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.5.2.1 10-Jun-2019  christos Sync with HEAD
 1.7.6.1 29-Feb-2020  ad Sync with head.
 1.8.8.2 22-Mar-2021  thorpej Audit CFARG_IATTR in config_found() calls, and remove it in situations
where the interface attribute is not ambiguous.
 1.8.8.1 22-Mar-2021  thorpej Mechanical conversion of config_found_sm_loc() -> config_found().
CFARG_IATTR usage needs to be audited.
 1.9.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.1 21-Mar-2010  jklos branches: 1.1.2; 1.1.4; 1.1.6;
Reorganizing all Chelsio 10 gig files into separate directory.
 1.1.6.2 11-Aug-2010  yamt sync with head.
 1.1.6.1 21-Mar-2010  yamt file cxgb_mbuf.h was added on branch yamt-nfs-mp on 2010-08-11 22:54:06 +0000
 1.1.4.2 30-May-2010  rmind sync with head
 1.1.4.1 21-Mar-2010  rmind file cxgb_mbuf.h was added on branch rmind-uvmplock on 2010-05-30 05:17:40 +0000
 1.1.2.2 30-Apr-2010  uebayasi Sync with HEAD.
 1.1.2.1 21-Mar-2010  uebayasi file cxgb_mbuf.h was added on branch uebayasi-xip on 2010-04-30 14:43:44 +0000
 1.2 08-Feb-2018  dholland Typos.
 1.1 21-Mar-2010  jklos branches: 1.1.2; 1.1.4; 1.1.6;
Reorganizing all Chelsio 10 gig files into separate directory.
 1.1.6.2 11-Aug-2010  yamt sync with head.
 1.1.6.1 21-Mar-2010  yamt file cxgb_mc5.c was added on branch yamt-nfs-mp on 2010-08-11 22:54:06 +0000
 1.1.4.2 30-May-2010  rmind sync with head
 1.1.4.1 21-Mar-2010  rmind file cxgb_mc5.c was added on branch rmind-uvmplock on 2010-05-30 05:17:40 +0000
 1.1.2.2 30-Apr-2010  uebayasi Sync with HEAD.
 1.1.2.1 21-Mar-2010  uebayasi file cxgb_mc5.c was added on branch uebayasi-xip on 2010-04-30 14:43:44 +0000
 1.1 21-Mar-2010  jklos branches: 1.1.2; 1.1.4; 1.1.6;
Reorganizing all Chelsio 10 gig files into separate directory.
 1.1.6.2 11-Aug-2010  yamt sync with head.
 1.1.6.1 21-Mar-2010  yamt file cxgb_mv88e1xxx.c was added on branch yamt-nfs-mp on 2010-08-11 22:54:06 +0000
 1.1.4.2 30-May-2010  rmind sync with head
 1.1.4.1 21-Mar-2010  rmind file cxgb_mv88e1xxx.c was added on branch rmind-uvmplock on 2010-05-30 05:17:40 +0000
 1.1.2.2 30-Apr-2010  uebayasi Sync with HEAD.
 1.1.2.1 21-Mar-2010  uebayasi file cxgb_mv88e1xxx.c was added on branch uebayasi-xip on 2010-04-30 14:43:45 +0000
 1.3 19-Apr-2018  christos s/static inline/static __inline/g for consistency.
 1.2 02-Oct-2016  christos branches: 1.2.14;
MFREE -> m_free
 1.1 21-Mar-2010  jklos branches: 1.1.2; 1.1.4; 1.1.6; 1.1.24; 1.1.42; 1.1.46;
Reorganizing all Chelsio 10 gig files into separate directory.
 1.1.46.1 04-Nov-2016  pgoyette Sync with HEAD
 1.1.42.1 05-Oct-2016  skrll Sync with HEAD
 1.1.24.1 03-Dec-2017  jdolecek update from HEAD
 1.1.6.2 11-Aug-2010  yamt sync with head.
 1.1.6.1 21-Mar-2010  yamt file cxgb_mvec.h was added on branch yamt-nfs-mp on 2010-08-11 22:54:06 +0000
 1.1.4.2 30-May-2010  rmind sync with head
 1.1.4.1 21-Mar-2010  rmind file cxgb_mvec.h was added on branch rmind-uvmplock on 2010-05-30 05:17:40 +0000
 1.1.2.2 30-Apr-2010  uebayasi Sync with HEAD.
 1.1.2.1 21-Mar-2010  uebayasi file cxgb_mvec.h was added on branch uebayasi-xip on 2010-04-30 14:43:45 +0000
 1.2.14.1 22-Apr-2018  pgoyette Sync with HEAD
 1.7 08-Aug-2021  andvar s/propely/properly/
 1.6 27-Dec-2019  msaitoh s/suport/support/
 1.5 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.4 21-Sep-2014  christos branches: 1.4.18; 1.4.20;
comment out code that was never used, but probably intended to be used.
 1.3 25-Mar-2014  christos branches: 1.3.4;
kill sprintf
 1.2 18-May-2011  dyoung branches: 1.2.4; 1.2.14; 1.2.18;
MI code must #include <sys/bus.h>, not <machine/bus.h>.
 1.1 21-Mar-2010  jklos branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8;
Reorganizing all Chelsio 10 gig files into separate directory.
 1.1.8.1 06-Jun-2011  jruoho Sync with HEAD.
 1.1.6.2 11-Aug-2010  yamt sync with head.
 1.1.6.1 21-Mar-2010  yamt file cxgb_offload.c was added on branch yamt-nfs-mp on 2010-08-11 22:54:06 +0000
 1.1.4.3 31-May-2011  rmind sync with head
 1.1.4.2 30-May-2010  rmind sync with head
 1.1.4.1 21-Mar-2010  rmind file cxgb_offload.c was added on branch rmind-uvmplock on 2010-05-30 05:17:40 +0000
 1.1.2.2 30-Apr-2010  uebayasi Sync with HEAD.
 1.1.2.1 21-Mar-2010  uebayasi file cxgb_offload.c was added on branch uebayasi-xip on 2010-04-30 14:43:45 +0000
 1.2.18.1 18-May-2014  rmind sync with head
 1.2.14.2 03-Dec-2017  jdolecek update from HEAD
 1.2.14.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.4.1 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.3.4.1 30-Oct-2014  martin Pull up following revision(s) (requested by maxv in ticket #164):
sys/dev/ieee1394/fwcrom.c: revision 1.15
sys/dev/ieee1394/fwcrom.c: revision 1.16
sys/dev/marvell/if_gfe.c: revision 1.43
sys/dev/usb/stuirda.c: revision 1.16
sys/dev/pci/cxgb/cxgb_offload.c: revision 1.4
sys/dev/pci/twa.c: revision 1.51
sys/dev/pci/twa.c: revision 1.52
Various fixes in dev/: remove dead code and fix two inconsistencies.
 1.4.20.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.4.20.1 10-Jun-2019  christos Sync with HEAD
 1.4.18.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.2 19-Apr-2018  christos s/static inline/static __inline/g for consistency.
 1.1 21-Mar-2010  jklos branches: 1.1.2; 1.1.4; 1.1.6; 1.1.64;
Reorganizing all Chelsio 10 gig files into separate directory.
 1.1.64.1 22-Apr-2018  pgoyette Sync with HEAD
 1.1.6.2 11-Aug-2010  yamt sync with head.
 1.1.6.1 21-Mar-2010  yamt file cxgb_offload.h was added on branch yamt-nfs-mp on 2010-08-11 22:54:06 +0000
 1.1.4.2 30-May-2010  rmind sync with head
 1.1.4.1 21-Mar-2010  rmind file cxgb_offload.h was added on branch rmind-uvmplock on 2010-05-30 05:17:40 +0000
 1.1.2.2 30-Apr-2010  uebayasi Sync with HEAD.
 1.1.2.1 21-Mar-2010  uebayasi file cxgb_offload.h was added on branch uebayasi-xip on 2010-04-30 14:43:45 +0000
 1.2 18-May-2011  dyoung MI code must #include <sys/bus.h>, not <machine/bus.h>.
 1.1 21-Mar-2010  jklos branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8;
Reorganizing all Chelsio 10 gig files into separate directory.
 1.1.8.1 06-Jun-2011  jruoho Sync with HEAD.
 1.1.6.2 11-Aug-2010  yamt sync with head.
 1.1.6.1 21-Mar-2010  yamt file cxgb_osdep.c was added on branch yamt-nfs-mp on 2010-08-11 22:54:06 +0000
 1.1.4.3 31-May-2011  rmind sync with head
 1.1.4.2 30-May-2010  rmind sync with head
 1.1.4.1 21-Mar-2010  rmind file cxgb_osdep.c was added on branch rmind-uvmplock on 2010-05-30 05:17:40 +0000
 1.1.2.2 30-Apr-2010  uebayasi Sync with HEAD.
 1.1.2.1 21-Mar-2010  uebayasi file cxgb_osdep.c was added on branch uebayasi-xip on 2010-04-30 14:43:45 +0000
 1.7 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.6 19-Apr-2018  christos branches: 1.6.2;
s/static inline/static __inline/g for consistency.
 1.5 25-May-2016  ozaki-r branches: 1.5.16;
Use M_GETCTX and M_SETCTX

No functional change.
 1.4 20-Mar-2014  skrll branches: 1.4.6;
Mechanically replace simplelock with kmutex_t.
 1.3 23-Jan-2013  joerg branches: 1.3.2;
Make cxgb at least compilable. Fix _rt_key usage.
 1.2 18-May-2011  dyoung branches: 1.2.4; 1.2.14;
MI code must #include <sys/bus.h>, not <machine/bus.h>.
 1.1 21-Mar-2010  jklos branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8;
Reorganizing all Chelsio 10 gig files into separate directory.
 1.1.8.1 06-Jun-2011  jruoho Sync with HEAD.
 1.1.6.2 11-Aug-2010  yamt sync with head.
 1.1.6.1 21-Mar-2010  yamt file cxgb_osdep.h was added on branch yamt-nfs-mp on 2010-08-11 22:54:06 +0000
 1.1.4.3 31-May-2011  rmind sync with head
 1.1.4.2 30-May-2010  rmind sync with head
 1.1.4.1 21-Mar-2010  rmind file cxgb_osdep.h was added on branch rmind-uvmplock on 2010-05-30 05:17:40 +0000
 1.1.2.2 30-Apr-2010  uebayasi Sync with HEAD.
 1.1.2.1 21-Mar-2010  uebayasi file cxgb_osdep.h was added on branch uebayasi-xip on 2010-04-30 14:43:45 +0000
 1.2.14.3 03-Dec-2017  jdolecek update from HEAD
 1.2.14.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.14.1 25-Feb-2013  tls resync with head
 1.2.4.1 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.3.2.1 18-May-2014  rmind sync with head
 1.4.6.1 29-May-2016  skrll Sync with HEAD
 1.5.16.2 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.5.16.1 22-Apr-2018  pgoyette Sync with HEAD
 1.6.2.1 10-Jun-2019  christos Sync with HEAD
 1.1 21-Mar-2010  jklos branches: 1.1.2; 1.1.4; 1.1.6;
Reorganizing all Chelsio 10 gig files into separate directory.
 1.1.6.2 11-Aug-2010  yamt sync with head.
 1.1.6.1 21-Mar-2010  yamt file cxgb_regs.h was added on branch yamt-nfs-mp on 2010-08-11 22:54:06 +0000
 1.1.4.2 30-May-2010  rmind sync with head
 1.1.4.1 21-Mar-2010  rmind file cxgb_regs.h was added on branch rmind-uvmplock on 2010-05-30 05:17:40 +0000
 1.1.2.2 30-Apr-2010  uebayasi Sync with HEAD.
 1.1.2.1 21-Mar-2010  uebayasi file cxgb_regs.h was added on branch uebayasi-xip on 2010-04-30 14:43:45 +0000
 1.8 28-May-2025  andvar fix few typos in comments.
 1.7 22-Dec-2018  maxv branches: 1.7.36;
Replace M_ALIGN and MH_ALIGN by m_align.
 1.6 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.5 26-Sep-2017  knakahara branches: 1.5.2; 1.5.4;
VLAN ID uses pkthdr instead of mtag now. Contributed by s-yamaguchi@IIJ.

I just commit by proxy. Reviewed by joerg@n.o and christos@n.o, thanks.
See http://mail-index.netbsd.org/tech-net/2017/09/26/msg006459.html

XXX need pullup to -8 branch
 1.4 10-Jun-2016  ozaki-r branches: 1.4.10;
Introduce m_set_rcvif and m_reset_rcvif

The API is used to set (or reset) a received interface of a mbuf.
They are counterpart of m_get_rcvif, which will come in another
commit, hide internal of rcvif operation, and reduce the diff of
the upcoming change.

No functional change.
 1.3 09-Feb-2016  ozaki-r Introduce softint-based if_input

This change intends to run the whole network stack in softint context
(or normal LWP), not hardware interrupt context. Note that the work is
still incomplete by this change; to that end, we also have to softint-ify
if_link_state_change (and bpf) which can still run in hardware interrupt.

This change softint-ifies at ifp->if_input that is called from
each device driver (and ieee80211_input) to ensure Layer 2 runs
in softint (e.g., ether_input and bridge_input). To this end,
we provide a framework (called percpuq) that utlizes softint(9)
and percpu ifqueues. With this patch, rxintr of most drivers just
queues received packets and schedules a softint, and the softint
dequeues packets and does rest packet processing.

To minimize changes to each driver, percpuq is allocated in struct
ifnet for now and that is initialized by default (in if_attach).
We probably have to move percpuq to softc of each driver, but it's
future work. At this point, only wm(4) has percpuq in its softc
as a reference implementation.

Additional information including performance numbers can be found
in the thread at tech-kern@ and tech-net@:
http://mail-index.netbsd.org/tech-kern/2016/01/14/msg019997.html

Acknowledgment: riastradh@ greatly helped this work.
Thank you very much!
 1.2 18-May-2011  dyoung branches: 1.2.14; 1.2.32;
MI code must #include <sys/bus.h>, not <machine/bus.h>.
 1.1 21-Mar-2010  jklos branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8;
Reorganizing all Chelsio 10 gig files into separate directory.
 1.1.8.1 06-Jun-2011  jruoho Sync with HEAD.
 1.1.6.2 11-Aug-2010  yamt sync with head.
 1.1.6.1 21-Mar-2010  yamt file cxgb_sge.c was added on branch yamt-nfs-mp on 2010-08-11 22:54:06 +0000
 1.1.4.3 31-May-2011  rmind sync with head
 1.1.4.2 30-May-2010  rmind sync with head
 1.1.4.1 21-Mar-2010  rmind file cxgb_sge.c was added on branch rmind-uvmplock on 2010-05-30 05:17:40 +0000
 1.1.2.2 30-Apr-2010  uebayasi Sync with HEAD.
 1.1.2.1 21-Mar-2010  uebayasi file cxgb_sge.c was added on branch uebayasi-xip on 2010-04-30 14:43:45 +0000
 1.2.32.2 09-Jul-2016  skrll Sync with HEAD
 1.2.32.1 19-Mar-2016  skrll Sync with HEAD
 1.2.14.1 03-Dec-2017  jdolecek update from HEAD
 1.4.10.1 24-Oct-2017  snj Pull up following revision(s) (requested by knakahara in ticket #302):
sys/arch/powerpc/booke/dev/pq3etsec.c: 1.30-1.31
sys/arch/x86/pci/if_vmx.c: 1.20
sys/dev/ic/i82557.c: 1.148
sys/dev/ic/rtl8169.c: 1.152
sys/dev/pci/cxgb/cxgb_sge.c: 1.5
sys/dev/pci/if_age.c: 1.51
sys/dev/pci/if_alc.c: 1.25
sys/dev/pci/if_ale.c: 1.23
sys/dev/pci/if_bge.c: 1.311
sys/dev/pci/if_bge.c: 1.312
sys/dev/pci/if_bnx.c: 1.62
sys/dev/pci/if_jme.c: 1.32
sys/dev/pci/if_nfe.c: 1.64
sys/dev/pci/if_sip.c: 1.167
sys/dev/pci/if_stge.c: 1.63-1.64
sys/dev/pci/if_ti.c: 1.102
sys/dev/pci/if_txp.c: 1.48
sys/dev/pci/if_vge.c: 1.61
sys/dev/pci/if_wm.c: 1.538
sys/dev/pci/ixgbe/ix_txrx.c: 1.29 via patch
sys/net/agr/if_agrether_hash.c: 1.4
sys/net/if_ether.h: 1.67-1.68
sys/net/if_ethersubr.c: 1.244
sys/net/if_vlan.c: 1.100
sys/net80211/ieee80211_input.c: 1.89
sys/net80211/ieee80211_output.c: 1.59
sys/sys/mbuf.h: 1.171
VLAN ID uses pkthdr instead of mtag now. Contributed by s-yamaguchi@IIJ.
I just commit by proxy. Reviewed by joerg@n.o and christos@n.o, thanks.
See http://mail-index.netbsd.org/tech-net/2017/09/26/msg006459.html
--
only get vtag when we have vtag like the other drivers.
--
- only get the vtag if we have it like the other drivers
- mask the hardware vlan tag
--
- add a constant for the vlan mask.
- enforce that we have a tag before we get it.
only get vtag when we have vtag like the other drivers.
like if_bge.c:1.312 and if_stge.c:1.64.
fixed by s-yamaguchi@IIJ, thanks.
 1.5.4.1 10-Jun-2019  christos Sync with HEAD
 1.5.2.2 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.5.2.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.7.36.1 02-Aug-2025  perseant Sync with HEAD
 1.1 21-Mar-2010  jklos branches: 1.1.2; 1.1.4; 1.1.6;
Reorganizing all Chelsio 10 gig files into separate directory.
 1.1.6.2 11-Aug-2010  yamt sync with head.
 1.1.6.1 21-Mar-2010  yamt file cxgb_sge_defs.h was added on branch yamt-nfs-mp on 2010-08-11 22:54:06 +0000
 1.1.4.2 30-May-2010  rmind sync with head
 1.1.4.1 21-Mar-2010  rmind file cxgb_sge_defs.h was added on branch rmind-uvmplock on 2010-05-30 05:17:40 +0000
 1.1.2.2 30-Apr-2010  uebayasi Sync with HEAD.
 1.1.2.1 21-Mar-2010  uebayasi file cxgb_sge_defs.h was added on branch uebayasi-xip on 2010-04-30 14:43:45 +0000
 1.1 21-Mar-2010  jklos branches: 1.1.2; 1.1.4; 1.1.6;
Reorganizing all Chelsio 10 gig files into separate directory.
 1.1.6.2 11-Aug-2010  yamt sync with head.
 1.1.6.1 21-Mar-2010  yamt file cxgb_t3_cpl.h was added on branch yamt-nfs-mp on 2010-08-11 22:54:06 +0000
 1.1.4.2 30-May-2010  rmind sync with head
 1.1.4.1 21-Mar-2010  rmind file cxgb_t3_cpl.h was added on branch rmind-uvmplock on 2010-05-30 05:17:40 +0000
 1.1.2.2 30-Apr-2010  uebayasi Sync with HEAD.
 1.1.2.1 21-Mar-2010  uebayasi file cxgb_t3_cpl.h was added on branch uebayasi-xip on 2010-04-30 14:43:45 +0000
 1.9 29-Aug-2024  andvar s/Perfoms/Performs/ in comment.
 1.8 23-May-2024  andvar branches: 1.8.2;
s/separare/separate/ and s/separete/separate/ in comments.
 1.7 10-Dec-2021  andvar s/occured/occurred/ in comments, log messages and man pages.
 1.6 10-Nov-2021  msaitoh s/endianess/endianness/
 1.5 02-Aug-2021  andvar fix various typos in comments and log messages.
 1.4 29-Sep-2020  msaitoh s/occurence/occurrence/
 1.3 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.2 08-Feb-2018  dholland branches: 1.2.2; 1.2.4;
Typos.
 1.1 21-Mar-2010  jklos branches: 1.1.2; 1.1.4; 1.1.6;
Reorganizing all Chelsio 10 gig files into separate directory.
 1.1.6.2 11-Aug-2010  yamt sync with head.
 1.1.6.1 21-Mar-2010  yamt file cxgb_t3_hw.c was added on branch yamt-nfs-mp on 2010-08-11 22:54:06 +0000
 1.1.4.2 30-May-2010  rmind sync with head
 1.1.4.1 21-Mar-2010  rmind file cxgb_t3_hw.c was added on branch rmind-uvmplock on 2010-05-30 05:17:40 +0000
 1.1.2.2 30-Apr-2010  uebayasi Sync with HEAD.
 1.1.2.1 21-Mar-2010  uebayasi file cxgb_t3_hw.c was added on branch uebayasi-xip on 2010-04-30 14:43:45 +0000
 1.2.4.1 10-Jun-2019  christos Sync with HEAD
 1.2.2.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.8.2.1 02-Aug-2025  perseant Sync with HEAD
 1.1 21-Mar-2010  jklos branches: 1.1.2; 1.1.4; 1.1.6;
Reorganizing all Chelsio 10 gig files into separate directory.
 1.1.6.2 11-Aug-2010  yamt sync with head.
 1.1.6.1 21-Mar-2010  yamt file cxgb_tcb.h was added on branch yamt-nfs-mp on 2010-08-11 22:54:06 +0000
 1.1.4.2 30-May-2010  rmind sync with head
 1.1.4.1 21-Mar-2010  rmind file cxgb_tcb.h was added on branch rmind-uvmplock on 2010-05-30 05:17:40 +0000
 1.1.2.2 30-Apr-2010  uebayasi Sync with HEAD.
 1.1.2.1 21-Mar-2010  uebayasi file cxgb_tcb.h was added on branch uebayasi-xip on 2010-04-30 14:43:45 +0000
 1.2 19-Apr-2018  christos s/static inline/static __inline/g for consistency.
 1.1 21-Mar-2010  jklos branches: 1.1.2; 1.1.4; 1.1.6; 1.1.64;
Reorganizing all Chelsio 10 gig files into separate directory.
 1.1.64.1 22-Apr-2018  pgoyette Sync with HEAD
 1.1.6.2 11-Aug-2010  yamt sync with head.
 1.1.6.1 21-Mar-2010  yamt file cxgb_toedev.h was added on branch yamt-nfs-mp on 2010-08-11 22:54:06 +0000
 1.1.4.2 30-May-2010  rmind sync with head
 1.1.4.1 21-Mar-2010  rmind file cxgb_toedev.h was added on branch rmind-uvmplock on 2010-05-30 05:17:40 +0000
 1.1.2.2 30-Apr-2010  uebayasi Sync with HEAD.
 1.1.2.1 21-Mar-2010  uebayasi file cxgb_toedev.h was added on branch uebayasi-xip on 2010-04-30 14:43:45 +0000
 1.1 21-Mar-2010  jklos branches: 1.1.2; 1.1.4; 1.1.6;
Reorganizing all Chelsio 10 gig files into separate directory.
 1.1.6.2 11-Aug-2010  yamt sync with head.
 1.1.6.1 21-Mar-2010  yamt file cxgb_version.h was added on branch yamt-nfs-mp on 2010-08-11 22:54:06 +0000
 1.1.4.2 30-May-2010  rmind sync with head
 1.1.4.1 21-Mar-2010  rmind file cxgb_version.h was added on branch rmind-uvmplock on 2010-05-30 05:17:40 +0000
 1.1.2.2 30-Apr-2010  uebayasi Sync with HEAD.
 1.1.2.1 21-Mar-2010  uebayasi file cxgb_version.h was added on branch uebayasi-xip on 2010-04-30 14:43:45 +0000
 1.1 21-Mar-2010  jklos branches: 1.1.2; 1.1.4; 1.1.6;
Reorganizing all Chelsio 10 gig files into separate directory.
 1.1.6.2 11-Aug-2010  yamt sync with head.
 1.1.6.1 21-Mar-2010  yamt file cxgb_vsc7323.c was added on branch yamt-nfs-mp on 2010-08-11 22:54:06 +0000
 1.1.4.2 30-May-2010  rmind sync with head
 1.1.4.1 21-Mar-2010  rmind file cxgb_vsc7323.c was added on branch rmind-uvmplock on 2010-05-30 05:17:40 +0000
 1.1.2.2 30-Apr-2010  uebayasi Sync with HEAD.
 1.1.2.1 21-Mar-2010  uebayasi file cxgb_vsc7323.c was added on branch uebayasi-xip on 2010-04-30 14:43:45 +0000
 1.1 21-Mar-2010  jklos branches: 1.1.2; 1.1.4; 1.1.6;
Reorganizing all Chelsio 10 gig files into separate directory.
 1.1.6.2 11-Aug-2010  yamt sync with head.
 1.1.6.1 21-Mar-2010  yamt file cxgb_vsc8211.c was added on branch yamt-nfs-mp on 2010-08-11 22:54:06 +0000
 1.1.4.2 30-May-2010  rmind sync with head
 1.1.4.1 21-Mar-2010  rmind file cxgb_vsc8211.c was added on branch rmind-uvmplock on 2010-05-30 05:17:40 +0000
 1.1.2.2 30-Apr-2010  uebayasi Sync with HEAD.
 1.1.2.1 21-Mar-2010  uebayasi file cxgb_vsc8211.c was added on branch uebayasi-xip on 2010-04-30 14:43:45 +0000
 1.3 26-Mar-2023  andvar fix various typos in documentation, comments and sysctl device description.
mainly aion -> ation and inlude -> include.
 1.2 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.1 21-Mar-2010  jklos branches: 1.1.2; 1.1.4; 1.1.6; 1.1.64; 1.1.66;
Reorganizing all Chelsio 10 gig files into separate directory.
 1.1.66.1 10-Jun-2019  christos Sync with HEAD
 1.1.64.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.1.6.2 11-Aug-2010  yamt sync with head.
 1.1.6.1 21-Mar-2010  yamt file cxgb_xgmac.c was added on branch yamt-nfs-mp on 2010-08-11 22:54:07 +0000
 1.1.4.2 30-May-2010  rmind sync with head
 1.1.4.1 21-Mar-2010  rmind file cxgb_xgmac.c was added on branch rmind-uvmplock on 2010-05-30 05:17:40 +0000
 1.1.2.2 30-Apr-2010  uebayasi Sync with HEAD.
 1.1.2.1 21-Mar-2010  uebayasi file cxgb_xgmac.c was added on branch uebayasi-xip on 2010-04-30 14:43:45 +0000

RSS XML Feed