Home | History | Annotate | Download | only in pci
History log of /src/sys/dev/pci/if_mskvar.h
RevisionDateAuthorComments
 1.25  29-Apr-2020  jakllsch msk(4): Simply keep a ring of (tx) dmamaps, rather than a linked list
 1.24  29-Apr-2020  jakllsch msk(4): don't keep array of pointers to each ring descriptor

With 512 descriptors each in 2 rings this saves 4KiB (LP32) or 8KiB (LP64)
per interface.
 1.23  26-Apr-2020  jakllsch Remove written-only sk_next member of struct (m)sk_chain.
 1.22  13-Sep-2019  msaitoh if_flags is neither int nor short. It's unsigned short.
 1.21  27-Dec-2018  mrg - initialise sk_rx_hiaddr and sk_tx_hiaddr
- use MSK_ADDR_LO() and MSK_ADDR_HI()
- expand a debug message
- remove unused softc members
 1.20  21-Oct-2018  jmcneill Enable MSI support where available.
 1.19  14-Sep-2018  jakllsch msk(4): add 64-bit DMA support

portions of this change set provided by mrg@
 1.18  10-Jul-2018  jdolecek add the RX refill callout (forgot to commit with if_msk.c change)
 1.17  03-Jul-2018  jdolecek fix detach code and do it on shutdown
 1.16  03-Jul-2018  jdolecek attach the rnd source only once even with dual-port adapters
 1.15  02-Jul-2018  jdolecek sync OpenBSD if_msk.c revs 1.66-1.79 skipping framework changes and already
present changes:
- Make Yukon-2 FE+ (88E8040, 88E8042) work
- 88E8057 is a Yukon 2 Ultra 2, and this might make it work on a little
shiny green box in Japan
- Prevent null pointer dereference that could happen when we process an RX
interrupt that was queued while stopping the interface.
- Remove holdover XMAC II writes/reads inherited from sk as
they aren't required and cause problems like the 88E8072
hard locking a system when enabling macsec bypass.
- Bypass macsec on extreme/supreme based chips.
Makes my 88E8072 work.
- Add detach support to a few more drivers, and in others do the neccessary
operations in the detach function in the right order.

towards resolution of PR kern/53301 but will need more work

tested by John Halfpenny on another 8040/Yukon-2 FE+ and reported
improving behaviour (system hang to stall) so committing as stopgap; also
tested on my SK-9E22 (Yukon-2 XL), there works without any issues both before
and after
 1.14  13-Jun-2018  jdolecek branches: 1.14.2;
sync and adapt with OpenBSD if_msk.c rev. 1.43-1.65 (modulo some
cosmetics, stuff we already had, or stuff which does not apply due
to different frameworks):

- Add support for fiber on 88E8021/22
- Avoid unnecessary resets. This should make fiber 88E8021/22 work completely
- Only probe phy's at address 0; gets rid of bogus phy's on the
Marvell Yukon 88E8036
- Remove an unused function msk_setfilt() which was copied from sk(4)
- Make msk(4) detachable
- Simplify the combination use of pci_mapreg_type()/pci_mapreg_map()
 1.13  11-Jun-2018  jdolecek adopt tx/rx buffer size computation from OpenBSD rev. 1.51 to fix
"random" msk failures

the crucial fix is that the start/end adresses are computed and
written to hw registers in number of octets (i.e. size /
sizeof(u_int64_t)), as that is actually what the hardware expects

fixes PR kern/36454 (which had fix which highlighted the trouble),
and seems likely to also fix kern/35711 and port-i386/42514
 1.12  13-Apr-2015  riastradh branches: 1.12.16;
Convert sys/dev to use <sys/rndsource.h>.
 1.11  14-Oct-2012  msaitoh branches: 1.11.14;
struct device * -> device_t change.
 1.10  02-Feb-2012  tls branches: 1.10.6;
Entropy-pool implementation move and cleanup.

1) Move core entropy-pool code and source/sink/sample management code
to sys/kern from sys/dev.

2) Remove use of NRND as test for presence of entropy-pool code throughout
source tree.

3) Remove use of RND_ENABLED in device drivers as microoptimization to
avoid expensive operations on disabled entropy sources; make the
rnd_add calls do this directly so all callers benefit.

4) Fix bug in recent rnd_add_data()/rnd_add_uint32() changes that might
have lead to slight entropy overestimation for some sources.

5) Add new source types for environmental sensors, power sensors, VM
system events, and skew between clocks, with a sample implementation
for each.

ok releng to go in before the branch due to the difficulty of later
pullup (widespread #ifdef removal and moved files). Tested with release
builds on amd64 and evbarm and live testing on amd64.
 1.9  19-Nov-2011  tls branches: 1.9.2;
First step of random number subsystem rework described in
<20111022023242.BA26F14A158@mail.netbsd.org>. This change includes
the following:

An initial cleanup and minor reorganization of the entropy pool
code in sys/dev/rnd.c and sys/dev/rndpool.c. Several bugs are
fixed. Some effort is made to accumulate entropy more quickly at
boot time.

A generic interface, "rndsink", is added, for stream generators to
request that they be re-keyed with good quality entropy from the pool
as soon as it is available.

The arc4random()/arc4randbytes() implementation in libkern is
adjusted to use the rndsink interface for rekeying, which helps
address the problem of low-quality keys at boot time.

An implementation of the FIPS 140-2 statistical tests for random
number generator quality is provided (libkern/rngtest.c). This
is based on Greg Rose's implementation from Qualcomm.

A new random stream generator, nist_ctr_drbg, is provided. It is
based on an implementation of the NIST SP800-90 CTR_DRBG by
Henric Jungheim. This generator users AES in a modified counter
mode to generate a backtracking-resistant random stream.

An abstraction layer, "cprng", is provided for in-kernel consumers
of randomness. The arc4random/arc4randbytes API is deprecated for
in-kernel use. It is replaced by "cprng_strong". The current
cprng_fast implementation wraps the existing arc4random
implementation. The current cprng_strong implementation wraps the
new CTR_DRBG implementation. Both interfaces are rekeyed from
the entropy pool automatically at intervals justifiable from best
current cryptographic practice.

In some quick tests, cprng_fast() is about the same speed as
the old arc4randbytes(), and cprng_strong() is about 20% faster
than rnd_extract_data(). Performance is expected to improve.

The AES code in src/crypto/rijndael is no longer an optional
kernel component, as it is required by cprng_strong, which is
not an optional kernel component.

The entropy pool output is subjected to the rngtest tests at
startup time; if it fails, the system will reboot. There is
approximately a 3/10000 chance of a false positive from these
tests. Entropy pool _input_ from hardware random numbers is
subjected to the rngtest tests at attach time, as well as the
FIPS continuous-output test, to detect bad or stuck hardware
RNGs; if any are detected, they are detached, but the system
continues to run.

A problem with rndctl(8) is fixed -- datastructures with
pointers in arrays are no longer passed to userspace (this
was not a security problem, but rather a major issue for
compat32). A new kernel will require a new rndctl.

The sysctl kern.arandom() and kern.urandom() nodes are hooked
up to the new generators, but the /dev/*random pseudodevices
are not, yet.

Manual pages for the new kernel interfaces are forthcoming.
 1.8  24-Dec-2009  christos branches: 1.8.12;
- split the sk_dev
- don't program the interrupt mitigation to 0, only to set it to 1000 later.
- don't be verbose when setting the interrupt mitigation during reset, it
messes up the attach line and does not convey useful information.
 1.7  20-Jun-2008  cube Apply a similar patch as what was just applied to sk(4):

> Use a mutex instead of splvm() to protect the list of jubo-ready mbufs, as
> done with nfe(4) a while ago.
>
> Issue reported by Gary Duzan, who kindly fixed the patch I had sent him.

Lars Nordlund noted that such a change made things a lot better with his
msk(4).
 1.6  28-Apr-2008  martin branches: 1.6.2; 1.6.4;
Remove clause 3 and 4 from TNF licenses
 1.5  28-Mar-2008  kiyohara branches: 1.5.2; 1.5.4;
The status buffer must synchronize. If your CPU is cache writeback,
synchronous processing is necessary. However, the size of a status
buffer will overwrite the memory while synchronously processing it
because it is very small. We clear the flag SK_Y2_STOPC_OWN at more
late.
 1.4  04-Mar-2007  christos branches: 1.4.36;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.3  30-Jan-2007  msaitoh branches: 1.3.2;
apply some patches from FreeBSD

o fix device timeout
o add some workaround
o TX underrun bug (grr...)
o and some bugs
 1.2  30-Jan-2007  msaitoh sync with OpenBSD-current (many bugfixes, add some devices)

if_msk.c: rev. 1.42
if_mskvar.h rev. 1.3
if_skreg.h rev. 1.41
 1.1  09-Sep-2006  riz branches: 1.1.2; 1.1.4; 1.1.8; 1.1.10; 1.1.12; 1.1.14;
Add msk(4), a driver for Marvell Yukon 2 gigabit ethernet chips,
from Mark Kettenis of OpenBSD. There are still some outstanding
issues with this driver, namely:

- Checksum offload is unsupported
- There is a significant amount of code duplication from sk(4)
- There remain some 'magic numbers'
- Performance is not heavily tested, and likely to be lower than
the chip is capable of in some cases. Syncing some of the
aforementioned 'magic numbers' with the Marvell FreeBSD driver
should help here.

Tested on a motherboard with Marvell 88E8053 ethernet, under NetBSD/i386
and NetBSD/amd64.
 1.1.14.1  03-Sep-2007  wrstuden Sync w/ NetBSD-4-RC_1
 1.1.12.4  03-Sep-2007  yamt sync with head.
 1.1.12.3  26-Feb-2007  yamt sync with head.
 1.1.12.2  30-Dec-2006  yamt sync with head.
 1.1.12.1  09-Sep-2006  yamt file if_mskvar.h was added on branch yamt-lazymbuf on 2006-12-30 20:48:45 +0000
 1.1.10.1  26-Aug-2007  liamjfoy Pull up following revision(s) (requested by riz in ticket #816):
sys/dev/pci/if_skreg.h: revision 1.10
sys/dev/pci/if_skreg.h: revision 1.11
sys/dev/pci/pcidevs: revision 1.866
sys/dev/pci/if_skreg.h: revision 1.9
sys/dev/pci/if_sk.c: revision 1.36
sys/dev/pci/if_msk.c: revision 1.4
sys/dev/pci/if_msk.c: revision 1.5
sys/dev/pci/if_msk.c: revision 1.6
sys/dev/pci/if_msk.c: revision 1.7
sys/dev/pci/if_mskvar.h: revision 1.2
sys/dev/pci/if_mskvar.h: revision 1.3
Apply OpenBSD's rev. 1.33 to shut up "msk0: phy write timed out"
Original commit message:
> In msk_marv_miibus_writereg, wait for busy flag to clear instead of
> continuing when busy flag set.

add some msk devices

sync with OpenBSD-current (many bugfixes, add some devices)
if_msk.c: rev. 1.42
if_mskvar.h rev. 1.3
if_skreg.h rev. 1.41

sync with if_skreg.h rev. 1.41
need more work?

apply some patches from FreeBSD
o fix device timeout
o add some workaround
o TX underrun bug (grr...)
o and some bugs

fix bit definitions for the RX FIFO Flush mode

Apply OpenBSD's rev. 1.14 via patch:
> remove another Yukon Lite workaround.
 1.1.8.2  01-Feb-2007  ad Sync with head.
 1.1.8.1  18-Nov-2006  ad Sync with head.
 1.1.4.1  15-Sep-2006  tron Pull up following revision(s) (requested by riz in ticket #153):
sys/dev/pci/if_skreg.h: revision 1.8
sys/dev/pci/if_msk.c: revision 1.1
sys/dev/pci/files.pci: revision 1.268
sys/dev/pci/if_mskvar.h: revision 1.1
Add msk(4), a driver for Marvell Yukon 2 gigabit ethernet chips,
from Mark Kettenis of OpenBSD. There are still some outstanding
issues with this driver, namely:
- Checksum offload is unsupported
- There is a significant amount of code duplication from sk(4)
- There remain some 'magic numbers'
- Performance is not heavily tested, and likely to be lower than
the chip is capable of in some cases. Syncing some of the
aforementioned 'magic numbers' with the Marvell FreeBSD driver
should help here.
Tested on a motherboard with Marvell 88E8053 ethernet, under NetBSD/i386
and NetBSD/amd64.
 1.1.2.2  14-Sep-2006  yamt sync with head.
 1.1.2.1  09-Sep-2006  yamt file if_mskvar.h was added on branch yamt-pdpolicy on 2006-09-14 12:31:33 +0000
 1.3.2.1  12-Mar-2007  rmind Sync with HEAD.
 1.4.36.3  29-Jun-2008  mjf Sync with HEAD.
 1.4.36.2  02-Jun-2008  mjf Sync with HEAD.
 1.4.36.1  03-Apr-2008  mjf Sync with HEAD.
 1.5.4.3  11-Mar-2010  yamt sync with head
 1.5.4.2  04-May-2009  yamt sync with head.
 1.5.4.1  16-May-2008  yamt sync with head.
 1.5.2.1  18-May-2008  yamt sync with head.
 1.6.4.1  27-Jun-2008  simonb Sync with head.
 1.6.2.1  23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.8.12.2  30-Oct-2012  yamt sync with head
 1.8.12.1  17-Apr-2012  yamt sync with head
 1.9.2.1  18-Feb-2012  mrg merge to -current.
 1.10.6.2  03-Dec-2017  jdolecek update from HEAD
 1.10.6.1  20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.11.14.1  06-Jun-2015  skrll Sync with HEAD
 1.12.16.5  18-Jan-2019  pgoyette Synch with HEAD
 1.12.16.4  26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.12.16.3  30-Sep-2018  pgoyette Ssync with HEAD
 1.12.16.2  28-Jul-2018  pgoyette Sync with HEAD
 1.12.16.1  25-Jun-2018  pgoyette Sync with HEAD
 1.14.2.2  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.14.2.1  10-Jun-2019  christos Sync with HEAD

RSS XML Feed