FreeBSD Bugzilla – Attachment 251770 Details for
Bug 252165
usb network and mii bus media status race condition
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Partially solves for me
mii_ukphy.diff (text/plain), 1.38 KB, created by
ml
on 2024-06-29 09:45:46 UTC
(
hide
)
Description:
Partially solves for me
Filename:
MIME Type:
Creator:
ml
Created:
2024-06-29 09:45:46 UTC
Size:
1.38 KB
patch
obsolete
>commit 857e732506400177cea0130db4be24bfb114dfa8 >Author: Andrea Venturoli <freebsd@netfence.it> >Date: Sun Nov 6 11:05:08 2022 +0100 > > Patch MII/UKPHY drivers (as per bug 252165) in order to use LAN on Hector. > >diff --git a/sys/dev/mii/mii.c b/sys/dev/mii/mii.c >index 83c8aafdf9fb..9a902afc4a33 100644 >--- a/sys/dev/mii/mii.c >+++ b/sys/dev/mii/mii.c >@@ -607,9 +607,6 @@ mii_pollstat(struct mii_data *mii) > struct mii_softc *child; > struct ifmedia_entry *ife = mii->mii_media.ifm_cur; > >- mii->mii_media_status = 0; >- mii->mii_media_active = IFM_NONE; >- > LIST_FOREACH(child, &mii->mii_phys, mii_list) { > /* > * If we're not polling this PHY instance, just skip it. >diff --git a/sys/dev/mii/ukphy_subr.c b/sys/dev/mii/ukphy_subr.c >index 37f1939701e1..dd99f15eaf23 100644 >--- a/sys/dev/mii/ukphy_subr.c >+++ b/sys/dev/mii/ukphy_subr.c >@@ -62,12 +62,12 @@ ukphy_status(struct mii_softc *phy) > struct ifmedia_entry *ife = mii->mii_media.ifm_cur; > int bmsr, bmcr, anlpar, gtcr, gtsr; > >- mii->mii_media_status = IFM_AVALID; >- mii->mii_media_active = IFM_ETHER; >- > bmsr = PHY_READ(phy, MII_BMSR) | PHY_READ(phy, MII_BMSR); > if (bmsr & BMSR_LINK) >- mii->mii_media_status |= IFM_ACTIVE; >+ mii->mii_media_status = IF_AVALID | IFM_ACTIVE; >+ else >+ mii->mii_media_status = IF_AVALID; >+ mii->mii_media_active = IFM_ETHER; > > bmcr = PHY_READ(phy, MII_BMCR); > if (bmcr & BMCR_ISO) {
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 252165
:
221274
|
236901
| 251770 |
255142
|
255162
|
255301