Most ure(4) devices use mii; 8156 and 8156B do not and have special
cases throughout the driver.
ifmedia_ioctl() sets ifmr->ifm_active to ifm_cur->ifm_media before
calling the status callback. The 8156 case in ure_ifmedia_sts ORs in
the subtype and duplex flags to the existing value, which may result in
garbage values.
Instead, start by setting ifm_active to just IFM_ETHER before ORing in
other bits.
Fixes: d4cf41a99b40 ("Add support for RTL8153B, RTL8156 and RTL8156B to if_ure(4).")Details
Details
- Reviewers
kbowling pouria - Commits
- rG83067a22396f: ure: Initialize ifm_active in ure_ifmedia_sts
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
| sys/dev/usb/net/if_ure.c | ||
|---|---|---|
| 1459 | Not sure if there is some natural final else case for these conditionals, IFM_NONE? | |
| sys/dev/usb/net/if_ure.c | ||
|---|---|---|
| 1459 | Possibly, but we'd have IFM_FDX | IFM_NONE or IFM_HDX | IFM_NONE which doesn't make sense. The hw/driver will not actually reach this case so I'm inclined to just leave it. Or we could explicitly set ifmr->ifm_active = IFM_ETHER | IFM_NONE for this case? | |