Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - nic_slogf not working with io-net: (6 Items)
   
nic_slogf not working with io-net  
Hi,

I am trying to write an SCC ethernet driver for my 800fads.
I am facing a problem using nic_slogf.
mount hangs wen i try to mount the driver, but wen i comment out nic_slogf, the driver gets mounted. 

mount process is in RECIEVE bloked state.

But if i use nic_slogf in a seperate application program, its working.

I am using nic_slogf in the init function of the dll entry. 

Please help. Below is a snippet of the function and state of io-net.

Thanks,
Jayanth


</snip>
int init_scc_eth(void *dll_hdl, dispatch_t *dpp, io_net_self_t *ion_ptr, char *options)
{
	//setbuf(stdout, NULL);
	nic_slogf( _SLOGC_NETWORK, _SLOG_ERROR, "Hello World 1\n");
	if ( (pv_immr_base_addr = mmap_device_io(32*1024, (get_spr(PPC800_SPR_IMMR)&PPC800_IMMR_ISB_MASK))) == NULL ) {
		errno=EIO;
		return -1;
	}
...
</snip>


<snip>
       6   1 proc/boot/io-net    10r SIGWAITINFO
       6   2 proc/boot/io-net    10r RECEIVE     1
       6   3 proc/boot/io-net    10r MUTEX       6-03 #1
       6   4 proc/boot/io-net    10r RECEIVE     1
</snip>

RE: nic_slogf not working with io-net  
Do you have slogger running?


-----Original Message-----
From: Jayanth Gurijala [mailto:community-noreply@qnx.com] 
Sent: Saturday, December 06, 2008 1:45 AM
To: drivers-networking
Subject: nic_slogf not working with io-net

Hi,

I am trying to write an SCC ethernet driver for my 800fads.
I am facing a problem using nic_slogf.
mount hangs wen i try to mount the driver, but wen i comment out
nic_slogf, the driver gets mounted. 

mount process is in RECIEVE bloked state.

But if i use nic_slogf in a seperate application program, its working.

I am using nic_slogf in the init function of the dll entry. 

Please help. Below is a snippet of the function and state of io-net.

Thanks,
Jayanth


</snip>
int init_scc_eth(void *dll_hdl, dispatch_t *dpp, io_net_self_t *ion_ptr,
char *options)
{
	//setbuf(stdout, NULL);
	nic_slogf( _SLOGC_NETWORK, _SLOG_ERROR, "Hello World 1\n");
	if ( (pv_immr_base_addr = mmap_device_io(32*1024,
(get_spr(PPC800_SPR_IMMR)&PPC800_IMMR_ISB_MASK))) == NULL ) {
		errno=EIO;
		return -1;
	}
...
</snip>


<snip>
       6   1 proc/boot/io-net    10r SIGWAITINFO
       6   2 proc/boot/io-net    10r RECEIVE     1
       6   3 proc/boot/io-net    10r MUTEX       6-03 #1
       6   4 proc/boot/io-net    10r RECEIVE     1
</snip>



_______________________________________________
Networking Drivers
http://community.qnx.com/sf/go/post18070
Re: nic_slogf not working with io-net  
Yes I have slogger running.
If i log messages through an application program independent of io-net, its
working perfectly.
(Ran the application, confirmed the messages logged.. then mounted the
driver which fails)

Here is how I am mounting my driver...
#io-net &
#mount -T io-net /proc/boot/devn-temp.so
(system hangs if nic_logf is used in the driver entry)...


On Mon, Dec 8, 2008 at 6:38 PM, Hugh Brown <community-noreply@qnx.com>wrote:

> Do you have slogger running?
>
>
> -----Original Message-----
> From: Jayanth Gurijala [mailto:community-noreply@qnx.com]
> Sent: Saturday, December 06, 2008 1:45 AM
> To: drivers-networking
> Subject: nic_slogf not working with io-net
>
> Hi,
>
> I am trying to write an SCC ethernet driver for my 800fads.
> I am facing a problem using nic_slogf.
> mount hangs wen i try to mount the driver, but wen i comment out
> nic_slogf, the driver gets mounted.
>
> mount process is in RECIEVE bloked state.
>
> But if i use nic_slogf in a seperate application program, its working.
>
> I am using nic_slogf in the init function of the dll entry.
>
> Please help. Below is a snippet of the function and state of io-net.
>
> Thanks,
> Jayanth
>
>
> </snip>
> int init_scc_eth(void *dll_hdl, dispatch_t *dpp, io_net_self_t *ion_ptr,
> char *options)
> {
>        //setbuf(stdout, NULL);
>        nic_slogf( _SLOGC_NETWORK, _SLOG_ERROR, "Hello World 1\n");
>        if ( (pv_immr_base_addr = mmap_device_io(32*1024,
> (get_spr(PPC800_SPR_IMMR)&PPC800_IMMR_ISB_MASK))) == NULL ) {
>                errno=EIO;
>                return -1;
>        }
> ...
> </snip>
>
>
> <snip>
>       6   1 proc/boot/io-net    10r SIGWAITINFO
>       6   2 proc/boot/io-net    10r RECEIVE     1
>       6   3 proc/boot/io-net    10r MUTEX       6-03 #1
>       6   4 proc/boot/io-net    10r RECEIVE     1
> </snip>
>
>
>
> _______________________________________________
> Networking Drivers
> http://community.qnx.com/sf/go/post18070
>
>
> _______________________________________________
> Networking Drivers
> http://community.qnx.com/sf/go/post18095
>
>
Re: nic_slogf not working with io-net  
The pidin shows that thread 3 tried to lock the
same mutex twice.  Attach to io-net with the
debugger and get a backtrace of thread 3.  The
slogf probably just changes the timing and has
nothing to do with the root cause.

-seanb

On Mon, Dec 08, 2008 at 12:04:55PM -0500, Jayanth Gurijala wrote:
> Yes I have slogger running.
> If i log messages through an application program independent of io-net, its
> working perfectly.
> (Ran the application, confirmed the messages logged.. then mounted the
> driver which fails)
> 
> Here is how I am mounting my driver...
> #io-net &
> #mount -T io-net /proc/boot/devn-temp.so
> (system hangs if nic_logf is used in the driver entry)...
> 
> 
> On Mon, Dec 8, 2008 at 6:38 PM, Hugh Brown <community-noreply@qnx.com>wrote:
> 
> > Do you have slogger running?
> >
> >
> > -----Original Message-----
> > From: Jayanth Gurijala [mailto:community-noreply@qnx.com]
> > Sent: Saturday, December 06, 2008 1:45 AM
> > To: drivers-networking
> > Subject: nic_slogf not working with io-net
> >
> > Hi,
> >
> > I am trying to write an SCC ethernet driver for my 800fads.
> > I am facing a problem using nic_slogf.
> > mount hangs wen i try to mount the driver, but wen i comment out
> > nic_slogf, the driver gets mounted.
> >
> > mount process is in RECIEVE bloked state.
> >
> > But if i use nic_slogf in a seperate application program, its working.
> >
> > I am using nic_slogf in the init function of the dll entry.
> >
> > Please help. Below is a snippet of the function and state of io-net.
> >
> > Thanks,
> > Jayanth
> >
> >
> > </snip>
> > int init_scc_eth(void *dll_hdl, dispatch_t *dpp, io_net_self_t *ion_ptr,
> > char *options)
> > {
> >        //setbuf(stdout, NULL);
> >        nic_slogf( _SLOGC_NETWORK, _SLOG_ERROR, "Hello World 1\n");
> >        if ( (pv_immr_base_addr = mmap_device_io(32*1024,
> > (get_spr(PPC800_SPR_IMMR)&PPC800_IMMR_ISB_MASK))) == NULL ) {
> >                errno=EIO;
> >                return -1;
> >        }
> > ...
> > </snip>
> >
> >
> > <snip>
> >       6   1 proc/boot/io-net    10r SIGWAITINFO
> >       6   2 proc/boot/io-net    10r RECEIVE     1
> >       6   3 proc/boot/io-net    10r MUTEX       6-03 #1
> >       6   4 proc/boot/io-net    10r RECEIVE     1
> > </snip>
> >
> >
> >
> > _______________________________________________
> > Networking Drivers
> > http://community.qnx.com/sf/go/post18070
> >
> >
> > _______________________________________________
> > Networking Drivers
> > http://community.qnx.com/sf/go/post18095
> >
> >
> 
> 
> _______________________________________________
> Networking Drivers
> http://community.qnx.com/sf/go/post18141
> 
Re: nic_slogf not working with io-net  
Hi Sean,

I need a little help in attaching the debugger.
My board is connected to the host only through one serial cable which I use
for console terminal.
Can we attach a debugger through the same serial connection? coz my setup
does not yet
have an ethernet driver.. yet.

If yes, can you tell me how to or point me to the link with instructions?

Thanks,
Jayanth

On Mon, Dec 8, 2008 at 10:38 PM, Sean Boudreau <community-noreply@qnx.com>wrote:

>
> The pidin shows that thread 3 tried to lock the
> same mutex twice.  Attach to io-net with the
> debugger and get a backtrace of thread 3.  The
> slogf probably just changes the timing and has
> nothing to do with the root cause.
>
> -seanb
>
> On Mon, Dec 08, 2008 at 12:04:55PM -0500, Jayanth Gurijala wrote:
> > Yes I have slogger running.
> > If i log messages through an application program independent of io-net,
> its
> > working perfectly.
> > (Ran the application, confirmed the messages logged.. then mounted the
> > driver which fails)
> >
> > Here is how I am mounting my driver...
> > #io-net &
> > #mount -T io-net /proc/boot/devn-temp.so
> > (system hangs if nic_logf is used in the driver entry)...
> >
> >
> > On Mon, Dec 8, 2008 at 6:38 PM, Hugh Brown <community-noreply@qnx.com
> >wrote:
> >
> > > Do you have slogger running?
> > >
> > >
> > > -----Original Message-----
> > > From: Jayanth Gurijala [mailto:community-noreply@qnx.com]
> > > Sent: Saturday, December 06, 2008 1:45 AM
> > > To: drivers-networking
> > > Subject: nic_slogf not working with io-net
> > >
> > > Hi,
> > >
> > > I am trying to write an SCC ethernet driver for my 800fads.
> > > I am facing a problem using nic_slogf.
> > > mount hangs wen i try to mount the driver, but wen i comment out
> > > nic_slogf, the driver gets mounted.
> > >
> > > mount process is in RECIEVE bloked state.
> > >
> > > But if i use nic_slogf in a seperate application program, its working.
> > >
> > > I am using nic_slogf in the init function of the dll entry.
> > >
> > > Please help. Below is a snippet of the function and state of io-net.
> > >
> > > Thanks,
> > > Jayanth
> > >
> > >
> > > </snip>
> > > int init_scc_eth(void *dll_hdl, dispatch_t *dpp, io_net_self_t
> *ion_ptr,
> > > char *options)
> > > {
> > >        //setbuf(stdout, NULL);
> > >        nic_slogf( _SLOGC_NETWORK, _SLOG_ERROR, "Hello World 1\n");
> > >        if ( (pv_immr_base_addr = mmap_device_io(32*1024,
> > > (get_spr(PPC800_SPR_IMMR)&PPC800_IMMR_ISB_MASK))) == NULL ) {
> > >                errno=EIO;
> > >                return -1;
> > >        }
> > > ...
> > > </snip>
> > >
> > >
> > > <snip>
> > >       6   1 proc/boot/io-net    10r SIGWAITINFO
> > >       6   2 proc/boot/io-net    10r RECEIVE     1
> > >       6   3 proc/boot/io-net    10r MUTEX       6-03 #1
> > >       6   4 proc/boot/io-net    10r RECEIVE     1
> > > </snip>
> > >
> > >
> > >
> > > _______________________________________________
> > > Networking Drivers
> > > http://community.qnx.com/sf/go/post18070
> > >
> > >
> > > _______________________________________________
> > > Networking Drivers
> > > http://community.qnx.com/sf/go/post18095
> > >
> > >
> >
> >
> >...
RE: nic_slogf not working with io-net  
> I need a little help in attaching the debugger.

If all you want is a backtrace, do this:

  # dumper -p <pid_of_io-net> -d /tmp

which will snapshot a core file of io-net
which you can then look at with gdb.

--
aboyd