Hi, Yes, the patch solves the problem. Linked is up immediately after the boot.
On Wed, Apr 22, 2020, 11:26 Ryo Shimizu <r...@nerv.org> wrote: > > Hi! > > >> Recently I received Asus XG-C100F SFP+ network controller based on > >> Aquantia AQC100. Though, it's currently supported by aq(4) driver, I > >> believe it should be relatively easy to add. I tried to blindly add > >> the device to the list and even made it work, unfortunately with some > >> caveats. To make work I need to boot into the system first and > >> physically reattach the cable (I am using DAC). Even if cable is > >> attached and system boots, media type is not recognized and reports as > >> if link is missing, unless I physically reattach it. After that it > >> properly configures and dhcpcd assigns IP address. I can successfully > >> access the network. Any ideas why I need to reattach the cable? > > I'm not sure, but in the case of FIBRE, the behavior around link status > may be different from TP. > As a workaround, following patch to force polling linkstat. Will this > solve the problem? > > cvs -q diff -U8 -a -p if_aq.c > Index: if_aq.c > =================================================================== > RCS file: /cvsroot/src/sys/dev/pci/if_aq.c,v > retrieving revision 1.11 > diff -U 8 -a -p -r1.11 if_aq.c > --- if_aq.c 15 Feb 2020 12:20:35 -0000 1.11 > +++ if_aq.c 22 Apr 2020 08:02:02 -0000 > @@ -1301,16 +1301,21 @@ aq_attach(device_t parent, device_t self > sc->sc_use_txrx_independent_intr = false; > sc->sc_poll_linkstat = true; > sc->sc_msix = true; > } else { > /* giving up using MSI-X */ > sc->sc_msix = false; > } > > +#define FORCE_POLL_LINKSTAT > +#ifdef FORCE_POLL_LINKSTAT > + sc->sc_poll_linkstat = true; > +#endif > + > aprint_debug_dev(sc->sc_dev, > "ncpu=%d, pci_msix_count=%d." > " allocate %d interrupts for %d%s queues%s\n", > ncpu, msixcount, > (sc->sc_use_txrx_independent_intr ? > (sc->sc_nqueues * 2) : sc->sc_nqueues) + > (sc->sc_poll_linkstat ? 0 : 1), > sc->sc_nqueues, > > > Thanks, > -- > ryo shimizu >