tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Different reset functions in if_msk.c



Hi all!
I am trying to include in the -current NetBSD src/sys/dev/pci/if_msk.c the OpenBSD
code modifications since OpenBSD if_msk.c rev. 1.43. This is to add a driver for
my ethernet NIC Marvell 88E8072, which is currently not supported by NetBSD.
OpenBSD, in rev. 1.48, includes a `void mskc_reset(struct sk_softc *);' line:

http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/dev/pci/if_msk.c.diff?r1=1.47&r2=1.48&f=h

If it's possible, I would like to make some observations and questions:

- This new line is not in the NetBSD code.
- Both NetBSD and OpenBSD have instead a `void msk_reset' function: what can be the
differences between `msk_reset' and `mskc_reset'?
- Moreover, they need different argument types:

OpenBSD
void mskc_reset(struct sk_softc *);
void msk_reset(struct sk_if_softc *);

NetBSD
void msk_reset(struct sk_softc *);

NetBSD msk_reset asks for a `struct sk_softc *', while OpenBSD msk_reset asks for a
`struct sk_if_softc *'. They seem to be amusingly swapped. So, when `mskc_reset' is
included in NetBSD, which will be the correct data type for its argument?
Shall I use `struct sk_softc *' as in OpenBSD or shall I blindly continue the "swap law"
and use a `struct sk_if_softc *'?
Bye!

Rocky


Home | Main Index | Thread Index | Old Index