FreeBSD Bugzilla – Attachment 247305 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]
WIP patch (do not use)
alc.diff (text/plain), 2.89 KB, created by
Lexi Winter
on 2023-12-28 00:03:44 UTC
(
hide
)
Description:
WIP patch (do not use)
Filename:
MIME Type:
Creator:
Lexi Winter
Created:
2023-12-28 00:03:44 UTC
Size:
2.89 KB
patch
obsolete
>diff --git a/sys/dev/alc/if_alc.c b/sys/dev/alc/if_alc.c >index be52822e1c51..6d311627f6a2 100644 >--- a/sys/dev/alc/if_alc.c >+++ b/sys/dev/alc/if_alc.c >@@ -1356,10 +1356,21 @@ 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) { >+printf("alc: write @ 0x%lx -- 0x%lx\n", (long) ALC_MSI_RETRANS_TIMER, (long) (ctl | MSI_RETRANS_MASK_SEL_STD)); > CSR_WRITE_4(sc, ALC_MSI_RETRANS_TIMER, ctl | > MSI_RETRANS_MASK_SEL_STD); >- else if ((sc->alc_flags & ALC_FLAG_MSI) != 0) >+ >+ uint32_t tbl[2] = {0, 0}; >+#define ALX_MSI_MAP_TBL1_RXQ0_SHIFT 0 >+#define ALX_MSI_MAP_TBL1_TXQ0_SHIFT 16 >+ 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 >@@ -1410,6 +1421,7 @@ alc_attach(device_t dev) > case DEVICEID_ATHEROS_E2200: > case DEVICEID_ATHEROS_E2400: > case DEVICEID_ATHEROS_E2500: >+printf("alc: E2X00\n"); > sc->alc_flags |= ALC_FLAG_E2X00; > /* FALLTHROUGH */ > case DEVICEID_ATHEROS_AR8161: >@@ -1418,6 +1430,7 @@ alc_attach(device_t dev) > sc->alc_flags |= ALC_FLAG_LINK_WAR; > /* FALLTHROUGH */ > case DEVICEID_ATHEROS_AR8171: >+printf("alc: AR816X\n"); > sc->alc_flags |= ALC_FLAG_AR816X_FAMILY; > break; > case DEVICEID_ATHEROS_AR8162: >@@ -3336,7 +3349,7 @@ alc_intr(void *arg) > { > struct alc_softc *sc; > uint32_t status; >- >+//printf("alc_intr\n"); > sc = (struct alc_softc *)arg; > > if (sc->alc_flags & ALC_FLAG_MT) { >@@ -3361,7 +3374,7 @@ alc_int_task(void *arg, int pending) > if_t ifp; > uint32_t status; > int more; >- >+//printf("alc_int_task\n"); > sc = (struct alc_softc *)arg; > ifp = sc->alc_ifp; > >@@ -3371,15 +3384,19 @@ alc_int_task(void *arg, int pending) > sc->alc_morework = 0; > status |= INTR_RX_PKT; > } >- if ((status & ALC_INTRS) == 0) >+ if ((status & ALC_INTRS) == 0) { >+//printf("alc_int_task: intrs=0, done\n"); > goto done; >+ } > > /* Acknowledge interrupts but still disable interrupts. */ > CSR_WRITE_4(sc, ALC_INTR_STATUS, status | INTR_DIS_INT); > > more = 0; > if ((if_getdrvflags(ifp) & IFF_DRV_RUNNING) != 0) { >+//printf("alc_int_task: running, status=%lx\n", (long) status); > if ((status & INTR_RX_PKT) != 0) { >+//printf("alc_int_task: INTR_RX_PKT\n"); > more = alc_rxintr(sc, sc->alc_process_limit); > if (more == EAGAIN) > sc->alc_morework = 1; >@@ -3392,6 +3409,7 @@ alc_int_task(void *arg, int pending) > } > if ((status & (INTR_DMA_RD_TO_RST | INTR_DMA_WR_TO_RST | > INTR_TXQ_TO_RST)) != 0) { >+//printf("alc_int_task: INTR_TX\n"); > if ((status & INTR_DMA_RD_TO_RST) != 0) > device_printf(sc->alc_dev, > "DMA read error! -- resetting\n");
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