FreeBSD Bugzilla – Attachment 247306 Details for
Bug 230807
if_alc(4): Driver not working for Killer Networking E2200
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
working patch
alc.diff (text/plain), 1.99 KB, created by
Lexi Winter
on 2023-12-28 02:35:09 UTC
(
hide
)
Description:
working patch
Filename:
MIME Type:
Creator:
Lexi Winter
Created:
2023-12-28 02:35:09 UTC
Size:
1.99 KB
patch
obsolete
>diff --git a/sys/dev/alc/if_alc.c b/sys/dev/alc/if_alc.c >index be52822e1c51..51e04d0b2e13 100644 >--- a/sys/dev/alc/if_alc.c >+++ b/sys/dev/alc/if_alc.c >@@ -1356,10 +1356,19 @@ alc_config_msi(struct alc_softc *sc) > if (mod == 0) > mod = 1; > ctl |= mod; >- if ((sc->alc_flags & ALC_FLAG_MSIX) != 0) >+ if ((sc->alc_flags & ALC_FLAG_MSIX) != 0) { >+ uint32_t tbl[2] = {0, 0}; >+ > CSR_WRITE_4(sc, ALC_MSI_RETRANS_TIMER, ctl | > MSI_RETRANS_MASK_SEL_STD); >- else if ((sc->alc_flags & ALC_FLAG_MSI) != 0) >+ >+ tbl[0] |= 1 << ALX_MSI_MAP_TBL1_RXQ0_SHIFT; >+ tbl[0] |= 1 << ALX_MSI_MAP_TBL1_TXQ0_SHIFT; >+ CSR_WRITE_4(sc, ALC_MSI_MAP_TBL1, tbl[0]); >+ CSR_WRITE_4(sc, ALC_MSI_MAP_TBL2, tbl[1]); >+ CSR_WRITE_4(sc, ALC_MSI_ID_MAP, 0); >+ >+ } else if ((sc->alc_flags & ALC_FLAG_MSI) != 0) > CSR_WRITE_4(sc, ALC_MSI_RETRANS_TIMER, ctl | > MSI_RETRANS_MASK_SEL_LINE); > else >@@ -1527,7 +1536,7 @@ alc_attach(device_t dev) > if (msix_disable == 0 || msi_disable == 0) { > if (msix_disable == 0 && msixc > 0 && > pci_alloc_msix(dev, &msixc) == 0) { >- if (msic == 1) { >+ if (msixc == 1) { > device_printf(dev, > "Using %d MSIX message(s).\n", msixc); > sc->alc_flags |= ALC_FLAG_MSIX; >@@ -4298,7 +4307,10 @@ alc_init_locked(struct alc_softc *sc) > alc_rxvlan(sc); > > /* Acknowledge all pending interrupts and clear it. */ >- CSR_WRITE_4(sc, ALC_INTR_MASK, ALC_INTRS); >+ if ((sc->alc_flags & ALC_FLAG_AR816X_FAMILY) != 0) >+ CSR_WRITE_4(sc, ALC_INTR_MASK, ALC_INTRS | INTR_MAC_TX | INTR_MAC_RX); >+ else >+ CSR_WRITE_4(sc, ALC_INTR_MASK, ALC_INTRS); > CSR_WRITE_4(sc, ALC_INTR_STATUS, 0xFFFFFFFF); > CSR_WRITE_4(sc, ALC_INTR_STATUS, 0); > >diff --git a/sys/dev/alc/if_alcreg.h b/sys/dev/alc/if_alcreg.h >index e21240ad3159..483f6b148b1d 100644 >--- a/sys/dev/alc/if_alcreg.h >+++ b/sys/dev/alc/if_alcreg.h >@@ -731,6 +731,8 @@ > #define CMB_TX_TIMER_SHIFT 0 > > #define ALC_MSI_MAP_TBL1 0x15D0 >+#define ALX_MSI_MAP_TBL1_RXQ0_SHIFT 0 >+#define ALX_MSI_MAP_TBL1_TXQ0_SHIFT 16 > > #define ALC_MSI_ID_MAP 0x15D4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 230807
:
247305
| 247306