Coding changes
The following list summarizes the coding modifications
required to port SCO OpenServer 5 drivers to MDI version 2.
These are in addition to the general changes
required to port an SCO OpenServer 5 driver to DDI
(see
``Porting drivers to DDI 8'')
and to port an SCO OpenServer 5 STREAMS driver to DDI
(see
``STREAMS in DDI 8'').
See the e3B and shrk sample source code
that is provided in the ndsample package
for examples of how these coding changes are implemented.
The sample shrk driver
compiles for SVR5 by default,
or for SCO OpenServer 5 if the -DOPENSERVER flag is set.
-
Delete all calls to the
mdi_netboot(D3mdi)
functions.
DDI drivers use the configuration manager functions
to query the resource manager database
for the information returned by the
mdi_netboot( )
functions; see
``Configuration manager''
and
``Resource manager database''.
-
Delete all calls to the
intr_disable( )
and
intr_enable( )
functions.
These functions should not be used in MDI drivers
on either platform;
single-threaded MDI drivers
should instead use
spl(D3)
functions such as
splstr( )
and
splx( ).
-
All MDI version 2 drivers must be dynamically loadable,
-
Populate one or more
bcfg(DSP/4dsp)
files for the driver.
-
ISA network adapter drivers
define many configuration parameters
in their bcfg files
that are autoconfigured for other bus types.
ISA drivers must also have a
CFG_VERIFY subfunction to the
config(D2mdi)
entry point for DDI 8,
or a
_verify(D2mdi)
entry point routine for DDI 7.
See
``Extended ISA verify support''
for more information.
-
When responding to the
MDI ioctls
MACIOC_SETMCA
and
MACIOC_DELMCA,
MDI version 2 drivers should not free the
b_cont
member of the
msgb(D4str)
STREAMS message block structure
for either
M_IOCNAK(D7str)
or
M_IOCACK(D7str)
message types.
See the
Intro(MDI)
manual page (on OpenServer 6), and the
Intro(7mdi)
manual page (on UnixWare 7.1.4) for more information.
-
Use
drv_priv(D3)
with
iocp->ioc_cr
when handling M_IOCTL
messages instead of looking at iocp->ioc_uid
.
See the
Intro(MDI)
manual page (on OpenServer 6), and the
Intro(7mdi)
manual page (on UnixWare 7.1.4) for more information.
-
Call
mdi_get_unit(D3mdi)
in the
_load(D2mdi)
entry point routine.
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005