Porting NCR MP-RAS Streams Driver to Solaris 2.7

Porting NCR MP-RAS Streams Driver to Solaris 2.7

Post by Carlos Tirad » Thu, 01 Oct 1998 04:00:00



I am hoping that someone can help me with a problem I'm
having on solaris 2.7.  I have an NCR MP-RAS unix driver that was
converted to Solaris 2.7.  This Driver has an LU side and a PU
side (see diagram below) with each having their own streams
definitions and the required solaris module config entry points,
modlinkage, and auto config entry points. When I load the PU driver,

/*    I use the following command to load the drivers:
      /usr/sbin/add_drv -m '* 0666 root sys' pu
      /usr/sbin/add_drv -m '* 0666 root sys' lu
*/

Solaris loads it successfully and devices get created.  When I try
to load the LU driver I get the following error:

drvconfig: Driver (lu) failed to attach                              
Warning: Driver (lu) successfully added to system but failed to attach

On the /var/adm/messages log, the following error is logged:

Sep 30 16:36:11 phoebus unix: /usr/kernel/drv/lu: undefined symbol
Sep 30 16:36:11 phoebus unix:  LU_srv                            
Sep 30 16:36:11 phoebus unix: /usr/kernel/drv/lu: undefined symbol
Sep 30 16:36:11 phoebus unix:  LU_uwput                          
Sep 30 16:36:11 phoebus unix: /usr/kernel/drv/lu: undefined symbol
Sep 30 16:36:11 phoebus unix:  LU_close                          
Sep 30 16:36:11 phoebus unix: /usr/kernel/drv/lu: undefined symbol
Sep 30 16:36:11 phoebus unix:  LU_open                            
Sep 30 16:36:11 phoebus unix: /usr/kernel/drv/lu: undefined symbol
Sep 30 16:36:11 phoebus unix:  LU_ursrv                          
Sep 30 16:36:11 phoebus unix: WARNING: mod_load:                  
Sep 30 16:36:11 phoebus unix: cannot load module 'lu'            

The functions listed above as undefined symbols are defined in
lu.Driver.c as
follows:                                                                

extern int     LU_open(queue_t *, dev_t *, int, int, cred_t *);
extern int     LU_close(queue_t *, int, cred_t *);              
extern int     LU_uwput(queue_t *, mblk_t *);                  
extern int     LU_srv(queue_t *);                              
extern int     LU_ursrv(queue_t *);                            

and actually exist in the pu.Driver.c

I compile with the following job:

/usr/xpg4/bin/make -f r3mux.mk                                    
/opt/SUNWspro/SC4.2/bin/cc -c  -DMP -D_KERNEL -DKERNEL lu.Driver.c
/opt/SUNWspro/SC4.2/bin/cc -c  -DMP -D_KERNEL -DKERNEL pu.Driver.c

partial display of nm -s output is :

lu.Driver.o:                                                        

[Index]   Value      Size    Type  Bind  Other Shname         Name  
[66]    |         0|       0|NOTY |GLOB |0    |UNDEF         |LU_close
[67]    |         0|       0|NOTY |GLOB |0    |UNDEF         |LU_open  
[63]    |         0|       0|NOTY |GLOB |0    |UNDEF         |LU_srv  
[68]    |         0|       0|NOTY |GLOB |0    |UNDEF         |LU_ursrv
[64]    |         0|       0|NOTY |GLOB |0    |UNDEF         |LU_uwput

pu.Driver.o:                                                                    

[Index]   Value      Size    Type  Bind  Other Shname        
Name              

[91]    |      4224|     957|FUNC |GLOB |0    |.text        
|LU_close        
[95]    |      2528|     813|FUNC |GLOB |0    |.text        
|LU_open        
[77]    |     15952|     681|FUNC |GLOB |0    |.text        
|LU_srv          
[76]    |     17040|     820|FUNC |GLOB |0    |.text        
|LU_ursrv        
[81]    |     11328|    3709|FUNC |GLOB |0    |.text        
|LU_uwput        

My question is how do I get the extern symbols defined when I load the
lu driver?
How does solaris resolve the symbol table?

I would think that once the pu driver was successfully loaded,
its symbols and function would be resolved for the lu driver.
(linked together like with MP_RAS UNIX).

ANY IDEAS?

DATA flow between the APPLICATIONS, through the mux, and to the
snabase      

        LU application                          
snabase                      

        read     write                        getmsg  
putmsg                  
          |        |                             |       |
user
----|--------|-----------------------------|-------|-----------          
         ----     ----                          ----    ----   kernel
space    
 stream | rq |   | wq |              stream    | rq |  | wq
|                  
 heads   ----     ----               heads      ----  
----                    
          |        |                             |      
|                      
          ^        v                             ^      
v                      
          |        |                             |      
|                      
         ----     ----                          ----  
----                
        | rq |   | wq | LU side                | rq |  | wq | PU
side          
         ----     ----  queues                  ----    ----
queues            
          |        |                             ^      
|                      
          ^        v                             |      
v                      
          |         --------     ----->   -------      
|                      
          ^                                            
v                      
          |                                            
|                      
           ----- <------------  ------    <---------
---

 
 
 

Porting NCR MP-RAS Streams Driver to Solaris 2.7

Post by Casper H.S. Dik - Network Security Engine » Fri, 02 Oct 1998 04:00:00


[[ PLEASE DON'T SEND ME EMAIL COPIES OF POSTINGS ]]


>The functions listed above as undefined symbols are defined in
>lu.Driver.c as
>follows:                                                                
>extern int     LU_open(queue_t *, dev_t *, int, int, cred_t *);
>extern int     LU_close(queue_t *, int, cred_t *);              
>extern int     LU_uwput(queue_t *, mblk_t *);                  
>extern int     LU_srv(queue_t *);                              
>extern int     LU_ursrv(queue_t *);                            
>and actually exist in the pu.Driver.c

Drivers have isolated namespaces.

When a driver needs symbols from another driver, there's currently only
one way, add the following code to the "LU" driver:

char _depends_on[] = "drv/pu";

Casper
--
Expressed in this posting are my opinions.  They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.

 
 
 

Porting NCR MP-RAS Streams Driver to Solaris 2.7

Post by Uwe Pflau » Fri, 02 Oct 1998 04:00:00



Quote:

> Drivers have isolated namespaces.

> When a driver needs symbols from another driver, there's currently only
> one way, add the following code to the "LU" driver:

> char _depends_on[] = "drv/pu";

> Casper
> --

We have the same problem porting our drivers to Solaris 2.7 and were
successful using "_depends_on". But asking an expert from SUN we learned
that we have to use the ld-flag "-N" instead:

        ld -r -o lu lu.o -N drv/pu -dy

This works - at least with build 19 of Solaris 2.7.

Uwe

 
 
 

Porting NCR MP-RAS Streams Driver to Solaris 2.7

Post by Casper H.S. Dik - Network Security Engine » Fri, 02 Oct 1998 04:00:00


[[ PLEASE DON'T SEND ME EMAIL COPIES OF POSTINGS ]]


>We have the same problem porting our drivers to Solaris 2.7 and were
>successful using "_depends_on". But asking an expert from SUN we learned
>that we have to use the ld-flag "-N" instead:
>    ld -r -o lu lu.o -N drv/pu -dy
>This works - at least with build 19 of Solaris 2.7.

Yes, it probably worked before that; there seems to be some evidence
of use (/platform/$PLATFORM/kernel/unix) in 2.5.1 even.

Casper
--
Expressed in this posting are my opinions.  They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.

 
 
 

Porting NCR MP-RAS Streams Driver to Solaris 2.7

Post by chik » Fri, 09 Oct 1998 04:00:00


Are you adding  the lu driver without  adding pu driver ?
This scenario can happen only when pu is not loaded.

first add pu and when it has gone through successfully add lu ...

The only problem we can see here is that the symbols are not getting
resolved which is very odd and can not happen once pu is loaded.
--
Srikant
http://members.tripod.com/~chiku
NCR Dedicated Facility. Wipro Infotech.


> I am hoping that someone can help me with a problem I'm
> having on solaris 2.7.  I have an NCR MP-RAS unix driver that was
> converted to Solaris 2.7.  This Driver has an LU side and a PU
> side (see diagram below) with each having their own streams
> definitions and the required solaris module config entry points,
> modlinkage, and auto config entry points. When I load the PU driver,

> /*    I use the following command to load the drivers:
>       /usr/sbin/add_drv -m '* 0666 root sys' pu
>       /usr/sbin/add_drv -m '* 0666 root sys' lu
> */

> Solaris loads it successfully and devices get created.  When I try
> to load the LU driver I get the following error:

> drvconfig: Driver (lu) failed to attach
> Warning: Driver (lu) successfully added to system but failed to attach

> On the /var/adm/messages log, the following error is logged:

> Sep 30 16:36:11 phoebus unix: /usr/kernel/drv/lu: undefined symbol
> Sep 30 16:36:11 phoebus unix:  LU_srv
> Sep 30 16:36:11 phoebus unix: /usr/kernel/drv/lu: undefined symbol
> Sep 30 16:36:11 phoebus unix:  LU_uwput
> Sep 30 16:36:11 phoebus unix: /usr/kernel/drv/lu: undefined symbol
> Sep 30 16:36:11 phoebus unix:  LU_close
> Sep 30 16:36:11 phoebus unix: /usr/kernel/drv/lu: undefined symbol
> Sep 30 16:36:11 phoebus unix:  LU_open
> Sep 30 16:36:11 phoebus unix: /usr/kernel/drv/lu: undefined symbol
> Sep 30 16:36:11 phoebus unix:  LU_ursrv
> Sep 30 16:36:11 phoebus unix: WARNING: mod_load:
> Sep 30 16:36:11 phoebus unix: cannot load module 'lu'

> The functions listed above as undefined symbols are defined in
> lu.Driver.c as
> follows:

> extern int     LU_open(queue_t *, dev_t *, int, int, cred_t *);
> extern int     LU_close(queue_t *, int, cred_t *);
> extern int     LU_uwput(queue_t *, mblk_t *);
> extern int     LU_srv(queue_t *);
> extern int     LU_ursrv(queue_t *);

> and actually exist in the pu.Driver.c

> I compile with the following job:

> /usr/xpg4/bin/make -f r3mux.mk
> /opt/SUNWspro/SC4.2/bin/cc -c  -DMP -D_KERNEL -DKERNEL lu.Driver.c
> /opt/SUNWspro/SC4.2/bin/cc -c  -DMP -D_KERNEL -DKERNEL pu.Driver.c

> partial display of nm -s output is :

> lu.Driver.o:

> [Index]   Value      Size    Type  Bind  Other Shname         Name
> [66]    |         0|       0|NOTY |GLOB |0    |UNDEF         |LU_close
> [67]    |         0|       0|NOTY |GLOB |0    |UNDEF         |LU_open
> [63]    |         0|       0|NOTY |GLOB |0    |UNDEF         |LU_srv
> [68]    |         0|       0|NOTY |GLOB |0    |UNDEF         |LU_ursrv
> [64]    |         0|       0|NOTY |GLOB |0    |UNDEF         |LU_uwput

> pu.Driver.o:

> [Index]   Value      Size    Type  Bind  Other Shname
> Name

> [91]    |      4224|     957|FUNC |GLOB |0    |.text
> |LU_close
> [95]    |      2528|     813|FUNC |GLOB |0    |.text
> |LU_open
> [77]    |     15952|     681|FUNC |GLOB |0    |.text
> |LU_srv
> [76]    |     17040|     820|FUNC |GLOB |0    |.text
> |LU_ursrv
> [81]    |     11328|    3709|FUNC |GLOB |0    |.text
> |LU_uwput

> My question is how do I get the extern symbols defined when I load the
> lu driver?
> How does solaris resolve the symbol table?

> I would think that once the pu driver was successfully loaded,
> its symbols and function would be resolved for the lu driver.
> (linked together like with MP_RAS UNIX).

> ANY IDEAS?

> DATA flow between the APPLICATIONS, through the mux, and to the
> snabase

>         LU application
> snabase

>         read     write                        getmsg
> putmsg
>           |        |                             |       |
> user
> ----|--------|-----------------------------|-------|-----------
>          ----     ----                          ----    ----   kernel
> space
>  stream | rq |   | wq |              stream    | rq |  | wq
> |
>  heads   ----     ----               heads      ----
> ----
>           |        |                             |
> |
>           ^        v                             ^
> v
>           |        |                             |
> |
>          ----     ----                          ----
> ----
>         | rq |   | wq | LU side                | rq |  | wq | PU
> side
>          ----     ----  queues                  ----    ----
> queues
>           |        |                             ^
> |
>           ^        v                             |
> v
>           |         --------     ----->   -------
> |
>           ^
> v
>           |
> |
>            ----- <------------  ------    <---------
> ---

 
 
 

1. syslog not working under NCR MP-RAS UNIX

This problem has been haunting me for a month now.


The NCR MP-RAS has the following startup during the syslogd -d request

# syslogd -d
off & running....
init
Re-initialize transport connections
 Current NLOGS 5 OldNlogs 5

cfline(auth.info                        /var/log/autha)
cfline(*.info;*.debug                   /dev/console)
cfline(user.debug       /var/adm/usererr/error.10-07    )
7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 6 7 7 7 7 7 7 7 7 X FORW: 192.168.10.3
X X X X 6 X X X X X X X X X X X X X X X X X X X X FILE: /var/log/autha
7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 X TTY: /dev/console
X 7 X X X X X X X X X X X X X X X X X X X X X X X FILE: /var/adm/usererr/error.10-07
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 UNUSED:
logmsg: pri 56, flags 8, from support, msg syslogd: restart
Logging to FORW 192.168.10.3
Logging to TTY /dev/console
syslogd: restarted
                                                             <---------------------------------- Waiting but nothing happens
syslogd: going down on signal 2
syslogd: going down on signal 2
logmsg: pri 53, flags 8, from support, msg syslogd: going down on signal 2
Logging to FORW 192.168.10.3
Logging to TTY /dev/console

Best Regards and Thanks in advance

2. Help Stupido w/ ZIP-Drive

3. XC for NCR MP-RAS 3.01 Communication program???

4. kernel 2.2.18 compile fails on slackware

5. NCR UNIX SVR4 MP-RAS, Release 3.01??

6. Oracle and Memory

7. md5 for NCR MP-RAS

8. UNIX Where can i get it

9. MD% or SHA1 source code for NCR MP-RAS

10. Running Apache under NCR Unix System IV Release 4 (MP-RAS)

11. RAID 5 on NCR's MP-RAS

12. Resizing filesystems (NCR MP-RAS)

13. Seagate Backup Exec & MP-RAS