> Date: Thu, 12 Nov 2015 08:14:08 +0000
> From: Miod Vallat <m...@online.fr>
> 
> > >Fix:
> >     Reverting src/sys/dev/pci/if_bge.c to rev 1.371 and if_bgereg.h to 
> > 1.128 and
> > rebuilding the kernel allows the interface to work correctly.
> 
> Does the following diff (on top of HEAD, thus if_bge 1.372 and
> if_bgereg.h 1.129) help?

Miod, I really think you should back out that commit.  It still think
it's wrong.  The magic number needs to be written into SRAM.  The
documentation for the various chips is pretty clear on that.  Your
diff changed things such that it writes it to some random undocumented
hardware register.  That makes no sense.

Obviously there is something wrong with the old code as well.
Possibly Apple used a different firmware for the onboard interfaces
that isn't happy with the way we write the magic value.  Since the
magic value has something to do with PXE booting, perhaps simply
skipping that write is a viable workaround for macppc.


> Index: if_bge.c
> ===================================================================
> RCS file: /OpenBSD/src/sys/dev/pci/if_bge.c,v
> retrieving revision 1.372
> diff -u -p -r1.372 if_bge.c
> --- if_bge.c  10 Nov 2015 20:23:50 -0000      1.372
> +++ if_bge.c  11 Nov 2015 19:45:38 -0000
> @@ -3221,7 +3221,10 @@ bge_reset(struct bge_softc *sc)
>        * When firmware finishes its initialization it will
>        * write ~BGE_SRAM_FW_MB_MAGIC to the same location.
>        */
> -     write_op(sc, BGE_SOFTWARE_GENCOMM, BGE_MAGIC_NUMBER);
> +     if (write_op == bge_writereg_ind)
> +             bge_writereg_ind(sc, BGE_SOFTWARE_GENCOMM, BGE_MAGIC_NUMBER);
> +     else
> +             bge_writemem_ind(sc, BGE_SOFTWARE_GENCOMM, BGE_MAGIC_NUMBER);
>  
>       reset = BGE_MISCCFG_RESET_CORE_CLOCKS | BGE_32BITTIME_66MHZ;
>  
> 
> 

Reply via email to