STREAMS Device Driver problem

STREAMS Device Driver problem

Post by Ashutosh Bhaler » Tue, 22 Aug 1995 04:00:00



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  =    {
      0,  PCIDSNAME,  PCIDSMINPSZ,  PCIDSMAXPSZ,  PCIDSHIWAT,  PCIDSLOWAT
    };

    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
message
"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);
          break;
        default:
          putq(q,  mp);
          break;
      }
      return  0;
    }

What could be the problem ?

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

Regards,
Abhay Ranade

CDAC, India.

 
 
 

STREAMS Device Driver problem

Post by Ashutosh Bhaler » Tue, 22 Aug 1995 04:00:00


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  =    {
      0,  PCIDSNAME,  PCIDSMINPSZ,  PCIDSMAXPSZ,  PCIDSHIWAT,  PCIDSLOWAT
    };

    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 message
"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);
          break;
        default:
          putq(q,  mp);
          break;
      }
      return  0;
    }

What could be the problem ?

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

Regards,
Abhay Ranade

CDAC, India.

 
 
 

1. Help needed on STREAMS device drivers..

Hi,

I am modifying a non-stream character device driver to
a STREAMS-based device driver. The hardware in question
is a locally made ethernet card. The OS is SCO UNIX 5.3.2.

I am a beginner as far ar STREAMS are concerned. I have
managed to do the send-packet function using STREAMS.
I am having problems in the receive side as follows:

I receive packets thru the interrupt service routine
called lanintr(). But I am not able to pass the packets
up to the STREAM-head using the STREAMS mechanism.

Any suggestions/ideas appreciated.

Thanks.

--ajit

2. Can't make certificates for Apache-SSL

3. Streams device driver - open and close routines

4. Intergraph Voodo rush

5. STREAMS device driver for Solaris x86

6. Bttv and a Diamond DTV 2001 video/tv card

7. 2 APIs for a STREAMS device driver in Solaris

8. Hercules dynamite 3d/gl

9. Device Drivers & STREAMS

10. STREAMS based tty device driver source code

11. Streams Device Drivers

12. STREAMS device driver example

13. Are STREAMS device drivers mmap'able ?