Bug 256000 - [alc] [PATCH] add support for Mikrotik 10/25G NIC
Summary: [alc] [PATCH] add support for Mikrotik 10/25G NIC
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: Konstantin Belousov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-19 14:10 UTC by Gatis Peisenieks
Modified: 2022-09-08 12:48 UTC (History)
4 users (show)

See Also:


Attachments
patch for the sys/dev/alc driver (2.81 KB, patch)
2021-05-19 14:10 UTC, Gatis Peisenieks
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gatis Peisenieks 2021-05-19 14:10:06 UTC
Created attachment 225085 [details]
patch for the sys/dev/alc driver

[alc] [PATCH] add support for Mikrotik 10/25G NIC

The new Mikrotik 10/25G NIC is mostly compatible with AR8151 hardware,
with few exceptions:

* card supports only 32bit DMA operations
* card does not support write-one-to-clear semantics for interrupt status
  register
* MDIO operations can take longer to complete

This patch adds support for Mikrotik 10/25G NIC to the alc driver
while maintaining support for all earlier HW.

The patch was tested with FreeBSD main branch as of commit
f4b38c360e63a6e66245efedbd6c070f9c0aee55

This was tested on Intel i7-4790K system with Mikrotik 10/25G NIC.
This was tested on Intel i7-4790K system with RB44Ge (AR8151 based 4-port NIC)
to verify backwards compatibility.
Comment 1 commit-hook freebsd_committer freebsd_triage 2021-05-19 22:31:11 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=77b637338a3656d4ccedb9798a3f98ac283962f4

commit 77b637338a3656d4ccedb9798a3f98ac283962f4
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2021-05-19 22:14:18 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2021-05-19 22:30:25 +0000

    alc(4): add support for Mikrotik 10/25G NIC

    The new Mikrotik 10/25G NIC is mostly compatible with AR8151 hardware,
    with few exceptions:

    * card supports only 32bit DMA operations
    * card does not support write-one-to-clear semantics for interrupt status
      register
    * MDIO operations can take longer to complete

    This patch adds support for Mikrotik 10/25G NIC to the alc driver
    while maintaining support for all earlier HW.

    The patch was tested with FreeBSD main branch as of commit
    f4b38c360e63a6e66245efedbd6c070f9c0aee55

    This was tested on Intel i7-4790K system with Mikrotik 10/25G NIC.
    This was tested on Intel i7-4790K system with RB44Ge (AR8151 based 4-port NIC)
    to verify backwards compatibility.

    PR:     256000
    Submitted by:    Gatis Peisenieks  <gatis@mikrotik.com>
    MFC after:      1 week

 sys/dev/alc/if_alc.c    | 16 ++++++++++++++--
 sys/dev/alc/if_alcreg.h |  8 ++++++++
 sys/dev/alc/if_alcvar.h |  3 ++-
 3 files changed, 24 insertions(+), 3 deletions(-)
Comment 2 commit-hook freebsd_committer freebsd_triage 2021-05-26 12:06:42 UTC
A commit in branch stable/13 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=00ecc359009e345f3abc666138792abd545e90f7

commit 00ecc359009e345f3abc666138792abd545e90f7
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2021-05-19 22:14:18 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2021-05-26 11:30:36 +0000

    alc(4): add support for Mikrotik 10/25G NIC

    PR:     256000

    (cherry picked from commit 77b637338a3656d4ccedb9798a3f98ac283962f4)

 sys/dev/alc/if_alc.c    | 16 ++++++++++++++--
 sys/dev/alc/if_alcreg.h |  8 ++++++++
 sys/dev/alc/if_alcvar.h |  3 ++-
 3 files changed, 24 insertions(+), 3 deletions(-)
Comment 3 commit-hook freebsd_committer freebsd_triage 2021-05-26 12:08:44 UTC
A commit in branch stable/12 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=fcb09b40339d10b06e11863096bcc6d2576e807f

commit fcb09b40339d10b06e11863096bcc6d2576e807f
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2021-05-19 22:14:18 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2021-05-26 12:06:35 +0000

    alc(4): add support for Mikrotik 10/25G NIC

    PR:     256000

    (cherry picked from commit 77b637338a3656d4ccedb9798a3f98ac283962f4)

 sys/dev/alc/if_alc.c    | 16 ++++++++++++++--
 sys/dev/alc/if_alcreg.h |  8 ++++++++
 sys/dev/alc/if_alcvar.h |  3 ++-
 3 files changed, 24 insertions(+), 3 deletions(-)