Streams Device Drivers

Streams Device Drivers

Post by Chinma » Tue, 07 Apr 1998 04:00:00


I have two questions

1) I am writing a STREAMS device driver for SOLARIS 2.6 for a PCI card.
I have already written the auto configuration routines. I want to test
these. That is I want to make sure that I am able to map the registers
before I proceed with the put and service routines. How do I test these?

2) I want to add the STREAMS driver to the system.  Looking at the
documentation for add_drv it says that add_drv should not be used to add
a STREAMS driver to the system. How do I add it then.

Thanks in advance.

Chinmay V. P.
University Of South Florida.


1. STREAMS Device Driver problem

Hi everybody,

I hope this is the right place for posting this query :)

This is regarding the STREAMS implementation on DEC OSF/1 3.0 on
DEC 2100 server.

I'm presently trying to write a hardware STREAMS device driver.
I'm able to successfully configure my Streams device driver into the
kernel statically.
My probe, attach, configure interfaces are being invoked properly.

But my wput() interface is somehow not getting invoked.
Could you tell me where to look for the bug !!

My device driver source code has the following Streams related
initializations :

    static  struct  module_info  minfo  =    {

    static  struct  qinit  rinit  =  {
      pcidsrput,  NULL,  pcids_open,  pcids_close,  NULL,  &minfo, NULL

    static  struct  qinit  winit  =  {
      pcidswput,  NULL,  NULL,  NULL,  NULL,  &minfo, NULL

    struct  streamtab  pcids_info  =  { &rinit, &winit, NULL, NULL };

My pcids_configure interface successfully managed to add the
pcids driver using the strmod_add() kernel utility.

Even my xxxopen and xxxxclose interface are being invoked properly.
But my write() to this device (before closing !!) returns 0xFFFFFFFF (-1).
That is to say that my pcidswput() interface never manages to print the
"I'm inside pcidswput...." in the console.

My pcidswput() interface looks like this :

    static int pcidswput  (q,  mp)
        queue_t  *q;
        mblk_t   *mp;

      printf ("I'm inside pcidswput....\n") ;
      switch  (DB_TYPE(mp))  {
        case  M_FLUSH:
          if  (*mp->b_rptr  &  FLUSHW)
            flushq(q,  0);
          putnext(q,  mp);
          putq(q,  mp);
      return  0;

What could be the problem ?

Thanks in anticipation.
Please make it convenient to send me a reply by email.

Abhay Ranade

CDAC, India.

2. puzzling xkbcomp error

3. Help needed on STREAMS device drivers..

4. linux on partition beyond 1024 cylinders?

5. Streams device driver - open and close routines

6. XFree86 and Diamond Viper 550

7. STREAMS device driver for Solaris x86

8. Satan-1.1.1 with Perl5.004_4-6 and Linux

9. 2 APIs for a STREAMS device driver in Solaris

10. STREAMS device driver example

11. Are STREAMS device drivers mmap'able ?

12. Solaris multiplexed stream device driver trouble

13. setsid and streams/device driver output to controlling terminal