NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/59876 (igc0: unable to initialize)
The following reply was made to PR kern/59876; it has been noted by GNATS.
From: Shinichi Doyashiki <clare%csel.org@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc:
Subject: Re: kern/59876 (igc0: unable to initialize)
Date: Thu, 23 Jul 2026 06:42:29 +0900
I attempted some diagnostics, but the initialization of the igc driver fails with the error below.
A failure in the BIOS initialization of the PCI BAR0 or similar components is a possibility,
though I have not been able to diagnose the issue to that extent.
[ 1.0417554] igc0 at pci1 dev 0 function 0: Intel(R) Ethernet Controller I226-V (rev. 0x04)
[ 1.0417554] igc_set_mac_type
[ 1.0417554] igc0: PCI BAR confliction error; try PCI_ADDR_FIXUP
[ 1.0417554] igc_set_mac_type
[ 1.0417554] igc_init_mac_ops_generic
[ 1.0417554] igc_init_phy_ops_generic
[ 1.0417554] igc_init_nvm_ops_generic
[ 1.0417554] igc_init_mac_ops_generic
[ 1.0417554] igc_init_phy_ops_generic
[ 1.0417554] igc_init_nvm_ops_generic
[ 1.0417554] igc_init_mac_params_i225
[ 1.0417554] igc_init_mac_ops_generic
[ 1.0417554] igc_init_nvm_params_i225
[ 1.0417554] igc_get_flash_presence_i225
[ 1.0417554] igc_init_phy_params_i225
[ 1.0417554] igc_phy_hw_reset_generic
[ 1.0417554] igc_check_reset_block
[ 1.0417554] igc_get_phy_id
[ 1.0417554] igc_read_phy_reg_gpy
[ 1.0417554] igc_acquire_phy_base
[ 1.0417554] igc_acquire_swfw_sync_i225
[ 1.0417554] igc_get_hw_semaphore_i225
[ 1.0417554] igc_put_hw_semaphore_generic
[ 1.0417554] Driver can't access device -
[ 1.0417554] SMBI bit is set.
[ 1.0417554] PHY Initialization Error
[ 1.0417554] igc0: unable to initialize
[ 1.0417554] igc0: WARNING: power management not supported
Index: if_igc.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/igc/if_igc.c,v
retrieving revision 1.25
diff -u -1 -0 -r1.25 if_igc.c
--- if_igc.c 10 Jun 2026 21:02:49 -0000 1.25
+++ if_igc.c 22 Jul 2026 21:26:09 -0000
@@ -343,20 +343,25 @@
* and initializes the hardware.
*
* return 0 on success, positive on failure
*********************************************************************/
static void
igc_attach(device_t parent, device_t self, void *aux)
{
struct pci_attach_args *pa = aux;
struct igc_softc *sc = device_private(self);
struct igc_hw *hw = &sc->hw;
+#if 1
+ pcireg_t rombar;
+ pcireg_t bar0;
+ pcireg_t bar3;
+#endif
const struct igc_product *igcp = igc_lookup(pa);
KASSERT(igcp != NULL);
sc->sc_dev = self;
callout_init(&sc->sc_tick_ch, CALLOUT_MPSAFE);
callout_setfunc(&sc->sc_tick_ch, igc_tick, sc);
sc->sc_core_stopping = false;
sc->osdep.os_sc = sc;
@@ -375,20 +380,45 @@
{
aprint_verbose(", 32-bit DMA");
sc->osdep.os_dmat = pa->pa_dmat;
}
pci_aprint_devinfo_fancy(pa, "Ethernet controller", igcp->igcp_name, 1);
/* Determine hardware and mac info */
igc_identify_hardware(sc);
+#if 1
+ /* read Expansion ROM BAR, BAR0, BAR3 */
+ rombar = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_MAPREG_ROM);
+ /* check ROM is disabled; then check address */
+ if (!(rombar & PCI_MAPREG_ROM_ENABLE)) {
+ bar0 = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_BAR0);
+ bar3 = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_BAR3);
+ if (PCI_MAPREG_MEM_ADDR(rombar) == PCI_MAPREG_MEM_ADDR(bar0) ||
+ PCI_MAPREG_MEM_ADDR(rombar) == PCI_MAPREG_MEM_ADDR(bar3)) {
+ aprint_error_dev(sc->sc_dev, "PCI BAR confliction error; try PCI_ADDR_FIXUP\n");
+#if 0
+ /* trying move BAR here is no effective solution */
+ aprint_normal_dev(sc->sc_dev, "write 0 to BAR\n");
+ pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_MAPREG_ROM, 0);
+ rombar = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_MAPREG_ROM);
+ aprint_normal_dev(sc->sc_dev, "read 0x%08x\n", rombar);
+ aprint_normal_dev(sc->sc_dev, "write ~1 to BAR\n");
+ pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_MAPREG_ROM, (pcireg_t)~1);
+ rombar = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_MAPREG_ROM);
+ aprint_normal_dev(sc->sc_dev, "read 0x%08x\n", rombar);
+#endif
+ }
+ }
+#endif
+
sc->num_tx_desc = IGC_DEFAULT_TXD;
sc->num_rx_desc = IGC_DEFAULT_RXD;
/* Setup PCI resources */
if (igc_allocate_pci_resources(sc)) {
aprint_error_dev(sc->sc_dev,
"unable to allocate PCI resources\n");
goto err;
}
Home |
Main Index |
Thread Index |
Old Index