Discussion:
Clone driver
Gary Schumacher
2006-01-27 20:37:37 UTC
Permalink
I am new to LiS and am in the process of porting a clone driver from a
Solaris platform to
a PPC platform using Linux (2.4.20) and LiS (2.18). Are there some good
examples or
documentation on how to manage the major/minor numbers during
init/open/close/cleanup?
Any help would be appreciated - I have searched for a FAQ and and have
not been able to
see the mail list archives.

Thanks
Gary Schumacher



SPECIAL NOTICE

All information transmitted hereby is intended only for the use of the
addressee(s) named above and may contain confidential and privileged
information. Any unauthorized review, use, disclosure or distribution
of confidential and privileged information is prohibited. If the reader
of this message is not the intended recipient(s) or the employee or agent
responsible for delivering the message to the intended recipient, you are
hereby notified that you must not read this transmission and that disclosure,
copying, printing, distribution or use of any of the information contained
in or attached to this transmission is STRICTLY PROHIBITED.

Anyone who receives confidential and privileged information in error should
notify us immediately by telephone and mail the original message to us at
the above address and destroy all copies. To the extent any portion of this
communication contains public information, no such restrictions apply to that
information. (gate01)
Brian F. G. Bidulock
2006-01-27 21:05:27 UTC
Permalink
Gary,

I take it you are using the deprecated LiS 2.18.0: the one that comes
with no manual pages. You would be better to use streams-0.7a.4 and the
strcompat-0.9.2.2 package which provides some Solaris compatible DDI/DKI
functions. Linux Fast-STREAMS is much better documented than LiS.

For general qi_qopen procedure considerations (for clone drivers too),
see http://www.openss7.org/man2html?9+qi_qopen This is for Linux
Fast-STREAMS, but it is roughly the same for the deprecated LiS package.

For Solaris compatibilty functions present in the STREAMS Compatibility
Modules, see http://www.openss7.org/man2html?9+suncompat Of particular
interest might be functions like ddi_create_minor_node() which is here
http://www.openss7.org/man2html?9+ddi_create_minor_node

If you really must use LiS, use the LiS 2.18.2 release from OpenSS7 at
http://www.openss7.org/tarballs/LiS-2.18.2.tar.bz2 that comes with a
complete set of manual pages.

--brian
Post by Gary Schumacher
I am new to LiS and am in the process of porting a clone driver from a
Solaris platform to
a PPC platform using Linux (2.4.20) and LiS (2.18). Are there some
good examples or
documentation on how to manage the major/minor numbers during
init/open/close/cleanup?
Any help would be appreciated - I have searched for a FAQ and and have
not been able to
see the mail list archives.
Thanks
Gary Schumacher
--
Brian F. G. Bidulock ¦ The reasonable man adapts himself to the ¦
***@openss7.org ¦ world; the unreasonable one persists in ¦
http://www.openss7.org/ ¦ trying to adapt the world to himself. ¦
¦ Therefore all progress depends on the ¦
¦ unreasonable man. -- George Bernard Shaw ¦
Steve Schefter
2006-01-27 21:36:42 UTC
Permalink
Hi Gary.
Post by Gary Schumacher
I am new to LiS and am in the process of porting a clone driver from a
Solaris platform to
a PPC platform using Linux (2.4.20) and LiS (2.18). Are there some good
examples or
documentation on how to manage the major/minor numbers during
init/open/close/cleanup?
There are a number of sample drivers that come with LiS. Take a look
at drivers/str/linux/ip_to_dlpi.c for example. It deals with acquiring
a major number (lis_register_strdev() in init), getting a new clone
device in open and freeing the major numer in cleanup.

We too use LiS on a PPC (for one) platform. If you haven't already
come across it, see "PPC" and "ppc" references in config.mk in LiS'
top level.

Regards,
Steve

------------------------------------------------------------------------
Steve Schefter phone: +1 705 725 9999 x26
The Software Group Limited fax: +1 705 725 9666
642 Welham Road, email: ***@wanware.com
Barrie, Ontario CANADA L4N 9A1 Web: www.wanware.com
Loading...