Mailing List archive

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

[linux-dvb] Re: New Skystar2 drivers release



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).

Holger


------------------------------------------------------------------------

--- skystar2.c.original 2003-06-24 10:13:24.000000000 +0000
+++ skystar2.c 2003-06-24 09:19:42.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;
@@ -2625,6 +2631,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 +2651,11 @@
if ( adapter != NULL )
{
+/*
+ dvb_net_release(&adapter->dvb_net);
+*/
+ dvb_net_release(&dvb_net);
+
dvbdemux = &adapter->demux;

dvbdemux->dmx.close(&dvbdemux->dmx);


--
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index