Hi,

I apologize if this list is not appropriate for this request.
I am trying to add support for Marvell Yukon FE+ network card under NetBSD according to http://gnats.netbsd.org/42417. The chip of this card (Yukon 88E8040) runs with msk driver. Under NetBSD, the driver derives from the OpenBSD one. But OpenBSD runs 88E8040 while NetBSD not. I have begun to port code from OpenBSD to NetBSD, but it doesn't work yet. I have looked into FreeBSD and Linux drivers too. FreeBSD has these pieces of code:

    if (sc->msk_hw_rev == CHIP_REV_YU_FE_P_A0) {
      /*
       * XXX
       * FE+ A0 has status LE writeback bug so msk(4)
       * does not rely on status word of received frame
       * in msk_rxeof() which in turn disables all
       * hardware assistance bits reported by the status
       * word as well as validity of the received frame.
       * Just pass received frames to upper stack with
       * minimal test and let upper stack handle them.
       */
      sc->msk_pflags |= MSK_FLAG_NOHWVLAN |
          MSK_FLAG_NORXCHK | MSK_FLAG_NORX_CSUM;
    }

[...]

  /* Another magic for Yukon FE+ - From Linux. */
  if (sc->msk_hw_id == CHIP_ID_YUKON_FE_P &&
      sc->msk_hw_rev == CHIP_REV_YU_FE_P_A0)
    reg = 0x178;
  CSR_WRITE_2(sc, MR_ADDR(sc_if->msk_port, RX_GMF_FL_THR), reg);

I don't understand how OpenBSD manages to run this card without these *hacks*. Surely OpenBSD is very well written ! My current patch adds the conditional blocks corresponding to my card from OpenBSD if_msk.c to the NetBSD one (but it's not enough). Anybody knows the magic behavior of this driver ?

Thank you,

Fred

--
FrC)dC)ric Fauberteau

Reply via email to