Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] Re: New Skystar2 drivers release



On Tue, 24 Jun 2003, Holger Waechtler wrote:

> Holger Kiehl wrote:
> >>>
> >>>   Device: /dev/dvb/adapter0/net0
> >>>   Error: couldn't open device /dev/dvb/adapter0/net0, aborting...
> >>>
> >>>Any idea what I am doing wrong? The device /dev/dvb/adapter0/net0 does
> >>>exist.
> >>
> >>The driver has to call dvb_net_init() and dvb_net_release() in order to 
> >>register a DVB network device. Pretty trivial to implement, take one of 
> >>the other drivers as example.
> >>
> > 
> > Pretty trivial to implement.... Maybe for someone who does this every day
> > but not for a beginner like me ;)
> > 
> > I did put in a dvb_net_init() and a dvb_net_release() and a
> > ./dvbnet -p 100 works correctly. But as soon as I want to give this
> > interface an IP it hangs the pc hard and only a reset brings it back
> > to live.
> > 
> > Attached you will find the patch what I did. Most properly the places
> > where I put in the dvb_net code is not correct, so please someone with more
> > inside tell me what I am doing wrong.
> 
> Have you attached a serial debug console to your box so that you can see 
> what exactly happens? Are there any messages when the bos is locking up? 
> Such problems are usually occuring if DMA transfers are running amok, so 
> you might want to check the irq handler code and the DMA transfer setup 
> code...
> 
> In your patch the code you commented out looks correct on a first 
> glance. After a short review of skystar2.c I realized that the driver is 
> not calling dvb_dmx_swfilter_packets() but feed->cb.ts() directly. Thus 
> section filters won't work and the network code neither. So this has to 
> be changed first. Just replace feed->cb.ts(buf, count, ...) by 
> dvb_dmx_swfilter_packet(demux, buf, count/188).
> 
Thanks! That did help now it no longer hangs and I can configure it with
ifconfig without any problems. And I can see that the card does receive data.

However I still do not manage to receive any files with the closed
source tellique software. The tellique software uses a so called
anouncement channel (PID 100) and then one or more data channels (PID 300
+ 500). On the anouncement channel we do receive data, but not on the
other two. I am beginning to wonder if the way that I am trying to
set this up is correct. What I do is as follows:

    make insmod
    szap -n 1 (for hotbird 6)
    dvbnet -p 100
    /sbin/ifconfig dvb0_0 192.168.238.238
    /sbin/ifconfig dvb0_0 hw ether 00:d0:d7:04:70:a3
    dvbnet -p 300
    /sbin/ifconfig dvb0_1 192.168.238.238
    /sbin/ifconfig dvb0_1 hw ether 00:d0:d7:04:70:a3
    dvbnet -p 500
    /sbin/ifconfig dvb0_2 192.168.238.238
    /sbin/ifconfig dvb0_2 hw ether 00:d0:d7:04:70:a3

Is this the correct way to set this up? Looking at the setup of the
pent@value, here it is only necessary to call ifconfig once and there
is only ONE device in ifconfig for all three PID's. So is the above
setup correct?

Thanks,
Holger (Kiehl)

PS: Attached you will find the patch with your recommended changes.
--- skystar2.c.original	2003-06-24 10:13:24.000000000 +0000
+++ skystar2.c	2003-06-24 11:42:26.000000000 +0000
@@ -34,6 +34,7 @@
 #include "../dvb_filter.h"
 #include "../dvbdev.h"
 #include "../demux.h"
+#include "../dvb_net.h"
 
 int debug = 1;
 #define dprintk	if(debug == 1) printk
@@ -41,6 +42,8 @@
 #define SizeOfBufDMA1	0x3AC00
 #define SizeOfBufDMA2	0x758
 
+struct dvb_net dvb_net;
+
 struct DmaQ {
 
     u32 bus_addr;
@@ -78,6 +81,9 @@
 
     struct dvb_adapter * dvb_adapter;
     struct dvb_demux demux;    
+/*
+    struct dvb_net dvb_net;
+*/
     dmxdev_t dmxdev;	
     dmx_frontend_t hw_frontend;
     dmx_frontend_t mem_frontend;
@@ -2026,7 +2032,10 @@
 
 		    if ( dvbdmxfeed != NULL )
 		    {
+/*
 		        dvbdmxfeed->cb.ts(pbDMABufCurPos, dwDefaultPacketSize, 0, 0, &dvbdmxfeed->feed.ts, DMX_OK);
+*/
+		        dvb_dmx_swfilter_packets(dvbdmx, pbDMABufCurPos, dwDefaultPacketSize/188);
 		    }
 
 		} else {
@@ -2625,6 +2634,11 @@
     ret = dvbdemux->dmx.connect_frontend(&dvbdemux->dmx, &adapter->hw_frontend);
     if (ret < 0) return ret;
 
+/*
+    dvb_net_init(adapter->dvb_adapter, &adapter->dvb_net, &dvbdemux->dmx);
+*/
+    dvb_net_init(adapter->dvb_adapter, &dvb_net, &dvbdemux->dmx);
+
     return 0;
 }
 
@@ -2640,6 +2654,11 @@
 
     if ( adapter != NULL )
     {
+/*
+	dvb_net_release(&adapter->dvb_net);
+*/
+	dvb_net_release(&dvb_net);
+
 	dvbdemux = &adapter->demux;
 	
     	dvbdemux->dmx.close(&dvbdemux->dmx);

Home | Main Index | Thread Index