Hi, guys.
I'm learning about PCI and started looking at the bge driver.
I grepped on an error message that I found in the bge man page to find the bge
source file, but grep didn't find it in if_bge.c, but did find it in lge.c.
Is the man page incorrect for bge, or have I missed something (cluesticks,
please!)?
If it is incorrect, I'll give a go at making a patch, but just assuming at this
point that I've missed something.
bge man snippet ...
DIAGNOSTICS
(1) bge%d: can't find mem space A fatal initialization error has occurred.
(2) bge%d: couldn't map interrupt A fatal initialization error has
occurred.
(3) bge%d: no memory for jumbo buffer queue! The driver failed to allocate
memory for jumbo frames during initialization.
(4) bge%d: watchdog timeout The device has stopped responding to the
network, or there is a problem with the network connection (cable).
The numbers in parenthesis are mine, for reference.
I can see (1) and (2) in the source code, but not (3). (4) is close but not the
same - "watchdog timeout -- resetting" - in the bge source.
I'm looking at 4.8 release with patches, /usr/src/sys/dev/pci/if_bge.c (but same
list is online for 4.9)
It seems to be exactly the same diagnostics list as for lge, but I can find all
those messages in the lge source.
# grep printf if_bge.c
#define DPRINTF(x) do { if (bgedebug) printf x; } while (0)
#define DPRINTFN(n,x) do { if (bgedebug >= (n)) printf x; } while (0)
printf("%s: nvram read timed out\n", sc->bge_dev.dv_xname);
printf("%s: eeprom read timed out\n", sc->bge_dev.dv_xname);
printf("%s: PHY read timed out\n", sc->bge_dev.dv_xname);
printf("%s: PHY read timed out\n", sc->bge_dev.dv_xname);
printf("%s: unable to create dmamap for slot %d\n",
printf("%s: unable to create dmamap for slot %d\n",
printf("%s: can't alloc txdmamap_pool_entry\n",
printf("%s: buffer manager failed to start\n",
printf("%s: flow-through queue init failed\n",
printf("%s: host coalescing engine failed to idle\n",
(1) printf(": can't find mem space\n");
(2) printf(": couldn't map interrupt\n");
printf(", ");
printf("unknown ASIC (0x%x)", sc->bge_chipid);
printf("%s (0x%x)", br->br_name, sc->bge_chipid);
printf(": failed to read station address\n");
printf(": can't alloc rx buffers\n");
printf(": can't map dma buffers (%lu bytes)\n",
printf(": can't create dma map\n");
printf(": failed to read media type\n");
printf(": couldn't establish interrupt");
printf(" at %s", intrstr);
printf("\n");
printf(": %s, address %s\n", intrstr,
ether_sprintf(sc->arpcom.ac_enaddr));
printf("%s: no PHY found!\n", sc->bge_dev.dv_xname);
printf("%s: reset timed out\n", sc->bge_dev.dv_xname);
printf("%s: firmware handshake timed out\n",
printf("%s: initialization failure\n", sc->bge_dev.dv_xname);
printf("%s: 5705 A0 chip failed to load RX ring\n",
(4) printf("%s: watchdog timeout -- resetting\n", sc->bge_dev.dv_xname);
# grep printf if_lge.c
#define DPRINTF(x) if (lgedebug) printf x
#define DPRINTFN(n,x) if (lgedebug >= (n)) printf x
printf("%s: EEPROM read timed out\n", sc->sc_dv.dv_xname);
printf("%s: PHY read timed out\n", sc->sc_dv.dv_xname);
printf("%s: PHY write timed out\n", sc->sc_dv.dv_xname);
printf("%s: reset never completed\n", sc->sc_dv.dv_xname);
printf("%s: chip is in D%d power mode "
printf(": can't map i/o space\n");
(1) printf(": can't map mem space\n");
(2) printf(": couldn't map interrupt\n");
printf(": couldn't establish interrupt");
printf(" at %s", intrstr);
printf("\n");
printf(": %s", intrstr);
printf(", address %s\n", ether_sprintf(eaddr));
printf("%s: can't alloc rx buffers\n", sc->sc_dv.dv_xname);
printf("%s: can't map dma buffers (%d bytes)\n",
printf("%s: can't create dma map\n", sc->sc_dv.dv_xname);
printf("%s: jumbo buffer allocation failed\n",
printf("%s: no PHY found!\n", sc->sc_dv.dv_xname);
printf("%s: can't alloc rx buffers\n", sc->sc_dv.dv_xname);
printf("%s: can't map dma buffers (%d bytes)\n",
printf("%s: can't create dma map\n", sc->sc_dv.dv_xname);
printf("%s: can't load dma map\n", sc->sc_dv.dv_xname);
(3) printf("%s: no memory for jumbo buffer queue!\n",
printf("%s: initialization failed: no "
(4) printf("%s: watchdog timeout\n", sc->sc_dv.dv_xname);
Thanks.