Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/sys/dev/mii



Module Name:    src
Committed By:   msaitoh
Date:           Thu Jan  6 07:39:10 UTC 2022

Modified Files:
        src/sys/dev/mii: makphy.c makphyvar.h

Log Message:
QEMU e1000's PHY code doesn't reflect the PSSR_LINK bit. Do workaround.

   IEEE 802.3 clause 22's PHY device has a link status bit in the BMCR
  register, but it's required to read twice to get the correct value.
  Almost all PHY devices have the vendor specific register which has
  the link status bit that it's not required to read twice. makphy(4)
  use the bit in the PSSR register to reduce the access cost.

   QEMU's e1000 provides the PHY specific status register at 0x11 but the
  link indication bit (PSSR_LINK.) is always 1 because
  e1000x_update_regs_on_link_{down,up}() modify MII_SR_LINK_STATUS
  (BMSR_LINK in NetBSD) but don't modify PSSR_LINK. It causes
  "virsh domif-setlink xxx yyy down" doesn't work.
  To avoid this problem, read the BMSR and check the BMSR_LINK bit. Add
  MAKPHY_QUIRK_PSSR_LINK bit for this quirk. Set it if MII_EXTSR doesn't
  exist because it's one of the case of QEMU.

  Found and tested by ozaki-r.


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/sys/dev/mii/makphy.c
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/mii/makphyvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index