Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: ashu@bga.com (Ashutosh Bhalerao)
Subject: STREAMS Device Driver problem
Date: 1995/08/21	[thread overview]
Message-ID: <41an2o$7bi@giga.bga.com> (raw)

Distribution: global
Summary: 
Keywords: 

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
abhayr@falcon.cdac.ernet.in
CDAC, India.




                 reply	other threads:[~1995-08-21  4:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox