/*
 * Copyright (c) 1997, by Sun Microsytems, Inc.
 * All rights reserved.
 */

	ident	"@(#)README	1.7	97/04/07 SMI"

DRIVER NAME:
	psli -- sample STREAMS Multithreaded DLPI driver

ARCHITECTURES:
	The sample code compiles on SPARC and x86 platforms.  
	It is not intended for any particular DLPI interface; it's
	intended as a guideline/suggestion for developing a  Streams 
	DLPI driver. 

DESCRIPTION OF DRIVER:

	It is assumed that the reader is familiar with 

	(a) Device Driver Interface/Driver Kernel Interface (DDI/DKI).  
	(b) STREAMS Programmer's Guide.
	(c) STREAMS based Data Link Provider Interface - Version 2.
	(d) Solaris 2.6  Writing Device Drivers manual.

	Note the following:

	(1) All references to MEDIUM/medium refer to your data link layer ex:
	    ethernet, token-ring etc.

	(2) All references to DEVICE/device refer to your device chip ex: lance,
	    intel 8256, etc.

	(3) The /* XXX */ comments flag portions of code you need to 
	    add/uncomment/modify for your specific driver. There 
	    are three types of /* XXX */ comments:
		
		(a) /* XXX */ comment line is followed by NO lines of code. 

		This means you have to ADD code specific to your driver. 
		example:

		/* XXX reset the chip */
		blank line follows.

		This means that you have to add code to reset your specific 
		chip.

		(b) /* XXX uncomment 

			lines of C code 

		      XXX  uncomment */

		This means exactly what it says. uncomment the specified 
		lines.

		(c) /* XXX */
		   followed by lines of C code

		This means you need to modify the C code following the XXX
		lines to suit your specific physical medium/ device.

	    Note that values used for #defines are bogus. You need to use
	    values that are appropriate for your driver/device. Feel free to
	    massage the structs defined in psli.h by adding fields that you
	    deem appropriate.

	(4) The files you need to modify are a) psli.c and b) psli.h

	(5) The KSTAT mechanism provides support for "netstat -i". BUT, 
	    it is not yet a part of DDI/DKI and hence could change from release 
	    to release. However, it may be part of DDI/DKI in a future 
	    Solarix 2.x release. BUT, for now use it at your own risk.

CAVEATS AND CONSTRAINTS:
	This sample driver is not guaranteed to be bug free.

DISCLAIMER:
	This driver is written to illustrate certain features of the 
	DDI/DKI. It is meant to be a skeleton that can be used as a basis 
	for a real-world driver. This driver will not actually run. 


COMPILING/LOADING:
	Use the Makefile in the psli directory to compile the driver.
	The Makefile determines the architecture (x86 or sparc) of the 
	build machine and sets a preprocessor variable (i386 or sparc)
	accordingly. The object files are placed in an appropriate
	architecture-specific subdirectory of the pio directory.

	Once you have modified the skeleton driver to drive actual hardware,
	install the driver to test it.

        To install, you must write a hardware configuration file (psli.conf).
	This is required for non-self-identifying and pseudo devices only
	(SBus devices are self-identifying and do not require configuration
	files).

	Add an entry in /etc/devlink.tab for your driver to create a link from
	the /dev directory to the  /devices directory. This file contains 
	documentation on how you can create an entry.

	Copy the driver to the modules directory:

	   # su
	   # cp psli /usr/kernel/drv
	   # cp psli.conf /usr/kernel/drv

	Run add_drv(1M)

	   # add_drv psli

	You only need to run add_drv the very first time you introduce a 
	driver to the system. Thereafter you can use modload and modunload. 
	modload and modunload will not call probe() and attach() routines. 
	If you want to repeat the whole thing, run rem_drv(1M) and then 
	add_drv again.


REFERENCES:

	PSLI specification (available in /opt/SUNWddk/ddk_2.5/doc/DLPISPEC.PS,
	    assuming you installed the DDK's SUNWddkwp package)

        SunOS 5.5 Writing Device Drivers
