Stuart Henderson wrote:
> 
> > I am hoping this might avoid whatever is happening to the iDrac 
> > configuration once OpenBSD launches.
> >
> > It would be great if I could keep bnx1, bnx2 and bnx3 accessible to OpenBSD.
> 
> You'd need to hack the driver to do this, probably by checking the MAC
> address after it's fetched in bnx_attachhook() and doing a "goto 
> bnx_attach_fail".

perhaps like so. no warranty.


Index: if_bnx.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_bnx.c,v
retrieving revision 1.120
diff -u -p -r1.120 if_bnx.c
--- if_bnx.c    11 Dec 2015 16:07:01 -0000      1.120
+++ if_bnx.c    30 Dec 2015 11:21:25 -0000
@@ -641,6 +641,7 @@ bnx_read_rv2p(struct bnx_softc *sc, int 
 void
 bnx_attach(struct device *parent, struct device *self, void *aux)
 {
+       static int skipped_first;
        struct bnx_softc        *sc = (struct bnx_softc *)self;
        struct pci_attach_args  *pa = aux;
        pci_chipset_tag_t       pc = pa->pa_pc;
@@ -649,6 +650,12 @@ bnx_attach(struct device *parent, struct
        const char              *intrstr = NULL;
 
        sc->bnx_pa = *pa;
+
+       if (!skipped_first) {
+               skipped_first = 1;
+               printf(": not attaching!!\n");
+               return;
+       }
 
        /*
         * Map control/status registers.

Reply via email to