FreeBSD Bugzilla – Attachment 233772 Details for
Bug 263820
dwc: dwc driver is not able to receive packets after adding new MAC address
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Preliminary fix patch
dwc_mac_add.patch (text/plain), 900 bytes, created by
Jiahao LI
on 2022-05-06 15:47:13 UTC
(
hide
)
Description:
Preliminary fix patch
Filename:
MIME Type:
Creator:
Jiahao LI
Created:
2022-05-06 15:47:13 UTC
Size:
900 bytes
patch
obsolete
>diff --git a/sys/dev/dwc/if_dwc.c b/sys/dev/dwc/if_dwc.c >index e2bdf9965f8..96e21eb1308 100644 >--- a/sys/dev/dwc/if_dwc.c >+++ b/sys/dev/dwc/if_dwc.c >@@ -1108,6 +1108,28 @@ dwc_txstart(struct ifnet *ifp) > DWC_UNLOCK(sc); > } > >+static void >+dwc_setup_macaddr(struct dwc_softc *sc) >+{ >+ struct ifnet *ifp; >+ uint8_t *eaddr; >+ uint32_t hi, lo; >+ >+ DWC_ASSERT_LOCKED(sc); >+ >+ ifp = sc->ifp; >+ >+ /* >+ * Set the primary address. >+ */ >+ eaddr = IF_LLADDR(ifp); >+ lo = eaddr[0] | (eaddr[1] << 8) | (eaddr[2] << 16) | >+ (eaddr[3] << 24); >+ hi = eaddr[4] | (eaddr[5] << 8); >+ WRITE4(sc, MAC_ADDRESS_LOW(0), lo); >+ WRITE4(sc, MAC_ADDRESS_HIGH(0), hi); >+} >+ > static void > dwc_init_locked(struct dwc_softc *sc) > { >@@ -1131,6 +1153,7 @@ dwc_init_locked(struct dwc_softc *sc) > */ > mii_mediachg(sc->mii_softc); > callout_reset(&sc->dwc_callout, hz, dwc_tick, sc); >+ dwc_setup_macaddr(sc); > } > > static void
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 263820
: 233772 |
234029