History log of /openbsd-current/sys/dev/pci/if_skreg.h
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.64 21-Feb-2022 jsg

receice -> receive


# 1.63 09-Jan-2022 jsg

spelling
feedback and ok tb@ jmc@ ok ratchov@


# 1.62 02-Jan-2022 jsg

addres -> address


Revision tags: OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE
# 1.61 08-Apr-2017 jmatthew

Use ADDR64 opcodes to specify 64bit DMA addresses for all buffers. This
consumes two ring entries per segment, halving the effective size of the
rings, but keeps things simple. This is required for the onboard nic
on the Overdrive 1000 to work.

ok kettenis@, tested on i386 by jsg@


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE
# 1.60 04-Nov-2014 brad

Commit a missing chunk of the diff I had sent out to recognize some
newer Yukon chipsets.

Pointed out by jsg@


# 1.59 04-Oct-2014 brad

- Recognize the Yukon Prime and Yukon Optima 2 chipsets.
- Recognize some more revs of the EC U and Supreme chipsets.
- Add the PCI id for the Yukon 88E8079.

ok jsg@


Revision tags: OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.58 17-Mar-2013 brad

Correct the clock speeds used to calculate int moderation values provided
by the SK_IM_USECS() macro.

From FreeBSD

ok sthen@


Revision tags: OPENBSD_5_3_BASE
# 1.57 18-Oct-2012 deraadt

Convert a number of old private copies of code which predates
pci_set_powerstate() to using it instead. Many of these chunks of code had
bugs in them, especially missing delay() calls. Some of them were doing
things our PCI subsystem is now responsible for handling. If you have
any of the affected devices, please keep an eye out for regressions.
ok kettenis


Revision tags: OPENBSD_5_2_BASE
# 1.56 28-Mar-2012 jsg

Take some additional steps needed to make the PHY on EC Ultra/8056
work correctly, based on similiar changes in FreeBSD.

Originally from Brad Davis but changed quite a bit by claudio kettenis
and myself since. ok kettenis@, earlier version ok claudio@


Revision tags: OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE
# 1.55 17-Nov-2010 kevlo

the text editor sucks


# 1.54 17-Nov-2010 kevlo

Add support for Marvell 88E8059, found in HP mini 5102.
Tested by Frans Haarman <franshaarman at gmail.com>

ok jsg@


Revision tags: OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE
# 1.53 29-Mar-2009 jsg

Bypass macsec on extreme/supreme based chips.
Makes my 88E8072 work.

ok kettenis@


# 1.52 27-Mar-2009 jsg

add definitions for more yukon 2 revisions found in linux driver
(which tend to be required to know which of the many bugs we will need
to work around before each particular revision of hardware will
actually work).
ok kettenis@


# 1.51 16-Mar-2009 deraadt

88E8057 is a Yukon 2 Ultra 2, and this might make it work on a little
shiny green box in Japan
ok kettenis


Revision tags: OPENBSD_4_5_BASE
# 1.50 20-Oct-2008 brad

typo, regisrers -> registers


Revision tags: OPENBSD_4_4_BASE
# 1.49 10-Jun-2008 brad

g/c unused defines.


Revision tags: OPENBSD_4_3_BASE
# 1.48 14-Feb-2008 brad

Missed updating the SK_IS_YUKON2 macro when adding Yukon Supreme support.

ok kettenis@ dlg@


# 1.47 03-Feb-2008 brad

- add initial support for the Marvell Yukon Supreme ASIC.

Inspired by similar changes to the Linux sky2 driver.

ok kettenis@ dlg@


# 1.46 13-Oct-2007 kettenis

Add Yukon-2 PHY powerdown bits.


# 1.45 02-Oct-2007 brad

add initial support for the Marvell PCIe Yukon FE+ Fast Ethernet chipsets.

Inspired by similar changes to the Linux sky2 driver.

Tested by dunceor, Schoeberle Daniel, moritz@ and brad@ on existing
known working adapters. These chipsets are not actually available
in hardware yet.

ok dlg@


Revision tags: OPENBSD_4_1_BASE OPENBSD_4_2_BASE
# 1.44 26-Feb-2007 kettenis

Fix Rx FIFO constants. From brad@


# 1.43 10-Feb-2007 kettenis

Add preliminary support for Marvell Yukon-II Extreme chips.
Based on a diff from brad@.


# 1.42 10-Feb-2007 krw

Move HASH_BITS constant to if_skreg.h as SK_HASH_BITS. Remove unused
code and an unnecessary comment, No functional change.

From brad@.


# 1.41 23-Nov-2006 kettenis

Set some more power management bits; makes Yukon-2 XL work somewhat.

ok brad@


# 1.40 16-Nov-2006 brad

have SK_IS_YUKON only match for first generation Yukon chipsets.


Revision tags: OPENBSD_4_0_BASE
# 1.39 20-Aug-2006 brad

For consistency with MSK_JSLOTS, go back to using the macro to figure out
the number of Jumbo receive slots for SK_JSLOTS. no-op change.


# 1.38 19-Aug-2006 kettenis

Make sure Rx timestamps are disabled.


# 1.37 16-Aug-2006 kettenis

Enter msk(4), an initial stab at a driver for the Marvell Yukon-2 Gigabit
ethernet controllers. It works well enough to commit over. There's a lot
code duplication from sk(4) though that needs to be reduced.


# 1.36 16-Aug-2006 brad

remove the sparc64 workarounds for the jumbo frame receive ring sizes now
that the iommu code has been fixed.


# 1.35 30-Jul-2006 brad

missed this part of the more strict receive path packet validation
routine commit.


# 1.34 23-Jun-2006 brad

bump up the RX ring count on sparc64 a little bit.


# 1.33 22-Jun-2006 brad

lower the RX ring count and Jumbo slots on sparc64 as a workaround.

ok reyk@


# 1.32 08-Jun-2006 brad

actually enable/disable the Tx BMU descriptor polling, missed in rev 1.107.

ok krw@


# 1.31 28-May-2006 brad

- remove ETHER_MAX_LEN_JUMBO and ETHERMTU_JUMBO.
- use if_hardmtu for MTU ioctl handlers.

ok reyk@


# 1.30 30-Apr-2006 brad

- Use SK_IS_GENESIS/SK_IS_YUKON where appropriate
- Remove SK_YUKON_FAMILY


# 1.29 30-Apr-2006 brad

- Added/corrected register definitions for Yukon.
(Register information from Linux skge driver.)

From FreeBSD


Revision tags: OPENBSD_3_9_BASE
# 1.28 09-Feb-2006 brad

add defines for Yukon XL and Yukon EC Ultra revisions.


# 1.27 08-Feb-2006 brad

lower the number of Jumbo slots on sparc64.


# 1.26 22-Dec-2005 brad

re-work PHY setup, media handling and dual-port detection.

Based on the Marvell FreeBSD driver.


# 1.25 26-Nov-2005 brad

fix interrupt moderation timer frequencies for Yukon and Yukon-II based
chips.

From Jeff Rizzo on NetBSD's tech-net list, based on the Marvell
sk98lin Linux driver, and also matches what the Marvell FreeBSD
does.


# 1.24 15-Oct-2005 brad

add 2 new Yukon PCI ids and recognize Yukon-2 EC Ultra ASIC.


# 1.23 20-Sep-2005 brad

memory, media handling and a bunch of register definitions for Yukon-2.

From jason@


# 1.22 20-Sep-2005 brad

merge xmaciireg.h and yukonreg.h into if_skreg.h


# 1.21 20-Sep-2005 brad

shuffle some stuff from skreg to skvar


# 1.20 17-Sep-2005 brad

remove VPD bits


# 1.19 17-Sep-2005 brad

add media detection and dual port detection for Yukon-2.

from jason@


# 1.18 16-Sep-2005 brad

- remove code to read PCI VPD as we do not use that anymore.
- remove some FreeBSD-ism's: struct resource *'s.
- fail more gracefully in sk_probe() instead of in sk_attach()
for newer unsupported ASIC revisions.

From jason@


Revision tags: OPENBSD_3_8_BASE
# 1.17 21-Jul-2005 brad

- add bus_dmamap_sync()'s; From NetBSD
- use pci_mapreg_map()
- remove unnecessary splimp() usage in skc_attach()
- make sure to disestablish the interrupt on failure

Tested by a few end-users.


Revision tags: OPENBSD_3_7_BASE
# 1.16 14-Mar-2005 brad

more Yukon models and Yukon EC revs.


# 1.15 02-Jan-2005 brad

ugh, need this too for the last commit to sk(4).


# 1.14 16-Nov-2004 brad

back out previous commit and put the right change in which corresponds
to what the previous commit message said...

Fix tx queue (slist can be corrupted when tx interrupts hit within tx_encap).


Revision tags: OPENBSD_3_6_BASE
# 1.13 05-Aug-2004 brad

remove some separate per driver constants and use
ETHER_MAX_LEN_JUMBO/ETHERMTU_JUMBO where appropriate.

ok mcbride@ henning@ mickey@


# 1.12 04-Aug-2004 mcbride

Make jumbo frames work.
- allocate and manage our own memory for rx packets rather than using
mbuf clusters; code for this lifted from if_bge.c
- pass the correct size to bus_dmamap_create()

ok deraadt@


Revision tags: SMP_SYNC_A SMP_SYNC_B
# 1.11 19-May-2004 brad

remove duplication, use ETHER_ALIGN from if_ether.h


Revision tags: OPENBSD_3_4_BASE OPENBSD_3_5_BASE
# 1.10 12-Aug-2003 nate

add/update my copyright


# 1.9 01-Aug-2003 nate

Support for new Marvell based Gigabit Ethernet adapters
ok deraadt@


Revision tags: UBC_SYNC_A
# 1.8 14-May-2003 nate

Makefile sk(4) use bus_dma
ok jason


Revision tags: OPENBSD_3_3_BASE
# 1.7 11-Feb-2003 mickey

be consistant on Hz vs hz


Revision tags: OPENBSD_3_0_BASE OPENBSD_3_1_BASE OPENBSD_3_2_BASE UBC_BASE UBC_SYNC_B
# 1.6 23-Jun-2001 fgsch

branches: 1.6.4;
More constants cleaning.


Revision tags: OPENBSD_2_8_BASE OPENBSD_2_9_BASE
# 1.5 29-Aug-2000 jason

From FreeBSD: split out the support for XMAC-II phys and other phys
add xmphy & brgphy to GENERIC


Revision tags: OPENBSD_2_6_BASE OPENBSD_2_7_BASE SMP_BASE kame_19991208
# 1.4 22-Oct-1999 deraadt

branches: 1.4.4;
fix some panic bugs; jason


# 1.3 03-Oct-1999 jason

take advantage of m->m_ext.ext_handle for storing the softc
(instead of stashing it in the buffer)


# 1.2 01-Oct-1999 jason

oops... $OpenBSD$ tags


# 1.1 01-Oct-1999 jason

driver for SysKonnect 984x gigabit ethernet adapters; from FreeBSD


# 1.63 09-Jan-2022 jsg

spelling
feedback and ok tb@ jmc@ ok ratchov@


# 1.62 02-Jan-2022 jsg

addres -> address


Revision tags: OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE
# 1.61 08-Apr-2017 jmatthew

Use ADDR64 opcodes to specify 64bit DMA addresses for all buffers. This
consumes two ring entries per segment, halving the effective size of the
rings, but keeps things simple. This is required for the onboard nic
on the Overdrive 1000 to work.

ok kettenis@, tested on i386 by jsg@


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE
# 1.60 04-Nov-2014 brad

Commit a missing chunk of the diff I had sent out to recognize some
newer Yukon chipsets.

Pointed out by jsg@


# 1.59 04-Oct-2014 brad

- Recognize the Yukon Prime and Yukon Optima 2 chipsets.
- Recognize some more revs of the EC U and Supreme chipsets.
- Add the PCI id for the Yukon 88E8079.

ok jsg@


Revision tags: OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.58 17-Mar-2013 brad

Correct the clock speeds used to calculate int moderation values provided
by the SK_IM_USECS() macro.

From FreeBSD

ok sthen@


Revision tags: OPENBSD_5_3_BASE
# 1.57 18-Oct-2012 deraadt

Convert a number of old private copies of code which predates
pci_set_powerstate() to using it instead. Many of these chunks of code had
bugs in them, especially missing delay() calls. Some of them were doing
things our PCI subsystem is now responsible for handling. If you have
any of the affected devices, please keep an eye out for regressions.
ok kettenis


Revision tags: OPENBSD_5_2_BASE
# 1.56 28-Mar-2012 jsg

Take some additional steps needed to make the PHY on EC Ultra/8056
work correctly, based on similiar changes in FreeBSD.

Originally from Brad Davis but changed quite a bit by claudio kettenis
and myself since. ok kettenis@, earlier version ok claudio@


Revision tags: OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE
# 1.55 17-Nov-2010 kevlo

the text editor sucks


# 1.54 17-Nov-2010 kevlo

Add support for Marvell 88E8059, found in HP mini 5102.
Tested by Frans Haarman <franshaarman at gmail.com>

ok jsg@


Revision tags: OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE
# 1.53 29-Mar-2009 jsg

Bypass macsec on extreme/supreme based chips.
Makes my 88E8072 work.

ok kettenis@


# 1.52 27-Mar-2009 jsg

add definitions for more yukon 2 revisions found in linux driver
(which tend to be required to know which of the many bugs we will need
to work around before each particular revision of hardware will
actually work).
ok kettenis@


# 1.51 16-Mar-2009 deraadt

88E8057 is a Yukon 2 Ultra 2, and this might make it work on a little
shiny green box in Japan
ok kettenis


Revision tags: OPENBSD_4_5_BASE
# 1.50 20-Oct-2008 brad

typo, regisrers -> registers


Revision tags: OPENBSD_4_4_BASE
# 1.49 10-Jun-2008 brad

g/c unused defines.


Revision tags: OPENBSD_4_3_BASE
# 1.48 14-Feb-2008 brad

Missed updating the SK_IS_YUKON2 macro when adding Yukon Supreme support.

ok kettenis@ dlg@


# 1.47 03-Feb-2008 brad

- add initial support for the Marvell Yukon Supreme ASIC.

Inspired by similar changes to the Linux sky2 driver.

ok kettenis@ dlg@


# 1.46 13-Oct-2007 kettenis

Add Yukon-2 PHY powerdown bits.


# 1.45 02-Oct-2007 brad

add initial support for the Marvell PCIe Yukon FE+ Fast Ethernet chipsets.

Inspired by similar changes to the Linux sky2 driver.

Tested by dunceor, Schoeberle Daniel, moritz@ and brad@ on existing
known working adapters. These chipsets are not actually available
in hardware yet.

ok dlg@


Revision tags: OPENBSD_4_1_BASE OPENBSD_4_2_BASE
# 1.44 26-Feb-2007 kettenis

Fix Rx FIFO constants. From brad@


# 1.43 10-Feb-2007 kettenis

Add preliminary support for Marvell Yukon-II Extreme chips.
Based on a diff from brad@.


# 1.42 10-Feb-2007 krw

Move HASH_BITS constant to if_skreg.h as SK_HASH_BITS. Remove unused
code and an unnecessary comment, No functional change.

From brad@.


# 1.41 23-Nov-2006 kettenis

Set some more power management bits; makes Yukon-2 XL work somewhat.

ok brad@


# 1.40 16-Nov-2006 brad

have SK_IS_YUKON only match for first generation Yukon chipsets.


Revision tags: OPENBSD_4_0_BASE
# 1.39 20-Aug-2006 brad

For consistency with MSK_JSLOTS, go back to using the macro to figure out
the number of Jumbo receive slots for SK_JSLOTS. no-op change.


# 1.38 19-Aug-2006 kettenis

Make sure Rx timestamps are disabled.


# 1.37 16-Aug-2006 kettenis

Enter msk(4), an initial stab at a driver for the Marvell Yukon-2 Gigabit
ethernet controllers. It works well enough to commit over. There's a lot
code duplication from sk(4) though that needs to be reduced.


# 1.36 16-Aug-2006 brad

remove the sparc64 workarounds for the jumbo frame receive ring sizes now
that the iommu code has been fixed.


# 1.35 30-Jul-2006 brad

missed this part of the more strict receive path packet validation
routine commit.


# 1.34 23-Jun-2006 brad

bump up the RX ring count on sparc64 a little bit.


# 1.33 22-Jun-2006 brad

lower the RX ring count and Jumbo slots on sparc64 as a workaround.

ok reyk@


# 1.32 08-Jun-2006 brad

actually enable/disable the Tx BMU descriptor polling, missed in rev 1.107.

ok krw@


# 1.31 28-May-2006 brad

- remove ETHER_MAX_LEN_JUMBO and ETHERMTU_JUMBO.
- use if_hardmtu for MTU ioctl handlers.

ok reyk@


# 1.30 30-Apr-2006 brad

- Use SK_IS_GENESIS/SK_IS_YUKON where appropriate
- Remove SK_YUKON_FAMILY


# 1.29 30-Apr-2006 brad

- Added/corrected register definitions for Yukon.
(Register information from Linux skge driver.)

From FreeBSD


Revision tags: OPENBSD_3_9_BASE
# 1.28 09-Feb-2006 brad

add defines for Yukon XL and Yukon EC Ultra revisions.


# 1.27 08-Feb-2006 brad

lower the number of Jumbo slots on sparc64.


# 1.26 22-Dec-2005 brad

re-work PHY setup, media handling and dual-port detection.

Based on the Marvell FreeBSD driver.


# 1.25 26-Nov-2005 brad

fix interrupt moderation timer frequencies for Yukon and Yukon-II based
chips.

From Jeff Rizzo on NetBSD's tech-net list, based on the Marvell
sk98lin Linux driver, and also matches what the Marvell FreeBSD
does.


# 1.24 15-Oct-2005 brad

add 2 new Yukon PCI ids and recognize Yukon-2 EC Ultra ASIC.


# 1.23 20-Sep-2005 brad

memory, media handling and a bunch of register definitions for Yukon-2.

From jason@


# 1.22 20-Sep-2005 brad

merge xmaciireg.h and yukonreg.h into if_skreg.h


# 1.21 20-Sep-2005 brad

shuffle some stuff from skreg to skvar


# 1.20 17-Sep-2005 brad

remove VPD bits


# 1.19 17-Sep-2005 brad

add media detection and dual port detection for Yukon-2.

from jason@


# 1.18 16-Sep-2005 brad

- remove code to read PCI VPD as we do not use that anymore.
- remove some FreeBSD-ism's: struct resource *'s.
- fail more gracefully in sk_probe() instead of in sk_attach()
for newer unsupported ASIC revisions.

From jason@


Revision tags: OPENBSD_3_8_BASE
# 1.17 21-Jul-2005 brad

- add bus_dmamap_sync()'s; From NetBSD
- use pci_mapreg_map()
- remove unnecessary splimp() usage in skc_attach()
- make sure to disestablish the interrupt on failure

Tested by a few end-users.


Revision tags: OPENBSD_3_7_BASE
# 1.16 14-Mar-2005 brad

more Yukon models and Yukon EC revs.


# 1.15 02-Jan-2005 brad

ugh, need this too for the last commit to sk(4).


# 1.14 16-Nov-2004 brad

back out previous commit and put the right change in which corresponds
to what the previous commit message said...

Fix tx queue (slist can be corrupted when tx interrupts hit within tx_encap).


Revision tags: OPENBSD_3_6_BASE
# 1.13 05-Aug-2004 brad

remove some separate per driver constants and use
ETHER_MAX_LEN_JUMBO/ETHERMTU_JUMBO where appropriate.

ok mcbride@ henning@ mickey@


# 1.12 04-Aug-2004 mcbride

Make jumbo frames work.
- allocate and manage our own memory for rx packets rather than using
mbuf clusters; code for this lifted from if_bge.c
- pass the correct size to bus_dmamap_create()

ok deraadt@


Revision tags: SMP_SYNC_A SMP_SYNC_B
# 1.11 19-May-2004 brad

remove duplication, use ETHER_ALIGN from if_ether.h


Revision tags: OPENBSD_3_4_BASE OPENBSD_3_5_BASE
# 1.10 12-Aug-2003 nate

add/update my copyright


# 1.9 01-Aug-2003 nate

Support for new Marvell based Gigabit Ethernet adapters
ok deraadt@


Revision tags: UBC_SYNC_A
# 1.8 14-May-2003 nate

Makefile sk(4) use bus_dma
ok jason


Revision tags: OPENBSD_3_3_BASE
# 1.7 11-Feb-2003 mickey

be consistant on Hz vs hz


Revision tags: OPENBSD_3_0_BASE OPENBSD_3_1_BASE OPENBSD_3_2_BASE UBC_BASE UBC_SYNC_B
# 1.6 23-Jun-2001 fgsch

branches: 1.6.4;
More constants cleaning.


Revision tags: OPENBSD_2_8_BASE OPENBSD_2_9_BASE
# 1.5 29-Aug-2000 jason

From FreeBSD: split out the support for XMAC-II phys and other phys
add xmphy & brgphy to GENERIC


Revision tags: OPENBSD_2_6_BASE OPENBSD_2_7_BASE SMP_BASE kame_19991208
# 1.4 22-Oct-1999 deraadt

branches: 1.4.4;
fix some panic bugs; jason


# 1.3 03-Oct-1999 jason

take advantage of m->m_ext.ext_handle for storing the softc
(instead of stashing it in the buffer)


# 1.2 01-Oct-1999 jason

oops... $OpenBSD$ tags


# 1.1 01-Oct-1999 jason

driver for SysKonnect 984x gigabit ethernet adapters; from FreeBSD


# 1.62 02-Jan-2022 jsg

addres -> address


Revision tags: OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE
# 1.61 08-Apr-2017 jmatthew

Use ADDR64 opcodes to specify 64bit DMA addresses for all buffers. This
consumes two ring entries per segment, halving the effective size of the
rings, but keeps things simple. This is required for the onboard nic
on the Overdrive 1000 to work.

ok kettenis@, tested on i386 by jsg@


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE
# 1.60 04-Nov-2014 brad

Commit a missing chunk of the diff I had sent out to recognize some
newer Yukon chipsets.

Pointed out by jsg@


# 1.59 04-Oct-2014 brad

- Recognize the Yukon Prime and Yukon Optima 2 chipsets.
- Recognize some more revs of the EC U and Supreme chipsets.
- Add the PCI id for the Yukon 88E8079.

ok jsg@


Revision tags: OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.58 17-Mar-2013 brad

Correct the clock speeds used to calculate int moderation values provided
by the SK_IM_USECS() macro.

From FreeBSD

ok sthen@


Revision tags: OPENBSD_5_3_BASE
# 1.57 18-Oct-2012 deraadt

Convert a number of old private copies of code which predates
pci_set_powerstate() to using it instead. Many of these chunks of code had
bugs in them, especially missing delay() calls. Some of them were doing
things our PCI subsystem is now responsible for handling. If you have
any of the affected devices, please keep an eye out for regressions.
ok kettenis


Revision tags: OPENBSD_5_2_BASE
# 1.56 28-Mar-2012 jsg

Take some additional steps needed to make the PHY on EC Ultra/8056
work correctly, based on similiar changes in FreeBSD.

Originally from Brad Davis but changed quite a bit by claudio kettenis
and myself since. ok kettenis@, earlier version ok claudio@


Revision tags: OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE
# 1.55 17-Nov-2010 kevlo

the text editor sucks


# 1.54 17-Nov-2010 kevlo

Add support for Marvell 88E8059, found in HP mini 5102.
Tested by Frans Haarman <franshaarman at gmail.com>

ok jsg@


Revision tags: OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE
# 1.53 29-Mar-2009 jsg

Bypass macsec on extreme/supreme based chips.
Makes my 88E8072 work.

ok kettenis@


# 1.52 27-Mar-2009 jsg

add definitions for more yukon 2 revisions found in linux driver
(which tend to be required to know which of the many bugs we will need
to work around before each particular revision of hardware will
actually work).
ok kettenis@


# 1.51 16-Mar-2009 deraadt

88E8057 is a Yukon 2 Ultra 2, and this might make it work on a little
shiny green box in Japan
ok kettenis


Revision tags: OPENBSD_4_5_BASE
# 1.50 20-Oct-2008 brad

typo, regisrers -> registers


Revision tags: OPENBSD_4_4_BASE
# 1.49 10-Jun-2008 brad

g/c unused defines.


Revision tags: OPENBSD_4_3_BASE
# 1.48 14-Feb-2008 brad

Missed updating the SK_IS_YUKON2 macro when adding Yukon Supreme support.

ok kettenis@ dlg@


# 1.47 03-Feb-2008 brad

- add initial support for the Marvell Yukon Supreme ASIC.

Inspired by similar changes to the Linux sky2 driver.

ok kettenis@ dlg@


# 1.46 13-Oct-2007 kettenis

Add Yukon-2 PHY powerdown bits.


# 1.45 02-Oct-2007 brad

add initial support for the Marvell PCIe Yukon FE+ Fast Ethernet chipsets.

Inspired by similar changes to the Linux sky2 driver.

Tested by dunceor, Schoeberle Daniel, moritz@ and brad@ on existing
known working adapters. These chipsets are not actually available
in hardware yet.

ok dlg@


Revision tags: OPENBSD_4_1_BASE OPENBSD_4_2_BASE
# 1.44 26-Feb-2007 kettenis

Fix Rx FIFO constants. From brad@


# 1.43 10-Feb-2007 kettenis

Add preliminary support for Marvell Yukon-II Extreme chips.
Based on a diff from brad@.


# 1.42 10-Feb-2007 krw

Move HASH_BITS constant to if_skreg.h as SK_HASH_BITS. Remove unused
code and an unnecessary comment, No functional change.

From brad@.


# 1.41 23-Nov-2006 kettenis

Set some more power management bits; makes Yukon-2 XL work somewhat.

ok brad@


# 1.40 16-Nov-2006 brad

have SK_IS_YUKON only match for first generation Yukon chipsets.


Revision tags: OPENBSD_4_0_BASE
# 1.39 20-Aug-2006 brad

For consistency with MSK_JSLOTS, go back to using the macro to figure out
the number of Jumbo receive slots for SK_JSLOTS. no-op change.


# 1.38 19-Aug-2006 kettenis

Make sure Rx timestamps are disabled.


# 1.37 16-Aug-2006 kettenis

Enter msk(4), an initial stab at a driver for the Marvell Yukon-2 Gigabit
ethernet controllers. It works well enough to commit over. There's a lot
code duplication from sk(4) though that needs to be reduced.


# 1.36 16-Aug-2006 brad

remove the sparc64 workarounds for the jumbo frame receive ring sizes now
that the iommu code has been fixed.


# 1.35 30-Jul-2006 brad

missed this part of the more strict receive path packet validation
routine commit.


# 1.34 23-Jun-2006 brad

bump up the RX ring count on sparc64 a little bit.


# 1.33 22-Jun-2006 brad

lower the RX ring count and Jumbo slots on sparc64 as a workaround.

ok reyk@


# 1.32 08-Jun-2006 brad

actually enable/disable the Tx BMU descriptor polling, missed in rev 1.107.

ok krw@


# 1.31 28-May-2006 brad

- remove ETHER_MAX_LEN_JUMBO and ETHERMTU_JUMBO.
- use if_hardmtu for MTU ioctl handlers.

ok reyk@


# 1.30 30-Apr-2006 brad

- Use SK_IS_GENESIS/SK_IS_YUKON where appropriate
- Remove SK_YUKON_FAMILY


# 1.29 30-Apr-2006 brad

- Added/corrected register definitions for Yukon.
(Register information from Linux skge driver.)

From FreeBSD


Revision tags: OPENBSD_3_9_BASE
# 1.28 09-Feb-2006 brad

add defines for Yukon XL and Yukon EC Ultra revisions.


# 1.27 08-Feb-2006 brad

lower the number of Jumbo slots on sparc64.


# 1.26 22-Dec-2005 brad

re-work PHY setup, media handling and dual-port detection.

Based on the Marvell FreeBSD driver.


# 1.25 26-Nov-2005 brad

fix interrupt moderation timer frequencies for Yukon and Yukon-II based
chips.

From Jeff Rizzo on NetBSD's tech-net list, based on the Marvell
sk98lin Linux driver, and also matches what the Marvell FreeBSD
does.


# 1.24 15-Oct-2005 brad

add 2 new Yukon PCI ids and recognize Yukon-2 EC Ultra ASIC.


# 1.23 20-Sep-2005 brad

memory, media handling and a bunch of register definitions for Yukon-2.

From jason@


# 1.22 20-Sep-2005 brad

merge xmaciireg.h and yukonreg.h into if_skreg.h


# 1.21 20-Sep-2005 brad

shuffle some stuff from skreg to skvar


# 1.20 17-Sep-2005 brad

remove VPD bits


# 1.19 17-Sep-2005 brad

add media detection and dual port detection for Yukon-2.

from jason@


# 1.18 16-Sep-2005 brad

- remove code to read PCI VPD as we do not use that anymore.
- remove some FreeBSD-ism's: struct resource *'s.
- fail more gracefully in sk_probe() instead of in sk_attach()
for newer unsupported ASIC revisions.

From jason@


Revision tags: OPENBSD_3_8_BASE
# 1.17 21-Jul-2005 brad

- add bus_dmamap_sync()'s; From NetBSD
- use pci_mapreg_map()
- remove unnecessary splimp() usage in skc_attach()
- make sure to disestablish the interrupt on failure

Tested by a few end-users.


Revision tags: OPENBSD_3_7_BASE
# 1.16 14-Mar-2005 brad

more Yukon models and Yukon EC revs.


# 1.15 02-Jan-2005 brad

ugh, need this too for the last commit to sk(4).


# 1.14 16-Nov-2004 brad

back out previous commit and put the right change in which corresponds
to what the previous commit message said...

Fix tx queue (slist can be corrupted when tx interrupts hit within tx_encap).


Revision tags: OPENBSD_3_6_BASE
# 1.13 05-Aug-2004 brad

remove some separate per driver constants and use
ETHER_MAX_LEN_JUMBO/ETHERMTU_JUMBO where appropriate.

ok mcbride@ henning@ mickey@


# 1.12 04-Aug-2004 mcbride

Make jumbo frames work.
- allocate and manage our own memory for rx packets rather than using
mbuf clusters; code for this lifted from if_bge.c
- pass the correct size to bus_dmamap_create()

ok deraadt@


Revision tags: SMP_SYNC_A SMP_SYNC_B
# 1.11 19-May-2004 brad

remove duplication, use ETHER_ALIGN from if_ether.h


Revision tags: OPENBSD_3_4_BASE OPENBSD_3_5_BASE
# 1.10 12-Aug-2003 nate

add/update my copyright


# 1.9 01-Aug-2003 nate

Support for new Marvell based Gigabit Ethernet adapters
ok deraadt@


Revision tags: UBC_SYNC_A
# 1.8 14-May-2003 nate

Makefile sk(4) use bus_dma
ok jason


Revision tags: OPENBSD_3_3_BASE
# 1.7 11-Feb-2003 mickey

be consistant on Hz vs hz


Revision tags: OPENBSD_3_0_BASE OPENBSD_3_1_BASE OPENBSD_3_2_BASE UBC_BASE UBC_SYNC_B
# 1.6 23-Jun-2001 fgsch

branches: 1.6.4;
More constants cleaning.


Revision tags: OPENBSD_2_8_BASE OPENBSD_2_9_BASE
# 1.5 29-Aug-2000 jason

From FreeBSD: split out the support for XMAC-II phys and other phys
add xmphy & brgphy to GENERIC


Revision tags: OPENBSD_2_6_BASE OPENBSD_2_7_BASE SMP_BASE kame_19991208
# 1.4 22-Oct-1999 deraadt

branches: 1.4.4;
fix some panic bugs; jason


# 1.3 03-Oct-1999 jason

take advantage of m->m_ext.ext_handle for storing the softc
(instead of stashing it in the buffer)


# 1.2 01-Oct-1999 jason

oops... $OpenBSD$ tags


# 1.1 01-Oct-1999 jason

driver for SysKonnect 984x gigabit ethernet adapters; from FreeBSD


Revision tags: OPENBSD_6_2_BASE
# 1.61 08-Apr-2017 jmatthew

Use ADDR64 opcodes to specify 64bit DMA addresses for all buffers. This
consumes two ring entries per segment, halving the effective size of the
rings, but keeps things simple. This is required for the onboard nic
on the Overdrive 1000 to work.

ok kettenis@, tested on i386 by jsg@


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE
# 1.60 04-Nov-2014 brad

Commit a missing chunk of the diff I had sent out to recognize some
newer Yukon chipsets.

Pointed out by jsg@


# 1.59 04-Oct-2014 brad

- Recognize the Yukon Prime and Yukon Optima 2 chipsets.
- Recognize some more revs of the EC U and Supreme chipsets.
- Add the PCI id for the Yukon 88E8079.

ok jsg@


Revision tags: OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.58 17-Mar-2013 brad

Correct the clock speeds used to calculate int moderation values provided
by the SK_IM_USECS() macro.

From FreeBSD

ok sthen@


Revision tags: OPENBSD_5_3_BASE
# 1.57 18-Oct-2012 deraadt

Convert a number of old private copies of code which predates
pci_set_powerstate() to using it instead. Many of these chunks of code had
bugs in them, especially missing delay() calls. Some of them were doing
things our PCI subsystem is now responsible for handling. If you have
any of the affected devices, please keep an eye out for regressions.
ok kettenis


Revision tags: OPENBSD_5_2_BASE
# 1.56 28-Mar-2012 jsg

Take some additional steps needed to make the PHY on EC Ultra/8056
work correctly, based on similiar changes in FreeBSD.

Originally from Brad Davis but changed quite a bit by claudio kettenis
and myself since. ok kettenis@, earlier version ok claudio@


Revision tags: OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE
# 1.55 17-Nov-2010 kevlo

the text editor sucks


# 1.54 17-Nov-2010 kevlo

Add support for Marvell 88E8059, found in HP mini 5102.
Tested by Frans Haarman <franshaarman at gmail.com>

ok jsg@


Revision tags: OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE
# 1.53 29-Mar-2009 jsg

Bypass macsec on extreme/supreme based chips.
Makes my 88E8072 work.

ok kettenis@


# 1.52 27-Mar-2009 jsg

add definitions for more yukon 2 revisions found in linux driver
(which tend to be required to know which of the many bugs we will need
to work around before each particular revision of hardware will
actually work).
ok kettenis@


# 1.51 16-Mar-2009 deraadt

88E8057 is a Yukon 2 Ultra 2, and this might make it work on a little
shiny green box in Japan
ok kettenis


Revision tags: OPENBSD_4_5_BASE
# 1.50 20-Oct-2008 brad

typo, regisrers -> registers


Revision tags: OPENBSD_4_4_BASE
# 1.49 10-Jun-2008 brad

g/c unused defines.


Revision tags: OPENBSD_4_3_BASE
# 1.48 14-Feb-2008 brad

Missed updating the SK_IS_YUKON2 macro when adding Yukon Supreme support.

ok kettenis@ dlg@


# 1.47 03-Feb-2008 brad

- add initial support for the Marvell Yukon Supreme ASIC.

Inspired by similar changes to the Linux sky2 driver.

ok kettenis@ dlg@


# 1.46 13-Oct-2007 kettenis

Add Yukon-2 PHY powerdown bits.


# 1.45 02-Oct-2007 brad

add initial support for the Marvell PCIe Yukon FE+ Fast Ethernet chipsets.

Inspired by similar changes to the Linux sky2 driver.

Tested by dunceor, Schoeberle Daniel, moritz@ and brad@ on existing
known working adapters. These chipsets are not actually available
in hardware yet.

ok dlg@


Revision tags: OPENBSD_4_1_BASE OPENBSD_4_2_BASE
# 1.44 26-Feb-2007 kettenis

Fix Rx FIFO constants. From brad@


# 1.43 10-Feb-2007 kettenis

Add preliminary support for Marvell Yukon-II Extreme chips.
Based on a diff from brad@.


# 1.42 10-Feb-2007 krw

Move HASH_BITS constant to if_skreg.h as SK_HASH_BITS. Remove unused
code and an unnecessary comment, No functional change.

From brad@.


# 1.41 23-Nov-2006 kettenis

Set some more power management bits; makes Yukon-2 XL work somewhat.

ok brad@


# 1.40 16-Nov-2006 brad

have SK_IS_YUKON only match for first generation Yukon chipsets.


Revision tags: OPENBSD_4_0_BASE
# 1.39 20-Aug-2006 brad

For consistency with MSK_JSLOTS, go back to using the macro to figure out
the number of Jumbo receive slots for SK_JSLOTS. no-op change.


# 1.38 19-Aug-2006 kettenis

Make sure Rx timestamps are disabled.


# 1.37 16-Aug-2006 kettenis

Enter msk(4), an initial stab at a driver for the Marvell Yukon-2 Gigabit
ethernet controllers. It works well enough to commit over. There's a lot
code duplication from sk(4) though that needs to be reduced.


# 1.36 16-Aug-2006 brad

remove the sparc64 workarounds for the jumbo frame receive ring sizes now
that the iommu code has been fixed.


# 1.35 30-Jul-2006 brad

missed this part of the more strict receive path packet validation
routine commit.


# 1.34 23-Jun-2006 brad

bump up the RX ring count on sparc64 a little bit.


# 1.33 22-Jun-2006 brad

lower the RX ring count and Jumbo slots on sparc64 as a workaround.

ok reyk@


# 1.32 08-Jun-2006 brad

actually enable/disable the Tx BMU descriptor polling, missed in rev 1.107.

ok krw@


# 1.31 28-May-2006 brad

- remove ETHER_MAX_LEN_JUMBO and ETHERMTU_JUMBO.
- use if_hardmtu for MTU ioctl handlers.

ok reyk@


# 1.30 30-Apr-2006 brad

- Use SK_IS_GENESIS/SK_IS_YUKON where appropriate
- Remove SK_YUKON_FAMILY


# 1.29 30-Apr-2006 brad

- Added/corrected register definitions for Yukon.
(Register information from Linux skge driver.)

From FreeBSD


Revision tags: OPENBSD_3_9_BASE
# 1.28 09-Feb-2006 brad

add defines for Yukon XL and Yukon EC Ultra revisions.


# 1.27 08-Feb-2006 brad

lower the number of Jumbo slots on sparc64.


# 1.26 22-Dec-2005 brad

re-work PHY setup, media handling and dual-port detection.

Based on the Marvell FreeBSD driver.


# 1.25 26-Nov-2005 brad

fix interrupt moderation timer frequencies for Yukon and Yukon-II based
chips.

From Jeff Rizzo on NetBSD's tech-net list, based on the Marvell
sk98lin Linux driver, and also matches what the Marvell FreeBSD
does.


# 1.24 15-Oct-2005 brad

add 2 new Yukon PCI ids and recognize Yukon-2 EC Ultra ASIC.


# 1.23 20-Sep-2005 brad

memory, media handling and a bunch of register definitions for Yukon-2.

From jason@


# 1.22 20-Sep-2005 brad

merge xmaciireg.h and yukonreg.h into if_skreg.h


# 1.21 20-Sep-2005 brad

shuffle some stuff from skreg to skvar


# 1.20 17-Sep-2005 brad

remove VPD bits


# 1.19 17-Sep-2005 brad

add media detection and dual port detection for Yukon-2.

from jason@


# 1.18 16-Sep-2005 brad

- remove code to read PCI VPD as we do not use that anymore.
- remove some FreeBSD-ism's: struct resource *'s.
- fail more gracefully in sk_probe() instead of in sk_attach()
for newer unsupported ASIC revisions.

From jason@


Revision tags: OPENBSD_3_8_BASE
# 1.17 21-Jul-2005 brad

- add bus_dmamap_sync()'s; From NetBSD
- use pci_mapreg_map()
- remove unnecessary splimp() usage in skc_attach()
- make sure to disestablish the interrupt on failure

Tested by a few end-users.


Revision tags: OPENBSD_3_7_BASE
# 1.16 14-Mar-2005 brad

more Yukon models and Yukon EC revs.


# 1.15 02-Jan-2005 brad

ugh, need this too for the last commit to sk(4).


# 1.14 16-Nov-2004 brad

back out previous commit and put the right change in which corresponds
to what the previous commit message said...

Fix tx queue (slist can be corrupted when tx interrupts hit within tx_encap).


Revision tags: OPENBSD_3_6_BASE
# 1.13 05-Aug-2004 brad

remove some separate per driver constants and use
ETHER_MAX_LEN_JUMBO/ETHERMTU_JUMBO where appropriate.

ok mcbride@ henning@ mickey@


# 1.12 04-Aug-2004 mcbride

Make jumbo frames work.
- allocate and manage our own memory for rx packets rather than using
mbuf clusters; code for this lifted from if_bge.c
- pass the correct size to bus_dmamap_create()

ok deraadt@


Revision tags: SMP_SYNC_A SMP_SYNC_B
# 1.11 19-May-2004 brad

remove duplication, use ETHER_ALIGN from if_ether.h


Revision tags: OPENBSD_3_4_BASE OPENBSD_3_5_BASE
# 1.10 12-Aug-2003 nate

add/update my copyright


# 1.9 01-Aug-2003 nate

Support for new Marvell based Gigabit Ethernet adapters
ok deraadt@


Revision tags: UBC_SYNC_A
# 1.8 14-May-2003 nate

Makefile sk(4) use bus_dma
ok jason


Revision tags: OPENBSD_3_3_BASE
# 1.7 11-Feb-2003 mickey

be consistant on Hz vs hz


Revision tags: OPENBSD_3_0_BASE OPENBSD_3_1_BASE OPENBSD_3_2_BASE UBC_BASE UBC_SYNC_B
# 1.6 23-Jun-2001 fgsch

branches: 1.6.4;
More constants cleaning.


Revision tags: OPENBSD_2_8_BASE OPENBSD_2_9_BASE
# 1.5 29-Aug-2000 jason

From FreeBSD: split out the support for XMAC-II phys and other phys
add xmphy & brgphy to GENERIC


Revision tags: OPENBSD_2_6_BASE OPENBSD_2_7_BASE SMP_BASE kame_19991208
# 1.4 22-Oct-1999 deraadt

branches: 1.4.4;
fix some panic bugs; jason


# 1.3 03-Oct-1999 jason

take advantage of m->m_ext.ext_handle for storing the softc
(instead of stashing it in the buffer)


# 1.2 01-Oct-1999 jason

oops... $OpenBSD$ tags


# 1.1 01-Oct-1999 jason

driver for SysKonnect 984x gigabit ethernet adapters; from FreeBSD